diff --git a/LATEST_RELEASE b/LATEST_RELEASE index 5503126d..20805912 100644 --- a/LATEST_RELEASE +++ b/LATEST_RELEASE @@ -1 +1 @@ -0.3.10 +0.3.11 diff --git a/VERSION b/VERSION index 20805912..0b9c0199 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.11 +0.3.12 diff --git a/apps/app/src/pack/examples/splitwell/splitwell-validator.conf b/apps/app/src/pack/examples/splitwell/splitwell-validator.conf index 89e6f4ea..e22daff0 100644 --- a/apps/app/src/pack/examples/splitwell/splitwell-validator.conf +++ b/apps/app/src/pack/examples/splitwell/splitwell-validator.conf @@ -30,6 +30,7 @@ canton { user = ${?CANTON_DB_USER} password = "supersafe" password = ${?CANTON_DB_PASSWORD} + tcpKeepAlive = true } } parameters { diff --git a/apps/app/src/pack/examples/splitwell/splitwell.conf b/apps/app/src/pack/examples/splitwell/splitwell.conf index 25f2ae79..49ec614c 100644 --- a/apps/app/src/pack/examples/splitwell/splitwell.conf +++ b/apps/app/src/pack/examples/splitwell/splitwell.conf @@ -24,6 +24,7 @@ canton { user = ${?CANTON_DB_USER} password = "supersafe" password = ${?CANTON_DB_PASSWORD} + tcpKeepAlive = true } } parameters { diff --git a/apps/app/src/pack/examples/sv-helm/sv-values.yaml b/apps/app/src/pack/examples/sv-helm/sv-values.yaml index 1bde793c..7cc34206 100644 --- a/apps/app/src/pack/examples/sv-helm/sv-values.yaml +++ b/apps/app/src/pack/examples/sv-helm/sv-values.yaml @@ -36,15 +36,20 @@ participantAddress: "participant-MIGRATION_ID" # Please make the ``global-domain-sequencer`` service accessible for other validators to subscribe to, and set the URL below to your sequencer service. # Make sure your cluster's ingress is correctly configured for the sequencer service and can be accessed through the provided URL. # Replace MIGRATION_ID with the migration ID of the global synchronizer. +#DOCS_PRUNING_START domain: - sequencerAddress: "global-domain-MIGRATION_ID-sequencer" - mediatorAddress: "global-domain-MIGRATION_ID-mediator" - sequencerPublicUrl: "https://sequencer-MIGRATION_ID.sv.YOUR_HOSTNAME" - sequencerAvailabilityDelay: "60 seconds" sequencerPruningConfig: + # Enable or disable sequencer pruning enabled: true + # The pruning interval is the time between two consecutive prunings. pruningInterval: "1 hour" + # The retention period is the time for which the sequencer will retain the data. retentionPeriod: "30 days" +#DOCS_PRUNING_END + sequencerAddress: "global-domain-MIGRATION_ID-sequencer" + mediatorAddress: "global-domain-MIGRATION_ID-mediator" + sequencerPublicUrl: "https://sequencer-MIGRATION_ID.sv.YOUR_HOSTNAME" + sequencerAvailabilityDelay: "60 seconds" # Please make the ``scan`` service `publicUrl` accessible for other validators to read from, and set the URL below to your Scan service. # Make sure your cluster's ingress is correctly configured for Scan and can be accessed through the provided URL. diff --git a/apps/app/src/test/resources/include/canton-basic.conf b/apps/app/src/test/resources/include/canton-basic.conf index a51decb1..5d28df2d 100644 --- a/apps/app/src/test/resources/include/canton-basic.conf +++ b/apps/app/src/test/resources/include/canton-basic.conf @@ -1,3 +1,5 @@ +include required("storage-postgres.conf") + canton { features = { enable-testing-commands = yes diff --git a/apps/app/src/test/resources/include/scans/_scan.conf b/apps/app/src/test/resources/include/scans/_scan.conf index 3578cd83..ee5611d8 100644 --- a/apps/app/src/test/resources/include/scans/_scan.conf +++ b/apps/app/src/test/resources/include/scans/_scan.conf @@ -1,19 +1,10 @@ { include required("../splice-instance-names.conf") + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/include/splitwell-apps/provider-splitwell-backend.conf b/apps/app/src/test/resources/include/splitwell-apps/provider-splitwell-backend.conf index df3557e5..d893fcb6 100644 --- a/apps/app/src/test/resources/include/splitwell-apps/provider-splitwell-backend.conf +++ b/apps/app/src/test/resources/include/splitwell-apps/provider-splitwell-backend.conf @@ -1,19 +1,10 @@ providerSplitwellBackend { include required("../scan-client") + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/include/storage-postgres.conf b/apps/app/src/test/resources/include/storage-postgres.conf index f37c2f40..b1973ff4 100644 --- a/apps/app/src/test/resources/include/storage-postgres.conf +++ b/apps/app/src/test/resources/include/storage-postgres.conf @@ -1,4 +1,3 @@ -# Visit the advanced configuration example for further details on this shared persistence configuration _shared { storage { type = postgres @@ -6,19 +5,20 @@ _shared { dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { serverName = "localhost" - serverName = ${?CANTON_DB_HOST} + serverName = ${?POSTGRES_HOST} portNumber = "5432" - portNumber = ${?CANTON_DB_PORT} - user = "postgres" - user = ${?CANTON_DB_USER} - password = "postgres" - password = ${?CANTON_DB_PASSWORD} + portNumber = ${?POSTGRES_PORT} + user = "canton" + user = ${?POSTGRES_USER} + password = "supersafe" + password = ${?POSTGRES_PASSWORD} + tcpKeepAlive = true } } parameters { # The following is an educated guess of a sane default for the number of DB connections. # https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing - max-connections = 64 + max-connections = 8 } } } diff --git a/apps/app/src/test/resources/include/svs/_sv.conf b/apps/app/src/test/resources/include/svs/_sv.conf index 1c23c018..c13a186c 100644 --- a/apps/app/src/test/resources/include/svs/_sv.conf +++ b/apps/app/src/test/resources/include/svs/_sv.conf @@ -1,19 +1,10 @@ { include required("../splice-instance-names.conf") + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/include/validators/_validator.conf b/apps/app/src/test/resources/include/validators/_validator.conf index 749e6af1..fd579480 100644 --- a/apps/app/src/test/resources/include/validators/_validator.conf +++ b/apps/app/src/test/resources/include/validators/_validator.conf @@ -1,18 +1,9 @@ { + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/local-sv-node/scan-app/app.conf b/apps/app/src/test/resources/local-sv-node/scan-app/app.conf index 5f043bab..ab25c99e 100644 --- a/apps/app/src/test/resources/local-sv-node/scan-app/app.conf +++ b/apps/app/src/test/resources/local-sv-node/scan-app/app.conf @@ -1,3 +1,4 @@ +include required("../../include/storage-postgres.conf") _scan_participant_client { admin-api = { address = "0.0.0.0" @@ -21,20 +22,11 @@ canton { sv1ScanLocal { include required("../../include/splice-instance-names.conf") + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/local-sv-node/sv-app/app.conf b/apps/app/src/test/resources/local-sv-node/sv-app/app.conf index 894c066c..d546795e 100644 --- a/apps/app/src/test/resources/local-sv-node/sv-app/app.conf +++ b/apps/app/src/test/resources/local-sv-node/sv-app/app.conf @@ -1,19 +1,11 @@ +include required("../../include/storage-postgres.conf") _sv { include required("../../include/splice-instance-names.conf") + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/local-sv-node/validator-app/app.conf b/apps/app/src/test/resources/local-sv-node/validator-app/app.conf index 69d7afcc..d6b8d2df 100644 --- a/apps/app/src/test/resources/local-sv-node/validator-app/app.conf +++ b/apps/app/src/test/resources/local-sv-node/validator-app/app.conf @@ -1,20 +1,12 @@ +include required("../../include/storage-postgres.conf") canton { validator-apps { sv1ValidatorLocal { + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/local-validator-node/validator-app/app.conf b/apps/app/src/test/resources/local-validator-node/validator-app/app.conf index b5fc5319..535fd3ca 100644 --- a/apps/app/src/test/resources/local-validator-node/validator-app/app.conf +++ b/apps/app/src/test/resources/local-validator-node/validator-app/app.conf @@ -1,20 +1,12 @@ +include required("../../include/storage-postgres.conf") canton { validator-apps { aliceValidatorLocal { + storage = ${_shared.storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { - serverName = "localhost" - serverName = ${?POSTGRES_HOST} - portNumber = "5432" - portNumber = ${?POSTGRES_PORT} databaseName = "splice_apps" - user = "canton" - user = ${?POSTGRES_USER} - password = "supersafe" - password = ${?POSTGRES_PASSWORD} } } } diff --git a/apps/app/src/test/resources/minimal-topology-2svs.conf b/apps/app/src/test/resources/minimal-topology-2svs.conf index bf862ea4..09ab6604 100644 --- a/apps/app/src/test/resources/minimal-topology-2svs.conf +++ b/apps/app/src/test/resources/minimal-topology-2svs.conf @@ -1,3 +1,5 @@ +include required("include/canton-basic.conf") + canton { sv-apps { sv1 { include required("include/svs/sv1") } diff --git a/apps/app/src/test/resources/minimal-topology.conf b/apps/app/src/test/resources/minimal-topology.conf index c5ecadec..63ab77a4 100644 --- a/apps/app/src/test/resources/minimal-topology.conf +++ b/apps/app/src/test/resources/minimal-topology.conf @@ -1,3 +1,5 @@ +include required("include/canton-basic.conf") + canton { sv-apps { sv1 { include required("include/svs/sv1") } diff --git a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/ValidatorIntegrationTest.scala b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/ValidatorIntegrationTest.scala index 509dfff5..707d1eda 100644 --- a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/ValidatorIntegrationTest.scala +++ b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/ValidatorIntegrationTest.scala @@ -2,6 +2,7 @@ package org.lfdecentralizedtrust.splice.integration.tests import com.auth0.jwt.JWT import com.auth0.jwt.algorithms.Algorithm +import monocle.macros.syntax.lens.* import org.lfdecentralizedtrust.splice.auth.AuthUtil import org.lfdecentralizedtrust.splice.codegen.java.splice import org.lfdecentralizedtrust.splice.codegen.java.splice.validatorlicense.ValidatorLicense @@ -54,6 +55,18 @@ class ValidatorIntegrationTest extends IntegrationTest with WalletTestUtil { ) ) }) + .addConfigTransformToFront((_, config) => { + // Set a broken sequencer URL for sv4 to test that validators can still successfully connect. + config + .focus(_.svApps) + .modify(_.updatedWith(InstanceName.tryCreate("sv4")) { + _.map( + _.focus(_.localSynchronizerNode).modify( + _.map(_.focus(_.sequencer.externalPublicApiUrl).replace("http://example.com")) + ) + ) + }) + }) "start and restart cleanly" in { implicit env => initDsoWithSv1Only() @@ -99,6 +112,7 @@ class ValidatorIntegrationTest extends IntegrationTest with WalletTestUtil { "validator apps connect to all DSO sequencers" in { implicit env => initDso() + // Start Alice’s validator aliceValidatorBackend.startSync() @@ -111,12 +125,11 @@ class ValidatorIntegrationTest extends IntegrationTest with WalletTestUtil { ) .value .sequencerConnections - sequencerConnections.connections.size shouldBe 4 sequencerConnections.sequencerTrustThreshold shouldBe PositiveInt.tryCreate(2) sequencerConnections.submissionRequestAmplification shouldBe SubmissionRequestAmplification( PositiveInt.tryCreate(2), - NonNegativeFiniteDuration.ofSeconds(10), + NonNegativeFiniteDuration.ofSeconds(5), ) } } diff --git a/apps/common/frontend/src/contexts/LedgerApiContext.tsx b/apps/common/frontend/src/contexts/LedgerApiContext.tsx index 11df4887..f46840b1 100644 --- a/apps/common/frontend/src/contexts/LedgerApiContext.tsx +++ b/apps/common/frontend/src/contexts/LedgerApiContext.tsx @@ -100,30 +100,30 @@ export class LedgerApiClient { ); const command = { ExerciseCommand: { - template_id: choice.template().templateId, - contract_id: contractId, + templateId: choice.template().templateId, + contractId: contractId, choice: choice.choiceName, - choice_argument: choice.argumentEncode(argument), + choiceArgument: choice.argumentEncode(argument), }, }; const body = { commands: [command], - workflow_id: '', - application_id: '', - command_id: uuidv4(), - deduplication_period: { Empty: {} }, - act_as: actAs, - read_as: readAs, - submission_id: '', - disclosed_contracts: disclosedContracts.map(c => ({ + workflowId: '', + applicationId: '', + commandId: uuidv4(), + deduplicationPeriod: { Empty: {} }, + actAs: actAs, + readAs: readAs, + submissionId: '', + disclosedContracts: disclosedContracts.map(c => ({ contractId: c.contractId, createdEventBlob: c.createdEventBlob, domainId: '', templateId: c.templateId, })), - domain_id: domainId || '', - package_id_selection_preference: [], + domainId: domainId || '', + packageIdSelectionPreference: [], }; const describeChoice = `Exercised choice: actAs=${JSON.stringify( @@ -150,10 +150,10 @@ export class LedgerApiClient { throw e; }); - const tree = responseBody.transaction_tree; - const rootEvent = tree.events_by_id[tree.root_event_ids[0]]; + const tree = responseBody.transactionTree; + const rootEvent = tree.eventsById[tree.rootEventIds[0]]; const exerciseResult = choice.resultDecoder.runWithException( - rootEvent.ExercisedTreeEvent.exercise_result + rootEvent.ExercisedTreeEvent.exerciseResult ); return exerciseResult; } diff --git a/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/MediatorAdminConnection.scala b/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/MediatorAdminConnection.scala index 71fef8e8..211fc26c 100644 --- a/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/MediatorAdminConnection.scala +++ b/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/MediatorAdminConnection.scala @@ -60,8 +60,7 @@ class MediatorAdminConnection( MediatorAdministrationCommands.Initialize( domainId, SequencerConnections.single(sequencerConnection), - // TODO(#10985) Consider enabling this. - SequencerConnectionValidation.Disabled, + SequencerConnectionValidation.StrictActive, ) ) diff --git a/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/ParticipantAdminConnection.scala b/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/ParticipantAdminConnection.scala index 21d16bc7..765cb917 100644 --- a/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/ParticipantAdminConnection.scala +++ b/apps/common/src/main/scala/org/lfdecentralizedtrust/splice/environment/ParticipantAdminConnection.scala @@ -171,8 +171,7 @@ class ParticipantAdminConnection( ParticipantAdminCommands.DomainConnectivity.RegisterDomain( config, handshakeOnly, - // TODO(#10985) Consider enabling this - SequencerConnectionValidation.Disabled, + SequencerConnectionValidation.StrictActive, ) ) @@ -365,8 +364,7 @@ class ParticipantAdminConnection( runCmd( ParticipantAdminCommands.DomainConnectivity.ModifyDomainConnection( config, - // TODO(#10985) Consider enabling this - SequencerConnectionValidation.Disabled, + SequencerConnectionValidation.StrictActive, ) ) diff --git a/apps/splitwell/frontend/src/App.tsx b/apps/splitwell/frontend/src/App.tsx index 55c129e6..f9c741c9 100644 --- a/apps/splitwell/frontend/src/App.tsx +++ b/apps/splitwell/frontend/src/App.tsx @@ -44,10 +44,16 @@ const Providers: React.FC = ({ children }) => { const refetchInterval = useConfigPollInterval(); interface JsonApiError { - status: number; + code?: string; + error?: string; errors?: string[]; + status: number; } + const checkErrorStrings = (keywords: string[], error: string | undefined) => { + return keywords.some(k => error?.includes(k)); + }; + const queryClient = new QueryClient({ defaultOptions: { queries: { @@ -59,8 +65,12 @@ const Providers: React.FC = ({ children }) => { // We only retry certain JSON API errors. Retrying everything is more confusing than helpful // because that then also retries on invalid user input. const errResponse = error as JsonApiError; + const keywords = ['NOT_CONNECTED_TO_ANY_DOMAIN', 'NOT_CONNECTED_TO_DOMAIN']; const isDomainConnectionError = - errResponse.errors?.some(e => e.includes('NOT_CONNECTED_TO_ANY_DOMAIN')) || false; + errResponse.errors?.some(e => checkErrorStrings(keywords, e)) || + checkErrorStrings(keywords, errResponse.error) || + checkErrorStrings(keywords, errResponse.code) || + false; const is404or409 = [404, 409].includes(errResponse.status); return (is404or409 || isDomainConnectionError) && failureCount < 10; diff --git a/apps/splitwell/frontend/src/__tests__/mocks/handlers/json-api.ts b/apps/splitwell/frontend/src/__tests__/mocks/handlers/json-api.ts index 0d22514d..43548912 100644 --- a/apps/splitwell/frontend/src/__tests__/mocks/handlers/json-api.ts +++ b/apps/splitwell/frontend/src/__tests__/mocks/handlers/json-api.ts @@ -26,77 +26,77 @@ export const buildJsonApiMock = (jsonApiUrl: string): RestHandler[] => [ ]; export const exerciseCreateInviteResponse = { - transaction_tree: { - update_id: '1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a', - command_id: '5fcfa413-ee7b-492e-9023-42827a9bf8ed', - workflow_id: '', - effective_at: '2025-01-14T11:13:49.525283Z', + transactionTree: { + updateId: '1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a', + commandId: '5fcfa413-ee7b-492e-9023-42827a9bf8ed', + workflowId: '', + effectiveAt: '2025-01-14T11:13:49.525283Z', offset: 15885, - events_by_id: { + eventsById: { '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:0': { ExercisedTreeEvent: { - event_id: '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:0', - contract_id: + eventId: '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:0', + contractId: '00f9d9790be8adcc7e9e75f4d4471e64689e4bc3617b64c08a65d28d5fc603d735ca1012205a365b6c64ec687ad0f4e175bc76a21a7754be4d0b86e3198b4093d1106a12e3', - template_id: + templateId: '841d1c9c86b5c8f3a39059459ecd8febedf7703e18f117300bb0ebf4423db096:Splice.Splitwell:SplitwellRules', - interface_id: null, + interfaceId: null, choice: 'SplitwellRules_CreateInvite', - choice_argument: { + choiceArgument: { group: '00b478d6ff2fa3fac22f899bc99f8541cd43c6dcab949de810f79879903bf6f332ca101220ca0bb6d9574a7af5dad52388b6f0a48f0eea15cb06c38a908c94b08e45c3bb7d', user: 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', }, - acting_parties: [ + actingParties: [ 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', ], consuming: false, - witness_parties: [ + witnessParties: [ 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', ], - child_event_ids: [ + childEventIds: [ '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:2', ], - exercise_result: + exerciseResult: '00afbc44a381f3a1d6b2ec5bb41a828accd50ecdab184bc4398df5444207f4496dca1012201d20d6e5c0bb9f2c6096faa4e187f1f4afbe4d60a21f602064aa871469464802', - package_name: 'splitwell', + packageName: 'splitwell', }, }, '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:2': { ExercisedTreeEvent: { - event_id: '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:2', - contract_id: + eventId: '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:2', + contractId: '00b478d6ff2fa3fac22f899bc99f8541cd43c6dcab949de810f79879903bf6f332ca101220ca0bb6d9574a7af5dad52388b6f0a48f0eea15cb06c38a908c94b08e45c3bb7d', - template_id: + templateId: '841d1c9c86b5c8f3a39059459ecd8febedf7703e18f117300bb0ebf4423db096:Splice.Splitwell:Group', - interface_id: null, + interfaceId: null, choice: 'Group_CreateInvite', - choice_argument: {}, - acting_parties: [ + choiceArgument: {}, + actingParties: [ 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', ], consuming: false, - witness_parties: [ + witnessParties: [ 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', ], - child_event_ids: [ + childEventIds: [ '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:3', ], - exercise_result: + exerciseResult: '00afbc44a381f3a1d6b2ec5bb41a828accd50ecdab184bc4398df5444207f4496dca1012201d20d6e5c0bb9f2c6096faa4e187f1f4afbe4d60a21f602064aa871469464802', - package_name: 'splitwell', + packageName: 'splitwell', }, }, '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:3': { CreatedTreeEvent: { value: { - event_id: '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:3', - contract_id: + eventId: '#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:3', + contractId: '00afbc44a381f3a1d6b2ec5bb41a828accd50ecdab184bc4398df5444207f4496dca1012201d20d6e5c0bb9f2c6096faa4e187f1f4afbe4d60a21f602064aa871469464802', - template_id: + templateId: '841d1c9c86b5c8f3a39059459ecd8febedf7703e18f117300bb0ebf4423db096:Splice.Splitwell:GroupInvite', - contract_key: null, - create_argument: { + contractKey: null, + createArgument: { group: { owner: 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', @@ -112,9 +112,9 @@ export const exerciseCreateInviteResponse = { }, }, }, - created_event_blob: '', - interface_views: [], - witness_parties: [ + createdEventBlob: '', + interfaceViews: [], + witnessParties: [ 'alice__wallet__user::12202486f977b9d49bbd77ba8a3624b4d13c211372977ce5726bb5e93fa094be7e09', ], signatories: [ @@ -122,18 +122,18 @@ export const exerciseCreateInviteResponse = { 'splitwell__provider::1220bfe1f427aef9162c4877cea884675584d0f01c8a77b8ce733713e8cc6c0a02c5', ], observers: [], - created_at: '2025-01-14T11:13:49.525283Z', - package_name: 'splitwell', + createdAt: '2025-01-14T11:13:49.525283Z', + packageName: 'splitwell', }, }, }, }, - root_event_ids: ['#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:0'], - domain_id: 'splitwell::1220dd6efb42b441d7a82bc0320a73f181e7da8f7f889703361fed95aa01820c124e', - trace_context: { + rootEventIds: ['#1220d958bc9e4063238be2ee103fa4251d10e049164be14a212bc4bd06223824633a:0'], + domainId: 'splitwell::1220dd6efb42b441d7a82bc0320a73f181e7da8f7f889703361fed95aa01820c124e', + traceContext: { traceparent: '00-31d873d33da296b8bb10123a98487752-636ddcf35e52d4ac-01', tracestate: null, }, - record_time: '2025-01-14T11:13:49.790867Z', + recordTime: '2025-01-14T11:13:49.790867Z', }, }; diff --git a/apps/validator/src/main/scala/org/lfdecentralizedtrust/splice/validator/config/ValidatorAppConfig.scala b/apps/validator/src/main/scala/org/lfdecentralizedtrust/splice/validator/config/ValidatorAppConfig.scala index b7746234..c4cf8766 100644 --- a/apps/validator/src/main/scala/org/lfdecentralizedtrust/splice/validator/config/ValidatorAppConfig.scala +++ b/apps/validator/src/main/scala/org/lfdecentralizedtrust/splice/validator/config/ValidatorAppConfig.scala @@ -176,7 +176,7 @@ case class ValidatorAppBackendConfig( ingestUpdateHistoryFromParticipantBegin: Boolean = true, enableWallet: Boolean = true, sequencerRequestAmplificationPatience: NonNegativeFiniteDuration = - NonNegativeFiniteDuration.ofSeconds(10), + NonNegativeFiniteDuration.ofSeconds(5), /** The configuration for sweeping funds periodically to other validator's wallet */ walletSweep: Map[String, WalletSweepConfig] = Map.empty, diff --git a/canton/community/admin-api/src/main/protobuf/com/digitalasset/canton/admin/domain/v30/sequencer_connection.proto b/canton/community/admin-api/src/main/protobuf/com/digitalasset/canton/admin/domain/v30/sequencer_connection.proto index 6357ccf8..00561f7c 100644 --- a/canton/community/admin-api/src/main/protobuf/com/digitalasset/canton/admin/domain/v30/sequencer_connection.proto +++ b/canton/community/admin-api/src/main/protobuf/com/digitalasset/canton/admin/domain/v30/sequencer_connection.proto @@ -32,7 +32,8 @@ enum SequencerConnectionValidation { ACTIVE = 2; // Validate all the connections ALL = 3; - + // Validate only the ones we could reach, but at least threshold many + STRICT_ACTIVE = 4; } message SequencerConnections { diff --git a/canton/community/base/src/main/scala/com/digitalasset/canton/sequencing/SequencerConnections.scala b/canton/community/base/src/main/scala/com/digitalasset/canton/sequencing/SequencerConnections.scala index c54e8a33..158f6392 100644 --- a/canton/community/base/src/main/scala/com/digitalasset/canton/sequencing/SequencerConnections.scala +++ b/canton/community/base/src/main/scala/com/digitalasset/canton/sequencing/SequencerConnections.scala @@ -232,6 +232,10 @@ object SequencerConnectionValidation { override val toProtoV30: v30.SequencerConnectionValidation = v30.SequencerConnectionValidation.ACTIVE } + object StrictActive extends SequencerConnectionValidation { + override val toProtoV30: v30.SequencerConnectionValidation = + v30.SequencerConnectionValidation.STRICT_ACTIVE + } def fromProtoV30( proto: v30.SequencerConnectionValidation @@ -240,6 +244,7 @@ object SequencerConnectionValidation { case v30.SequencerConnectionValidation.DISABLED => Right(Disabled) case v30.SequencerConnectionValidation.ALL => Right(All) case v30.SequencerConnectionValidation.ACTIVE => Right(Active) + case v30.SequencerConnectionValidation.STRICT_ACTIVE => Right(StrictActive) case _ => Left( ProtoDeserializationError.ValueConversionError( diff --git a/canton/community/common/src/main/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoader.scala b/canton/community/common/src/main/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoader.scala index 8bb29061..19c7987e 100644 --- a/canton/community/common/src/main/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoader.scala +++ b/canton/community/common/src/main/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoader.scala @@ -214,7 +214,8 @@ class SequencerInfoLoader( ): EitherT[FutureUnlessShutdown, Seq[LoadSequencerEndpointInformationResult.NotValid], Unit] = sequencerConnectionValidation match { case SequencerConnectionValidation.Disabled => EitherT.rightT(()) - case SequencerConnectionValidation.All | SequencerConnectionValidation.Active => + case SequencerConnectionValidation.All | SequencerConnectionValidation.Active | + SequencerConnectionValidation.StrictActive => EitherT( loadSequencerEndpoints( alias, @@ -225,6 +226,7 @@ class SequencerInfoLoader( SequencerInfoLoader.validateNewSequencerConnectionResults( expectedDomainId, sequencerConnectionValidation, + sequencerConnections.sequencerTrustThreshold, logger, )(_) ) @@ -448,6 +450,7 @@ object SequencerInfoLoader { def validateNewSequencerConnectionResults( expectedDomainId: Option[DomainId], sequencerConnectionValidation: SequencerConnectionValidation, + sequencerTrustThreshold: PositiveInt, logger: TracedLogger, )( results: Seq[LoadSequencerEndpointInformationResult] @@ -465,13 +468,15 @@ object SequencerInfoLoader { case Nil => accumulated case (notValid: LoadSequencerEndpointInformationResult.NotValid) :: rest => - if (sequencerConnectionValidation != SequencerConnectionValidation.All) { - logger.info( - s"Skipping validation, as I am unable to obtain domain-id and sequencer-id: ${notValid.error} for ${notValid.sequencerConnection}" - ) - go(reference, sequencerIds, rest, accumulated) - } else - go(reference, sequencerIds, rest, notValid +: accumulated) + sequencerConnectionValidation match { + case SequencerConnectionValidation.All | SequencerConnectionValidation.StrictActive => + go(reference, sequencerIds, rest, notValid +: accumulated) + case SequencerConnectionValidation.Active | SequencerConnectionValidation.Disabled => + logger.info( + s"Skipping validation, as I am unable to obtain domain-id and sequencer-id: ${notValid.error} for ${notValid.sequencerConnection}" + ) + go(reference, sequencerIds, rest, accumulated) + } case (valid: LoadSequencerEndpointInformationResult.Valid) :: rest => val result = for { // check that domain-id matches the reference @@ -548,7 +553,10 @@ object SequencerInfoLoader { } val collected = go(None, Map.empty, results.toList, Seq.empty) - Either.cond(collected.isEmpty, (), collected) + if (collected.isEmpty) Either.unit + else if (sequencerConnectionValidation == SequencerConnectionValidation.StrictActive) + Either.cond(results.size - collected.size >= sequencerTrustThreshold.unwrap, (), collected) + else Left(collected) } /** Aggregates the endpoint information into the actual connection @@ -573,9 +581,12 @@ object SequencerInfoLoader { require(fullResult.nonEmpty, "Non-empty list of sequencerId-to-endpoint pair is expected") - validateNewSequencerConnectionResults(expectedDomainId, sequencerConnectionValidation, logger)( - fullResult.toList - ) match { + validateNewSequencerConnectionResults( + expectedDomainId, + sequencerConnectionValidation, + sequencerTrustThreshold, + logger, + )(fullResult) match { case Right(()) => val validSequencerConnections = fullResult .collect { case valid: LoadSequencerEndpointInformationResult.Valid => diff --git a/canton/community/common/src/test/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoaderTest.scala b/canton/community/common/src/test/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoaderTest.scala index 2255dcc5..095d0b31 100644 --- a/canton/community/common/src/test/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoaderTest.scala +++ b/canton/community/common/src/test/scala/com/digitalasset/canton/common/domain/grpc/SequencerInfoLoaderTest.scala @@ -46,10 +46,12 @@ class SequencerInfoLoaderTest extends BaseTestWordSpec with HasExecutionContext ) private lazy val sequencerAlias1 = SequencerAlias.tryCreate("sequencer1") private lazy val sequencerAlias2 = SequencerAlias.tryCreate("sequencer2") + private lazy val sequencerAlias3 = SequencerAlias.tryCreate("sequencer3") private lazy val domainId1 = DomainId.tryFromString("first::namespace") private lazy val domainId2 = DomainId.tryFromString("second::namespace") private lazy val endpoint1 = Endpoint("localhost", Port.tryCreate(1001)) private lazy val endpoint2 = Endpoint("localhost", Port.tryCreate(1002)) + private lazy val endpoint3 = Endpoint("localhost", Port.tryCreate(1003)) private lazy val staticDomainParameters = BaseTest.defaultStaticDomainParametersWith() private lazy val domainAlias = DomainAlias.tryCreate("domain1") @@ -86,11 +88,13 @@ class SequencerInfoLoaderTest extends BaseTestWordSpec with HasExecutionContext args: List[ (SequencerAlias, Endpoint, Either[SequencerInfoLoaderError, DomainClientBootstrapInfo]) ], - activeOnly: Boolean = false, - ) = SequencerInfoLoader + validation: SequencerConnectionValidation = SequencerConnectionValidation.All, + threshold: PositiveInt = PositiveInt.one, + ): Either[Seq[LoadSequencerEndpointInformationResult.NotValid], Unit] = SequencerInfoLoader .validateNewSequencerConnectionResults( expectDomainId, - if (activeOnly) SequencerConnectionValidation.Active else SequencerConnectionValidation.All, + validation, + threshold, logger, )(mapArgs(args)) @@ -99,9 +103,10 @@ class SequencerInfoLoaderTest extends BaseTestWordSpec with HasExecutionContext args: List[ (SequencerAlias, Endpoint, Either[SequencerInfoLoaderError, DomainClientBootstrapInfo]) ], - activeOnly: Boolean = false, + validation: SequencerConnectionValidation = SequencerConnectionValidation.All, + threshold: PositiveInt = PositiveInt.one, )(check: String => Assertion): Assertion = { - val result = run(expectDomainId, args, activeOnly) + val result = run(expectDomainId, args, validation, threshold) result.left.value should have length (1) result.left.value.foreach(x => check(x.error.cause)) succeed @@ -163,9 +168,50 @@ class SequencerInfoLoaderTest extends BaseTestWordSpec with HasExecutionContext (sequencerAlias1, endpoint1, Right(DomainClientBootstrapInfo(domainId1, sequencer1))), (sequencerAlias2, endpoint2, Right(DomainClientBootstrapInfo(domainId1, sequencer2))), ), - activeOnly = false, ).value shouldBe (()) } + "tolerate errors if threshold can be reached" in { + forAll( + Seq(SequencerConnectionValidation.Active, SequencerConnectionValidation.StrictActive) + ) { validation => + run( + None, + List( + (sequencerAlias1, endpoint1, Right(DomainClientBootstrapInfo(domainId1, sequencer1))), + (sequencerAlias2, endpoint2, Left(SequencerInfoLoaderError.InvalidState("booh"))), + (sequencerAlias3, endpoint3, Right(DomainClientBootstrapInfo(domainId1, sequencer2))), + ), + validation, + threshold = PositiveInt.tryCreate(2), + ).value shouldBe (()) + } + } + "tolerate errors for Active if threshold can not be reached" in { + run( + None, + List( + (sequencerAlias1, endpoint1, Right(DomainClientBootstrapInfo(domainId1, sequencer1))), + (sequencerAlias2, endpoint2, Left(SequencerInfoLoaderError.InvalidState("booh2"))), + (sequencerAlias3, endpoint3, Left(SequencerInfoLoaderError.InvalidState("booh3"))), + ), + SequencerConnectionValidation.Active, + threshold = PositiveInt.tryCreate(2), + ).value shouldBe (()) + } + "complain about errors for StrictActive if threshold can not be reached" in { + val result = run( + None, + List( + (sequencerAlias1, endpoint1, Right(DomainClientBootstrapInfo(domainId1, sequencer1))), + (sequencerAlias2, endpoint2, Left(SequencerInfoLoaderError.InvalidState("booh2"))), + (sequencerAlias3, endpoint3, Left(SequencerInfoLoaderError.InvalidState("booh3"))), + ), + SequencerConnectionValidation.StrictActive, + threshold = PositiveInt.tryCreate(2), + ) + result.left.value should have length 2 + forAll(result.left.value)(_.error.cause should (include("booh2") or include("booh3"))) + } } "aggregation" should { diff --git a/cluster/compose/sv/compose.yaml b/cluster/compose/sv/compose.yaml index 1b07b4c6..67af6241 100644 --- a/cluster/compose/sv/compose.yaml +++ b/cluster/compose/sv/compose.yaml @@ -105,6 +105,7 @@ services: portNumber = ${SPLICE_SV_DB_PORT} user = ${SPLICE_SV_DB_USER} password = ${SPLICE_SV_DB_PASSWORD} + tcpKeepAlive = true } } } @@ -166,6 +167,7 @@ services: portNumber = ${SPLICE_SV_DB_PORT} user = ${SPLICE_SV_DB_USER} password = ${SPLICE_SV_DB_PASSWORD} + tcpKeepAlive = true } } } @@ -217,6 +219,7 @@ services: portNumber = ${SPLICE_SV_DB_PORT} user = ${SPLICE_SV_DB_USER} password = ${SPLICE_SV_DB_PASSWORD} + tcpKeepAlive = true } } } diff --git a/cluster/compose/validator/compose.yaml b/cluster/compose/validator/compose.yaml index fe1f1619..ab25b705 100644 --- a/cluster/compose/validator/compose.yaml +++ b/cluster/compose/validator/compose.yaml @@ -86,6 +86,7 @@ services: portNumber = ${SPLICE_DB_PORT} user = ${SPLICE_DB_USER} password = ${SPLICE_DB_PASSWORD} + tcpKeepAlive = true } } } diff --git a/cluster/helm/splice-cometbft/values-template.yaml b/cluster/helm/splice-cometbft/values-template.yaml index 435abc9a..6e31258b 100644 --- a/cluster/helm/splice-cometbft/values-template.yaml +++ b/cluster/helm/splice-cometbft/values-template.yaml @@ -33,9 +33,11 @@ node: rpcPort: 26657 # Identifier used to prefix created resources and as part of the optional Istio ingress identifier: + # DOCS_COMETBFT_PRUNING_START # Number of blocks to keep, used for pruning. 0 -> keep all blocks. # Number of blocks to keep for 30 days with an upper bound of 7k blocks/h. retainBlocks: 5040000 + # DOCS_COMETBFT_PRUNING_END # Interval in which a new snapshot should be generated, in order to assist new peers to sync quickly. # A value below 1000 is not recommended. snapshotHeightDelta: 1000 @@ -92,4 +94,3 @@ metrics: enableAntiAffinity: true logLevel: debug - diff --git a/cluster/helm/splice-scan/templates/scan.yaml b/cluster/helm/splice-scan/templates/scan.yaml index b38b86ea..b171e96b 100644 --- a/cluster/helm/splice-scan/templates/scan.yaml +++ b/cluster/helm/splice-scan/templates/scan.yaml @@ -36,9 +36,7 @@ spec: - name: ADDITIONAL_CONFIG_PERSISTENCE value: | canton.scan-apps.scan-app.storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { databaseName = "{{ .databaseName }}" currentSchema = "{{ .schema }}" diff --git a/cluster/helm/splice-splitwell-app/templates/splitwell.yaml b/cluster/helm/splice-splitwell-app/templates/splitwell.yaml index e88b7733..386300b5 100644 --- a/cluster/helm/splice-splitwell-app/templates/splitwell.yaml +++ b/cluster/helm/splice-splitwell-app/templates/splitwell.yaml @@ -41,9 +41,7 @@ spec: - name: ADDITIONAL_CONFIG_PERSISTENCE value: | canton.splitwell-apps.splitwell_backend.storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { databaseName = "{{ .databaseName }}" currentSchema = "{{ .schema }}" diff --git a/cluster/helm/splice-sv-node/templates/sv.yaml b/cluster/helm/splice-sv-node/templates/sv.yaml index 80aa65dd..840a33c4 100644 --- a/cluster/helm/splice-sv-node/templates/sv.yaml +++ b/cluster/helm/splice-sv-node/templates/sv.yaml @@ -108,9 +108,7 @@ spec: - name: ADDITIONAL_CONFIG_PERSISTENCE value: | canton.sv-apps.sv.storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { databaseName = "{{ .databaseName }}" currentSchema = "{{ .schema }}" diff --git a/cluster/helm/splice-validator/templates/validator.yaml b/cluster/helm/splice-validator/templates/validator.yaml index 460bcc6b..38ca52fd 100644 --- a/cluster/helm/splice-validator/templates/validator.yaml +++ b/cluster/helm/splice-validator/templates/validator.yaml @@ -131,9 +131,7 @@ spec: - name: ADDITIONAL_CONFIG_PERSISTENCE value: | canton.validator-apps.validator_backend.storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { databaseName = "{{ .databaseName }}" currentSchema = "{{ .schema }}" diff --git a/cluster/images/canton-cometbft-sequencer/app.conf b/cluster/images/canton-cometbft-sequencer/app.conf index bd10007d..2e1a558d 100644 --- a/cluster/images/canton-cometbft-sequencer/app.conf +++ b/cluster/images/canton-cometbft-sequencer/app.conf @@ -1,22 +1,4 @@ -_storage { - type = postgres - config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" - properties = { - serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} - portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} - databaseName = "cantonnet" - currentSchema = "sequencer" - user = "cnadmin" - password = "cnadmin" - user = ${?CANTON_DOMAIN_POSTGRES_USER} - password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} - } - } - parameters { - migrate-and-start = yes - } -} +include required(file("/app/storage.conf")) canton { # required for key export @@ -33,8 +15,19 @@ canton { sequencer { init.auto-init=false storage = ${_storage} - storage.config.properties.currentSchema = "sequencer" - storage.config.properties.databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + storage = { + config { + properties = { + serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + databaseName = "cantonnet" + databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + currentSchema = "sequencer" + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} + } + } + } monitoring.grpc-health-server { address = "0.0.0.0" diff --git a/cluster/images/canton-domain/app.conf b/cluster/images/canton-domain/app.conf index 92ce2fd9..5a4a3a50 100644 --- a/cluster/images/canton-domain/app.conf +++ b/cluster/images/canton-domain/app.conf @@ -1,19 +1,4 @@ -_storage { - type = postgres - config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" - properties = { - serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} - portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} - databaseName = "cantonnet" - currentSchema = "sequencer" - user = "cnadmin" - password = "cnadmin" - user = ${?CANTON_DOMAIN_POSTGRES_USER} - password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} - } - } -} +include required(file("/app/storage.conf")) canton { # required for key export @@ -34,8 +19,16 @@ canton { init.auto-init=false storage = ${_storage} - storage.config.properties.currentSchema = "sequencer" - storage.config.properties.databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + storage.config.properties { + serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + currentSchema = "sequencer" + user = "cnadmin" + password = "cnadmin" + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} + } public-api { address = "0.0.0.0" @@ -55,8 +48,14 @@ canton { sequencer { config { storage = ${_storage} - storage.config.properties.currentSchema = "sequencer_driver" - storage.config.properties.databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + storage.config.properties { + serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + currentSchema = "sequencer_driver" + databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} + } } type = reference } @@ -68,8 +67,14 @@ canton { init.auto-init=false storage = ${_storage} - storage.config.properties.currentSchema = "mediator" - storage.config.properties.databaseName = ${?CANTON_MEDIATOR_POSTGRES_DB} + storage.config.properties { + serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + currentSchema = "mediator" + databaseName = ${?CANTON_MEDIATOR_POSTGRES_DB} + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} + } admin-api { address = "0.0.0.0" diff --git a/cluster/images/canton-mediator/app.conf b/cluster/images/canton-mediator/app.conf index b7c69113..020b25fe 100644 --- a/cluster/images/canton-mediator/app.conf +++ b/cluster/images/canton-mediator/app.conf @@ -1,22 +1,4 @@ -_storage { - type = postgres - config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" - properties = { - serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} - portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} - databaseName = "cantonnet" - currentSchema = "sequencer" - user = "cnadmin" - password = "cnadmin" - user = ${?CANTON_DOMAIN_POSTGRES_USER} - password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} - } - } - parameters { - migrate-and-start = yes - } -} +include required(file("/app/storage.conf")) canton { # required for key export @@ -34,8 +16,14 @@ canton { init.auto-init=false storage = ${_storage} - storage.config.properties.currentSchema = "mediator" - storage.config.properties.databaseName = ${?CANTON_MEDIATOR_POSTGRES_DB} + storage.config.properties { + serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + databaseName = ${?CANTON_MEDIATOR_POSTGRES_DB} + currentSchema = "mediator" + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} + } monitoring.grpc-health-server { address = "0.0.0.0" diff --git a/cluster/images/canton-participant/app.conf b/cluster/images/canton-participant/app.conf index 5bc25b3b..25ab8b91 100644 --- a/cluster/images/canton-participant/app.conf +++ b/cluster/images/canton-participant/app.conf @@ -1,3 +1,5 @@ +include required(file("/app/storage.conf")) + canton { features { enable-preview-commands = yes @@ -24,26 +26,20 @@ canton { address = "0.0.0.0" port = 5061 } - + storage = ${_storage} storage { - type = postgres config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" properties = { serverName = ${CANTON_PARTICIPANT_POSTGRES_SERVER} portNumber = ${CANTON_PARTICIPANT_POSTGRES_PORT} - databaseName = "cantonnet" databaseName = ${?CANTON_PARTICIPANT_POSTGRES_DB} currentSchema = ${CANTON_PARTICIPANT_POSTGRES_SCHEMA} - user = "cnadmin" - password = "cnadmin" user = ${?CANTON_PARTICIPANT_POSTGRES_USER} password = ${?CANTON_PARTICIPANT_POSTGRES_PASSWORD} } } parameters { max-connections = 32 - migrate-and-start = yes } } diff --git a/cluster/images/canton-sequencer/app.conf b/cluster/images/canton-sequencer/app.conf index 84552721..28b01287 100644 --- a/cluster/images/canton-sequencer/app.conf +++ b/cluster/images/canton-sequencer/app.conf @@ -1,22 +1,4 @@ -_storage { - type = postgres - config { - dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" - properties = { - serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} - portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} - databaseName = "cantonnet" - currentSchema = "sequencer" - user = "cnadmin" - password = "cnadmin" - user = ${?CANTON_DOMAIN_POSTGRES_USER} - password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} - } - } - parameters { - migrate-and-start = yes - } -} +include required(file("/app/storage.conf")) canton { # required for key export @@ -33,8 +15,14 @@ canton { sequencer { init.auto-init=false storage = ${_storage} - storage.config.properties.currentSchema = "sequencer" - storage.config.properties.databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + storage.config.properties { + serverName = ${CANTON_DOMAIN_POSTGRES_SERVER} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + currentSchema = "sequencer" + databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?CANTON_DOMAIN_POSTGRES_PASSWORD} + } monitoring.grpc-health-server { address = "0.0.0.0" @@ -54,10 +42,15 @@ canton { sequencer { config { storage = ${_storage} - storage.config.properties.serverName = ${?SEQUENCER_DRIVER_DATABASE_ADDRESS} - storage.config.properties.password = ${?SEQUENCER_DRIVER_DATABASE_PASSWORD} - storage.config.properties.currentSchema = "sequencer_driver" - storage.config.properties.databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + storage.config.properties { + serverName = ${?CANTON_DOMAIN_POSTGRES_SERVER} + serverName = ${?SEQUENCER_DRIVER_DATABASE_ADDRESS} + portNumber = ${CANTON_DOMAIN_POSTGRES_PORT} + currentSchema = "sequencer_driver" + databaseName = ${?CANTON_SEQUENCER_POSTGRES_DB} + user = ${?CANTON_DOMAIN_POSTGRES_USER} + password = ${?SEQUENCER_DRIVER_DATABASE_PASSWORD} + } } type = reference } diff --git a/cluster/images/canton/Dockerfile b/cluster/images/canton/Dockerfile index b709f536..a742783c 100644 --- a/cluster/images/canton/Dockerfile +++ b/cluster/images/canton/Dockerfile @@ -25,7 +25,7 @@ WORKDIR /app # move tarball to a static name ADD target/canton.tar . -COPY target/monitoring.conf target/parameters.conf target/entrypoint.sh target/bootstrap-entrypoint.sc target/tools.sh target/logback.xml /app/ +COPY target/monitoring.conf target/parameters.conf target/storage.conf target/entrypoint.sh target/bootstrap-entrypoint.sc target/tools.sh target/logback.xml /app/ # Overwrite the LICENSE.txt file from canton image with the one from Splice COPY target/LICENSE.txt . diff --git a/cluster/images/common/entrypoint-image.mk b/cluster/images/common/entrypoint-image.mk index 95cd6302..9b4ff424 100644 --- a/cluster/images/common/entrypoint-image.mk +++ b/cluster/images/common/entrypoint-image.mk @@ -8,6 +8,7 @@ $(dir)/$(docker-build): \ $(dir)/target/bootstrap-entrypoint.sc \ $(dir)/target/tools.sh \ $(dir)/target/monitoring.conf \ + $(dir)/target/storage.conf \ $(dir)/target/parameters.conf $(dir)/target: @@ -19,6 +20,9 @@ $(dir)/target/entrypoint.sh: $(dir)/../common/entrypoint.sh | $(dir)/target $(dir)/target/monitoring.conf: $(dir)/../common/monitoring.conf | $(dir)/target cp $< $@ +$(dir)/target/storage.conf: $(dir)/../common/storage.conf | $(dir)/target + cp $< $@ + $(dir)/target/parameters.conf: $(dir)/../common/parameters.conf | $(dir)/target cp $< $@ diff --git a/cluster/images/common/storage.conf b/cluster/images/common/storage.conf new file mode 100644 index 00000000..ff5a7b3b --- /dev/null +++ b/cluster/images/common/storage.conf @@ -0,0 +1,17 @@ +_storage { + type = postgres + config { + dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" + properties = { + serverName = "localhost" + portNumber = 5432 + databaseName = "cantonnet" + user = "cnadmin" + password = "cnadmin" + tcpKeepAlive = true + } + } + parameters { + migrate-and-start = true + } +} diff --git a/cluster/images/local.mk b/cluster/images/local.mk index a98851e5..de4cea2c 100644 --- a/cluster/images/local.mk +++ b/cluster/images/local.mk @@ -35,7 +35,7 @@ images := \ splice-test-ci \ splice-test-docker-runner \ splice-test-cometbft \ - splice-test-temp-runner-hook \ + splice-test-runner-hook \ canton-image := cluster/images/canton splice-image := cluster/images/splice-app diff --git a/cluster/images/multi-participant/pre-bootstrap.sh b/cluster/images/multi-participant/pre-bootstrap.sh index 68950823..341418eb 100644 --- a/cluster/images/multi-participant/pre-bootstrap.sh +++ b/cluster/images/multi-participant/pre-bootstrap.sh @@ -40,6 +40,7 @@ canton.participants.participant_$index = { password = "cnadmin" user = \${?CANTON_PARTICIPANT_POSTGRES_USER} password = \${?CANTON_PARTICIPANT_POSTGRES_PASSWORD} + tcpKeepAlive = true } } parameters { diff --git a/cluster/images/multi-validator/pre-bootstrap.sh b/cluster/images/multi-validator/pre-bootstrap.sh index ab79d834..d029e2df 100644 --- a/cluster/images/multi-validator/pre-bootstrap.sh +++ b/cluster/images/multi-validator/pre-bootstrap.sh @@ -79,6 +79,7 @@ canton.validator-apps.validator_backend_$index = { portNumber = \${SPLICE_APP_POSTGRES_PORT} user = \${SPLICE_APP_POSTGRES_USER} password = \${SPLICE_APP_POSTGRES_PASSWORD} + tcpKeepAlive = true } } } diff --git a/cluster/images/scan-app/app.conf b/cluster/images/scan-app/app.conf index 37f95dd7..e5d6080c 100644 --- a/cluster/images/scan-app/app.conf +++ b/cluster/images/scan-app/app.conf @@ -1,3 +1,5 @@ +include required(file("/app/storage.conf")) + _client_credentials_auth_config { type = "client-credentials" well-known-config-url = ${?SPLICE_APP_SCAN_LEDGER_API_AUTH_URL} @@ -28,7 +30,7 @@ _scan_sequencer_admin_client { canton { scan-apps { scan-app { - storage.type = postgres + storage = ${_storage} admin-api = { address = "0.0.0.0" port = 5012 diff --git a/cluster/images/splice-app/Dockerfile b/cluster/images/splice-app/Dockerfile index aef4b2ee..1f992bb5 100644 --- a/cluster/images/splice-app/Dockerfile +++ b/cluster/images/splice-app/Dockerfile @@ -29,7 +29,7 @@ WORKDIR /app # move tarball to a static name ADD target/splice-node.tar.gz . -COPY target/monitoring.conf target/parameters.conf target/entrypoint.sh target/bootstrap-entrypoint.sc target/tools.sh target/logback.xml target/LICENSE /app/ +COPY target/storage.conf target/monitoring.conf target/parameters.conf target/entrypoint.sh target/bootstrap-entrypoint.sc target/tools.sh target/logback.xml target/LICENSE /app/ RUN mkdir -p /app/splice-node/docs/html/cn-release-bundles RUN ln -s splice-node/bin/splice-node splice-image-bin diff --git a/cluster/images/splice-test-ci/Dockerfile b/cluster/images/splice-test-ci/Dockerfile index afbeba4a..2010ef54 100644 --- a/cluster/images/splice-test-ci/Dockerfile +++ b/cluster/images/splice-test-ci/Dockerfile @@ -16,7 +16,9 @@ RUN groupadd --gid=1002 ci && \ sudo -u ci mkdir -p /github/home/.local/bin && \ sudo chown -R ci:ci /github/home -RUN sudo pip3 install GitPython gql humanize marshmallow-dataclass requests requests_toolbelt prometheus_client --break-system-packages +RUN sudo pip3 install \ + GitPython gql humanize marshmallow-dataclass requests requests_toolbelt prometheus_client flask waitress json-logging \ + --break-system-packages RUN sudo ln -s /usr/bin/python3 /usr/bin/python @@ -28,5 +30,6 @@ RUN whoami && \ ENV COURSIER_CACHE=/cache/coursier COPY target/LICENSE . +COPY target/gha-runner-rpc.py . WORKDIR /github/home/project diff --git a/cluster/images/splice-test-ci/local.mk b/cluster/images/splice-test-ci/local.mk index 52006328..0416402c 100644 --- a/cluster/images/splice-test-ci/local.mk +++ b/cluster/images/splice-test-ci/local.mk @@ -3,7 +3,13 @@ dir := $(call current_dir) -$(dir)/$(docker-build): $(dir)/target/LICENSE +rpc-script := $(dir)/target/gha-runner-rpc.py +rpc-source := ${REPO_ROOT}/.github/runners/runner-container-hooks/packages/k8s-workflow/gha-runner-rpc.py + +$(dir)/$(docker-build): $(dir)/target/LICENSE $(rpc-script) $(dir)/target/LICENSE: LICENSE cp $< $@ + +$(rpc-script): $(rpc-source) + cp $< $@ diff --git a/cluster/images/splice-test-temp-runner-hook/Dockerfile b/cluster/images/splice-test-runner-hook/Dockerfile similarity index 58% rename from cluster/images/splice-test-temp-runner-hook/Dockerfile rename to cluster/images/splice-test-runner-hook/Dockerfile index de3c5dc8..56179843 100644 --- a/cluster/images/splice-test-temp-runner-hook/Dockerfile +++ b/cluster/images/splice-test-runner-hook/Dockerfile @@ -1,4 +1,4 @@ FROM ghcr.io/actions/actions-runner:latest -COPY index.js /home/runner/k8s/index.js +COPY target/index.js /home/runner/k8s/index.js COPY target/LICENSE . diff --git a/cluster/images/splice-test-runner-hook/local.mk b/cluster/images/splice-test-runner-hook/local.mk new file mode 100644 index 00000000..2cba7a4a --- /dev/null +++ b/cluster/images/splice-test-runner-hook/local.mk @@ -0,0 +1,25 @@ +# Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +dir := $(call current_dir) +src_dir := ${REPO_ROOT}/.github/runners/runner-container-hooks +package_files := $(src_dir)/package.json $(src_dir)/packages/k8s/package.json $(src_dir)/packages/hooklib/package.json +source_files := $(shell find $(src_dir)/packages/k8s/src -name '*.ts') $(shell find $(src_dir)/packages/hooklib/src -name '*.ts') +target-dir := $(dir)/target + +$(dir)/$(docker-build): $(target-dir) $(dir)/target/LICENSE $(dir)/target/.npm_installed $(dir)/target/index.js + +$(target-dir): + mkdir -p $(target-dir) + +$(dir)/target/LICENSE: LICENSE + cp $< $@ + +$(dir)/target/.npm_installed: $(package_files) + touch $@ + npm install --prefix $(src_dir) + npm run bootstrap --prefix $(src_dir) + +$(dir)/target/index.js: $(source_files) $(dir)/target/.npm_installed + npm run build-all --prefix $(src_dir) + cp $(src_dir)/packages/k8s/dist/index.js $@ diff --git a/cluster/images/splice-test-temp-runner-hook/README.md b/cluster/images/splice-test-temp-runner-hook/README.md deleted file mode 100644 index 2ba10824..00000000 --- a/cluster/images/splice-test-temp-runner-hook/README.md +++ /dev/null @@ -1,10 +0,0 @@ -This image extends `ghcr.io/actions/actions-runner:latest` with a locally-built -version of the code, currently based on https://github.com/isegall-da/runner-container-hooks/tree/isegall/multi-service-containers. - -We have upstreamed that change: https://github.com/actions/runner-container-hooks/pull/200, so if accepted, and a new release of actions-runner is made, we will remove this -and switch back to the upstream image. - -Since we hope this is a temporary state, we did not invest in properly adding build -support for producing index.js. To update it: -- In the `runner-container-hooks` repo, run: `npm run build-all` -- Copy `packages/k8s/dist/index.js` from the `runner-container-hooks` repo to this directory diff --git a/cluster/images/splice-test-temp-runner-hook/index.js b/cluster/images/splice-test-temp-runner-hook/index.js deleted file mode 100644 index e9690017..00000000 --- a/cluster/images/splice-test-temp-runner-hook/index.js +++ /dev/null @@ -1,180157 +0,0 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 97615: -/***/ (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 __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(50088), exports); -__exportStar(__nccwpck_require__(35166), exports); - - -/***/ }), - -/***/ 50088: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Protocol = exports.Command = void 0; -var Command; -(function (Command) { - Command["PrepareJob"] = "prepare_job"; - Command["CleanupJob"] = "cleanup_job"; - Command["RunContainerStep"] = "run_container_step"; - Command["RunScriptStep"] = "run_script_step"; -})(Command = exports.Command || (exports.Command = {})); -var Protocol; -(function (Protocol) { - Protocol["TCP"] = "tcp"; - Protocol["UDP"] = "udp"; -})(Protocol = exports.Protocol || (exports.Protocol = {})); - - -/***/ }), - -/***/ 35166: -/***/ (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.writeToResponseFile = exports.getInputFromStdin = void 0; -var events = __importStar(__nccwpck_require__(82361)); -var fs = __importStar(__nccwpck_require__(57147)); -var os = __importStar(__nccwpck_require__(22037)); -var readline = __importStar(__nccwpck_require__(14521)); -function getInputFromStdin() { - return __awaiter(this, void 0, void 0, function () { - var input, rl, inputJson; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - input = ''; - rl = readline.createInterface({ - input: process.stdin - }); - rl.on('line', function (line) { - input = line; - }); - return [4 /*yield*/, events.default.once(rl, 'close')]; - case 1: - _a.sent(); - inputJson = JSON.parse(input); - return [2 /*return*/, inputJson]; - } - }); - }); -} -exports.getInputFromStdin = getInputFromStdin; -function writeToResponseFile(filePath, message) { - if (!filePath) { - throw new Error("Expected file path"); - } - if (!fs.existsSync(filePath)) { - throw new Error("Missing file at path: ".concat(filePath)); - } - fs.appendFileSync(filePath, "".concat(toCommandValue(message)).concat(os.EOL), { - encoding: 'utf8' - }); -} -exports.writeToResponseFile = writeToResponseFile; -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} - - -/***/ }), - -/***/ 50876: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.cleanupJob = void 0; -var k8s_1 = __nccwpck_require__(76949); -function cleanupJob() { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, Promise.all([(0, k8s_1.prunePods)(), (0, k8s_1.pruneSecrets)()])]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.cleanupJob = cleanupJob; - - -/***/ }), - -/***/ 94865: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunnerInstanceLabel = exports.JOB_CONTAINER_EXTENSION_NAME = exports.JOB_CONTAINER_NAME = exports.CONTAINER_EXTENSION_PREFIX = exports.STEP_POD_NAME_SUFFIX_LENGTH = exports.MAX_POD_NAME_LENGTH = exports.getSecretName = exports.getVolumeClaimName = exports.getStepPodName = exports.getJobPodName = exports.getRunnerPodName = void 0; -var uuid_1 = __nccwpck_require__(2155); -function getRunnerPodName() { - var name = process.env.ACTIONS_RUNNER_POD_NAME; - if (!name) { - throw new Error("'ACTIONS_RUNNER_POD_NAME' env is required, please contact your self hosted runner administrator"); - } - return name; -} -exports.getRunnerPodName = getRunnerPodName; -function getJobPodName() { - return "".concat(getRunnerPodName().substring(0, exports.MAX_POD_NAME_LENGTH - '-workflow'.length), "-workflow"); -} -exports.getJobPodName = getJobPodName; -function getStepPodName() { - return "".concat(getRunnerPodName().substring(0, exports.MAX_POD_NAME_LENGTH - ('-step-'.length + exports.STEP_POD_NAME_SUFFIX_LENGTH)), "-step-").concat((0, uuid_1.v4)().substring(0, exports.STEP_POD_NAME_SUFFIX_LENGTH)); -} -exports.getStepPodName = getStepPodName; -function getVolumeClaimName() { - var name = process.env.ACTIONS_RUNNER_CLAIM_NAME; - if (!name) { - return "".concat(getRunnerPodName(), "-work"); - } - return name; -} -exports.getVolumeClaimName = getVolumeClaimName; -function getSecretName() { - return "".concat(getRunnerPodName().substring(0, exports.MAX_POD_NAME_LENGTH - ('-secret-'.length + exports.STEP_POD_NAME_SUFFIX_LENGTH)), "-secret-").concat((0, uuid_1.v4)().substring(0, exports.STEP_POD_NAME_SUFFIX_LENGTH)); -} -exports.getSecretName = getSecretName; -exports.MAX_POD_NAME_LENGTH = 63; -exports.STEP_POD_NAME_SUFFIX_LENGTH = 8; -exports.CONTAINER_EXTENSION_PREFIX = '$'; -exports.JOB_CONTAINER_NAME = 'job'; -exports.JOB_CONTAINER_EXTENSION_NAME = '$job'; -var RunnerInstanceLabel = /** @class */ (function () { - function RunnerInstanceLabel() { - this.podName = getRunnerPodName(); - } - Object.defineProperty(RunnerInstanceLabel.prototype, "key", { - get: function () { - return 'runner-pod'; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(RunnerInstanceLabel.prototype, "value", { - get: function () { - return this.podName; - }, - enumerable: false, - configurable: true - }); - RunnerInstanceLabel.prototype.toString = function () { - return "runner-pod=".concat(this.podName); - }; - return RunnerInstanceLabel; -}()); -exports.RunnerInstanceLabel = RunnerInstanceLabel; - - -/***/ }), - -/***/ 84402: -/***/ (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 __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(50876), exports); -__exportStar(__nccwpck_require__(4494), exports); -__exportStar(__nccwpck_require__(14800), exports); -__exportStar(__nccwpck_require__(40617), exports); - - -/***/ }), - -/***/ 4494: -/***/ (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createContainerSpec = exports.prepareJob = void 0; -var core = __importStar(__nccwpck_require__(42186)); -var io = __importStar(__nccwpck_require__(47351)); -var hooklib_1 = __nccwpck_require__(97615); -var path_1 = __importDefault(__nccwpck_require__(71017)); -var k8s_1 = __nccwpck_require__(76949); -var utils_1 = __nccwpck_require__(66924); -var constants_1 = __nccwpck_require__(94865); -function prepareJob(args, responseFile) { - var _a, _b, _c, _d, _e, _f, _g, _h; - return __awaiter(this, void 0, void 0, function () { - var extension, container, services, createdPod, err_1, message, err_2, isAlpine, err_3, message; - return __generator(this, function (_j) { - switch (_j.label) { - case 0: - if (!args.container) { - throw new Error('Job Container is required.'); - } - return [4 /*yield*/, (0, k8s_1.prunePods)()]; - case 1: - _j.sent(); - extension = (0, utils_1.readExtensionFromFile)(); - return [4 /*yield*/, copyExternalsToRoot()]; - case 2: - _j.sent(); - container = undefined; - if ((_a = args.container) === null || _a === void 0 ? void 0 : _a.image) { - core.debug("Using image '".concat(args.container.image, "' for job image")); - container = createContainerSpec(args.container, constants_1.JOB_CONTAINER_NAME, true, extension); - } - services = []; - if ((_b = args.services) === null || _b === void 0 ? void 0 : _b.length) { - services = args.services.map(function (service) { - core.debug("Adding service '".concat(service.image, "' to pod definition")); - return createContainerSpec(service, (0, utils_1.generateContainerName)(service), false, extension); - }); - } - if (!container && !(services === null || services === void 0 ? void 0 : services.length)) { - throw new Error('No containers exist, skipping hook invocation'); - } - createdPod = undefined; - _j.label = 3; - case 3: - _j.trys.push([3, 5, , 7]); - return [4 /*yield*/, (0, k8s_1.createPod)(container, services, args.container.registry, extension)]; - case 4: - createdPod = _j.sent(); - return [3 /*break*/, 7]; - case 5: - err_1 = _j.sent(); - return [4 /*yield*/, (0, k8s_1.prunePods)()]; - case 6: - _j.sent(); - core.debug("createPod failed: ".concat(JSON.stringify(err_1))); - message = ((_d = (_c = err_1 === null || err_1 === void 0 ? void 0 : err_1.response) === null || _c === void 0 ? void 0 : _c.body) === null || _d === void 0 ? void 0 : _d.message) || err_1; - throw new Error("failed to create job pod: ".concat(message)); - case 7: - if (!((_e = createdPod === null || createdPod === void 0 ? void 0 : createdPod.metadata) === null || _e === void 0 ? void 0 : _e.name)) { - throw new Error('created pod should have metadata.name'); - } - core.debug("Job pod created, waiting for it to come online ".concat((_f = createdPod === null || createdPod === void 0 ? void 0 : createdPod.metadata) === null || _f === void 0 ? void 0 : _f.name)); - _j.label = 8; - case 8: - _j.trys.push([8, 10, , 12]); - return [4 /*yield*/, (0, k8s_1.waitForPodPhases)(createdPod.metadata.name, new Set([utils_1.PodPhase.RUNNING]), new Set([utils_1.PodPhase.PENDING]), (0, k8s_1.getPrepareJobTimeoutSeconds)())]; - case 9: - _j.sent(); - return [3 /*break*/, 12]; - case 10: - err_2 = _j.sent(); - return [4 /*yield*/, (0, k8s_1.prunePods)()]; - case 11: - _j.sent(); - throw new Error("pod failed to come online with error: ".concat(err_2)); - case 12: - core.debug('Job pod is ready for traffic'); - isAlpine = false; - _j.label = 13; - case 13: - _j.trys.push([13, 15, , 16]); - return [4 /*yield*/, (0, k8s_1.isPodContainerAlpine)(createdPod.metadata.name, constants_1.JOB_CONTAINER_NAME)]; - case 14: - isAlpine = _j.sent(); - return [3 /*break*/, 16]; - case 15: - err_3 = _j.sent(); - core.debug("Failed to determine if the pod is alpine: ".concat(JSON.stringify(err_3))); - message = ((_h = (_g = err_3 === null || err_3 === void 0 ? void 0 : err_3.response) === null || _g === void 0 ? void 0 : _g.body) === null || _h === void 0 ? void 0 : _h.message) || err_3; - throw new Error("failed to determine if the pod is alpine: ".concat(message)); - case 16: - core.debug("Setting isAlpine to ".concat(isAlpine)); - generateResponseFile(responseFile, args, createdPod, isAlpine); - return [2 /*return*/]; - } - }); - }); -} -exports.prepareJob = prepareJob; -function generateResponseFile(responseFile, args, appPod, isAlpine) { - var _a, _b, _c, _d, _e, _f, _g; - if (!((_a = appPod.metadata) === null || _a === void 0 ? void 0 : _a.name)) { - throw new Error('app pod must have metadata.name specified'); - } - var response = { - state: { - jobPod: appPod.metadata.name - }, - context: {}, - isAlpine: isAlpine - }; - var mainContainer = (_c = (_b = appPod.spec) === null || _b === void 0 ? void 0 : _b.containers) === null || _c === void 0 ? void 0 : _c.find(function (c) { return c.name === constants_1.JOB_CONTAINER_NAME; }); - if (mainContainer) { - var mainContainerContextPorts = {}; - if (mainContainer === null || mainContainer === void 0 ? void 0 : mainContainer.ports) { - for (var _i = 0, _h = mainContainer.ports; _i < _h.length; _i++) { - var port = _h[_i]; - mainContainerContextPorts[port.containerPort] = - mainContainerContextPorts.hostPort; - } - } - response.context['container'] = { - image: mainContainer.image, - ports: mainContainerContextPorts - }; - } - if ((_d = args.services) === null || _d === void 0 ? void 0 : _d.length) { - var serviceContainerNames_1 = ((_e = args.services) === null || _e === void 0 ? void 0 : _e.map(function (s) { return (0, utils_1.generateContainerName)(s); })) || []; - response.context['services'] = (_g = (_f = appPod === null || appPod === void 0 ? void 0 : appPod.spec) === null || _f === void 0 ? void 0 : _f.containers) === null || _g === void 0 ? void 0 : _g.filter(function (c) { return serviceContainerNames_1.includes(c.name); }).map(function (c) { - var _a; - var ctxPorts = {}; - if ((_a = c.ports) === null || _a === void 0 ? void 0 : _a.length) { - for (var _i = 0, _b = c.ports; _i < _b.length; _i++) { - var port = _b[_i]; - ctxPorts[port.containerPort] = port.hostPort; - } - } - return { - image: c.image, - ports: ctxPorts - }; - }); - } - (0, hooklib_1.writeToResponseFile)(responseFile, JSON.stringify(response)); -} -function copyExternalsToRoot() { - return __awaiter(this, void 0, void 0, function () { - var workspace; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - workspace = process.env['RUNNER_WORKSPACE']; - if (!workspace) return [3 /*break*/, 2]; - return [4 /*yield*/, io.cp(path_1.default.join(workspace, '../../externals'), path_1.default.join(workspace, '../externals'), { force: true, recursive: true, copySourceDirectory: false })]; - case 1: - _a.sent(); - _a.label = 2; - case 2: return [2 /*return*/]; - } - }); - }); -} -function createContainerSpec(container, name, jobContainer, extension) { - var _a, _b, _c; - if (jobContainer === void 0) { jobContainer = false; } - if (!container.entryPoint && jobContainer) { - container.entryPoint = utils_1.DEFAULT_CONTAINER_ENTRY_POINT; - container.entryPointArgs = utils_1.DEFAULT_CONTAINER_ENTRY_POINT_ARGS; - } - var podContainer = { - name: name, - image: container.image, - ports: (0, k8s_1.containerPorts)(container) - }; - if (container.workingDirectory) { - podContainer.workingDir = container.workingDirectory; - } - if (container.entryPoint) { - podContainer.command = [container.entryPoint]; - } - if (((_a = container.entryPointArgs) === null || _a === void 0 ? void 0 : _a.length) > 0) { - podContainer.args = (0, utils_1.fixArgs)(container.entryPointArgs); - } - podContainer.env = []; - for (var _i = 0, _d = Object.entries(container['environmentVariables']); _i < _d.length; _i++) { - var _e = _d[_i], key = _e[0], value = _e[1]; - if (value && key !== 'HOME') { - podContainer.env.push({ name: key, value: value }); - } - } - podContainer.volumeMounts = (0, utils_1.containerVolumes)(container.userMountVolumes, jobContainer); - if (!extension) { - return podContainer; - } - var from = (_c = (_b = extension.spec) === null || _b === void 0 ? void 0 : _b.containers) === null || _c === void 0 ? void 0 : _c.find(function (c) { return c.name === constants_1.CONTAINER_EXTENSION_PREFIX + name; }); - if (from) { - (0, utils_1.mergeContainerWithOptions)(podContainer, from); - } - return podContainer; -} -exports.createContainerSpec = createContainerSpec; - - -/***/ }), - -/***/ 40617: -/***/ (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.runContainerStep = void 0; -var core = __importStar(__nccwpck_require__(42186)); -var k8s = __importStar(__nccwpck_require__(89679)); -var k8s_1 = __nccwpck_require__(76949); -var utils_1 = __nccwpck_require__(66924); -var constants_1 = __nccwpck_require__(94865); -function runContainerStep(stepContainer) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j; - return __awaiter(this, void 0, void 0, function () { - var secretName, extension, container, job, err_1, message, podName, err_2, message, status, exitCode; - return __generator(this, function (_k) { - switch (_k.label) { - case 0: - if (stepContainer.dockerfile) { - throw new Error('Building container actions is not currently supported'); - } - secretName = undefined; - if (!stepContainer.environmentVariables) return [3 /*break*/, 2]; - return [4 /*yield*/, (0, k8s_1.createSecretForEnvs)(stepContainer.environmentVariables)]; - case 1: - secretName = _k.sent(); - _k.label = 2; - case 2: - extension = (0, utils_1.readExtensionFromFile)(); - core.debug("Created secret ".concat(secretName, " for container job envs")); - container = createContainerSpec(stepContainer, secretName, extension); - _k.label = 3; - case 3: - _k.trys.push([3, 5, , 6]); - return [4 /*yield*/, (0, k8s_1.createJob)(container, extension)]; - case 4: - job = _k.sent(); - return [3 /*break*/, 6]; - case 5: - err_1 = _k.sent(); - core.debug("createJob failed: ".concat(JSON.stringify(err_1))); - message = ((_b = (_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.message) || err_1; - throw new Error("failed to run script step: ".concat(message)); - case 6: - if (!((_c = job.metadata) === null || _c === void 0 ? void 0 : _c.name)) { - throw new Error("Expected job ".concat(JSON.stringify(job), " to have correctly set the metadata.name")); - } - core.debug("Job created, waiting for pod to start: ".concat((_d = job.metadata) === null || _d === void 0 ? void 0 : _d.name)); - _k.label = 7; - case 7: - _k.trys.push([7, 9, , 10]); - return [4 /*yield*/, (0, k8s_1.getContainerJobPodName)(job.metadata.name)]; - case 8: - podName = _k.sent(); - return [3 /*break*/, 10]; - case 9: - err_2 = _k.sent(); - core.debug("getContainerJobPodName failed: ".concat(JSON.stringify(err_2))); - message = ((_f = (_e = err_2 === null || err_2 === void 0 ? void 0 : err_2.response) === null || _e === void 0 ? void 0 : _e.body) === null || _f === void 0 ? void 0 : _f.message) || err_2; - throw new Error("failed to get container job pod name: ".concat(message)); - case 10: return [4 /*yield*/, (0, k8s_1.waitForPodPhases)(podName, new Set([ - utils_1.PodPhase.COMPLETED, - utils_1.PodPhase.RUNNING, - utils_1.PodPhase.SUCCEEDED, - utils_1.PodPhase.FAILED - ]), new Set([utils_1.PodPhase.PENDING, utils_1.PodPhase.UNKNOWN]))]; - case 11: - _k.sent(); - core.debug('Container step is running or complete, pulling logs'); - return [4 /*yield*/, (0, k8s_1.getPodLogs)(podName, constants_1.JOB_CONTAINER_NAME)]; - case 12: - _k.sent(); - core.debug('Waiting for container job to complete'); - return [4 /*yield*/, (0, k8s_1.waitForJobToComplete)(job.metadata.name) - // pod has failed so pull the status code from the container - ]; - case 13: - _k.sent(); - return [4 /*yield*/, (0, k8s_1.getPodStatus)(podName)]; - case 14: - status = _k.sent(); - if ((status === null || status === void 0 ? void 0 : status.phase) === 'Succeeded') { - return [2 /*return*/, 0]; - } - if (!((_g = status === null || status === void 0 ? void 0 : status.containerStatuses) === null || _g === void 0 ? void 0 : _g.length)) { - core.error("Can't determine container status from response: ".concat(JSON.stringify(status))); - return [2 /*return*/, 1]; - } - exitCode = (_j = (_h = status.containerStatuses[status.containerStatuses.length - 1].state) === null || _h === void 0 ? void 0 : _h.terminated) === null || _j === void 0 ? void 0 : _j.exitCode; - return [2 /*return*/, Number(exitCode) || 1]; - } - }); - }); -} -exports.runContainerStep = runContainerStep; -function createContainerSpec(container, secretName, extension) { - var _a, _b, _c; - var podContainer = new k8s.V1Container(); - podContainer.name = constants_1.JOB_CONTAINER_NAME; - podContainer.image = container.image; - podContainer.workingDir = container.workingDirectory; - podContainer.command = container.entryPoint - ? [container.entryPoint] - : undefined; - podContainer.args = ((_a = container.entryPointArgs) === null || _a === void 0 ? void 0 : _a.length) - ? (0, utils_1.fixArgs)(container.entryPointArgs) - : undefined; - if (secretName) { - podContainer.envFrom = [ - { - secretRef: { - name: secretName, - optional: false - } - } - ]; - } - podContainer.volumeMounts = (0, utils_1.containerVolumes)(undefined, false, true); - if (!extension) { - return podContainer; - } - var from = (_c = (_b = extension.spec) === null || _b === void 0 ? void 0 : _b.containers) === null || _c === void 0 ? void 0 : _c.find(function (c) { return c.name === constants_1.JOB_CONTAINER_EXTENSION_NAME; }); - if (from) { - (0, utils_1.mergeContainerWithOptions)(podContainer, from); - } - return podContainer; -} - - -/***/ }), - -/***/ 14800: -/***/ (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -var __spreadArray = (this && this.__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)); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.runScriptStep = void 0; -/* eslint-disable @typescript-eslint/no-unused-vars */ -var fs = __importStar(__nccwpck_require__(57147)); -var core = __importStar(__nccwpck_require__(42186)); -var k8s_1 = __nccwpck_require__(76949); -var utils_1 = __nccwpck_require__(66924); -var constants_1 = __nccwpck_require__(94865); -function runScriptStep(args, state, responseFile) { - var _a, _b; - return __awaiter(this, void 0, void 0, function () { - var entryPoint, entryPointArgs, environmentVariables, _c, containerPath, runnerPath, err_1, message; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - entryPoint = args.entryPoint, entryPointArgs = args.entryPointArgs, environmentVariables = args.environmentVariables; - _c = (0, utils_1.writeEntryPointScript)(args.workingDirectory, entryPoint, entryPointArgs, args.prependPath, environmentVariables), containerPath = _c.containerPath, runnerPath = _c.runnerPath; - args.entryPoint = 'sh'; - args.entryPointArgs = ['-e', containerPath]; - _d.label = 1; - case 1: - _d.trys.push([1, 3, 4, 5]); - return [4 /*yield*/, (0, k8s_1.execPodStep)(__spreadArray([args.entryPoint], args.entryPointArgs, true), state.jobPod, constants_1.JOB_CONTAINER_NAME)]; - case 2: - _d.sent(); - return [3 /*break*/, 5]; - case 3: - err_1 = _d.sent(); - core.debug("execPodStep failed: ".concat(JSON.stringify(err_1))); - message = ((_b = (_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.message) || err_1; - throw new Error("failed to run script step: ".concat(message)); - case 4: - fs.rmSync(runnerPath); - return [7 /*endfinally*/]; - case 5: return [2 /*return*/]; - } - }); - }); -} -exports.runScriptStep = runScriptStep; - - -/***/ }), - -/***/ 94822: -/***/ (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var core = __importStar(__nccwpck_require__(42186)); -var hooklib_1 = __nccwpck_require__(97615); -var hooks_1 = __nccwpck_require__(84402); -var k8s_1 = __nccwpck_require__(76949); -function run() { - return __awaiter(this, void 0, void 0, function () { - var input, args, command, responseFile, state, exitCode, _a, error_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 13, , 14]); - return [4 /*yield*/, (0, hooklib_1.getInputFromStdin)()]; - case 1: - input = _b.sent(); - args = input['args']; - command = input['command']; - responseFile = input['responseFile']; - state = input['state']; - return [4 /*yield*/, (0, k8s_1.isAuthPermissionsOK)()]; - case 2: - if (!(_b.sent())) { - throw new Error("The Service account needs the following permissions ".concat(JSON.stringify(k8s_1.requiredPermissions), " on the pod resource in the '").concat((0, k8s_1.namespace)(), "' namespace. Please contact your self hosted runner administrator.")); - } - exitCode = 0; - _a = command; - switch (_a) { - case hooklib_1.Command.PrepareJob: return [3 /*break*/, 3]; - case hooklib_1.Command.CleanupJob: return [3 /*break*/, 5]; - case hooklib_1.Command.RunScriptStep: return [3 /*break*/, 7]; - case hooklib_1.Command.RunContainerStep: return [3 /*break*/, 9]; - } - return [3 /*break*/, 11]; - case 3: return [4 /*yield*/, (0, hooks_1.prepareJob)(args, responseFile)]; - case 4: - _b.sent(); - return [2 /*return*/, process.exit(0)]; - case 5: return [4 /*yield*/, (0, hooks_1.cleanupJob)()]; - case 6: - _b.sent(); - return [2 /*return*/, process.exit(0)]; - case 7: return [4 /*yield*/, (0, hooks_1.runScriptStep)(args, state, null)]; - case 8: - _b.sent(); - return [2 /*return*/, process.exit(0)]; - case 9: return [4 /*yield*/, (0, hooks_1.runContainerStep)(args)]; - case 10: - exitCode = _b.sent(); - return [2 /*return*/, process.exit(exitCode)]; - case 11: throw new Error("Command not recognized: ".concat(command)); - case 12: return [3 /*break*/, 14]; - case 13: - error_1 = _b.sent(); - core.error(error_1); - process.exit(1); - return [3 /*break*/, 14]; - case 14: return [2 /*return*/]; - } - }); - }); -} -void run(); - - -/***/ }), - -/***/ 76949: -/***/ (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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__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 }; - } -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getPodByName = exports.containerPorts = exports.namespace = exports.isPodContainerAlpine = exports.isAuthPermissionsOK = exports.getPodStatus = exports.prunePods = exports.getPodLogs = exports.getPrepareJobTimeoutSeconds = exports.waitForPodPhases = exports.pruneSecrets = exports.deleteSecret = exports.createSecretForEnvs = exports.createDockerSecret = exports.waitForJobToComplete = exports.execPodStep = exports.deletePod = exports.getContainerJobPodName = exports.createJob = exports.createPod = exports.requiredPermissions = exports.POD_VOLUME_NAME = void 0; -var core = __importStar(__nccwpck_require__(42186)); -var k8s = __importStar(__nccwpck_require__(89679)); -var stream = __importStar(__nccwpck_require__(12781)); -var constants_1 = __nccwpck_require__(94865); -var utils_1 = __nccwpck_require__(66924); -var kc = new k8s.KubeConfig(); -kc.loadFromDefault(); -var k8sApi = kc.makeApiClient(k8s.CoreV1Api); -var k8sBatchV1Api = kc.makeApiClient(k8s.BatchV1Api); -var k8sAuthorizationV1Api = kc.makeApiClient(k8s.AuthorizationV1Api); -var DEFAULT_WAIT_FOR_POD_TIME_SECONDS = 10 * 60; // 10 min -exports.POD_VOLUME_NAME = 'work'; -exports.requiredPermissions = [ - { - group: '', - verbs: ['get', 'list', 'create', 'delete'], - resource: 'pods', - subresource: '' - }, - { - group: '', - verbs: ['get', 'create'], - resource: 'pods', - subresource: 'exec' - }, - { - group: '', - verbs: ['get', 'list', 'watch'], - resource: 'pods', - subresource: 'log' - }, - { - group: 'batch', - verbs: ['get', 'list', 'create', 'delete'], - resource: 'jobs', - subresource: '' - }, - { - group: '', - verbs: ['create', 'delete', 'get', 'list'], - resource: 'secrets', - subresource: '' - } -]; -function createPod(jobContainer, services, registry, extension) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var containers, appPod, instanceLabel, _b, claimName, secret, secretReference, body; - var _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - containers = []; - if (jobContainer) { - containers.push(jobContainer); - } - if (services === null || services === void 0 ? void 0 : services.length) { - containers.push.apply(containers, services); - } - appPod = new k8s.V1Pod(); - appPod.apiVersion = 'v1'; - appPod.kind = 'Pod'; - appPod.metadata = new k8s.V1ObjectMeta(); - appPod.metadata.name = (0, constants_1.getJobPodName)(); - instanceLabel = new constants_1.RunnerInstanceLabel(); - appPod.metadata.labels = (_c = {}, - _c[instanceLabel.key] = instanceLabel.value, - _c); - appPod.metadata.annotations = {}; - appPod.spec = new k8s.V1PodSpec(); - appPod.spec.containers = containers; - appPod.spec.restartPolicy = 'Never'; - if (!!(0, utils_1.useKubeScheduler)()) return [3 /*break*/, 2]; - _b = appPod.spec; - return [4 /*yield*/, getCurrentNodeName()]; - case 1: - _b.nodeName = _d.sent(); - _d.label = 2; - case 2: - claimName = (0, constants_1.getVolumeClaimName)(); - appPod.spec.volumes = [ - { - name: 'work', - persistentVolumeClaim: { claimName: claimName } - } - ]; - if (!registry) return [3 /*break*/, 4]; - return [4 /*yield*/, createDockerSecret(registry)]; - case 3: - secret = _d.sent(); - if (!((_a = secret === null || secret === void 0 ? void 0 : secret.metadata) === null || _a === void 0 ? void 0 : _a.name)) { - throw new Error("created secret does not have secret.metadata.name"); - } - secretReference = new k8s.V1LocalObjectReference(); - secretReference.name = secret.metadata.name; - appPod.spec.imagePullSecrets = [secretReference]; - _d.label = 4; - case 4: - if (extension === null || extension === void 0 ? void 0 : extension.metadata) { - (0, utils_1.mergeObjectMeta)(appPod, extension.metadata); - } - if (extension === null || extension === void 0 ? void 0 : extension.spec) { - (0, utils_1.mergePodSpecWithOptions)(appPod.spec, extension.spec); - } - return [4 /*yield*/, k8sApi.createNamespacedPod(namespace(), appPod)]; - case 5: - body = (_d.sent()).body; - return [2 /*return*/, body]; - } - }); - }); -} -exports.createPod = createPod; -function createJob(container, extension) { - return __awaiter(this, void 0, void 0, function () { - var runnerInstanceLabel, job, _a, claimName, body; - var _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - runnerInstanceLabel = new constants_1.RunnerInstanceLabel(); - job = new k8s.V1Job(); - job.apiVersion = 'batch/v1'; - job.kind = 'Job'; - job.metadata = new k8s.V1ObjectMeta(); - job.metadata.name = (0, constants_1.getStepPodName)(); - job.metadata.labels = (_b = {}, _b[runnerInstanceLabel.key] = runnerInstanceLabel.value, _b); - job.metadata.annotations = {}; - job.spec = new k8s.V1JobSpec(); - job.spec.ttlSecondsAfterFinished = 300; - job.spec.backoffLimit = 0; - job.spec.template = new k8s.V1PodTemplateSpec(); - job.spec.template.spec = new k8s.V1PodSpec(); - job.spec.template.metadata = new k8s.V1ObjectMeta(); - job.spec.template.metadata.labels = {}; - job.spec.template.metadata.annotations = {}; - job.spec.template.spec.containers = [container]; - job.spec.template.spec.restartPolicy = 'Never'; - if (!!(0, utils_1.useKubeScheduler)()) return [3 /*break*/, 2]; - _a = job.spec.template.spec; - return [4 /*yield*/, getCurrentNodeName()]; - case 1: - _a.nodeName = _c.sent(); - _c.label = 2; - case 2: - claimName = (0, constants_1.getVolumeClaimName)(); - job.spec.template.spec.volumes = [ - { - name: 'work', - persistentVolumeClaim: { claimName: claimName } - } - ]; - if (extension) { - if (extension.metadata) { - // apply metadata both to the job and the pod created by the job - (0, utils_1.mergeObjectMeta)(job, extension.metadata); - (0, utils_1.mergeObjectMeta)(job.spec.template, extension.metadata); - } - if (extension.spec) { - (0, utils_1.mergePodSpecWithOptions)(job.spec.template.spec, extension.spec); - } - } - return [4 /*yield*/, k8sBatchV1Api.createNamespacedJob(namespace(), job)]; - case 3: - body = (_c.sent()).body; - return [2 /*return*/, body]; - } - }); - }); -} -exports.createJob = createJob; -function getContainerJobPodName(jobName) { - var _a, _b; - return __awaiter(this, void 0, void 0, function () { - var selector, backOffManager, podList; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - selector = "job-name=".concat(jobName); - backOffManager = new BackOffManager(60); - _c.label = 1; - case 1: - if (false) {} - return [4 /*yield*/, k8sApi.listNamespacedPod(namespace(), undefined, undefined, undefined, undefined, selector, 1)]; - case 2: - podList = _c.sent(); - if (!!((_a = podList.body.items) === null || _a === void 0 ? void 0 : _a.length)) return [3 /*break*/, 4]; - return [4 /*yield*/, backOffManager.backOff()]; - case 3: - _c.sent(); - return [3 /*break*/, 1]; - case 4: - if (!((_b = podList.body.items[0].metadata) === null || _b === void 0 ? void 0 : _b.name)) { - throw new Error("Failed to determine the name of the pod for job ".concat(jobName)); - } - return [2 /*return*/, podList.body.items[0].metadata.name]; - case 5: return [2 /*return*/]; - } - }); - }); -} -exports.getContainerJobPodName = getContainerJobPodName; -function deletePod(podName) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, k8sApi.deleteNamespacedPod(podName, namespace(), undefined, undefined, 0)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.deletePod = deletePod; -function execPodStep(command, podName, containerName, stdin) { - return __awaiter(this, void 0, void 0, function () { - var exec; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - exec = new k8s.Exec(kc); - command = (0, utils_1.fixArgs)(command); - // Exec returns a websocket. If websocket fails, we should reject the promise. Otherwise, websocket will call a callback. Since at that point, websocket is not failing, we can safely resolve or reject the promise. - return [4 /*yield*/, new Promise(function (resolve, reject) { - exec - .exec(namespace(), podName, containerName, command, process.stdout, process.stderr, stdin !== null && stdin !== void 0 ? stdin : null, false /* tty */, function (resp) { - // kube.exec returns an error if exit code is not 0, but we can't actually get the exit code - if (resp.status === 'Success') { - resolve(resp.code); - } - else { - core.debug(JSON.stringify({ - message: resp === null || resp === void 0 ? void 0 : resp.message, - details: resp === null || resp === void 0 ? void 0 : resp.details - })); - reject(resp === null || resp === void 0 ? void 0 : resp.message); - } - }) - // If exec.exec fails, explicitly reject the outer promise - // eslint-disable-next-line github/no-then - .catch(function (e) { return reject(e); }); - })]; - case 1: - // Exec returns a websocket. If websocket fails, we should reject the promise. Otherwise, websocket will call a callback. Since at that point, websocket is not failing, we can safely resolve or reject the promise. - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.execPodStep = execPodStep; -function waitForJobToComplete(jobName) { - return __awaiter(this, void 0, void 0, function () { - var backOffManager, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - backOffManager = new BackOffManager(); - _a.label = 1; - case 1: - if (false) {} - _a.label = 2; - case 2: - _a.trys.push([2, 4, , 5]); - return [4 /*yield*/, isJobSucceeded(jobName)]; - case 3: - if (_a.sent()) { - return [2 /*return*/]; - } - return [3 /*break*/, 5]; - case 4: - error_1 = _a.sent(); - throw new Error("job ".concat(jobName, " has failed")); - case 5: return [4 /*yield*/, backOffManager.backOff()]; - case 6: - _a.sent(); - return [3 /*break*/, 1]; - case 7: return [2 /*return*/]; - } - }); - }); -} -exports.waitForJobToComplete = waitForJobToComplete; -function createDockerSecret(registry) { - return __awaiter(this, void 0, void 0, function () { - var authContent, runnerInstanceLabel, secretName, secret, body; - var _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - authContent = { - auths: (_a = {}, - _a[registry.serverUrl || 'https://index.docker.io/v1/'] = { - username: registry.username, - password: registry.password, - auth: Buffer.from("".concat(registry.username, ":").concat(registry.password)).toString('base64') - }, - _a) - }; - runnerInstanceLabel = new constants_1.RunnerInstanceLabel(); - secretName = (0, constants_1.getSecretName)(); - secret = new k8s.V1Secret(); - secret.immutable = true; - secret.apiVersion = 'v1'; - secret.metadata = new k8s.V1ObjectMeta(); - secret.metadata.name = secretName; - secret.metadata.namespace = namespace(); - secret.metadata.labels = (_b = {}, - _b[runnerInstanceLabel.key] = runnerInstanceLabel.value, - _b); - secret.type = 'kubernetes.io/dockerconfigjson'; - secret.kind = 'Secret'; - secret.data = { - '.dockerconfigjson': Buffer.from(JSON.stringify(authContent)).toString('base64') - }; - return [4 /*yield*/, k8sApi.createNamespacedSecret(namespace(), secret)]; - case 1: - body = (_c.sent()).body; - return [2 /*return*/, body]; - } - }); - }); -} -exports.createDockerSecret = createDockerSecret; -function createSecretForEnvs(envs) { - return __awaiter(this, void 0, void 0, function () { - var runnerInstanceLabel, secret, secretName, _i, _a, _b, key, value; - var _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - runnerInstanceLabel = new constants_1.RunnerInstanceLabel(); - secret = new k8s.V1Secret(); - secretName = (0, constants_1.getSecretName)(); - secret.immutable = true; - secret.apiVersion = 'v1'; - secret.metadata = new k8s.V1ObjectMeta(); - secret.metadata.name = secretName; - secret.metadata.labels = (_c = {}, - _c[runnerInstanceLabel.key] = runnerInstanceLabel.value, - _c); - secret.kind = 'Secret'; - secret.data = {}; - for (_i = 0, _a = Object.entries(envs); _i < _a.length; _i++) { - _b = _a[_i], key = _b[0], value = _b[1]; - secret.data[key] = Buffer.from(value).toString('base64'); - } - return [4 /*yield*/, k8sApi.createNamespacedSecret(namespace(), secret)]; - case 1: - _d.sent(); - return [2 /*return*/, secretName]; - } - }); - }); -} -exports.createSecretForEnvs = createSecretForEnvs; -function deleteSecret(secretName) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, k8sApi.deleteNamespacedSecret(secretName, namespace())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.deleteSecret = deleteSecret; -function pruneSecrets() { - return __awaiter(this, void 0, void 0, function () { - var secretList; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, k8sApi.listNamespacedSecret(namespace(), undefined, undefined, undefined, undefined, new constants_1.RunnerInstanceLabel().toString())]; - case 1: - secretList = _a.sent(); - if (!secretList.body.items.length) { - return [2 /*return*/]; - } - return [4 /*yield*/, Promise.all(secretList.body.items.map(function (secret) { var _a; return ((_a = secret.metadata) === null || _a === void 0 ? void 0 : _a.name) && deleteSecret(secret.metadata.name); }))]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.pruneSecrets = pruneSecrets; -function waitForPodPhases(podName, awaitingPhases, backOffPhases, maxTimeSeconds) { - if (maxTimeSeconds === void 0) { maxTimeSeconds = DEFAULT_WAIT_FOR_POD_TIME_SECONDS; } - return __awaiter(this, void 0, void 0, function () { - var backOffManager, phase, error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - backOffManager = new BackOffManager(maxTimeSeconds); - phase = utils_1.PodPhase.UNKNOWN; - _a.label = 1; - case 1: - _a.trys.push([1, 6, , 7]); - _a.label = 2; - case 2: - if (false) {} - return [4 /*yield*/, getPodPhase(podName)]; - case 3: - phase = _a.sent(); - if (awaitingPhases.has(phase)) { - return [2 /*return*/]; - } - if (!backOffPhases.has(phase)) { - throw new Error("Pod ".concat(podName, " is unhealthy with phase status ").concat(phase)); - } - return [4 /*yield*/, backOffManager.backOff()]; - case 4: - _a.sent(); - return [3 /*break*/, 2]; - case 5: return [3 /*break*/, 7]; - case 6: - error_2 = _a.sent(); - throw new Error("Pod ".concat(podName, " is unhealthy with phase status ").concat(phase)); - case 7: return [2 /*return*/]; - } - }); - }); -} -exports.waitForPodPhases = waitForPodPhases; -function getPrepareJobTimeoutSeconds() { - var envTimeoutSeconds = process.env['ACTIONS_RUNNER_PREPARE_JOB_TIMEOUT_SECONDS']; - if (!envTimeoutSeconds) { - return DEFAULT_WAIT_FOR_POD_TIME_SECONDS; - } - var timeoutSeconds = parseInt(envTimeoutSeconds, 10); - if (!timeoutSeconds || timeoutSeconds <= 0) { - core.warning("Prepare job timeout is invalid (\"".concat(timeoutSeconds, "\"): use an int > 0")); - return DEFAULT_WAIT_FOR_POD_TIME_SECONDS; - } - return timeoutSeconds; -} -exports.getPrepareJobTimeoutSeconds = getPrepareJobTimeoutSeconds; -function getPodPhase(podName) { - var _a, _b; - return __awaiter(this, void 0, void 0, function () { - var podPhaseLookup, body, pod; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - podPhaseLookup = new Set([ - utils_1.PodPhase.PENDING, - utils_1.PodPhase.RUNNING, - utils_1.PodPhase.SUCCEEDED, - utils_1.PodPhase.FAILED, - utils_1.PodPhase.UNKNOWN - ]); - return [4 /*yield*/, k8sApi.readNamespacedPod(podName, namespace())]; - case 1: - body = (_c.sent()).body; - pod = body; - if (!((_a = pod.status) === null || _a === void 0 ? void 0 : _a.phase) || !podPhaseLookup.has(pod.status.phase)) { - return [2 /*return*/, utils_1.PodPhase.UNKNOWN]; - } - return [2 /*return*/, (_b = pod.status) === null || _b === void 0 ? void 0 : _b.phase]; - } - }); - }); -} -function isJobSucceeded(jobName) { - var _a, _b; - return __awaiter(this, void 0, void 0, function () { - var body, job; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: return [4 /*yield*/, k8sBatchV1Api.readNamespacedJob(jobName, namespace())]; - case 1: - body = (_c.sent()).body; - job = body; - if ((_a = job.status) === null || _a === void 0 ? void 0 : _a.failed) { - throw new Error("job ".concat(jobName, " has failed")); - } - return [2 /*return*/, !!((_b = job.status) === null || _b === void 0 ? void 0 : _b.succeeded)]; - } - }); - }); -} -function getPodLogs(podName, containerName) { - return __awaiter(this, void 0, void 0, function () { - var log, logStream, r; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - log = new k8s.Log(kc); - logStream = new stream.PassThrough(); - logStream.on('data', function (chunk) { - // use write rather than console.log to prevent double line feed - process.stdout.write(chunk); - }); - logStream.on('error', function (err) { - process.stderr.write(err.message); - }); - return [4 /*yield*/, log.log(namespace(), podName, containerName, logStream, { - follow: true, - tailLines: 50, - pretty: false, - timestamps: false - })]; - case 1: - r = _a.sent(); - return [4 /*yield*/, new Promise(function (resolve) { return r.on('close', function () { return resolve(null); }); })]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.getPodLogs = getPodLogs; -function prunePods() { - return __awaiter(this, void 0, void 0, function () { - var podList; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, k8sApi.listNamespacedPod(namespace(), undefined, undefined, undefined, undefined, new constants_1.RunnerInstanceLabel().toString())]; - case 1: - podList = _a.sent(); - if (!podList.body.items.length) { - return [2 /*return*/]; - } - return [4 /*yield*/, Promise.all(podList.body.items.map(function (pod) { var _a; return ((_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name) && deletePod(pod.metadata.name); }))]; - case 2: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -exports.prunePods = prunePods; -function getPodStatus(name) { - return __awaiter(this, void 0, void 0, function () { - var body; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, k8sApi.readNamespacedPod(name, namespace())]; - case 1: - body = (_a.sent()).body; - return [2 /*return*/, body.status]; - } - }); - }); -} -exports.getPodStatus = getPodStatus; -function isAuthPermissionsOK() { - return __awaiter(this, void 0, void 0, function () { - var sar, asyncs, _i, requiredPermissions_1, resource, _a, _b, verb, responses; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - sar = new k8s.V1SelfSubjectAccessReview(); - asyncs = []; - for (_i = 0, requiredPermissions_1 = exports.requiredPermissions; _i < requiredPermissions_1.length; _i++) { - resource = requiredPermissions_1[_i]; - for (_a = 0, _b = resource.verbs; _a < _b.length; _a++) { - verb = _b[_a]; - sar.spec = new k8s.V1SelfSubjectAccessReviewSpec(); - sar.spec.resourceAttributes = new k8s.V1ResourceAttributes(); - sar.spec.resourceAttributes.verb = verb; - sar.spec.resourceAttributes.namespace = namespace(); - sar.spec.resourceAttributes.group = resource.group; - sar.spec.resourceAttributes.resource = resource.resource; - sar.spec.resourceAttributes.subresource = resource.subresource; - asyncs.push(k8sAuthorizationV1Api.createSelfSubjectAccessReview(sar)); - } - } - return [4 /*yield*/, Promise.all(asyncs)]; - case 1: - responses = _c.sent(); - return [2 /*return*/, responses.every(function (resp) { var _a; return (_a = resp.body.status) === null || _a === void 0 ? void 0 : _a.allowed; })]; - } - }); - }); -} -exports.isAuthPermissionsOK = isAuthPermissionsOK; -function isPodContainerAlpine(podName, containerName) { - return __awaiter(this, void 0, void 0, function () { - var isAlpine, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - isAlpine = true; - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, execPodStep([ - 'sh', - '-c', - "'[ $(cat /etc/*release* | grep -i -e \"^ID=*alpine*\" -c) != 0 ] || exit 1'" - ], podName, containerName)]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_1 = _a.sent(); - isAlpine = false; - return [3 /*break*/, 4]; - case 4: return [2 /*return*/, isAlpine]; - } - }); - }); -} -exports.isPodContainerAlpine = isPodContainerAlpine; -function getCurrentNodeName() { - var _a; - return __awaiter(this, void 0, void 0, function () { - var resp, nodeName; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, k8sApi.readNamespacedPod((0, constants_1.getRunnerPodName)(), namespace())]; - case 1: - resp = _b.sent(); - nodeName = (_a = resp.body.spec) === null || _a === void 0 ? void 0 : _a.nodeName; - if (!nodeName) { - throw new Error('Failed to determine node name'); - } - return [2 /*return*/, nodeName]; - } - }); - }); -} -function namespace() { - if (process.env['ACTIONS_RUNNER_KUBERNETES_NAMESPACE']) { - return process.env['ACTIONS_RUNNER_KUBERNETES_NAMESPACE']; - } - var context = kc.getContexts().find(function (ctx) { return ctx.namespace; }); - if (!(context === null || context === void 0 ? void 0 : context.namespace)) { - throw new Error('Failed to determine namespace, falling back to `default`. Namespace should be set in context, or in env variable "ACTIONS_RUNNER_KUBERNETES_NAMESPACE"'); - } - return context.namespace; -} -exports.namespace = namespace; -var BackOffManager = /** @class */ (function () { - function BackOffManager(throwAfterSeconds) { - this.throwAfterSeconds = throwAfterSeconds; - this.backOffSeconds = 1; - this.totalTime = 0; - if (!throwAfterSeconds || throwAfterSeconds < 0) { - this.throwAfterSeconds = undefined; - } - } - BackOffManager.prototype.backOff = function () { - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (resolve) { - return setTimeout(resolve, _this.backOffSeconds * 1000); - })]; - case 1: - _a.sent(); - this.totalTime += this.backOffSeconds; - if (this.throwAfterSeconds && this.throwAfterSeconds < this.totalTime) { - throw new Error('backoff timeout'); - } - if (this.backOffSeconds < 20) { - this.backOffSeconds *= 2; - } - if (this.backOffSeconds > 20) { - this.backOffSeconds = 20; - } - return [2 /*return*/]; - } - }); - }); - }; - return BackOffManager; -}()); -function containerPorts(container) { - var _a; - var ports = []; - if (!((_a = container.portMappings) === null || _a === void 0 ? void 0 : _a.length)) { - return ports; - } - for (var _i = 0, _b = container.portMappings; _i < _b.length; _i++) { - var portDefinition = _b[_i]; - var portProtoSplit = portDefinition.split('/'); - if (portProtoSplit.length > 2) { - throw new Error("Unexpected port format: ".concat(portDefinition)); - } - var port = new k8s.V1ContainerPort(); - port.protocol = - portProtoSplit.length === 2 ? portProtoSplit[1].toUpperCase() : 'TCP'; - var portSplit = portProtoSplit[0].split(':'); - if (portSplit.length > 2) { - throw new Error('ports should have at most one ":" separator'); - } - var parsePort = function (p) { - var num = Number(p); - if (!Number.isInteger(num) || num < 1 || num > 65535) { - throw new Error("invalid container port: ".concat(p)); - } - return num; - }; - if (portSplit.length === 1) { - port.containerPort = parsePort(portSplit[0]); - } - else { - port.hostPort = parsePort(portSplit[0]); - port.containerPort = parsePort(portSplit[1]); - } - ports.push(port); - } - return ports; -} -exports.containerPorts = containerPorts; -function getPodByName(name) { - return __awaiter(this, void 0, void 0, function () { - var body; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, k8sApi.readNamespacedPod(name, namespace())]; - case 1: - body = (_a.sent()).body; - return [2 /*return*/, body]; - } - }); - }); -} -exports.getPodByName = getPodByName; - - -/***/ }), - -/***/ 66924: -/***/ (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.fixArgs = exports.PodPhase = exports.useKubeScheduler = exports.readExtensionFromFile = exports.mergeObjectMeta = exports.mergePodSpecWithOptions = exports.mergeContainerWithOptions = exports.generateContainerName = exports.writeEntryPointScript = exports.containerVolumes = exports.ENV_USE_KUBE_SCHEDULER = exports.ENV_HOOK_TEMPLATE_PATH = exports.DEFAULT_CONTAINER_ENTRY_POINT = exports.DEFAULT_CONTAINER_ENTRY_POINT_ARGS = void 0; -var fs = __importStar(__nccwpck_require__(57147)); -var yaml = __importStar(__nccwpck_require__(21917)); -var core = __importStar(__nccwpck_require__(42186)); -var path = __importStar(__nccwpck_require__(71017)); -var uuid_1 = __nccwpck_require__(2155); -var index_1 = __nccwpck_require__(76949); -var constants_1 = __nccwpck_require__(94865); -var shlex = __importStar(__nccwpck_require__(95659)); -exports.DEFAULT_CONTAINER_ENTRY_POINT_ARGS = ["-f", "/dev/null"]; -exports.DEFAULT_CONTAINER_ENTRY_POINT = 'tail'; -exports.ENV_HOOK_TEMPLATE_PATH = 'ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE'; -exports.ENV_USE_KUBE_SCHEDULER = 'ACTIONS_RUNNER_USE_KUBE_SCHEDULER'; -function containerVolumes(userMountVolumes, jobContainer, containerAction) { - if (userMountVolumes === void 0) { userMountVolumes = []; } - if (jobContainer === void 0) { jobContainer = true; } - if (containerAction === void 0) { containerAction = false; } - var mounts = [ - { - name: index_1.POD_VOLUME_NAME, - mountPath: '/__w' - } - ]; - var workspacePath = process.env.GITHUB_WORKSPACE; - if (containerAction) { - var i = workspacePath.lastIndexOf('_work/'); - var workspaceRelativePath = workspacePath.slice(i + '_work/'.length); - mounts.push({ - name: index_1.POD_VOLUME_NAME, - mountPath: '/github/workspace', - subPath: workspaceRelativePath - }, { - name: index_1.POD_VOLUME_NAME, - mountPath: '/github/file_commands', - subPath: '_temp/_runner_file_commands' - }, { - name: index_1.POD_VOLUME_NAME, - mountPath: '/github/workflow', - subPath: '_temp/_github_workflow' - }); - return mounts; - } - if (!jobContainer) { - return mounts; - } - mounts.push({ - name: index_1.POD_VOLUME_NAME, - mountPath: '/__e', - subPath: 'externals' - }, { - name: index_1.POD_VOLUME_NAME, - mountPath: '/github/home', - subPath: '_temp/_github_home' - }, { - name: index_1.POD_VOLUME_NAME, - mountPath: '/github/workflow', - subPath: '_temp/_github_workflow' - }); - if (!(userMountVolumes === null || userMountVolumes === void 0 ? void 0 : userMountVolumes.length)) { - return mounts; - } - for (var _i = 0, userMountVolumes_1 = userMountVolumes; _i < userMountVolumes_1.length; _i++) { - var userVolume = userMountVolumes_1[_i]; - var sourceVolumePath = ''; - if (path.isAbsolute(userVolume.sourceVolumePath)) { - if (!userVolume.sourceVolumePath.startsWith(workspacePath)) { - throw new Error('Volume mounts outside of the work folder are not supported'); - } - // source volume path should be relative path - sourceVolumePath = userVolume.sourceVolumePath.slice(workspacePath.length + 1); - } - else { - sourceVolumePath = userVolume.sourceVolumePath; - } - mounts.push({ - name: index_1.POD_VOLUME_NAME, - mountPath: userVolume.targetVolumePath, - subPath: sourceVolumePath, - readOnly: userVolume.readOnly - }); - } - return mounts; -} -exports.containerVolumes = containerVolumes; -function writeEntryPointScript(workingDirectory, entryPoint, entryPointArgs, prependPath, environmentVariables) { - var exportPath = ''; - if (prependPath === null || prependPath === void 0 ? void 0 : prependPath.length) { - // TODO: remove compatibility with typeof prependPath === 'string' as we bump to next major version, the hooks will lose PrependPath compat with runners 2.293.0 and older - var prepend = typeof prependPath === 'string' ? prependPath : prependPath.join(':'); - exportPath = "export PATH=".concat(prepend, ":$PATH"); - } - var environmentPrefix = ''; - if (environmentVariables && Object.entries(environmentVariables).length) { - var envBuffer = []; - for (var _i = 0, _a = Object.entries(environmentVariables); _i < _a.length; _i++) { - var _b = _a[_i], key = _b[0], value = _b[1]; - if (key.includes("=") || - key.includes("'") || - key.includes("\"") || - key.includes("$")) { - throw new Error("environment key ".concat(key, " is invalid - the key must not contain =, $, ', or \"")); - } - envBuffer.push("\"".concat(key, "=").concat(value - .replace(/\\/g, '\\\\') - .replace(/"/g, '\\"') - .replace(/\$/g, '\\$') - .replace(/`/g, '\\`'), "\"")); - } - environmentPrefix = "env ".concat(envBuffer.join(' '), " "); - } - var content = "#!/bin/sh -l\n".concat(exportPath, "\ncd ").concat(workingDirectory, " && exec ").concat(environmentPrefix, " ").concat(entryPoint, " ").concat((entryPointArgs === null || entryPointArgs === void 0 ? void 0 : entryPointArgs.length) ? entryPointArgs.join(' ') : '', "\n"); - var filename = "".concat((0, uuid_1.v1)(), ".sh"); - var entryPointPath = "".concat(process.env.RUNNER_TEMP, "/").concat(filename); - fs.writeFileSync(entryPointPath, content); - return { - containerPath: "/__w/_temp/".concat(filename), - runnerPath: entryPointPath - }; -} -exports.writeEntryPointScript = writeEntryPointScript; -function generateContainerName(service) { - var image = service.image; - var nameWithTag = image.split('/').pop(); - var name = nameWithTag === null || nameWithTag === void 0 ? void 0 : nameWithTag.split(':').at(0); - if (!name) { - throw new Error("Image definition '".concat(image, "' is invalid")); - } - if (service.createOptions) { - var optionsArr = service.createOptions.split(/[ ]+/); - for (var i = 0; i < optionsArr.length; i++) { - if (optionsArr[i] === '--name') { - if (i + 1 >= optionsArr.length) { - throw new Error("Invalid create options: ".concat(service.createOptions, " (missing a value after --name)")); - } - name = optionsArr[++i]; - core.debug("Overriding service container name with: ".concat(name)); - } - } - } - return name; -} -exports.generateContainerName = generateContainerName; -// Overwrite or append based on container options -// -// Keep in mind, envs and volumes could be passed as fields in container definition -// so default volume mounts and envs are appended first, and then create options are used -// to append more values -// -// Rest of the fields are just applied -// For example, container.createOptions.container.image is going to overwrite container.image field -function mergeContainerWithOptions(base, from) { - for (var _i = 0, _a = Object.entries(from); _i < _a.length; _i++) { - var _b = _a[_i], key = _b[0], value = _b[1]; - if (key === 'name') { - if (value !== constants_1.CONTAINER_EXTENSION_PREFIX + base.name) { - core.warning("Skipping name override: name can't be overwritten"); - } - continue; - } - else if (key === 'image') { - core.warning("Skipping image override: image can't be overwritten"); - continue; - } - else if (key === 'env') { - var envs = value; - base.env = mergeLists(base.env, envs); - } - else if (key === 'volumeMounts' && value) { - var volumeMounts = value; - base.volumeMounts = mergeLists(base.volumeMounts, volumeMounts); - } - else if (key === 'ports' && value) { - var ports = value; - base.ports = mergeLists(base.ports, ports); - } - else { - base[key] = value; - } - } -} -exports.mergeContainerWithOptions = mergeContainerWithOptions; -function mergePodSpecWithOptions(base, from) { - var _a; - for (var _i = 0, _b = Object.entries(from); _i < _b.length; _i++) { - var _c = _b[_i], key = _c[0], value = _c[1]; - if (key === 'containers') { - (_a = base.containers).push.apply(_a, from.containers.filter(function (e) { var _a; return !((_a = e.name) === null || _a === void 0 ? void 0 : _a.startsWith(constants_1.CONTAINER_EXTENSION_PREFIX)); })); - } - else if (key === 'volumes' && value) { - var volumes = value; - base.volumes = mergeLists(base.volumes, volumes); - } - else { - base[key] = value; - } - } -} -exports.mergePodSpecWithOptions = mergePodSpecWithOptions; -function mergeObjectMeta(base, from) { - var _a, _b, _c, _d, _e, _f; - if (!((_a = base.metadata) === null || _a === void 0 ? void 0 : _a.labels) || !((_b = base.metadata) === null || _b === void 0 ? void 0 : _b.annotations)) { - throw new Error("Can't merge metadata: base.metadata or base.annotations field is undefined"); - } - if (from === null || from === void 0 ? void 0 : from.labels) { - for (var _i = 0, _g = Object.entries(from.labels); _i < _g.length; _i++) { - var _h = _g[_i], key = _h[0], value = _h[1]; - if ((_d = (_c = base.metadata) === null || _c === void 0 ? void 0 : _c.labels) === null || _d === void 0 ? void 0 : _d[key]) { - core.warning("Label ".concat(key, " is already defined and will be overwritten")); - } - base.metadata.labels[key] = value; - } - } - if (from === null || from === void 0 ? void 0 : from.annotations) { - for (var _j = 0, _k = Object.entries(from.annotations); _j < _k.length; _j++) { - var _l = _k[_j], key = _l[0], value = _l[1]; - if ((_f = (_e = base.metadata) === null || _e === void 0 ? void 0 : _e.annotations) === null || _f === void 0 ? void 0 : _f[key]) { - core.warning("Annotation ".concat(key, " is already defined and will be overwritten")); - } - base.metadata.annotations[key] = value; - } - } -} -exports.mergeObjectMeta = mergeObjectMeta; -function readExtensionFromFile() { - var filePath = process.env[exports.ENV_HOOK_TEMPLATE_PATH]; - if (!filePath) { - return undefined; - } - var doc = yaml.load(fs.readFileSync(filePath, 'utf8')); - if (!doc || typeof doc !== 'object') { - throw new Error("Failed to parse ".concat(filePath)); - } - return doc; -} -exports.readExtensionFromFile = readExtensionFromFile; -function useKubeScheduler() { - return process.env[exports.ENV_USE_KUBE_SCHEDULER] === 'true'; -} -exports.useKubeScheduler = useKubeScheduler; -var PodPhase; -(function (PodPhase) { - PodPhase["PENDING"] = "Pending"; - PodPhase["RUNNING"] = "Running"; - PodPhase["SUCCEEDED"] = "Succeeded"; - PodPhase["FAILED"] = "Failed"; - PodPhase["UNKNOWN"] = "Unknown"; - PodPhase["COMPLETED"] = "Completed"; -})(PodPhase = exports.PodPhase || (exports.PodPhase = {})); -function mergeLists(base, from) { - var b = base || []; - if (!(from === null || from === void 0 ? void 0 : from.length)) { - return b; - } - b.push.apply(b, from); - return b; -} -function fixArgs(args) { - return shlex.split(args.join(' ')); -} -exports.fixArgs = fixArgs; - - -/***/ }), - -/***/ 87351: -/***/ (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 __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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(22037)); -const utils_1 = __nccwpck_require__(5278); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map - -/***/ }), - -/***/ 42186: -/***/ (function(__unused_webpack_module, exports, __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 __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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(87351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(22037)); -const path = __importStar(__nccwpck_require__(71017)); -const uuid_1 = __nccwpck_require__(78974); -const oidc_utils_1 = __nccwpck_require__(98041); -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter. - if (name.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedVal.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; - file_command_1.issueCommand('ENV', commandValue); - } - else { - command_1.issueCommand('set-env', { name }, convertedVal); - } -} -exports.exportVariable = exportVariable; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ -function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); -} -exports.setSecret = setSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - file_command_1.issueCommand('PATH', inputPath); - } - else { - command_1.issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = addPath; -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -exports.getInput = getInput; -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - return inputs; -} -exports.getMultilineInput = getMultilineInput; -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -exports.getBooleanInput = getBooleanInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, value); -} -exports.setOutput = setOutput; -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); -} -exports.setCommandEcho = setCommandEcho; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -exports.isDebug = isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - command_1.issueCommand('debug', {}, message); -} -exports.debug = debug; -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.error = error; -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.warning = warning; -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.notice = notice; -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -exports.info = info; -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - command_1.issue('group', name); -} -exports.startGroup = startGroup; -/** - * End an output group. - */ -function endGroup() { - command_1.issue('endgroup'); -} -exports.endGroup = endGroup; -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -exports.group = group; -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); -} -exports.saveState = saveState; -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -exports.getState = getState; -function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); -} -exports.getIDToken = getIDToken; -/** - * Summary exports - */ -var summary_1 = __nccwpck_require__(81327); -Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); -/** - * @deprecated use core.summary - */ -var summary_2 = __nccwpck_require__(81327); -Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); -/** - * Path exports - */ -var path_utils_1 = __nccwpck_require__(2981); -Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); -Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); -Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 717: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// For internal use, subject to change. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.issueCommand = void 0; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(57147)); -const os = __importStar(__nccwpck_require__(22037)); -const utils_1 = __nccwpck_require__(5278); -function issueCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -exports.issueCommand = issueCommand; -//# sourceMappingURL=file-command.js.map - -/***/ }), - -/***/ 98041: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(96255); -const auth_1 = __nccwpck_require__(35526); -const core_1 = __nccwpck_require__(42186); -class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.result.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - core_1.debug(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -exports.OidcClient = OidcClient; -//# sourceMappingURL=oidc-utils.js.map - -/***/ }), - -/***/ 2981: -/***/ (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 __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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(71017)); -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -exports.toPosixPath = toPosixPath; -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -exports.toWin32Path = toWin32Path; -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -exports.toPlatformPath = toPlatformPath; -//# sourceMappingURL=path-utils.js.map - -/***/ }), - -/***/ 81327: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(22037); -const fs_1 = __nccwpck_require__(57147); -const { access, appendFile, writeFile } = fs_1.promises; -exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -exports.markdownSummary = _summary; -exports.summary = _summary; -//# sourceMappingURL=summary.js.map - -/***/ }), - -/***/ 5278: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCommandProperties = exports.toCommandValue = void 0; -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -exports.toCommandProperties = toCommandProperties; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 78974: -/***/ ((__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__(81595)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(26993)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(51472)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(16217)); - -var _nil = _interopRequireDefault(__nccwpck_require__(32381)); - -var _version = _interopRequireDefault(__nccwpck_require__(40427)); - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 5842: -/***/ ((__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; - -/***/ }), - -/***/ 32381: -/***/ ((__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; - -/***/ }), - -/***/ 26385: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -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; - -/***/ }), - -/***/ 86230: -/***/ ((__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; - -/***/ }), - -/***/ 9784: -/***/ ((__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); -} - -/***/ }), - -/***/ 38844: -/***/ ((__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; - -/***/ }), - -/***/ 61458: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -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; - -/***/ }), - -/***/ 81595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -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; - -/***/ }), - -/***/ 26993: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(65920)); - -var _md = _interopRequireDefault(__nccwpck_require__(5842)); - -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; - -/***/ }), - -/***/ 65920: -/***/ ((__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__(61458)); - -var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - -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; -} - -/***/ }), - -/***/ 51472: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -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; - -/***/ }), - -/***/ 16217: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(65920)); - -var _sha = _interopRequireDefault(__nccwpck_require__(38844)); - -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; - -/***/ }), - -/***/ 92609: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(86230)); - -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; - -/***/ }), - -/***/ 40427: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -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) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -//# sourceMappingURL=auth.js.map - -/***/ }), - -/***/ 96255: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(13685)); -const https = __importStar(__nccwpck_require__(95687)); -const pm = __importStar(__nccwpck_require__(19835)); -const tunnel = __importStar(__nccwpck_require__(74294)); -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -exports.HttpClient = HttpClient; -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 19835: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkBypass = exports.getProxyUrl = void 0; -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - return new URL(proxyVar); - } - else { - return undefined; - } -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; -//# sourceMappingURL=proxy.js.map - -/***/ }), - -/***/ 81962: -/***/ (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 __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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(57147)); -const path = __importStar(__nccwpck_require__(71017)); -_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; -exports.IS_WINDOWS = process.platform === 'win32'; -function exists(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - try { - yield exports.stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -exports.exists = exists; -function isDirectory(fsPath, useStat = false) { - return __awaiter(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); - return stats.isDirectory(); - }); -} -exports.isDirectory = isDirectory; -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports.IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -exports.isRooted = isRooted; -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return __awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield exports.stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = path.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield exports.stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = path.dirname(filePath); - const upperName = path.basename(filePath).toUpperCase(); - for (const actualName of yield exports.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -exports.tryGetExecutablePath = tryGetExecutablePath; -function normalizeSeparators(p) { - p = p || ''; - if (exports.IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -exports.getCmdPath = getCmdPath; -//# sourceMappingURL=io-util.js.map - -/***/ }), - -/***/ 47351: -/***/ (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 __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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(39491); -const childProcess = __importStar(__nccwpck_require__(32081)); -const path = __importStar(__nccwpck_require__(71017)); -const util_1 = __nccwpck_require__(73837); -const ioUtil = __importStar(__nccwpck_require__(81962)); -const exec = util_1.promisify(childProcess.exec); -const execFile = util_1.promisify(childProcess.execFile); -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); -} -exports.cp = cp; -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -exports.mv = mv; -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return __awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another - // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - try { - const cmdPath = ioUtil.getCmdPath(); - if (yield ioUtil.isDirectory(inputPath, true)) { - yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { - env: { inputPath } - }); - } - else { - yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { - env: { inputPath } - }); - } - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - } - // Shelling out fails to remove a symlink folder with missing source, this unlink catches that - try { - yield ioUtil.unlink(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - } - } - else { - let isDir = false; - try { - isDir = yield ioUtil.isDirectory(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - return; - } - if (isDir) { - yield execFile(`rm`, [`-rf`, `${inputPath}`]); - } - else { - yield ioUtil.unlink(inputPath); - } - } - }); -} -exports.rmRF = rmRF; -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - assert_1.ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -exports.mkdirP = mkdirP; -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -exports.which = which; -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(path.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -exports.findInPath = findInPath; -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function copyFile(srcFile, destFile, force) { - return __awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map - -/***/ }), - -/***/ 56664: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const tslib_1 = __nccwpck_require__(4351); -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 ((0, 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__(4351); -const proc = tslib_1.__importStar(__nccwpck_require__(32081)); -const json_path_1 = __nccwpck_require__(48037); -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).getTime() : 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'] = (0, json_path_1.jsonpath)(tokenPathKey, resultObj); - config.expiry = (0, json_path_1.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.ListWatch = void 0; -exports.cacheMapFromList = cacheMapFromList; -exports.deleteItems = deleteItems; -exports.addOrUpdateObject = addOrUpdateObject; -exports.deleteObject = deleteObject; -const api_1 = __nccwpck_require__(56664); -const informer_1 = __nccwpck_require__(88029); -class ListWatch { - constructor(path, watch, listFn, autoStart = true, labelSelector, fieldSelector) { - this.path = path; - this.watch = watch; - this.listFn = listFn; - this.labelSelector = labelSelector; - this.fieldSelector = fieldSelector; - this.objects = new Map(); - 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(informer_1.ADD, cb); - this.on(informer_1.UPDATE, cb); - this.on(informer_1.DELETE, cb); - return; - } - if (this.callbackCache[verb] === undefined) { - throw new Error(`Unknown verb: ${verb}`); - } - this.callbackCache[verb].push(cb); - } - off(verb, cb) { - if (verb === informer_1.CHANGE) { - this.off(informer_1.ADD, cb); - this.off(informer_1.UPDATE, cb); - this.off(informer_1.DELETE, cb); - return; - } - if (this.callbackCache[verb] === undefined) { - throw new Error(`Unknown verb: ${verb}`); - } - const indexToRemove = this.callbackCache[verb].findIndex((cachedCb) => cachedCb === cb); - if (indexToRemove === -1) { - return; - } - this.callbackCache[verb].splice(indexToRemove, 1); - } - get(name, namespace) { - const nsObjects = this.objects.get(namespace || ''); - if (nsObjects) { - return nsObjects.get(name); - } - return undefined; - } - list(namespace) { - if (!namespace) { - const allObjects = []; - for (const nsObjects of this.objects.values()) { - allObjects.push(...nsObjects.values()); - } - return allObjects; - } - const namespaceObjects = this.objects.get(namespace || ''); - if (!namespaceObjects) { - return []; - } - return Array.from(namespaceObjects.values()); - } - latestResourceVersion() { - return this.resourceVersion; - } - _stop() { - if (this.request) { - this.request.removeAllListeners('error'); - this.request.on('error', () => { - // void - errors emitted post-abort are not relevant for us - }); - this.request.abort(); - this.request = undefined; - } - } - async doneHandler(err) { - this._stop(); - if (err && - (err.statusCode === 410 || err.code === 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()); - 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'); - } - if (this.fieldSelector !== undefined) { - queryParams.fieldSelector = api_1.ObjectSerializer.serialize(this.fieldSelector, '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()); - }); - } - async 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()); - break; - case 'DELETED': - deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE].slice()); - break; - case 'BOOKMARK': - // nothing to do, here for documentation, mostly. - break; - case 'ERROR': - await this.doneHandler(obj); - return; - } - this.resourceVersion = obj.metadata.resourceVersion || ''; - } -} -exports.ListWatch = ListWatch; -// exported for testing -function cacheMapFromList(newObjects) { - const objects = new Map(); - // build up the new list - for (const obj of newObjects) { - let namespaceObjects = objects.get(obj.metadata.namespace || ''); - if (!namespaceObjects) { - namespaceObjects = new Map(); - objects.set(obj.metadata.namespace || '', namespaceObjects); - } - const name = obj.metadata.name || ''; - namespaceObjects.set(name, obj); - } - return objects; -} -// external for testing -function deleteItems(oldObjects, newObjects, deleteCallback) { - const newObjectsMap = cacheMapFromList(newObjects); - for (const [namespace, oldNamespaceObjects] of oldObjects.entries()) { - const newNamespaceObjects = newObjectsMap.get(namespace); - if (newNamespaceObjects) { - for (const [name, oldObj] of oldNamespaceObjects.entries()) { - if (!newNamespaceObjects.has(name)) { - oldNamespaceObjects.delete(name); - if (deleteCallback) { - deleteCallback.forEach((fn) => fn(oldObj)); - } - } - } - } - else { - oldObjects.delete(namespace); - oldNamespaceObjects.forEach((obj) => { - if (deleteCallback) { - deleteCallback.forEach((fn) => fn(obj)); - } - }); - } - } - return oldObjects; -} -// Only public for testing. -function addOrUpdateObject(objects, obj, addCallbacks, updateCallbacks) { - let namespaceObjects = objects.get(obj.metadata.namespace || ''); - if (!namespaceObjects) { - namespaceObjects = new Map(); - objects.set(obj.metadata.namespace || '', namespaceObjects); - } - const name = obj.metadata.name || ''; - const found = namespaceObjects.get(name); - if (!found) { - namespaceObjects.set(name, obj); - if (addCallbacks) { - addCallbacks.forEach((elt) => elt(obj)); - } - } - else { - if (!isSameVersion(found, obj)) { - namespaceObjects.set(name, obj); - if (updateCallbacks) { - updateCallbacks.forEach((elt) => elt(obj)); - } - } - } -} -function isSameVersion(o1, o2) { - return (o1.metadata.resourceVersion !== undefined && - o1.metadata.resourceVersion !== null && - o1.metadata.resourceVersion === o2.metadata.resourceVersion); -} -// Public for testing. -function deleteObject(objects, obj, deleteCallbacks) { - const namespace = obj.metadata.namespace || ''; - const name = obj.metadata.name || ''; - const namespaceObjects = objects.get(namespace); - if (!namespaceObjects) { - return; - } - const deleted = namespaceObjects.delete(name); - if (deleted) { - if (deleteCallbacks) { - deleteCallbacks.forEach((elt) => elt(obj)); - } - if (namespaceObjects.size === 0) { - objects.delete(namespace); - } - } -} -//# sourceMappingURL=cache.js.map - -/***/ }), - -/***/ 14958: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Config = exports.KubeConfig = void 0; -exports.makeAbsolutePath = makeAbsolutePath; -exports.bufferFromFileOrString = bufferFromFileOrString; -exports.findHomeDir = findHomeDir; -exports.findObject = findObject; -const tslib_1 = __nccwpck_require__(4351); -const child_process = __nccwpck_require__(32081); -const fs = __nccwpck_require__(57147); -const yaml = __nccwpck_require__(21917); -const net = __nccwpck_require__(41808); -const path = __nccwpck_require__(71017); -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_delayed_1 = __nccwpck_require__(33554); -// fs.existsSync was removed in node 10 -function fileExists(filepath) { - try { - fs.accessSync(filepath); - return true; - } - catch (ignore) { - return false; - } -} -class KubeConfig { - constructor() { - this.authenticators = [ - new azure_auth_1.AzureAuth(), - new gcp_auth_1.GoogleCloudPlatformAuth(), - new exec_auth_1.ExecAuth(), - new file_auth_1.FileAuth(), - new oidc_auth_delayed_1.DelayedOpenIDConnectAuth(), - ]; - 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).toString('utf-8'), opts); - this.makePathsAbsolute(rootDirectory); - } - async applyToHTTPSOptions(opts) { - await this.applyOptions(opts); - const user = this.getCurrentUser(); - if (user && user.username) { - // The ws docs say that it accepts anything that https.RequestOptions accepts, - // but Typescript doesn't understand that idea (yet) probably could be fixed in - // the typings, but for now just cast to any - opts.auth = `${user.username}:${user.password}`; - } - const cluster = this.getCurrentCluster(); - if (cluster && cluster.tlsServerName) { - // The ws docs say that it accepts anything that https.RequestOptions accepts, - // but Typescript doesn't understand that idea (yet) probably could be fixed in - // the typings, but for now just cast to any - opts.servername = cluster.tlsServerName; - } - } - 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, - }; - } - if (cluster && cluster.tlsServerName) { - opts.agentOptions = { servername: cluster.tlsServerName }; - } - } - loadFromString(config, opts) { - const obj = yaml.load(config); - this.clusters = (0, config_types_1.newClusters)(obj.clusters, opts); - this.contexts = (0, config_types_1.newContexts)(obj.contexts, opts); - this.users = (0, 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'; - const tokenFile = process.env.TOKEN_FILE_PATH - ? process.env.TOKEN_FILE_PATH - : `${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`; - const caFile = process.env.KUBERNETES_CA_FILE_PATH - ? process.env.KUBERNETES_CA_FILE_PATH - : `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`; - 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, - server: `${scheme}://${serverHost}:${port}`, - skipTLSVerify: false, - }, - ]; - this.users = [ - { - name: userName, - authProvider: { - name: 'tokenFile', - config: { - tokenFile, - }, - }, - }, - ]; - const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`; - let namespace; - if (fileExists(namespaceFile)) { - namespace = fs.readFileSync(namespaceFile).toString('utf-8'); - } - this.contexts = [ - { - cluster: clusterName, - name: contextName, - user: userName, - namespace, - }, - ]; - this.currentContext = contextName; - } - mergeConfig(config, preserveContext = false) { - if (!preserveContext && config.currentContext) { - 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 = []; - } - if (this.clusters.some((c) => c.name === cluster.name)) { - throw new Error(`Duplicate cluster: ${cluster.name}`); - } - this.clusters.push(cluster); - } - addUser(user) { - if (!this.users) { - this.users = []; - } - if (this.users.some((c) => c.name === user.name)) { - throw new Error(`Duplicate user: ${user.name}`); - } - this.users.push(user); - } - addContext(ctx) { - if (!this.contexts) { - this.contexts = []; - } - if (this.contexts.some((c) => c.name === ctx.name)) { - throw new Error(`Duplicate context: ${ctx.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') { - try { - const envKubeconfigPathResult = child_process.spawnSync('wsl.exe', [ - 'bash', - '-c', - 'printenv KUBECONFIG', - ]); - if (envKubeconfigPathResult.status === 0 && envKubeconfigPathResult.stdout.length > 0) { - const result = child_process.spawnSync('wsl.exe', [ - 'cat', - envKubeconfigPathResult.stdout.toString('utf8'), - ]); - if (result.status === 0) { - this.loadFromString(result.stdout.toString('utf8'), opts); - return; - } - } - } - catch (err) { - // Falling back to default kubeconfig - } - try { - const configResult = child_process.spawnSync('wsl.exe', ['cat', '~/.kube/config']); - if (configResult.status === 0) { - this.loadFromString(configResult.stdout.toString('utf8'), opts); - const result = child_process.spawnSync('wsl.exe', ['wslpath', '-w', '~/.kube']); - if (result.status === 0) { - this.makePathsAbsolute(result.stdout.toString('utf8')); - } - return; - } - } - catch (err) { - // Falling back to alternative auth - } - } - if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH) || - (process.env.TOKEN_FILE_PATH !== undefined && process.env.TOKEN_FILE_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 = this.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; -// 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); -} -// 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; -} -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; -} -// 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; -} -//# sourceMappingURL=config.js.map - -/***/ }), - -/***/ 86218: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ActionOnInvalid = void 0; -exports.newClusters = newClusters; -exports.exportCluster = exportCluster; -exports.newUsers = newUsers; -exports.exportUser = exportUser; -exports.newContexts = newContexts; -exports.exportContext = exportContext; -const tslib_1 = __nccwpck_require__(4351); -const fs = tslib_1.__importStar(__nccwpck_require__(57147)); -var ActionOnInvalid; -(function (ActionOnInvalid) { - ActionOnInvalid["THROW"] = "throw"; - ActionOnInvalid["FILTER"] = "filter"; -})(ActionOnInvalid || (exports.ActionOnInvalid = ActionOnInvalid = {})); -function defaultNewConfigOptions() { - return { - onInvalidEntry: ActionOnInvalid.THROW, - }; -} -function newClusters(a, opts) { - if (!Array.isArray(a)) { - return []; - } - const options = Object.assign(defaultNewConfigOptions(), opts || {}); - return a.map(clusterIterator(options.onInvalidEntry)).filter(Boolean); -} -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, - 'tls-server-name': cluster.tlsServerName, - }, - }; -} -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, - tlsServerName: elt.cluster['tls-server-name'], - }; - } - catch (err) { - switch (onInvalidEntry) { - case ActionOnInvalid.FILTER: - return null; - default: - case ActionOnInvalid.THROW: - throw err; - } - } - }; -} -function newUsers(a, opts) { - if (!Array.isArray(a)) { - return []; - } - const options = Object.assign(defaultNewConfigOptions(), opts || {}); - return a.map(userIterator(options.onInvalidEntry)).filter(Boolean); -} -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, - }, - }; -} -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) { - if (!Array.isArray(a)) { - return []; - } - const options = Object.assign(defaultNewConfigOptions(), opts || {}); - return a.map(contextIterator(options.onInvalidEntry)).filter(Boolean); -} -function exportContext(ctx) { - return { - name: ctx.name, - context: ctx, - }; -} -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__(4351); -const fs = tslib_1.__importStar(__nccwpck_require__(57147)); -const stream_buffers_1 = __nccwpck_require__(48168); -const tar = tslib_1.__importStar(__nccwpck_require__(16630)); -const exec_1 = __nccwpck_require__(62864); -const util_1 = __nccwpck_require__(26318); -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 - * @param {string} [cwd] - The directory that is used as the parent in the pod when downloading - */ - async cpFromPod(namespace, podName, containerName, srcPath, tgtPath, cwd) { - const tmpFileName = await (0, util_1.generateTmpFileName)(); - const command = ['tar', 'zcf', '-']; - if (cwd) { - command.push('-C', cwd); - } - command.push(srcPath); - const writerStream = fs.createWriteStream(tmpFileName); - const errStream = new stream_buffers_1.WritableStreamBuffer(); - return new Promise((resolve, reject) => { - this.execInstance - .exec(namespace, podName, containerName, command, writerStream, errStream, null, false, async ({ status }) => { - try { - writerStream.close(); - if (status === 'Failure' || errStream.size()) { - return reject(new Error(`Error from cpFromPod - details: \n ${errStream.getContentsAsString()}`)); - } - await tar.x({ - file: tmpFileName, - cwd: tgtPath, - }); - resolve(); - } - catch (e) { - reject(e); - } - }) - .catch(reject); - }); - } - /** - * @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 - * @param {string} [cwd] - The directory that is used as the parent in the host when uploading - */ - async cpToPod(namespace, podName, containerName, srcPath, tgtPath, cwd) { - const tmpFileName = await (0, util_1.generateTmpFileName)(); - const command = ['tar', 'xf', '-', '-C', tgtPath]; - await tar.c({ file: tmpFileName, cwd }, [srcPath]); - const readStream = fs.createReadStream(tmpFileName); - const errStream = new stream_buffers_1.WritableStreamBuffer(); - return new Promise((resolve, reject) => { - this.execInstance - .exec(namespace, podName, containerName, command, null, errStream, readStream, false, async ({ status }) => { - await fs.promises.unlink(tmpFileName); - if (status === 'Failure' || errStream.size()) { - reject(new Error(`Error from cpToPod - details: \n ${errStream.getContentsAsString()}`)); - } - else { - resolve(); - } - }) - .catch(reject); - }); - } -} -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 {Promise} A promise that will return the web socket created for this command. - */ - 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 ((0, 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 child_process = __nccwpck_require__(32081); -class ExecAuth { - constructor() { - this.tokenCache = {}; - this.execFn = child_process.spawnSync; - } - 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.status === 0) { - const obj = JSON.parse(result.stdout.toString('utf8')); - this.tokenCache[user.name] = obj; - return obj; - } - throw new Error(result.stderr.toString('utf8')); - } -} -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('utf8'); - 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__(4351); -const proc = tslib_1.__importStar(__nccwpck_require__(32081)); -const json_path_1 = __nccwpck_require__(48037); -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) { - const cmd = config['cmd-path']; - if (!cmd) { - throw new Error('Token is expired!'); - } - const args = (config['cmd-args'] ? config['cmd-args'].split(' ') : []).map((arg) => { - if (arg[0] === "'" || arg[0] === '"') { - return arg.substring(1, arg.length - 1); - } - return arg; - }); - // TODO: Cache to file? - // TODO: do this asynchronously - let output; - try { - output = proc.execFileSync(cmd, args); - } - 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'] = (0, json_path_1.jsonpath)(tokenPathKey, resultObj); - config.expiry = (0, json_path_1.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__(4351); -// 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingAdmissionPolicyBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicyBinding"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingAdmissionPolicy.'); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingAdmissionPolicyBinding.'); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicyList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicyBindingList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingAdmissionPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingAdmissionPolicyBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{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 patchValidatingAdmissionPolicyStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicy(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicyBinding(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicyStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{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 readValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingAdmissionPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingAdmissionPolicyBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingAdmissionPolicyBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{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 replaceValidatingAdmissionPolicyStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingAdmissionPolicy"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 18218: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdmissionregistrationV1alpha1Api = exports.AdmissionregistrationV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 AdmissionregistrationV1alpha1ApiApiKeys; -(function (AdmissionregistrationV1alpha1ApiApiKeys) { - AdmissionregistrationV1alpha1ApiApiKeys[AdmissionregistrationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AdmissionregistrationV1alpha1ApiApiKeys || (exports.AdmissionregistrationV1alpha1ApiApiKeys = AdmissionregistrationV1alpha1ApiApiKeys = {})); -class AdmissionregistrationV1alpha1Api { - 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[AdmissionregistrationV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ValidatingAdmissionPolicyBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingAdmissionPolicy.'); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingAdmissionPolicyBinding.'); - } - 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) => { - (0, request_1.default)(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/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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicyList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicyBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingAdmissionPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingAdmissionPolicyBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{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 patchValidatingAdmissionPolicyStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicy(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicyBinding(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicyStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{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 readValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingAdmissionPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingAdmissionPolicyBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ValidatingAdmissionPolicyBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{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 replaceValidatingAdmissionPolicyStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AdmissionregistrationV1alpha1Api = AdmissionregistrationV1alpha1Api; -//# sourceMappingURL=admissionregistrationV1alpha1Api.js.map - -/***/ }), - -/***/ 62794: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdmissionregistrationV1beta1Api = exports.AdmissionregistrationV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 AdmissionregistrationV1beta1ApiApiKeys; -(function (AdmissionregistrationV1beta1ApiApiKeys) { - AdmissionregistrationV1beta1ApiApiKeys[AdmissionregistrationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AdmissionregistrationV1beta1ApiApiKeys || (exports.AdmissionregistrationV1beta1ApiApiKeys = AdmissionregistrationV1beta1ApiApiKeys = {})); -class AdmissionregistrationV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AdmissionregistrationV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingAdmissionPolicyBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingAdmissionPolicy.'); - } - 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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingAdmissionPolicyBinding.'); - } - 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) => { - (0, request_1.default)(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/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) => { - (0, request_1.default)(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 ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicyList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicyBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingAdmissionPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingAdmissionPolicyBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{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 patchValidatingAdmissionPolicyStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicy(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicyBinding(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readValidatingAdmissionPolicyStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{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 readValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingAdmissionPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ValidatingAdmissionPolicyBinding - * @param name name of the ValidatingAdmissionPolicyBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingAdmissionPolicyBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicyBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingAdmissionPolicyBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicyBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ValidatingAdmissionPolicy - * @param name name of the ValidatingAdmissionPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{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 replaceValidatingAdmissionPolicyStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingAdmissionPolicyStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1ValidatingAdmissionPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1ValidatingAdmissionPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AdmissionregistrationV1beta1Api = AdmissionregistrationV1beta1Api; -//# sourceMappingURL=admissionregistrationV1beta1Api.js.map - -/***/ }), - -/***/ 67758: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createAPIService(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceAPIService(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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__(4351); -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__(18218), exports); -const admissionregistrationV1alpha1Api_1 = __nccwpck_require__(18218); -tslib_1.__exportStar(__nccwpck_require__(62794), exports); -const admissionregistrationV1beta1Api_1 = __nccwpck_require__(62794); -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__(47299), exports); -const authenticationV1alpha1Api_1 = __nccwpck_require__(47299); -tslib_1.__exportStar(__nccwpck_require__(53150), exports); -const authenticationV1beta1Api_1 = __nccwpck_require__(53150); -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__(89445), exports); -const autoscalingV2Api_1 = __nccwpck_require__(89445); -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__(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__(93206), exports); -const certificatesV1alpha1Api_1 = __nccwpck_require__(93206); -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__(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__(16001), exports); -const flowcontrolApiserverApi_1 = __nccwpck_require__(16001); -tslib_1.__exportStar(__nccwpck_require__(37429), exports); -const flowcontrolApiserverV1Api_1 = __nccwpck_require__(37429); -tslib_1.__exportStar(__nccwpck_require__(93407), exports); -const flowcontrolApiserverV1beta3Api_1 = __nccwpck_require__(93407); -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__(72935), exports); -const networkingV1alpha1Api_1 = __nccwpck_require__(72935); -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__(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__(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__(65362), exports); -const resourceApi_1 = __nccwpck_require__(65362); -tslib_1.__exportStar(__nccwpck_require__(49327), exports); -const resourceV1alpha2Api_1 = __nccwpck_require__(49327); -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__(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__(82015), exports); -const storagemigrationApi_1 = __nccwpck_require__(82015); -tslib_1.__exportStar(__nccwpck_require__(7266), exports); -const storagemigrationV1alpha1Api_1 = __nccwpck_require__(7266); -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, admissionregistrationV1alpha1Api_1.AdmissionregistrationV1alpha1Api, admissionregistrationV1beta1Api_1.AdmissionregistrationV1beta1Api, 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, authenticationV1alpha1Api_1.AuthenticationV1alpha1Api, authenticationV1beta1Api_1.AuthenticationV1beta1Api, authorizationApi_1.AuthorizationApi, authorizationV1Api_1.AuthorizationV1Api, autoscalingApi_1.AutoscalingApi, autoscalingV1Api_1.AutoscalingV1Api, autoscalingV2Api_1.AutoscalingV2Api, batchApi_1.BatchApi, batchV1Api_1.BatchV1Api, certificatesApi_1.CertificatesApi, certificatesV1Api_1.CertificatesV1Api, certificatesV1alpha1Api_1.CertificatesV1alpha1Api, coordinationApi_1.CoordinationApi, coordinationV1Api_1.CoordinationV1Api, coreApi_1.CoreApi, coreV1Api_1.CoreV1Api, customObjectsApi_1.CustomObjectsApi, discoveryApi_1.DiscoveryApi, discoveryV1Api_1.DiscoveryV1Api, eventsApi_1.EventsApi, eventsV1Api_1.EventsV1Api, flowcontrolApiserverApi_1.FlowcontrolApiserverApi, flowcontrolApiserverV1Api_1.FlowcontrolApiserverV1Api, flowcontrolApiserverV1beta3Api_1.FlowcontrolApiserverV1beta3Api, internalApiserverApi_1.InternalApiserverApi, internalApiserverV1alpha1Api_1.InternalApiserverV1alpha1Api, logsApi_1.LogsApi, networkingApi_1.NetworkingApi, networkingV1Api_1.NetworkingV1Api, networkingV1alpha1Api_1.NetworkingV1alpha1Api, nodeApi_1.NodeApi, nodeV1Api_1.NodeV1Api, openidApi_1.OpenidApi, policyApi_1.PolicyApi, policyV1Api_1.PolicyV1Api, rbacAuthorizationApi_1.RbacAuthorizationApi, rbacAuthorizationV1Api_1.RbacAuthorizationV1Api, resourceApi_1.ResourceApi, resourceV1alpha2Api_1.ResourceV1alpha2Api, schedulingApi_1.SchedulingApi, schedulingV1Api_1.SchedulingV1Api, storageApi_1.StorageApi, storageV1Api_1.StorageV1Api, storageV1alpha1Api_1.StorageV1alpha1Api, storagemigrationApi_1.StoragemigrationApi, storagemigrationV1alpha1Api_1.StoragemigrationV1alpha1Api, 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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 SelfSubjectReview - * @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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/selfsubjectreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createSelfSubjectReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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, "V1SelfSubjectReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createTokenReview(body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 47299: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthenticationV1alpha1Api = exports.AuthenticationV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 AuthenticationV1alpha1ApiApiKeys; -(function (AuthenticationV1alpha1ApiApiKeys) { - AuthenticationV1alpha1ApiApiKeys[AuthenticationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AuthenticationV1alpha1ApiApiKeys || (exports.AuthenticationV1alpha1ApiApiKeys = AuthenticationV1alpha1ApiApiKeys = {})); -class AuthenticationV1alpha1Api { - 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[AuthenticationV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a SelfSubjectReview - * @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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1alpha1/selfsubjectreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createSelfSubjectReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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, "V1alpha1SelfSubjectReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1SelfSubjectReview"); - 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/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) => { - (0, request_1.default)(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.AuthenticationV1alpha1Api = AuthenticationV1alpha1Api; -//# sourceMappingURL=authenticationV1alpha1Api.js.map - -/***/ }), - -/***/ 53150: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthenticationV1beta1Api = exports.AuthenticationV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 AuthenticationV1beta1ApiApiKeys; -(function (AuthenticationV1beta1ApiApiKeys) { - AuthenticationV1beta1ApiApiKeys[AuthenticationV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AuthenticationV1beta1ApiApiKeys || (exports.AuthenticationV1beta1ApiApiKeys = AuthenticationV1beta1ApiApiKeys = {})); -class AuthenticationV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AuthenticationV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a SelfSubjectReview - * @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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/selfsubjectreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createSelfSubjectReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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, "V1beta1SelfSubjectReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1SelfSubjectReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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.AuthenticationV1beta1Api = AuthenticationV1beta1Api; -//# sourceMappingURL=authenticationV1beta1Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createSelfSubjectAccessReview(body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createSelfSubjectRulesReview(body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createSubjectAccessReview(body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 89445: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AutoscalingV2Api = exports.AutoscalingV2ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 AutoscalingV2ApiApiKeys; -(function (AutoscalingV2ApiApiKeys) { - AutoscalingV2ApiApiKeys[AutoscalingV2ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AutoscalingV2ApiApiKeys || (exports.AutoscalingV2ApiApiKeys = AutoscalingV2ApiApiKeys = {})); -class AutoscalingV2Api { - 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[AutoscalingV2ApiApiKeys[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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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/v2/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) => { - (0, request_1.default)(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/v2/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscalerList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscalerList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AutoscalingV2Api = AutoscalingV2Api; -//# sourceMappingURL=autoscalingV2Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 93206: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CertificatesV1alpha1Api = exports.CertificatesV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 CertificatesV1alpha1ApiApiKeys; -(function (CertificatesV1alpha1ApiApiKeys) { - CertificatesV1alpha1ApiApiKeys[CertificatesV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CertificatesV1alpha1ApiApiKeys || (exports.CertificatesV1alpha1ApiApiKeys = CertificatesV1alpha1ApiApiKeys = {})); -class CertificatesV1alpha1Api { - 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[CertificatesV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a ClusterTrustBundle - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createClusterTrustBundle(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createClusterTrustBundle.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterTrustBundle") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterTrustBundle"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ClusterTrustBundle - * @param name name of the ClusterTrustBundle - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteClusterTrustBundle(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteClusterTrustBundle.'); - } - 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) => { - (0, request_1.default)(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 ClusterTrustBundle - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionClusterTrustBundle(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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/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) => { - (0, request_1.default)(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 ClusterTrustBundle - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listClusterTrustBundle(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterTrustBundleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ClusterTrustBundle - * @param name name of the ClusterTrustBundle - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterTrustBundle.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterTrustBundle.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterTrustBundle"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ClusterTrustBundle - * @param name name of the ClusterTrustBundle - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readClusterTrustBundle(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readClusterTrustBundle.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterTrustBundle"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ClusterTrustBundle - * @param name name of the ClusterTrustBundle - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceClusterTrustBundle(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterTrustBundle.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterTrustBundle.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterTrustBundle") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterTrustBundle"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CertificatesV1alpha1Api = CertificatesV1alpha1Api; -//# sourceMappingURL=certificatesV1alpha1Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. - * @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. - * @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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. - * @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. - * @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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespace(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createNamespacedBinding(namespace, body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedService(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNode(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createPersistentVolume(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 Service - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedService(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, 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 deleteCollectionNamespacedService.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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)); - } - } - }); - }); - }); - } - /** - * 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespace(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async replaceNamespaceFinalize(name, body, dryRun, fieldManager, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNode(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNodeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePersistentVolume(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 37429: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FlowcontrolApiserverV1Api = exports.FlowcontrolApiserverV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 FlowcontrolApiserverV1ApiApiKeys; -(function (FlowcontrolApiserverV1ApiApiKeys) { - FlowcontrolApiserverV1ApiApiKeys[FlowcontrolApiserverV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(FlowcontrolApiserverV1ApiApiKeys || (exports.FlowcontrolApiserverV1ApiApiKeys = FlowcontrolApiserverV1ApiApiKeys = {})); -class FlowcontrolApiserverV1Api { - 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[FlowcontrolApiserverV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createFlowSchema(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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/v1/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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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/v1/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) => { - (0, request_1.default)(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/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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchemaList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfigurationList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readFlowSchema(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readFlowSchemaStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.FlowcontrolApiserverV1Api = FlowcontrolApiserverV1Api; -//# sourceMappingURL=flowcontrolApiserverV1Api.js.map - -/***/ }), - -/***/ 93407: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FlowcontrolApiserverV1beta3Api = exports.FlowcontrolApiserverV1beta3ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 FlowcontrolApiserverV1beta3ApiApiKeys; -(function (FlowcontrolApiserverV1beta3ApiApiKeys) { - FlowcontrolApiserverV1beta3ApiApiKeys[FlowcontrolApiserverV1beta3ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(FlowcontrolApiserverV1beta3ApiApiKeys || (exports.FlowcontrolApiserverV1beta3ApiApiKeys = FlowcontrolApiserverV1beta3ApiApiKeys = {})); -class FlowcontrolApiserverV1beta3Api { - 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[FlowcontrolApiserverV1beta3ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createFlowSchema(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta3FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta3PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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/v1beta3/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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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/v1beta3/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) => { - (0, request_1.default)(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/v1beta3/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchemaList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfigurationList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readFlowSchema(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readFlowSchemaStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta3FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta3FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3FlowSchema"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta3PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta3/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta3PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta3PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.FlowcontrolApiserverV1beta3Api = FlowcontrolApiserverV1beta3Api; -//# sourceMappingURL=flowcontrolApiserverV1beta3Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createStorageVersion(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceStorageVersion(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, 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) => { - (0, 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createIngressClass(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceIngressClass(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 72935: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NetworkingV1alpha1Api = exports.NetworkingV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 NetworkingV1alpha1ApiApiKeys; -(function (NetworkingV1alpha1ApiApiKeys) { - NetworkingV1alpha1ApiApiKeys[NetworkingV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NetworkingV1alpha1ApiApiKeys || (exports.NetworkingV1alpha1ApiApiKeys = NetworkingV1alpha1ApiApiKeys = {})); -class NetworkingV1alpha1Api { - 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[NetworkingV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an IPAddress - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createIPAddress(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createIPAddress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1IPAddress") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1IPAddress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ServiceCIDR - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createServiceCIDR(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createServiceCIDR.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ServiceCIDR") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of IPAddress - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionIPAddress(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ServiceCIDR - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionServiceCIDR(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 IPAddress - * @param name name of the IPAddress - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteIPAddress(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteIPAddress.'); - } - 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) => { - (0, request_1.default)(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 ServiceCIDR - * @param name name of the ServiceCIDR - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteServiceCIDR(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteServiceCIDR.'); - } - 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) => { - (0, request_1.default)(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/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) => { - (0, request_1.default)(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 IPAddress - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listIPAddress(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1IPAddressList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ServiceCIDR - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listServiceCIDR(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDRList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified IPAddress - * @param name name of the IPAddress - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchIPAddress.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchIPAddress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1IPAddress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ServiceCIDR - * @param name name of the ServiceCIDR - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchServiceCIDR.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchServiceCIDR.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ServiceCIDR - * @param name name of the ServiceCIDR - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{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 patchServiceCIDRStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchServiceCIDRStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified IPAddress - * @param name name of the IPAddress - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readIPAddress(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readIPAddress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1IPAddress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ServiceCIDR - * @param name name of the ServiceCIDR - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readServiceCIDR(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readServiceCIDR.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ServiceCIDR - * @param name name of the ServiceCIDR - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readServiceCIDRStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{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 readServiceCIDRStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified IPAddress - * @param name name of the IPAddress - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceIPAddress(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceIPAddress.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceIPAddress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1IPAddress") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1IPAddress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ServiceCIDR - * @param name name of the ServiceCIDR - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceServiceCIDR(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceServiceCIDR.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceServiceCIDR.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ServiceCIDR") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ServiceCIDR - * @param name name of the ServiceCIDR - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceServiceCIDRStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1alpha1/servicecidrs/{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 replaceServiceCIDRStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceServiceCIDRStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ServiceCIDR") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ServiceCIDR"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NetworkingV1alpha1Api = NetworkingV1alpha1Api; -//# sourceMappingURL=networkingV1alpha1Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createRuntimeClass(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createClusterRole(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createClusterRoleBinding(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceClusterRole(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 65362: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResourceApi = exports.ResourceApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 ResourceApiApiKeys; -(function (ResourceApiApiKeys) { - ResourceApiApiKeys[ResourceApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ResourceApiApiKeys || (exports.ResourceApiApiKeys = ResourceApiApiKeys = {})); -class ResourceApi { - 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[ResourceApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.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) => { - (0, request_1.default)(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.ResourceApi = ResourceApi; -//# sourceMappingURL=resourceApi.js.map - -/***/ }), - -/***/ 49327: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResourceV1alpha2Api = exports.ResourceV1alpha2ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 ResourceV1alpha2ApiApiKeys; -(function (ResourceV1alpha2ApiApiKeys) { - ResourceV1alpha2ApiApiKeys[ResourceV1alpha2ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ResourceV1alpha2ApiApiKeys || (exports.ResourceV1alpha2ApiApiKeys = ResourceV1alpha2ApiApiKeys = {})); -class ResourceV1alpha2Api { - 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[ResourceV1alpha2ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedPodSchedulingContext(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodSchedulingContext.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPodSchedulingContext.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2PodSchedulingContext") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedResourceClaim(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceClaim.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaim") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedResourceClaimParameters(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceClaimParameters.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceClaimParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaimParameters") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedResourceClaimTemplate(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceClaimTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaimTemplate") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedResourceClassParameters(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceClassParameters.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceClassParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClassParameters") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ResourceClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createResourceClass(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createResourceClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ResourceSlice - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createResourceSlice(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createResourceSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceSlice") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedPodSchedulingContext(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodSchedulingContext.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedResourceClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceClaim.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedResourceClaimParameters(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceClaimParameters.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedResourceClaimTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceClaimTemplate.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedResourceClassParameters(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceClassParameters.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ResourceClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionResourceClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 ResourceSlice - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionResourceSlice(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteNamespacedPodSchedulingContext(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodSchedulingContext.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodSchedulingContext.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteNamespacedResourceClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceClaim.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete ResourceClaimParameters - * @param name name of the ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteNamespacedResourceClaimParameters(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceClaimParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceClaimParameters.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ResourceClaimTemplate - * @param name name of the ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteNamespacedResourceClaimTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceClaimTemplate.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete ResourceClassParameters - * @param name name of the ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteNamespacedResourceClassParameters(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceClassParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceClassParameters.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ResourceClass - * @param name name of the ResourceClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteResourceClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteResourceClass.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ResourceSlice - * @param name name of the ResourceSlice - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteResourceSlice(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteResourceSlice.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceSlice"); - 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/resource.k8s.io/v1alpha2/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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) => { - (0, request_1.default)(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 PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listNamespacedPodSchedulingContext(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts' - .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 listNamespacedPodSchedulingContext.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContextList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listNamespacedResourceClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims' - .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 listNamespacedResourceClaim.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listNamespacedResourceClaimParameters(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters' - .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 listNamespacedResourceClaimParameters.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParametersList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listNamespacedResourceClaimTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates' - .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 listNamespacedResourceClaimTemplate.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplateList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listNamespacedResourceClassParameters(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters' - .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 listNamespacedResourceClassParameters.'); - } - 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParametersList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodSchedulingContext - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listPodSchedulingContextForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/podschedulingcontexts'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContextList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClaim - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listResourceClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclaims'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClaimParameters - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listResourceClaimParametersForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclaimparameters'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParametersList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClaimTemplate - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listResourceClaimTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclaimtemplates'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplateList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listResourceClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceClassParameters - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listResourceClassParametersForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclassparameters'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParametersList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceSlice - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listResourceSlice(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceSliceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedPodSchedulingContext(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodSchedulingContext.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodSchedulingContext.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodSchedulingContext.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedPodSchedulingContextStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{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 patchNamespacedPodSchedulingContextStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodSchedulingContextStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodSchedulingContextStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceClaim.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceClaimParameters - * @param name name of the ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedResourceClaimParameters(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceClaimParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceClaimParameters.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceClaimParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{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 patchNamespacedResourceClaimStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceClaimStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceClaimStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceClaimTemplate - * @param name name of the ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceClaimTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceClassParameters - * @param name name of the ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchNamespacedResourceClassParameters(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceClassParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceClassParameters.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceClassParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceClass - * @param name name of the ResourceClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchResourceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchResourceClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchResourceClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceSlice - * @param name name of the ResourceSlice - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchResourceSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchResourceSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedPodSchedulingContext(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodSchedulingContext.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodSchedulingContext.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedPodSchedulingContextStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{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 readNamespacedPodSchedulingContextStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodSchedulingContextStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedResourceClaim(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceClaimParameters - * @param name name of the ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedResourceClaimParameters(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceClaimParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceClaimParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedResourceClaimStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{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 readNamespacedResourceClaimStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceClaimStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceClaimTemplate - * @param name name of the ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedResourceClaimTemplate(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceClaimTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceClassParameters - * @param name name of the ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedResourceClassParameters(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceClassParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceClassParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceClass - * @param name name of the ResourceClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readResourceClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readResourceClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceSlice - * @param name name of the ResourceSlice - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readResourceSlice(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readResourceSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodSchedulingContext(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodSchedulingContext.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodSchedulingContext.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodSchedulingContext.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2PodSchedulingContext") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified PodSchedulingContext - * @param name name of the PodSchedulingContext - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedPodSchedulingContextStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{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 replaceNamespacedPodSchedulingContextStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodSchedulingContextStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodSchedulingContextStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2PodSchedulingContext") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2PodSchedulingContext"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceClaim(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceClaim.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaim") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceClaimParameters - * @param name name of the ResourceClaimParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceClaimParameters(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceClaimParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceClaimParameters.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceClaimParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaimParameters") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ResourceClaim - * @param name name of the ResourceClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{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 replaceNamespacedResourceClaimStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceClaimStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceClaimStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaim") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceClaimTemplate - * @param name name of the ResourceClaimTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceClaimTemplate(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceClaimTemplate.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceClaimTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClaimTemplate") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClaimTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceClassParameters - * @param name name of the ResourceClassParameters - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedResourceClassParameters(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceClassParameters.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceClassParameters.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceClassParameters.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClassParameters") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClassParameters"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceClass - * @param name name of the ResourceClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceResourceClass(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceResourceClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceResourceClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceSlice - * @param name name of the ResourceSlice - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceResourceSlice(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceResourceSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceResourceSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha2ResourceSlice") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha2ResourceSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.ResourceV1alpha2Api = ResourceV1alpha2Api; -//# sourceMappingURL=resourceV1alpha2Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createPriorityClass(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replacePriorityClass(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createCSIDriver(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createCSINode(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CSIStorageCapacity") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIStorageCapacity"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createStorageClass(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createVolumeAttachment(body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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/v1/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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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) => { - (0, request_1.default)(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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIStorageCapacityList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIStorageCapacityList"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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, sendInitialEvents, 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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIStorageCapacity"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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, fieldValidation, 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 (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIStorageCapacity"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceCSINode(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CSIStorageCapacity") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIStorageCapacity"); - 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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceStorageClass(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, 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"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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 VolumeAttributesClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createVolumeAttributesClass(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createVolumeAttributesClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttributesClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttributesClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of VolumeAttributesClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionVolumeAttributesClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 VolumeAttributesClass - * @param name name of the VolumeAttributesClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteVolumeAttributesClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttributesClass.'); - } - 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) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttributesClass"); - 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) => { - (0, request_1.default)(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 VolumeAttributesClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listVolumeAttributesClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttributesClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified VolumeAttributesClass - * @param name name of the VolumeAttributesClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchVolumeAttributesClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchVolumeAttributesClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttributesClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified VolumeAttributesClass - * @param name name of the VolumeAttributesClass - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readVolumeAttributesClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readVolumeAttributesClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttributesClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified VolumeAttributesClass - * @param name name of the VolumeAttributesClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceVolumeAttributesClass(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttributesClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttributesClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttributesClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttributesClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.StorageV1alpha1Api = StorageV1alpha1Api; -//# sourceMappingURL=storageV1alpha1Api.js.map - -/***/ }), - -/***/ 82015: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StoragemigrationApi = exports.StoragemigrationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 StoragemigrationApiApiKeys; -(function (StoragemigrationApiApiKeys) { - StoragemigrationApiApiKeys[StoragemigrationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(StoragemigrationApiApiKeys || (exports.StoragemigrationApiApiKeys = StoragemigrationApiApiKeys = {})); -class StoragemigrationApi { - 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[StoragemigrationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.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) => { - (0, request_1.default)(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.StoragemigrationApi = StoragemigrationApi; -//# sourceMappingURL=storagemigrationApi.js.map - -/***/ }), - -/***/ 7266: -/***/ ((__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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StoragemigrationV1alpha1Api = exports.StoragemigrationV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(4351); -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 StoragemigrationV1alpha1ApiApiKeys; -(function (StoragemigrationV1alpha1ApiApiKeys) { - StoragemigrationV1alpha1ApiApiKeys[StoragemigrationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(StoragemigrationV1alpha1ApiApiKeys || (exports.StoragemigrationV1alpha1ApiApiKeys = StoragemigrationV1alpha1ApiApiKeys = {})); -class StoragemigrationV1alpha1Api { - 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[StoragemigrationV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a StorageVersionMigration - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async createStorageVersionMigration(body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give 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 createStorageVersionMigration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersionMigration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of StorageVersionMigration - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionStorageVersionMigration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - 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) => { - (0, request_1.default)(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 StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'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 deleteStorageVersionMigration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteStorageVersionMigration.'); - } - 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) => { - (0, request_1.default)(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/storagemigration.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) => { - (0, request_1.default)(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 StorageVersionMigration - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, 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 sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or 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 listStorageVersionMigration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;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 (sendInitialEvents !== undefined) { - localVarQueryParameters['sendInitialEvents'] = models_1.ObjectSerializer.serialize(sendInitialEvents, "boolean"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigrationList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchStorageVersionMigration(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchStorageVersionMigration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchStorageVersionMigration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - * @param force Force is going to \"force\" 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 patchStorageVersionMigrationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{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 patchStorageVersionMigrationStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchStorageVersionMigrationStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readStorageVersionMigration(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readStorageVersionMigration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - */ - async readStorageVersionMigrationStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{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 readStorageVersionMigrationStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceStorageVersionMigration(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceStorageVersionMigration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionMigration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersionMigration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified StorageVersionMigration - * @param name name of the StorageVersionMigration - * @param body - * @param pretty If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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 fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - */ - async replaceStorageVersionMigrationStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{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 replaceStorageVersionMigrationStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionMigrationStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (fieldValidation !== undefined) { - localVarQueryParameters['fieldValidation'] = models_1.ObjectSerializer.serialize(fieldValidation, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersionMigration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - (0, request_1.default)(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionMigration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.StoragemigrationV1alpha1Api = StoragemigrationV1alpha1Api; -//# sourceMappingURL=storagemigrationV1alpha1Api.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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 = 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) => { - (0, request_1.default)(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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1MicroTime" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1MicroTime" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1MicroTime" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1MicroTime" - } -]; -//# sourceMappingURL=eventsV1EventSeries.js.map - -/***/ }), - -/***/ 71945: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FlowcontrolV1Subject = 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 FlowcontrolV1Subject { - static getAttributeTypeMap() { - return FlowcontrolV1Subject.attributeTypeMap; - } -} -exports.FlowcontrolV1Subject = FlowcontrolV1Subject; -FlowcontrolV1Subject.discriminator = undefined; -FlowcontrolV1Subject.attributeTypeMap = [ - { - "name": "group", - "baseName": "group", - "type": "V1GroupSubject" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "serviceAccount", - "baseName": "serviceAccount", - "type": "V1ServiceAccountSubject" - }, - { - "name": "user", - "baseName": "user", - "type": "V1UserSubject" - } -]; -//# sourceMappingURL=flowcontrolV1Subject.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__(4351); -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__(71945), exports); -tslib_1.__exportStar(__nccwpck_require__(74467), 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__(93682), exports); -tslib_1.__exportStar(__nccwpck_require__(97069), exports); -tslib_1.__exportStar(__nccwpck_require__(9447), 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__(41035), exports); -tslib_1.__exportStar(__nccwpck_require__(65728), 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__(51613), exports); -tslib_1.__exportStar(__nccwpck_require__(33913), exports); -tslib_1.__exportStar(__nccwpck_require__(47851), 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__(14640), 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__(82970), 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__(9731), 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__(19493), 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__(95223), 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__(71263), exports); -tslib_1.__exportStar(__nccwpck_require__(28411), 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__(93162), exports); -tslib_1.__exportStar(__nccwpck_require__(57973), exports); -tslib_1.__exportStar(__nccwpck_require__(88200), exports); -tslib_1.__exportStar(__nccwpck_require__(29306), exports); -tslib_1.__exportStar(__nccwpck_require__(11284), exports); -tslib_1.__exportStar(__nccwpck_require__(31937), exports); -tslib_1.__exportStar(__nccwpck_require__(3439), exports); -tslib_1.__exportStar(__nccwpck_require__(1016), exports); -tslib_1.__exportStar(__nccwpck_require__(51759), 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__(26771), 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__(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__(28890), 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__(37996), exports); -tslib_1.__exportStar(__nccwpck_require__(54769), exports); -tslib_1.__exportStar(__nccwpck_require__(66726), exports); -tslib_1.__exportStar(__nccwpck_require__(89541), exports); -tslib_1.__exportStar(__nccwpck_require__(62476), exports); -tslib_1.__exportStar(__nccwpck_require__(45123), 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__(52926), 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__(25968), exports); -tslib_1.__exportStar(__nccwpck_require__(59345), 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__(48062), exports); -tslib_1.__exportStar(__nccwpck_require__(17650), exports); -tslib_1.__exportStar(__nccwpck_require__(64093), 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__(65285), 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__(87897), exports); -tslib_1.__exportStar(__nccwpck_require__(81563), 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__(79873), 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__(13595), exports); -tslib_1.__exportStar(__nccwpck_require__(71943), 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__(16092), exports); -tslib_1.__exportStar(__nccwpck_require__(6126), exports); -tslib_1.__exportStar(__nccwpck_require__(64507), exports); -tslib_1.__exportStar(__nccwpck_require__(70306), exports); -tslib_1.__exportStar(__nccwpck_require__(76774), exports); -tslib_1.__exportStar(__nccwpck_require__(71948), exports); -tslib_1.__exportStar(__nccwpck_require__(92047), exports); -tslib_1.__exportStar(__nccwpck_require__(84135), exports); -tslib_1.__exportStar(__nccwpck_require__(65763), exports); -tslib_1.__exportStar(__nccwpck_require__(69369), exports); -tslib_1.__exportStar(__nccwpck_require__(63531), 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__(86950), 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__(17551), exports); -tslib_1.__exportStar(__nccwpck_require__(28354), exports); -tslib_1.__exportStar(__nccwpck_require__(33349), exports); -tslib_1.__exportStar(__nccwpck_require__(24471), exports); -tslib_1.__exportStar(__nccwpck_require__(41597), exports); -tslib_1.__exportStar(__nccwpck_require__(50380), exports); -tslib_1.__exportStar(__nccwpck_require__(43933), exports); -tslib_1.__exportStar(__nccwpck_require__(54662), exports); -tslib_1.__exportStar(__nccwpck_require__(43635), 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__(60418), exports); -tslib_1.__exportStar(__nccwpck_require__(10936), exports); -tslib_1.__exportStar(__nccwpck_require__(32647), 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__(26789), exports); -tslib_1.__exportStar(__nccwpck_require__(15598), exports); -tslib_1.__exportStar(__nccwpck_require__(39191), exports); -tslib_1.__exportStar(__nccwpck_require__(50375), exports); -tslib_1.__exportStar(__nccwpck_require__(75445), 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__(68267), 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__(51981), 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__(29126), exports); -tslib_1.__exportStar(__nccwpck_require__(27330), 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__(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__(85010), exports); -tslib_1.__exportStar(__nccwpck_require__(57665), 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__(76417), 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__(49751), exports); -tslib_1.__exportStar(__nccwpck_require__(6602), exports); -tslib_1.__exportStar(__nccwpck_require__(64758), exports); -tslib_1.__exportStar(__nccwpck_require__(95702), exports); -tslib_1.__exportStar(__nccwpck_require__(75476), exports); -tslib_1.__exportStar(__nccwpck_require__(47530), exports); -tslib_1.__exportStar(__nccwpck_require__(26947), exports); -tslib_1.__exportStar(__nccwpck_require__(21688), exports); -tslib_1.__exportStar(__nccwpck_require__(36564), exports); -tslib_1.__exportStar(__nccwpck_require__(6085), exports); -tslib_1.__exportStar(__nccwpck_require__(41226), exports); -tslib_1.__exportStar(__nccwpck_require__(60046), exports); -tslib_1.__exportStar(__nccwpck_require__(45612), 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__(76065), exports); -tslib_1.__exportStar(__nccwpck_require__(43740), exports); -tslib_1.__exportStar(__nccwpck_require__(23505), 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__(37931), 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__(83891), 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__(20227), exports); -tslib_1.__exportStar(__nccwpck_require__(77151), exports); -tslib_1.__exportStar(__nccwpck_require__(82469), exports); -tslib_1.__exportStar(__nccwpck_require__(82835), exports); -tslib_1.__exportStar(__nccwpck_require__(89682), exports); -tslib_1.__exportStar(__nccwpck_require__(36113), exports); -tslib_1.__exportStar(__nccwpck_require__(28363), exports); -tslib_1.__exportStar(__nccwpck_require__(66867), exports); -tslib_1.__exportStar(__nccwpck_require__(77594), exports); -tslib_1.__exportStar(__nccwpck_require__(79007), exports); -tslib_1.__exportStar(__nccwpck_require__(4249), exports); -tslib_1.__exportStar(__nccwpck_require__(45886), exports); -tslib_1.__exportStar(__nccwpck_require__(18406), exports); -tslib_1.__exportStar(__nccwpck_require__(94904), exports); -tslib_1.__exportStar(__nccwpck_require__(80464), exports); -tslib_1.__exportStar(__nccwpck_require__(92300), exports); -tslib_1.__exportStar(__nccwpck_require__(51249), exports); -tslib_1.__exportStar(__nccwpck_require__(86145), exports); -tslib_1.__exportStar(__nccwpck_require__(47647), exports); -tslib_1.__exportStar(__nccwpck_require__(57721), exports); -tslib_1.__exportStar(__nccwpck_require__(87757), exports); -tslib_1.__exportStar(__nccwpck_require__(75514), exports); -tslib_1.__exportStar(__nccwpck_require__(34872), 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__(74189), exports); -tslib_1.__exportStar(__nccwpck_require__(31642), exports); -tslib_1.__exportStar(__nccwpck_require__(94424), exports); -tslib_1.__exportStar(__nccwpck_require__(48629), exports); -tslib_1.__exportStar(__nccwpck_require__(20970), exports); -tslib_1.__exportStar(__nccwpck_require__(49625), exports); -tslib_1.__exportStar(__nccwpck_require__(22708), exports); -tslib_1.__exportStar(__nccwpck_require__(42344), exports); -tslib_1.__exportStar(__nccwpck_require__(1818), exports); -tslib_1.__exportStar(__nccwpck_require__(37630), exports); -tslib_1.__exportStar(__nccwpck_require__(82371), exports); -tslib_1.__exportStar(__nccwpck_require__(42500), exports); -tslib_1.__exportStar(__nccwpck_require__(18643), exports); -tslib_1.__exportStar(__nccwpck_require__(15408), exports); -tslib_1.__exportStar(__nccwpck_require__(30258), exports); -tslib_1.__exportStar(__nccwpck_require__(21387), exports); -tslib_1.__exportStar(__nccwpck_require__(30612), exports); -tslib_1.__exportStar(__nccwpck_require__(8418), exports); -tslib_1.__exportStar(__nccwpck_require__(63409), exports); -tslib_1.__exportStar(__nccwpck_require__(47392), exports); -tslib_1.__exportStar(__nccwpck_require__(17489), exports); -tslib_1.__exportStar(__nccwpck_require__(46566), exports); -tslib_1.__exportStar(__nccwpck_require__(78048), exports); -tslib_1.__exportStar(__nccwpck_require__(72020), exports); -tslib_1.__exportStar(__nccwpck_require__(56013), exports); -tslib_1.__exportStar(__nccwpck_require__(49410), exports); -tslib_1.__exportStar(__nccwpck_require__(45246), exports); -tslib_1.__exportStar(__nccwpck_require__(45766), exports); -tslib_1.__exportStar(__nccwpck_require__(80281), exports); -tslib_1.__exportStar(__nccwpck_require__(55814), exports); -tslib_1.__exportStar(__nccwpck_require__(14899), exports); -tslib_1.__exportStar(__nccwpck_require__(91973), exports); -tslib_1.__exportStar(__nccwpck_require__(34941), exports); -tslib_1.__exportStar(__nccwpck_require__(66084), exports); -tslib_1.__exportStar(__nccwpck_require__(15778), exports); -tslib_1.__exportStar(__nccwpck_require__(58433), exports); -tslib_1.__exportStar(__nccwpck_require__(62053), exports); -tslib_1.__exportStar(__nccwpck_require__(63497), exports); -tslib_1.__exportStar(__nccwpck_require__(26858), exports); -tslib_1.__exportStar(__nccwpck_require__(33605), exports); -tslib_1.__exportStar(__nccwpck_require__(82696), exports); -tslib_1.__exportStar(__nccwpck_require__(93392), exports); -tslib_1.__exportStar(__nccwpck_require__(69167), exports); -tslib_1.__exportStar(__nccwpck_require__(68931), exports); -tslib_1.__exportStar(__nccwpck_require__(92611), exports); -tslib_1.__exportStar(__nccwpck_require__(43575), exports); -tslib_1.__exportStar(__nccwpck_require__(95891), exports); -tslib_1.__exportStar(__nccwpck_require__(94772), exports); -tslib_1.__exportStar(__nccwpck_require__(33686), exports); -tslib_1.__exportStar(__nccwpck_require__(51614), exports); -tslib_1.__exportStar(__nccwpck_require__(98163), exports); -tslib_1.__exportStar(__nccwpck_require__(33973), exports); -tslib_1.__exportStar(__nccwpck_require__(15081), exports); -tslib_1.__exportStar(__nccwpck_require__(41825), exports); -tslib_1.__exportStar(__nccwpck_require__(61710), exports); -tslib_1.__exportStar(__nccwpck_require__(27547), exports); -tslib_1.__exportStar(__nccwpck_require__(17892), exports); -tslib_1.__exportStar(__nccwpck_require__(25403), exports); -tslib_1.__exportStar(__nccwpck_require__(48677), exports); -tslib_1.__exportStar(__nccwpck_require__(25098), exports); -tslib_1.__exportStar(__nccwpck_require__(41414), exports); -tslib_1.__exportStar(__nccwpck_require__(73676), exports); -tslib_1.__exportStar(__nccwpck_require__(39984), exports); -tslib_1.__exportStar(__nccwpck_require__(10888), exports); -tslib_1.__exportStar(__nccwpck_require__(23559), exports); -tslib_1.__exportStar(__nccwpck_require__(88135), exports); -tslib_1.__exportStar(__nccwpck_require__(97375), exports); -tslib_1.__exportStar(__nccwpck_require__(7703), exports); -tslib_1.__exportStar(__nccwpck_require__(81921), exports); -tslib_1.__exportStar(__nccwpck_require__(85322), exports); -tslib_1.__exportStar(__nccwpck_require__(75053), exports); -tslib_1.__exportStar(__nccwpck_require__(65816), exports); -tslib_1.__exportStar(__nccwpck_require__(6185), exports); -tslib_1.__exportStar(__nccwpck_require__(43070), exports); -tslib_1.__exportStar(__nccwpck_require__(1684), exports); -tslib_1.__exportStar(__nccwpck_require__(26614), exports); -tslib_1.__exportStar(__nccwpck_require__(85932), exports); -tslib_1.__exportStar(__nccwpck_require__(98402), exports); -tslib_1.__exportStar(__nccwpck_require__(24479), exports); -tslib_1.__exportStar(__nccwpck_require__(2817), exports); -tslib_1.__exportStar(__nccwpck_require__(31763), exports); -tslib_1.__exportStar(__nccwpck_require__(10058), exports); -tslib_1.__exportStar(__nccwpck_require__(87274), exports); -tslib_1.__exportStar(__nccwpck_require__(27852), exports); -tslib_1.__exportStar(__nccwpck_require__(99260), exports); -tslib_1.__exportStar(__nccwpck_require__(37063), exports); -tslib_1.__exportStar(__nccwpck_require__(4330), exports); -tslib_1.__exportStar(__nccwpck_require__(96416), exports); -tslib_1.__exportStar(__nccwpck_require__(15348), exports); -tslib_1.__exportStar(__nccwpck_require__(95815), exports); -tslib_1.__exportStar(__nccwpck_require__(34250), exports); -tslib_1.__exportStar(__nccwpck_require__(61644), exports); -tslib_1.__exportStar(__nccwpck_require__(92841), exports); -tslib_1.__exportStar(__nccwpck_require__(67034), exports); -tslib_1.__exportStar(__nccwpck_require__(61546), exports); -tslib_1.__exportStar(__nccwpck_require__(56895), exports); -tslib_1.__exportStar(__nccwpck_require__(98511), exports); -tslib_1.__exportStar(__nccwpck_require__(60687), exports); -tslib_1.__exportStar(__nccwpck_require__(7662), exports); -tslib_1.__exportStar(__nccwpck_require__(73367), exports); -tslib_1.__exportStar(__nccwpck_require__(48810), exports); -tslib_1.__exportStar(__nccwpck_require__(84465), exports); -tslib_1.__exportStar(__nccwpck_require__(12502), exports); -tslib_1.__exportStar(__nccwpck_require__(49423), exports); -tslib_1.__exportStar(__nccwpck_require__(32736), exports); -tslib_1.__exportStar(__nccwpck_require__(24903), exports); -tslib_1.__exportStar(__nccwpck_require__(57461), exports); -tslib_1.__exportStar(__nccwpck_require__(47522), exports); -tslib_1.__exportStar(__nccwpck_require__(38164), exports); -tslib_1.__exportStar(__nccwpck_require__(73973), exports); -tslib_1.__exportStar(__nccwpck_require__(31046), exports); -tslib_1.__exportStar(__nccwpck_require__(63959), exports); -tslib_1.__exportStar(__nccwpck_require__(47587), exports); -tslib_1.__exportStar(__nccwpck_require__(35575), exports); -tslib_1.__exportStar(__nccwpck_require__(75979), exports); -tslib_1.__exportStar(__nccwpck_require__(66979), exports); -tslib_1.__exportStar(__nccwpck_require__(9547), exports); -tslib_1.__exportStar(__nccwpck_require__(81129), exports); -tslib_1.__exportStar(__nccwpck_require__(21470), exports); -tslib_1.__exportStar(__nccwpck_require__(3052), exports); -tslib_1.__exportStar(__nccwpck_require__(28295), exports); -tslib_1.__exportStar(__nccwpck_require__(32774), 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 flowcontrolV1Subject_1 = __nccwpck_require__(71945); -const rbacV1Subject_1 = __nccwpck_require__(74467); -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 v1AppArmorProfile_1 = __nccwpck_require__(93682); -const v1AttachedVolume_1 = __nccwpck_require__(97069); -const v1AuditAnnotation_1 = __nccwpck_require__(9447); -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 v1CSIStorageCapacity_1 = __nccwpck_require__(41035); -const v1CSIStorageCapacityList_1 = __nccwpck_require__(65728); -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 v1ClaimSource_1 = __nccwpck_require__(51613); -const v1ClientIPConfig_1 = __nccwpck_require__(33913); -const v1ClusterRole_1 = __nccwpck_require__(47851); -const v1ClusterRoleBinding_1 = __nccwpck_require__(32315); -const v1ClusterRoleBindingList_1 = __nccwpck_require__(21181); -const v1ClusterRoleList_1 = __nccwpck_require__(95532); -const v1ClusterTrustBundleProjection_1 = __nccwpck_require__(14640); -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 v1ContainerResizePolicy_1 = __nccwpck_require__(82970); -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__(9731); -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__(19493); -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__(95223); -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 v1ExemptPriorityLevelConfiguration_1 = __nccwpck_require__(71263); -const v1ExpressionWarning_1 = __nccwpck_require__(28411); -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 v1FlowDistinguisherMethod_1 = __nccwpck_require__(93162); -const v1FlowSchema_1 = __nccwpck_require__(57973); -const v1FlowSchemaCondition_1 = __nccwpck_require__(88200); -const v1FlowSchemaList_1 = __nccwpck_require__(29306); -const v1FlowSchemaSpec_1 = __nccwpck_require__(11284); -const v1FlowSchemaStatus_1 = __nccwpck_require__(31937); -const v1ForZone_1 = __nccwpck_require__(3439); -const v1GCEPersistentDiskVolumeSource_1 = __nccwpck_require__(1016); -const v1GRPCAction_1 = __nccwpck_require__(51759); -const v1GitRepoVolumeSource_1 = __nccwpck_require__(27584); -const v1GlusterfsPersistentVolumeSource_1 = __nccwpck_require__(97617); -const v1GlusterfsVolumeSource_1 = __nccwpck_require__(37426); -const v1GroupSubject_1 = __nccwpck_require__(26771); -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 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 v1HostIP_1 = __nccwpck_require__(28890); -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 v1IngressLoadBalancerIngress_1 = __nccwpck_require__(37996); -const v1IngressLoadBalancerStatus_1 = __nccwpck_require__(54769); -const v1IngressPortStatus_1 = __nccwpck_require__(66726); -const v1IngressRule_1 = __nccwpck_require__(89541); -const v1IngressServiceBackend_1 = __nccwpck_require__(62476); -const v1IngressSpec_1 = __nccwpck_require__(45123); -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 v1LifecycleHandler_1 = __nccwpck_require__(52926); -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 v1LimitResponse_1 = __nccwpck_require__(25968); -const v1LimitedPriorityLevelConfiguration_1 = __nccwpck_require__(59345); -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 v1MatchCondition_1 = __nccwpck_require__(48062); -const v1MatchResources_1 = __nccwpck_require__(17650); -const v1ModifyVolumeStatus_1 = __nccwpck_require__(64093); -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 v1NamedRuleWithOperations_1 = __nccwpck_require__(65285); -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 v1NodeRuntimeHandler_1 = __nccwpck_require__(87897); -const v1NodeRuntimeHandlerFeatures_1 = __nccwpck_require__(81563); -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 v1NonResourcePolicyRule_1 = __nccwpck_require__(79873); -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 v1ParamKind_1 = __nccwpck_require__(13595); -const v1ParamRef_1 = __nccwpck_require__(71943); -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 v1PodFailurePolicy_1 = __nccwpck_require__(16092); -const v1PodFailurePolicyOnExitCodesRequirement_1 = __nccwpck_require__(6126); -const v1PodFailurePolicyOnPodConditionsPattern_1 = __nccwpck_require__(64507); -const v1PodFailurePolicyRule_1 = __nccwpck_require__(70306); -const v1PodIP_1 = __nccwpck_require__(76774); -const v1PodList_1 = __nccwpck_require__(71948); -const v1PodOS_1 = __nccwpck_require__(92047); -const v1PodReadinessGate_1 = __nccwpck_require__(84135); -const v1PodResourceClaim_1 = __nccwpck_require__(65763); -const v1PodResourceClaimStatus_1 = __nccwpck_require__(69369); -const v1PodSchedulingGate_1 = __nccwpck_require__(63531); -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 v1PolicyRulesWithSubjects_1 = __nccwpck_require__(86950); -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 v1PriorityLevelConfiguration_1 = __nccwpck_require__(17551); -const v1PriorityLevelConfigurationCondition_1 = __nccwpck_require__(28354); -const v1PriorityLevelConfigurationList_1 = __nccwpck_require__(33349); -const v1PriorityLevelConfigurationReference_1 = __nccwpck_require__(24471); -const v1PriorityLevelConfigurationSpec_1 = __nccwpck_require__(41597); -const v1PriorityLevelConfigurationStatus_1 = __nccwpck_require__(50380); -const v1Probe_1 = __nccwpck_require__(43933); -const v1ProjectedVolumeSource_1 = __nccwpck_require__(54662); -const v1QueuingConfiguration_1 = __nccwpck_require__(43635); -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 v1ResourceClaim_1 = __nccwpck_require__(60418); -const v1ResourceFieldSelector_1 = __nccwpck_require__(10936); -const v1ResourcePolicyRule_1 = __nccwpck_require__(32647); -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 v1SelectableField_1 = __nccwpck_require__(26789); -const v1SelfSubjectAccessReview_1 = __nccwpck_require__(15598); -const v1SelfSubjectAccessReviewSpec_1 = __nccwpck_require__(39191); -const v1SelfSubjectReview_1 = __nccwpck_require__(50375); -const v1SelfSubjectReviewStatus_1 = __nccwpck_require__(75445); -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 v1ServiceAccountSubject_1 = __nccwpck_require__(68267); -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 v1SleepAction_1 = __nccwpck_require__(51981); -const v1StatefulSet_1 = __nccwpck_require__(76275); -const v1StatefulSetCondition_1 = __nccwpck_require__(49545); -const v1StatefulSetList_1 = __nccwpck_require__(9927); -const v1StatefulSetOrdinals_1 = __nccwpck_require__(29126); -const v1StatefulSetPersistentVolumeClaimRetentionPolicy_1 = __nccwpck_require__(27330); -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 v1SubjectAccessReview_1 = __nccwpck_require__(87717); -const v1SubjectAccessReviewSpec_1 = __nccwpck_require__(34417); -const v1SubjectAccessReviewStatus_1 = __nccwpck_require__(62967); -const v1SubjectRulesReviewStatus_1 = __nccwpck_require__(41434); -const v1SuccessPolicy_1 = __nccwpck_require__(85010); -const v1SuccessPolicyRule_1 = __nccwpck_require__(57665); -const v1Sysctl_1 = __nccwpck_require__(55885); -const v1TCPSocketAction_1 = __nccwpck_require__(20317); -const v1Taint_1 = __nccwpck_require__(65055); -const v1TokenRequestSpec_1 = __nccwpck_require__(76417); -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 v1TypeChecking_1 = __nccwpck_require__(49751); -const v1TypedLocalObjectReference_1 = __nccwpck_require__(6602); -const v1TypedObjectReference_1 = __nccwpck_require__(64758); -const v1UncountedTerminatedPods_1 = __nccwpck_require__(95702); -const v1UserInfo_1 = __nccwpck_require__(75476); -const v1UserSubject_1 = __nccwpck_require__(47530); -const v1ValidatingAdmissionPolicy_1 = __nccwpck_require__(26947); -const v1ValidatingAdmissionPolicyBinding_1 = __nccwpck_require__(21688); -const v1ValidatingAdmissionPolicyBindingList_1 = __nccwpck_require__(36564); -const v1ValidatingAdmissionPolicyBindingSpec_1 = __nccwpck_require__(6085); -const v1ValidatingAdmissionPolicyList_1 = __nccwpck_require__(41226); -const v1ValidatingAdmissionPolicySpec_1 = __nccwpck_require__(60046); -const v1ValidatingAdmissionPolicyStatus_1 = __nccwpck_require__(45612); -const v1ValidatingWebhook_1 = __nccwpck_require__(67027); -const v1ValidatingWebhookConfiguration_1 = __nccwpck_require__(98205); -const v1ValidatingWebhookConfigurationList_1 = __nccwpck_require__(3099); -const v1Validation_1 = __nccwpck_require__(76065); -const v1ValidationRule_1 = __nccwpck_require__(43740); -const v1Variable_1 = __nccwpck_require__(23505); -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 v1VolumeMountStatus_1 = __nccwpck_require__(37931); -const v1VolumeNodeAffinity_1 = __nccwpck_require__(33698); -const v1VolumeNodeResources_1 = __nccwpck_require__(3991); -const v1VolumeProjection_1 = __nccwpck_require__(59985); -const v1VolumeResourceRequirements_1 = __nccwpck_require__(83891); -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 v1alpha1AuditAnnotation_1 = __nccwpck_require__(20227); -const v1alpha1ClusterTrustBundle_1 = __nccwpck_require__(77151); -const v1alpha1ClusterTrustBundleList_1 = __nccwpck_require__(82469); -const v1alpha1ClusterTrustBundleSpec_1 = __nccwpck_require__(82835); -const v1alpha1ExpressionWarning_1 = __nccwpck_require__(89682); -const v1alpha1GroupVersionResource_1 = __nccwpck_require__(36113); -const v1alpha1IPAddress_1 = __nccwpck_require__(28363); -const v1alpha1IPAddressList_1 = __nccwpck_require__(66867); -const v1alpha1IPAddressSpec_1 = __nccwpck_require__(77594); -const v1alpha1MatchCondition_1 = __nccwpck_require__(79007); -const v1alpha1MatchResources_1 = __nccwpck_require__(4249); -const v1alpha1MigrationCondition_1 = __nccwpck_require__(45886); -const v1alpha1NamedRuleWithOperations_1 = __nccwpck_require__(18406); -const v1alpha1ParamKind_1 = __nccwpck_require__(94904); -const v1alpha1ParamRef_1 = __nccwpck_require__(80464); -const v1alpha1ParentReference_1 = __nccwpck_require__(92300); -const v1alpha1SelfSubjectReview_1 = __nccwpck_require__(51249); -const v1alpha1SelfSubjectReviewStatus_1 = __nccwpck_require__(86145); -const v1alpha1ServerStorageVersion_1 = __nccwpck_require__(47647); -const v1alpha1ServiceCIDR_1 = __nccwpck_require__(57721); -const v1alpha1ServiceCIDRList_1 = __nccwpck_require__(87757); -const v1alpha1ServiceCIDRSpec_1 = __nccwpck_require__(75514); -const v1alpha1ServiceCIDRStatus_1 = __nccwpck_require__(34872); -const v1alpha1StorageVersion_1 = __nccwpck_require__(54349); -const v1alpha1StorageVersionCondition_1 = __nccwpck_require__(20058); -const v1alpha1StorageVersionList_1 = __nccwpck_require__(53792); -const v1alpha1StorageVersionMigration_1 = __nccwpck_require__(74189); -const v1alpha1StorageVersionMigrationList_1 = __nccwpck_require__(31642); -const v1alpha1StorageVersionMigrationSpec_1 = __nccwpck_require__(94424); -const v1alpha1StorageVersionMigrationStatus_1 = __nccwpck_require__(48629); -const v1alpha1StorageVersionStatus_1 = __nccwpck_require__(20970); -const v1alpha1TypeChecking_1 = __nccwpck_require__(49625); -const v1alpha1ValidatingAdmissionPolicy_1 = __nccwpck_require__(22708); -const v1alpha1ValidatingAdmissionPolicyBinding_1 = __nccwpck_require__(42344); -const v1alpha1ValidatingAdmissionPolicyBindingList_1 = __nccwpck_require__(1818); -const v1alpha1ValidatingAdmissionPolicyBindingSpec_1 = __nccwpck_require__(37630); -const v1alpha1ValidatingAdmissionPolicyList_1 = __nccwpck_require__(82371); -const v1alpha1ValidatingAdmissionPolicySpec_1 = __nccwpck_require__(42500); -const v1alpha1ValidatingAdmissionPolicyStatus_1 = __nccwpck_require__(18643); -const v1alpha1Validation_1 = __nccwpck_require__(15408); -const v1alpha1Variable_1 = __nccwpck_require__(30258); -const v1alpha1VolumeAttributesClass_1 = __nccwpck_require__(21387); -const v1alpha1VolumeAttributesClassList_1 = __nccwpck_require__(30612); -const v1alpha2AllocationResult_1 = __nccwpck_require__(8418); -const v1alpha2DriverAllocationResult_1 = __nccwpck_require__(63409); -const v1alpha2DriverRequests_1 = __nccwpck_require__(47392); -const v1alpha2NamedResourcesAllocationResult_1 = __nccwpck_require__(17489); -const v1alpha2NamedResourcesAttribute_1 = __nccwpck_require__(46566); -const v1alpha2NamedResourcesFilter_1 = __nccwpck_require__(78048); -const v1alpha2NamedResourcesInstance_1 = __nccwpck_require__(72020); -const v1alpha2NamedResourcesIntSlice_1 = __nccwpck_require__(56013); -const v1alpha2NamedResourcesRequest_1 = __nccwpck_require__(49410); -const v1alpha2NamedResourcesResources_1 = __nccwpck_require__(45246); -const v1alpha2NamedResourcesStringSlice_1 = __nccwpck_require__(45766); -const v1alpha2PodSchedulingContext_1 = __nccwpck_require__(80281); -const v1alpha2PodSchedulingContextList_1 = __nccwpck_require__(55814); -const v1alpha2PodSchedulingContextSpec_1 = __nccwpck_require__(14899); -const v1alpha2PodSchedulingContextStatus_1 = __nccwpck_require__(91973); -const v1alpha2ResourceClaim_1 = __nccwpck_require__(34941); -const v1alpha2ResourceClaimConsumerReference_1 = __nccwpck_require__(66084); -const v1alpha2ResourceClaimList_1 = __nccwpck_require__(15778); -const v1alpha2ResourceClaimParameters_1 = __nccwpck_require__(58433); -const v1alpha2ResourceClaimParametersList_1 = __nccwpck_require__(62053); -const v1alpha2ResourceClaimParametersReference_1 = __nccwpck_require__(63497); -const v1alpha2ResourceClaimSchedulingStatus_1 = __nccwpck_require__(26858); -const v1alpha2ResourceClaimSpec_1 = __nccwpck_require__(33605); -const v1alpha2ResourceClaimStatus_1 = __nccwpck_require__(82696); -const v1alpha2ResourceClaimTemplate_1 = __nccwpck_require__(93392); -const v1alpha2ResourceClaimTemplateList_1 = __nccwpck_require__(69167); -const v1alpha2ResourceClaimTemplateSpec_1 = __nccwpck_require__(68931); -const v1alpha2ResourceClass_1 = __nccwpck_require__(92611); -const v1alpha2ResourceClassList_1 = __nccwpck_require__(43575); -const v1alpha2ResourceClassParameters_1 = __nccwpck_require__(95891); -const v1alpha2ResourceClassParametersList_1 = __nccwpck_require__(94772); -const v1alpha2ResourceClassParametersReference_1 = __nccwpck_require__(33686); -const v1alpha2ResourceFilter_1 = __nccwpck_require__(51614); -const v1alpha2ResourceHandle_1 = __nccwpck_require__(98163); -const v1alpha2ResourceRequest_1 = __nccwpck_require__(33973); -const v1alpha2ResourceSlice_1 = __nccwpck_require__(15081); -const v1alpha2ResourceSliceList_1 = __nccwpck_require__(41825); -const v1alpha2StructuredResourceHandle_1 = __nccwpck_require__(61710); -const v1alpha2VendorParameters_1 = __nccwpck_require__(27547); -const v1beta1AuditAnnotation_1 = __nccwpck_require__(17892); -const v1beta1ExpressionWarning_1 = __nccwpck_require__(25403); -const v1beta1MatchCondition_1 = __nccwpck_require__(48677); -const v1beta1MatchResources_1 = __nccwpck_require__(25098); -const v1beta1NamedRuleWithOperations_1 = __nccwpck_require__(41414); -const v1beta1ParamKind_1 = __nccwpck_require__(73676); -const v1beta1ParamRef_1 = __nccwpck_require__(39984); -const v1beta1SelfSubjectReview_1 = __nccwpck_require__(10888); -const v1beta1SelfSubjectReviewStatus_1 = __nccwpck_require__(23559); -const v1beta1TypeChecking_1 = __nccwpck_require__(88135); -const v1beta1ValidatingAdmissionPolicy_1 = __nccwpck_require__(97375); -const v1beta1ValidatingAdmissionPolicyBinding_1 = __nccwpck_require__(7703); -const v1beta1ValidatingAdmissionPolicyBindingList_1 = __nccwpck_require__(81921); -const v1beta1ValidatingAdmissionPolicyBindingSpec_1 = __nccwpck_require__(85322); -const v1beta1ValidatingAdmissionPolicyList_1 = __nccwpck_require__(75053); -const v1beta1ValidatingAdmissionPolicySpec_1 = __nccwpck_require__(65816); -const v1beta1ValidatingAdmissionPolicyStatus_1 = __nccwpck_require__(6185); -const v1beta1Validation_1 = __nccwpck_require__(43070); -const v1beta1Variable_1 = __nccwpck_require__(1684); -const v1beta3ExemptPriorityLevelConfiguration_1 = __nccwpck_require__(26614); -const v1beta3FlowDistinguisherMethod_1 = __nccwpck_require__(85932); -const v1beta3FlowSchema_1 = __nccwpck_require__(98402); -const v1beta3FlowSchemaCondition_1 = __nccwpck_require__(24479); -const v1beta3FlowSchemaList_1 = __nccwpck_require__(2817); -const v1beta3FlowSchemaSpec_1 = __nccwpck_require__(31763); -const v1beta3FlowSchemaStatus_1 = __nccwpck_require__(10058); -const v1beta3GroupSubject_1 = __nccwpck_require__(87274); -const v1beta3LimitResponse_1 = __nccwpck_require__(27852); -const v1beta3LimitedPriorityLevelConfiguration_1 = __nccwpck_require__(99260); -const v1beta3NonResourcePolicyRule_1 = __nccwpck_require__(37063); -const v1beta3PolicyRulesWithSubjects_1 = __nccwpck_require__(4330); -const v1beta3PriorityLevelConfiguration_1 = __nccwpck_require__(96416); -const v1beta3PriorityLevelConfigurationCondition_1 = __nccwpck_require__(15348); -const v1beta3PriorityLevelConfigurationList_1 = __nccwpck_require__(95815); -const v1beta3PriorityLevelConfigurationReference_1 = __nccwpck_require__(34250); -const v1beta3PriorityLevelConfigurationSpec_1 = __nccwpck_require__(61644); -const v1beta3PriorityLevelConfigurationStatus_1 = __nccwpck_require__(92841); -const v1beta3QueuingConfiguration_1 = __nccwpck_require__(67034); -const v1beta3ResourcePolicyRule_1 = __nccwpck_require__(61546); -const v1beta3ServiceAccountSubject_1 = __nccwpck_require__(56895); -const v1beta3Subject_1 = __nccwpck_require__(98511); -const v1beta3UserSubject_1 = __nccwpck_require__(60687); -const v2ContainerResourceMetricSource_1 = __nccwpck_require__(7662); -const v2ContainerResourceMetricStatus_1 = __nccwpck_require__(73367); -const v2CrossVersionObjectReference_1 = __nccwpck_require__(48810); -const v2ExternalMetricSource_1 = __nccwpck_require__(84465); -const v2ExternalMetricStatus_1 = __nccwpck_require__(12502); -const v2HPAScalingPolicy_1 = __nccwpck_require__(49423); -const v2HPAScalingRules_1 = __nccwpck_require__(32736); -const v2HorizontalPodAutoscaler_1 = __nccwpck_require__(24903); -const v2HorizontalPodAutoscalerBehavior_1 = __nccwpck_require__(57461); -const v2HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(47522); -const v2HorizontalPodAutoscalerList_1 = __nccwpck_require__(38164); -const v2HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(73973); -const v2HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(31046); -const v2MetricIdentifier_1 = __nccwpck_require__(63959); -const v2MetricSpec_1 = __nccwpck_require__(47587); -const v2MetricStatus_1 = __nccwpck_require__(35575); -const v2MetricTarget_1 = __nccwpck_require__(75979); -const v2MetricValueStatus_1 = __nccwpck_require__(66979); -const v2ObjectMetricSource_1 = __nccwpck_require__(9547); -const v2ObjectMetricStatus_1 = __nccwpck_require__(81129); -const v2PodsMetricSource_1 = __nccwpck_require__(21470); -const v2PodsMetricStatus_1 = __nccwpck_require__(3052); -const v2ResourceMetricSource_1 = __nccwpck_require__(28295); -const v2ResourceMetricStatus_1 = __nccwpck_require__(32774); -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, - "FlowcontrolV1Subject": flowcontrolV1Subject_1.FlowcontrolV1Subject, - "RbacV1Subject": rbacV1Subject_1.RbacV1Subject, - "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, - "V1AppArmorProfile": v1AppArmorProfile_1.V1AppArmorProfile, - "V1AttachedVolume": v1AttachedVolume_1.V1AttachedVolume, - "V1AuditAnnotation": v1AuditAnnotation_1.V1AuditAnnotation, - "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, - "V1CSIStorageCapacity": v1CSIStorageCapacity_1.V1CSIStorageCapacity, - "V1CSIStorageCapacityList": v1CSIStorageCapacityList_1.V1CSIStorageCapacityList, - "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, - "V1ClaimSource": v1ClaimSource_1.V1ClaimSource, - "V1ClientIPConfig": v1ClientIPConfig_1.V1ClientIPConfig, - "V1ClusterRole": v1ClusterRole_1.V1ClusterRole, - "V1ClusterRoleBinding": v1ClusterRoleBinding_1.V1ClusterRoleBinding, - "V1ClusterRoleBindingList": v1ClusterRoleBindingList_1.V1ClusterRoleBindingList, - "V1ClusterRoleList": v1ClusterRoleList_1.V1ClusterRoleList, - "V1ClusterTrustBundleProjection": v1ClusterTrustBundleProjection_1.V1ClusterTrustBundleProjection, - "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, - "V1ContainerResizePolicy": v1ContainerResizePolicy_1.V1ContainerResizePolicy, - "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, - "V1ExemptPriorityLevelConfiguration": v1ExemptPriorityLevelConfiguration_1.V1ExemptPriorityLevelConfiguration, - "V1ExpressionWarning": v1ExpressionWarning_1.V1ExpressionWarning, - "V1ExternalDocumentation": v1ExternalDocumentation_1.V1ExternalDocumentation, - "V1FCVolumeSource": v1FCVolumeSource_1.V1FCVolumeSource, - "V1FlexPersistentVolumeSource": v1FlexPersistentVolumeSource_1.V1FlexPersistentVolumeSource, - "V1FlexVolumeSource": v1FlexVolumeSource_1.V1FlexVolumeSource, - "V1FlockerVolumeSource": v1FlockerVolumeSource_1.V1FlockerVolumeSource, - "V1FlowDistinguisherMethod": v1FlowDistinguisherMethod_1.V1FlowDistinguisherMethod, - "V1FlowSchema": v1FlowSchema_1.V1FlowSchema, - "V1FlowSchemaCondition": v1FlowSchemaCondition_1.V1FlowSchemaCondition, - "V1FlowSchemaList": v1FlowSchemaList_1.V1FlowSchemaList, - "V1FlowSchemaSpec": v1FlowSchemaSpec_1.V1FlowSchemaSpec, - "V1FlowSchemaStatus": v1FlowSchemaStatus_1.V1FlowSchemaStatus, - "V1ForZone": v1ForZone_1.V1ForZone, - "V1GCEPersistentDiskVolumeSource": v1GCEPersistentDiskVolumeSource_1.V1GCEPersistentDiskVolumeSource, - "V1GRPCAction": v1GRPCAction_1.V1GRPCAction, - "V1GitRepoVolumeSource": v1GitRepoVolumeSource_1.V1GitRepoVolumeSource, - "V1GlusterfsPersistentVolumeSource": v1GlusterfsPersistentVolumeSource_1.V1GlusterfsPersistentVolumeSource, - "V1GlusterfsVolumeSource": v1GlusterfsVolumeSource_1.V1GlusterfsVolumeSource, - "V1GroupSubject": v1GroupSubject_1.V1GroupSubject, - "V1GroupVersionForDiscovery": v1GroupVersionForDiscovery_1.V1GroupVersionForDiscovery, - "V1HTTPGetAction": v1HTTPGetAction_1.V1HTTPGetAction, - "V1HTTPHeader": v1HTTPHeader_1.V1HTTPHeader, - "V1HTTPIngressPath": v1HTTPIngressPath_1.V1HTTPIngressPath, - "V1HTTPIngressRuleValue": v1HTTPIngressRuleValue_1.V1HTTPIngressRuleValue, - "V1HorizontalPodAutoscaler": v1HorizontalPodAutoscaler_1.V1HorizontalPodAutoscaler, - "V1HorizontalPodAutoscalerList": v1HorizontalPodAutoscalerList_1.V1HorizontalPodAutoscalerList, - "V1HorizontalPodAutoscalerSpec": v1HorizontalPodAutoscalerSpec_1.V1HorizontalPodAutoscalerSpec, - "V1HorizontalPodAutoscalerStatus": v1HorizontalPodAutoscalerStatus_1.V1HorizontalPodAutoscalerStatus, - "V1HostAlias": v1HostAlias_1.V1HostAlias, - "V1HostIP": v1HostIP_1.V1HostIP, - "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, - "V1IngressLoadBalancerIngress": v1IngressLoadBalancerIngress_1.V1IngressLoadBalancerIngress, - "V1IngressLoadBalancerStatus": v1IngressLoadBalancerStatus_1.V1IngressLoadBalancerStatus, - "V1IngressPortStatus": v1IngressPortStatus_1.V1IngressPortStatus, - "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, - "V1LifecycleHandler": v1LifecycleHandler_1.V1LifecycleHandler, - "V1LimitRange": v1LimitRange_1.V1LimitRange, - "V1LimitRangeItem": v1LimitRangeItem_1.V1LimitRangeItem, - "V1LimitRangeList": v1LimitRangeList_1.V1LimitRangeList, - "V1LimitRangeSpec": v1LimitRangeSpec_1.V1LimitRangeSpec, - "V1LimitResponse": v1LimitResponse_1.V1LimitResponse, - "V1LimitedPriorityLevelConfiguration": v1LimitedPriorityLevelConfiguration_1.V1LimitedPriorityLevelConfiguration, - "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, - "V1MatchCondition": v1MatchCondition_1.V1MatchCondition, - "V1MatchResources": v1MatchResources_1.V1MatchResources, - "V1ModifyVolumeStatus": v1ModifyVolumeStatus_1.V1ModifyVolumeStatus, - "V1MutatingWebhook": v1MutatingWebhook_1.V1MutatingWebhook, - "V1MutatingWebhookConfiguration": v1MutatingWebhookConfiguration_1.V1MutatingWebhookConfiguration, - "V1MutatingWebhookConfigurationList": v1MutatingWebhookConfigurationList_1.V1MutatingWebhookConfigurationList, - "V1NFSVolumeSource": v1NFSVolumeSource_1.V1NFSVolumeSource, - "V1NamedRuleWithOperations": v1NamedRuleWithOperations_1.V1NamedRuleWithOperations, - "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, - "V1NodeRuntimeHandler": v1NodeRuntimeHandler_1.V1NodeRuntimeHandler, - "V1NodeRuntimeHandlerFeatures": v1NodeRuntimeHandlerFeatures_1.V1NodeRuntimeHandlerFeatures, - "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, - "V1NonResourcePolicyRule": v1NonResourcePolicyRule_1.V1NonResourcePolicyRule, - "V1NonResourceRule": v1NonResourceRule_1.V1NonResourceRule, - "V1ObjectFieldSelector": v1ObjectFieldSelector_1.V1ObjectFieldSelector, - "V1ObjectMeta": v1ObjectMeta_1.V1ObjectMeta, - "V1ObjectReference": v1ObjectReference_1.V1ObjectReference, - "V1Overhead": v1Overhead_1.V1Overhead, - "V1OwnerReference": v1OwnerReference_1.V1OwnerReference, - "V1ParamKind": v1ParamKind_1.V1ParamKind, - "V1ParamRef": v1ParamRef_1.V1ParamRef, - "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, - "V1PodFailurePolicy": v1PodFailurePolicy_1.V1PodFailurePolicy, - "V1PodFailurePolicyOnExitCodesRequirement": v1PodFailurePolicyOnExitCodesRequirement_1.V1PodFailurePolicyOnExitCodesRequirement, - "V1PodFailurePolicyOnPodConditionsPattern": v1PodFailurePolicyOnPodConditionsPattern_1.V1PodFailurePolicyOnPodConditionsPattern, - "V1PodFailurePolicyRule": v1PodFailurePolicyRule_1.V1PodFailurePolicyRule, - "V1PodIP": v1PodIP_1.V1PodIP, - "V1PodList": v1PodList_1.V1PodList, - "V1PodOS": v1PodOS_1.V1PodOS, - "V1PodReadinessGate": v1PodReadinessGate_1.V1PodReadinessGate, - "V1PodResourceClaim": v1PodResourceClaim_1.V1PodResourceClaim, - "V1PodResourceClaimStatus": v1PodResourceClaimStatus_1.V1PodResourceClaimStatus, - "V1PodSchedulingGate": v1PodSchedulingGate_1.V1PodSchedulingGate, - "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, - "V1PolicyRulesWithSubjects": v1PolicyRulesWithSubjects_1.V1PolicyRulesWithSubjects, - "V1PortStatus": v1PortStatus_1.V1PortStatus, - "V1PortworxVolumeSource": v1PortworxVolumeSource_1.V1PortworxVolumeSource, - "V1Preconditions": v1Preconditions_1.V1Preconditions, - "V1PreferredSchedulingTerm": v1PreferredSchedulingTerm_1.V1PreferredSchedulingTerm, - "V1PriorityClass": v1PriorityClass_1.V1PriorityClass, - "V1PriorityClassList": v1PriorityClassList_1.V1PriorityClassList, - "V1PriorityLevelConfiguration": v1PriorityLevelConfiguration_1.V1PriorityLevelConfiguration, - "V1PriorityLevelConfigurationCondition": v1PriorityLevelConfigurationCondition_1.V1PriorityLevelConfigurationCondition, - "V1PriorityLevelConfigurationList": v1PriorityLevelConfigurationList_1.V1PriorityLevelConfigurationList, - "V1PriorityLevelConfigurationReference": v1PriorityLevelConfigurationReference_1.V1PriorityLevelConfigurationReference, - "V1PriorityLevelConfigurationSpec": v1PriorityLevelConfigurationSpec_1.V1PriorityLevelConfigurationSpec, - "V1PriorityLevelConfigurationStatus": v1PriorityLevelConfigurationStatus_1.V1PriorityLevelConfigurationStatus, - "V1Probe": v1Probe_1.V1Probe, - "V1ProjectedVolumeSource": v1ProjectedVolumeSource_1.V1ProjectedVolumeSource, - "V1QueuingConfiguration": v1QueuingConfiguration_1.V1QueuingConfiguration, - "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, - "V1ResourceClaim": v1ResourceClaim_1.V1ResourceClaim, - "V1ResourceFieldSelector": v1ResourceFieldSelector_1.V1ResourceFieldSelector, - "V1ResourcePolicyRule": v1ResourcePolicyRule_1.V1ResourcePolicyRule, - "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, - "V1SelectableField": v1SelectableField_1.V1SelectableField, - "V1SelfSubjectAccessReview": v1SelfSubjectAccessReview_1.V1SelfSubjectAccessReview, - "V1SelfSubjectAccessReviewSpec": v1SelfSubjectAccessReviewSpec_1.V1SelfSubjectAccessReviewSpec, - "V1SelfSubjectReview": v1SelfSubjectReview_1.V1SelfSubjectReview, - "V1SelfSubjectReviewStatus": v1SelfSubjectReviewStatus_1.V1SelfSubjectReviewStatus, - "V1SelfSubjectRulesReview": v1SelfSubjectRulesReview_1.V1SelfSubjectRulesReview, - "V1SelfSubjectRulesReviewSpec": v1SelfSubjectRulesReviewSpec_1.V1SelfSubjectRulesReviewSpec, - "V1ServerAddressByClientCIDR": v1ServerAddressByClientCIDR_1.V1ServerAddressByClientCIDR, - "V1Service": v1Service_1.V1Service, - "V1ServiceAccount": v1ServiceAccount_1.V1ServiceAccount, - "V1ServiceAccountList": v1ServiceAccountList_1.V1ServiceAccountList, - "V1ServiceAccountSubject": v1ServiceAccountSubject_1.V1ServiceAccountSubject, - "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, - "V1SleepAction": v1SleepAction_1.V1SleepAction, - "V1StatefulSet": v1StatefulSet_1.V1StatefulSet, - "V1StatefulSetCondition": v1StatefulSetCondition_1.V1StatefulSetCondition, - "V1StatefulSetList": v1StatefulSetList_1.V1StatefulSetList, - "V1StatefulSetOrdinals": v1StatefulSetOrdinals_1.V1StatefulSetOrdinals, - "V1StatefulSetPersistentVolumeClaimRetentionPolicy": v1StatefulSetPersistentVolumeClaimRetentionPolicy_1.V1StatefulSetPersistentVolumeClaimRetentionPolicy, - "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, - "V1SubjectAccessReview": v1SubjectAccessReview_1.V1SubjectAccessReview, - "V1SubjectAccessReviewSpec": v1SubjectAccessReviewSpec_1.V1SubjectAccessReviewSpec, - "V1SubjectAccessReviewStatus": v1SubjectAccessReviewStatus_1.V1SubjectAccessReviewStatus, - "V1SubjectRulesReviewStatus": v1SubjectRulesReviewStatus_1.V1SubjectRulesReviewStatus, - "V1SuccessPolicy": v1SuccessPolicy_1.V1SuccessPolicy, - "V1SuccessPolicyRule": v1SuccessPolicyRule_1.V1SuccessPolicyRule, - "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, - "V1TypeChecking": v1TypeChecking_1.V1TypeChecking, - "V1TypedLocalObjectReference": v1TypedLocalObjectReference_1.V1TypedLocalObjectReference, - "V1TypedObjectReference": v1TypedObjectReference_1.V1TypedObjectReference, - "V1UncountedTerminatedPods": v1UncountedTerminatedPods_1.V1UncountedTerminatedPods, - "V1UserInfo": v1UserInfo_1.V1UserInfo, - "V1UserSubject": v1UserSubject_1.V1UserSubject, - "V1ValidatingAdmissionPolicy": v1ValidatingAdmissionPolicy_1.V1ValidatingAdmissionPolicy, - "V1ValidatingAdmissionPolicyBinding": v1ValidatingAdmissionPolicyBinding_1.V1ValidatingAdmissionPolicyBinding, - "V1ValidatingAdmissionPolicyBindingList": v1ValidatingAdmissionPolicyBindingList_1.V1ValidatingAdmissionPolicyBindingList, - "V1ValidatingAdmissionPolicyBindingSpec": v1ValidatingAdmissionPolicyBindingSpec_1.V1ValidatingAdmissionPolicyBindingSpec, - "V1ValidatingAdmissionPolicyList": v1ValidatingAdmissionPolicyList_1.V1ValidatingAdmissionPolicyList, - "V1ValidatingAdmissionPolicySpec": v1ValidatingAdmissionPolicySpec_1.V1ValidatingAdmissionPolicySpec, - "V1ValidatingAdmissionPolicyStatus": v1ValidatingAdmissionPolicyStatus_1.V1ValidatingAdmissionPolicyStatus, - "V1ValidatingWebhook": v1ValidatingWebhook_1.V1ValidatingWebhook, - "V1ValidatingWebhookConfiguration": v1ValidatingWebhookConfiguration_1.V1ValidatingWebhookConfiguration, - "V1ValidatingWebhookConfigurationList": v1ValidatingWebhookConfigurationList_1.V1ValidatingWebhookConfigurationList, - "V1Validation": v1Validation_1.V1Validation, - "V1ValidationRule": v1ValidationRule_1.V1ValidationRule, - "V1Variable": v1Variable_1.V1Variable, - "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, - "V1VolumeMountStatus": v1VolumeMountStatus_1.V1VolumeMountStatus, - "V1VolumeNodeAffinity": v1VolumeNodeAffinity_1.V1VolumeNodeAffinity, - "V1VolumeNodeResources": v1VolumeNodeResources_1.V1VolumeNodeResources, - "V1VolumeProjection": v1VolumeProjection_1.V1VolumeProjection, - "V1VolumeResourceRequirements": v1VolumeResourceRequirements_1.V1VolumeResourceRequirements, - "V1VsphereVirtualDiskVolumeSource": v1VsphereVirtualDiskVolumeSource_1.V1VsphereVirtualDiskVolumeSource, - "V1WatchEvent": v1WatchEvent_1.V1WatchEvent, - "V1WebhookConversion": v1WebhookConversion_1.V1WebhookConversion, - "V1WeightedPodAffinityTerm": v1WeightedPodAffinityTerm_1.V1WeightedPodAffinityTerm, - "V1WindowsSecurityContextOptions": v1WindowsSecurityContextOptions_1.V1WindowsSecurityContextOptions, - "V1alpha1AuditAnnotation": v1alpha1AuditAnnotation_1.V1alpha1AuditAnnotation, - "V1alpha1ClusterTrustBundle": v1alpha1ClusterTrustBundle_1.V1alpha1ClusterTrustBundle, - "V1alpha1ClusterTrustBundleList": v1alpha1ClusterTrustBundleList_1.V1alpha1ClusterTrustBundleList, - "V1alpha1ClusterTrustBundleSpec": v1alpha1ClusterTrustBundleSpec_1.V1alpha1ClusterTrustBundleSpec, - "V1alpha1ExpressionWarning": v1alpha1ExpressionWarning_1.V1alpha1ExpressionWarning, - "V1alpha1GroupVersionResource": v1alpha1GroupVersionResource_1.V1alpha1GroupVersionResource, - "V1alpha1IPAddress": v1alpha1IPAddress_1.V1alpha1IPAddress, - "V1alpha1IPAddressList": v1alpha1IPAddressList_1.V1alpha1IPAddressList, - "V1alpha1IPAddressSpec": v1alpha1IPAddressSpec_1.V1alpha1IPAddressSpec, - "V1alpha1MatchCondition": v1alpha1MatchCondition_1.V1alpha1MatchCondition, - "V1alpha1MatchResources": v1alpha1MatchResources_1.V1alpha1MatchResources, - "V1alpha1MigrationCondition": v1alpha1MigrationCondition_1.V1alpha1MigrationCondition, - "V1alpha1NamedRuleWithOperations": v1alpha1NamedRuleWithOperations_1.V1alpha1NamedRuleWithOperations, - "V1alpha1ParamKind": v1alpha1ParamKind_1.V1alpha1ParamKind, - "V1alpha1ParamRef": v1alpha1ParamRef_1.V1alpha1ParamRef, - "V1alpha1ParentReference": v1alpha1ParentReference_1.V1alpha1ParentReference, - "V1alpha1SelfSubjectReview": v1alpha1SelfSubjectReview_1.V1alpha1SelfSubjectReview, - "V1alpha1SelfSubjectReviewStatus": v1alpha1SelfSubjectReviewStatus_1.V1alpha1SelfSubjectReviewStatus, - "V1alpha1ServerStorageVersion": v1alpha1ServerStorageVersion_1.V1alpha1ServerStorageVersion, - "V1alpha1ServiceCIDR": v1alpha1ServiceCIDR_1.V1alpha1ServiceCIDR, - "V1alpha1ServiceCIDRList": v1alpha1ServiceCIDRList_1.V1alpha1ServiceCIDRList, - "V1alpha1ServiceCIDRSpec": v1alpha1ServiceCIDRSpec_1.V1alpha1ServiceCIDRSpec, - "V1alpha1ServiceCIDRStatus": v1alpha1ServiceCIDRStatus_1.V1alpha1ServiceCIDRStatus, - "V1alpha1StorageVersion": v1alpha1StorageVersion_1.V1alpha1StorageVersion, - "V1alpha1StorageVersionCondition": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition, - "V1alpha1StorageVersionList": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList, - "V1alpha1StorageVersionMigration": v1alpha1StorageVersionMigration_1.V1alpha1StorageVersionMigration, - "V1alpha1StorageVersionMigrationList": v1alpha1StorageVersionMigrationList_1.V1alpha1StorageVersionMigrationList, - "V1alpha1StorageVersionMigrationSpec": v1alpha1StorageVersionMigrationSpec_1.V1alpha1StorageVersionMigrationSpec, - "V1alpha1StorageVersionMigrationStatus": v1alpha1StorageVersionMigrationStatus_1.V1alpha1StorageVersionMigrationStatus, - "V1alpha1StorageVersionStatus": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus, - "V1alpha1TypeChecking": v1alpha1TypeChecking_1.V1alpha1TypeChecking, - "V1alpha1ValidatingAdmissionPolicy": v1alpha1ValidatingAdmissionPolicy_1.V1alpha1ValidatingAdmissionPolicy, - "V1alpha1ValidatingAdmissionPolicyBinding": v1alpha1ValidatingAdmissionPolicyBinding_1.V1alpha1ValidatingAdmissionPolicyBinding, - "V1alpha1ValidatingAdmissionPolicyBindingList": v1alpha1ValidatingAdmissionPolicyBindingList_1.V1alpha1ValidatingAdmissionPolicyBindingList, - "V1alpha1ValidatingAdmissionPolicyBindingSpec": v1alpha1ValidatingAdmissionPolicyBindingSpec_1.V1alpha1ValidatingAdmissionPolicyBindingSpec, - "V1alpha1ValidatingAdmissionPolicyList": v1alpha1ValidatingAdmissionPolicyList_1.V1alpha1ValidatingAdmissionPolicyList, - "V1alpha1ValidatingAdmissionPolicySpec": v1alpha1ValidatingAdmissionPolicySpec_1.V1alpha1ValidatingAdmissionPolicySpec, - "V1alpha1ValidatingAdmissionPolicyStatus": v1alpha1ValidatingAdmissionPolicyStatus_1.V1alpha1ValidatingAdmissionPolicyStatus, - "V1alpha1Validation": v1alpha1Validation_1.V1alpha1Validation, - "V1alpha1Variable": v1alpha1Variable_1.V1alpha1Variable, - "V1alpha1VolumeAttributesClass": v1alpha1VolumeAttributesClass_1.V1alpha1VolumeAttributesClass, - "V1alpha1VolumeAttributesClassList": v1alpha1VolumeAttributesClassList_1.V1alpha1VolumeAttributesClassList, - "V1alpha2AllocationResult": v1alpha2AllocationResult_1.V1alpha2AllocationResult, - "V1alpha2DriverAllocationResult": v1alpha2DriverAllocationResult_1.V1alpha2DriverAllocationResult, - "V1alpha2DriverRequests": v1alpha2DriverRequests_1.V1alpha2DriverRequests, - "V1alpha2NamedResourcesAllocationResult": v1alpha2NamedResourcesAllocationResult_1.V1alpha2NamedResourcesAllocationResult, - "V1alpha2NamedResourcesAttribute": v1alpha2NamedResourcesAttribute_1.V1alpha2NamedResourcesAttribute, - "V1alpha2NamedResourcesFilter": v1alpha2NamedResourcesFilter_1.V1alpha2NamedResourcesFilter, - "V1alpha2NamedResourcesInstance": v1alpha2NamedResourcesInstance_1.V1alpha2NamedResourcesInstance, - "V1alpha2NamedResourcesIntSlice": v1alpha2NamedResourcesIntSlice_1.V1alpha2NamedResourcesIntSlice, - "V1alpha2NamedResourcesRequest": v1alpha2NamedResourcesRequest_1.V1alpha2NamedResourcesRequest, - "V1alpha2NamedResourcesResources": v1alpha2NamedResourcesResources_1.V1alpha2NamedResourcesResources, - "V1alpha2NamedResourcesStringSlice": v1alpha2NamedResourcesStringSlice_1.V1alpha2NamedResourcesStringSlice, - "V1alpha2PodSchedulingContext": v1alpha2PodSchedulingContext_1.V1alpha2PodSchedulingContext, - "V1alpha2PodSchedulingContextList": v1alpha2PodSchedulingContextList_1.V1alpha2PodSchedulingContextList, - "V1alpha2PodSchedulingContextSpec": v1alpha2PodSchedulingContextSpec_1.V1alpha2PodSchedulingContextSpec, - "V1alpha2PodSchedulingContextStatus": v1alpha2PodSchedulingContextStatus_1.V1alpha2PodSchedulingContextStatus, - "V1alpha2ResourceClaim": v1alpha2ResourceClaim_1.V1alpha2ResourceClaim, - "V1alpha2ResourceClaimConsumerReference": v1alpha2ResourceClaimConsumerReference_1.V1alpha2ResourceClaimConsumerReference, - "V1alpha2ResourceClaimList": v1alpha2ResourceClaimList_1.V1alpha2ResourceClaimList, - "V1alpha2ResourceClaimParameters": v1alpha2ResourceClaimParameters_1.V1alpha2ResourceClaimParameters, - "V1alpha2ResourceClaimParametersList": v1alpha2ResourceClaimParametersList_1.V1alpha2ResourceClaimParametersList, - "V1alpha2ResourceClaimParametersReference": v1alpha2ResourceClaimParametersReference_1.V1alpha2ResourceClaimParametersReference, - "V1alpha2ResourceClaimSchedulingStatus": v1alpha2ResourceClaimSchedulingStatus_1.V1alpha2ResourceClaimSchedulingStatus, - "V1alpha2ResourceClaimSpec": v1alpha2ResourceClaimSpec_1.V1alpha2ResourceClaimSpec, - "V1alpha2ResourceClaimStatus": v1alpha2ResourceClaimStatus_1.V1alpha2ResourceClaimStatus, - "V1alpha2ResourceClaimTemplate": v1alpha2ResourceClaimTemplate_1.V1alpha2ResourceClaimTemplate, - "V1alpha2ResourceClaimTemplateList": v1alpha2ResourceClaimTemplateList_1.V1alpha2ResourceClaimTemplateList, - "V1alpha2ResourceClaimTemplateSpec": v1alpha2ResourceClaimTemplateSpec_1.V1alpha2ResourceClaimTemplateSpec, - "V1alpha2ResourceClass": v1alpha2ResourceClass_1.V1alpha2ResourceClass, - "V1alpha2ResourceClassList": v1alpha2ResourceClassList_1.V1alpha2ResourceClassList, - "V1alpha2ResourceClassParameters": v1alpha2ResourceClassParameters_1.V1alpha2ResourceClassParameters, - "V1alpha2ResourceClassParametersList": v1alpha2ResourceClassParametersList_1.V1alpha2ResourceClassParametersList, - "V1alpha2ResourceClassParametersReference": v1alpha2ResourceClassParametersReference_1.V1alpha2ResourceClassParametersReference, - "V1alpha2ResourceFilter": v1alpha2ResourceFilter_1.V1alpha2ResourceFilter, - "V1alpha2ResourceHandle": v1alpha2ResourceHandle_1.V1alpha2ResourceHandle, - "V1alpha2ResourceRequest": v1alpha2ResourceRequest_1.V1alpha2ResourceRequest, - "V1alpha2ResourceSlice": v1alpha2ResourceSlice_1.V1alpha2ResourceSlice, - "V1alpha2ResourceSliceList": v1alpha2ResourceSliceList_1.V1alpha2ResourceSliceList, - "V1alpha2StructuredResourceHandle": v1alpha2StructuredResourceHandle_1.V1alpha2StructuredResourceHandle, - "V1alpha2VendorParameters": v1alpha2VendorParameters_1.V1alpha2VendorParameters, - "V1beta1AuditAnnotation": v1beta1AuditAnnotation_1.V1beta1AuditAnnotation, - "V1beta1ExpressionWarning": v1beta1ExpressionWarning_1.V1beta1ExpressionWarning, - "V1beta1MatchCondition": v1beta1MatchCondition_1.V1beta1MatchCondition, - "V1beta1MatchResources": v1beta1MatchResources_1.V1beta1MatchResources, - "V1beta1NamedRuleWithOperations": v1beta1NamedRuleWithOperations_1.V1beta1NamedRuleWithOperations, - "V1beta1ParamKind": v1beta1ParamKind_1.V1beta1ParamKind, - "V1beta1ParamRef": v1beta1ParamRef_1.V1beta1ParamRef, - "V1beta1SelfSubjectReview": v1beta1SelfSubjectReview_1.V1beta1SelfSubjectReview, - "V1beta1SelfSubjectReviewStatus": v1beta1SelfSubjectReviewStatus_1.V1beta1SelfSubjectReviewStatus, - "V1beta1TypeChecking": v1beta1TypeChecking_1.V1beta1TypeChecking, - "V1beta1ValidatingAdmissionPolicy": v1beta1ValidatingAdmissionPolicy_1.V1beta1ValidatingAdmissionPolicy, - "V1beta1ValidatingAdmissionPolicyBinding": v1beta1ValidatingAdmissionPolicyBinding_1.V1beta1ValidatingAdmissionPolicyBinding, - "V1beta1ValidatingAdmissionPolicyBindingList": v1beta1ValidatingAdmissionPolicyBindingList_1.V1beta1ValidatingAdmissionPolicyBindingList, - "V1beta1ValidatingAdmissionPolicyBindingSpec": v1beta1ValidatingAdmissionPolicyBindingSpec_1.V1beta1ValidatingAdmissionPolicyBindingSpec, - "V1beta1ValidatingAdmissionPolicyList": v1beta1ValidatingAdmissionPolicyList_1.V1beta1ValidatingAdmissionPolicyList, - "V1beta1ValidatingAdmissionPolicySpec": v1beta1ValidatingAdmissionPolicySpec_1.V1beta1ValidatingAdmissionPolicySpec, - "V1beta1ValidatingAdmissionPolicyStatus": v1beta1ValidatingAdmissionPolicyStatus_1.V1beta1ValidatingAdmissionPolicyStatus, - "V1beta1Validation": v1beta1Validation_1.V1beta1Validation, - "V1beta1Variable": v1beta1Variable_1.V1beta1Variable, - "V1beta3ExemptPriorityLevelConfiguration": v1beta3ExemptPriorityLevelConfiguration_1.V1beta3ExemptPriorityLevelConfiguration, - "V1beta3FlowDistinguisherMethod": v1beta3FlowDistinguisherMethod_1.V1beta3FlowDistinguisherMethod, - "V1beta3FlowSchema": v1beta3FlowSchema_1.V1beta3FlowSchema, - "V1beta3FlowSchemaCondition": v1beta3FlowSchemaCondition_1.V1beta3FlowSchemaCondition, - "V1beta3FlowSchemaList": v1beta3FlowSchemaList_1.V1beta3FlowSchemaList, - "V1beta3FlowSchemaSpec": v1beta3FlowSchemaSpec_1.V1beta3FlowSchemaSpec, - "V1beta3FlowSchemaStatus": v1beta3FlowSchemaStatus_1.V1beta3FlowSchemaStatus, - "V1beta3GroupSubject": v1beta3GroupSubject_1.V1beta3GroupSubject, - "V1beta3LimitResponse": v1beta3LimitResponse_1.V1beta3LimitResponse, - "V1beta3LimitedPriorityLevelConfiguration": v1beta3LimitedPriorityLevelConfiguration_1.V1beta3LimitedPriorityLevelConfiguration, - "V1beta3NonResourcePolicyRule": v1beta3NonResourcePolicyRule_1.V1beta3NonResourcePolicyRule, - "V1beta3PolicyRulesWithSubjects": v1beta3PolicyRulesWithSubjects_1.V1beta3PolicyRulesWithSubjects, - "V1beta3PriorityLevelConfiguration": v1beta3PriorityLevelConfiguration_1.V1beta3PriorityLevelConfiguration, - "V1beta3PriorityLevelConfigurationCondition": v1beta3PriorityLevelConfigurationCondition_1.V1beta3PriorityLevelConfigurationCondition, - "V1beta3PriorityLevelConfigurationList": v1beta3PriorityLevelConfigurationList_1.V1beta3PriorityLevelConfigurationList, - "V1beta3PriorityLevelConfigurationReference": v1beta3PriorityLevelConfigurationReference_1.V1beta3PriorityLevelConfigurationReference, - "V1beta3PriorityLevelConfigurationSpec": v1beta3PriorityLevelConfigurationSpec_1.V1beta3PriorityLevelConfigurationSpec, - "V1beta3PriorityLevelConfigurationStatus": v1beta3PriorityLevelConfigurationStatus_1.V1beta3PriorityLevelConfigurationStatus, - "V1beta3QueuingConfiguration": v1beta3QueuingConfiguration_1.V1beta3QueuingConfiguration, - "V1beta3ResourcePolicyRule": v1beta3ResourcePolicyRule_1.V1beta3ResourcePolicyRule, - "V1beta3ServiceAccountSubject": v1beta3ServiceAccountSubject_1.V1beta3ServiceAccountSubject, - "V1beta3Subject": v1beta3Subject_1.V1beta3Subject, - "V1beta3UserSubject": v1beta3UserSubject_1.V1beta3UserSubject, - "V2ContainerResourceMetricSource": v2ContainerResourceMetricSource_1.V2ContainerResourceMetricSource, - "V2ContainerResourceMetricStatus": v2ContainerResourceMetricStatus_1.V2ContainerResourceMetricStatus, - "V2CrossVersionObjectReference": v2CrossVersionObjectReference_1.V2CrossVersionObjectReference, - "V2ExternalMetricSource": v2ExternalMetricSource_1.V2ExternalMetricSource, - "V2ExternalMetricStatus": v2ExternalMetricStatus_1.V2ExternalMetricStatus, - "V2HPAScalingPolicy": v2HPAScalingPolicy_1.V2HPAScalingPolicy, - "V2HPAScalingRules": v2HPAScalingRules_1.V2HPAScalingRules, - "V2HorizontalPodAutoscaler": v2HorizontalPodAutoscaler_1.V2HorizontalPodAutoscaler, - "V2HorizontalPodAutoscalerBehavior": v2HorizontalPodAutoscalerBehavior_1.V2HorizontalPodAutoscalerBehavior, - "V2HorizontalPodAutoscalerCondition": v2HorizontalPodAutoscalerCondition_1.V2HorizontalPodAutoscalerCondition, - "V2HorizontalPodAutoscalerList": v2HorizontalPodAutoscalerList_1.V2HorizontalPodAutoscalerList, - "V2HorizontalPodAutoscalerSpec": v2HorizontalPodAutoscalerSpec_1.V2HorizontalPodAutoscalerSpec, - "V2HorizontalPodAutoscalerStatus": v2HorizontalPodAutoscalerStatus_1.V2HorizontalPodAutoscalerStatus, - "V2MetricIdentifier": v2MetricIdentifier_1.V2MetricIdentifier, - "V2MetricSpec": v2MetricSpec_1.V2MetricSpec, - "V2MetricStatus": v2MetricStatus_1.V2MetricStatus, - "V2MetricTarget": v2MetricTarget_1.V2MetricTarget, - "V2MetricValueStatus": v2MetricValueStatus_1.V2MetricValueStatus, - "V2ObjectMetricSource": v2ObjectMetricSource_1.V2ObjectMetricSource, - "V2ObjectMetricStatus": v2ObjectMetricStatus_1.V2ObjectMetricStatus, - "V2PodsMetricSource": v2PodsMetricSource_1.V2PodsMetricSource, - "V2PodsMetricStatus": v2PodsMetricStatus_1.V2PodsMetricStatus, - "V2ResourceMetricSource": v2ResourceMetricSource_1.V2ResourceMetricSource, - "V2ResourceMetricStatus": v2ResourceMetricStatus_1.V2ResourceMetricStatus, - "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 - -/***/ }), - -/***/ 74467: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RbacV1Subject = 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 RbacV1Subject { - static getAttributeTypeMap() { - return RbacV1Subject.attributeTypeMap; - } -} -exports.RbacV1Subject = RbacV1Subject; -RbacV1Subject.discriminator = undefined; -RbacV1Subject.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=rbacV1Subject.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 93682: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AppArmorProfile = void 0; -/** -* AppArmorProfile defines a pod or container\'s AppArmor settings. -*/ -class V1AppArmorProfile { - static getAttributeTypeMap() { - return V1AppArmorProfile.attributeTypeMap; - } -} -exports.V1AppArmorProfile = V1AppArmorProfile; -V1AppArmorProfile.discriminator = undefined; -V1AppArmorProfile.attributeTypeMap = [ - { - "name": "localhostProfile", - "baseName": "localhostProfile", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1AppArmorProfile.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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 9447: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AuditAnnotation = void 0; -/** -* AuditAnnotation describes how to produce an audit annotation for an API request. -*/ -class V1AuditAnnotation { - static getAttributeTypeMap() { - return V1AuditAnnotation.attributeTypeMap; - } -} -exports.V1AuditAnnotation = V1AuditAnnotation; -V1AuditAnnotation.discriminator = undefined; -V1AuditAnnotation.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "valueExpression", - "baseName": "valueExpression", - "type": "string" - } -]; -//# sourceMappingURL=v1AuditAnnotation.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "seLinuxMount", - "baseName": "seLinuxMount", - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "nodeExpandSecretRef", - "baseName": "nodeExpandSecretRef", - "type": "V1SecretReference" - }, - { - "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 - -/***/ }), - -/***/ 41035: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIStorageCapacity = 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 when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node. -*/ -class V1CSIStorageCapacity { - static getAttributeTypeMap() { - return V1CSIStorageCapacity.attributeTypeMap; - } -} -exports.V1CSIStorageCapacity = V1CSIStorageCapacity; -V1CSIStorageCapacity.discriminator = undefined; -V1CSIStorageCapacity.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=v1CSIStorageCapacity.js.map - -/***/ }), - -/***/ 65728: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIStorageCapacityList = void 0; -/** -* CSIStorageCapacityList is a collection of CSIStorageCapacity objects. -*/ -class V1CSIStorageCapacityList { - static getAttributeTypeMap() { - return V1CSIStorageCapacityList.attributeTypeMap; - } -} -exports.V1CSIStorageCapacityList = V1CSIStorageCapacityList; -V1CSIStorageCapacityList.discriminator = undefined; -V1CSIStorageCapacityList.attributeTypeMap = [ - { - "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=v1CSIStorageCapacityList.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 51613: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClaimSource = void 0; -/** -* ClaimSource describes a reference to a ResourceClaim. Exactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value. -*/ -class V1ClaimSource { - static getAttributeTypeMap() { - return V1ClaimSource.attributeTypeMap; - } -} -exports.V1ClaimSource = V1ClaimSource; -V1ClaimSource.discriminator = undefined; -V1ClaimSource.attributeTypeMap = [ - { - "name": "resourceClaimName", - "baseName": "resourceClaimName", - "type": "string" - }, - { - "name": "resourceClaimTemplateName", - "baseName": "resourceClaimTemplateName", - "type": "string" - } -]; -//# sourceMappingURL=v1ClaimSource.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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 47851: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 14640: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClusterTrustBundleProjection = void 0; -/** -* ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem. -*/ -class V1ClusterTrustBundleProjection { - static getAttributeTypeMap() { - return V1ClusterTrustBundleProjection.attributeTypeMap; - } -} -exports.V1ClusterTrustBundleProjection = V1ClusterTrustBundleProjection; -V1ClusterTrustBundleProjection.discriminator = undefined; -V1ClusterTrustBundleProjection.attributeTypeMap = [ - { - "name": "labelSelector", - "baseName": "labelSelector", - "type": "V1LabelSelector" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "signerName", - "baseName": "signerName", - "type": "string" - } -]; -//# sourceMappingURL=v1ClusterTrustBundleProjection.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "resizePolicy", - "baseName": "resizePolicy", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "V1ResourceRequirements" - }, - { - "name": "restartPolicy", - "baseName": "restartPolicy", - "type": "string" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 82970: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerResizePolicy = void 0; -/** -* ContainerResizePolicy represents resource resize policy for the container. -*/ -class V1ContainerResizePolicy { - static getAttributeTypeMap() { - return V1ContainerResizePolicy.attributeTypeMap; - } -} -exports.V1ContainerResizePolicy = V1ContainerResizePolicy; -V1ContainerResizePolicy.discriminator = undefined; -V1ContainerResizePolicy.attributeTypeMap = [ - { - "name": "resourceName", - "baseName": "resourceName", - "type": "string" - }, - { - "name": "restartPolicy", - "baseName": "restartPolicy", - "type": "string" - } -]; -//# sourceMappingURL=v1ContainerResizePolicy.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "allocatedResources", - "baseName": "allocatedResources", - "type": "{ [key: string]: string; }" - }, - { - "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": "resources", - "baseName": "resources", - "type": "V1ResourceRequirements" - }, - { - "name": "restartCount", - "baseName": "restartCount", - "type": "number" - }, - { - "name": "started", - "baseName": "started", - "type": "boolean" - }, - { - "name": "state", - "baseName": "state", - "type": "V1ContainerState" - }, - { - "name": "volumeMounts", - "baseName": "volumeMounts", - "type": "Array" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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" - }, - { - "name": "timeZone", - "baseName": "timeZone", - "type": "string" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceColumnDefinition = void 0; -/** -* CustomResourceColumnDefinition specifies a column for server side printing. -*/ -class V1CustomResourceColumnDefinition { - static getAttributeTypeMap() { - return V1CustomResourceColumnDefinition.attributeTypeMap; - } -} -exports.V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition; -V1CustomResourceColumnDefinition.discriminator = undefined; -V1CustomResourceColumnDefinition.attributeTypeMap = [ - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "format", - "baseName": "format", - "type": "string" - }, - { - "name": "jsonPath", - "baseName": "jsonPath", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "priority", - "baseName": "priority", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1CustomResourceColumnDefinition.js.map - -/***/ }), - -/***/ 9731: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "selectableFields", - "baseName": "selectableFields", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DownwardAPIVolumeFile = void 0; -/** -* DownwardAPIVolumeFile represents information to create the file containing the pod field -*/ -class V1DownwardAPIVolumeFile { - static getAttributeTypeMap() { - return V1DownwardAPIVolumeFile.attributeTypeMap; - } -} -exports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile; -V1DownwardAPIVolumeFile.discriminator = undefined; -V1DownwardAPIVolumeFile.attributeTypeMap = [ - { - "name": "fieldRef", - "baseName": "fieldRef", - "type": "V1ObjectFieldSelector" - }, - { - "name": "mode", - "baseName": "mode", - "type": "number" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "resourceFieldRef", - "baseName": "resourceFieldRef", - "type": "V1ResourceFieldSelector" - } -]; -//# sourceMappingURL=v1DownwardAPIVolumeFile.js.map - -/***/ }), - -/***/ 19493: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Endpoints = void 0; -/** -* Endpoints is a collection of endpoints that implement the actual service. Example: Name: \"mysvc\", Subsets: [ { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] }, { Addresses: [{\"ip\": \"10.10.3.3\"}], Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}] }, ] -*/ -class V1Endpoints { - static getAttributeTypeMap() { - return V1Endpoints.attributeTypeMap; - } -} -exports.V1Endpoints = V1Endpoints; -V1Endpoints.discriminator = undefined; -V1Endpoints.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "subsets", - "baseName": "subsets", - "type": "Array" - } -]; -//# sourceMappingURL=v1Endpoints.js.map - -/***/ }), - -/***/ 95223: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 temporary container that you may add 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. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation. To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted. -*/ -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": "resizePolicy", - "baseName": "resizePolicy", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "V1ResourceRequirements" - }, - { - "name": "restartPolicy", - "baseName": "restartPolicy", - "type": "string" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 71263: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ExemptPriorityLevelConfiguration = void 0; -/** -* ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. -*/ -class V1ExemptPriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1ExemptPriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1ExemptPriorityLevelConfiguration = V1ExemptPriorityLevelConfiguration; -V1ExemptPriorityLevelConfiguration.discriminator = undefined; -V1ExemptPriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "lendablePercent", - "baseName": "lendablePercent", - "type": "number" - }, - { - "name": "nominalConcurrencyShares", - "baseName": "nominalConcurrencyShares", - "type": "number" - } -]; -//# sourceMappingURL=v1ExemptPriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 28411: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ExpressionWarning = void 0; -/** -* ExpressionWarning is a warning information that targets a specific expression. -*/ -class V1ExpressionWarning { - static getAttributeTypeMap() { - return V1ExpressionWarning.attributeTypeMap; - } -} -exports.V1ExpressionWarning = V1ExpressionWarning; -V1ExpressionWarning.discriminator = undefined; -V1ExpressionWarning.attributeTypeMap = [ - { - "name": "fieldRef", - "baseName": "fieldRef", - "type": "string" - }, - { - "name": "warning", - "baseName": "warning", - "type": "string" - } -]; -//# sourceMappingURL=v1ExpressionWarning.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 93162: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlowDistinguisherMethod = void 0; -/** -* FlowDistinguisherMethod specifies the method of a flow distinguisher. -*/ -class V1FlowDistinguisherMethod { - static getAttributeTypeMap() { - return V1FlowDistinguisherMethod.attributeTypeMap; - } -} -exports.V1FlowDistinguisherMethod = V1FlowDistinguisherMethod; -V1FlowDistinguisherMethod.discriminator = undefined; -V1FlowDistinguisherMethod.attributeTypeMap = [ - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1FlowDistinguisherMethod.js.map - -/***/ }), - -/***/ 57973: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlowSchema = 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 V1FlowSchema { - static getAttributeTypeMap() { - return V1FlowSchema.attributeTypeMap; - } -} -exports.V1FlowSchema = V1FlowSchema; -V1FlowSchema.discriminator = undefined; -V1FlowSchema.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1FlowSchemaSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1FlowSchemaStatus" - } -]; -//# sourceMappingURL=v1FlowSchema.js.map - -/***/ }), - -/***/ 88200: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlowSchemaCondition = void 0; -/** -* FlowSchemaCondition describes conditions for a FlowSchema. -*/ -class V1FlowSchemaCondition { - static getAttributeTypeMap() { - return V1FlowSchemaCondition.attributeTypeMap; - } -} -exports.V1FlowSchemaCondition = V1FlowSchemaCondition; -V1FlowSchemaCondition.discriminator = undefined; -V1FlowSchemaCondition.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=v1FlowSchemaCondition.js.map - -/***/ }), - -/***/ 29306: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlowSchemaList = void 0; -/** -* FlowSchemaList is a list of FlowSchema objects. -*/ -class V1FlowSchemaList { - static getAttributeTypeMap() { - return V1FlowSchemaList.attributeTypeMap; - } -} -exports.V1FlowSchemaList = V1FlowSchemaList; -V1FlowSchemaList.discriminator = undefined; -V1FlowSchemaList.attributeTypeMap = [ - { - "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=v1FlowSchemaList.js.map - -/***/ }), - -/***/ 11284: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlowSchemaSpec = void 0; -/** -* FlowSchemaSpec describes how the FlowSchema\'s specification looks like. -*/ -class V1FlowSchemaSpec { - static getAttributeTypeMap() { - return V1FlowSchemaSpec.attributeTypeMap; - } -} -exports.V1FlowSchemaSpec = V1FlowSchemaSpec; -V1FlowSchemaSpec.discriminator = undefined; -V1FlowSchemaSpec.attributeTypeMap = [ - { - "name": "distinguisherMethod", - "baseName": "distinguisherMethod", - "type": "V1FlowDistinguisherMethod" - }, - { - "name": "matchingPrecedence", - "baseName": "matchingPrecedence", - "type": "number" - }, - { - "name": "priorityLevelConfiguration", - "baseName": "priorityLevelConfiguration", - "type": "V1PriorityLevelConfigurationReference" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1FlowSchemaSpec.js.map - -/***/ }), - -/***/ 31937: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlowSchemaStatus = void 0; -/** -* FlowSchemaStatus represents the current state of a FlowSchema. -*/ -class V1FlowSchemaStatus { - static getAttributeTypeMap() { - return V1FlowSchemaStatus.attributeTypeMap; - } -} -exports.V1FlowSchemaStatus = V1FlowSchemaStatus; -V1FlowSchemaStatus.discriminator = undefined; -V1FlowSchemaStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1FlowSchemaStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 51759: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GRPCAction = void 0; -class V1GRPCAction { - static getAttributeTypeMap() { - return V1GRPCAction.attributeTypeMap; - } -} -exports.V1GRPCAction = V1GRPCAction; -V1GRPCAction.discriminator = undefined; -V1GRPCAction.attributeTypeMap = [ - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "service", - "baseName": "service", - "type": "string" - } -]; -//# sourceMappingURL=v1GRPCAction.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 26771: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GroupSubject = void 0; -/** -* GroupSubject holds detailed information for group-kind subject. -*/ -class V1GroupSubject { - static getAttributeTypeMap() { - return V1GroupSubject.attributeTypeMap; - } -} -exports.V1GroupSubject = V1GroupSubject; -V1GroupSubject.discriminator = undefined; -V1GroupSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1GroupSubject.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 28890: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HostIP = void 0; -/** -* HostIP represents a single IP address allocated to the host. -*/ -class V1HostIP { - static getAttributeTypeMap() { - return V1HostIP.attributeTypeMap; - } -} -exports.V1HostIP = V1HostIP; -V1HostIP.discriminator = undefined; -V1HostIP.attributeTypeMap = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - } -]; -//# sourceMappingURL=v1HostIP.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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.0/24\",\"2001:db8::/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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 37996: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressLoadBalancerIngress = void 0; -/** -* IngressLoadBalancerIngress represents the status of a load-balancer ingress point. -*/ -class V1IngressLoadBalancerIngress { - static getAttributeTypeMap() { - return V1IngressLoadBalancerIngress.attributeTypeMap; - } -} -exports.V1IngressLoadBalancerIngress = V1IngressLoadBalancerIngress; -V1IngressLoadBalancerIngress.discriminator = undefined; -V1IngressLoadBalancerIngress.attributeTypeMap = [ - { - "name": "hostname", - "baseName": "hostname", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - } -]; -//# sourceMappingURL=v1IngressLoadBalancerIngress.js.map - -/***/ }), - -/***/ 54769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressLoadBalancerStatus = void 0; -/** -* IngressLoadBalancerStatus represents the status of a load-balancer. -*/ -class V1IngressLoadBalancerStatus { - static getAttributeTypeMap() { - return V1IngressLoadBalancerStatus.attributeTypeMap; - } -} -exports.V1IngressLoadBalancerStatus = V1IngressLoadBalancerStatus; -V1IngressLoadBalancerStatus.discriminator = undefined; -V1IngressLoadBalancerStatus.attributeTypeMap = [ - { - "name": "ingress", - "baseName": "ingress", - "type": "Array" - } -]; -//# sourceMappingURL=v1IngressLoadBalancerStatus.js.map - -/***/ }), - -/***/ 66726: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressPortStatus = void 0; -/** -* IngressPortStatus represents the error condition of a service port -*/ -class V1IngressPortStatus { - static getAttributeTypeMap() { - return V1IngressPortStatus.attributeTypeMap; - } -} -exports.V1IngressPortStatus = V1IngressPortStatus; -V1IngressPortStatus.discriminator = undefined; -V1IngressPortStatus.attributeTypeMap = [ - { - "name": "error", - "baseName": "error", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=v1IngressPortStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 45123: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1IngressLoadBalancerStatus" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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" - }, - { - "name": "x_kubernetes_validations", - "baseName": "x-kubernetes-validations", - "type": "Array" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "backoffLimitPerIndex", - "baseName": "backoffLimitPerIndex", - "type": "number" - }, - { - "name": "completionMode", - "baseName": "completionMode", - "type": "string" - }, - { - "name": "completions", - "baseName": "completions", - "type": "number" - }, - { - "name": "managedBy", - "baseName": "managedBy", - "type": "string" - }, - { - "name": "manualSelector", - "baseName": "manualSelector", - "type": "boolean" - }, - { - "name": "maxFailedIndexes", - "baseName": "maxFailedIndexes", - "type": "number" - }, - { - "name": "parallelism", - "baseName": "parallelism", - "type": "number" - }, - { - "name": "podFailurePolicy", - "baseName": "podFailurePolicy", - "type": "V1PodFailurePolicy" - }, - { - "name": "podReplacementPolicy", - "baseName": "podReplacementPolicy", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "successPolicy", - "baseName": "successPolicy", - "type": "V1SuccessPolicy" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "failedIndexes", - "baseName": "failedIndexes", - "type": "string" - }, - { - "name": "ready", - "baseName": "ready", - "type": "number" - }, - { - "name": "startTime", - "baseName": "startTime", - "type": "Date" - }, - { - "name": "succeeded", - "baseName": "succeeded", - "type": "number" - }, - { - "name": "terminating", - "baseName": "terminating", - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1MicroTime" - }, - { - "name": "holderIdentity", - "baseName": "holderIdentity", - "type": "string" - }, - { - "name": "leaseDurationSeconds", - "baseName": "leaseDurationSeconds", - "type": "number" - }, - { - "name": "leaseTransitions", - "baseName": "leaseTransitions", - "type": "number" - }, - { - "name": "renewTime", - "baseName": "renewTime", - "type": "V1MicroTime" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1LifecycleHandler" - }, - { - "name": "preStop", - "baseName": "preStop", - "type": "V1LifecycleHandler" - } -]; -//# sourceMappingURL=v1Lifecycle.js.map - -/***/ }), - -/***/ 52926: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LifecycleHandler = void 0; -/** -* LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified. -*/ -class V1LifecycleHandler { - static getAttributeTypeMap() { - return V1LifecycleHandler.attributeTypeMap; - } -} -exports.V1LifecycleHandler = V1LifecycleHandler; -V1LifecycleHandler.discriminator = undefined; -V1LifecycleHandler.attributeTypeMap = [ - { - "name": "exec", - "baseName": "exec", - "type": "V1ExecAction" - }, - { - "name": "httpGet", - "baseName": "httpGet", - "type": "V1HTTPGetAction" - }, - { - "name": "sleep", - "baseName": "sleep", - "type": "V1SleepAction" - }, - { - "name": "tcpSocket", - "baseName": "tcpSocket", - "type": "V1TCPSocketAction" - } -]; -//# sourceMappingURL=v1LifecycleHandler.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 25968: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LimitResponse = void 0; -/** -* LimitResponse defines how to handle requests that can not be executed right now. -*/ -class V1LimitResponse { - static getAttributeTypeMap() { - return V1LimitResponse.attributeTypeMap; - } -} -exports.V1LimitResponse = V1LimitResponse; -V1LimitResponse.discriminator = undefined; -V1LimitResponse.attributeTypeMap = [ - { - "name": "queuing", - "baseName": "queuing", - "type": "V1QueuingConfiguration" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1LimitResponse.js.map - -/***/ }), - -/***/ 59345: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LimitedPriorityLevelConfiguration = 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 V1LimitedPriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1LimitedPriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1LimitedPriorityLevelConfiguration = V1LimitedPriorityLevelConfiguration; -V1LimitedPriorityLevelConfiguration.discriminator = undefined; -V1LimitedPriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "borrowingLimitPercent", - "baseName": "borrowingLimitPercent", - "type": "number" - }, - { - "name": "lendablePercent", - "baseName": "lendablePercent", - "type": "number" - }, - { - "name": "limitResponse", - "baseName": "limitResponse", - "type": "V1LimitResponse" - }, - { - "name": "nominalConcurrencyShares", - "baseName": "nominalConcurrencyShares", - "type": "number" - } -]; -//# sourceMappingURL=v1LimitedPriorityLevelConfiguration.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "ipMode", - "baseName": "ipMode", - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 48062: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1MatchCondition = void 0; -/** -* MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. -*/ -class V1MatchCondition { - static getAttributeTypeMap() { - return V1MatchCondition.attributeTypeMap; - } -} -exports.V1MatchCondition = V1MatchCondition; -V1MatchCondition.discriminator = undefined; -V1MatchCondition.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1MatchCondition.js.map - -/***/ }), - -/***/ 17650: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1MatchResources = void 0; -/** -* MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) -*/ -class V1MatchResources { - static getAttributeTypeMap() { - return V1MatchResources.attributeTypeMap; - } -} -exports.V1MatchResources = V1MatchResources; -V1MatchResources.discriminator = undefined; -V1MatchResources.attributeTypeMap = [ - { - "name": "excludeResourceRules", - "baseName": "excludeResourceRules", - "type": "Array" - }, - { - "name": "matchPolicy", - "baseName": "matchPolicy", - "type": "string" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "objectSelector", - "baseName": "objectSelector", - "type": "V1LabelSelector" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - } -]; -//# sourceMappingURL=v1MatchResources.js.map - -/***/ }), - -/***/ 64093: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ModifyVolumeStatus = void 0; -/** -* ModifyVolumeStatus represents the status object of ControllerModifyVolume operation -*/ -class V1ModifyVolumeStatus { - static getAttributeTypeMap() { - return V1ModifyVolumeStatus.attributeTypeMap; - } -} -exports.V1ModifyVolumeStatus = V1ModifyVolumeStatus; -V1ModifyVolumeStatus.discriminator = undefined; -V1ModifyVolumeStatus.attributeTypeMap = [ - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "targetVolumeAttributesClassName", - "baseName": "targetVolumeAttributesClassName", - "type": "string" - } -]; -//# sourceMappingURL=v1ModifyVolumeStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "matchConditions", - "baseName": "matchConditions", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 65285: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NamedRuleWithOperations = void 0; -/** -* NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. -*/ -class V1NamedRuleWithOperations { - static getAttributeTypeMap() { - return V1NamedRuleWithOperations.attributeTypeMap; - } -} -exports.V1NamedRuleWithOperations = V1NamedRuleWithOperations; -V1NamedRuleWithOperations.discriminator = undefined; -V1NamedRuleWithOperations.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "apiVersions", - "baseName": "apiVersions", - "type": "Array" - }, - { - "name": "operations", - "baseName": "operations", - "type": "Array" - }, - { - "name": "resourceNames", - "baseName": "resourceNames", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "scope", - "baseName": "scope", - "type": "string" - } -]; -//# sourceMappingURL=v1NamedRuleWithOperations.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 87897: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeRuntimeHandler = void 0; -/** -* NodeRuntimeHandler is a set of runtime handler information. -*/ -class V1NodeRuntimeHandler { - static getAttributeTypeMap() { - return V1NodeRuntimeHandler.attributeTypeMap; - } -} -exports.V1NodeRuntimeHandler = V1NodeRuntimeHandler; -V1NodeRuntimeHandler.discriminator = undefined; -V1NodeRuntimeHandler.attributeTypeMap = [ - { - "name": "features", - "baseName": "features", - "type": "V1NodeRuntimeHandlerFeatures" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1NodeRuntimeHandler.js.map - -/***/ }), - -/***/ 81563: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeRuntimeHandlerFeatures = void 0; -/** -* NodeRuntimeHandlerFeatures is a set of runtime features. -*/ -class V1NodeRuntimeHandlerFeatures { - static getAttributeTypeMap() { - return V1NodeRuntimeHandlerFeatures.attributeTypeMap; - } -} -exports.V1NodeRuntimeHandlerFeatures = V1NodeRuntimeHandlerFeatures; -V1NodeRuntimeHandlerFeatures.discriminator = undefined; -V1NodeRuntimeHandlerFeatures.attributeTypeMap = [ - { - "name": "recursiveReadOnlyMounts", - "baseName": "recursiveReadOnlyMounts", - "type": "boolean" - } -]; -//# sourceMappingURL=v1NodeRuntimeHandlerFeatures.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "runtimeHandlers", - "baseName": "runtimeHandlers", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 79873: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NonResourcePolicyRule = 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 V1NonResourcePolicyRule { - static getAttributeTypeMap() { - return V1NonResourcePolicyRule.attributeTypeMap; - } -} -exports.V1NonResourcePolicyRule = V1NonResourcePolicyRule; -V1NonResourcePolicyRule.discriminator = undefined; -V1NonResourcePolicyRule.attributeTypeMap = [ - { - "name": "nonResourceURLs", - "baseName": "nonResourceURLs", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1NonResourcePolicyRule.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 13595: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ParamKind = void 0; -/** -* ParamKind is a tuple of Group Kind and Version. -*/ -class V1ParamKind { - static getAttributeTypeMap() { - return V1ParamKind.attributeTypeMap; - } -} -exports.V1ParamKind = V1ParamKind; -V1ParamKind.discriminator = undefined; -V1ParamKind.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - } -]; -//# sourceMappingURL=v1ParamKind.js.map - -/***/ }), - -/***/ 71943: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ParamRef = void 0; -/** -* ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. -*/ -class V1ParamRef { - static getAttributeTypeMap() { - return V1ParamRef.attributeTypeMap; - } -} -exports.V1ParamRef = V1ParamRef; -V1ParamRef.discriminator = undefined; -V1ParamRef.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "parameterNotFoundAction", - "baseName": "parameterNotFoundAction", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v1ParamRef.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 contains 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "V1TypedObjectReference" - }, - { - "name": "resources", - "baseName": "resources", - "type": "V1VolumeResourceRequirements" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "storageClassName", - "baseName": "storageClassName", - "type": "string" - }, - { - "name": "volumeAttributesClassName", - "baseName": "volumeAttributesClassName", - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "allocatedResourceStatuses", - "baseName": "allocatedResourceStatuses", - "type": "{ [key: string]: string; }" - }, - { - "name": "allocatedResources", - "baseName": "allocatedResources", - "type": "{ [key: string]: string; }" - }, - { - "name": "capacity", - "baseName": "capacity", - "type": "{ [key: string]: string; }" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentVolumeAttributesClassName", - "baseName": "currentVolumeAttributesClassName", - "type": "string" - }, - { - "name": "modifyVolumeStatus", - "baseName": "modifyVolumeStatus", - "type": "V1ModifyVolumeStatus" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "volumeAttributesClassName", - "baseName": "volumeAttributesClassName", - "type": "string" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "lastPhaseTransitionTime", - "baseName": "lastPhaseTransitionTime", - "type": "Date" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "matchLabelKeys", - "baseName": "matchLabelKeys", - "type": "Array" - }, - { - "name": "mismatchLabelKeys", - "baseName": "mismatchLabelKeys", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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" - }, - { - "name": "unhealthyPodEvictionPolicy", - "baseName": "unhealthyPodEvictionPolicy", - "type": "string" - } -]; -//# 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 16092: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodFailurePolicy = void 0; -/** -* PodFailurePolicy describes how failed pods influence the backoffLimit. -*/ -class V1PodFailurePolicy { - static getAttributeTypeMap() { - return V1PodFailurePolicy.attributeTypeMap; - } -} -exports.V1PodFailurePolicy = V1PodFailurePolicy; -V1PodFailurePolicy.discriminator = undefined; -V1PodFailurePolicy.attributeTypeMap = [ - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodFailurePolicy.js.map - -/***/ }), - -/***/ 6126: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodFailurePolicyOnExitCodesRequirement = void 0; -/** -* PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes. In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check. -*/ -class V1PodFailurePolicyOnExitCodesRequirement { - static getAttributeTypeMap() { - return V1PodFailurePolicyOnExitCodesRequirement.attributeTypeMap; - } -} -exports.V1PodFailurePolicyOnExitCodesRequirement = V1PodFailurePolicyOnExitCodesRequirement; -V1PodFailurePolicyOnExitCodesRequirement.discriminator = undefined; -V1PodFailurePolicyOnExitCodesRequirement.attributeTypeMap = [ - { - "name": "containerName", - "baseName": "containerName", - "type": "string" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string" - }, - { - "name": "values", - "baseName": "values", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodFailurePolicyOnExitCodesRequirement.js.map - -/***/ }), - -/***/ 64507: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodFailurePolicyOnPodConditionsPattern = void 0; -/** -* PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type. -*/ -class V1PodFailurePolicyOnPodConditionsPattern { - static getAttributeTypeMap() { - return V1PodFailurePolicyOnPodConditionsPattern.attributeTypeMap; - } -} -exports.V1PodFailurePolicyOnPodConditionsPattern = V1PodFailurePolicyOnPodConditionsPattern; -V1PodFailurePolicyOnPodConditionsPattern.discriminator = undefined; -V1PodFailurePolicyOnPodConditionsPattern.attributeTypeMap = [ - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1PodFailurePolicyOnPodConditionsPattern.js.map - -/***/ }), - -/***/ 70306: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodFailurePolicyRule = void 0; -/** -* PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule. -*/ -class V1PodFailurePolicyRule { - static getAttributeTypeMap() { - return V1PodFailurePolicyRule.attributeTypeMap; - } -} -exports.V1PodFailurePolicyRule = V1PodFailurePolicyRule; -V1PodFailurePolicyRule.discriminator = undefined; -V1PodFailurePolicyRule.attributeTypeMap = [ - { - "name": "action", - "baseName": "action", - "type": "string" - }, - { - "name": "onExitCodes", - "baseName": "onExitCodes", - "type": "V1PodFailurePolicyOnExitCodesRequirement" - }, - { - "name": "onPodConditions", - "baseName": "onPodConditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodFailurePolicyRule.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: release-1.30 - * - * - * NOTE: This class is auto generated 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; -/** -* PodIP represents a single IP address allocated to the pod. -*/ -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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 92047: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodOS = void 0; -/** -* PodOS defines the OS parameters of a pod. -*/ -class V1PodOS { - static getAttributeTypeMap() { - return V1PodOS.attributeTypeMap; - } -} -exports.V1PodOS = V1PodOS; -V1PodOS.discriminator = undefined; -V1PodOS.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1PodOS.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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 65763: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodResourceClaim = void 0; -/** -* PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name. -*/ -class V1PodResourceClaim { - static getAttributeTypeMap() { - return V1PodResourceClaim.attributeTypeMap; - } -} -exports.V1PodResourceClaim = V1PodResourceClaim; -V1PodResourceClaim.discriminator = undefined; -V1PodResourceClaim.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "source", - "baseName": "source", - "type": "V1ClaimSource" - } -]; -//# sourceMappingURL=v1PodResourceClaim.js.map - -/***/ }), - -/***/ 69369: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodResourceClaimStatus = void 0; -/** -* PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim. -*/ -class V1PodResourceClaimStatus { - static getAttributeTypeMap() { - return V1PodResourceClaimStatus.attributeTypeMap; - } -} -exports.V1PodResourceClaimStatus = V1PodResourceClaimStatus; -V1PodResourceClaimStatus.discriminator = undefined; -V1PodResourceClaimStatus.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "resourceClaimName", - "baseName": "resourceClaimName", - "type": "string" - } -]; -//# sourceMappingURL=v1PodResourceClaimStatus.js.map - -/***/ }), - -/***/ 63531: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodSchedulingGate = void 0; -/** -* PodSchedulingGate is associated to a Pod to guard its scheduling. -*/ -class V1PodSchedulingGate { - static getAttributeTypeMap() { - return V1PodSchedulingGate.attributeTypeMap; - } -} -exports.V1PodSchedulingGate = V1PodSchedulingGate; -V1PodSchedulingGate.discriminator = undefined; -V1PodSchedulingGate.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1PodSchedulingGate.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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "appArmorProfile", - "baseName": "appArmorProfile", - "type": "V1AppArmorProfile" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "hostUsers", - "baseName": "hostUsers", - "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": "os", - "baseName": "os", - "type": "V1PodOS" - }, - { - "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": "resourceClaims", - "baseName": "resourceClaims", - "type": "Array" - }, - { - "name": "restartPolicy", - "baseName": "restartPolicy", - "type": "string" - }, - { - "name": "runtimeClassName", - "baseName": "runtimeClassName", - "type": "string" - }, - { - "name": "schedulerName", - "baseName": "schedulerName", - "type": "string" - }, - { - "name": "schedulingGates", - "baseName": "schedulingGates", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "hostIPs", - "baseName": "hostIPs", - "type": "Array" - }, - { - "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": "resize", - "baseName": "resize", - "type": "string" - }, - { - "name": "resourceClaimStatuses", - "baseName": "resourceClaimStatuses", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 86950: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PolicyRulesWithSubjects = 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 V1PolicyRulesWithSubjects { - static getAttributeTypeMap() { - return V1PolicyRulesWithSubjects.attributeTypeMap; - } -} -exports.V1PolicyRulesWithSubjects = V1PolicyRulesWithSubjects; -V1PolicyRulesWithSubjects.discriminator = undefined; -V1PolicyRulesWithSubjects.attributeTypeMap = [ - { - "name": "nonResourceRules", - "baseName": "nonResourceRules", - "type": "Array" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1PolicyRulesWithSubjects.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 17551: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityLevelConfiguration = void 0; -/** -* PriorityLevelConfiguration represents the configuration of a priority level. -*/ -class V1PriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1PriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1PriorityLevelConfiguration = V1PriorityLevelConfiguration; -V1PriorityLevelConfiguration.discriminator = undefined; -V1PriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PriorityLevelConfigurationSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1PriorityLevelConfigurationStatus" - } -]; -//# sourceMappingURL=v1PriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 28354: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityLevelConfigurationCondition = void 0; -/** -* PriorityLevelConfigurationCondition defines the condition of priority level. -*/ -class V1PriorityLevelConfigurationCondition { - static getAttributeTypeMap() { - return V1PriorityLevelConfigurationCondition.attributeTypeMap; - } -} -exports.V1PriorityLevelConfigurationCondition = V1PriorityLevelConfigurationCondition; -V1PriorityLevelConfigurationCondition.discriminator = undefined; -V1PriorityLevelConfigurationCondition.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=v1PriorityLevelConfigurationCondition.js.map - -/***/ }), - -/***/ 33349: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityLevelConfigurationList = void 0; -/** -* PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. -*/ -class V1PriorityLevelConfigurationList { - static getAttributeTypeMap() { - return V1PriorityLevelConfigurationList.attributeTypeMap; - } -} -exports.V1PriorityLevelConfigurationList = V1PriorityLevelConfigurationList; -V1PriorityLevelConfigurationList.discriminator = undefined; -V1PriorityLevelConfigurationList.attributeTypeMap = [ - { - "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=v1PriorityLevelConfigurationList.js.map - -/***/ }), - -/***/ 24471: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityLevelConfigurationReference = void 0; -/** -* PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. -*/ -class V1PriorityLevelConfigurationReference { - static getAttributeTypeMap() { - return V1PriorityLevelConfigurationReference.attributeTypeMap; - } -} -exports.V1PriorityLevelConfigurationReference = V1PriorityLevelConfigurationReference; -V1PriorityLevelConfigurationReference.discriminator = undefined; -V1PriorityLevelConfigurationReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1PriorityLevelConfigurationReference.js.map - -/***/ }), - -/***/ 41597: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityLevelConfigurationSpec = void 0; -/** -* PriorityLevelConfigurationSpec specifies the configuration of a priority level. -*/ -class V1PriorityLevelConfigurationSpec { - static getAttributeTypeMap() { - return V1PriorityLevelConfigurationSpec.attributeTypeMap; - } -} -exports.V1PriorityLevelConfigurationSpec = V1PriorityLevelConfigurationSpec; -V1PriorityLevelConfigurationSpec.discriminator = undefined; -V1PriorityLevelConfigurationSpec.attributeTypeMap = [ - { - "name": "exempt", - "baseName": "exempt", - "type": "V1ExemptPriorityLevelConfiguration" - }, - { - "name": "limited", - "baseName": "limited", - "type": "V1LimitedPriorityLevelConfiguration" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1PriorityLevelConfigurationSpec.js.map - -/***/ }), - -/***/ 50380: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityLevelConfigurationStatus = void 0; -/** -* PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". -*/ -class V1PriorityLevelConfigurationStatus { - static getAttributeTypeMap() { - return V1PriorityLevelConfigurationStatus.attributeTypeMap; - } -} -exports.V1PriorityLevelConfigurationStatus = V1PriorityLevelConfigurationStatus; -V1PriorityLevelConfigurationStatus.discriminator = undefined; -V1PriorityLevelConfigurationStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1PriorityLevelConfigurationStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "grpc", - "baseName": "grpc", - "type": "V1GRPCAction" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 43635: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1QueuingConfiguration = void 0; -/** -* QueuingConfiguration holds the configuration parameters for queuing -*/ -class V1QueuingConfiguration { - static getAttributeTypeMap() { - return V1QueuingConfiguration.attributeTypeMap; - } -} -exports.V1QueuingConfiguration = V1QueuingConfiguration; -V1QueuingConfiguration.discriminator = undefined; -V1QueuingConfiguration.attributeTypeMap = [ - { - "name": "handSize", - "baseName": "handSize", - "type": "number" - }, - { - "name": "queueLengthLimit", - "baseName": "queueLengthLimit", - "type": "number" - }, - { - "name": "queues", - "baseName": "queues", - "type": "number" - } -]; -//# sourceMappingURL=v1QueuingConfiguration.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 60418: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceClaim = void 0; -/** -* ResourceClaim references one entry in PodSpec.ResourceClaims. -*/ -class V1ResourceClaim { - static getAttributeTypeMap() { - return V1ResourceClaim.attributeTypeMap; - } -} -exports.V1ResourceClaim = V1ResourceClaim; -V1ResourceClaim.discriminator = undefined; -V1ResourceClaim.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1ResourceClaim.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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 32647: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourcePolicyRule = 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) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request\'s namespace. -*/ -class V1ResourcePolicyRule { - static getAttributeTypeMap() { - return V1ResourcePolicyRule.attributeTypeMap; - } -} -exports.V1ResourcePolicyRule = V1ResourcePolicyRule; -V1ResourcePolicyRule.discriminator = undefined; -V1ResourcePolicyRule.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=v1ResourcePolicyRule.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "claims", - "baseName": "claims", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "maxUnavailable", - "baseName": "maxUnavailable", - "type": "IntOrString" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "appArmorProfile", - "baseName": "appArmorProfile", - "type": "V1AppArmorProfile" - }, - { - "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 - -/***/ }), - -/***/ 26789: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelectableField = void 0; -/** -* SelectableField specifies the JSON path of a field that may be used with field selectors. -*/ -class V1SelectableField { - static getAttributeTypeMap() { - return V1SelectableField.attributeTypeMap; - } -} -exports.V1SelectableField = V1SelectableField; -V1SelectableField.discriminator = undefined; -V1SelectableField.attributeTypeMap = [ - { - "name": "jsonPath", - "baseName": "jsonPath", - "type": "string" - } -]; -//# sourceMappingURL=v1SelectableField.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 50375: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelfSubjectReview = void 0; -/** -* SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. -*/ -class V1SelfSubjectReview { - static getAttributeTypeMap() { - return V1SelfSubjectReview.attributeTypeMap; - } -} -exports.V1SelfSubjectReview = V1SelfSubjectReview; -V1SelfSubjectReview.discriminator = undefined; -V1SelfSubjectReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "status", - "baseName": "status", - "type": "V1SelfSubjectReviewStatus" - } -]; -//# sourceMappingURL=v1SelfSubjectReview.js.map - -/***/ }), - -/***/ 75445: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelfSubjectReviewStatus = void 0; -/** -* SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. -*/ -class V1SelfSubjectReviewStatus { - static getAttributeTypeMap() { - return V1SelfSubjectReviewStatus.attributeTypeMap; - } -} -exports.V1SelfSubjectReviewStatus = V1SelfSubjectReviewStatus; -V1SelfSubjectReviewStatus.discriminator = undefined; -V1SelfSubjectReviewStatus.attributeTypeMap = [ - { - "name": "userInfo", - "baseName": "userInfo", - "type": "V1UserInfo" - } -]; -//# sourceMappingURL=v1SelfSubjectReviewStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 68267: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceAccountSubject = void 0; -/** -* ServiceAccountSubject holds detailed information for service-account-kind subject. -*/ -class V1ServiceAccountSubject { - static getAttributeTypeMap() { - return V1ServiceAccountSubject.attributeTypeMap; - } -} -exports.V1ServiceAccountSubject = V1ServiceAccountSubject; -V1ServiceAccountSubject.discriminator = undefined; -V1ServiceAccountSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1ServiceAccountSubject.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "trafficDistribution", - "baseName": "trafficDistribution", - "type": "string" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 51981: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SleepAction = void 0; -/** -* SleepAction describes a \"sleep\" action. -*/ -class V1SleepAction { - static getAttributeTypeMap() { - return V1SleepAction.attributeTypeMap; - } -} -exports.V1SleepAction = V1SleepAction; -V1SleepAction.discriminator = undefined; -V1SleepAction.attributeTypeMap = [ - { - "name": "seconds", - "baseName": "seconds", - "type": "number" - } -]; -//# sourceMappingURL=v1SleepAction.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 29126: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetOrdinals = void 0; -/** -* StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet. -*/ -class V1StatefulSetOrdinals { - static getAttributeTypeMap() { - return V1StatefulSetOrdinals.attributeTypeMap; - } -} -exports.V1StatefulSetOrdinals = V1StatefulSetOrdinals; -V1StatefulSetOrdinals.discriminator = undefined; -V1StatefulSetOrdinals.attributeTypeMap = [ - { - "name": "start", - "baseName": "start", - "type": "number" - } -]; -//# sourceMappingURL=v1StatefulSetOrdinals.js.map - -/***/ }), - -/***/ 27330: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetPersistentVolumeClaimRetentionPolicy = void 0; -/** -* StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. -*/ -class V1StatefulSetPersistentVolumeClaimRetentionPolicy { - static getAttributeTypeMap() { - return V1StatefulSetPersistentVolumeClaimRetentionPolicy.attributeTypeMap; - } -} -exports.V1StatefulSetPersistentVolumeClaimRetentionPolicy = V1StatefulSetPersistentVolumeClaimRetentionPolicy; -V1StatefulSetPersistentVolumeClaimRetentionPolicy.discriminator = undefined; -V1StatefulSetPersistentVolumeClaimRetentionPolicy.attributeTypeMap = [ - { - "name": "whenDeleted", - "baseName": "whenDeleted", - "type": "string" - }, - { - "name": "whenScaled", - "baseName": "whenScaled", - "type": "string" - } -]; -//# sourceMappingURL=v1StatefulSetPersistentVolumeClaimRetentionPolicy.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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "ordinals", - "baseName": "ordinals", - "type": "V1StatefulSetOrdinals" - }, - { - "name": "persistentVolumeClaimRetentionPolicy", - "baseName": "persistentVolumeClaimRetentionPolicy", - "type": "V1StatefulSetPersistentVolumeClaimRetentionPolicy" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 85010: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SuccessPolicy = void 0; -/** -* SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. -*/ -class V1SuccessPolicy { - static getAttributeTypeMap() { - return V1SuccessPolicy.attributeTypeMap; - } -} -exports.V1SuccessPolicy = V1SuccessPolicy; -V1SuccessPolicy.discriminator = undefined; -V1SuccessPolicy.attributeTypeMap = [ - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1SuccessPolicy.js.map - -/***/ }), - -/***/ 57665: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SuccessPolicyRule = void 0; -/** -* SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the \"succeededIndexes\" or \"succeededCount\" specified. -*/ -class V1SuccessPolicyRule { - static getAttributeTypeMap() { - return V1SuccessPolicyRule.attributeTypeMap; - } -} -exports.V1SuccessPolicyRule = V1SuccessPolicyRule; -V1SuccessPolicyRule.discriminator = undefined; -V1SuccessPolicyRule.attributeTypeMap = [ - { - "name": "succeededCount", - "baseName": "succeededCount", - "type": "number" - }, - { - "name": "succeededIndexes", - "baseName": "succeededIndexes", - "type": "string" - } -]; -//# sourceMappingURL=v1SuccessPolicyRule.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 76417: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "matchLabelKeys", - "baseName": "matchLabelKeys", - "type": "Array" - }, - { - "name": "maxSkew", - "baseName": "maxSkew", - "type": "number" - }, - { - "name": "minDomains", - "baseName": "minDomains", - "type": "number" - }, - { - "name": "nodeAffinityPolicy", - "baseName": "nodeAffinityPolicy", - "type": "string" - }, - { - "name": "nodeTaintsPolicy", - "baseName": "nodeTaintsPolicy", - "type": "string" - }, - { - "name": "topologyKey", - "baseName": "topologyKey", - "type": "string" - }, - { - "name": "whenUnsatisfiable", - "baseName": "whenUnsatisfiable", - "type": "string" - } -]; -//# sourceMappingURL=v1TopologySpreadConstraint.js.map - -/***/ }), - -/***/ 49751: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TypeChecking = void 0; -/** -* TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy -*/ -class V1TypeChecking { - static getAttributeTypeMap() { - return V1TypeChecking.attributeTypeMap; - } -} -exports.V1TypeChecking = V1TypeChecking; -V1TypeChecking.discriminator = undefined; -V1TypeChecking.attributeTypeMap = [ - { - "name": "expressionWarnings", - "baseName": "expressionWarnings", - "type": "Array" - } -]; -//# sourceMappingURL=v1TypeChecking.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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 64758: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TypedObjectReference = void 0; -class V1TypedObjectReference { - static getAttributeTypeMap() { - return V1TypedObjectReference.attributeTypeMap; - } -} -exports.V1TypedObjectReference = V1TypedObjectReference; -V1TypedObjectReference.discriminator = undefined; -V1TypedObjectReference.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=v1TypedObjectReference.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 47530: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1UserSubject = void 0; -/** -* UserSubject holds detailed information for user-kind subject. -*/ -class V1UserSubject { - static getAttributeTypeMap() { - return V1UserSubject.attributeTypeMap; - } -} -exports.V1UserSubject = V1UserSubject; -V1UserSubject.discriminator = undefined; -V1UserSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1UserSubject.js.map - -/***/ }), - -/***/ 26947: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicy = void 0; -/** -* ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. -*/ -class V1ValidatingAdmissionPolicy { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicy.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicy = V1ValidatingAdmissionPolicy; -V1ValidatingAdmissionPolicy.discriminator = undefined; -V1ValidatingAdmissionPolicy.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ValidatingAdmissionPolicySpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1ValidatingAdmissionPolicyStatus" - } -]; -//# sourceMappingURL=v1ValidatingAdmissionPolicy.js.map - -/***/ }), - -/***/ 21688: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicyBinding = void 0; -/** -* ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don\'t use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. -*/ -class V1ValidatingAdmissionPolicyBinding { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicyBinding.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicyBinding = V1ValidatingAdmissionPolicyBinding; -V1ValidatingAdmissionPolicyBinding.discriminator = undefined; -V1ValidatingAdmissionPolicyBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ValidatingAdmissionPolicyBindingSpec" - } -]; -//# sourceMappingURL=v1ValidatingAdmissionPolicyBinding.js.map - -/***/ }), - -/***/ 36564: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicyBindingList = void 0; -/** -* ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. -*/ -class V1ValidatingAdmissionPolicyBindingList { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicyBindingList.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicyBindingList = V1ValidatingAdmissionPolicyBindingList; -V1ValidatingAdmissionPolicyBindingList.discriminator = undefined; -V1ValidatingAdmissionPolicyBindingList.attributeTypeMap = [ - { - "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=v1ValidatingAdmissionPolicyBindingList.js.map - -/***/ }), - -/***/ 6085: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicyBindingSpec = void 0; -/** -* ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. -*/ -class V1ValidatingAdmissionPolicyBindingSpec { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicyBindingSpec.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicyBindingSpec = V1ValidatingAdmissionPolicyBindingSpec; -V1ValidatingAdmissionPolicyBindingSpec.discriminator = undefined; -V1ValidatingAdmissionPolicyBindingSpec.attributeTypeMap = [ - { - "name": "matchResources", - "baseName": "matchResources", - "type": "V1MatchResources" - }, - { - "name": "paramRef", - "baseName": "paramRef", - "type": "V1ParamRef" - }, - { - "name": "policyName", - "baseName": "policyName", - "type": "string" - }, - { - "name": "validationActions", - "baseName": "validationActions", - "type": "Array" - } -]; -//# sourceMappingURL=v1ValidatingAdmissionPolicyBindingSpec.js.map - -/***/ }), - -/***/ 41226: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicyList = void 0; -/** -* ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. -*/ -class V1ValidatingAdmissionPolicyList { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicyList.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicyList = V1ValidatingAdmissionPolicyList; -V1ValidatingAdmissionPolicyList.discriminator = undefined; -V1ValidatingAdmissionPolicyList.attributeTypeMap = [ - { - "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=v1ValidatingAdmissionPolicyList.js.map - -/***/ }), - -/***/ 60046: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicySpec = void 0; -/** -* ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. -*/ -class V1ValidatingAdmissionPolicySpec { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicySpec.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicySpec = V1ValidatingAdmissionPolicySpec; -V1ValidatingAdmissionPolicySpec.discriminator = undefined; -V1ValidatingAdmissionPolicySpec.attributeTypeMap = [ - { - "name": "auditAnnotations", - "baseName": "auditAnnotations", - "type": "Array" - }, - { - "name": "failurePolicy", - "baseName": "failurePolicy", - "type": "string" - }, - { - "name": "matchConditions", - "baseName": "matchConditions", - "type": "Array" - }, - { - "name": "matchConstraints", - "baseName": "matchConstraints", - "type": "V1MatchResources" - }, - { - "name": "paramKind", - "baseName": "paramKind", - "type": "V1ParamKind" - }, - { - "name": "validations", - "baseName": "validations", - "type": "Array" - }, - { - "name": "variables", - "baseName": "variables", - "type": "Array" - } -]; -//# sourceMappingURL=v1ValidatingAdmissionPolicySpec.js.map - -/***/ }), - -/***/ 45612: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingAdmissionPolicyStatus = void 0; -/** -* ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. -*/ -class V1ValidatingAdmissionPolicyStatus { - static getAttributeTypeMap() { - return V1ValidatingAdmissionPolicyStatus.attributeTypeMap; - } -} -exports.V1ValidatingAdmissionPolicyStatus = V1ValidatingAdmissionPolicyStatus; -V1ValidatingAdmissionPolicyStatus.discriminator = undefined; -V1ValidatingAdmissionPolicyStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "typeChecking", - "baseName": "typeChecking", - "type": "V1TypeChecking" - } -]; -//# sourceMappingURL=v1ValidatingAdmissionPolicyStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "matchConditions", - "baseName": "matchConditions", - "type": "Array" - }, - { - "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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 76065: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Validation = void 0; -/** -* Validation specifies the CEL expression which is used to apply the validation. -*/ -class V1Validation { - static getAttributeTypeMap() { - return V1Validation.attributeTypeMap; - } -} -exports.V1Validation = V1Validation; -V1Validation.discriminator = undefined; -V1Validation.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "messageExpression", - "baseName": "messageExpression", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1Validation.js.map - -/***/ }), - -/***/ 43740: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidationRule = void 0; -/** -* ValidationRule describes a validation rule written in the CEL expression language. -*/ -class V1ValidationRule { - static getAttributeTypeMap() { - return V1ValidationRule.attributeTypeMap; - } -} -exports.V1ValidationRule = V1ValidationRule; -V1ValidationRule.discriminator = undefined; -V1ValidationRule.attributeTypeMap = [ - { - "name": "fieldPath", - "baseName": "fieldPath", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "messageExpression", - "baseName": "messageExpression", - "type": "string" - }, - { - "name": "optionalOldSelf", - "baseName": "optionalOldSelf", - "type": "boolean" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "rule", - "baseName": "rule", - "type": "string" - } -]; -//# sourceMappingURL=v1ValidationRule.js.map - -/***/ }), - -/***/ 23505: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Variable = void 0; -/** -* Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. -*/ -class V1Variable { - static getAttributeTypeMap() { - return V1Variable.attributeTypeMap; - } -} -exports.V1Variable = V1Variable; -V1Variable.discriminator = undefined; -V1Variable.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1Variable.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "recursiveReadOnly", - "baseName": "recursiveReadOnly", - "type": "string" - }, - { - "name": "subPath", - "baseName": "subPath", - "type": "string" - }, - { - "name": "subPathExpr", - "baseName": "subPathExpr", - "type": "string" - } -]; -//# sourceMappingURL=v1VolumeMount.js.map - -/***/ }), - -/***/ 37931: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeMountStatus = void 0; -/** -* VolumeMountStatus shows status of volume mounts. -*/ -class V1VolumeMountStatus { - static getAttributeTypeMap() { - return V1VolumeMountStatus.attributeTypeMap; - } -} -exports.V1VolumeMountStatus = V1VolumeMountStatus; -V1VolumeMountStatus.discriminator = undefined; -V1VolumeMountStatus.attributeTypeMap = [ - { - "name": "mountPath", - "baseName": "mountPath", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "recursiveReadOnly", - "baseName": "recursiveReadOnly", - "type": "string" - } -]; -//# sourceMappingURL=v1VolumeMountStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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": "clusterTrustBundle", - "baseName": "clusterTrustBundle", - "type": "V1ClusterTrustBundleProjection" - }, - { - "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 - -/***/ }), - -/***/ 83891: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeResourceRequirements = void 0; -/** -* VolumeResourceRequirements describes the storage resource requirements for a volume. -*/ -class V1VolumeResourceRequirements { - static getAttributeTypeMap() { - return V1VolumeResourceRequirements.attributeTypeMap; - } -} -exports.V1VolumeResourceRequirements = V1VolumeResourceRequirements; -V1VolumeResourceRequirements.discriminator = undefined; -V1VolumeResourceRequirements.attributeTypeMap = [ - { - "name": "limits", - "baseName": "limits", - "type": "{ [key: string]: string; }" - }, - { - "name": "requests", - "baseName": "requests", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1VolumeResourceRequirements.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 20227: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1AuditAnnotation = void 0; -/** -* AuditAnnotation describes how to produce an audit annotation for an API request. -*/ -class V1alpha1AuditAnnotation { - static getAttributeTypeMap() { - return V1alpha1AuditAnnotation.attributeTypeMap; - } -} -exports.V1alpha1AuditAnnotation = V1alpha1AuditAnnotation; -V1alpha1AuditAnnotation.discriminator = undefined; -V1alpha1AuditAnnotation.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "valueExpression", - "baseName": "valueExpression", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1AuditAnnotation.js.map - -/***/ }), - -/***/ 77151: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterTrustBundle = void 0; -/** -* ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates). ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the `clusterTrustBundle` projection. All service accounts have read access to ClusterTrustBundles by default. Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to. It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle. -*/ -class V1alpha1ClusterTrustBundle { - static getAttributeTypeMap() { - return V1alpha1ClusterTrustBundle.attributeTypeMap; - } -} -exports.V1alpha1ClusterTrustBundle = V1alpha1ClusterTrustBundle; -V1alpha1ClusterTrustBundle.discriminator = undefined; -V1alpha1ClusterTrustBundle.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1ClusterTrustBundleSpec" - } -]; -//# sourceMappingURL=v1alpha1ClusterTrustBundle.js.map - -/***/ }), - -/***/ 82469: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterTrustBundleList = void 0; -/** -* ClusterTrustBundleList is a collection of ClusterTrustBundle objects -*/ -class V1alpha1ClusterTrustBundleList { - static getAttributeTypeMap() { - return V1alpha1ClusterTrustBundleList.attributeTypeMap; - } -} -exports.V1alpha1ClusterTrustBundleList = V1alpha1ClusterTrustBundleList; -V1alpha1ClusterTrustBundleList.discriminator = undefined; -V1alpha1ClusterTrustBundleList.attributeTypeMap = [ - { - "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=v1alpha1ClusterTrustBundleList.js.map - -/***/ }), - -/***/ 82835: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterTrustBundleSpec = void 0; -/** -* ClusterTrustBundleSpec contains the signer and trust anchors. -*/ -class V1alpha1ClusterTrustBundleSpec { - static getAttributeTypeMap() { - return V1alpha1ClusterTrustBundleSpec.attributeTypeMap; - } -} -exports.V1alpha1ClusterTrustBundleSpec = V1alpha1ClusterTrustBundleSpec; -V1alpha1ClusterTrustBundleSpec.discriminator = undefined; -V1alpha1ClusterTrustBundleSpec.attributeTypeMap = [ - { - "name": "signerName", - "baseName": "signerName", - "type": "string" - }, - { - "name": "trustBundle", - "baseName": "trustBundle", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1ClusterTrustBundleSpec.js.map - -/***/ }), - -/***/ 89682: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ExpressionWarning = void 0; -/** -* ExpressionWarning is a warning information that targets a specific expression. -*/ -class V1alpha1ExpressionWarning { - static getAttributeTypeMap() { - return V1alpha1ExpressionWarning.attributeTypeMap; - } -} -exports.V1alpha1ExpressionWarning = V1alpha1ExpressionWarning; -V1alpha1ExpressionWarning.discriminator = undefined; -V1alpha1ExpressionWarning.attributeTypeMap = [ - { - "name": "fieldRef", - "baseName": "fieldRef", - "type": "string" - }, - { - "name": "warning", - "baseName": "warning", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1ExpressionWarning.js.map - -/***/ }), - -/***/ 36113: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1GroupVersionResource = void 0; -/** -* The names of the group, the version, and the resource. -*/ -class V1alpha1GroupVersionResource { - static getAttributeTypeMap() { - return V1alpha1GroupVersionResource.attributeTypeMap; - } -} -exports.V1alpha1GroupVersionResource = V1alpha1GroupVersionResource; -V1alpha1GroupVersionResource.discriminator = undefined; -V1alpha1GroupVersionResource.attributeTypeMap = [ - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "resource", - "baseName": "resource", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1GroupVersionResource.js.map - -/***/ }), - -/***/ 28363: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1IPAddress = void 0; -/** -* IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 -*/ -class V1alpha1IPAddress { - static getAttributeTypeMap() { - return V1alpha1IPAddress.attributeTypeMap; - } -} -exports.V1alpha1IPAddress = V1alpha1IPAddress; -V1alpha1IPAddress.discriminator = undefined; -V1alpha1IPAddress.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1IPAddressSpec" - } -]; -//# sourceMappingURL=v1alpha1IPAddress.js.map - -/***/ }), - -/***/ 66867: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1IPAddressList = void 0; -/** -* IPAddressList contains a list of IPAddress. -*/ -class V1alpha1IPAddressList { - static getAttributeTypeMap() { - return V1alpha1IPAddressList.attributeTypeMap; - } -} -exports.V1alpha1IPAddressList = V1alpha1IPAddressList; -V1alpha1IPAddressList.discriminator = undefined; -V1alpha1IPAddressList.attributeTypeMap = [ - { - "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=v1alpha1IPAddressList.js.map - -/***/ }), - -/***/ 77594: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1IPAddressSpec = void 0; -/** -* IPAddressSpec describe the attributes in an IP Address. -*/ -class V1alpha1IPAddressSpec { - static getAttributeTypeMap() { - return V1alpha1IPAddressSpec.attributeTypeMap; - } -} -exports.V1alpha1IPAddressSpec = V1alpha1IPAddressSpec; -V1alpha1IPAddressSpec.discriminator = undefined; -V1alpha1IPAddressSpec.attributeTypeMap = [ - { - "name": "parentRef", - "baseName": "parentRef", - "type": "V1alpha1ParentReference" - } -]; -//# sourceMappingURL=v1alpha1IPAddressSpec.js.map - -/***/ }), - -/***/ 79007: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1MatchCondition = void 0; -class V1alpha1MatchCondition { - static getAttributeTypeMap() { - return V1alpha1MatchCondition.attributeTypeMap; - } -} -exports.V1alpha1MatchCondition = V1alpha1MatchCondition; -V1alpha1MatchCondition.discriminator = undefined; -V1alpha1MatchCondition.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1MatchCondition.js.map - -/***/ }), - -/***/ 4249: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1MatchResources = void 0; -/** -* MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) -*/ -class V1alpha1MatchResources { - static getAttributeTypeMap() { - return V1alpha1MatchResources.attributeTypeMap; - } -} -exports.V1alpha1MatchResources = V1alpha1MatchResources; -V1alpha1MatchResources.discriminator = undefined; -V1alpha1MatchResources.attributeTypeMap = [ - { - "name": "excludeResourceRules", - "baseName": "excludeResourceRules", - "type": "Array" - }, - { - "name": "matchPolicy", - "baseName": "matchPolicy", - "type": "string" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "objectSelector", - "baseName": "objectSelector", - "type": "V1LabelSelector" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1MatchResources.js.map - -/***/ }), - -/***/ 45886: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1MigrationCondition = void 0; -/** -* Describes the state of a migration at a certain point. -*/ -class V1alpha1MigrationCondition { - static getAttributeTypeMap() { - return V1alpha1MigrationCondition.attributeTypeMap; - } -} -exports.V1alpha1MigrationCondition = V1alpha1MigrationCondition; -V1alpha1MigrationCondition.discriminator = undefined; -V1alpha1MigrationCondition.attributeTypeMap = [ - { - "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=v1alpha1MigrationCondition.js.map - -/***/ }), - -/***/ 18406: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1NamedRuleWithOperations = void 0; -/** -* NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. -*/ -class V1alpha1NamedRuleWithOperations { - static getAttributeTypeMap() { - return V1alpha1NamedRuleWithOperations.attributeTypeMap; - } -} -exports.V1alpha1NamedRuleWithOperations = V1alpha1NamedRuleWithOperations; -V1alpha1NamedRuleWithOperations.discriminator = undefined; -V1alpha1NamedRuleWithOperations.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "apiVersions", - "baseName": "apiVersions", - "type": "Array" - }, - { - "name": "operations", - "baseName": "operations", - "type": "Array" - }, - { - "name": "resourceNames", - "baseName": "resourceNames", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "scope", - "baseName": "scope", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1NamedRuleWithOperations.js.map - -/***/ }), - -/***/ 94904: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ParamKind = void 0; -/** -* ParamKind is a tuple of Group Kind and Version. -*/ -class V1alpha1ParamKind { - static getAttributeTypeMap() { - return V1alpha1ParamKind.attributeTypeMap; - } -} -exports.V1alpha1ParamKind = V1alpha1ParamKind; -V1alpha1ParamKind.discriminator = undefined; -V1alpha1ParamKind.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1ParamKind.js.map - -/***/ }), - -/***/ 80464: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ParamRef = void 0; -/** -* ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. -*/ -class V1alpha1ParamRef { - static getAttributeTypeMap() { - return V1alpha1ParamRef.attributeTypeMap; - } -} -exports.V1alpha1ParamRef = V1alpha1ParamRef; -V1alpha1ParamRef.discriminator = undefined; -V1alpha1ParamRef.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "parameterNotFoundAction", - "baseName": "parameterNotFoundAction", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v1alpha1ParamRef.js.map - -/***/ }), - -/***/ 92300: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ParentReference = void 0; -/** -* ParentReference describes a reference to a parent object. -*/ -class V1alpha1ParentReference { - static getAttributeTypeMap() { - return V1alpha1ParentReference.attributeTypeMap; - } -} -exports.V1alpha1ParentReference = V1alpha1ParentReference; -V1alpha1ParentReference.discriminator = undefined; -V1alpha1ParentReference.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" - } -]; -//# sourceMappingURL=v1alpha1ParentReference.js.map - -/***/ }), - -/***/ 51249: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1SelfSubjectReview = void 0; -/** -* SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. -*/ -class V1alpha1SelfSubjectReview { - static getAttributeTypeMap() { - return V1alpha1SelfSubjectReview.attributeTypeMap; - } -} -exports.V1alpha1SelfSubjectReview = V1alpha1SelfSubjectReview; -V1alpha1SelfSubjectReview.discriminator = undefined; -V1alpha1SelfSubjectReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha1SelfSubjectReviewStatus" - } -]; -//# sourceMappingURL=v1alpha1SelfSubjectReview.js.map - -/***/ }), - -/***/ 86145: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1SelfSubjectReviewStatus = void 0; -/** -* SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. -*/ -class V1alpha1SelfSubjectReviewStatus { - static getAttributeTypeMap() { - return V1alpha1SelfSubjectReviewStatus.attributeTypeMap; - } -} -exports.V1alpha1SelfSubjectReviewStatus = V1alpha1SelfSubjectReviewStatus; -V1alpha1SelfSubjectReviewStatus.discriminator = undefined; -V1alpha1SelfSubjectReviewStatus.attributeTypeMap = [ - { - "name": "userInfo", - "baseName": "userInfo", - "type": "V1UserInfo" - } -]; -//# sourceMappingURL=v1alpha1SelfSubjectReviewStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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" - }, - { - "name": "servedVersions", - "baseName": "servedVersions", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ServerStorageVersion.js.map - -/***/ }), - -/***/ 57721: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ServiceCIDR = void 0; -/** -* ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects. -*/ -class V1alpha1ServiceCIDR { - static getAttributeTypeMap() { - return V1alpha1ServiceCIDR.attributeTypeMap; - } -} -exports.V1alpha1ServiceCIDR = V1alpha1ServiceCIDR; -V1alpha1ServiceCIDR.discriminator = undefined; -V1alpha1ServiceCIDR.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1ServiceCIDRSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha1ServiceCIDRStatus" - } -]; -//# sourceMappingURL=v1alpha1ServiceCIDR.js.map - -/***/ }), - -/***/ 87757: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ServiceCIDRList = void 0; -/** -* ServiceCIDRList contains a list of ServiceCIDR objects. -*/ -class V1alpha1ServiceCIDRList { - static getAttributeTypeMap() { - return V1alpha1ServiceCIDRList.attributeTypeMap; - } -} -exports.V1alpha1ServiceCIDRList = V1alpha1ServiceCIDRList; -V1alpha1ServiceCIDRList.discriminator = undefined; -V1alpha1ServiceCIDRList.attributeTypeMap = [ - { - "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=v1alpha1ServiceCIDRList.js.map - -/***/ }), - -/***/ 75514: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ServiceCIDRSpec = void 0; -/** -* ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. -*/ -class V1alpha1ServiceCIDRSpec { - static getAttributeTypeMap() { - return V1alpha1ServiceCIDRSpec.attributeTypeMap; - } -} -exports.V1alpha1ServiceCIDRSpec = V1alpha1ServiceCIDRSpec; -V1alpha1ServiceCIDRSpec.discriminator = undefined; -V1alpha1ServiceCIDRSpec.attributeTypeMap = [ - { - "name": "cidrs", - "baseName": "cidrs", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ServiceCIDRSpec.js.map - -/***/ }), - -/***/ 34872: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ServiceCIDRStatus = void 0; -/** -* ServiceCIDRStatus describes the current state of the ServiceCIDR. -*/ -class V1alpha1ServiceCIDRStatus { - static getAttributeTypeMap() { - return V1alpha1ServiceCIDRStatus.attributeTypeMap; - } -} -exports.V1alpha1ServiceCIDRStatus = V1alpha1ServiceCIDRStatus; -V1alpha1ServiceCIDRStatus.discriminator = undefined; -V1alpha1ServiceCIDRStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ServiceCIDRStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 74189: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionMigration = void 0; -/** -* StorageVersionMigration represents a migration of stored data to the latest storage version. -*/ -class V1alpha1StorageVersionMigration { - static getAttributeTypeMap() { - return V1alpha1StorageVersionMigration.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionMigration = V1alpha1StorageVersionMigration; -V1alpha1StorageVersionMigration.discriminator = undefined; -V1alpha1StorageVersionMigration.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1StorageVersionMigrationSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha1StorageVersionMigrationStatus" - } -]; -//# sourceMappingURL=v1alpha1StorageVersionMigration.js.map - -/***/ }), - -/***/ 31642: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionMigrationList = void 0; -/** -* StorageVersionMigrationList is a collection of storage version migrations. -*/ -class V1alpha1StorageVersionMigrationList { - static getAttributeTypeMap() { - return V1alpha1StorageVersionMigrationList.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionMigrationList = V1alpha1StorageVersionMigrationList; -V1alpha1StorageVersionMigrationList.discriminator = undefined; -V1alpha1StorageVersionMigrationList.attributeTypeMap = [ - { - "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=v1alpha1StorageVersionMigrationList.js.map - -/***/ }), - -/***/ 94424: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionMigrationSpec = void 0; -/** -* Spec of the storage version migration. -*/ -class V1alpha1StorageVersionMigrationSpec { - static getAttributeTypeMap() { - return V1alpha1StorageVersionMigrationSpec.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionMigrationSpec = V1alpha1StorageVersionMigrationSpec; -V1alpha1StorageVersionMigrationSpec.discriminator = undefined; -V1alpha1StorageVersionMigrationSpec.attributeTypeMap = [ - { - "name": "continueToken", - "baseName": "continueToken", - "type": "string" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V1alpha1GroupVersionResource" - } -]; -//# sourceMappingURL=v1alpha1StorageVersionMigrationSpec.js.map - -/***/ }), - -/***/ 48629: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionMigrationStatus = void 0; -/** -* Status of the storage version migration. -*/ -class V1alpha1StorageVersionMigrationStatus { - static getAttributeTypeMap() { - return V1alpha1StorageVersionMigrationStatus.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionMigrationStatus = V1alpha1StorageVersionMigrationStatus; -V1alpha1StorageVersionMigrationStatus.discriminator = undefined; -V1alpha1StorageVersionMigrationStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "resourceVersion", - "baseName": "resourceVersion", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1StorageVersionMigrationStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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 - -/***/ }), - -/***/ 49625: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1TypeChecking = void 0; -/** -* TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy -*/ -class V1alpha1TypeChecking { - static getAttributeTypeMap() { - return V1alpha1TypeChecking.attributeTypeMap; - } -} -exports.V1alpha1TypeChecking = V1alpha1TypeChecking; -V1alpha1TypeChecking.discriminator = undefined; -V1alpha1TypeChecking.attributeTypeMap = [ - { - "name": "expressionWarnings", - "baseName": "expressionWarnings", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1TypeChecking.js.map - -/***/ }), - -/***/ 22708: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicy = void 0; -/** -* ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. -*/ -class V1alpha1ValidatingAdmissionPolicy { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicy.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicy = V1alpha1ValidatingAdmissionPolicy; -V1alpha1ValidatingAdmissionPolicy.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicy.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1ValidatingAdmissionPolicySpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha1ValidatingAdmissionPolicyStatus" - } -]; -//# sourceMappingURL=v1alpha1ValidatingAdmissionPolicy.js.map - -/***/ }), - -/***/ 42344: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicyBinding = void 0; -/** -* ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don\'t use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. -*/ -class V1alpha1ValidatingAdmissionPolicyBinding { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicyBinding.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicyBinding = V1alpha1ValidatingAdmissionPolicyBinding; -V1alpha1ValidatingAdmissionPolicyBinding.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicyBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1ValidatingAdmissionPolicyBindingSpec" - } -]; -//# sourceMappingURL=v1alpha1ValidatingAdmissionPolicyBinding.js.map - -/***/ }), - -/***/ 1818: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicyBindingList = void 0; -/** -* ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. -*/ -class V1alpha1ValidatingAdmissionPolicyBindingList { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicyBindingList.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicyBindingList = V1alpha1ValidatingAdmissionPolicyBindingList; -V1alpha1ValidatingAdmissionPolicyBindingList.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicyBindingList.attributeTypeMap = [ - { - "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=v1alpha1ValidatingAdmissionPolicyBindingList.js.map - -/***/ }), - -/***/ 37630: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicyBindingSpec = void 0; -/** -* ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. -*/ -class V1alpha1ValidatingAdmissionPolicyBindingSpec { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicyBindingSpec.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicyBindingSpec = V1alpha1ValidatingAdmissionPolicyBindingSpec; -V1alpha1ValidatingAdmissionPolicyBindingSpec.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicyBindingSpec.attributeTypeMap = [ - { - "name": "matchResources", - "baseName": "matchResources", - "type": "V1alpha1MatchResources" - }, - { - "name": "paramRef", - "baseName": "paramRef", - "type": "V1alpha1ParamRef" - }, - { - "name": "policyName", - "baseName": "policyName", - "type": "string" - }, - { - "name": "validationActions", - "baseName": "validationActions", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ValidatingAdmissionPolicyBindingSpec.js.map - -/***/ }), - -/***/ 82371: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicyList = void 0; -/** -* ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. -*/ -class V1alpha1ValidatingAdmissionPolicyList { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicyList.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicyList = V1alpha1ValidatingAdmissionPolicyList; -V1alpha1ValidatingAdmissionPolicyList.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicyList.attributeTypeMap = [ - { - "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=v1alpha1ValidatingAdmissionPolicyList.js.map - -/***/ }), - -/***/ 42500: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicySpec = void 0; -/** -* ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. -*/ -class V1alpha1ValidatingAdmissionPolicySpec { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicySpec.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicySpec = V1alpha1ValidatingAdmissionPolicySpec; -V1alpha1ValidatingAdmissionPolicySpec.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicySpec.attributeTypeMap = [ - { - "name": "auditAnnotations", - "baseName": "auditAnnotations", - "type": "Array" - }, - { - "name": "failurePolicy", - "baseName": "failurePolicy", - "type": "string" - }, - { - "name": "matchConditions", - "baseName": "matchConditions", - "type": "Array" - }, - { - "name": "matchConstraints", - "baseName": "matchConstraints", - "type": "V1alpha1MatchResources" - }, - { - "name": "paramKind", - "baseName": "paramKind", - "type": "V1alpha1ParamKind" - }, - { - "name": "validations", - "baseName": "validations", - "type": "Array" - }, - { - "name": "variables", - "baseName": "variables", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ValidatingAdmissionPolicySpec.js.map - -/***/ }), - -/***/ 18643: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ValidatingAdmissionPolicyStatus = void 0; -/** -* ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. -*/ -class V1alpha1ValidatingAdmissionPolicyStatus { - static getAttributeTypeMap() { - return V1alpha1ValidatingAdmissionPolicyStatus.attributeTypeMap; - } -} -exports.V1alpha1ValidatingAdmissionPolicyStatus = V1alpha1ValidatingAdmissionPolicyStatus; -V1alpha1ValidatingAdmissionPolicyStatus.discriminator = undefined; -V1alpha1ValidatingAdmissionPolicyStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "typeChecking", - "baseName": "typeChecking", - "type": "V1alpha1TypeChecking" - } -]; -//# sourceMappingURL=v1alpha1ValidatingAdmissionPolicyStatus.js.map - -/***/ }), - -/***/ 15408: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1Validation = void 0; -/** -* Validation specifies the CEL expression which is used to apply the validation. -*/ -class V1alpha1Validation { - static getAttributeTypeMap() { - return V1alpha1Validation.attributeTypeMap; - } -} -exports.V1alpha1Validation = V1alpha1Validation; -V1alpha1Validation.discriminator = undefined; -V1alpha1Validation.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "messageExpression", - "baseName": "messageExpression", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1Validation.js.map - -/***/ }), - -/***/ 30258: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1Variable = void 0; -/** -* Variable is the definition of a variable that is used for composition. -*/ -class V1alpha1Variable { - static getAttributeTypeMap() { - return V1alpha1Variable.attributeTypeMap; - } -} -exports.V1alpha1Variable = V1alpha1Variable; -V1alpha1Variable.discriminator = undefined; -V1alpha1Variable.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1Variable.js.map - -/***/ }), - -/***/ 21387: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttributesClass = void 0; -/** -* VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning. -*/ -class V1alpha1VolumeAttributesClass { - static getAttributeTypeMap() { - return V1alpha1VolumeAttributesClass.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttributesClass = V1alpha1VolumeAttributesClass; -V1alpha1VolumeAttributesClass.discriminator = undefined; -V1alpha1VolumeAttributesClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "parameters", - "baseName": "parameters", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1alpha1VolumeAttributesClass.js.map - -/***/ }), - -/***/ 30612: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttributesClassList = void 0; -/** -* VolumeAttributesClassList is a collection of VolumeAttributesClass objects. -*/ -class V1alpha1VolumeAttributesClassList { - static getAttributeTypeMap() { - return V1alpha1VolumeAttributesClassList.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttributesClassList = V1alpha1VolumeAttributesClassList; -V1alpha1VolumeAttributesClassList.discriminator = undefined; -V1alpha1VolumeAttributesClassList.attributeTypeMap = [ - { - "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=v1alpha1VolumeAttributesClassList.js.map - -/***/ }), - -/***/ 8418: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2AllocationResult = void 0; -/** -* AllocationResult contains attributes of an allocated resource. -*/ -class V1alpha2AllocationResult { - static getAttributeTypeMap() { - return V1alpha2AllocationResult.attributeTypeMap; - } -} -exports.V1alpha2AllocationResult = V1alpha2AllocationResult; -V1alpha2AllocationResult.discriminator = undefined; -V1alpha2AllocationResult.attributeTypeMap = [ - { - "name": "availableOnNodes", - "baseName": "availableOnNodes", - "type": "V1NodeSelector" - }, - { - "name": "resourceHandles", - "baseName": "resourceHandles", - "type": "Array" - }, - { - "name": "shareable", - "baseName": "shareable", - "type": "boolean" - } -]; -//# sourceMappingURL=v1alpha2AllocationResult.js.map - -/***/ }), - -/***/ 63409: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2DriverAllocationResult = void 0; -/** -* DriverAllocationResult contains vendor parameters and the allocation result for one request. -*/ -class V1alpha2DriverAllocationResult { - static getAttributeTypeMap() { - return V1alpha2DriverAllocationResult.attributeTypeMap; - } -} -exports.V1alpha2DriverAllocationResult = V1alpha2DriverAllocationResult; -V1alpha2DriverAllocationResult.discriminator = undefined; -V1alpha2DriverAllocationResult.attributeTypeMap = [ - { - "name": "namedResources", - "baseName": "namedResources", - "type": "V1alpha2NamedResourcesAllocationResult" - }, - { - "name": "vendorRequestParameters", - "baseName": "vendorRequestParameters", - "type": "object" - } -]; -//# sourceMappingURL=v1alpha2DriverAllocationResult.js.map - -/***/ }), - -/***/ 47392: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2DriverRequests = void 0; -/** -* DriverRequests describes all resources that are needed from one particular driver. -*/ -class V1alpha2DriverRequests { - static getAttributeTypeMap() { - return V1alpha2DriverRequests.attributeTypeMap; - } -} -exports.V1alpha2DriverRequests = V1alpha2DriverRequests; -V1alpha2DriverRequests.discriminator = undefined; -V1alpha2DriverRequests.attributeTypeMap = [ - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "requests", - "baseName": "requests", - "type": "Array" - }, - { - "name": "vendorParameters", - "baseName": "vendorParameters", - "type": "object" - } -]; -//# sourceMappingURL=v1alpha2DriverRequests.js.map - -/***/ }), - -/***/ 17489: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesAllocationResult = void 0; -/** -* NamedResourcesAllocationResult is used in AllocationResultModel. -*/ -class V1alpha2NamedResourcesAllocationResult { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesAllocationResult.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesAllocationResult = V1alpha2NamedResourcesAllocationResult; -V1alpha2NamedResourcesAllocationResult.discriminator = undefined; -V1alpha2NamedResourcesAllocationResult.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesAllocationResult.js.map - -/***/ }), - -/***/ 46566: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesAttribute = void 0; -/** -* NamedResourcesAttribute is a combination of an attribute name and its value. -*/ -class V1alpha2NamedResourcesAttribute { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesAttribute.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesAttribute = V1alpha2NamedResourcesAttribute; -V1alpha2NamedResourcesAttribute.discriminator = undefined; -V1alpha2NamedResourcesAttribute.attributeTypeMap = [ - { - "name": "bool", - "baseName": "bool", - "type": "boolean" - }, - { - "name": "_int", - "baseName": "int", - "type": "number" - }, - { - "name": "intSlice", - "baseName": "intSlice", - "type": "V1alpha2NamedResourcesIntSlice" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "quantity", - "baseName": "quantity", - "type": "string" - }, - { - "name": "string", - "baseName": "string", - "type": "string" - }, - { - "name": "stringSlice", - "baseName": "stringSlice", - "type": "V1alpha2NamedResourcesStringSlice" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesAttribute.js.map - -/***/ }), - -/***/ 78048: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesFilter = void 0; -/** -* NamedResourcesFilter is used in ResourceFilterModel. -*/ -class V1alpha2NamedResourcesFilter { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesFilter.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesFilter = V1alpha2NamedResourcesFilter; -V1alpha2NamedResourcesFilter.discriminator = undefined; -V1alpha2NamedResourcesFilter.attributeTypeMap = [ - { - "name": "selector", - "baseName": "selector", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesFilter.js.map - -/***/ }), - -/***/ 72020: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesInstance = void 0; -/** -* NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes. -*/ -class V1alpha2NamedResourcesInstance { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesInstance.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesInstance = V1alpha2NamedResourcesInstance; -V1alpha2NamedResourcesInstance.discriminator = undefined; -V1alpha2NamedResourcesInstance.attributeTypeMap = [ - { - "name": "attributes", - "baseName": "attributes", - "type": "Array" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesInstance.js.map - -/***/ }), - -/***/ 56013: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesIntSlice = void 0; -/** -* NamedResourcesIntSlice contains a slice of 64-bit integers. -*/ -class V1alpha2NamedResourcesIntSlice { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesIntSlice.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesIntSlice = V1alpha2NamedResourcesIntSlice; -V1alpha2NamedResourcesIntSlice.discriminator = undefined; -V1alpha2NamedResourcesIntSlice.attributeTypeMap = [ - { - "name": "ints", - "baseName": "ints", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesIntSlice.js.map - -/***/ }), - -/***/ 49410: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesRequest = void 0; -/** -* NamedResourcesRequest is used in ResourceRequestModel. -*/ -class V1alpha2NamedResourcesRequest { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesRequest.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesRequest = V1alpha2NamedResourcesRequest; -V1alpha2NamedResourcesRequest.discriminator = undefined; -V1alpha2NamedResourcesRequest.attributeTypeMap = [ - { - "name": "selector", - "baseName": "selector", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesRequest.js.map - -/***/ }), - -/***/ 45246: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesResources = void 0; -/** -* NamedResourcesResources is used in ResourceModel. -*/ -class V1alpha2NamedResourcesResources { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesResources.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesResources = V1alpha2NamedResourcesResources; -V1alpha2NamedResourcesResources.discriminator = undefined; -V1alpha2NamedResourcesResources.attributeTypeMap = [ - { - "name": "instances", - "baseName": "instances", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesResources.js.map - -/***/ }), - -/***/ 45766: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2NamedResourcesStringSlice = void 0; -/** -* NamedResourcesStringSlice contains a slice of strings. -*/ -class V1alpha2NamedResourcesStringSlice { - static getAttributeTypeMap() { - return V1alpha2NamedResourcesStringSlice.attributeTypeMap; - } -} -exports.V1alpha2NamedResourcesStringSlice = V1alpha2NamedResourcesStringSlice; -V1alpha2NamedResourcesStringSlice.discriminator = undefined; -V1alpha2NamedResourcesStringSlice.attributeTypeMap = [ - { - "name": "strings", - "baseName": "strings", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2NamedResourcesStringSlice.js.map - -/***/ }), - -/***/ 80281: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2PodSchedulingContext = void 0; -/** -* PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. -*/ -class V1alpha2PodSchedulingContext { - static getAttributeTypeMap() { - return V1alpha2PodSchedulingContext.attributeTypeMap; - } -} -exports.V1alpha2PodSchedulingContext = V1alpha2PodSchedulingContext; -V1alpha2PodSchedulingContext.discriminator = undefined; -V1alpha2PodSchedulingContext.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha2PodSchedulingContextSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha2PodSchedulingContextStatus" - } -]; -//# sourceMappingURL=v1alpha2PodSchedulingContext.js.map - -/***/ }), - -/***/ 55814: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2PodSchedulingContextList = void 0; -/** -* PodSchedulingContextList is a collection of Pod scheduling objects. -*/ -class V1alpha2PodSchedulingContextList { - static getAttributeTypeMap() { - return V1alpha2PodSchedulingContextList.attributeTypeMap; - } -} -exports.V1alpha2PodSchedulingContextList = V1alpha2PodSchedulingContextList; -V1alpha2PodSchedulingContextList.discriminator = undefined; -V1alpha2PodSchedulingContextList.attributeTypeMap = [ - { - "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=v1alpha2PodSchedulingContextList.js.map - -/***/ }), - -/***/ 14899: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2PodSchedulingContextSpec = void 0; -/** -* PodSchedulingContextSpec describes where resources for the Pod are needed. -*/ -class V1alpha2PodSchedulingContextSpec { - static getAttributeTypeMap() { - return V1alpha2PodSchedulingContextSpec.attributeTypeMap; - } -} -exports.V1alpha2PodSchedulingContextSpec = V1alpha2PodSchedulingContextSpec; -V1alpha2PodSchedulingContextSpec.discriminator = undefined; -V1alpha2PodSchedulingContextSpec.attributeTypeMap = [ - { - "name": "potentialNodes", - "baseName": "potentialNodes", - "type": "Array" - }, - { - "name": "selectedNode", - "baseName": "selectedNode", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2PodSchedulingContextSpec.js.map - -/***/ }), - -/***/ 91973: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2PodSchedulingContextStatus = void 0; -/** -* PodSchedulingContextStatus describes where resources for the Pod can be allocated. -*/ -class V1alpha2PodSchedulingContextStatus { - static getAttributeTypeMap() { - return V1alpha2PodSchedulingContextStatus.attributeTypeMap; - } -} -exports.V1alpha2PodSchedulingContextStatus = V1alpha2PodSchedulingContextStatus; -V1alpha2PodSchedulingContextStatus.discriminator = undefined; -V1alpha2PodSchedulingContextStatus.attributeTypeMap = [ - { - "name": "resourceClaims", - "baseName": "resourceClaims", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2PodSchedulingContextStatus.js.map - -/***/ }), - -/***/ 34941: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaim = void 0; -/** -* ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. -*/ -class V1alpha2ResourceClaim { - static getAttributeTypeMap() { - return V1alpha2ResourceClaim.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaim = V1alpha2ResourceClaim; -V1alpha2ResourceClaim.discriminator = undefined; -V1alpha2ResourceClaim.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha2ResourceClaimSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha2ResourceClaimStatus" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaim.js.map - -/***/ }), - -/***/ 66084: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimConsumerReference = void 0; -/** -* ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim. -*/ -class V1alpha2ResourceClaimConsumerReference { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimConsumerReference.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimConsumerReference = V1alpha2ResourceClaimConsumerReference; -V1alpha2ResourceClaimConsumerReference.discriminator = undefined; -V1alpha2ResourceClaimConsumerReference.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "resource", - "baseName": "resource", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimConsumerReference.js.map - -/***/ }), - -/***/ 15778: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimList = void 0; -/** -* ResourceClaimList is a collection of claims. -*/ -class V1alpha2ResourceClaimList { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimList.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimList = V1alpha2ResourceClaimList; -V1alpha2ResourceClaimList.discriminator = undefined; -V1alpha2ResourceClaimList.attributeTypeMap = [ - { - "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=v1alpha2ResourceClaimList.js.map - -/***/ }), - -/***/ 58433: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimParameters = void 0; -/** -* ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes. -*/ -class V1alpha2ResourceClaimParameters { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimParameters.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimParameters = V1alpha2ResourceClaimParameters; -V1alpha2ResourceClaimParameters.discriminator = undefined; -V1alpha2ResourceClaimParameters.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "driverRequests", - "baseName": "driverRequests", - "type": "Array" - }, - { - "name": "generatedFrom", - "baseName": "generatedFrom", - "type": "V1alpha2ResourceClaimParametersReference" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "shareable", - "baseName": "shareable", - "type": "boolean" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimParameters.js.map - -/***/ }), - -/***/ 62053: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimParametersList = void 0; -/** -* ResourceClaimParametersList is a collection of ResourceClaimParameters. -*/ -class V1alpha2ResourceClaimParametersList { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimParametersList.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimParametersList = V1alpha2ResourceClaimParametersList; -V1alpha2ResourceClaimParametersList.discriminator = undefined; -V1alpha2ResourceClaimParametersList.attributeTypeMap = [ - { - "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=v1alpha2ResourceClaimParametersList.js.map - -/***/ }), - -/***/ 63497: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimParametersReference = void 0; -/** -* ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim. -*/ -class V1alpha2ResourceClaimParametersReference { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimParametersReference.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimParametersReference = V1alpha2ResourceClaimParametersReference; -V1alpha2ResourceClaimParametersReference.discriminator = undefined; -V1alpha2ResourceClaimParametersReference.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimParametersReference.js.map - -/***/ }), - -/***/ 26858: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimSchedulingStatus = void 0; -/** -* ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode. -*/ -class V1alpha2ResourceClaimSchedulingStatus { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimSchedulingStatus.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimSchedulingStatus = V1alpha2ResourceClaimSchedulingStatus; -V1alpha2ResourceClaimSchedulingStatus.discriminator = undefined; -V1alpha2ResourceClaimSchedulingStatus.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "unsuitableNodes", - "baseName": "unsuitableNodes", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimSchedulingStatus.js.map - -/***/ }), - -/***/ 33605: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimSpec = void 0; -/** -* ResourceClaimSpec defines how a resource is to be allocated. -*/ -class V1alpha2ResourceClaimSpec { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimSpec.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimSpec = V1alpha2ResourceClaimSpec; -V1alpha2ResourceClaimSpec.discriminator = undefined; -V1alpha2ResourceClaimSpec.attributeTypeMap = [ - { - "name": "allocationMode", - "baseName": "allocationMode", - "type": "string" - }, - { - "name": "parametersRef", - "baseName": "parametersRef", - "type": "V1alpha2ResourceClaimParametersReference" - }, - { - "name": "resourceClassName", - "baseName": "resourceClassName", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimSpec.js.map - -/***/ }), - -/***/ 82696: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimStatus = void 0; -/** -* ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are. -*/ -class V1alpha2ResourceClaimStatus { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimStatus.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimStatus = V1alpha2ResourceClaimStatus; -V1alpha2ResourceClaimStatus.discriminator = undefined; -V1alpha2ResourceClaimStatus.attributeTypeMap = [ - { - "name": "allocation", - "baseName": "allocation", - "type": "V1alpha2AllocationResult" - }, - { - "name": "deallocationRequested", - "baseName": "deallocationRequested", - "type": "boolean" - }, - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "reservedFor", - "baseName": "reservedFor", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimStatus.js.map - -/***/ }), - -/***/ 93392: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimTemplate = void 0; -/** -* ResourceClaimTemplate is used to produce ResourceClaim objects. -*/ -class V1alpha2ResourceClaimTemplate { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimTemplate.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimTemplate = V1alpha2ResourceClaimTemplate; -V1alpha2ResourceClaimTemplate.discriminator = undefined; -V1alpha2ResourceClaimTemplate.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha2ResourceClaimTemplateSpec" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimTemplate.js.map - -/***/ }), - -/***/ 69167: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimTemplateList = void 0; -/** -* ResourceClaimTemplateList is a collection of claim templates. -*/ -class V1alpha2ResourceClaimTemplateList { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimTemplateList.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimTemplateList = V1alpha2ResourceClaimTemplateList; -V1alpha2ResourceClaimTemplateList.discriminator = undefined; -V1alpha2ResourceClaimTemplateList.attributeTypeMap = [ - { - "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=v1alpha2ResourceClaimTemplateList.js.map - -/***/ }), - -/***/ 68931: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClaimTemplateSpec = void 0; -/** -* ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. -*/ -class V1alpha2ResourceClaimTemplateSpec { - static getAttributeTypeMap() { - return V1alpha2ResourceClaimTemplateSpec.attributeTypeMap; - } -} -exports.V1alpha2ResourceClaimTemplateSpec = V1alpha2ResourceClaimTemplateSpec; -V1alpha2ResourceClaimTemplateSpec.discriminator = undefined; -V1alpha2ResourceClaimTemplateSpec.attributeTypeMap = [ - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha2ResourceClaimSpec" - } -]; -//# sourceMappingURL=v1alpha2ResourceClaimTemplateSpec.js.map - -/***/ }), - -/***/ 92611: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClass = void 0; -/** -* ResourceClass is used by administrators to influence how resources are allocated. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. -*/ -class V1alpha2ResourceClass { - static getAttributeTypeMap() { - return V1alpha2ResourceClass.attributeTypeMap; - } -} -exports.V1alpha2ResourceClass = V1alpha2ResourceClass; -V1alpha2ResourceClass.discriminator = undefined; -V1alpha2ResourceClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "parametersRef", - "baseName": "parametersRef", - "type": "V1alpha2ResourceClassParametersReference" - }, - { - "name": "structuredParameters", - "baseName": "structuredParameters", - "type": "boolean" - }, - { - "name": "suitableNodes", - "baseName": "suitableNodes", - "type": "V1NodeSelector" - } -]; -//# sourceMappingURL=v1alpha2ResourceClass.js.map - -/***/ }), - -/***/ 43575: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClassList = void 0; -/** -* ResourceClassList is a collection of classes. -*/ -class V1alpha2ResourceClassList { - static getAttributeTypeMap() { - return V1alpha2ResourceClassList.attributeTypeMap; - } -} -exports.V1alpha2ResourceClassList = V1alpha2ResourceClassList; -V1alpha2ResourceClassList.discriminator = undefined; -V1alpha2ResourceClassList.attributeTypeMap = [ - { - "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=v1alpha2ResourceClassList.js.map - -/***/ }), - -/***/ 95891: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClassParameters = void 0; -/** -* ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes. -*/ -class V1alpha2ResourceClassParameters { - static getAttributeTypeMap() { - return V1alpha2ResourceClassParameters.attributeTypeMap; - } -} -exports.V1alpha2ResourceClassParameters = V1alpha2ResourceClassParameters; -V1alpha2ResourceClassParameters.discriminator = undefined; -V1alpha2ResourceClassParameters.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "filters", - "baseName": "filters", - "type": "Array" - }, - { - "name": "generatedFrom", - "baseName": "generatedFrom", - "type": "V1alpha2ResourceClassParametersReference" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "vendorParameters", - "baseName": "vendorParameters", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha2ResourceClassParameters.js.map - -/***/ }), - -/***/ 94772: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClassParametersList = void 0; -/** -* ResourceClassParametersList is a collection of ResourceClassParameters. -*/ -class V1alpha2ResourceClassParametersList { - static getAttributeTypeMap() { - return V1alpha2ResourceClassParametersList.attributeTypeMap; - } -} -exports.V1alpha2ResourceClassParametersList = V1alpha2ResourceClassParametersList; -V1alpha2ResourceClassParametersList.discriminator = undefined; -V1alpha2ResourceClassParametersList.attributeTypeMap = [ - { - "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=v1alpha2ResourceClassParametersList.js.map - -/***/ }), - -/***/ 33686: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceClassParametersReference = void 0; -/** -* ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass. -*/ -class V1alpha2ResourceClassParametersReference { - static getAttributeTypeMap() { - return V1alpha2ResourceClassParametersReference.attributeTypeMap; - } -} -exports.V1alpha2ResourceClassParametersReference = V1alpha2ResourceClassParametersReference; -V1alpha2ResourceClassParametersReference.discriminator = undefined; -V1alpha2ResourceClassParametersReference.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=v1alpha2ResourceClassParametersReference.js.map - -/***/ }), - -/***/ 51614: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceFilter = void 0; -/** -* ResourceFilter is a filter for resources from one particular driver. -*/ -class V1alpha2ResourceFilter { - static getAttributeTypeMap() { - return V1alpha2ResourceFilter.attributeTypeMap; - } -} -exports.V1alpha2ResourceFilter = V1alpha2ResourceFilter; -V1alpha2ResourceFilter.discriminator = undefined; -V1alpha2ResourceFilter.attributeTypeMap = [ - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "namedResources", - "baseName": "namedResources", - "type": "V1alpha2NamedResourcesFilter" - } -]; -//# sourceMappingURL=v1alpha2ResourceFilter.js.map - -/***/ }), - -/***/ 98163: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceHandle = void 0; -/** -* ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. -*/ -class V1alpha2ResourceHandle { - static getAttributeTypeMap() { - return V1alpha2ResourceHandle.attributeTypeMap; - } -} -exports.V1alpha2ResourceHandle = V1alpha2ResourceHandle; -V1alpha2ResourceHandle.discriminator = undefined; -V1alpha2ResourceHandle.attributeTypeMap = [ - { - "name": "data", - "baseName": "data", - "type": "string" - }, - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "structuredData", - "baseName": "structuredData", - "type": "V1alpha2StructuredResourceHandle" - } -]; -//# sourceMappingURL=v1alpha2ResourceHandle.js.map - -/***/ }), - -/***/ 33973: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceRequest = void 0; -/** -* ResourceRequest is a request for resources from one particular driver. -*/ -class V1alpha2ResourceRequest { - static getAttributeTypeMap() { - return V1alpha2ResourceRequest.attributeTypeMap; - } -} -exports.V1alpha2ResourceRequest = V1alpha2ResourceRequest; -V1alpha2ResourceRequest.discriminator = undefined; -V1alpha2ResourceRequest.attributeTypeMap = [ - { - "name": "namedResources", - "baseName": "namedResources", - "type": "V1alpha2NamedResourcesRequest" - }, - { - "name": "vendorParameters", - "baseName": "vendorParameters", - "type": "object" - } -]; -//# sourceMappingURL=v1alpha2ResourceRequest.js.map - -/***/ }), - -/***/ 15081: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceSlice = void 0; -/** -* ResourceSlice provides information about available resources on individual nodes. -*/ -class V1alpha2ResourceSlice { - static getAttributeTypeMap() { - return V1alpha2ResourceSlice.attributeTypeMap; - } -} -exports.V1alpha2ResourceSlice = V1alpha2ResourceSlice; -V1alpha2ResourceSlice.discriminator = undefined; -V1alpha2ResourceSlice.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "namedResources", - "baseName": "namedResources", - "type": "V1alpha2NamedResourcesResources" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha2ResourceSlice.js.map - -/***/ }), - -/***/ 41825: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2ResourceSliceList = void 0; -/** -* ResourceSliceList is a collection of ResourceSlices. -*/ -class V1alpha2ResourceSliceList { - static getAttributeTypeMap() { - return V1alpha2ResourceSliceList.attributeTypeMap; - } -} -exports.V1alpha2ResourceSliceList = V1alpha2ResourceSliceList; -V1alpha2ResourceSliceList.discriminator = undefined; -V1alpha2ResourceSliceList.attributeTypeMap = [ - { - "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=v1alpha2ResourceSliceList.js.map - -/***/ }), - -/***/ 61710: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2StructuredResourceHandle = void 0; -/** -* StructuredResourceHandle is the in-tree representation of the allocation result. -*/ -class V1alpha2StructuredResourceHandle { - static getAttributeTypeMap() { - return V1alpha2StructuredResourceHandle.attributeTypeMap; - } -} -exports.V1alpha2StructuredResourceHandle = V1alpha2StructuredResourceHandle; -V1alpha2StructuredResourceHandle.discriminator = undefined; -V1alpha2StructuredResourceHandle.attributeTypeMap = [ - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "results", - "baseName": "results", - "type": "Array" - }, - { - "name": "vendorClaimParameters", - "baseName": "vendorClaimParameters", - "type": "object" - }, - { - "name": "vendorClassParameters", - "baseName": "vendorClassParameters", - "type": "object" - } -]; -//# sourceMappingURL=v1alpha2StructuredResourceHandle.js.map - -/***/ }), - -/***/ 27547: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha2VendorParameters = void 0; -/** -* VendorParameters are opaque parameters for one particular driver. -*/ -class V1alpha2VendorParameters { - static getAttributeTypeMap() { - return V1alpha2VendorParameters.attributeTypeMap; - } -} -exports.V1alpha2VendorParameters = V1alpha2VendorParameters; -V1alpha2VendorParameters.discriminator = undefined; -V1alpha2VendorParameters.attributeTypeMap = [ - { - "name": "driverName", - "baseName": "driverName", - "type": "string" - }, - { - "name": "parameters", - "baseName": "parameters", - "type": "object" - } -]; -//# sourceMappingURL=v1alpha2VendorParameters.js.map - -/***/ }), - -/***/ 17892: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1AuditAnnotation = void 0; -/** -* AuditAnnotation describes how to produce an audit annotation for an API request. -*/ -class V1beta1AuditAnnotation { - static getAttributeTypeMap() { - return V1beta1AuditAnnotation.attributeTypeMap; - } -} -exports.V1beta1AuditAnnotation = V1beta1AuditAnnotation; -V1beta1AuditAnnotation.discriminator = undefined; -V1beta1AuditAnnotation.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "valueExpression", - "baseName": "valueExpression", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1AuditAnnotation.js.map - -/***/ }), - -/***/ 25403: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ExpressionWarning = void 0; -/** -* ExpressionWarning is a warning information that targets a specific expression. -*/ -class V1beta1ExpressionWarning { - static getAttributeTypeMap() { - return V1beta1ExpressionWarning.attributeTypeMap; - } -} -exports.V1beta1ExpressionWarning = V1beta1ExpressionWarning; -V1beta1ExpressionWarning.discriminator = undefined; -V1beta1ExpressionWarning.attributeTypeMap = [ - { - "name": "fieldRef", - "baseName": "fieldRef", - "type": "string" - }, - { - "name": "warning", - "baseName": "warning", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1ExpressionWarning.js.map - -/***/ }), - -/***/ 48677: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1MatchCondition = void 0; -/** -* MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook. -*/ -class V1beta1MatchCondition { - static getAttributeTypeMap() { - return V1beta1MatchCondition.attributeTypeMap; - } -} -exports.V1beta1MatchCondition = V1beta1MatchCondition; -V1beta1MatchCondition.discriminator = undefined; -V1beta1MatchCondition.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1MatchCondition.js.map - -/***/ }), - -/***/ 25098: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1MatchResources = void 0; -/** -* MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) -*/ -class V1beta1MatchResources { - static getAttributeTypeMap() { - return V1beta1MatchResources.attributeTypeMap; - } -} -exports.V1beta1MatchResources = V1beta1MatchResources; -V1beta1MatchResources.discriminator = undefined; -V1beta1MatchResources.attributeTypeMap = [ - { - "name": "excludeResourceRules", - "baseName": "excludeResourceRules", - "type": "Array" - }, - { - "name": "matchPolicy", - "baseName": "matchPolicy", - "type": "string" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "objectSelector", - "baseName": "objectSelector", - "type": "V1LabelSelector" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1MatchResources.js.map - -/***/ }), - -/***/ 41414: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1NamedRuleWithOperations = void 0; -/** -* NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. -*/ -class V1beta1NamedRuleWithOperations { - static getAttributeTypeMap() { - return V1beta1NamedRuleWithOperations.attributeTypeMap; - } -} -exports.V1beta1NamedRuleWithOperations = V1beta1NamedRuleWithOperations; -V1beta1NamedRuleWithOperations.discriminator = undefined; -V1beta1NamedRuleWithOperations.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "apiVersions", - "baseName": "apiVersions", - "type": "Array" - }, - { - "name": "operations", - "baseName": "operations", - "type": "Array" - }, - { - "name": "resourceNames", - "baseName": "resourceNames", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "scope", - "baseName": "scope", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1NamedRuleWithOperations.js.map - -/***/ }), - -/***/ 73676: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ParamKind = void 0; -/** -* ParamKind is a tuple of Group Kind and Version. -*/ -class V1beta1ParamKind { - static getAttributeTypeMap() { - return V1beta1ParamKind.attributeTypeMap; - } -} -exports.V1beta1ParamKind = V1beta1ParamKind; -V1beta1ParamKind.discriminator = undefined; -V1beta1ParamKind.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1ParamKind.js.map - -/***/ }), - -/***/ 39984: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ParamRef = void 0; -/** -* ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. -*/ -class V1beta1ParamRef { - static getAttributeTypeMap() { - return V1beta1ParamRef.attributeTypeMap; - } -} -exports.V1beta1ParamRef = V1beta1ParamRef; -V1beta1ParamRef.discriminator = undefined; -V1beta1ParamRef.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "parameterNotFoundAction", - "baseName": "parameterNotFoundAction", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v1beta1ParamRef.js.map - -/***/ }), - -/***/ 10888: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1SelfSubjectReview = void 0; -/** -* SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. -*/ -class V1beta1SelfSubjectReview { - static getAttributeTypeMap() { - return V1beta1SelfSubjectReview.attributeTypeMap; - } -} -exports.V1beta1SelfSubjectReview = V1beta1SelfSubjectReview; -V1beta1SelfSubjectReview.discriminator = undefined; -V1beta1SelfSubjectReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta1SelfSubjectReviewStatus" - } -]; -//# sourceMappingURL=v1beta1SelfSubjectReview.js.map - -/***/ }), - -/***/ 23559: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1SelfSubjectReviewStatus = void 0; -/** -* SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. -*/ -class V1beta1SelfSubjectReviewStatus { - static getAttributeTypeMap() { - return V1beta1SelfSubjectReviewStatus.attributeTypeMap; - } -} -exports.V1beta1SelfSubjectReviewStatus = V1beta1SelfSubjectReviewStatus; -V1beta1SelfSubjectReviewStatus.discriminator = undefined; -V1beta1SelfSubjectReviewStatus.attributeTypeMap = [ - { - "name": "userInfo", - "baseName": "userInfo", - "type": "V1UserInfo" - } -]; -//# sourceMappingURL=v1beta1SelfSubjectReviewStatus.js.map - -/***/ }), - -/***/ 88135: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1TypeChecking = void 0; -/** -* TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy -*/ -class V1beta1TypeChecking { - static getAttributeTypeMap() { - return V1beta1TypeChecking.attributeTypeMap; - } -} -exports.V1beta1TypeChecking = V1beta1TypeChecking; -V1beta1TypeChecking.discriminator = undefined; -V1beta1TypeChecking.attributeTypeMap = [ - { - "name": "expressionWarnings", - "baseName": "expressionWarnings", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1TypeChecking.js.map - -/***/ }), - -/***/ 97375: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicy = void 0; -/** -* ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. -*/ -class V1beta1ValidatingAdmissionPolicy { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicy.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicy = V1beta1ValidatingAdmissionPolicy; -V1beta1ValidatingAdmissionPolicy.discriminator = undefined; -V1beta1ValidatingAdmissionPolicy.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1ValidatingAdmissionPolicySpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta1ValidatingAdmissionPolicyStatus" - } -]; -//# sourceMappingURL=v1beta1ValidatingAdmissionPolicy.js.map - -/***/ }), - -/***/ 7703: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicyBinding = void 0; -/** -* ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don\'t use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. -*/ -class V1beta1ValidatingAdmissionPolicyBinding { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicyBinding.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicyBinding = V1beta1ValidatingAdmissionPolicyBinding; -V1beta1ValidatingAdmissionPolicyBinding.discriminator = undefined; -V1beta1ValidatingAdmissionPolicyBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1ValidatingAdmissionPolicyBindingSpec" - } -]; -//# sourceMappingURL=v1beta1ValidatingAdmissionPolicyBinding.js.map - -/***/ }), - -/***/ 81921: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicyBindingList = void 0; -/** -* ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. -*/ -class V1beta1ValidatingAdmissionPolicyBindingList { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicyBindingList.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicyBindingList = V1beta1ValidatingAdmissionPolicyBindingList; -V1beta1ValidatingAdmissionPolicyBindingList.discriminator = undefined; -V1beta1ValidatingAdmissionPolicyBindingList.attributeTypeMap = [ - { - "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=v1beta1ValidatingAdmissionPolicyBindingList.js.map - -/***/ }), - -/***/ 85322: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicyBindingSpec = void 0; -/** -* ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. -*/ -class V1beta1ValidatingAdmissionPolicyBindingSpec { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicyBindingSpec.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicyBindingSpec = V1beta1ValidatingAdmissionPolicyBindingSpec; -V1beta1ValidatingAdmissionPolicyBindingSpec.discriminator = undefined; -V1beta1ValidatingAdmissionPolicyBindingSpec.attributeTypeMap = [ - { - "name": "matchResources", - "baseName": "matchResources", - "type": "V1beta1MatchResources" - }, - { - "name": "paramRef", - "baseName": "paramRef", - "type": "V1beta1ParamRef" - }, - { - "name": "policyName", - "baseName": "policyName", - "type": "string" - }, - { - "name": "validationActions", - "baseName": "validationActions", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1ValidatingAdmissionPolicyBindingSpec.js.map - -/***/ }), - -/***/ 75053: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicyList = void 0; -/** -* ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. -*/ -class V1beta1ValidatingAdmissionPolicyList { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicyList.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicyList = V1beta1ValidatingAdmissionPolicyList; -V1beta1ValidatingAdmissionPolicyList.discriminator = undefined; -V1beta1ValidatingAdmissionPolicyList.attributeTypeMap = [ - { - "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=v1beta1ValidatingAdmissionPolicyList.js.map - -/***/ }), - -/***/ 65816: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicySpec = void 0; -/** -* ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. -*/ -class V1beta1ValidatingAdmissionPolicySpec { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicySpec.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicySpec = V1beta1ValidatingAdmissionPolicySpec; -V1beta1ValidatingAdmissionPolicySpec.discriminator = undefined; -V1beta1ValidatingAdmissionPolicySpec.attributeTypeMap = [ - { - "name": "auditAnnotations", - "baseName": "auditAnnotations", - "type": "Array" - }, - { - "name": "failurePolicy", - "baseName": "failurePolicy", - "type": "string" - }, - { - "name": "matchConditions", - "baseName": "matchConditions", - "type": "Array" - }, - { - "name": "matchConstraints", - "baseName": "matchConstraints", - "type": "V1beta1MatchResources" - }, - { - "name": "paramKind", - "baseName": "paramKind", - "type": "V1beta1ParamKind" - }, - { - "name": "validations", - "baseName": "validations", - "type": "Array" - }, - { - "name": "variables", - "baseName": "variables", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1ValidatingAdmissionPolicySpec.js.map - -/***/ }), - -/***/ 6185: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ValidatingAdmissionPolicyStatus = void 0; -/** -* ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. -*/ -class V1beta1ValidatingAdmissionPolicyStatus { - static getAttributeTypeMap() { - return V1beta1ValidatingAdmissionPolicyStatus.attributeTypeMap; - } -} -exports.V1beta1ValidatingAdmissionPolicyStatus = V1beta1ValidatingAdmissionPolicyStatus; -V1beta1ValidatingAdmissionPolicyStatus.discriminator = undefined; -V1beta1ValidatingAdmissionPolicyStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "typeChecking", - "baseName": "typeChecking", - "type": "V1beta1TypeChecking" - } -]; -//# sourceMappingURL=v1beta1ValidatingAdmissionPolicyStatus.js.map - -/***/ }), - -/***/ 43070: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Validation = void 0; -/** -* Validation specifies the CEL expression which is used to apply the validation. -*/ -class V1beta1Validation { - static getAttributeTypeMap() { - return V1beta1Validation.attributeTypeMap; - } -} -exports.V1beta1Validation = V1beta1Validation; -V1beta1Validation.discriminator = undefined; -V1beta1Validation.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "messageExpression", - "baseName": "messageExpression", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1Validation.js.map - -/***/ }), - -/***/ 1684: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Variable = void 0; -/** -* Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. -*/ -class V1beta1Variable { - static getAttributeTypeMap() { - return V1beta1Variable.attributeTypeMap; - } -} -exports.V1beta1Variable = V1beta1Variable; -V1beta1Variable.discriminator = undefined; -V1beta1Variable.attributeTypeMap = [ - { - "name": "expression", - "baseName": "expression", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1Variable.js.map - -/***/ }), - -/***/ 26614: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3ExemptPriorityLevelConfiguration = void 0; -/** -* ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. -*/ -class V1beta3ExemptPriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1beta3ExemptPriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1beta3ExemptPriorityLevelConfiguration = V1beta3ExemptPriorityLevelConfiguration; -V1beta3ExemptPriorityLevelConfiguration.discriminator = undefined; -V1beta3ExemptPriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "lendablePercent", - "baseName": "lendablePercent", - "type": "number" - }, - { - "name": "nominalConcurrencyShares", - "baseName": "nominalConcurrencyShares", - "type": "number" - } -]; -//# sourceMappingURL=v1beta3ExemptPriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 85932: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3FlowDistinguisherMethod = void 0; -/** -* FlowDistinguisherMethod specifies the method of a flow distinguisher. -*/ -class V1beta3FlowDistinguisherMethod { - static getAttributeTypeMap() { - return V1beta3FlowDistinguisherMethod.attributeTypeMap; - } -} -exports.V1beta3FlowDistinguisherMethod = V1beta3FlowDistinguisherMethod; -V1beta3FlowDistinguisherMethod.discriminator = undefined; -V1beta3FlowDistinguisherMethod.attributeTypeMap = [ - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3FlowDistinguisherMethod.js.map - -/***/ }), - -/***/ 98402: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3FlowSchema = 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 V1beta3FlowSchema { - static getAttributeTypeMap() { - return V1beta3FlowSchema.attributeTypeMap; - } -} -exports.V1beta3FlowSchema = V1beta3FlowSchema; -V1beta3FlowSchema.discriminator = undefined; -V1beta3FlowSchema.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta3FlowSchemaSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta3FlowSchemaStatus" - } -]; -//# sourceMappingURL=v1beta3FlowSchema.js.map - -/***/ }), - -/***/ 24479: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3FlowSchemaCondition = void 0; -/** -* FlowSchemaCondition describes conditions for a FlowSchema. -*/ -class V1beta3FlowSchemaCondition { - static getAttributeTypeMap() { - return V1beta3FlowSchemaCondition.attributeTypeMap; - } -} -exports.V1beta3FlowSchemaCondition = V1beta3FlowSchemaCondition; -V1beta3FlowSchemaCondition.discriminator = undefined; -V1beta3FlowSchemaCondition.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=v1beta3FlowSchemaCondition.js.map - -/***/ }), - -/***/ 2817: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3FlowSchemaList = void 0; -/** -* FlowSchemaList is a list of FlowSchema objects. -*/ -class V1beta3FlowSchemaList { - static getAttributeTypeMap() { - return V1beta3FlowSchemaList.attributeTypeMap; - } -} -exports.V1beta3FlowSchemaList = V1beta3FlowSchemaList; -V1beta3FlowSchemaList.discriminator = undefined; -V1beta3FlowSchemaList.attributeTypeMap = [ - { - "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=v1beta3FlowSchemaList.js.map - -/***/ }), - -/***/ 31763: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3FlowSchemaSpec = void 0; -/** -* FlowSchemaSpec describes how the FlowSchema\'s specification looks like. -*/ -class V1beta3FlowSchemaSpec { - static getAttributeTypeMap() { - return V1beta3FlowSchemaSpec.attributeTypeMap; - } -} -exports.V1beta3FlowSchemaSpec = V1beta3FlowSchemaSpec; -V1beta3FlowSchemaSpec.discriminator = undefined; -V1beta3FlowSchemaSpec.attributeTypeMap = [ - { - "name": "distinguisherMethod", - "baseName": "distinguisherMethod", - "type": "V1beta3FlowDistinguisherMethod" - }, - { - "name": "matchingPrecedence", - "baseName": "matchingPrecedence", - "type": "number" - }, - { - "name": "priorityLevelConfiguration", - "baseName": "priorityLevelConfiguration", - "type": "V1beta3PriorityLevelConfigurationReference" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta3FlowSchemaSpec.js.map - -/***/ }), - -/***/ 10058: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3FlowSchemaStatus = void 0; -/** -* FlowSchemaStatus represents the current state of a FlowSchema. -*/ -class V1beta3FlowSchemaStatus { - static getAttributeTypeMap() { - return V1beta3FlowSchemaStatus.attributeTypeMap; - } -} -exports.V1beta3FlowSchemaStatus = V1beta3FlowSchemaStatus; -V1beta3FlowSchemaStatus.discriminator = undefined; -V1beta3FlowSchemaStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta3FlowSchemaStatus.js.map - -/***/ }), - -/***/ 87274: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3GroupSubject = void 0; -/** -* GroupSubject holds detailed information for group-kind subject. -*/ -class V1beta3GroupSubject { - static getAttributeTypeMap() { - return V1beta3GroupSubject.attributeTypeMap; - } -} -exports.V1beta3GroupSubject = V1beta3GroupSubject; -V1beta3GroupSubject.discriminator = undefined; -V1beta3GroupSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3GroupSubject.js.map - -/***/ }), - -/***/ 27852: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3LimitResponse = void 0; -/** -* LimitResponse defines how to handle requests that can not be executed right now. -*/ -class V1beta3LimitResponse { - static getAttributeTypeMap() { - return V1beta3LimitResponse.attributeTypeMap; - } -} -exports.V1beta3LimitResponse = V1beta3LimitResponse; -V1beta3LimitResponse.discriminator = undefined; -V1beta3LimitResponse.attributeTypeMap = [ - { - "name": "queuing", - "baseName": "queuing", - "type": "V1beta3QueuingConfiguration" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3LimitResponse.js.map - -/***/ }), - -/***/ 99260: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3LimitedPriorityLevelConfiguration = 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 V1beta3LimitedPriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1beta3LimitedPriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1beta3LimitedPriorityLevelConfiguration = V1beta3LimitedPriorityLevelConfiguration; -V1beta3LimitedPriorityLevelConfiguration.discriminator = undefined; -V1beta3LimitedPriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "borrowingLimitPercent", - "baseName": "borrowingLimitPercent", - "type": "number" - }, - { - "name": "lendablePercent", - "baseName": "lendablePercent", - "type": "number" - }, - { - "name": "limitResponse", - "baseName": "limitResponse", - "type": "V1beta3LimitResponse" - }, - { - "name": "nominalConcurrencyShares", - "baseName": "nominalConcurrencyShares", - "type": "number" - } -]; -//# sourceMappingURL=v1beta3LimitedPriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 37063: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3NonResourcePolicyRule = 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 V1beta3NonResourcePolicyRule { - static getAttributeTypeMap() { - return V1beta3NonResourcePolicyRule.attributeTypeMap; - } -} -exports.V1beta3NonResourcePolicyRule = V1beta3NonResourcePolicyRule; -V1beta3NonResourcePolicyRule.discriminator = undefined; -V1beta3NonResourcePolicyRule.attributeTypeMap = [ - { - "name": "nonResourceURLs", - "baseName": "nonResourceURLs", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta3NonResourcePolicyRule.js.map - -/***/ }), - -/***/ 4330: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PolicyRulesWithSubjects = 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 V1beta3PolicyRulesWithSubjects { - static getAttributeTypeMap() { - return V1beta3PolicyRulesWithSubjects.attributeTypeMap; - } -} -exports.V1beta3PolicyRulesWithSubjects = V1beta3PolicyRulesWithSubjects; -V1beta3PolicyRulesWithSubjects.discriminator = undefined; -V1beta3PolicyRulesWithSubjects.attributeTypeMap = [ - { - "name": "nonResourceRules", - "baseName": "nonResourceRules", - "type": "Array" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta3PolicyRulesWithSubjects.js.map - -/***/ }), - -/***/ 96416: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PriorityLevelConfiguration = void 0; -/** -* PriorityLevelConfiguration represents the configuration of a priority level. -*/ -class V1beta3PriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1beta3PriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1beta3PriorityLevelConfiguration = V1beta3PriorityLevelConfiguration; -V1beta3PriorityLevelConfiguration.discriminator = undefined; -V1beta3PriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta3PriorityLevelConfigurationSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta3PriorityLevelConfigurationStatus" - } -]; -//# sourceMappingURL=v1beta3PriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 15348: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PriorityLevelConfigurationCondition = void 0; -/** -* PriorityLevelConfigurationCondition defines the condition of priority level. -*/ -class V1beta3PriorityLevelConfigurationCondition { - static getAttributeTypeMap() { - return V1beta3PriorityLevelConfigurationCondition.attributeTypeMap; - } -} -exports.V1beta3PriorityLevelConfigurationCondition = V1beta3PriorityLevelConfigurationCondition; -V1beta3PriorityLevelConfigurationCondition.discriminator = undefined; -V1beta3PriorityLevelConfigurationCondition.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=v1beta3PriorityLevelConfigurationCondition.js.map - -/***/ }), - -/***/ 95815: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PriorityLevelConfigurationList = void 0; -/** -* PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. -*/ -class V1beta3PriorityLevelConfigurationList { - static getAttributeTypeMap() { - return V1beta3PriorityLevelConfigurationList.attributeTypeMap; - } -} -exports.V1beta3PriorityLevelConfigurationList = V1beta3PriorityLevelConfigurationList; -V1beta3PriorityLevelConfigurationList.discriminator = undefined; -V1beta3PriorityLevelConfigurationList.attributeTypeMap = [ - { - "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=v1beta3PriorityLevelConfigurationList.js.map - -/***/ }), - -/***/ 34250: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PriorityLevelConfigurationReference = void 0; -/** -* PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. -*/ -class V1beta3PriorityLevelConfigurationReference { - static getAttributeTypeMap() { - return V1beta3PriorityLevelConfigurationReference.attributeTypeMap; - } -} -exports.V1beta3PriorityLevelConfigurationReference = V1beta3PriorityLevelConfigurationReference; -V1beta3PriorityLevelConfigurationReference.discriminator = undefined; -V1beta3PriorityLevelConfigurationReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3PriorityLevelConfigurationReference.js.map - -/***/ }), - -/***/ 61644: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PriorityLevelConfigurationSpec = void 0; -/** -* PriorityLevelConfigurationSpec specifies the configuration of a priority level. -*/ -class V1beta3PriorityLevelConfigurationSpec { - static getAttributeTypeMap() { - return V1beta3PriorityLevelConfigurationSpec.attributeTypeMap; - } -} -exports.V1beta3PriorityLevelConfigurationSpec = V1beta3PriorityLevelConfigurationSpec; -V1beta3PriorityLevelConfigurationSpec.discriminator = undefined; -V1beta3PriorityLevelConfigurationSpec.attributeTypeMap = [ - { - "name": "exempt", - "baseName": "exempt", - "type": "V1beta3ExemptPriorityLevelConfiguration" - }, - { - "name": "limited", - "baseName": "limited", - "type": "V1beta3LimitedPriorityLevelConfiguration" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3PriorityLevelConfigurationSpec.js.map - -/***/ }), - -/***/ 92841: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3PriorityLevelConfigurationStatus = void 0; -/** -* PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". -*/ -class V1beta3PriorityLevelConfigurationStatus { - static getAttributeTypeMap() { - return V1beta3PriorityLevelConfigurationStatus.attributeTypeMap; - } -} -exports.V1beta3PriorityLevelConfigurationStatus = V1beta3PriorityLevelConfigurationStatus; -V1beta3PriorityLevelConfigurationStatus.discriminator = undefined; -V1beta3PriorityLevelConfigurationStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta3PriorityLevelConfigurationStatus.js.map - -/***/ }), - -/***/ 67034: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3QueuingConfiguration = void 0; -/** -* QueuingConfiguration holds the configuration parameters for queuing -*/ -class V1beta3QueuingConfiguration { - static getAttributeTypeMap() { - return V1beta3QueuingConfiguration.attributeTypeMap; - } -} -exports.V1beta3QueuingConfiguration = V1beta3QueuingConfiguration; -V1beta3QueuingConfiguration.discriminator = undefined; -V1beta3QueuingConfiguration.attributeTypeMap = [ - { - "name": "handSize", - "baseName": "handSize", - "type": "number" - }, - { - "name": "queueLengthLimit", - "baseName": "queueLengthLimit", - "type": "number" - }, - { - "name": "queues", - "baseName": "queues", - "type": "number" - } -]; -//# sourceMappingURL=v1beta3QueuingConfiguration.js.map - -/***/ }), - -/***/ 61546: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3ResourcePolicyRule = 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) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request\'s namespace. -*/ -class V1beta3ResourcePolicyRule { - static getAttributeTypeMap() { - return V1beta3ResourcePolicyRule.attributeTypeMap; - } -} -exports.V1beta3ResourcePolicyRule = V1beta3ResourcePolicyRule; -V1beta3ResourcePolicyRule.discriminator = undefined; -V1beta3ResourcePolicyRule.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=v1beta3ResourcePolicyRule.js.map - -/***/ }), - -/***/ 56895: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3ServiceAccountSubject = void 0; -/** -* ServiceAccountSubject holds detailed information for service-account-kind subject. -*/ -class V1beta3ServiceAccountSubject { - static getAttributeTypeMap() { - return V1beta3ServiceAccountSubject.attributeTypeMap; - } -} -exports.V1beta3ServiceAccountSubject = V1beta3ServiceAccountSubject; -V1beta3ServiceAccountSubject.discriminator = undefined; -V1beta3ServiceAccountSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3ServiceAccountSubject.js.map - -/***/ }), - -/***/ 98511: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3Subject = 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 V1beta3Subject { - static getAttributeTypeMap() { - return V1beta3Subject.attributeTypeMap; - } -} -exports.V1beta3Subject = V1beta3Subject; -V1beta3Subject.discriminator = undefined; -V1beta3Subject.attributeTypeMap = [ - { - "name": "group", - "baseName": "group", - "type": "V1beta3GroupSubject" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "serviceAccount", - "baseName": "serviceAccount", - "type": "V1beta3ServiceAccountSubject" - }, - { - "name": "user", - "baseName": "user", - "type": "V1beta3UserSubject" - } -]; -//# sourceMappingURL=v1beta3Subject.js.map - -/***/ }), - -/***/ 60687: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta3UserSubject = void 0; -/** -* UserSubject holds detailed information for user-kind subject. -*/ -class V1beta3UserSubject { - static getAttributeTypeMap() { - return V1beta3UserSubject.attributeTypeMap; - } -} -exports.V1beta3UserSubject = V1beta3UserSubject; -V1beta3UserSubject.discriminator = undefined; -V1beta3UserSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta3UserSubject.js.map - -/***/ }), - -/***/ 7662: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ContainerResourceMetricSource = 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 V2ContainerResourceMetricSource { - static getAttributeTypeMap() { - return V2ContainerResourceMetricSource.attributeTypeMap; - } -} -exports.V2ContainerResourceMetricSource = V2ContainerResourceMetricSource; -V2ContainerResourceMetricSource.discriminator = undefined; -V2ContainerResourceMetricSource.attributeTypeMap = [ - { - "name": "container", - "baseName": "container", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "target", - "baseName": "target", - "type": "V2MetricTarget" - } -]; -//# sourceMappingURL=v2ContainerResourceMetricSource.js.map - -/***/ }), - -/***/ 73367: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ContainerResourceMetricStatus = 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 V2ContainerResourceMetricStatus { - static getAttributeTypeMap() { - return V2ContainerResourceMetricStatus.attributeTypeMap; - } -} -exports.V2ContainerResourceMetricStatus = V2ContainerResourceMetricStatus; -V2ContainerResourceMetricStatus.discriminator = undefined; -V2ContainerResourceMetricStatus.attributeTypeMap = [ - { - "name": "container", - "baseName": "container", - "type": "string" - }, - { - "name": "current", - "baseName": "current", - "type": "V2MetricValueStatus" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2ContainerResourceMetricStatus.js.map - -/***/ }), - -/***/ 48810: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2CrossVersionObjectReference = void 0; -/** -* CrossVersionObjectReference contains enough information to let you identify the referred resource. -*/ -class V2CrossVersionObjectReference { - static getAttributeTypeMap() { - return V2CrossVersionObjectReference.attributeTypeMap; - } -} -exports.V2CrossVersionObjectReference = V2CrossVersionObjectReference; -V2CrossVersionObjectReference.discriminator = undefined; -V2CrossVersionObjectReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2CrossVersionObjectReference.js.map - -/***/ }), - -/***/ 84465: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ExternalMetricSource = 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 V2ExternalMetricSource { - static getAttributeTypeMap() { - return V2ExternalMetricSource.attributeTypeMap; - } -} -exports.V2ExternalMetricSource = V2ExternalMetricSource; -V2ExternalMetricSource.discriminator = undefined; -V2ExternalMetricSource.attributeTypeMap = [ - { - "name": "metric", - "baseName": "metric", - "type": "V2MetricIdentifier" - }, - { - "name": "target", - "baseName": "target", - "type": "V2MetricTarget" - } -]; -//# sourceMappingURL=v2ExternalMetricSource.js.map - -/***/ }), - -/***/ 12502: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ExternalMetricStatus = void 0; -/** -* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. -*/ -class V2ExternalMetricStatus { - static getAttributeTypeMap() { - return V2ExternalMetricStatus.attributeTypeMap; - } -} -exports.V2ExternalMetricStatus = V2ExternalMetricStatus; -V2ExternalMetricStatus.discriminator = undefined; -V2ExternalMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2MetricValueStatus" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2MetricIdentifier" - } -]; -//# sourceMappingURL=v2ExternalMetricStatus.js.map - -/***/ }), - -/***/ 49423: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HPAScalingPolicy = void 0; -/** -* HPAScalingPolicy is a single policy which must hold true for a specified past interval. -*/ -class V2HPAScalingPolicy { - static getAttributeTypeMap() { - return V2HPAScalingPolicy.attributeTypeMap; - } -} -exports.V2HPAScalingPolicy = V2HPAScalingPolicy; -V2HPAScalingPolicy.discriminator = undefined; -V2HPAScalingPolicy.attributeTypeMap = [ - { - "name": "periodSeconds", - "baseName": "periodSeconds", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } -]; -//# sourceMappingURL=v2HPAScalingPolicy.js.map - -/***/ }), - -/***/ 32736: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HPAScalingRules = 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 V2HPAScalingRules { - static getAttributeTypeMap() { - return V2HPAScalingRules.attributeTypeMap; - } -} -exports.V2HPAScalingRules = V2HPAScalingRules; -V2HPAScalingRules.discriminator = undefined; -V2HPAScalingRules.attributeTypeMap = [ - { - "name": "policies", - "baseName": "policies", - "type": "Array" - }, - { - "name": "selectPolicy", - "baseName": "selectPolicy", - "type": "string" - }, - { - "name": "stabilizationWindowSeconds", - "baseName": "stabilizationWindowSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v2HPAScalingRules.js.map - -/***/ }), - -/***/ 24903: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HorizontalPodAutoscaler = 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 V2HorizontalPodAutoscaler { - static getAttributeTypeMap() { - return V2HorizontalPodAutoscaler.attributeTypeMap; - } -} -exports.V2HorizontalPodAutoscaler = V2HorizontalPodAutoscaler; -V2HorizontalPodAutoscaler.discriminator = undefined; -V2HorizontalPodAutoscaler.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V2HorizontalPodAutoscalerSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V2HorizontalPodAutoscalerStatus" - } -]; -//# sourceMappingURL=v2HorizontalPodAutoscaler.js.map - -/***/ }), - -/***/ 57461: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HorizontalPodAutoscalerBehavior = void 0; -/** -* HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). -*/ -class V2HorizontalPodAutoscalerBehavior { - static getAttributeTypeMap() { - return V2HorizontalPodAutoscalerBehavior.attributeTypeMap; - } -} -exports.V2HorizontalPodAutoscalerBehavior = V2HorizontalPodAutoscalerBehavior; -V2HorizontalPodAutoscalerBehavior.discriminator = undefined; -V2HorizontalPodAutoscalerBehavior.attributeTypeMap = [ - { - "name": "scaleDown", - "baseName": "scaleDown", - "type": "V2HPAScalingRules" - }, - { - "name": "scaleUp", - "baseName": "scaleUp", - "type": "V2HPAScalingRules" - } -]; -//# sourceMappingURL=v2HorizontalPodAutoscalerBehavior.js.map - -/***/ }), - -/***/ 47522: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HorizontalPodAutoscalerCondition = void 0; -/** -* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. -*/ -class V2HorizontalPodAutoscalerCondition { - static getAttributeTypeMap() { - return V2HorizontalPodAutoscalerCondition.attributeTypeMap; - } -} -exports.V2HorizontalPodAutoscalerCondition = V2HorizontalPodAutoscalerCondition; -V2HorizontalPodAutoscalerCondition.discriminator = undefined; -V2HorizontalPodAutoscalerCondition.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=v2HorizontalPodAutoscalerCondition.js.map - -/***/ }), - -/***/ 38164: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HorizontalPodAutoscalerList = void 0; -/** -* HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. -*/ -class V2HorizontalPodAutoscalerList { - static getAttributeTypeMap() { - return V2HorizontalPodAutoscalerList.attributeTypeMap; - } -} -exports.V2HorizontalPodAutoscalerList = V2HorizontalPodAutoscalerList; -V2HorizontalPodAutoscalerList.discriminator = undefined; -V2HorizontalPodAutoscalerList.attributeTypeMap = [ - { - "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=v2HorizontalPodAutoscalerList.js.map - -/***/ }), - -/***/ 73973: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HorizontalPodAutoscalerSpec = void 0; -/** -* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. -*/ -class V2HorizontalPodAutoscalerSpec { - static getAttributeTypeMap() { - return V2HorizontalPodAutoscalerSpec.attributeTypeMap; - } -} -exports.V2HorizontalPodAutoscalerSpec = V2HorizontalPodAutoscalerSpec; -V2HorizontalPodAutoscalerSpec.discriminator = undefined; -V2HorizontalPodAutoscalerSpec.attributeTypeMap = [ - { - "name": "behavior", - "baseName": "behavior", - "type": "V2HorizontalPodAutoscalerBehavior" - }, - { - "name": "maxReplicas", - "baseName": "maxReplicas", - "type": "number" - }, - { - "name": "metrics", - "baseName": "metrics", - "type": "Array" - }, - { - "name": "minReplicas", - "baseName": "minReplicas", - "type": "number" - }, - { - "name": "scaleTargetRef", - "baseName": "scaleTargetRef", - "type": "V2CrossVersionObjectReference" - } -]; -//# sourceMappingURL=v2HorizontalPodAutoscalerSpec.js.map - -/***/ }), - -/***/ 31046: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2HorizontalPodAutoscalerStatus = void 0; -/** -* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. -*/ -class V2HorizontalPodAutoscalerStatus { - static getAttributeTypeMap() { - return V2HorizontalPodAutoscalerStatus.attributeTypeMap; - } -} -exports.V2HorizontalPodAutoscalerStatus = V2HorizontalPodAutoscalerStatus; -V2HorizontalPodAutoscalerStatus.discriminator = undefined; -V2HorizontalPodAutoscalerStatus.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=v2HorizontalPodAutoscalerStatus.js.map - -/***/ }), - -/***/ 63959: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2MetricIdentifier = void 0; -/** -* MetricIdentifier defines the name and optionally selector for a metric -*/ -class V2MetricIdentifier { - static getAttributeTypeMap() { - return V2MetricIdentifier.attributeTypeMap; - } -} -exports.V2MetricIdentifier = V2MetricIdentifier; -V2MetricIdentifier.discriminator = undefined; -V2MetricIdentifier.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v2MetricIdentifier.js.map - -/***/ }), - -/***/ 47587: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2MetricSpec = 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 V2MetricSpec { - static getAttributeTypeMap() { - return V2MetricSpec.attributeTypeMap; - } -} -exports.V2MetricSpec = V2MetricSpec; -V2MetricSpec.discriminator = undefined; -V2MetricSpec.attributeTypeMap = [ - { - "name": "containerResource", - "baseName": "containerResource", - "type": "V2ContainerResourceMetricSource" - }, - { - "name": "external", - "baseName": "external", - "type": "V2ExternalMetricSource" - }, - { - "name": "object", - "baseName": "object", - "type": "V2ObjectMetricSource" - }, - { - "name": "pods", - "baseName": "pods", - "type": "V2PodsMetricSource" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V2ResourceMetricSource" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2MetricSpec.js.map - -/***/ }), - -/***/ 35575: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2MetricStatus = void 0; -/** -* MetricStatus describes the last-read state of a single metric. -*/ -class V2MetricStatus { - static getAttributeTypeMap() { - return V2MetricStatus.attributeTypeMap; - } -} -exports.V2MetricStatus = V2MetricStatus; -V2MetricStatus.discriminator = undefined; -V2MetricStatus.attributeTypeMap = [ - { - "name": "containerResource", - "baseName": "containerResource", - "type": "V2ContainerResourceMetricStatus" - }, - { - "name": "external", - "baseName": "external", - "type": "V2ExternalMetricStatus" - }, - { - "name": "object", - "baseName": "object", - "type": "V2ObjectMetricStatus" - }, - { - "name": "pods", - "baseName": "pods", - "type": "V2PodsMetricStatus" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V2ResourceMetricStatus" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2MetricStatus.js.map - -/***/ }), - -/***/ 75979: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2MetricTarget = void 0; -/** -* MetricTarget defines the target value, average value, or average utilization of a specific metric -*/ -class V2MetricTarget { - static getAttributeTypeMap() { - return V2MetricTarget.attributeTypeMap; - } -} -exports.V2MetricTarget = V2MetricTarget; -V2MetricTarget.discriminator = undefined; -V2MetricTarget.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=v2MetricTarget.js.map - -/***/ }), - -/***/ 66979: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2MetricValueStatus = void 0; -/** -* MetricValueStatus holds the current value for a metric -*/ -class V2MetricValueStatus { - static getAttributeTypeMap() { - return V2MetricValueStatus.attributeTypeMap; - } -} -exports.V2MetricValueStatus = V2MetricValueStatus; -V2MetricValueStatus.discriminator = undefined; -V2MetricValueStatus.attributeTypeMap = [ - { - "name": "averageUtilization", - "baseName": "averageUtilization", - "type": "number" - }, - { - "name": "averageValue", - "baseName": "averageValue", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v2MetricValueStatus.js.map - -/***/ }), - -/***/ 9547: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ObjectMetricSource = void 0; -/** -* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). -*/ -class V2ObjectMetricSource { - static getAttributeTypeMap() { - return V2ObjectMetricSource.attributeTypeMap; - } -} -exports.V2ObjectMetricSource = V2ObjectMetricSource; -V2ObjectMetricSource.discriminator = undefined; -V2ObjectMetricSource.attributeTypeMap = [ - { - "name": "describedObject", - "baseName": "describedObject", - "type": "V2CrossVersionObjectReference" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2MetricIdentifier" - }, - { - "name": "target", - "baseName": "target", - "type": "V2MetricTarget" - } -]; -//# sourceMappingURL=v2ObjectMetricSource.js.map - -/***/ }), - -/***/ 81129: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ObjectMetricStatus = void 0; -/** -* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). -*/ -class V2ObjectMetricStatus { - static getAttributeTypeMap() { - return V2ObjectMetricStatus.attributeTypeMap; - } -} -exports.V2ObjectMetricStatus = V2ObjectMetricStatus; -V2ObjectMetricStatus.discriminator = undefined; -V2ObjectMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2MetricValueStatus" - }, - { - "name": "describedObject", - "baseName": "describedObject", - "type": "V2CrossVersionObjectReference" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2MetricIdentifier" - } -]; -//# sourceMappingURL=v2ObjectMetricStatus.js.map - -/***/ }), - -/***/ 21470: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2PodsMetricSource = 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 V2PodsMetricSource { - static getAttributeTypeMap() { - return V2PodsMetricSource.attributeTypeMap; - } -} -exports.V2PodsMetricSource = V2PodsMetricSource; -V2PodsMetricSource.discriminator = undefined; -V2PodsMetricSource.attributeTypeMap = [ - { - "name": "metric", - "baseName": "metric", - "type": "V2MetricIdentifier" - }, - { - "name": "target", - "baseName": "target", - "type": "V2MetricTarget" - } -]; -//# sourceMappingURL=v2PodsMetricSource.js.map - -/***/ }), - -/***/ 3052: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2PodsMetricStatus = 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 V2PodsMetricStatus { - static getAttributeTypeMap() { - return V2PodsMetricStatus.attributeTypeMap; - } -} -exports.V2PodsMetricStatus = V2PodsMetricStatus; -V2PodsMetricStatus.discriminator = undefined; -V2PodsMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2MetricValueStatus" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2MetricIdentifier" - } -]; -//# sourceMappingURL=v2PodsMetricStatus.js.map - -/***/ }), - -/***/ 28295: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ResourceMetricSource = 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 V2ResourceMetricSource { - static getAttributeTypeMap() { - return V2ResourceMetricSource.attributeTypeMap; - } -} -exports.V2ResourceMetricSource = V2ResourceMetricSource; -V2ResourceMetricSource.discriminator = undefined; -V2ResourceMetricSource.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "target", - "baseName": "target", - "type": "V2MetricTarget" - } -]; -//# sourceMappingURL=v2ResourceMetricSource.js.map - -/***/ }), - -/***/ 32774: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: release-1.30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2ResourceMetricStatus = 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 V2ResourceMetricStatus { - static getAttributeTypeMap() { - return V2ResourceMetricStatus.attributeTypeMap; - } -} -exports.V2ResourceMetricStatus = V2ResourceMetricStatus; -V2ResourceMetricStatus.discriminator = undefined; -V2ResourceMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2MetricValueStatus" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2ResourceMetricStatus.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: release-1.30 - * - * - * NOTE: This class is auto generated 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__(4351); -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.ERROR = exports.CONNECT = exports.DELETE = exports.CHANGE = exports.UPDATE = exports.ADD = void 0; -exports.makeInformer = makeInformer; -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, fieldSelector) { - const watch = new watch_1.Watch(kubeconfig); - return new cache_1.ListWatch(path, watch, listPromiseFn, false, labelSelector, fieldSelector); -} -//# sourceMappingURL=informer.js.map - -/***/ }), - -/***/ 48037: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.jsonpath = jsonpath; -const jsonpath_plus_1 = __nccwpck_require__(24697); -function jsonpath(path, json) { - return (0, jsonpath_plus_1.JSONPath)({ - path, - json, - eval: false, - }); -} -//# sourceMappingURL=json_path.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(nodeOrOptions, options) { - if (typeof nodeOrOptions !== 'string' || nodeOrOptions === '') { - if (nodeOrOptions !== '') { - options = nodeOrOptions; - } - return this.metricsApiRequest('/apis/metrics.k8s.io/v1beta1/nodes', options); - } - return this.metricsApiRequest(`/apis/metrics.k8s.io/v1beta1/nodes/${nodeOrOptions}`, options); - } - async getPodMetrics(namespaceOrOptions, nameOrOptions, options) { - let path; - if (typeof namespaceOrOptions === 'string' && namespaceOrOptions !== '') { - const namespace = namespaceOrOptions; - if (typeof nameOrOptions === 'string') { - path = `/apis/metrics.k8s.io/v1beta1/namespaces/${namespace}/pods/${nameOrOptions}`; - } - else { - path = `/apis/metrics.k8s.io/v1beta1/namespaces/${namespace}/pods`; - options = nameOrOptions; - } - } - else { - path = '/apis/metrics.k8s.io/v1beta1/pods'; - if (typeof namespaceOrOptions !== 'string') { - options = namespaceOrOptions; - } - else if (typeof nameOrOptions !== 'string') { - options = nameOrOptions; - } - } - return this.metricsApiRequest(path, options); - } - async metricsApiRequest(path, options) { - const cluster = this.config.getCurrentCluster(); - if (!cluster) { - throw new Error('No currently active cluster'); - } - const requestOptions = { - method: 'GET', - uri: cluster.server + path, - qs: options, - }; - 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 = exports.KubernetesEventType = void 0; -const tslib_1 = __nccwpck_require__(4351); -const request = __nccwpck_require__(48699); -const api_1 = __nccwpck_require__(56664); -const serializer_1 = tslib_1.__importDefault(__nccwpck_require__(12306)); -const watch_1 = __nccwpck_require__(7633); -/** - * 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 = {})); -/** - * Describes the type of an watch event. - * Object is: - * - If Type is Added or Modified: the new state of the object. - * - If Type is Deleted: the state of the object immediately before deletion. - * - If Type is Bookmark: the object (instance of a type being watched) where - * only ResourceVersion field is set. On successful restart of watch from a - * bookmark resourceVersion, client is guaranteed to not get repeat event - * nor miss any events. - * - If Type is Error: *api.Status is recommended; other types may make sense - * depending on context. - */ -var KubernetesEventType; -(function (KubernetesEventType) { - KubernetesEventType["ADDED"] = "ADDED"; - KubernetesEventType["MODIFIED"] = "MODIFIED"; - KubernetesEventType["DELETED"] = "DELETED"; - KubernetesEventType["BOOKMARK"] = "BOOKMARK"; - KubernetesEventType["ERROR"] = "ERROR"; -})(KubernetesEventType || (exports.KubernetesEventType = KubernetesEventType = {})); -/** - * 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); - client.watcher = new watch_1.Watch(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 = serializer_1.default.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = serializer_1.default.serialize(dryRun, 'string'); - } - if (fieldManager !== undefined) { - localVarQueryParameters.fieldManager = serializer_1.default.serialize(fieldManager, 'string'); - } - const localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: serializer_1.default.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 = serializer_1.default.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = serializer_1.default.serialize(dryRun, 'string'); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters.gracePeriodSeconds = serializer_1.default.serialize(gracePeriodSeconds, 'number'); - } - if (orphanDependents !== undefined) { - localVarQueryParameters.orphanDependents = serializer_1.default.serialize(orphanDependents, 'boolean'); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters.propagationPolicy = serializer_1.default.serialize(propagationPolicy, 'string'); - } - const localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: serializer_1.default.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 = serializer_1.default.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = serializer_1.default.serialize(dryRun, 'string'); - } - if (fieldManager !== undefined) { - localVarQueryParameters.fieldManager = serializer_1.default.serialize(fieldManager, 'string'); - } - if (force !== undefined) { - localVarQueryParameters.force = serializer_1.default.serialize(force, 'boolean'); - } - const localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: serializer_1.default.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.'); - } - // verify required parameter 'kind' is not null or undefined - if (spec.kind === null || spec.kind === undefined) { - throw new Error('Required parameter spec.kind was null or undefined when calling read.'); - } - if (!spec.apiVersion) { - throw new Error('Required parameter spec.apiVersion 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 = serializer_1.default.serialize(pretty, 'string'); - } - if (exact !== undefined) { - localVarQueryParameters.exact = serializer_1.default.serialize(exact, 'boolean'); - } - if (exportt !== undefined) { - localVarQueryParameters.export = serializer_1.default.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 = serializer_1.default.serialize(pretty, 'string'); - } - if (exact !== undefined) { - localVarQueryParameters.exact = serializer_1.default.serialize(exact, 'boolean'); - } - if (exportt !== undefined) { - localVarQueryParameters.export = serializer_1.default.serialize(exportt, 'boolean'); - } - if (fieldSelector !== undefined) { - localVarQueryParameters.fieldSelector = serializer_1.default.serialize(fieldSelector, 'string'); - } - if (labelSelector !== undefined) { - localVarQueryParameters.labelSelector = serializer_1.default.serialize(labelSelector, 'string'); - } - if (limit !== undefined) { - localVarQueryParameters.limit = serializer_1.default.serialize(limit, 'number'); - } - if (continueToken !== undefined) { - localVarQueryParameters.continue = serializer_1.default.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 = serializer_1.default.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = serializer_1.default.serialize(dryRun, 'string'); - } - if (fieldManager !== undefined) { - localVarQueryParameters.fieldManager = serializer_1.default.serialize(fieldManager, 'string'); - } - const localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: serializer_1.default.serialize(spec, 'KubernetesObject'), - }; - return this.requestPromise(localVarRequestOptions); - } - /** - * Watches the given resources and calls provided callback with the parsed json object - * upon event received over the watcher connection. - * - * @param resource defines the resources to watch. Namespace is optional. - * Undefined namespace means to watch all namespaces. - * @param options Optional options that are passed to the watch request. - * @param callback callback function that is called with the parsed json object upon event received. - * @param 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. - * - * @returns WatchResult object that can be used to abort the watch. - */ - async watch({ resource, options = {}, callback, done, }) { - if (!this.watcher) { - throw new Error('Watcher not initialized'); - } - const resourcePath = new URL(await this.specUriPath({ - apiVersion: resource.apiVersion, - kind: resource.kind, - metadata: { - namespace: resource.namespace, - }, - }, 'list')).pathname; - const type = await this.getSerializationType(resource.apiVersion, resource.kind); - const cb = (phase, apiObj, watchObj) => { - const obj = serializer_1.default.deserialize(apiObj, type); - callback(phase, obj, watchObj - ? { - ...watchObj, - object: obj, - } - : undefined); - }; - const res = await this.watcher.watch(resourcePath, options, - // required to convert to less strict type. - cb, done); - return { - abort: () => res.abort(), - }; - } - /** 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) { - if (e instanceof Error) { - e.message = `Failed to fetch resource metadata for ${apiVersion}/${kind}: ${e.message}`; - } - throw e; - } - } - async getSerializationType(apiVersion, kind) { - if (apiVersion === undefined || kind === undefined) { - return 'KubernetesObject'; - } - // Types are defined in src/gen/api/models with the format "". - // Version and Kind are in PascalCase. - const gv = this.groupVersion(apiVersion); - const version = gv.version.charAt(0).toUpperCase() + gv.version.slice(1); - return `${version}${kind}`; - } - groupVersion(apiVersion) { - const v = apiVersion.split('/'); - return v.length === 1 - ? { - group: 'core', - version: apiVersion, - } - : { - group: v[0], - version: v[1], - }; - } - /** - * Standard Kubernetes request wrapped in a Promise. - */ - async requestPromise(requestOptions, type) { - 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, async (error, response, body) => { - if (error) { - reject(error); - } - else { - // TODO(schrodit): support correct deserialization to KubernetesObject. - if (type === undefined) { - type = await this.getSerializationType(body.apiVersion, body.kind); - } - body = serializer_1.default.deserialize(body, type); - 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 tslib_1 = __nccwpck_require__(4351); -const oidc = tslib_1.__importStar(__nccwpck_require__(97178)); -const rfc4648_1 = __nccwpck_require__(97417); -const util_1 = __nccwpck_require__(73837); -class OidcClient { - constructor(config) { - this.config = config; - } - async refresh(token) { - const newToken = await oidc.refreshTokenGrant(this.config, token); - return { - id_token: newToken.id_token, - refresh_token: newToken.refresh_token, - expires_at: newToken.expiresIn(), - }; - } -} -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; - } - return user.authProvider.config['id-token']; - } - async getClient(user) { - const metadata = { - client_id: user.authProvider.config['client-id'], - client_secret: user.authProvider.config['client-secret'], - }; - if (!user.authProvider.config['client-secret']) { - metadata.token_endpoint_auth_method = 'none'; - } - const configuration = await oidc.discovery(user.authProvider.config['idp-issuer-url'], user.authProvider.config['client-id'], metadata); - return new OidcClient(configuration); - } -} -exports.OpenIDConnectAuth = OpenIDConnectAuth; -//# sourceMappingURL=oidc_auth.js.map - -/***/ }), - -/***/ 33554: -/***/ (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.DelayedOpenIDConnectAuth = void 0; -class DelayedOpenIDConnectAuth { - constructor() { - this.delegate = undefined; - } - 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 oidc = await Promise.resolve().then(() => __importStar(__nccwpck_require__(41691))); - return new oidc.OpenIDConnectAuth().applyAuthentication(user, opts, overrideClient); - } -} -exports.DelayedOpenIDConnectAuth = DelayedOpenIDConnectAuth; -//# sourceMappingURL=oidc_auth_delayed.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 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 = disconnectOnErr === undefined ? 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 - -/***/ }), - -/***/ 12306: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const api_1 = __nccwpck_require__(56664); -class KubernetesObject { -} -KubernetesObject.attributeTypeMap = [ - { - name: 'apiVersion', - baseName: 'apiVersion', - type: 'string', - }, - { - name: 'kind', - baseName: 'kind', - type: 'string', - }, - { - name: 'metadata', - baseName: 'metadata', - type: 'V1ObjectMeta', - }, -]; -const isKubernetesObject = (data) => !!data && typeof data === 'object' && 'apiVersion' in data && 'kind' in data; -/** - * Wraps the ObjectSerializer to support custom resources and generic Kubernetes objects. - */ -class KubernetesObjectSerializer { - static get instance() { - if (this._instance) { - return this._instance; - } - this._instance = new KubernetesObjectSerializer(); - return this._instance; - } - constructor() { } - serialize(data, type) { - const obj = api_1.ObjectSerializer.serialize(data, type); - if (obj !== data) { - return obj; - } - if (!isKubernetesObject(data)) { - return obj; - } - const instance = {}; - for (const attributeType of KubernetesObject.attributeTypeMap) { - instance[attributeType.name] = api_1.ObjectSerializer.serialize(data[attributeType.baseName], attributeType.type); - } - // add all unknown properties as is. - for (const [key, value] of Object.entries(data)) { - if (KubernetesObject.attributeTypeMap.find((t) => t.name === key)) { - continue; - } - instance[key] = value; - } - return instance; - } - deserialize(data, type) { - const obj = api_1.ObjectSerializer.deserialize(data, type); - if (obj !== data) { - // the serializer knows the type and already deserialized it. - return obj; - } - if (!isKubernetesObject(data)) { - return obj; - } - const instance = new KubernetesObject(); - for (const attributeType of KubernetesObject.attributeTypeMap) { - instance[attributeType.name] = api_1.ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); - } - // add all unknown properties as is. - for (const [key, value] of Object.entries(data)) { - if (KubernetesObject.attributeTypeMap.find((t) => t.name === key)) { - continue; - } - instance[key] = value; - } - return instance; - } -} -exports["default"] = KubernetesObjectSerializer.instance; -//# sourceMappingURL=serializer.js.map - -/***/ }), - -/***/ 76023: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TerminalSizeQueue = void 0; -exports.isResizable = isResizable; -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; -} -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.PodStatus = exports.ContainerStatus = exports.NodeStatus = exports.CurrentResourceUsage = exports.ResourceUsage = void 0; -exports.topNodes = topNodes; -exports.topPods = topPods; -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 = (0, util_1.quantityToScalar)(node.status.allocatable.cpu); - const availableMem = (0, util_1.quantityToScalar)(node.status.allocatable.memory); - let totalPodCPU = 0; - let totalPodCPULimit = 0; - let totalPodMem = 0; - let totalPodMemLimit = 0; - let pods = await (0, util_1.podsForNode)(api, node.metadata.name); - pods = pods.filter((pod) => { var _a; return ((_a = pod.status) === null || _a === void 0 ? void 0 : _a.phase) === 'Running'; }); - pods.forEach((pod) => { - const cpuTotal = (0, util_1.totalCPU)(pod); - totalPodCPU = (0, util_1.add)(totalPodCPU, cpuTotal.request); - totalPodCPULimit = (0, util_1.add)(totalPodCPULimit, cpuTotal.limit); - const memTotal = (0, util_1.totalMemory)(pod); - totalPodMem = (0, util_1.add)(totalPodMem, memTotal.request); - totalPodMemLimit = (0, 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; -} -// 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 () => { - return (await (namespace ? api.listNamespacedPod(namespace) : 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 = (0, util_1.totalCPUForContainer)(container); - const containerMemTotal = (0, util_1.totalMemoryForContainer)(container); - // sum each container's CPU/Memory container.resources.requests/limits - // to get the pod's overall requests/limits - podRequestsCPU = (0, util_1.add)(podRequestsCPU, containerCpuTotal.request); - podLimitsCPU = (0, util_1.add)(podLimitsCPU, containerCpuTotal.limit); - podRequestsMem = (0, util_1.add)(podRequestsMem, containerMemTotal.request); - podLimitsMem = (0, 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 = (0, util_1.quantityToScalar)(containerMetrics.usage.cpu); - const currentContainerMemUsage = (0, util_1.quantityToScalar)(containerMetrics.usage.memory); - currentPodCPU = (0, util_1.add)(currentPodCPU, currentContainerCPUUsage); - currentPodMem = (0, 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; -} -//# sourceMappingURL=top.js.map - -/***/ }), - -/***/ 74949: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1MicroTime = void 0; -class V1MicroTime extends Date { - toISOString() { - return super.toISOString().slice(0, -1) + '000Z'; - } -} -exports.V1MicroTime = V1MicroTime; -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 26318: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sleep = exports.resolvablePromise = exports.awaitLater = exports.ResourceStatus = void 0; -exports.podsForNode = podsForNode; -exports.findSuffix = findSuffix; -exports.quantityToScalar = quantityToScalar; -exports.totalCPUForContainer = totalCPUForContainer; -exports.totalMemoryForContainer = totalMemoryForContainer; -exports.totalCPU = totalCPU; -exports.totalMemory = totalMemory; -exports.add = add; -exports.containerTotalForResource = containerTotalForResource; -exports.totalForResource = totalForResource; -exports.generateTmpFileName = generateTmpFileName; -const os_1 = __nccwpck_require__(22037); -const crypto_1 = __nccwpck_require__(6113); -const fs_1 = __nccwpck_require__(57147); -async function podsForNode(api, nodeName) { - const allPods = await api.listPodForAllNamespaces(); - return allPods.body.items.filter((pod) => pod.spec.nodeName === nodeName); -} -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); -} -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.slice(0, quantity.length - 1)).valueOf() / 1000000000; - case 'u': - return Number(quantity.slice(0, quantity.length - 1)).valueOf() / 1000000; - case 'm': - return Number(quantity.slice(0, quantity.length - 1)).valueOf() / 1000.0; - case 'k': - return BigInt(quantity.slice(0, quantity.length - 1)) * BigInt(1000); - case 'M': - return BigInt(quantity.slice(0, quantity.length - 1)) * BigInt(1000 * 1000); - case 'G': - return BigInt(quantity.slice(0, quantity.length - 1)) * BigInt(1000 * 1000 * 1000); - case 'T': - return BigInt(quantity.slice(0, quantity.length - 1)) * BigInt(1000 * 1000 * 1000) * BigInt(1000); - case 'P': - return (BigInt(quantity.slice(0, quantity.length - 1)) * - BigInt(1000 * 1000 * 1000) * - BigInt(1000 * 1000)); - case 'E': - return (BigInt(quantity.slice(0, quantity.length - 1)) * - BigInt(1000 * 1000 * 1000) * - BigInt(1000 * 1000 * 1000)); - case 'Ki': - return BigInt(quantity.slice(0, quantity.length - 2)) * BigInt(1024); - case 'Mi': - return BigInt(quantity.slice(0, quantity.length - 2)) * BigInt(1024 * 1024); - case 'Gi': - return BigInt(quantity.slice(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024); - case 'Ti': - return BigInt(quantity.slice(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024) * BigInt(1024); - case 'Pi': - return (BigInt(quantity.slice(0, quantity.length - 2)) * - BigInt(1024 * 1024 * 1024) * - BigInt(1024 * 1024)); - case 'Ei': - return (BigInt(quantity.slice(0, quantity.length - 2)) * - BigInt(1024 * 1024 * 1024) * - BigInt(1024 * 1024 * 1024)); - default: - throw new Error(`Unknown suffix: ${suffix}`); - } -} -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'); -} -function totalMemoryForContainer(container) { - return containerTotalForResource(container, 'memory'); -} -function totalCPU(pod) { - return totalForResource(pod, 'cpu'); -} -function totalMemory(pod) { - return totalForResource(pod, 'memory'); -} -function add(n1, n2) { - if (typeof n1 === 'number' && typeof n2 === 'number') { - return n1 + n2; - } - if (typeof n1 === 'number') { - return BigInt(Math.round(n1)) + BigInt(n2); - } - else if (typeof n2 === 'number') { - return BigInt(n1) + BigInt(Math.round(n2)); - } - return BigInt(n1) + BigInt(n2); -} -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); -} -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); -} -async function generateTmpFileName() { - let tmpFileName; - let i = 0; - do { - tmpFileName = `${(0, os_1.tmpdir)()}/${(0, crypto_1.randomUUID)()}`; - try { - await fs_1.promises.access(tmpFileName, fs_1.constants.W_OK); - console.warn('Tmp file already exists'); - } - catch (err) { - return tmpFileName; - } - i++; - } while (i < 10); - throw new Error('Cannot generate tmp file name'); -} -/** - * If you don't want to or can't await a promise right await and need to store - * it in a variable to await it later, wrap it with this function. - * Otherwise, if the promise rejects before you await it, it will cause an - * unhandled promise rejection which can cause process termination (in node). - */ -const awaitLater = (p) => { - p.catch(() => { }); // tslint:disable-line:no-empty - return p; -}; -exports.awaitLater = awaitLater; -const resolvablePromise = () => { - let resolve; - let reject; - const promise = (0, exports.awaitLater)(new Promise((res, rej) => { - resolve = res; - reject = rej; - })); - promise.resolve = resolve; - promise.reject = reject; - return promise; -}; -exports.resolvablePromise = resolvablePromise; -const sleep = (ms) => { - return new Promise((resolve) => setTimeout(resolve)); -}; -exports.sleep = sleep; -//# 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) => { - let data; - try { - data = JSON.parse(line); - } - catch (ignore) { - // ignore parse errors - return; - } - callback(data.type, data.object, data); - }); - 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 = [ - 'v5.channel.k8s.io', - 'v4.channel.k8s.io', - 'v3.channel.k8s.io', - 'v2.channel.k8s.io', - 'channel.k8s.io', -]; -class WebSocketHandler { - static supportsClose(protocol) { - return protocol === 'v5.channel.k8s.io'; - } - static closeStream(streamNum, streams) { - switch (streamNum) { - case WebSocketHandler.StdinStream: - streams.stdin.pause(); - break; - case WebSocketHandler.StdoutStream: - streams.stdout.end(); - break; - case WebSocketHandler.StderrStream: - streams.stderr.end(); - break; - } - } - 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. - // Hacky, change tests to use the stream interface - 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', () => { - if (WebSocketHandler.supportsClose(ws.protocol)) { - const buff = Buffer.alloc(2); - buff.writeUint8(this.CloseStream, 0); - buff.writeUint8(this.StdinStream, 1); - ws.send(buff); - } - 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; - } - // factory is really just for test injection - constructor(config, socketFactory, streams = { - stdin: process.stdin, - stdout: process.stdout, - stderr: process.stderr, - }) { - this.config = config; - this.socketFactory = socketFactory; - this.streams = streams; - } - /** - * 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.slice(8) : server.slice(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, protocols, 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 (data.charCodeAt(0) === WebSocketHandler.CloseStream) { - WebSocketHandler.closeStream(data.charCodeAt(1), this.streams); - } - if (textHandler && !textHandler(data)) { - client.close(); - } - } - else if (data instanceof Buffer) { - const streamNum = data.readUint8(0); - if (streamNum === WebSocketHandler.CloseStream) { - WebSocketHandler.closeStream(data.readInt8(1), this.streams); - } - if (binaryHandler && !binaryHandler(streamNum, data.subarray(1))) { - client.close(); - } - } - }; - }); - } -} -exports.WebSocketHandler = WebSocketHandler; -WebSocketHandler.StdinStream = 0; -WebSocketHandler.StdoutStream = 1; -WebSocketHandler.StderrStream = 2; -WebSocketHandler.StatusStream = 3; -WebSocketHandler.ResizeStream = 4; -WebSocketHandler.CloseStream = 255; -//# sourceMappingURL=web-socket-handler.js.map - -/***/ }), - -/***/ 18122: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loadYaml = loadYaml; -exports.loadAllYaml = loadAllYaml; -exports.dumpYaml = dumpYaml; -const tslib_1 = __nccwpck_require__(4351); -const yaml = tslib_1.__importStar(__nccwpck_require__(21917)); -function loadYaml(data, opts) { - return yaml.load(data, opts); -} -function loadAllYaml(data, opts) { - return yaml.loadAll(data, undefined, opts); -} -function dumpYaml(object, opts) { - return yaml.dump(object, opts); -} -//# sourceMappingURL=yaml.js.map - -/***/ }), - -/***/ 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); - - -/***/ }), - -/***/ 14812: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = -{ - parallel : __nccwpck_require__(8210), - serial : __nccwpck_require__(50445), - serialOrdered : __nccwpck_require__(3578) -}; - - -/***/ }), - -/***/ 1700: -/***/ ((module) => { - -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} - - -/***/ }), - -/***/ 72794: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var defer = __nccwpck_require__(15295); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} - - -/***/ }), - -/***/ 15295: -/***/ ((module) => { - -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} - - -/***/ }), - -/***/ 9023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var async = __nccwpck_require__(72794) - , abort = __nccwpck_require__(1700) - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} - - -/***/ }), - -/***/ 42474: -/***/ ((module) => { - -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} - - -/***/ }), - -/***/ 37942: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var abort = __nccwpck_require__(1700) - , async = __nccwpck_require__(72794) - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} - - -/***/ }), - -/***/ 8210: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(42474) - , terminator = __nccwpck_require__(37942) - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} - - -/***/ }), - -/***/ 50445: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var serialOrdered = __nccwpck_require__(3578); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} - - -/***/ }), - -/***/ 3578: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(42474) - , terminator = __nccwpck_require__(37942) - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} - - -/***/ }), - -/***/ 96342: -/***/ ((module, __unused_webpack_exports, __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' -} - -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) - var hostParts = (match || []).slice(1, 3) - - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es') - hostParts = hostParts.reverse() - - if (hostParts[1] == 's3') { - hostParts[0] = 's3' - hostParts[1] = 'us-east-1' - } else { - for (var i = 0; i < 2; i++) { - if (/^s3-/.test(hostParts[i])) { - hostParts[1] = hostParts[i].slice(3) - hostParts[0] = 's3' - break - } - } - } - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : '.' + this.region, - subdomain = this.service === 'ses' ? 'email' : this.service - return subdomain + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash - - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } - - if (query) { - var reducedQuery = Object.keys(query).reduce(function(obj, key) { - if (!key) return obj - obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key]) - return obj - }, {}) - var encodedQueryPieces = [] - Object.keys(reducedQuery).sort().forEach(function(key) { - if (!Array.isArray(reducedQuery[key])) { - encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) - } else { - reducedQuery[key].map(encodeRfc3986Full).sort() - .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) - } - }) - queryStr = encodedQueryPieces.join('&') - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) - path.push(encodeRfc3986Full(piece)) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .filter(function(key) { return HEADERS_TO_IGNORE[key.toLowerCase()] == null }) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .filter(function(key) { return HEADERS_TO_IGNORE[key] == null }) - .sort() - .join(';') -} - -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} - -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} - -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/' - - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { - path = encodeURI(decodeURI(path)) - } - - var queryIx = path.indexOf('?'), - query = null - - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } - - this.parsedPath = { - path: path, - query: query, - } -} - -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query - - if (!query) return path - - // Services don't support empty query string keys - if (query[''] != null) delete query[''] - - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} - -aws4.RequestSigner = RequestSigner - -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} - - -/***/ }), - -/***/ 74225: -/***/ ((module) => { - -module.exports = function(size) { - return new LruCache(size) -} - -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} - -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} - -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true -} - -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} - -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } -} - - -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null -} - -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) - - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } -} - -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} - -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } -} - - -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null -} - - -/***/ }), - -/***/ 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 -}; - - -/***/ }), - -/***/ 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); - } -}; - - -/***/ }), - -/***/ 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 { - -var util = __nccwpck_require__(73837); -var Stream = (__nccwpck_require__(12781).Stream); -var DelayedStream = __nccwpck_require__(18611); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; - - -/***/ }), - -/***/ 95898: -/***/ ((__unused_webpack_module, exports) => { - -var __webpack_unused_export__; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -__webpack_unused_export__ = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -__webpack_unused_export__ = isBoolean; - -function isNull(arg) { - return arg === null; -} -__webpack_unused_export__ = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -__webpack_unused_export__ = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -__webpack_unused_export__ = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -__webpack_unused_export__ = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -__webpack_unused_export__ = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -__webpack_unused_export__ = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -__webpack_unused_export__ = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -__webpack_unused_export__ = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -__webpack_unused_export__ = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.VZ = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -__webpack_unused_export__ = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -__webpack_unused_export__ = isPrimitive; - -__webpack_unused_export__ = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -/***/ }), - -/***/ 18611: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Stream = (__nccwpck_require__(12781).Stream); -var util = __nccwpck_require__(73837); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); - -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; - - -/***/ }), - -/***/ 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 -} - - -/***/ }), - -/***/ 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); -}; - - -/***/ }), - -/***/ 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); -} - - -/***/ }), - -/***/ 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) -} - - -/***/ }), - -/***/ 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)); - } -}; - - -/***/ }), - -/***/ 10657: -/***/ ((module) => { - -module.exports = isTypedArray -isTypedArray.strict = isStrictTypedArray -isTypedArray.loose = isLooseTypedArray - -var toString = Object.prototype.toString -var names = { - '[object Int8Array]': true - , '[object Int16Array]': true - , '[object Int32Array]': true - , '[object Uint8Array]': true - , '[object Uint8ClampedArray]': true - , '[object Uint16Array]': true - , '[object Uint32Array]': true - , '[object Float32Array]': true - , '[object Float64Array]': true -} - -function isTypedArray(arr) { - return ( - isStrictTypedArray(arr) - || isLooseTypedArray(arr) - ) -} - -function isStrictTypedArray(arr) { - return ( - arr instanceof Int8Array - || arr instanceof Int16Array - || arr instanceof Int32Array - || arr instanceof Uint8Array - || arr instanceof Uint8ClampedArray - || arr instanceof Uint16Array - || arr instanceof Uint32Array - || arr instanceof Float32Array - || arr instanceof Float64Array - ) -} - -function isLooseTypedArray(arr) { - return names[toString.call(arr)] -} - - -/***/ }), - -/***/ 64713: -/***/ ((module, __unused_webpack_exports, __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) - } -} - - -/***/ }), - -/***/ 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); -} - - -/***/ }), - -/***/ 47426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = __nccwpck_require__(53765) - - -/***/ }), - -/***/ 43583: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var db = __nccwpck_require__(47426) -var extname = (__nccwpck_require__(71017).extname) - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} - - -/***/ }), - -/***/ 80354: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findMadeSync = exports.findMade = void 0; -const path_1 = __nccwpck_require__(71017); -const findMade = async (opts, parent, path) => { - // we never want the 'made' return value to be a root directory - if (path === parent) { - return; - } - return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later - // will fail later - er => { - const fer = er; - return fer && fer.code === 'ENOENT' - ? (0, exports.findMade)(opts, (0, path_1.dirname)(parent), parent) - : undefined; - }); -}; -exports.findMade = findMade; -const findMadeSync = (opts, parent, path) => { - if (path === parent) { - return undefined; - } - try { - return opts.statSync(parent).isDirectory() ? path : undefined; - } - catch (er) { - const fer = er; - return fer && fer.code === 'ENOENT' - ? (0, exports.findMadeSync)(opts, (0, path_1.dirname)(parent), parent) - : undefined; - } -}; -exports.findMadeSync = findMadeSync; -//# sourceMappingURL=find-made.js.map - -/***/ }), - -/***/ 27280: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.mkdirp = exports.nativeSync = exports.native = exports.manualSync = exports.manual = exports.sync = exports.mkdirpSync = exports.useNativeSync = exports.useNative = exports.mkdirpNativeSync = exports.mkdirpNative = exports.mkdirpManualSync = exports.mkdirpManual = void 0; -const mkdirp_manual_js_1 = __nccwpck_require__(26386); -const mkdirp_native_js_1 = __nccwpck_require__(13842); -const opts_arg_js_1 = __nccwpck_require__(92110); -const path_arg_js_1 = __nccwpck_require__(98577); -const use_native_js_1 = __nccwpck_require__(18918); -/* c8 ignore start */ -var mkdirp_manual_js_2 = __nccwpck_require__(26386); -Object.defineProperty(exports, "mkdirpManual", ({ enumerable: true, get: function () { return mkdirp_manual_js_2.mkdirpManual; } })); -Object.defineProperty(exports, "mkdirpManualSync", ({ enumerable: true, get: function () { return mkdirp_manual_js_2.mkdirpManualSync; } })); -var mkdirp_native_js_2 = __nccwpck_require__(13842); -Object.defineProperty(exports, "mkdirpNative", ({ enumerable: true, get: function () { return mkdirp_native_js_2.mkdirpNative; } })); -Object.defineProperty(exports, "mkdirpNativeSync", ({ enumerable: true, get: function () { return mkdirp_native_js_2.mkdirpNativeSync; } })); -var use_native_js_2 = __nccwpck_require__(18918); -Object.defineProperty(exports, "useNative", ({ enumerable: true, get: function () { return use_native_js_2.useNative; } })); -Object.defineProperty(exports, "useNativeSync", ({ enumerable: true, get: function () { return use_native_js_2.useNativeSync; } })); -/* c8 ignore stop */ -const mkdirpSync = (path, opts) => { - path = (0, path_arg_js_1.pathArg)(path); - const resolved = (0, opts_arg_js_1.optsArg)(opts); - return (0, use_native_js_1.useNativeSync)(resolved) - ? (0, mkdirp_native_js_1.mkdirpNativeSync)(path, resolved) - : (0, mkdirp_manual_js_1.mkdirpManualSync)(path, resolved); -}; -exports.mkdirpSync = mkdirpSync; -exports.sync = exports.mkdirpSync; -exports.manual = mkdirp_manual_js_1.mkdirpManual; -exports.manualSync = mkdirp_manual_js_1.mkdirpManualSync; -exports.native = mkdirp_native_js_1.mkdirpNative; -exports.nativeSync = mkdirp_native_js_1.mkdirpNativeSync; -exports.mkdirp = Object.assign(async (path, opts) => { - path = (0, path_arg_js_1.pathArg)(path); - const resolved = (0, opts_arg_js_1.optsArg)(opts); - return (0, use_native_js_1.useNative)(resolved) - ? (0, mkdirp_native_js_1.mkdirpNative)(path, resolved) - : (0, mkdirp_manual_js_1.mkdirpManual)(path, resolved); -}, { - mkdirpSync: exports.mkdirpSync, - mkdirpNative: mkdirp_native_js_1.mkdirpNative, - mkdirpNativeSync: mkdirp_native_js_1.mkdirpNativeSync, - mkdirpManual: mkdirp_manual_js_1.mkdirpManual, - mkdirpManualSync: mkdirp_manual_js_1.mkdirpManualSync, - sync: exports.mkdirpSync, - native: mkdirp_native_js_1.mkdirpNative, - nativeSync: mkdirp_native_js_1.mkdirpNativeSync, - manual: mkdirp_manual_js_1.mkdirpManual, - manualSync: mkdirp_manual_js_1.mkdirpManualSync, - useNative: use_native_js_1.useNative, - useNativeSync: use_native_js_1.useNativeSync, -}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 26386: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.mkdirpManual = exports.mkdirpManualSync = void 0; -const path_1 = __nccwpck_require__(71017); -const opts_arg_js_1 = __nccwpck_require__(92110); -const mkdirpManualSync = (path, options, made) => { - const parent = (0, path_1.dirname)(path); - const opts = { ...(0, opts_arg_js_1.optsArg)(options), 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 - const fer = er; - if (fer && fer.code !== 'EISDIR') { - throw er; - } - return; - } - } - try { - opts.mkdirSync(path, opts); - return made || path; - } - catch (er) { - const fer = er; - if (fer && fer.code === 'ENOENT') { - return (0, exports.mkdirpManualSync)(path, opts, (0, exports.mkdirpManualSync)(parent, opts, made)); - } - if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') { - throw er; - } - try { - if (!opts.statSync(path).isDirectory()) - throw er; - } - catch (_) { - throw er; - } - } -}; -exports.mkdirpManualSync = mkdirpManualSync; -exports.mkdirpManual = Object.assign(async (path, options, made) => { - const opts = (0, opts_arg_js_1.optsArg)(options); - opts.recursive = false; - const parent = (0, path_1.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 - const fer = er; - if (fer && fer.code !== 'EISDIR') { - throw er; - } - }); - } - return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => { - const fer = er; - if (fer && fer.code === 'ENOENT') { - return (0, exports.mkdirpManual)(parent, opts).then((made) => (0, exports.mkdirpManual)(path, opts, made)); - } - if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') { - throw er; - } - return opts.statAsync(path).then(st => { - if (st.isDirectory()) { - return made; - } - else { - throw er; - } - }, () => { - throw er; - }); - }); -}, { sync: exports.mkdirpManualSync }); -//# sourceMappingURL=mkdirp-manual.js.map - -/***/ }), - -/***/ 13842: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.mkdirpNative = exports.mkdirpNativeSync = void 0; -const path_1 = __nccwpck_require__(71017); -const find_made_js_1 = __nccwpck_require__(80354); -const mkdirp_manual_js_1 = __nccwpck_require__(26386); -const opts_arg_js_1 = __nccwpck_require__(92110); -const mkdirpNativeSync = (path, options) => { - const opts = (0, opts_arg_js_1.optsArg)(options); - opts.recursive = true; - const parent = (0, path_1.dirname)(path); - if (parent === path) { - return opts.mkdirSync(path, opts); - } - const made = (0, find_made_js_1.findMadeSync)(opts, path); - try { - opts.mkdirSync(path, opts); - return made; - } - catch (er) { - const fer = er; - if (fer && fer.code === 'ENOENT') { - return (0, mkdirp_manual_js_1.mkdirpManualSync)(path, opts); - } - else { - throw er; - } - } -}; -exports.mkdirpNativeSync = mkdirpNativeSync; -exports.mkdirpNative = Object.assign(async (path, options) => { - const opts = { ...(0, opts_arg_js_1.optsArg)(options), recursive: true }; - const parent = (0, path_1.dirname)(path); - if (parent === path) { - return await opts.mkdirAsync(path, opts); - } - return (0, find_made_js_1.findMade)(opts, path).then((made) => opts - .mkdirAsync(path, opts) - .then(m => made || m) - .catch(er => { - const fer = er; - if (fer && fer.code === 'ENOENT') { - return (0, mkdirp_manual_js_1.mkdirpManual)(path, opts); - } - else { - throw er; - } - })); -}, { sync: exports.mkdirpNativeSync }); -//# sourceMappingURL=mkdirp-native.js.map - -/***/ }), - -/***/ 92110: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.optsArg = void 0; -const fs_1 = __nccwpck_require__(57147); -const optsArg = (opts) => { - if (!opts) { - opts = { mode: 0o777 }; - } - else if (typeof opts === 'object') { - opts = { mode: 0o777, ...opts }; - } - else if (typeof opts === 'number') { - opts = { mode: opts }; - } - else if (typeof opts === 'string') { - opts = { mode: parseInt(opts, 8) }; - } - else { - throw new TypeError('invalid options argument'); - } - const resolved = opts; - const optsFs = opts.fs || {}; - opts.mkdir = opts.mkdir || optsFs.mkdir || fs_1.mkdir; - opts.mkdirAsync = opts.mkdirAsync - ? opts.mkdirAsync - : async (path, options) => { - return new Promise((res, rej) => resolved.mkdir(path, options, (er, made) => er ? rej(er) : res(made))); - }; - opts.stat = opts.stat || optsFs.stat || fs_1.stat; - opts.statAsync = opts.statAsync - ? opts.statAsync - : async (path) => new Promise((res, rej) => resolved.stat(path, (err, stats) => (err ? rej(err) : res(stats)))); - opts.statSync = opts.statSync || optsFs.statSync || fs_1.statSync; - opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || fs_1.mkdirSync; - return resolved; -}; -exports.optsArg = optsArg; -//# sourceMappingURL=opts-arg.js.map - -/***/ }), - -/***/ 98577: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pathArg = void 0; -const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform; -const path_1 = __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 = (0, path_1.resolve)(path); - if (platform === 'win32') { - const badWinChars = /[*|"<>?:]/; - const { root } = (0, path_1.parse)(path); - if (badWinChars.test(path.substring(root.length))) { - throw Object.assign(new Error('Illegal characters in path.'), { - path, - code: 'EINVAL', - }); - } - } - return path; -}; -exports.pathArg = pathArg; -//# sourceMappingURL=path-arg.js.map - -/***/ }), - -/***/ 18918: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.useNative = exports.useNativeSync = void 0; -const fs_1 = __nccwpck_require__(57147); -const opts_arg_js_1 = __nccwpck_require__(92110); -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); -exports.useNativeSync = !hasNative - ? () => false - : (opts) => (0, opts_arg_js_1.optsArg)(opts).mkdirSync === fs_1.mkdirSync; -exports.useNative = Object.assign(!hasNative - ? () => false - : (opts) => (0, opts_arg_js_1.optsArg)(opts).mkdir === fs_1.mkdir, { - sync: exports.useNativeSync, -}); -//# sourceMappingURL=use-native.js.map - -/***/ }), - -/***/ 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 - -/***/ }), - -/***/ 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); -}; - - -/***/ }), - -/***/ 74907: -/***/ ((module) => { - -"use strict"; - - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -module.exports = { - 'default': 'RFC3986', - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - }, - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; - - -/***/ }), - -/***/ 22760: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var stringify = __nccwpck_require__(79954); -var parse = __nccwpck_require__(33912); -var formats = __nccwpck_require__(74907); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - - -/***/ }), - -/***/ 33912: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var utils = __nccwpck_require__(72360); - -var has = Object.prototype.hasOwnProperty; - -var defaults = { - allowDots: false, - allowPrototypes: false, - arrayLimit: 20, - decoder: utils.decode, - delimiter: '&', - depth: 5, - parameterLimit: 1000, - plainObjects: false, - strictNullHandling: false -}; - -var parseValues = function parseQueryStringValues(str, options) { - var obj = {}; - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - - for (var i = 0; i < parts.length; ++i) { - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder); - val = options.decoder(part.slice(pos + 1), defaults.decoder); - } - if (has.call(obj, key)) { - obj[key] = [].concat(obj[key]).concat(val); - } else { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options) { - var leaf = val; - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - obj = [].concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if (!options.parseArrays && cleanRoot === '') { - obj = { 0: leaf }; - } else if ( - !isNaN(index) - && root !== cleanRoot - && String(index) === cleanRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else if (cleanRoot !== '__proto__') { - obj[cleanRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts ? utils.assign({}, opts) : {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; - options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = utils.merge(obj, newObj, options); - } - - return utils.compact(obj); -}; - - -/***/ }), - -/***/ 79954: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var utils = __nccwpck_require__(72360); -var formats = __nccwpck_require__(74907); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaults = { - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly -) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } - - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (isArray(obj)) { - pushToArray(values, stringify( - obj[key], - generateArrayPrefix(prefix, key), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } else { - pushToArray(values, stringify( - obj[key], - prefix + (allowDots ? '.' + key : '[' + key + ']'), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts ? utils.assign({}, opts) : {}; - - if (options.encoder !== null && typeof options.encoder !== 'undefined' && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; - var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; - if (typeof options.format === 'undefined') { - options.format = formats['default']; - } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { - throw new TypeError('Unknown format option provided.'); - } - var formatter = formats.formatters[options.format]; - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - pushToArray(keys, stringify( - obj[key], - key, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encode ? encoder : null, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } - - var joined = keys.join(delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - return joined.length > 0 ? prefix + joined : ''; -}; - - -/***/ }), - -/***/ 72360: -/***/ ((module) => { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - var obj; - - while (queue.length) { - var item = queue.pop(); - obj = item.obj[item.prop]; - - if (Array.isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } - - return obj; -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (Array.isArray(target) && Array.isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -var encode = function encode(str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - /* eslint operator-linebreak: [2, "before"] */ - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - return compactQueue(queue); -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - merge: merge -}; - - -/***/ }), - -/***/ 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: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var caseless = __nccwpck_require__(35684) -var uuid = __nccwpck_require__(80824) -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__(47279) - -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 - ] - - obj[pair.name] = arr - - return obj -} - -Har.prototype.prep = function (data) { - // construct utility properties - data.queryObj = {} - data.headersObj = {} - data.postData.jsonObj = false - data.postData.paramsObj = false - - // construct query objects - if (data.queryString && data.queryString.length) { - data.queryObj = data.queryString.reduce(this.reducer, {}) - } - - // construct headers objects - if (data.headers && data.headers.length) { - // loweCase header keys - data.headersObj = data.headers.reduceRight(function (headers, header) { - headers[header.name] = header.value - return headers - }, {}) - } - - // construct Cookie header - if (data.cookies && data.cookies.length) { - var cookies = data.cookies.map(function (cookie) { - return cookie.name + '=' + cookie.value - }) - - if (cookies.length) { - data.headersObj.cookie = cookies.join('; ') - } - } - - // prep body - function some (arr) { - return arr.some(function (type) { - return data.postData.mimeType.indexOf(type) === 0 - }) - } - - if (some([ - 'multipart/mixed', - 'multipart/related', - 'multipart/form-data', - 'multipart/alternative'])) { - // reset values - data.postData.mimeType = 'multipart/form-data' - } else if (some([ - 'application/x-www-form-urlencoded'])) { - if (!data.postData.params) { - data.postData.text = '' - } else { - data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) - - // always overwrite - data.postData.text = qs.stringify(data.postData.paramsObj) - } - } else if (some([ - 'text/json', - 'text/x-json', - 'application/json', - 'application/x-json'])) { - data.postData.mimeType = 'application/json' - - if (data.postData.text) { - try { - data.postData.jsonObj = JSON.parse(data.postData.text) - } catch (e) { - this.request.debug(e) - - // force back to text/plain - data.postData.mimeType = 'text/plain' - } - } - } - - return data -} - -Har.prototype.options = function (options) { - // skip if no har property defined - if (!options.har) { - return options - } - - var har = {} - extend(har, options.har) - - // only process the first entry - if (har.log && har.log.entries) { - har = har.log.entries[0] - } - - // add optional properties to make validation successful - har.url = har.url || options.url || options.uri || options.baseUrl || '/' - har.httpVersion = har.httpVersion || 'HTTP/1.1' - har.queryString = har.queryString || [] - har.headers = har.headers || [] - har.cookies = har.cookies || [] - har.postData = har.postData || {} - har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' - - har.bodySize = 0 - har.headersSize = 0 - har.postData.size = 0 - - if (!validate.request(har)) { - return options - } - - // clean up and get some utility properties - var req = this.prep(har) - - // construct new options - if (req.url) { - options.url = req.url - } - - if (req.method) { - options.method = req.method - } - - if (Object.keys(req.queryObj).length) { - options.qs = req.queryObj - } - - if (Object.keys(req.headersObj).length) { - options.headers = req.headersObj - } - - function test (type) { - return req.postData.mimeType.indexOf(type) === 0 - } - if (test('application/x-www-form-urlencoded')) { - options.form = req.postData.paramsObj - } else if (test('application/json')) { - if (req.postData.jsonObj) { - options.body = req.postData.jsonObj - options.json = true - } - } else if (test('multipart/form-data')) { - options.formData = {} - - req.postData.params.forEach(function (param) { - var attachment = {} - - if (!param.fileName && !param.contentType) { - options.formData[param.name] = param.value - return - } - - // attempt to read from disk! - if (param.fileName && !param.value) { - attachment.value = fs.createReadStream(param.fileName) - } else if (param.value) { - attachment.value = param.value - } - - if (param.fileName) { - attachment.options = { - filename: param.fileName, - contentType: param.contentType ? param.contentType : null - } - } - - options.formData[param.name] = attachment - }) - } else { - if (req.postData.text) { - options.body = req.postData.text - } - } - - return options -} - -exports.t = Har - - -/***/ }), - -/***/ 34473: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var crypto = __nccwpck_require__(6113) - -function randomString (size) { - var bits = (size + 1) * 6 - var buffer = crypto.randomBytes(Math.ceil(bits / 8)) - var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') - return string.slice(0, size) -} - -function calculatePayloadHash (payload, algorithm, contentType) { - var hash = crypto.createHash(algorithm) - hash.update('hawk.1.payload\n') - hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n') - hash.update(payload || '') - hash.update('\n') - return hash.digest('base64') -} - -exports.calculateMac = function (credentials, opts) { - var normalized = 'hawk.1.header\n' + - opts.ts + '\n' + - opts.nonce + '\n' + - (opts.method || '').toUpperCase() + '\n' + - opts.resource + '\n' + - opts.host.toLowerCase() + '\n' + - opts.port + '\n' + - (opts.hash || '') + '\n' - - if (opts.ext) { - normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n') - } - - normalized = normalized + '\n' - - if (opts.app) { - normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n' - } - - var hmac = crypto.createHmac(credentials.algorithm, credentials.key).update(normalized) - var digest = hmac.digest('base64') - return digest -} - -exports.header = function (uri, method, opts) { - var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1000) - var credentials = opts.credentials - if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { - return '' - } - - if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) { - return '' - } - - var artifacts = { - ts: timestamp, - nonce: opts.nonce || randomString(6), - method: method, - resource: uri.pathname + (uri.search || ''), - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - hash: opts.hash, - ext: opts.ext, - app: opts.app, - dlg: opts.dlg - } - - if (!artifacts.hash && (opts.payload || opts.payload === '')) { - artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType) - } - - var mac = exports.calculateMac(credentials, artifacts) - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== '' - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : '') + - '", mac="' + mac + '"' - - if (artifacts.app) { - header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"' - } - - return header -} - - -/***/ }), - -/***/ 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 - try { - ret = JSON.stringify(obj, replacer) - } catch (e) { - ret = jsonSafeStringify(obj, replacer) - } - return ret -} - -function md5 (str) { - return crypto.createHash('md5').update(str).digest('hex') -} - -function isReadStream (rs) { - return rs.readable && rs.path && rs.mode -} - -function toBase64 (str) { - return Buffer.from(str || '', 'utf8').toString('base64') -} - -function copy (obj) { - var o = {} - Object.keys(obj).forEach(function (i) { - o[i] = obj[i] - }) - return o -} - -function version () { - var numbers = process.version.replace('v', '').split('.') - return { - major: parseInt(numbers[0], 10), - minor: parseInt(numbers[1], 10), - patch: parseInt(numbers[2], 10) - } -} - -exports.paramsHaveRequestBody = paramsHaveRequestBody -exports.safeStringify = safeStringify -exports.md5 = md5 -exports.isReadStream = isReadStream -exports.toBase64 = toBase64 -exports.copy = copy -exports.version = version -exports.defer = defer - - -/***/ }), - -/***/ 87810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var uuid = __nccwpck_require__(80824) -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.')) - } - - if (options.chunked !== undefined) { - chunked = options.chunked - } - - if (self.request.getHeader('transfer-encoding') === 'chunked') { - chunked = true - } - - if (!chunked) { - parts.forEach(function (part) { - if (typeof part.body === 'undefined') { - self.request.emit('error', new Error('Body attribute missing in multipart.')) - } - if (isstream(part.body)) { - chunked = true - } - }) - } - - return chunked -} - -Multipart.prototype.setHeaders = function (chunked) { - var self = this - - if (chunked && !self.request.hasHeader('transfer-encoding')) { - self.request.setHeader('transfer-encoding', 'chunked') - } - - var header = self.request.getHeader('content-type') - - if (!header || header.indexOf('multipart') === -1) { - self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) - } else { - if (header.indexOf('boundary') !== -1) { - self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') - } else { - self.request.setHeader('content-type', header + '; boundary=' + self.boundary) - } - } -} - -Multipart.prototype.build = function (parts, chunked) { - var self = this - var body = chunked ? new CombinedStream() : [] - - function add (part) { - if (typeof part === 'number') { - part = part.toString() - } - return chunked ? body.append(part) : body.push(Buffer.from(part)) - } - - if (self.request.preambleCRLF) { - add('\r\n') - } - - parts.forEach(function (part) { - var preamble = '--' + self.boundary + '\r\n' - Object.keys(part).forEach(function (key) { - if (key === 'body') { return } - preamble += key + ': ' + part[key] + '\r\n' - }) - preamble += '\r\n' - add(preamble) - add(part.body) - add('\r\n') - }) - add('--' + self.boundary + '--') - - if (self.request.postambleCRLF) { - add('\r\n') - } - - return body -} - -Multipart.prototype.onRequest = function (options) { - var self = this - - var chunked = self.isChunked(options) - var parts = options.data || options - - self.setHeaders(chunked) - self.chunked = chunked - self.body = self.build(parts, chunked) -} - -exports.$ = Multipart - - -/***/ }), - -/***/ 41174: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var url = __nccwpck_require__(57310) -var qs = __nccwpck_require__(22760) -var caseless = __nccwpck_require__(35684) -var uuid = __nccwpck_require__(80824) -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__(22760) -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 - } - } - } 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:') { - return true - } - - // Otherwise, do not use tunnel. - return false -} - -Tunnel.prototype.setup = function (options) { - var self = this - var request = self.request - - options = options || {} - - if (typeof request.proxy === 'string') { - request.proxy = url.parse(request.proxy) - } - - if (!request.proxy || !request.tunnel) { - return false - } - - // Setup Proxy Header Exclusive List and White List - if (options.proxyHeaderWhiteList) { - self.proxyHeaderWhiteList = options.proxyHeaderWhiteList - } - if (options.proxyHeaderExclusiveList) { - self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList - } - - var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) - var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) - - // Setup Proxy Headers and Proxy Headers Host - // Only send the Proxy White Listed Header names - var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) - proxyHeaders.host = constructProxyHost(request.uri) - - proxyHeaderExclusiveList.forEach(request.removeHeader, request) - - // Set Agent from Tunnel Data - var tunnelFn = getTunnelFn(request) - var tunnelOptions = constructTunnelOptions(request, proxyHeaders) - request.agent = tunnelFn(tunnelOptions) - - return true -} - -Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList -Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList -exports.n = Tunnel - - -/***/ }), - -/***/ 11377: -/***/ ((module, __unused_webpack_exports, __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(); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { - - options = options || {}; - - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; - } - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; - } - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { - return; - } - - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; - -FormData.prototype._lengthRetriever = function(value, callback) { - - if (value.hasOwnProperty('fd')) { - - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { - - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); - - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - - if (err) { - callback(err); - return; - } - - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - callback('Unknown stream'); - } -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } - - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } - - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; - - // skip nullish headers. - if (header == null) { - continue; - } - - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } - - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; - -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; - - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path); - } - - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } - - return contentDisposition; -}; - -FormData.prototype._getContentType = function(value, options) { - - // use custom content-type above all - var contentType = options.contentType; - - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } - - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } - - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; - } - - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } - - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - - return contentType; -}; - -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } - - return formHeaders; -}; - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); - - // use custom params - } else { - - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - if (err) { - this._error(err); - return; - } - - // add content length - request.setHeader('Content-Length', length); - - this.pipe(request); - if (cb) { - request.on('error', cb); - request.on('response', cb.bind(this, null)); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; - -FormData.prototype.toString = function () { - return '[object FormData]'; -}; - - -/***/ }), - -/***/ 94932: -/***/ ((module) => { - -// populates missing values -module.exports = function(dst, src) { - - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); - - return dst; -}; - - -/***/ }), - -/***/ 47279: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -var net = __nccwpck_require__(41808); -var urlParse = (__nccwpck_require__(57310).parse); -var util = __nccwpck_require__(73837); -var pubsuffix = __nccwpck_require__(34964); -var Store = (__nccwpck_require__(11013)/* .Store */ .y); -var MemoryCookieStore = (__nccwpck_require__(73533)/* .MemoryCookieStore */ .m); -var pathMatch = (__nccwpck_require__(30495)/* .pathMatch */ .U); -var VERSION = __nccwpck_require__(30380); - -var punycode; -try { - punycode = __nccwpck_require__(85477); -} catch(e) { - console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); -} - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - -var CONTROL_CHARS = /[\x00-\x1F]/; - -// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in -// the "relaxed" mode, see: -// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 -var TERMINATORS = ['\n', '\r', '\0']; - -// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - -// date-time parsing constants (RFC6265 S5.1.1) - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, - jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var MAX_TIME = 2147483647000; // 31-bit max -var MIN_TIME = 0; // 31-bit min - -/* - * Parses a Natural number (i.e., non-negative integer) with either the - * *DIGIT ( non-digit *OCTET ) - * or - * *DIGIT - * grammar (RFC6265 S5.1.1). - * - * The "trailingOK" boolean controls if the grammar accepts a - * "( non-digit *OCTET )" trailer. - */ -function parseDigits(token, minDigits, maxDigits, trailingOK) { - var count = 0; - while (count < token.length) { - var c = token.charCodeAt(count); - // "non-digit = %x00-2F / %x3A-FF" - if (c <= 0x2F || c >= 0x3A) { - break; - } - count++; - } - - // constrain to a minimum and maximum number of digits. - if (count < minDigits || count > maxDigits) { - return null; - } - - if (!trailingOK && count != token.length) { - return null; - } - - return parseInt(token.substr(0,count), 10); -} - -function parseTime(token) { - var parts = token.split(':'); - var result = [0,0,0]; - - /* RF6256 S5.1.1: - * time = hms-time ( non-digit *OCTET ) - * hms-time = time-field ":" time-field ":" time-field - * time-field = 1*2DIGIT - */ - - if (parts.length !== 3) { - return null; - } - - for (var i = 0; i < 3; i++) { - // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be - // followed by "( non-digit *OCTET )" so therefore the last time-field can - // have a trailer - var trailingOK = (i == 2); - var num = parseDigits(parts[i], 1, 2, trailingOK); - if (num === null) { - return null; - } - result[i] = num; - } - - return result; -} - -function parseMonth(token) { - token = String(token).substr(0,3).toLowerCase(); - var num = MONTH_TO_NUM[token]; - return num >= 0 ? num : null; -} - -/* - * RFC6265 S5.1.1 date parser (see RFC for full grammar) - */ -function parseDate(str) { - if (!str) { - return; - } - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) { - return; - } - - var hour = null; - var minute = null; - var second = null; - var dayOfMonth = null; - var month = null; - var year = null; - - for (var i=0; i= 70 && year <= 99) { - year += 1900; - } else if (year >= 0 && year <= 69) { - year += 2000; - } - } - } - } - - /* RFC 6265 S5.1.1 - * "5. Abort these steps and fail to parse the cookie-date if: - * * at least one of the found-day-of-month, found-month, found- - * year, or found-time flags is not set, - * * the day-of-month-value is less than 1 or greater than 31, - * * the year-value is less than 1601, - * * the hour-value is greater than 23, - * * the minute-value is greater than 59, or - * * the second-value is greater than 59. - * (Note that leap seconds cannot be represented in this syntax.)" - * - * So, in order as above: - */ - if ( - dayOfMonth === null || month === null || year === null || second === null || - dayOfMonth < 1 || dayOfMonth > 31 || - year < 1601 || - hour > 23 || - minute > 59 || - second > 59 - ) { - return; - } - - return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) { - return null; - } - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) { - str = punycode.toASCII(str); - } - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) { - return null; - } - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) { - return true; - } - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) { - return false; - } - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) { - return false; // it's a non-match (-1) or prefix (0) - } - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) { // it's not a suffix - return false; - } - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') { - return false; - } - - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") { - return "/"; - } - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") { - return path; - } - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) { - return "/"; - } - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - -function trimTerminator(str) { - for (var t = 0; t < TERMINATORS.length; t++) { - var terminatorIdx = str.indexOf(TERMINATORS[t]); - if (terminatorIdx !== -1) { - str = str.substr(0,terminatorIdx); - } - } - - return str; -} - -function parseCookiePair(cookiePair, looseMode) { - cookiePair = trimTerminator(cookiePair); - - var firstEq = cookiePair.indexOf('='); - if (looseMode) { - if (firstEq === 0) { // '=' is immediately at start - cookiePair = cookiePair.substr(1); - firstEq = cookiePair.indexOf('='); // might still need to split on '=' - } - } else { // non-loose mode - if (firstEq <= 0) { // no '=' or is at start - return; // needs to have non-empty "cookie-name" - } - } - - var cookieName, cookieValue; - if (firstEq <= 0) { - cookieName = ""; - cookieValue = cookiePair.trim(); - } else { - cookieName = cookiePair.substr(0, firstEq).trim(); - cookieValue = cookiePair.substr(firstEq+1).trim(); - } - - if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { - return; - } - - var c = new Cookie(); - c.key = cookieName; - c.value = cookieValue; - return c; -} - -function parse(str, options) { - if (!options || typeof options !== 'object') { - options = {}; - } - str = str.trim(); - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); - var c = parseCookiePair(cookiePair, !!options.loose); - if (!c) { - return; - } - - if (firstSemi === -1) { - return c; - } - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi + 1).trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) { - return c; - } - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(';'); - while (cookie_avs.length) { - var av = cookie_avs.shift().trim(); - if (av.length === 0) { // happens if ";;" appears - continue; - } - var av_sep = av.indexOf('='); - var av_key, av_value; - - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - - if (av_value) { - av_value = av_value.trim(); - } - - switch(av_key) { - case 'expires': // S5.2.1 - if (av_value) { - var exp = parseDate(av_value); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp) { - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - c.expires = exp; - } - } - break; - - case 'max-age': // S5.2.2 - if (av_value) { - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (/^-?[0-9]+$/.test(av_value)) { - var delta = parseInt(av_value, 10); - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - } - } - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (av_value) { - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./, ''); - if (domain) { - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - } - } - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - c.path = av_value && av_value[0] === "/" ? av_value : null; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - return c; -} - -// avoid the V8 deoptimization monster! -function jsonParse(str) { - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return e; - } - return obj; -} - -function fromJSON(str) { - if (!str) { - return null; - } - - var obj; - if (typeof str === 'string') { - obj = jsonParse(str); - if (obj instanceof Error) { - return null; - } - } else { - // assume it's an Object - obj = str; - } - - var c = new Cookie(); - for (var i=0; i 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) { - break; - } - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - -function getCookieContext(url) { - if (url instanceof Object) { - return url; - } - // NOTE: decodeURI will throw on malformed URIs (see GH-32). - // Therefore, we will just skip decoding for such URIs. - try { - url = decodeURI(url); - } - catch(err) { - // Silently swallow error - } - - return urlParse(url); -} - -function Cookie(options) { - options = options || {}; - - Object.keys(options).forEach(function(prop) { - if (Cookie.prototype.hasOwnProperty(prop) && - Cookie.prototype[prop] !== options[prop] && - prop.substr(0,1) !== '_') - { - this[prop] = options[prop]; - } - }, this); - - this.creation = this.creation || new Date(); - - // used to break creation ties in cookieCompare(): - Object.defineProperty(this, 'creationIndex', { - configurable: false, - enumerable: false, // important for assert.deepEqual checks - writable: true, - value: ++Cookie.cookiesCreated - }); -} - -Cookie.cookiesCreated = 0; // incremented each time a cookie is created - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set -Object.defineProperty(Cookie.prototype, 'creationIndex', { - configurable: true, - enumerable: false, - writable: true, - value: 0 -}); - -Cookie.serializableProperties = Object.keys(Cookie.prototype) - .filter(function(prop) { - return !( - Cookie.prototype[prop] instanceof Function || - prop === 'creationIndex' || - prop.substr(0,1) === '_' - ); - }); - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -// Use the new custom inspection symbol to add the custom inspect function if -// available. -if (util.inspect.custom) { - Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; -} - -Cookie.prototype.toJSON = function() { - var obj = {}; - - var props = Cookie.serializableProperties; - for (var i=0; i { - -"use strict"; -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -var Store = (__nccwpck_require__(11013)/* .Store */ .y); -var permuteDomain = (__nccwpck_require__(91478).permuteDomain); -var pathMatch = (__nccwpck_require__(30495)/* .pathMatch */ .U); -var util = __nccwpck_require__(73837); - -function MemoryCookieStore() { - Store.call(this); - this.idx = {}; -} -util.inherits(MemoryCookieStore, Store); -exports.m = MemoryCookieStore; -MemoryCookieStore.prototype.idx = null; - -// Since it's just a struct in RAM, this Store is synchronous -MemoryCookieStore.prototype.synchronous = true; - -// force a default depth: -MemoryCookieStore.prototype.inspect = function() { - return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; -}; - -// Use the new custom inspection symbol to add the custom inspect function if -// available. -if (util.inspect.custom) { - MemoryCookieStore.prototype[util.inspect.custom] = MemoryCookieStore.prototype.inspect; -} - -MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) { - if (!this.idx[domain]) { - return cb(null,undefined); - } - if (!this.idx[domain][path]) { - return cb(null,undefined); - } - return cb(null,this.idx[domain][path][key]||null); -}; - -MemoryCookieStore.prototype.findCookies = function(domain, path, cb) { - var results = []; - if (!domain) { - return cb(null,[]); - } - - var pathMatcher; - if (!path) { - // null means "all paths" - pathMatcher = function matchAll(domainIndex) { - for (var curPath in domainIndex) { - var pathIndex = domainIndex[curPath]; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - } - }; - - } else { - pathMatcher = function matchRFC(domainIndex) { - //NOTE: we should use path-match algorithm from S5.1.4 here - //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299) - Object.keys(domainIndex).forEach(function (cookiePath) { - if (pathMatch(path, cookiePath)) { - var pathIndex = domainIndex[cookiePath]; - - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - } - }); - }; - } - - var domains = permuteDomain(domain) || [domain]; - var idx = this.idx; - domains.forEach(function(curDomain) { - var domainIndex = idx[curDomain]; - if (!domainIndex) { - return; - } - pathMatcher(domainIndex); - }); - - cb(null,results); -}; - -MemoryCookieStore.prototype.putCookie = function(cookie, cb) { - if (!this.idx[cookie.domain]) { - this.idx[cookie.domain] = {}; - } - if (!this.idx[cookie.domain][cookie.path]) { - this.idx[cookie.domain][cookie.path] = {}; - } - this.idx[cookie.domain][cookie.path][cookie.key] = cookie; - cb(null); -}; - -MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) { - // updateCookie() may avoid updating cookies that are identical. For example, - // lastAccessed may not be important to some stores and an equality - // comparison could exclude that field. - this.putCookie(newCookie,cb); -}; - -MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) { - if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { - delete this.idx[domain][path][key]; - } - cb(null); -}; - -MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) { - if (this.idx[domain]) { - if (path) { - delete this.idx[domain][path]; - } else { - delete this.idx[domain]; - } - } - return cb(null); -}; - -MemoryCookieStore.prototype.removeAllCookies = function(cb) { - this.idx = {}; - return cb(null); -} - -MemoryCookieStore.prototype.getAllCookies = function(cb) { - var cookies = []; - var idx = this.idx; - - var domains = Object.keys(idx); - domains.forEach(function(domain) { - var paths = Object.keys(idx[domain]); - paths.forEach(function(path) { - var keys = Object.keys(idx[domain][path]); - keys.forEach(function(key) { - if (key !== null) { - cookies.push(idx[domain][path][key]); - } - }); - }); - }); - - // Sort by creationIndex so deserializing retains the creation order. - // When implementing your own store, this SHOULD retain the order too - cookies.sort(function(a,b) { - return (a.creationIndex||0) - (b.creationIndex||0); - }); - - cb(null, cookies); -}; - - -/***/ }), - -/***/ 30495: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * "A request-path path-matches a given cookie-path if at least one of the - * following conditions holds:" - */ -function pathMatch (reqPath, cookiePath) { - // "o The cookie-path and the request-path are identical." - if (cookiePath === reqPath) { - return true; - } - - var idx = reqPath.indexOf(cookiePath); - if (idx === 0) { - // "o The cookie-path is a prefix of the request-path, and the last - // character of the cookie-path is %x2F ("/")." - if (cookiePath.substr(-1) === "/") { - return true; - } - - // " o The cookie-path is a prefix of the request-path, and the first - // character of the request-path that is not included in the cookie- path - // is a %x2F ("/") character." - if (reqPath.substr(cookiePath.length, 1) === "/") { - return true; - } - } - - return false; -} - -exports.U = pathMatch; - - -/***/ }), - -/***/ 91478: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -var pubsuffix = __nccwpck_require__(34964); - -// Gives the permutation of all possible domainMatch()es of a given domain. The -// array is in shortest-to-longest order. Handy for indexing. -function permuteDomain (domain) { - var pubSuf = pubsuffix.getPublicSuffix(domain); - if (!pubSuf) { - return null; - } - if (pubSuf == domain) { - return [domain]; - } - - var prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com" - var parts = prefix.split('.').reverse(); - var cur = pubSuf; - var permutations = [cur]; - while (parts.length) { - cur = parts.shift() + '.' + cur; - permutations.push(cur); - } - return permutations; -} - -exports.permuteDomain = permuteDomain; - - -/***/ }), - -/***/ 34964: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/*! - * Copyright (c) 2018, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -var psl = __nccwpck_require__(29975); - -function getPublicSuffix(domain) { - return psl.get(domain); -} - -exports.getPublicSuffix = getPublicSuffix; - - -/***/ }), - -/***/ 11013: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/*! - * Copyright (c) 2015, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*jshint unused:false */ - -function Store() { -} -exports.y = Store; - -// Stores may be synchronous, but are still required to use a -// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync" -// API that converts from synchronous-callbacks to imperative style. -Store.prototype.synchronous = false; - -Store.prototype.findCookie = function(domain, path, key, cb) { - throw new Error('findCookie is not implemented'); -}; - -Store.prototype.findCookies = function(domain, path, cb) { - throw new Error('findCookies is not implemented'); -}; - -Store.prototype.putCookie = function(cookie, cb) { - throw new Error('putCookie is not implemented'); -}; - -Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { - // recommended default implementation: - // return this.putCookie(newCookie, cb); - throw new Error('updateCookie is not implemented'); -}; - -Store.prototype.removeCookie = function(domain, path, key, cb) { - throw new Error('removeCookie is not implemented'); -}; - -Store.prototype.removeCookies = function(domain, path, cb) { - throw new Error('removeCookies is not implemented'); -}; - -Store.prototype.removeAllCookies = function(cb) { - throw new Error('removeAllCookies is not implemented'); -} - -Store.prototype.getAllCookies = function(cb) { - throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); -}; - - -/***/ }), - -/***/ 30380: -/***/ ((module) => { - -// generated by genversion -module.exports = '2.5.0' - - -/***/ }), - -/***/ 70304: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var http = __nccwpck_require__(13685) -var https = __nccwpck_require__(95687) -var url = __nccwpck_require__(57310) -var util = __nccwpck_require__(73837) -var stream = __nccwpck_require__(12781) -var zlib = __nccwpck_require__(59796) -var aws2 = __nccwpck_require__(96342) -var aws4 = __nccwpck_require__(16071) -var httpSignature = __nccwpck_require__(42479) -var mime = __nccwpck_require__(43583) -var caseless = __nccwpck_require__(35684) -var ForeverAgent = __nccwpck_require__(47568) -var FormData = __nccwpck_require__(11377) -var extend = __nccwpck_require__(38171) -var isstream = __nccwpck_require__(83362) -var isTypedArray = (__nccwpck_require__(10657).strict) -var helpers = __nccwpck_require__(74845) -var cookies = __nccwpck_require__(50976) -var getProxyFromURI = __nccwpck_require__(75654) -var Querystring = (__nccwpck_require__(66476)/* .Querystring */ .h) -var Har = (__nccwpck_require__(3248)/* .Har */ .t) -var Auth = (__nccwpck_require__(76996)/* .Auth */ .g) -var OAuth = (__nccwpck_require__(41174)/* .OAuth */ .f) -var hawk = __nccwpck_require__(34473) -var Multipart = (__nccwpck_require__(87810)/* .Multipart */ .$) -var Redirect = (__nccwpck_require__(3048)/* .Redirect */ .l) -var Tunnel = (__nccwpck_require__(17619)/* .Tunnel */ .n) -var now = __nccwpck_require__(85644) -var Buffer = (__nccwpck_require__(21867).Buffer) - -var safeStringify = helpers.safeStringify -var isReadStream = helpers.isReadStream -var toBase64 = helpers.toBase64 -var defer = helpers.defer -var copy = helpers.copy -var version = helpers.version -var globalCookieJar = cookies.jar() - -var globalPool = {} - -function filterForNonReserved (reserved, options) { - // Filter out properties that are not reserved. - // Reserved values are passed in at call site. - - var object = {} - for (var i in options) { - var notReserved = (reserved.indexOf(i) === -1) - if (notReserved) { - object[i] = options[i] - } - } - return object -} - -function filterOutReservedFunctions (reserved, options) { - // Filter out properties that are functions and are reserved. - // Reserved values are passed in at call site. - - var object = {} - for (var i in options) { - var isReserved = !(reserved.indexOf(i) === -1) - var isFunction = (typeof options[i] === 'function') - if (!(isReserved && isFunction)) { - object[i] = options[i] - } - } - return object -} - -// Return a simpler request object to allow serialization -function requestToJSON () { - var self = this - return { - uri: self.uri, - method: self.method, - headers: self.headers - } -} - -// Return a simpler response object to allow serialization -function responseToJSON () { - var self = this - return { - statusCode: self.statusCode, - body: self.body, - headers: self.headers, - request: requestToJSON.call(self.request) - } -} - -function Request (options) { - // if given the method property in options, set property explicitMethod to true - - // extend the Request instance with any non-reserved properties - // remove any reserved functions from the options object - // set Request instance to be readable and writable - // call init - - var self = this - - // start with HAR, then override with additional options - if (options.har) { - self._har = new Har(self) - options = self._har.options(options) - } - - stream.Stream.call(self) - var reserved = Object.keys(Request.prototype) - var nonReserved = filterForNonReserved(reserved, options) - - extend(self, nonReserved) - options = filterOutReservedFunctions(reserved, options) - - self.readable = true - self.writable = true - if (options.method) { - self.explicitMethod = true - } - self._qs = new Querystring(self) - self._auth = new Auth(self) - self._oauth = new OAuth(self) - self._multipart = new Multipart(self) - self._redirect = new Redirect(self) - self._tunnel = new Tunnel(self) - self.init(options) -} - -util.inherits(Request, stream.Stream) - -// Debugging -Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) -function debug () { - if (Request.debug) { - console.error('REQUEST %s', util.format.apply(util, arguments)) - } -} -Request.prototype.debug = debug - -Request.prototype.init = function (options) { - // init() contains all the code to setup the request object. - // the actual outgoing request is not started until start() is called - // this function is called from both the constructor and on redirect. - var self = this - if (!options) { - options = {} - } - self.headers = self.headers ? copy(self.headers) : {} - - // Delete headers with value undefined since they break - // ClientRequest.OutgoingMessage.setHeader in node 0.12 - for (var headerName in self.headers) { - if (typeof self.headers[headerName] === 'undefined') { - delete self.headers[headerName] - } - } - - caseless.httpify(self, self.headers) - - if (!self.method) { - self.method = options.method || 'GET' - } - if (!self.localAddress) { - self.localAddress = options.localAddress - } - - self._qs.init(options) - - debug(options) - if (!self.pool && self.pool !== false) { - self.pool = globalPool - } - self.dests = self.dests || [] - self.__isRequestRequest = true - - // Protect against double callback - if (!self._callback && self.callback) { - self._callback = self.callback - self.callback = function () { - if (self._callbackCalled) { - return // Print a warning maybe? - } - self._callbackCalled = true - self._callback.apply(self, arguments) - } - self.on('error', self.callback.bind()) - self.on('complete', self.callback.bind(self, null)) - } - - // People use this property instead all the time, so support it - if (!self.uri && self.url) { - self.uri = self.url - delete self.url - } - - // If there's a baseUrl, then use it as the base URL (i.e. uri must be - // specified as a relative path and is appended to baseUrl). - if (self.baseUrl) { - if (typeof self.baseUrl !== 'string') { - return self.emit('error', new Error('options.baseUrl must be a string')) - } - - if (typeof self.uri !== 'string') { - return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) - } - - if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { - return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) - } - - // Handle all cases to make sure that there's only one slash between - // baseUrl and uri. - var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 - var uriStartsWithSlash = self.uri.indexOf('/') === 0 - - if (baseUrlEndsWithSlash && uriStartsWithSlash) { - self.uri = self.baseUrl + self.uri.slice(1) - } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { - self.uri = self.baseUrl + self.uri - } else if (self.uri === '') { - self.uri = self.baseUrl - } else { - self.uri = self.baseUrl + '/' + self.uri - } - delete self.baseUrl - } - - // A URI is needed by this point, emit error if we haven't been able to get one - if (!self.uri) { - return self.emit('error', new Error('options.uri is a required argument')) - } - - // If a string URI/URL was given, parse it into a URL object - if (typeof self.uri === 'string') { - self.uri = url.parse(self.uri) - } - - // Some URL objects are not from a URL parsed string and need href added - if (!self.uri.href) { - self.uri.href = url.format(self.uri) - } - - // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme - if (self.uri.protocol === 'unix:') { - return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) - } - - // Support Unix Sockets - if (self.uri.host === 'unix') { - self.enableUnixSocket() - } - - if (self.strictSSL === false) { - self.rejectUnauthorized = false - } - - if (!self.uri.pathname) { self.uri.pathname = '/' } - - if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { - // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar - // Detect and reject it as soon as possible - var faultyUri = url.format(self.uri) - var message = 'Invalid URI "' + faultyUri + '"' - if (Object.keys(options).length === 0) { - // No option ? This can be the sign of a redirect - // As this is a case where the user cannot do anything (they didn't call request directly with this URL) - // they should be warned that it can be caused by a redirection (can save some hair) - message += '. This can be caused by a crappy redirection.' - } - // This error was fatal - self.abort() - return self.emit('error', new Error(message)) - } - - if (!self.hasOwnProperty('proxy')) { - self.proxy = getProxyFromURI(self.uri) - } - - self.tunnel = self._tunnel.isEnabled() - if (self.proxy) { - self._tunnel.setup(options) - } - - self._redirect.onRequest(options) - - self.setHost = false - if (!self.hasHeader('host')) { - var hostHeaderName = self.originalHostHeaderName || 'host' - self.setHeader(hostHeaderName, self.uri.host) - // Drop :port suffix from Host header if known protocol. - if (self.uri.port) { - if ((self.uri.port === '80' && self.uri.protocol === 'http:') || - (self.uri.port === '443' && self.uri.protocol === 'https:')) { - self.setHeader(hostHeaderName, self.uri.hostname) - } - } - self.setHost = true - } - - self.jar(self._jar || options.jar) - - if (!self.uri.port) { - if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 } - } - - if (self.proxy && !self.tunnel) { - self.port = self.proxy.port - self.host = self.proxy.hostname - } else { - self.port = self.uri.port - self.host = self.uri.hostname - } - - if (options.form) { - self.form(options.form) - } - - if (options.formData) { - var formData = options.formData - var requestForm = self.form() - var appendFormValue = function (key, value) { - if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { - requestForm.append(key, value.value, value.options) - } else { - requestForm.append(key, value) - } - } - for (var formKey in formData) { - if (formData.hasOwnProperty(formKey)) { - var formValue = formData[formKey] - if (formValue instanceof Array) { - for (var j = 0; j < formValue.length; j++) { - appendFormValue(formKey, formValue[j]) - } - } else { - appendFormValue(formKey, formValue) - } - } - } - } - - if (options.qs) { - self.qs(options.qs) - } - - if (self.uri.path) { - self.path = self.uri.path - } else { - self.path = self.uri.pathname + (self.uri.search || '') - } - - if (self.path.length === 0) { - self.path = '/' - } - - // Auth must happen last in case signing is dependent on other headers - if (options.aws) { - self.aws(options.aws) - } - - if (options.hawk) { - self.hawk(options.hawk) - } - - if (options.httpSignature) { - self.httpSignature(options.httpSignature) - } - - if (options.auth) { - if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { - options.auth.user = options.auth.username - } - if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { - options.auth.pass = options.auth.password - } - - self.auth( - options.auth.user, - options.auth.pass, - options.auth.sendImmediately, - options.auth.bearer - ) - } - - if (self.gzip && !self.hasHeader('accept-encoding')) { - self.setHeader('accept-encoding', 'gzip, deflate') - } - - if (self.uri.auth && !self.hasHeader('authorization')) { - var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) }) - self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) - } - - if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { - var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) }) - var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) - self.setHeader('proxy-authorization', authHeader) - } - - if (self.proxy && !self.tunnel) { - self.path = (self.uri.protocol + '//' + self.uri.host + self.path) - } - - if (options.json) { - self.json(options.json) - } - if (options.multipart) { - self.multipart(options.multipart) - } - - if (options.time) { - self.timing = true - - // NOTE: elapsedTime is deprecated in favor of .timings - self.elapsedTime = self.elapsedTime || 0 - } - - function setContentLength () { - if (isTypedArray(self.body)) { - self.body = Buffer.from(self.body) - } - - if (!self.hasHeader('content-length')) { - var length - if (typeof self.body === 'string') { - length = Buffer.byteLength(self.body) - } else if (Array.isArray(self.body)) { - length = self.body.reduce(function (a, b) { return a + b.length }, 0) - } else { - length = self.body.length - } - - if (length) { - self.setHeader('content-length', length) - } else { - self.emit('error', new Error('Argument error, options.body.')) - } - } - } - if (self.body && !isstream(self.body)) { - setContentLength() - } - - if (options.oauth) { - self.oauth(options.oauth) - } else if (self._oauth.params && self.hasHeader('authorization')) { - self.oauth(self._oauth.params) - } - - var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol - var defaultModules = {'http:': http, 'https:': https} - var httpModules = self.httpModules || {} - - self.httpModule = httpModules[protocol] || defaultModules[protocol] - - if (!self.httpModule) { - return self.emit('error', new Error('Invalid protocol: ' + protocol)) - } - - if (options.ca) { - self.ca = options.ca - } - - if (!self.agent) { - if (options.agentOptions) { - self.agentOptions = options.agentOptions - } - - if (options.agentClass) { - self.agentClass = options.agentClass - } else if (options.forever) { - var v = version() - // use ForeverAgent in node 0.10- only - if (v.major === 0 && v.minor <= 10) { - self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL - } else { - self.agentClass = self.httpModule.Agent - self.agentOptions = self.agentOptions || {} - self.agentOptions.keepAlive = true - } - } else { - self.agentClass = self.httpModule.Agent - } - } - - if (self.pool === false) { - self.agent = false - } else { - self.agent = self.agent || self.getNewAgent() - } - - self.on('pipe', function (src) { - if (self.ntick && self._started) { - self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) - } - self.src = src - if (isReadStream(src)) { - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', mime.lookup(src.path)) - } - } else { - if (src.headers) { - for (var i in src.headers) { - if (!self.hasHeader(i)) { - self.setHeader(i, src.headers[i]) - } - } - } - if (self._json && !self.hasHeader('content-type')) { - self.setHeader('content-type', 'application/json') - } - if (src.method && !self.explicitMethod) { - self.method = src.method - } - } - - // self.on('pipe', function () { - // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') - // }) - }) - - defer(function () { - if (self._aborted) { - return - } - - var end = function () { - if (self._form) { - if (!self._auth.hasAuth) { - self._form.pipe(self) - } else if (self._auth.hasAuth && self._auth.sentAuth) { - self._form.pipe(self) - } - } - if (self._multipart && self._multipart.chunked) { - self._multipart.body.pipe(self) - } - if (self.body) { - if (isstream(self.body)) { - self.body.pipe(self) - } else { - setContentLength() - if (Array.isArray(self.body)) { - self.body.forEach(function (part) { - self.write(part) - }) - } else { - self.write(self.body) - } - self.end() - } - } else if (self.requestBodyStream) { - console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') - self.requestBodyStream.pipe(self) - } else if (!self.src) { - if (self._auth.hasAuth && !self._auth.sentAuth) { - self.end() - return - } - if (self.method !== 'GET' && typeof self.method !== 'undefined') { - self.setHeader('content-length', 0) - } - self.end() - } - } - - if (self._form && !self.hasHeader('content-length')) { - // Before ending the request, we had to compute the length of the whole form, asyncly - self.setHeader(self._form.getHeaders(), true) - self._form.getLength(function (err, length) { - if (!err && !isNaN(length)) { - self.setHeader('content-length', length) - } - end() - }) - } else { - end() - } - - self.ntick = true - }) -} - -Request.prototype.getNewAgent = function () { - var self = this - var Agent = self.agentClass - var options = {} - if (self.agentOptions) { - for (var i in self.agentOptions) { - options[i] = self.agentOptions[i] - } - } - if (self.ca) { - options.ca = self.ca - } - if (self.ciphers) { - options.ciphers = self.ciphers - } - if (self.secureProtocol) { - options.secureProtocol = self.secureProtocol - } - if (self.secureOptions) { - options.secureOptions = self.secureOptions - } - if (typeof self.rejectUnauthorized !== 'undefined') { - options.rejectUnauthorized = self.rejectUnauthorized - } - - if (self.cert && self.key) { - options.key = self.key - options.cert = self.cert - } - - if (self.pfx) { - options.pfx = self.pfx - } - - if (self.passphrase) { - options.passphrase = self.passphrase - } - - var poolKey = '' - - // different types of agents are in different pools - if (Agent !== self.httpModule.Agent) { - poolKey += Agent.name - } - - // ca option is only relevant if proxy or destination are https - var proxy = self.proxy - if (typeof proxy === 'string') { - proxy = url.parse(proxy) - } - var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' - - if (isHttps) { - if (options.ca) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.ca - } - - if (typeof options.rejectUnauthorized !== 'undefined') { - if (poolKey) { - poolKey += ':' - } - poolKey += options.rejectUnauthorized - } - - if (options.cert) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.cert.toString('ascii') + options.key.toString('ascii') - } - - if (options.pfx) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.pfx.toString('ascii') - } - - if (options.ciphers) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.ciphers - } - - if (options.secureProtocol) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.secureProtocol - } - - if (options.secureOptions) { - if (poolKey) { - poolKey += ':' - } - poolKey += options.secureOptions - } - } - - if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { - // not doing anything special. Use the globalAgent - return self.httpModule.globalAgent - } - - // we're using a stored agent. Make sure it's protocol-specific - poolKey = self.uri.protocol + poolKey - - // generate a new agent for this setting if none yet exists - if (!self.pool[poolKey]) { - self.pool[poolKey] = new Agent(options) - // properly set maxSockets on new agents - if (self.pool.maxSockets) { - self.pool[poolKey].maxSockets = self.pool.maxSockets - } - } - - return self.pool[poolKey] -} - -Request.prototype.start = function () { - // start() is called once we are ready to send the outgoing HTTP request. - // this is usually called on the first write(), end() or on nextTick() - var self = this - - if (self.timing) { - // All timings will be relative to this request's startTime. In order to do this, - // we need to capture the wall-clock start time (via Date), immediately followed - // by the high-resolution timer (via now()). While these two won't be set - // at the _exact_ same time, they should be close enough to be able to calculate - // high-resolution, monotonically non-decreasing timestamps relative to startTime. - var startTime = new Date().getTime() - var startTimeNow = now() - } - - if (self._aborted) { - return - } - - self._started = true - self.method = self.method || 'GET' - self.href = self.uri.href - - if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { - self.setHeader('content-length', self.src.stat.size) - } - if (self._aws) { - self.aws(self._aws, true) - } - - // We have a method named auth, which is completely different from the http.request - // auth option. If we don't remove it, we're gonna have a bad time. - var reqOptions = copy(self) - delete reqOptions.auth - - debug('make request', self.uri.href) - - // node v6.8.0 now supports a `timeout` value in `http.request()`, but we - // should delete it for now since we handle timeouts manually for better - // consistency with node versions before v6.8.0 - delete reqOptions.timeout - - try { - self.req = self.httpModule.request(reqOptions) - } catch (err) { - self.emit('error', err) - return - } - - if (self.timing) { - self.startTime = startTime - self.startTimeNow = startTimeNow - - // Timing values will all be relative to startTime (by comparing to startTimeNow - // so we have an accurate clock) - self.timings = {} - } - - var timeout - if (self.timeout && !self.timeoutTimer) { - if (self.timeout < 0) { - timeout = 0 - } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) { - timeout = self.timeout - } - } - - self.req.on('response', self.onRequestResponse.bind(self)) - self.req.on('error', self.onRequestError.bind(self)) - self.req.on('drain', function () { - self.emit('drain') - }) - - self.req.on('socket', function (socket) { - // `._connecting` was the old property which was made public in node v6.1.0 - var isConnecting = socket._connecting || socket.connecting - if (self.timing) { - self.timings.socket = now() - self.startTimeNow - - if (isConnecting) { - var onLookupTiming = function () { - self.timings.lookup = now() - self.startTimeNow - } - - var onConnectTiming = function () { - self.timings.connect = now() - self.startTimeNow - } - - socket.once('lookup', onLookupTiming) - socket.once('connect', onConnectTiming) - - // clean up timing event listeners if needed on error - self.req.once('error', function () { - socket.removeListener('lookup', onLookupTiming) - socket.removeListener('connect', onConnectTiming) - }) - } - } - - var setReqTimeout = function () { - // This timeout sets the amount of time to wait *between* bytes sent - // from the server once connected. - // - // In particular, it's useful for erroring if the server fails to send - // data halfway through streaming a response. - self.req.setTimeout(timeout, function () { - if (self.req) { - self.abort() - var e = new Error('ESOCKETTIMEDOUT') - e.code = 'ESOCKETTIMEDOUT' - e.connect = false - self.emit('error', e) - } - }) - } - if (timeout !== undefined) { - // Only start the connection timer if we're actually connecting a new - // socket, otherwise if we're already connected (because this is a - // keep-alive connection) do not bother. This is important since we won't - // get a 'connect' event for an already connected socket. - if (isConnecting) { - var onReqSockConnect = function () { - socket.removeListener('connect', onReqSockConnect) - self.clearTimeout() - setReqTimeout() - } - - socket.on('connect', onReqSockConnect) - - self.req.on('error', function (err) { // eslint-disable-line handle-callback-err - socket.removeListener('connect', onReqSockConnect) - }) - - // Set a timeout in memory - this block will throw if the server takes more - // than `timeout` to write the HTTP status and headers (corresponding to - // the on('response') event on the client). NB: this measures wall-clock - // time, not the time between bytes sent by the server. - self.timeoutTimer = setTimeout(function () { - socket.removeListener('connect', onReqSockConnect) - self.abort() - var e = new Error('ETIMEDOUT') - e.code = 'ETIMEDOUT' - e.connect = true - self.emit('error', e) - }, timeout) - } else { - // We're already connected - setReqTimeout() - } - } - self.emit('socket', socket) - }) - - self.emit('request', self.req) -} - -Request.prototype.onRequestError = function (error) { - var self = this - if (self._aborted) { - return - } - if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' && - self.agent.addRequestNoreuse) { - self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } - self.start() - self.req.end() - return - } - self.clearTimeout() - self.emit('error', error) -} - -Request.prototype.onRequestResponse = function (response) { - var self = this - - if (self.timing) { - self.timings.response = now() - self.startTimeNow - } - - debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) - response.on('end', function () { - if (self.timing) { - self.timings.end = now() - self.startTimeNow - response.timingStart = self.startTime - - // fill in the blanks for any periods that didn't trigger, such as - // no lookup or connect due to keep alive - if (!self.timings.socket) { - self.timings.socket = 0 - } - if (!self.timings.lookup) { - self.timings.lookup = self.timings.socket - } - if (!self.timings.connect) { - self.timings.connect = self.timings.lookup - } - if (!self.timings.response) { - self.timings.response = self.timings.connect - } - - debug('elapsed time', self.timings.end) - - // elapsedTime includes all redirects - self.elapsedTime += Math.round(self.timings.end) - - // NOTE: elapsedTime is deprecated in favor of .timings - response.elapsedTime = self.elapsedTime - - // timings is just for the final fetch - response.timings = self.timings - - // pre-calculate phase timings as well - response.timingPhases = { - wait: self.timings.socket, - dns: self.timings.lookup - self.timings.socket, - tcp: self.timings.connect - self.timings.lookup, - firstByte: self.timings.response - self.timings.connect, - download: self.timings.end - self.timings.response, - total: self.timings.end - } - } - debug('response end', self.uri.href, response.statusCode, response.headers) - }) - - if (self._aborted) { - debug('aborted', self.uri.href) - response.resume() - return - } - - self.response = response - response.request = self - response.toJSON = responseToJSON - - // XXX This is different on 0.10, because SSL is strict by default - if (self.httpModule === https && - self.strictSSL && (!response.hasOwnProperty('socket') || - !response.socket.authorized)) { - debug('strict ssl error', self.uri.href) - var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' - self.emit('error', new Error('SSL Error: ' + sslErr)) - return - } - - // Save the original host before any redirect (if it changes, we need to - // remove any authorization headers). Also remember the case of the header - // name because lots of broken servers expect Host instead of host and we - // want the caller to be able to specify this. - self.originalHost = self.getHeader('host') - if (!self.originalHostHeaderName) { - self.originalHostHeaderName = self.hasHeader('host') - } - if (self.setHost) { - self.removeHeader('host') - } - self.clearTimeout() - - var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar - var addCookie = function (cookie) { - // set the cookie if it's domain in the href's domain. - try { - targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) - } catch (e) { - self.emit('error', e) - } - } - - response.caseless = caseless(response.headers) - - if (response.caseless.has('set-cookie') && (!self._disableCookies)) { - var headerName = response.caseless.has('set-cookie') - if (Array.isArray(response.headers[headerName])) { - response.headers[headerName].forEach(addCookie) - } else { - addCookie(response.headers[headerName]) - } - } - - if (self._redirect.onResponse(response)) { - return // Ignore the rest of the response - } else { - // Be a good stream and emit end when the response is finished. - // Hack to emit end on close because of a core bug that never fires end - response.on('close', function () { - if (!self._ended) { - self.response.emit('end') - } - }) - - response.once('end', function () { - self._ended = true - }) - - var noBody = function (code) { - return ( - self.method === 'HEAD' || - // Informational - (code >= 100 && code < 200) || - // No Content - code === 204 || - // Not Modified - code === 304 - ) - } - - var responseContent - if (self.gzip && !noBody(response.statusCode)) { - var contentEncoding = response.headers['content-encoding'] || 'identity' - contentEncoding = contentEncoding.trim().toLowerCase() - - // Be more lenient with decoding compressed responses, since (very rarely) - // servers send slightly invalid gzip responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - var zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - } - - if (contentEncoding === 'gzip') { - responseContent = zlib.createGunzip(zlibOptions) - response.pipe(responseContent) - } else if (contentEncoding === 'deflate') { - responseContent = zlib.createInflate(zlibOptions) - response.pipe(responseContent) - } else { - // Since previous versions didn't check for Content-Encoding header, - // ignore any invalid values to preserve backwards-compatibility - if (contentEncoding !== 'identity') { - debug('ignoring unrecognized Content-Encoding ' + contentEncoding) - } - responseContent = response - } - } else { - responseContent = response - } - - if (self.encoding) { - if (self.dests.length !== 0) { - console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') - } else { - responseContent.setEncoding(self.encoding) - } - } - - if (self._paused) { - responseContent.pause() - } - - self.responseContent = responseContent - - self.emit('response', response) - - self.dests.forEach(function (dest) { - self.pipeDest(dest) - }) - - responseContent.on('data', function (chunk) { - if (self.timing && !self.responseStarted) { - self.responseStartTime = (new Date()).getTime() - - // NOTE: responseStartTime is deprecated in favor of .timings - response.responseStartTime = self.responseStartTime - } - self._destdata = true - self.emit('data', chunk) - }) - responseContent.once('end', function (chunk) { - self.emit('end', chunk) - }) - responseContent.on('error', function (error) { - self.emit('error', error) - }) - responseContent.on('close', function () { self.emit('close') }) - - if (self.callback) { - self.readResponseBody(response) - } else { // if no callback - self.on('end', function () { - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - self.emit('complete', response) - }) - } - } - debug('finish init function', self.uri.href) -} - -Request.prototype.readResponseBody = function (response) { - var self = this - debug("reading response's body") - var buffers = [] - var bufferLength = 0 - var strings = [] - - self.on('data', function (chunk) { - if (!Buffer.isBuffer(chunk)) { - strings.push(chunk) - } else if (chunk.length) { - bufferLength += chunk.length - buffers.push(chunk) - } - }) - self.on('end', function () { - debug('end event', self.uri.href) - if (self._aborted) { - debug('aborted', self.uri.href) - // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. - // This can lead to leaky behavior if the user retains a reference to the request object. - buffers = [] - bufferLength = 0 - return - } - - if (bufferLength) { - debug('has body', self.uri.href, bufferLength) - response.body = Buffer.concat(buffers, bufferLength) - if (self.encoding !== null) { - response.body = response.body.toString(self.encoding) - } - // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. - // This can lead to leaky behavior if the user retains a reference to the request object. - buffers = [] - bufferLength = 0 - } else if (strings.length) { - // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. - // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). - if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { - strings[0] = strings[0].substring(1) - } - response.body = strings.join('') - } - - if (self._json) { - try { - response.body = JSON.parse(response.body, self._jsonReviver) - } catch (e) { - debug('invalid JSON received', self.uri.href) - } - } - debug('emitting complete', self.uri.href) - if (typeof response.body === 'undefined' && !self._json) { - response.body = self.encoding === null ? Buffer.alloc(0) : '' - } - self.emit('complete', response, response.body) - }) -} - -Request.prototype.abort = function () { - var self = this - self._aborted = true - - if (self.req) { - self.req.abort() - } else if (self.response) { - self.response.destroy() - } - - self.clearTimeout() - self.emit('abort') -} - -Request.prototype.pipeDest = function (dest) { - var self = this - var response = self.response - // Called after the response is received - if (dest.headers && !dest.headersSent) { - if (response.caseless.has('content-type')) { - var ctname = response.caseless.has('content-type') - if (dest.setHeader) { - dest.setHeader(ctname, response.headers[ctname]) - } else { - dest.headers[ctname] = response.headers[ctname] - } - } - - if (response.caseless.has('content-length')) { - var clname = response.caseless.has('content-length') - if (dest.setHeader) { - dest.setHeader(clname, response.headers[clname]) - } else { - dest.headers[clname] = response.headers[clname] - } - } - } - if (dest.setHeader && !dest.headersSent) { - for (var i in response.headers) { - // If the response content is being decoded, the Content-Encoding header - // of the response doesn't represent the piped content, so don't pass it. - if (!self.gzip || i !== 'content-encoding') { - dest.setHeader(i, response.headers[i]) - } - } - dest.statusCode = response.statusCode - } - if (self.pipefilter) { - self.pipefilter(response, dest) - } -} - -Request.prototype.qs = function (q, clobber) { - var self = this - var base - if (!clobber && self.uri.query) { - base = self._qs.parse(self.uri.query) - } else { - base = {} - } - - for (var i in q) { - base[i] = q[i] - } - - var qs = self._qs.stringify(base) - - if (qs === '') { - return self - } - - self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) - self.url = self.uri - self.path = self.uri.path - - if (self.uri.host === 'unix') { - self.enableUnixSocket() - } - - return self -} -Request.prototype.form = function (form) { - var self = this - if (form) { - if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { - self.setHeader('content-type', 'application/x-www-form-urlencoded') - } - self.body = (typeof form === 'string') - ? self._qs.rfc3986(form.toString('utf8')) - : self._qs.stringify(form).toString('utf8') - return self - } - // create form-data object - self._form = new FormData() - self._form.on('error', function (err) { - err.message = 'form-data: ' + err.message - self.emit('error', err) - self.abort() - }) - return self._form -} -Request.prototype.multipart = function (multipart) { - var self = this - - self._multipart.onRequest(multipart) - - if (!self._multipart.chunked) { - self.body = self._multipart.body - } - - return self -} -Request.prototype.json = function (val) { - var self = this - - if (!self.hasHeader('accept')) { - self.setHeader('accept', 'application/json') - } - - if (typeof self.jsonReplacer === 'function') { - self._jsonReplacer = self.jsonReplacer - } - - self._json = true - if (typeof val === 'boolean') { - if (self.body !== undefined) { - if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { - self.body = safeStringify(self.body, self._jsonReplacer) - } else { - self.body = self._qs.rfc3986(self.body) - } - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'application/json') - } - } - } else { - self.body = safeStringify(val, self._jsonReplacer) - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'application/json') - } - } - - if (typeof self.jsonReviver === 'function') { - self._jsonReviver = self.jsonReviver - } - - return self -} -Request.prototype.getHeader = function (name, headers) { - var self = this - var result, re, match - if (!headers) { - headers = self.headers - } - Object.keys(headers).forEach(function (key) { - if (key.length !== name.length) { - return - } - re = new RegExp(name, 'i') - match = key.match(re) - if (match) { - result = headers[key] - } - }) - return result -} -Request.prototype.enableUnixSocket = function () { - // Get the socket & request paths from the URL - var unixParts = this.uri.path.split(':') - var host = unixParts[0] - var path = unixParts[1] - // Apply unix properties to request - this.socketPath = host - this.uri.pathname = path - this.uri.path = path - this.uri.host = host - this.uri.hostname = host - this.uri.isUnix = true -} - -Request.prototype.auth = function (user, pass, sendImmediately, bearer) { - var self = this - - self._auth.onRequest(user, pass, sendImmediately, bearer) - - return self -} -Request.prototype.aws = function (opts, now) { - var self = this - - if (!now) { - self._aws = opts - return self - } - - if (opts.sign_version === 4 || opts.sign_version === '4') { - // use aws4 - var options = { - host: self.uri.host, - path: self.uri.path, - method: self.method, - headers: self.headers, - body: self.body - } - if (opts.service) { - options.service = opts.service - } - var signRes = aws4.sign(options, { - accessKeyId: opts.key, - secretAccessKey: opts.secret, - sessionToken: opts.session - }) - self.setHeader('authorization', signRes.headers.Authorization) - self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) - if (signRes.headers['X-Amz-Security-Token']) { - self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token']) - } - } else { - // default: use aws-sign2 - var date = new Date() - self.setHeader('date', date.toUTCString()) - var auth = { - key: opts.key, - secret: opts.secret, - verb: self.method.toUpperCase(), - date: date, - contentType: self.getHeader('content-type') || '', - md5: self.getHeader('content-md5') || '', - amazonHeaders: aws2.canonicalizeHeaders(self.headers) - } - var path = self.uri.path - if (opts.bucket && path) { - auth.resource = '/' + opts.bucket + path - } else if (opts.bucket && !path) { - auth.resource = '/' + opts.bucket - } else if (!opts.bucket && path) { - auth.resource = path - } else if (!opts.bucket && !path) { - auth.resource = '/' - } - auth.resource = aws2.canonicalizeResource(auth.resource) - self.setHeader('authorization', aws2.authorization(auth)) - } - - return self -} -Request.prototype.httpSignature = function (opts) { - var self = this - httpSignature.signRequest({ - getHeader: function (header) { - return self.getHeader(header, self.headers) - }, - setHeader: function (header, value) { - self.setHeader(header, value) - }, - method: self.method, - path: self.path - }, opts) - debug('httpSignature authorization', self.getHeader('authorization')) - - return self -} -Request.prototype.hawk = function (opts) { - var self = this - self.setHeader('Authorization', hawk.header(self.uri, self.method, opts)) -} -Request.prototype.oauth = function (_oauth) { - var self = this - - self._oauth.onRequest(_oauth) - - return self -} - -Request.prototype.jar = function (jar) { - var self = this - var cookies - - if (self._redirect.redirectsFollowed === 0) { - self.originalCookieHeader = self.getHeader('cookie') - } - - if (!jar) { - // disable cookies - cookies = false - self._disableCookies = true - } else { - var targetCookieJar = jar.getCookieString ? jar : globalCookieJar - var urihref = self.uri.href - // fetch cookie in the Specified host - if (targetCookieJar) { - cookies = targetCookieJar.getCookieString(urihref) - } - } - - // if need cookie and cookie is not empty - if (cookies && cookies.length) { - if (self.originalCookieHeader) { - // Don't overwrite existing Cookie header - self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) - } else { - self.setHeader('cookie', cookies) - } - } - self._jar = jar - return self -} - -// Stream API -Request.prototype.pipe = function (dest, opts) { - var self = this - - if (self.response) { - if (self._destdata) { - self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) - } else if (self._ended) { - self.emit('error', new Error('You cannot pipe after the response has been ended.')) - } else { - stream.Stream.prototype.pipe.call(self, dest, opts) - self.pipeDest(dest) - return dest - } - } else { - self.dests.push(dest) - stream.Stream.prototype.pipe.call(self, dest, opts) - return dest - } -} -Request.prototype.write = function () { - var self = this - if (self._aborted) { return } - - if (!self._started) { - self.start() - } - if (self.req) { - return self.req.write.apply(self.req, arguments) - } -} -Request.prototype.end = function (chunk) { - var self = this - if (self._aborted) { return } - - if (chunk) { - self.write(chunk) - } - if (!self._started) { - self.start() - } - if (self.req) { - self.req.end() - } -} -Request.prototype.pause = function () { - var self = this - if (!self.responseContent) { - self._paused = true - } else { - self.responseContent.pause.apply(self.responseContent, arguments) - } -} -Request.prototype.resume = function () { - var self = this - if (!self.responseContent) { - self._paused = false - } else { - self.responseContent.resume.apply(self.responseContent, arguments) - } -} -Request.prototype.destroy = function () { - var self = this - this.clearTimeout() - if (!self._ended) { - self.end() - } else if (self.response) { - self.response.destroy() - } -} - -Request.prototype.clearTimeout = function () { - if (this.timeoutTimer) { - clearTimeout(this.timeoutTimer) - this.timeoutTimer = null - } -} - -Request.defaultProxyHeaderWhiteList = - Tunnel.defaultProxyHeaderWhiteList.slice() - -Request.defaultProxyHeaderExclusiveList = - Tunnel.defaultProxyHeaderExclusiveList.slice() - -// Exports - -Request.prototype.toJSON = requestToJSON -module.exports = Request - - -/***/ }), - -/***/ 97417: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/* eslint-disable @typescript-eslint/strict-boolean-expressions */ -function parse(string, encoding, opts) { - var _opts$out; - - if (opts === void 0) { - opts = {}; - } - - // Build the character lookup table: - if (!encoding.codes) { - encoding.codes = {}; - - for (var i = 0; i < encoding.chars.length; ++i) { - encoding.codes[encoding.chars[i]] = i; - } - } // The string must have a whole number of bytes: - - - if (!opts.loose && string.length * encoding.bits & 7) { - throw new SyntaxError('Invalid padding'); - } // Count the padding bytes: - - - var end = string.length; - - while (string[end - 1] === '=') { - --end; // If we get a whole number of bytes, there is too much padding: - - if (!opts.loose && !((string.length - end) * encoding.bits & 7)) { - throw new SyntaxError('Invalid padding'); - } - } // Allocate the output: - - - var out = new ((_opts$out = opts.out) != null ? _opts$out : Uint8Array)(end * encoding.bits / 8 | 0); // Parse the data: - - var bits = 0; // Number of bits currently in the buffer - - var buffer = 0; // Bits waiting to be written out, MSB first - - var written = 0; // Next byte to write - - for (var _i = 0; _i < end; ++_i) { - // Read one character from the string: - var value = encoding.codes[string[_i]]; - - if (value === undefined) { - throw new SyntaxError('Invalid character ' + string[_i]); - } // Append the bits to the buffer: - - - buffer = buffer << encoding.bits | value; - bits += encoding.bits; // Write out some bits if the buffer has a byte's worth: - - if (bits >= 8) { - bits -= 8; - out[written++] = 0xff & buffer >> bits; - } - } // Verify that we have received just enough bits: - - - if (bits >= encoding.bits || 0xff & buffer << 8 - bits) { - throw new SyntaxError('Unexpected end of data'); - } - - return out; -} -function stringify(data, encoding, opts) { - if (opts === void 0) { - opts = {}; - } - - var _opts = opts, - _opts$pad = _opts.pad, - pad = _opts$pad === void 0 ? true : _opts$pad; - var mask = (1 << encoding.bits) - 1; - var out = ''; - var bits = 0; // Number of bits currently in the buffer - - var buffer = 0; // Bits waiting to be written out, MSB first - - for (var i = 0; i < data.length; ++i) { - // Slurp data into the buffer: - buffer = buffer << 8 | 0xff & data[i]; - bits += 8; // Write out as much as we can: - - while (bits > encoding.bits) { - bits -= encoding.bits; - out += encoding.chars[mask & buffer >> bits]; - } - } // Partial character: - - - if (bits) { - out += encoding.chars[mask & buffer << encoding.bits - bits]; - } // Add padding characters until we hit a byte boundary: - - - if (pad) { - while (out.length * encoding.bits & 7) { - out += '='; - } - } - - return out; -} - -/* eslint-disable @typescript-eslint/strict-boolean-expressions */ -var base16Encoding = { - chars: '0123456789ABCDEF', - bits: 4 -}; -var base32Encoding = { - chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', - bits: 5 -}; -var base32HexEncoding = { - chars: '0123456789ABCDEFGHIJKLMNOPQRSTUV', - bits: 5 -}; -var base64Encoding = { - chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - bits: 6 -}; -var base64UrlEncoding = { - chars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', - bits: 6 -}; -var base16 = { - parse: function parse$1(string, opts) { - return parse(string.toUpperCase(), base16Encoding, opts); - }, - stringify: function stringify$1(data, opts) { - return stringify(data, base16Encoding, opts); - } -}; -var base32 = { - parse: function parse$1(string, opts) { - if (opts === void 0) { - opts = {}; - } - - return parse(opts.loose ? string.toUpperCase().replace(/0/g, 'O').replace(/1/g, 'L').replace(/8/g, 'B') : string, base32Encoding, opts); - }, - stringify: function stringify$1(data, opts) { - return stringify(data, base32Encoding, opts); - } -}; -var base32hex = { - parse: function parse$1(string, opts) { - return parse(string, base32HexEncoding, opts); - }, - stringify: function stringify$1(data, opts) { - return stringify(data, base32HexEncoding, opts); - } -}; -var base64 = { - parse: function parse$1(string, opts) { - return parse(string, base64Encoding, opts); - }, - stringify: function stringify$1(data, opts) { - return stringify(data, base64Encoding, opts); - } -}; -var base64url = { - parse: function parse$1(string, opts) { - return parse(string, base64UrlEncoding, opts); - }, - stringify: function stringify$1(data, opts) { - return stringify(data, base64UrlEncoding, opts); - } -}; -var codec = { - parse: parse, - stringify: stringify -}; - -exports.base16 = base16; -exports.base32 = base32; -exports.base32hex = base32hex; -exports.base64 = base64; -exports.base64url = base64url; -exports.codec = codec; - - -/***/ }), - -/***/ 21867: -/***/ ((module, exports, __nccwpck_require__) => { - -/* eslint-disable node/no-deprecated-api */ -var buffer = __nccwpck_require__(14300) -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - - -/***/ }), - -/***/ 15118: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint-disable node/no-deprecated-api */ - - - -var buffer = __nccwpck_require__(14300) -var Buffer = buffer.Buffer - -var safer = {} - -var key - -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] -} - -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] -} - -safer.Buffer.prototype = Buffer.prototype - -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) - } -} - -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - return buf - } -} - -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it - } -} - -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength - } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength - } -} - -module.exports = safer - - -/***/ }), - -/***/ 95659: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/* eslint-disable quotes, quote-props */ - - -/* - Port of a subset of the features of CPython's shlex module, which provides a - shell-like lexer. Original code by Eric S. Raymond and other contributors. -*/ - -class Shlexer { - constructor (string) { - this.i = 0 - this.string = string - - /** - * Characters that will be considered whitespace and skipped. Whitespace - * bounds tokens. By default, includes space, tab, linefeed and carriage - * return. - */ - this.whitespace = ' \t\r\n' - - /** - * Characters that will be considered string quotes. The token accumulates - * until the same quote is encountered again (thus, different quote types - * protect each other as in the shell.) By default, includes ASCII single - * and double quotes. - */ - this.quotes = `'"` - - /** - * Characters that will be considered as escape. Just `\` by default. - */ - this.escapes = '\\' - - /** - * The subset of quote types that allow escaped characters. Just `"` by default. - */ - this.escapedQuotes = '"' - - /** - * Whether to support ANSI C-style $'' quotes - * https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html - */ - this.ansiCQuotes = true - - /** - * Whether to support localized $"" quotes - * https://www.gnu.org/software/bash/manual/html_node/Locale-Translation.html - * - * The behavior is as if the current locale is set to C or POSIX, i.e., the - * contents are not translated. - */ - this.localeQuotes = true - - this.debug = false - } - - readChar () { - return this.string.charAt(this.i++) - } - - processEscapes (string, quote, isAnsiCQuote) { - if (!isAnsiCQuote && !this.escapedQuotes.includes(quote)) { - // This quote type doesn't support escape sequences - return string - } - - // We need to form a regex that matches any of the escape characters, - // without interpreting any of the characters as a regex special character. - const anyEscape = '[' + this.escapes.replace(/(.)/g, '\\$1') + ']' - - // In regular quoted strings, we can only escape an escape character, and - // the quote character itself. - if (!isAnsiCQuote && this.escapedQuotes.includes(quote)) { - const re = new RegExp( - anyEscape + '(' + anyEscape + '|\\' + quote + ')', 'g') - return string.replace(re, '$1') - } - - // ANSI C quoted strings support a wide variety of escape sequences - if (isAnsiCQuote) { - const patterns = { - // Literal characters - '([\\\\\'"?])': (x) => x, - - // Non-printable ASCII characters - 'a': () => '\x07', - 'b': () => '\x08', - 'e|E': () => '\x1b', - 'f': () => '\x0c', - 'n': () => '\x0a', - 'r': () => '\x0d', - 't': () => '\x09', - 'v': () => '\x0b', - - // Octal bytes - '([0-7]{1,3})': (x) => String.fromCharCode(parseInt(x, 8)), - - // Hexadecimal bytes - 'x([0-9a-fA-F]{1,2})': (x) => String.fromCharCode(parseInt(x, 16)), - - // Unicode code units - 'u([0-9a-fA-F]{1,4})': (x) => String.fromCharCode(parseInt(x, 16)), - 'U([0-9a-fA-F]{1,8})': (x) => String.fromCharCode(parseInt(x, 16)), - - // Control characters - // https://en.wikipedia.org/wiki/Control_character#How_control_characters_map_to_keyboards - 'c(.)': (x) => { - if (x === '?') { - return '\x7f' - } else if (x === '@') { - return '\x00' - } else { - return String.fromCharCode(x.charCodeAt(0) & 31) - } - } - } - - // Construct an uber-RegEx that catches all of the above pattern - const re = new RegExp( - anyEscape + '(' + Object.keys(patterns).join('|') + ')', 'g') - - // For each match, figure out which subpattern matched, and apply the - // corresponding function - return string.replace(re, function (m, p1) { - for (const matched in patterns) { - const mm = new RegExp('^' + matched + '$').exec(p1) - if (mm === null) { - continue - } - - return patterns[matched].apply(null, mm.slice(1)) - } - }) - } - - // Should not get here - return undefined - } - - * [Symbol.iterator] () { - let inQuote = false - let inDollarQuote = false - let escaped = false - let lastDollar = -2 // position of last dollar sign we saw - let token - - if (this.debug) { - console.log('full input:', '>' + this.string + '<') - } - - while (true) { - const pos = this.i - const char = this.readChar() - - if (this.debug) { - console.log( - 'position:', pos, - 'input:', '>' + char + '<', - 'accumulated:', token, - 'inQuote:', inQuote, - 'inDollarQuote:', inDollarQuote, - 'lastDollar:', lastDollar, - 'escaped:', escaped - ) - } - - // Ran out of characters, we're done - if (char === '') { - if (inQuote) { throw new Error('Got EOF while in a quoted string') } - if (escaped) { throw new Error('Got EOF while in an escape sequence') } - if (token !== undefined) { yield token } - return - } - - // We were in an escape sequence, complete it - if (escaped) { - if (char === '\n') { - // An escaped newline just means to continue the command on the next - // line. We just need to ignore it. - } else if (inQuote) { - // If we are in a quote, just accumulate the whole escape sequence, - // as we will interpret escape sequences later. - token = (token || '') + escaped + char - } else { - // Just use the literal character - token = (token || '') + char - } - - escaped = false - continue - } - - if (this.escapes.includes(char)) { - if (!inQuote || inDollarQuote !== false || this.escapedQuotes.includes(inQuote)) { - // We encountered an escape character, which is going to affect how - // we treat the next character. - escaped = char - continue - } else { - // This string type doesn't use escape characters. Ignore for now. - } - } - - // We were in a string - if (inQuote !== false) { - // String is finished. Don't grab the quote character. - if (char === inQuote) { - token = this.processEscapes(token, inQuote, inDollarQuote === '\'') - inQuote = false - inDollarQuote = false - continue - } - - // String isn't finished yet, accumulate the character - token = (token || '') + char - continue - } - - // This is the start of a new string, don't accumulate the quotation mark - if (this.quotes.includes(char)) { - inQuote = char - if (lastDollar === pos - 1) { - if (char === '\'' && !this.ansiCQuotes) { - // Feature not enabled - } else if (char === '"' && !this.localeQuotes) { - // Feature not enabled - } else { - inDollarQuote = char - } - } - - token = (token || '') // fixes blank string - - if (inDollarQuote !== false) { - // Drop the opening $ we captured before - token = token.slice(0, -1) - } - - continue - } - - // This is a dollar sign, record that we saw it in case it's the start of - // an ANSI C or localized string - if (inQuote === false && char === '$') { - lastDollar = pos - } - - // This is whitespace, so yield the token if we have one - if (this.whitespace.includes(char)) { - if (token !== undefined) { yield token } - token = undefined - continue - } - - // Otherwise, accumulate the character - token = (token || '') + char - } - } -} - - -/** - * Splits a given string using shell-like syntax. This function is the inverse - * of shlex.join(). - * - * @param {String} s String to split. - * @returns {String[]} - */ -exports.split = function (s) { - return Array.from(new Shlexer(s)) -} - -/** - * Escapes a potentially shell-unsafe string using quotes. - * - * @param {String} s String to quote - * @returns {String} - */ -exports.quote = function (s) { - if (s === '') { return '\'\'' } - - const unsafeRe = /[^\w@%\-+=:,./]/ - if (!unsafeRe.test(s)) { return s } - - return ('\'' + s.replace(/('+)/g, '\'"$1"\'') + '\'').replace(/^''|''$/g, '') -} - - -/** - * Concatenate the tokens of the list args and return a string. This function - * is the inverse of shlex.split(). - * - * The returned value is shell-escaped to protect against injection - * vulnerabilities (see shlex.quote()). - * - * @param {String[]} args List of args to join - * @returns {String} -*/ -exports.join = function (args) { - if (!Array.isArray(args)) { - throw new TypeError("args should be an array") - } - return args.map(exports.quote).join(" ") -} - - -/***/ }), - -/***/ 66126: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -var Buffer = (__nccwpck_require__(15118).Buffer); - -var algInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y'], - sizePart: 'p' - }, - 'rsa': { - parts: ['e', 'n'], - sizePart: 'n' - }, - 'ecdsa': { - parts: ['curve', 'Q'], - sizePart: 'Q' - }, - 'ed25519': { - parts: ['A'], - sizePart: 'A' - } -}; -algInfo['curve25519'] = algInfo['ed25519']; - -var algPrivInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y', 'x'] - }, - 'rsa': { - parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] - }, - 'ecdsa': { - parts: ['curve', 'Q', 'd'] - }, - 'ed25519': { - parts: ['A', 'k'] - } -}; -algPrivInfo['curve25519'] = algPrivInfo['ed25519']; - -var hashAlgs = { - 'md5': true, - 'sha1': true, - 'sha256': true, - 'sha384': true, - 'sha512': true -}; - -/* - * Taken from - * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf - */ -var curves = { - 'nistp256': { - size: 256, - pkcs8oid: '1.2.840.10045.3.1.7', - p: Buffer.from(('00' + - 'ffffffff 00000001 00000000 00000000' + - '00000000 ffffffff ffffffff ffffffff'). - replace(/ /g, ''), 'hex'), - a: Buffer.from(('00' + - 'FFFFFFFF 00000001 00000000 00000000' + - '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: Buffer.from(( - '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + - '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). - replace(/ /g, ''), 'hex'), - s: Buffer.from(('00' + - 'c49d3608 86e70493 6a6678e1 139d26b7' + - '819f7e90'). - replace(/ /g, ''), 'hex'), - n: Buffer.from(('00' + - 'ffffffff 00000000 ffffffff ffffffff' + - 'bce6faad a7179e84 f3b9cac2 fc632551'). - replace(/ /g, ''), 'hex'), - G: Buffer.from(('04' + - '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + - '77037d81 2deb33a0 f4a13945 d898c296' + - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + - '2bce3357 6b315ece cbb64068 37bf51f5'). - replace(/ /g, ''), 'hex') - }, - 'nistp384': { - size: 384, - pkcs8oid: '1.3.132.0.34', - p: Buffer.from(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffe' + - 'ffffffff 00000000 00000000 ffffffff'). - replace(/ /g, ''), 'hex'), - a: Buffer.from(('00' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + - 'FFFFFFFF 00000000 00000000 FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: Buffer.from(( - 'b3312fa7 e23ee7e4 988e056b e3f82d19' + - '181d9c6e fe814112 0314088f 5013875a' + - 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). - replace(/ /g, ''), 'hex'), - s: Buffer.from(('00' + - 'a335926a a319a27a 1d00896a 6773a482' + - '7acdac73'). - replace(/ /g, ''), 'hex'), - n: Buffer.from(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff c7634d81 f4372ddf' + - '581a0db2 48b0a77a ecec196a ccc52973'). - replace(/ /g, ''), 'hex'), - G: Buffer.from(('04' + - 'aa87ca22 be8b0537 8eb1c71e f320ad74' + - '6e1d3b62 8ba79b98 59f741e0 82542a38' + - '5502f25d bf55296c 3a545e38 72760ab7' + - '3617de4a 96262c6f 5d9e98bf 9292dc29' + - 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). - replace(/ /g, ''), 'hex') - }, - 'nistp521': { - size: 521, - pkcs8oid: '1.3.132.0.35', - p: Buffer.from(( - '01ffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffff').replace(/ /g, ''), 'hex'), - a: Buffer.from(('01FF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: Buffer.from(('51' + - '953eb961 8e1c9a1f 929a21a0 b68540ee' + - 'a2da725b 99b315f3 b8b48991 8ef109e1' + - '56193951 ec7e937b 1652c0bd 3bb1bf07' + - '3573df88 3d2c34f1 ef451fd4 6b503f00'). - replace(/ /g, ''), 'hex'), - s: Buffer.from(('00' + - 'd09e8800 291cb853 96cc6717 393284aa' + - 'a0da64ba').replace(/ /g, ''), 'hex'), - n: Buffer.from(('01ff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffa' + - '51868783 bf2f966b 7fcc0148 f709a5d0' + - '3bb5c9b8 899c47ae bb6fb71e 91386409'). - replace(/ /g, ''), 'hex'), - G: Buffer.from(('04' + - '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + - '9c648139 053fb521 f828af60 6b4d3dba' + - 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + - '3348b3c1 856a429b f97e7e31 c2e5bd66' + - '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + - '98f54449 579b4468 17afbd17 273e662c' + - '97ee7299 5ef42640 c550b901 3fad0761' + - '353c7086 a272c240 88be9476 9fd16650'). - replace(/ /g, ''), 'hex') - } -}; - -module.exports = { - info: algInfo, - privInfo: algPrivInfo, - hashAlgs: hashAlgs, - curves: curves -}; - - -/***/ }), - -/***/ 7406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2016 Joyent, Inc. - -module.exports = Certificate; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var crypto = __nccwpck_require__(6113); -var Fingerprint = __nccwpck_require__(13079); -var Signature = __nccwpck_require__(91394); -var errs = __nccwpck_require__(27979); -var util = __nccwpck_require__(73837); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var Identity = __nccwpck_require__(70508); - -var formats = {}; -formats['openssh'] = __nccwpck_require__(94033); -formats['x509'] = __nccwpck_require__(10267); -formats['pem'] = __nccwpck_require__(30217); - -var CertificateParseError = errs.CertificateParseError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Certificate(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.subjects, 'options.subjects'); - utils.assertCompatible(opts.subjects[0], Identity, [1, 0], - 'options.subjects'); - utils.assertCompatible(opts.subjectKey, Key, [1, 0], - 'options.subjectKey'); - utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); - if (opts.issuerKey !== undefined) { - utils.assertCompatible(opts.issuerKey, Key, [1, 0], - 'options.issuerKey'); - } - assert.object(opts.signatures, 'options.signatures'); - assert.buffer(opts.serial, 'options.serial'); - assert.date(opts.validFrom, 'options.validFrom'); - assert.date(opts.validUntil, 'optons.validUntil'); - - assert.optionalArrayOfString(opts.purposes, 'options.purposes'); - - this._hashCache = {}; - - this.subjects = opts.subjects; - this.issuer = opts.issuer; - this.subjectKey = opts.subjectKey; - this.issuerKey = opts.issuerKey; - this.signatures = opts.signatures; - this.serial = opts.serial; - this.validFrom = opts.validFrom; - this.validUntil = opts.validUntil; - this.purposes = opts.purposes; -} - -Certificate.formats = formats; - -Certificate.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'x509'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - return (formats[format].write(this, options)); -}; - -Certificate.prototype.toString = function (format, options) { - if (format === undefined) - format = 'pem'; - return (this.toBuffer(format, options).toString()); -}; - -Certificate.prototype.fingerprint = function (algo) { - if (algo === undefined) - algo = 'sha256'; - assert.string(algo, 'algorithm'); - var opts = { - type: 'certificate', - hash: this.hash(algo), - algorithm: algo - }; - return (new Fingerprint(opts)); -}; - -Certificate.prototype.hash = function (algo) { - assert.string(algo, 'algorithm'); - algo = algo.toLowerCase(); - if (algs.hashAlgs[algo] === undefined) - throw (new InvalidAlgorithmError(algo)); - - if (this._hashCache[algo]) - return (this._hashCache[algo]); - - var hash = crypto.createHash(algo). - update(this.toBuffer('x509')).digest(); - this._hashCache[algo] = hash; - return (hash); -}; - -Certificate.prototype.isExpired = function (when) { - if (when === undefined) - when = new Date(); - return (!((when.getTime() >= this.validFrom.getTime()) && - (when.getTime() < this.validUntil.getTime()))); -}; - -Certificate.prototype.isSignedBy = function (issuerCert) { - utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); - - if (!this.issuer.equals(issuerCert.subjects[0])) - return (false); - if (this.issuer.purposes && this.issuer.purposes.length > 0 && - this.issuer.purposes.indexOf('ca') === -1) { - return (false); - } - - return (this.isSignedByKey(issuerCert.subjectKey)); -}; - -Certificate.prototype.getExtension = function (keyOrOid) { - assert.string(keyOrOid, 'keyOrOid'); - var ext = this.getExtensions().filter(function (maybeExt) { - if (maybeExt.format === 'x509') - return (maybeExt.oid === keyOrOid); - if (maybeExt.format === 'openssh') - return (maybeExt.name === keyOrOid); - return (false); - })[0]; - return (ext); -}; - -Certificate.prototype.getExtensions = function () { - var exts = []; - var x509 = this.signatures.x509; - if (x509 && x509.extras && x509.extras.exts) { - x509.extras.exts.forEach(function (ext) { - ext.format = 'x509'; - exts.push(ext); - }); - } - var openssh = this.signatures.openssh; - if (openssh && openssh.exts) { - openssh.exts.forEach(function (ext) { - ext.format = 'openssh'; - exts.push(ext); - }); - } - return (exts); -}; - -Certificate.prototype.isSignedByKey = function (issuerKey) { - utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); - - if (this.issuerKey !== undefined) { - return (this.issuerKey. - fingerprint('sha512').matches(issuerKey)); - } - - var fmt = Object.keys(this.signatures)[0]; - var valid = formats[fmt].verify(this, issuerKey); - if (valid) - this.issuerKey = issuerKey; - return (valid); -}; - -Certificate.prototype.signWith = function (key) { - utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); - var fmts = Object.keys(formats); - var didOne = false; - for (var i = 0; i < fmts.length; ++i) { - if (fmts[i] !== 'pem') { - var ret = formats[fmts[i]].sign(this, key); - if (ret === true) - didOne = true; - } - } - if (!didOne) { - throw (new Error('Failed to sign the certificate for any ' + - 'available certificate formats')); - } -}; - -Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { - var subjects; - if (Array.isArray(subjectOrSubjects)) - subjects = subjectOrSubjects; - else - subjects = [subjectOrSubjects]; - - assert.arrayOfObject(subjects); - subjects.forEach(function (subject) { - utils.assertCompatible(subject, Identity, [1, 0], 'subject'); - }); - - utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); - - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalObject(options.validFrom, 'options.validFrom'); - assert.optionalObject(options.validUntil, 'options.validUntil'); - var validFrom = options.validFrom; - var validUntil = options.validUntil; - if (validFrom === undefined) - validFrom = new Date(); - if (validUntil === undefined) { - assert.optionalNumber(options.lifetime, 'options.lifetime'); - var lifetime = options.lifetime; - if (lifetime === undefined) - lifetime = 10*365*24*3600; - validUntil = new Date(); - validUntil.setTime(validUntil.getTime() + lifetime*1000); - } - assert.optionalBuffer(options.serial, 'options.serial'); - var serial = options.serial; - if (serial === undefined) - serial = Buffer.from('0000000000000001', 'hex'); - - var purposes = options.purposes; - if (purposes === undefined) - purposes = []; - - if (purposes.indexOf('signature') === -1) - purposes.push('signature'); - - /* Self-signed certs are always CAs. */ - if (purposes.indexOf('ca') === -1) - purposes.push('ca'); - if (purposes.indexOf('crl') === -1) - purposes.push('crl'); - - /* - * If we weren't explicitly given any other purposes, do the sensible - * thing and add some basic ones depending on the subject type. - */ - if (purposes.length <= 3) { - var hostSubjects = subjects.filter(function (subject) { - return (subject.type === 'host'); - }); - var userSubjects = subjects.filter(function (subject) { - return (subject.type === 'user'); - }); - if (hostSubjects.length > 0) { - if (purposes.indexOf('serverAuth') === -1) - purposes.push('serverAuth'); - } - if (userSubjects.length > 0) { - if (purposes.indexOf('clientAuth') === -1) - purposes.push('clientAuth'); - } - if (userSubjects.length > 0 || hostSubjects.length > 0) { - if (purposes.indexOf('keyAgreement') === -1) - purposes.push('keyAgreement'); - if (key.type === 'rsa' && - purposes.indexOf('encryption') === -1) - purposes.push('encryption'); - } - } - - var cert = new Certificate({ - subjects: subjects, - issuer: subjects[0], - subjectKey: key.toPublic(), - issuerKey: key.toPublic(), - signatures: {}, - serial: serial, - validFrom: validFrom, - validUntil: validUntil, - purposes: purposes - }); - cert.signWith(key); - - return (cert); -}; - -Certificate.create = - function (subjectOrSubjects, key, issuer, issuerKey, options) { - var subjects; - if (Array.isArray(subjectOrSubjects)) - subjects = subjectOrSubjects; - else - subjects = [subjectOrSubjects]; - - assert.arrayOfObject(subjects); - subjects.forEach(function (subject) { - utils.assertCompatible(subject, Identity, [1, 0], 'subject'); - }); - - utils.assertCompatible(key, Key, [1, 0], 'key'); - if (PrivateKey.isPrivateKey(key)) - key = key.toPublic(); - utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); - utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); - - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalObject(options.validFrom, 'options.validFrom'); - assert.optionalObject(options.validUntil, 'options.validUntil'); - var validFrom = options.validFrom; - var validUntil = options.validUntil; - if (validFrom === undefined) - validFrom = new Date(); - if (validUntil === undefined) { - assert.optionalNumber(options.lifetime, 'options.lifetime'); - var lifetime = options.lifetime; - if (lifetime === undefined) - lifetime = 10*365*24*3600; - validUntil = new Date(); - validUntil.setTime(validUntil.getTime() + lifetime*1000); - } - assert.optionalBuffer(options.serial, 'options.serial'); - var serial = options.serial; - if (serial === undefined) - serial = Buffer.from('0000000000000001', 'hex'); - - var purposes = options.purposes; - if (purposes === undefined) - purposes = []; - - if (purposes.indexOf('signature') === -1) - purposes.push('signature'); - - if (options.ca === true) { - if (purposes.indexOf('ca') === -1) - purposes.push('ca'); - if (purposes.indexOf('crl') === -1) - purposes.push('crl'); - } - - var hostSubjects = subjects.filter(function (subject) { - return (subject.type === 'host'); - }); - var userSubjects = subjects.filter(function (subject) { - return (subject.type === 'user'); - }); - if (hostSubjects.length > 0) { - if (purposes.indexOf('serverAuth') === -1) - purposes.push('serverAuth'); - } - if (userSubjects.length > 0) { - if (purposes.indexOf('clientAuth') === -1) - purposes.push('clientAuth'); - } - if (userSubjects.length > 0 || hostSubjects.length > 0) { - if (purposes.indexOf('keyAgreement') === -1) - purposes.push('keyAgreement'); - if (key.type === 'rsa' && - purposes.indexOf('encryption') === -1) - purposes.push('encryption'); - } - - var cert = new Certificate({ - subjects: subjects, - issuer: issuer, - subjectKey: key, - issuerKey: issuerKey.toPublic(), - signatures: {}, - serial: serial, - validFrom: validFrom, - validUntil: validUntil, - purposes: purposes - }); - cert.signWith(issuerKey); - - return (cert); -}; - -Certificate.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - return (k); - } catch (e) { - throw (new CertificateParseError(options.filename, format, e)); - } -}; - -Certificate.isCertificate = function (obj, ver) { - return (utils.isCompatible(obj, Certificate, ver)); -}; - -/* - * API versions for Certificate: - * [1,0] -- initial ver - * [1,1] -- openssh format now unpacks extensions - */ -Certificate.prototype._sshpkApiVersion = [1, 1]; - -Certificate._oldVersionDetect = function (obj) { - return ([1, 0]); -}; - - -/***/ }), - -/***/ 57602: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2017 Joyent, Inc. - -module.exports = { - DiffieHellman: DiffieHellman, - generateECDSA: generateECDSA, - generateED25519: generateED25519 -}; - -var assert = __nccwpck_require__(66631); -var crypto = __nccwpck_require__(6113); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var nacl = __nccwpck_require__(68729); - -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); - -var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); - -var ecdh = __nccwpck_require__(49865); -var ec = __nccwpck_require__(3943); -var jsbn = (__nccwpck_require__(85587).BigInteger); - -function DiffieHellman(key) { - utils.assertCompatible(key, Key, [1, 4], 'key'); - this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); - this._algo = key.type; - this._curve = key.curve; - this._key = key; - if (key.type === 'dsa') { - if (!CRYPTO_HAVE_ECDH) { - throw (new Error('Due to bugs in the node 0.10 ' + - 'crypto API, node 0.12.x or later is required ' + - 'to use DH')); - } - this._dh = crypto.createDiffieHellman( - key.part.p.data, undefined, - key.part.g.data, undefined); - this._p = key.part.p; - this._g = key.part.g; - if (this._isPriv) - this._dh.setPrivateKey(key.part.x.data); - this._dh.setPublicKey(key.part.y.data); - - } else if (key.type === 'ecdsa') { - if (!CRYPTO_HAVE_ECDH) { - this._ecParams = new X9ECParameters(this._curve); - - if (this._isPriv) { - this._priv = new ECPrivate( - this._ecParams, key.part.d.data); - } - return; - } - - var curve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[key.curve]; - this._dh = crypto.createECDH(curve); - if (typeof (this._dh) !== 'object' || - typeof (this._dh.setPrivateKey) !== 'function') { - CRYPTO_HAVE_ECDH = false; - DiffieHellman.call(this, key); - return; - } - if (this._isPriv) - this._dh.setPrivateKey(key.part.d.data); - this._dh.setPublicKey(key.part.Q.data); - - } else if (key.type === 'curve25519') { - if (this._isPriv) { - utils.assertCompatible(key, PrivateKey, [1, 5], 'key'); - this._priv = key.part.k.data; - } - - } else { - throw (new Error('DH not supported for ' + key.type + ' keys')); - } -} - -DiffieHellman.prototype.getPublicKey = function () { - if (this._isPriv) - return (this._key.toPublic()); - return (this._key); -}; - -DiffieHellman.prototype.getPrivateKey = function () { - if (this._isPriv) - return (this._key); - else - return (undefined); -}; -DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; - -DiffieHellman.prototype._keyCheck = function (pk, isPub) { - assert.object(pk, 'key'); - if (!isPub) - utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); - utils.assertCompatible(pk, Key, [1, 4], 'key'); - - if (pk.type !== this._algo) { - throw (new Error('A ' + pk.type + ' key cannot be used in ' + - this._algo + ' Diffie-Hellman')); - } - - if (pk.curve !== this._curve) { - throw (new Error('A key from the ' + pk.curve + ' curve ' + - 'cannot be used with a ' + this._curve + - ' Diffie-Hellman')); - } - - if (pk.type === 'dsa') { - assert.deepEqual(pk.part.p, this._p, - 'DSA key prime does not match'); - assert.deepEqual(pk.part.g, this._g, - 'DSA key generator does not match'); - } -}; - -DiffieHellman.prototype.setKey = function (pk) { - this._keyCheck(pk); - - if (pk.type === 'dsa') { - this._dh.setPrivateKey(pk.part.x.data); - this._dh.setPublicKey(pk.part.y.data); - - } else if (pk.type === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.setPrivateKey(pk.part.d.data); - this._dh.setPublicKey(pk.part.Q.data); - } else { - this._priv = new ECPrivate( - this._ecParams, pk.part.d.data); - } - - } else if (pk.type === 'curve25519') { - var k = pk.part.k; - if (!pk.part.k) - k = pk.part.r; - this._priv = k.data; - if (this._priv[0] === 0x00) - this._priv = this._priv.slice(1); - this._priv = this._priv.slice(0, 32); - } - this._key = pk; - this._isPriv = true; -}; -DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; - -DiffieHellman.prototype.computeSecret = function (otherpk) { - this._keyCheck(otherpk, true); - if (!this._isPriv) - throw (new Error('DH exchange has not been initialized with ' + - 'a private key yet')); - - var pub; - if (this._algo === 'dsa') { - return (this._dh.computeSecret( - otherpk.part.y.data)); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - return (this._dh.computeSecret( - otherpk.part.Q.data)); - } else { - pub = new ECPublic( - this._ecParams, otherpk.part.Q.data); - return (this._priv.deriveSharedSecret(pub)); - } - - } else if (this._algo === 'curve25519') { - pub = otherpk.part.A.data; - while (pub[0] === 0x00 && pub.length > 32) - pub = pub.slice(1); - var priv = this._priv; - assert.strictEqual(pub.length, 32); - assert.strictEqual(priv.length, 32); - - var secret = nacl.box.before(new Uint8Array(pub), - new Uint8Array(priv)); - - return (Buffer.from(secret)); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; - -DiffieHellman.prototype.generateKey = function () { - var parts = []; - var priv, pub; - if (this._algo === 'dsa') { - this._dh.generateKeys(); - - parts.push({name: 'p', data: this._p.data}); - parts.push({name: 'q', data: this._key.part.q.data}); - parts.push({name: 'g', data: this._g.data}); - parts.push({name: 'y', data: this._dh.getPublicKey()}); - parts.push({name: 'x', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'dsa', - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.generateKeys(); - - parts.push({name: 'curve', - data: Buffer.from(this._curve)}); - parts.push({name: 'Q', data: this._dh.getPublicKey()}); - parts.push({name: 'd', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else { - var n = this._ecParams.getN(); - var r = new jsbn(crypto.randomBytes(n.bitLength())); - var n1 = n.subtract(jsbn.ONE); - priv = r.mod(n1).add(jsbn.ONE); - pub = this._ecParams.getG().multiply(priv); - - priv = Buffer.from(priv.toByteArray()); - pub = Buffer.from(this._ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - this._priv = new ECPrivate(this._ecParams, priv); - - parts.push({name: 'curve', - data: Buffer.from(this._curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - } else if (this._algo === 'curve25519') { - var pair = nacl.box.keyPair(); - priv = Buffer.from(pair.secretKey); - pub = Buffer.from(pair.publicKey); - priv = Buffer.concat([priv, pub]); - assert.strictEqual(priv.length, 64); - assert.strictEqual(pub.length, 32); - - parts.push({name: 'A', data: pub}); - parts.push({name: 'k', data: priv}); - this._key = new PrivateKey({ - type: 'curve25519', - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; -DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; - -/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ - -function X9ECParameters(name) { - var params = algs.curves[name]; - assert.object(params); - - var p = new jsbn(params.p); - var a = new jsbn(params.a); - var b = new jsbn(params.b); - var n = new jsbn(params.n); - var h = jsbn.ONE; - var curve = new ec.ECCurveFp(p, a, b); - var G = curve.decodePointHex(params.G.toString('hex')); - - this.curve = curve; - this.g = G; - this.n = n; - this.h = h; -} -X9ECParameters.prototype.getCurve = function () { return (this.curve); }; -X9ECParameters.prototype.getG = function () { return (this.g); }; -X9ECParameters.prototype.getN = function () { return (this.n); }; -X9ECParameters.prototype.getH = function () { return (this.h); }; - -function ECPublic(params, buffer) { - this._params = params; - if (buffer[0] === 0x00) - buffer = buffer.slice(1); - this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); -} - -function ECPrivate(params, buffer) { - this._params = params; - this._priv = new jsbn(utils.mpNormalize(buffer)); -} -ECPrivate.prototype.deriveSharedSecret = function (pubKey) { - assert.ok(pubKey instanceof ECPublic); - var S = pubKey._pub.multiply(this._priv); - return (Buffer.from(S.getX().toBigInteger().toByteArray())); -}; - -function generateED25519() { - var pair = nacl.sign.keyPair(); - var priv = Buffer.from(pair.secretKey); - var pub = Buffer.from(pair.publicKey); - assert.strictEqual(priv.length, 64); - assert.strictEqual(pub.length, 32); - - var parts = []; - parts.push({name: 'A', data: pub}); - parts.push({name: 'k', data: priv.slice(0, 32)}); - var key = new PrivateKey({ - type: 'ed25519', - parts: parts - }); - return (key); -} - -/* Generates a new ECDSA private key on a given curve. */ -function generateECDSA(curve) { - var parts = []; - var key; - - if (CRYPTO_HAVE_ECDH) { - /* - * Node crypto doesn't expose key generation directly, but the - * ECDH instances can generate keys. It turns out this just - * calls into the OpenSSL generic key generator, and we can - * read its output happily without doing an actual DH. So we - * use that here. - */ - var osCurve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[curve]; - - var dh = crypto.createECDH(osCurve); - dh.generateKeys(); - - parts.push({name: 'curve', - data: Buffer.from(curve)}); - parts.push({name: 'Q', data: dh.getPublicKey()}); - parts.push({name: 'd', data: dh.getPrivateKey()}); - - key = new PrivateKey({ - type: 'ecdsa', - curve: curve, - parts: parts - }); - return (key); - } else { - - var ecParams = new X9ECParameters(curve); - - /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ - var n = ecParams.getN(); - /* - * The crypto.randomBytes() function can only give us whole - * bytes, so taking a nod from X9.62, we round up. - */ - var cByteLen = Math.ceil((n.bitLength() + 64) / 8); - var c = new jsbn(crypto.randomBytes(cByteLen)); - - var n1 = n.subtract(jsbn.ONE); - var priv = c.mod(n1).add(jsbn.ONE); - var pub = ecParams.getG().multiply(priv); - - priv = Buffer.from(priv.toByteArray()); - pub = Buffer.from(ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - parts.push({name: 'curve', data: Buffer.from(curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - key = new PrivateKey({ - type: 'ecdsa', - curve: curve, - parts: parts - }); - return (key); - } -} - - -/***/ }), - -/***/ 14694: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - Verifier: Verifier, - Signer: Signer -}; - -var nacl = __nccwpck_require__(68729); -var stream = __nccwpck_require__(12781); -var util = __nccwpck_require__(73837); -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var Signature = __nccwpck_require__(91394); - -function Verifier(key, hashAlgo) { - if (hashAlgo.toLowerCase() !== 'sha512') - throw (new Error('ED25519 only supports the use of ' + - 'SHA-512 hashes')); - - this.key = key; - this.chunks = []; - - stream.Writable.call(this, {}); -} -util.inherits(Verifier, stream.Writable); - -Verifier.prototype._write = function (chunk, enc, cb) { - this.chunks.push(chunk); - cb(); -}; - -Verifier.prototype.update = function (chunk) { - if (typeof (chunk) === 'string') - chunk = Buffer.from(chunk, 'binary'); - this.chunks.push(chunk); -}; - -Verifier.prototype.verify = function (signature, fmt) { - var sig; - if (Signature.isSignature(signature, [2, 0])) { - if (signature.type !== 'ed25519') - return (false); - sig = signature.toBuffer('raw'); - - } else if (typeof (signature) === 'string') { - sig = Buffer.from(signature, 'base64'); - - } else if (Signature.isSignature(signature, [1, 0])) { - throw (new Error('signature was created by too old ' + - 'a version of sshpk and cannot be verified')); - } - - assert.buffer(sig); - return (nacl.sign.detached.verify( - new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(sig), - new Uint8Array(this.key.part.A.data))); -}; - -function Signer(key, hashAlgo) { - if (hashAlgo.toLowerCase() !== 'sha512') - throw (new Error('ED25519 only supports the use of ' + - 'SHA-512 hashes')); - - this.key = key; - this.chunks = []; - - stream.Writable.call(this, {}); -} -util.inherits(Signer, stream.Writable); - -Signer.prototype._write = function (chunk, enc, cb) { - this.chunks.push(chunk); - cb(); -}; - -Signer.prototype.update = function (chunk) { - if (typeof (chunk) === 'string') - chunk = Buffer.from(chunk, 'binary'); - this.chunks.push(chunk); -}; - -Signer.prototype.sign = function () { - var sig = nacl.sign.detached( - new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(Buffer.concat([ - this.key.part.k.data, this.key.part.A.data]))); - var sigBuf = Buffer.from(sig); - var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); - sigObj.hashAlgorithm = 'sha512'; - return (sigObj); -}; - - -/***/ }), - -/***/ 27979: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -var assert = __nccwpck_require__(66631); -var util = __nccwpck_require__(73837); - -function FingerprintFormatError(fp, format) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, FingerprintFormatError); - this.name = 'FingerprintFormatError'; - this.fingerprint = fp; - this.format = format; - this.message = 'Fingerprint format is not supported, or is invalid: '; - if (fp !== undefined) - this.message += ' fingerprint = ' + fp; - if (format !== undefined) - this.message += ' format = ' + format; -} -util.inherits(FingerprintFormatError, Error); - -function InvalidAlgorithmError(alg) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, InvalidAlgorithmError); - this.name = 'InvalidAlgorithmError'; - this.algorithm = alg; - this.message = 'Algorithm "' + alg + '" is not supported'; -} -util.inherits(InvalidAlgorithmError, Error); - -function KeyParseError(name, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, KeyParseError); - this.name = 'KeyParseError'; - this.format = format; - this.keyName = name; - this.innerErr = innerErr; - this.message = 'Failed to parse ' + name + ' as a valid ' + format + - ' format key: ' + innerErr.message; -} -util.inherits(KeyParseError, Error); - -function SignatureParseError(type, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, SignatureParseError); - this.name = 'SignatureParseError'; - this.type = type; - this.format = format; - this.innerErr = innerErr; - this.message = 'Failed to parse the given data as a ' + type + - ' signature in ' + format + ' format: ' + innerErr.message; -} -util.inherits(SignatureParseError, Error); - -function CertificateParseError(name, format, innerErr) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, CertificateParseError); - this.name = 'CertificateParseError'; - this.format = format; - this.certName = name; - this.innerErr = innerErr; - this.message = 'Failed to parse ' + name + ' as a valid ' + format + - ' format certificate: ' + innerErr.message; -} -util.inherits(CertificateParseError, Error); - -function KeyEncryptedError(name, format) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, KeyEncryptedError); - this.name = 'KeyEncryptedError'; - this.format = format; - this.keyName = name; - this.message = 'The ' + format + ' format key ' + name + ' is ' + - 'encrypted (password-protected), and no passphrase was ' + - 'provided in `options`'; -} -util.inherits(KeyEncryptedError, Error); - -module.exports = { - FingerprintFormatError: FingerprintFormatError, - InvalidAlgorithmError: InvalidAlgorithmError, - KeyParseError: KeyParseError, - SignatureParseError: SignatureParseError, - KeyEncryptedError: KeyEncryptedError, - CertificateParseError: CertificateParseError -}; - - -/***/ }), - -/***/ 13079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2018 Joyent, Inc. - -module.exports = Fingerprint; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var crypto = __nccwpck_require__(6113); -var errs = __nccwpck_require__(27979); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var Certificate = __nccwpck_require__(7406); -var utils = __nccwpck_require__(80575); - -var FingerprintFormatError = errs.FingerprintFormatError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Fingerprint(opts) { - assert.object(opts, 'options'); - assert.string(opts.type, 'options.type'); - assert.buffer(opts.hash, 'options.hash'); - assert.string(opts.algorithm, 'options.algorithm'); - - this.algorithm = opts.algorithm.toLowerCase(); - if (algs.hashAlgs[this.algorithm] !== true) - throw (new InvalidAlgorithmError(this.algorithm)); - - this.hash = opts.hash; - this.type = opts.type; - this.hashType = opts.hashType; -} - -Fingerprint.prototype.toString = function (format) { - if (format === undefined) { - if (this.algorithm === 'md5' || this.hashType === 'spki') - format = 'hex'; - else - format = 'base64'; - } - assert.string(format); - - switch (format) { - case 'hex': - if (this.hashType === 'spki') - return (this.hash.toString('hex')); - return (addColons(this.hash.toString('hex'))); - case 'base64': - if (this.hashType === 'spki') - return (this.hash.toString('base64')); - return (sshBase64Format(this.algorithm, - this.hash.toString('base64'))); - default: - throw (new FingerprintFormatError(undefined, format)); - } -}; - -Fingerprint.prototype.matches = function (other) { - assert.object(other, 'key or certificate'); - if (this.type === 'key' && this.hashType !== 'ssh') { - utils.assertCompatible(other, Key, [1, 7], 'key with spki'); - if (PrivateKey.isPrivateKey(other)) { - utils.assertCompatible(other, PrivateKey, [1, 6], - 'privatekey with spki support'); - } - } else if (this.type === 'key') { - utils.assertCompatible(other, Key, [1, 0], 'key'); - } else { - utils.assertCompatible(other, Certificate, [1, 0], - 'certificate'); - } - - var theirHash = other.hash(this.algorithm, this.hashType); - var theirHash2 = crypto.createHash(this.algorithm). - update(theirHash).digest('base64'); - - if (this.hash2 === undefined) - this.hash2 = crypto.createHash(this.algorithm). - update(this.hash).digest('base64'); - - return (this.hash2 === theirHash2); -}; - -/*JSSTYLED*/ -var base64RE = /^[A-Za-z0-9+\/=]+$/; -/*JSSTYLED*/ -var hexRE = /^[a-fA-F0-9]+$/; - -Fingerprint.parse = function (fp, options) { - assert.string(fp, 'fingerprint'); - - var alg, hash, enAlgs; - if (Array.isArray(options)) { - enAlgs = options; - options = {}; - } - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - if (options.enAlgs !== undefined) - enAlgs = options.enAlgs; - if (options.algorithms !== undefined) - enAlgs = options.algorithms; - assert.optionalArrayOfString(enAlgs, 'algorithms'); - - var hashType = 'ssh'; - if (options.hashType !== undefined) - hashType = options.hashType; - assert.string(hashType, 'options.hashType'); - - var parts = fp.split(':'); - if (parts.length == 2) { - alg = parts[0].toLowerCase(); - if (!base64RE.test(parts[1])) - throw (new FingerprintFormatError(fp)); - try { - hash = Buffer.from(parts[1], 'base64'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } else if (parts.length > 2) { - alg = 'md5'; - if (parts[0].toLowerCase() === 'md5') - parts = parts.slice(1); - parts = parts.map(function (p) { - while (p.length < 2) - p = '0' + p; - if (p.length > 2) - throw (new FingerprintFormatError(fp)); - return (p); - }); - parts = parts.join(''); - if (!hexRE.test(parts) || parts.length % 2 !== 0) - throw (new FingerprintFormatError(fp)); - try { - hash = Buffer.from(parts, 'hex'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } else { - if (hexRE.test(fp)) { - hash = Buffer.from(fp, 'hex'); - } else if (base64RE.test(fp)) { - hash = Buffer.from(fp, 'base64'); - } else { - throw (new FingerprintFormatError(fp)); - } - - switch (hash.length) { - case 32: - alg = 'sha256'; - break; - case 16: - alg = 'md5'; - break; - case 20: - alg = 'sha1'; - break; - case 64: - alg = 'sha512'; - break; - default: - throw (new FingerprintFormatError(fp)); - } - - /* Plain hex/base64: guess it's probably SPKI unless told. */ - if (options.hashType === undefined) - hashType = 'spki'; - } - - if (alg === undefined) - throw (new FingerprintFormatError(fp)); - - if (algs.hashAlgs[alg] === undefined) - throw (new InvalidAlgorithmError(alg)); - - if (enAlgs !== undefined) { - enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); - if (enAlgs.indexOf(alg) === -1) - throw (new InvalidAlgorithmError(alg)); - } - - return (new Fingerprint({ - algorithm: alg, - hash: hash, - type: options.type || 'key', - hashType: hashType - })); -}; - -function addColons(s) { - /*JSSTYLED*/ - return (s.replace(/(.{2})(?=.)/g, '$1:')); -} - -function base64Strip(s) { - /*JSSTYLED*/ - return (s.replace(/=*$/, '')); -} - -function sshBase64Format(alg, h) { - return (alg.toUpperCase() + ':' + base64Strip(h)); -} - -Fingerprint.isFingerprint = function (obj, ver) { - return (utils.isCompatible(obj, Fingerprint, ver)); -}; - -/* - * API versions for Fingerprint: - * [1,0] -- initial ver - * [1,1] -- first tagged ver - * [1,2] -- hashType and spki support - */ -Fingerprint.prototype._sshpkApiVersion = [1, 2]; - -Fingerprint._oldVersionDetect = function (obj) { - assert.func(obj.toString); - assert.func(obj.matches); - return ([1, 0]); -}; - - -/***/ }), - -/***/ 8243: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); - -var pem = __nccwpck_require__(14324); -var ssh = __nccwpck_require__(68927); -var rfc4253 = __nccwpck_require__(88688); -var dnssec = __nccwpck_require__(63561); -var putty = __nccwpck_require__(80974); - -var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; - -function read(buf, options) { - if (typeof (buf) === 'string') { - if (buf.trim().match(/^[-]+[ ]*BEGIN/)) - return (pem.read(buf, options)); - if (buf.match(/^\s*ssh-[a-z]/)) - return (ssh.read(buf, options)); - if (buf.match(/^\s*ecdsa-/)) - return (ssh.read(buf, options)); - if (buf.match(/^putty-user-key-file-2:/i)) - return (putty.read(buf, options)); - if (findDNSSECHeader(buf)) - return (dnssec.read(buf, options)); - buf = Buffer.from(buf, 'binary'); - } else { - assert.buffer(buf); - if (findPEMHeader(buf)) - return (pem.read(buf, options)); - if (findSSHHeader(buf)) - return (ssh.read(buf, options)); - if (findPuTTYHeader(buf)) - return (putty.read(buf, options)); - if (findDNSSECHeader(buf)) - return (dnssec.read(buf, options)); - } - if (buf.readUInt32BE(0) < buf.length) - return (rfc4253.read(buf, options)); - throw (new Error('Failed to auto-detect format of key')); -} - -function findPuTTYHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) - ++offset; - if (offset + 22 <= buf.length && - buf.slice(offset, offset + 22).toString('ascii').toLowerCase() === - 'putty-user-key-file-2:') - return (true); - return (false); -} - -function findSSHHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10 || buf[offset] === 9)) - ++offset; - if (offset + 4 <= buf.length && - buf.slice(offset, offset + 4).toString('ascii') === 'ssh-') - return (true); - if (offset + 6 <= buf.length && - buf.slice(offset, offset + 6).toString('ascii') === 'ecdsa-') - return (true); - return (false); -} - -function findPEMHeader(buf) { - var offset = 0; - while (offset < buf.length && - (buf[offset] === 32 || buf[offset] === 10)) - ++offset; - if (buf[offset] !== 45) - return (false); - while (offset < buf.length && - (buf[offset] === 45)) - ++offset; - while (offset < buf.length && - (buf[offset] === 32)) - ++offset; - if (offset + 5 > buf.length || - buf.slice(offset, offset + 5).toString('ascii') !== 'BEGIN') - return (false); - return (true); -} - -function findDNSSECHeader(buf) { - // private case first - if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) - return (false); - var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); - if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX) - return (true); - - // public-key RFC3110 ? - // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...' - // skip any comment-lines - if (typeof (buf) !== 'string') { - buf = buf.toString('ascii'); - } - var lines = buf.split('\n'); - var line = 0; - /* JSSTYLED */ - while (lines[line].match(/^\;/)) - line++; - if (lines[line].toString('ascii').match(/\. IN KEY /)) - return (true); - if (lines[line].toString('ascii').match(/\. IN DNSKEY /)) - return (true); - return (false); -} - -function write(key, options) { - throw (new Error('"auto" format cannot be used for writing')); -} - - -/***/ }), - -/***/ 63561: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2017 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var utils = __nccwpck_require__(80575); -var SSHBuffer = __nccwpck_require__(25621); -var Dhe = __nccwpck_require__(57602); - -var supportedAlgos = { - 'rsa-sha1' : 5, - 'rsa-sha256' : 8, - 'rsa-sha512' : 10, - 'ecdsa-p256-sha256' : 13, - 'ecdsa-p384-sha384' : 14 - /* - * ed25519 is hypothetically supported with id 15 - * but the common tools available don't appear to be - * capable of generating/using ed25519 keys - */ -}; - -var supportedAlgosById = {}; -Object.keys(supportedAlgos).forEach(function (k) { - supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); -}); - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - var lines = buf.split('\n'); - if (lines[0].match(/^Private-key-format\: v1/)) { - var algElems = lines[1].split(' '); - var algoNum = parseInt(algElems[1], 10); - var algoName = algElems[2]; - if (!supportedAlgosById[algoNum]) - throw (new Error('Unsupported algorithm: ' + algoName)); - return (readDNSSECPrivateKey(algoNum, lines.slice(2))); - } - - // skip any comment-lines - var line = 0; - /* JSSTYLED */ - while (lines[line].match(/^\;/)) - line++; - // we should now have *one single* line left with our KEY on it. - if ((lines[line].match(/\. IN KEY /) || - lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) { - return (readRFC3110(lines[line])); - } - throw (new Error('Cannot parse dnssec key')); -} - -function readRFC3110(keyString) { - var elems = keyString.split(' '); - //unused var flags = parseInt(elems[3], 10); - //unused var protocol = parseInt(elems[4], 10); - var algorithm = parseInt(elems[5], 10); - if (!supportedAlgosById[algorithm]) - throw (new Error('Unsupported algorithm: ' + algorithm)); - var base64key = elems.slice(6, elems.length).join(); - var keyBuffer = Buffer.from(base64key, 'base64'); - if (supportedAlgosById[algorithm].match(/^RSA-/)) { - // join the rest of the body into a single base64-blob - var publicExponentLen = keyBuffer.readUInt8(0); - if (publicExponentLen != 3 && publicExponentLen != 1) - throw (new Error('Cannot parse dnssec key: ' + - 'unsupported exponent length')); - - var publicExponent = keyBuffer.slice(1, publicExponentLen+1); - publicExponent = utils.mpNormalize(publicExponent); - var modulus = keyBuffer.slice(1+publicExponentLen); - modulus = utils.mpNormalize(modulus); - // now, make the key - var rsaKey = { - type: 'rsa', - parts: [] - }; - rsaKey.parts.push({ name: 'e', data: publicExponent}); - rsaKey.parts.push({ name: 'n', data: modulus}); - return (new Key(rsaKey)); - } - if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' || - supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') { - var curve = 'nistp384'; - var size = 384; - if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { - curve = 'nistp256'; - size = 256; - } - - var ecdsaKey = { - type: 'ecdsa', - curve: curve, - size: size, - parts: [ - {name: 'curve', data: Buffer.from(curve) }, - {name: 'Q', data: utils.ecNormalize(keyBuffer) } - ] - }; - return (new Key(ecdsaKey)); - } - throw (new Error('Unsupported algorithm: ' + - supportedAlgosById[algorithm])); -} - -function elementToBuf(e) { - return (Buffer.from(e.split(' ')[1], 'base64')); -} - -function readDNSSECRSAPrivateKey(elements) { - var rsaParams = {}; - elements.forEach(function (element) { - if (element.split(' ')[0] === 'Modulus:') - rsaParams['n'] = elementToBuf(element); - else if (element.split(' ')[0] === 'PublicExponent:') - rsaParams['e'] = elementToBuf(element); - else if (element.split(' ')[0] === 'PrivateExponent:') - rsaParams['d'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Prime1:') - rsaParams['p'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Prime2:') - rsaParams['q'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Exponent1:') - rsaParams['dmodp'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Exponent2:') - rsaParams['dmodq'] = elementToBuf(element); - else if (element.split(' ')[0] === 'Coefficient:') - rsaParams['iqmp'] = elementToBuf(element); - }); - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'e', data: utils.mpNormalize(rsaParams['e'])}, - { name: 'n', data: utils.mpNormalize(rsaParams['n'])}, - { name: 'd', data: utils.mpNormalize(rsaParams['d'])}, - { name: 'p', data: utils.mpNormalize(rsaParams['p'])}, - { name: 'q', data: utils.mpNormalize(rsaParams['q'])}, - { name: 'dmodp', - data: utils.mpNormalize(rsaParams['dmodp'])}, - { name: 'dmodq', - data: utils.mpNormalize(rsaParams['dmodq'])}, - { name: 'iqmp', - data: utils.mpNormalize(rsaParams['iqmp'])} - ] - }; - return (new PrivateKey(key)); -} - -function readDNSSECPrivateKey(alg, elements) { - if (supportedAlgosById[alg].match(/^RSA-/)) { - return (readDNSSECRSAPrivateKey(elements)); - } - if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' || - supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { - var d = Buffer.from(elements[0].split(' ')[1], 'base64'); - var curve = 'nistp384'; - var size = 384; - if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { - curve = 'nistp256'; - size = 256; - } - // DNSSEC generates the public-key on the fly (go calculate it) - var publicKey = utils.publicFromPrivateECDSA(curve, d); - var Q = publicKey.part['Q'].data; - var ecdsaKey = { - type: 'ecdsa', - curve: curve, - size: size, - parts: [ - {name: 'curve', data: Buffer.from(curve) }, - {name: 'd', data: d }, - {name: 'Q', data: Q } - ] - }; - return (new PrivateKey(ecdsaKey)); - } - throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg])); -} - -function dnssecTimestamp(date) { - var year = date.getFullYear() + ''; //stringify - var month = (date.getMonth() + 1); - var timestampStr = year + month + date.getUTCDate(); - timestampStr += '' + date.getUTCHours() + date.getUTCMinutes(); - timestampStr += date.getUTCSeconds(); - return (timestampStr); -} - -function rsaAlgFromOptions(opts) { - if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1') - return ('5 (RSASHA1)'); - else if (opts.hashAlgo === 'sha256') - return ('8 (RSASHA256)'); - else if (opts.hashAlgo === 'sha512') - return ('10 (RSASHA512)'); - else - throw (new Error('Unknown or unsupported hash: ' + - opts.hashAlgo)); -} - -function writeRSA(key, options) { - // if we're missing parts, add them. - if (!key.part.dmodp || !key.part.dmodq) { - utils.addRSAMissing(key); - } - - var out = ''; - out += 'Private-key-format: v1.3\n'; - out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n'; - var n = utils.mpDenormalize(key.part['n'].data); - out += 'Modulus: ' + n.toString('base64') + '\n'; - var e = utils.mpDenormalize(key.part['e'].data); - out += 'PublicExponent: ' + e.toString('base64') + '\n'; - var d = utils.mpDenormalize(key.part['d'].data); - out += 'PrivateExponent: ' + d.toString('base64') + '\n'; - var p = utils.mpDenormalize(key.part['p'].data); - out += 'Prime1: ' + p.toString('base64') + '\n'; - var q = utils.mpDenormalize(key.part['q'].data); - out += 'Prime2: ' + q.toString('base64') + '\n'; - var dmodp = utils.mpDenormalize(key.part['dmodp'].data); - out += 'Exponent1: ' + dmodp.toString('base64') + '\n'; - var dmodq = utils.mpDenormalize(key.part['dmodq'].data); - out += 'Exponent2: ' + dmodq.toString('base64') + '\n'; - var iqmp = utils.mpDenormalize(key.part['iqmp'].data); - out += 'Coefficient: ' + iqmp.toString('base64') + '\n'; - // Assume that we're valid as-of now - var timestamp = new Date(); - out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; - return (Buffer.from(out, 'ascii')); -} - -function writeECDSA(key, options) { - var out = ''; - out += 'Private-key-format: v1.3\n'; - - if (key.curve === 'nistp256') { - out += 'Algorithm: 13 (ECDSAP256SHA256)\n'; - } else if (key.curve === 'nistp384') { - out += 'Algorithm: 14 (ECDSAP384SHA384)\n'; - } else { - throw (new Error('Unsupported curve')); - } - var base64Key = key.part['d'].data.toString('base64'); - out += 'PrivateKey: ' + base64Key + '\n'; - - // Assume that we're valid as-of now - var timestamp = new Date(); - out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; - out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; - - return (Buffer.from(out, 'ascii')); -} - -function write(key, options) { - if (PrivateKey.isPrivateKey(key)) { - if (key.type === 'rsa') { - return (writeRSA(key, options)); - } else if (key.type === 'ecdsa') { - return (writeECDSA(key, options)); - } else { - throw (new Error('Unsupported algorithm: ' + key.type)); - } - } else if (Key.isKey(key)) { - /* - * RFC3110 requires a keyname, and a keytype, which we - * don't really have a mechanism for specifying such - * additional metadata. - */ - throw (new Error('Format "dnssec" only supports ' + - 'writing private keys')); - } else { - throw (new Error('key is not a Key or PrivateKey')); - } -} - - -/***/ }), - -/***/ 94033: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2017 Joyent, Inc. - -module.exports = { - read: read, - verify: verify, - sign: sign, - signAsync: signAsync, - write: write, - - /* Internal private API */ - fromBuffer: fromBuffer, - toBuffer: toBuffer -}; - -var assert = __nccwpck_require__(66631); -var SSHBuffer = __nccwpck_require__(25621); -var crypto = __nccwpck_require__(6113); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var Identity = __nccwpck_require__(70508); -var rfc4253 = __nccwpck_require__(88688); -var Signature = __nccwpck_require__(91394); -var utils = __nccwpck_require__(80575); -var Certificate = __nccwpck_require__(7406); - -function verify(cert, key) { - /* - * We always give an issuerKey, so if our verify() is being called then - * there was no signature. Return false. - */ - return (false); -} - -var TYPES = { - 'user': 1, - 'host': 2 -}; -Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; }); - -var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/; - -function read(buf, options) { - if (Buffer.isBuffer(buf)) - buf = buf.toString('ascii'); - var parts = buf.trim().split(/[ \t\n]+/g); - if (parts.length < 2 || parts.length > 3) - throw (new Error('Not a valid SSH certificate line')); - - var algo = parts[0]; - var data = parts[1]; - - data = Buffer.from(data, 'base64'); - return (fromBuffer(data, algo)); -} - -function fromBuffer(data, algo, partial) { - var sshbuf = new SSHBuffer({ buffer: data }); - var innerAlgo = sshbuf.readString(); - if (algo !== undefined && innerAlgo !== algo) - throw (new Error('SSH certificate algorithm mismatch')); - if (algo === undefined) - algo = innerAlgo; - - var cert = {}; - cert.signatures = {}; - cert.signatures.openssh = {}; - - cert.signatures.openssh.nonce = sshbuf.readBuffer(); - - var key = {}; - var parts = (key.parts = []); - key.type = getAlg(algo); - - var partCount = algs.info[key.type].parts.length; - while (parts.length < partCount) - parts.push(sshbuf.readPart()); - assert.ok(parts.length >= 1, 'key must have at least one part'); - - var algInfo = algs.info[key.type]; - if (key.type === 'ecdsa') { - var res = ECDSA_ALGO.exec(algo); - assert.ok(res !== null); - assert.strictEqual(res[1], parts[0].data.toString()); - } - - for (var i = 0; i < algInfo.parts.length; ++i) { - parts[i].name = algInfo.parts[i]; - if (parts[i].name !== 'curve' && - algInfo.normalize !== false) { - var p = parts[i]; - p.data = utils.mpNormalize(p.data); - } - } - - cert.subjectKey = new Key(key); - - cert.serial = sshbuf.readInt64(); - - var type = TYPES[sshbuf.readInt()]; - assert.string(type, 'valid cert type'); - - cert.signatures.openssh.keyId = sshbuf.readString(); - - var principals = []; - var pbuf = sshbuf.readBuffer(); - var psshbuf = new SSHBuffer({ buffer: pbuf }); - while (!psshbuf.atEnd()) - principals.push(psshbuf.readString()); - if (principals.length === 0) - principals = ['*']; - - cert.subjects = principals.map(function (pr) { - if (type === 'user') - return (Identity.forUser(pr)); - else if (type === 'host') - return (Identity.forHost(pr)); - throw (new Error('Unknown identity type ' + type)); - }); - - cert.validFrom = int64ToDate(sshbuf.readInt64()); - cert.validUntil = int64ToDate(sshbuf.readInt64()); - - var exts = []; - var extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); - var ext; - while (!extbuf.atEnd()) { - ext = { critical: true }; - ext.name = extbuf.readString(); - ext.data = extbuf.readBuffer(); - exts.push(ext); - } - extbuf = new SSHBuffer({ buffer: sshbuf.readBuffer() }); - while (!extbuf.atEnd()) { - ext = { critical: false }; - ext.name = extbuf.readString(); - ext.data = extbuf.readBuffer(); - exts.push(ext); - } - cert.signatures.openssh.exts = exts; - - /* reserved */ - sshbuf.readBuffer(); - - var signingKeyBuf = sshbuf.readBuffer(); - cert.issuerKey = rfc4253.read(signingKeyBuf); - - /* - * OpenSSH certs don't give the identity of the issuer, just their - * public key. So, we use an Identity that matches anything. The - * isSignedBy() function will later tell you if the key matches. - */ - cert.issuer = Identity.forHost('**'); - - var sigBuf = sshbuf.readBuffer(); - cert.signatures.openssh.signature = - Signature.parse(sigBuf, cert.issuerKey.type, 'ssh'); - - if (partial !== undefined) { - partial.remainder = sshbuf.remainder(); - partial.consumed = sshbuf._offset; - } - - return (new Certificate(cert)); -} - -function int64ToDate(buf) { - var i = buf.readUInt32BE(0) * 4294967296; - i += buf.readUInt32BE(4); - var d = new Date(); - d.setTime(i * 1000); - d.sourceInt64 = buf; - return (d); -} - -function dateToInt64(date) { - if (date.sourceInt64 !== undefined) - return (date.sourceInt64); - var i = Math.round(date.getTime() / 1000); - var upper = Math.floor(i / 4294967296); - var lower = Math.floor(i % 4294967296); - var buf = Buffer.alloc(8); - buf.writeUInt32BE(upper, 0); - buf.writeUInt32BE(lower, 4); - return (buf); -} - -function sign(cert, key) { - if (cert.signatures.openssh === undefined) - cert.signatures.openssh = {}; - try { - var blob = toBuffer(cert, true); - } catch (e) { - delete (cert.signatures.openssh); - return (false); - } - var sig = cert.signatures.openssh; - var hashAlgo = undefined; - if (key.type === 'rsa' || key.type === 'dsa') - hashAlgo = 'sha1'; - var signer = key.createSign(hashAlgo); - signer.write(blob); - sig.signature = signer.sign(); - return (true); -} - -function signAsync(cert, signer, done) { - if (cert.signatures.openssh === undefined) - cert.signatures.openssh = {}; - try { - var blob = toBuffer(cert, true); - } catch (e) { - delete (cert.signatures.openssh); - done(e); - return; - } - var sig = cert.signatures.openssh; - - signer(blob, function (err, signature) { - if (err) { - done(err); - return; - } - try { - /* - * This will throw if the signature isn't of a - * type/algo that can be used for SSH. - */ - signature.toBuffer('ssh'); - } catch (e) { - done(e); - return; - } - sig.signature = signature; - done(); - }); -} - -function write(cert, options) { - if (options === undefined) - options = {}; - - var blob = toBuffer(cert); - var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64'); - if (options.comment) - out = out + ' ' + options.comment; - return (out); -} - - -function toBuffer(cert, noSig) { - assert.object(cert.signatures.openssh, 'signature for openssh format'); - var sig = cert.signatures.openssh; - - if (sig.nonce === undefined) - sig.nonce = crypto.randomBytes(16); - var buf = new SSHBuffer({}); - buf.writeString(getCertType(cert.subjectKey)); - buf.writeBuffer(sig.nonce); - - var key = cert.subjectKey; - var algInfo = algs.info[key.type]; - algInfo.parts.forEach(function (part) { - buf.writePart(key.part[part]); - }); - - buf.writeInt64(cert.serial); - - var type = cert.subjects[0].type; - assert.notStrictEqual(type, 'unknown'); - cert.subjects.forEach(function (id) { - assert.strictEqual(id.type, type); - }); - type = TYPES[type]; - buf.writeInt(type); - - if (sig.keyId === undefined) { - sig.keyId = cert.subjects[0].type + '_' + - (cert.subjects[0].uid || cert.subjects[0].hostname); - } - buf.writeString(sig.keyId); - - var sub = new SSHBuffer({}); - cert.subjects.forEach(function (id) { - if (type === TYPES.host) - sub.writeString(id.hostname); - else if (type === TYPES.user) - sub.writeString(id.uid); - }); - buf.writeBuffer(sub.toBuffer()); - - buf.writeInt64(dateToInt64(cert.validFrom)); - buf.writeInt64(dateToInt64(cert.validUntil)); - - var exts = sig.exts; - if (exts === undefined) - exts = []; - - var extbuf = new SSHBuffer({}); - exts.forEach(function (ext) { - if (ext.critical !== true) - return; - extbuf.writeString(ext.name); - extbuf.writeBuffer(ext.data); - }); - buf.writeBuffer(extbuf.toBuffer()); - - extbuf = new SSHBuffer({}); - exts.forEach(function (ext) { - if (ext.critical === true) - return; - extbuf.writeString(ext.name); - extbuf.writeBuffer(ext.data); - }); - buf.writeBuffer(extbuf.toBuffer()); - - /* reserved */ - buf.writeBuffer(Buffer.alloc(0)); - - sub = rfc4253.write(cert.issuerKey); - buf.writeBuffer(sub); - - if (!noSig) - buf.writeBuffer(sig.signature.toBuffer('ssh')); - - return (buf.toBuffer()); -} - -function getAlg(certType) { - if (certType === 'ssh-rsa-cert-v01@openssh.com') - return ('rsa'); - if (certType === 'ssh-dss-cert-v01@openssh.com') - return ('dsa'); - if (certType.match(ECDSA_ALGO)) - return ('ecdsa'); - if (certType === 'ssh-ed25519-cert-v01@openssh.com') - return ('ed25519'); - throw (new Error('Unsupported cert type ' + certType)); -} - -function getCertType(key) { - if (key.type === 'rsa') - return ('ssh-rsa-cert-v01@openssh.com'); - if (key.type === 'dsa') - return ('ssh-dss-cert-v01@openssh.com'); - if (key.type === 'ecdsa') - return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com'); - if (key.type === 'ed25519') - return ('ssh-ed25519-cert-v01@openssh.com'); - throw (new Error('Unsupported key type ' + key.type)); -} - - -/***/ }), - -/***/ 14324: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = __nccwpck_require__(66631); -var asn1 = __nccwpck_require__(80970); -var crypto = __nccwpck_require__(6113); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); - -var pkcs1 = __nccwpck_require__(69367); -var pkcs8 = __nccwpck_require__(4173); -var sshpriv = __nccwpck_require__(3923); -var rfc4253 = __nccwpck_require__(88688); - -var errors = __nccwpck_require__(27979); - -var OID_PBES2 = '1.2.840.113549.1.5.13'; -var OID_PBKDF2 = '1.2.840.113549.1.5.12'; - -var OID_TO_CIPHER = { - '1.2.840.113549.3.7': '3des-cbc', - '2.16.840.1.101.3.4.1.2': 'aes128-cbc', - '2.16.840.1.101.3.4.1.42': 'aes256-cbc' -}; -var CIPHER_TO_OID = {}; -Object.keys(OID_TO_CIPHER).forEach(function (k) { - CIPHER_TO_OID[OID_TO_CIPHER[k]] = k; -}); - -var OID_TO_HASH = { - '1.2.840.113549.2.7': 'sha1', - '1.2.840.113549.2.9': 'sha256', - '1.2.840.113549.2.11': 'sha512' -}; -var HASH_TO_OID = {}; -Object.keys(OID_TO_HASH).forEach(function (k) { - HASH_TO_OID[OID_TO_HASH[k]] = k; -}); - -/* - * For reading we support both PKCS#1 and PKCS#8. If we find a private key, - * we just take the public component of it and use that. - */ -function read(buf, options, forceType) { - var input = buf; - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var lines = buf.trim().split(/[\r\n]+/g); - - var m; - var si = -1; - while (!m && si < lines.length) { - m = lines[++si].match(/*JSSTYLED*/ - /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - } - assert.ok(m, 'invalid PEM header'); - - var m2; - var ei = lines.length; - while (!m2 && ei > 0) { - m2 = lines[--ei].match(/*JSSTYLED*/ - /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - } - assert.ok(m2, 'invalid PEM footer'); - - /* Begin and end banners must match key type */ - assert.equal(m[2], m2[2]); - var type = m[2].toLowerCase(); - - var alg; - if (m[1]) { - /* They also must match algorithms, if given */ - assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); - alg = m[1].trim(); - } - - lines = lines.slice(si, ei + 1); - - var headers = {}; - while (true) { - lines = lines.slice(1); - m = lines[0].match(/*JSSTYLED*/ - /^([A-Za-z0-9-]+): (.+)$/); - if (!m) - break; - headers[m[1].toLowerCase()] = m[2]; - } - - /* Chop off the first and last lines */ - lines = lines.slice(0, -1).join(''); - buf = Buffer.from(lines, 'base64'); - - var cipher, key, iv; - if (headers['proc-type']) { - var parts = headers['proc-type'].split(','); - if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { - if (typeof (options.passphrase) === 'string') { - options.passphrase = Buffer.from( - options.passphrase, 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } else { - parts = headers['dek-info'].split(','); - assert.ok(parts.length === 2); - cipher = parts[0].toLowerCase(); - iv = Buffer.from(parts[1], 'hex'); - key = utils.opensslKeyDeriv(cipher, iv, - options.passphrase, 1).key; - } - } - } - - if (alg && alg.toLowerCase() === 'encrypted') { - var eder = new asn1.BerReader(buf); - var pbesEnd; - eder.readSequence(); - - eder.readSequence(); - pbesEnd = eder.offset + eder.length; - - var method = eder.readOID(); - if (method !== OID_PBES2) { - throw (new Error('Unsupported PEM/PKCS8 encryption ' + - 'scheme: ' + method)); - } - - eder.readSequence(); /* PBES2-params */ - - eder.readSequence(); /* keyDerivationFunc */ - var kdfEnd = eder.offset + eder.length; - var kdfOid = eder.readOID(); - if (kdfOid !== OID_PBKDF2) - throw (new Error('Unsupported PBES2 KDF: ' + kdfOid)); - eder.readSequence(); - var salt = eder.readString(asn1.Ber.OctetString, true); - var iterations = eder.readInt(); - var hashAlg = 'sha1'; - if (eder.offset < kdfEnd) { - eder.readSequence(); - var hashAlgOid = eder.readOID(); - hashAlg = OID_TO_HASH[hashAlgOid]; - if (hashAlg === undefined) { - throw (new Error('Unsupported PBKDF2 hash: ' + - hashAlgOid)); - } - } - eder._offset = kdfEnd; - - eder.readSequence(); /* encryptionScheme */ - var cipherOid = eder.readOID(); - cipher = OID_TO_CIPHER[cipherOid]; - if (cipher === undefined) { - throw (new Error('Unsupported PBES2 cipher: ' + - cipherOid)); - } - iv = eder.readString(asn1.Ber.OctetString, true); - - eder._offset = pbesEnd; - buf = eder.readString(asn1.Ber.OctetString, true); - - if (typeof (options.passphrase) === 'string') { - options.passphrase = Buffer.from( - options.passphrase, 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } - - var cinfo = utils.opensshCipherInfo(cipher); - - cipher = cinfo.opensslName; - key = utils.pbkdf2(hashAlg, salt, iterations, cinfo.keySize, - options.passphrase); - alg = undefined; - } - - if (cipher && key && iv) { - var cipherStream = crypto.createDecipheriv(cipher, key, iv); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(buf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - buf = Buffer.concat(chunks); - } - - /* The new OpenSSH internal format abuses PEM headers */ - if (alg && alg.toLowerCase() === 'openssh') - return (sshpriv.readSSHPrivate(type, buf, options)); - if (alg && alg.toLowerCase() === 'ssh2') - return (rfc4253.readType(type, buf, options)); - - var der = new asn1.BerReader(buf); - der.originalInput = input; - - /* - * All of the PEM file types start with a sequence tag, so chop it - * off here - */ - der.readSequence(); - - /* PKCS#1 type keys name an algorithm in the banner explicitly */ - if (alg) { - if (forceType) - assert.strictEqual(forceType, 'pkcs1'); - return (pkcs1.readPkcs1(alg, type, der)); - } else { - if (forceType) - assert.strictEqual(forceType, 'pkcs8'); - return (pkcs8.readPkcs8(alg, type, der)); - } -} - -function write(key, options, type) { - assert.object(key); - - var alg = { - 'ecdsa': 'EC', - 'rsa': 'RSA', - 'dsa': 'DSA', - 'ed25519': 'EdDSA' - }[key.type]; - var header; - - var der = new asn1.BerWriter(); - - if (PrivateKey.isPrivateKey(key)) { - if (type && type === 'pkcs8') { - header = 'PRIVATE KEY'; - pkcs8.writePkcs8(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs1'); - header = alg + ' PRIVATE KEY'; - pkcs1.writePkcs1(der, key); - } - - } else if (Key.isKey(key)) { - if (type && type === 'pkcs1') { - header = alg + ' PUBLIC KEY'; - pkcs1.writePkcs1(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs8'); - header = 'PUBLIC KEY'; - pkcs8.writePkcs8(der, key); - } - - } else { - throw (new Error('key is not a Key or PrivateKey')); - } - - var tmp = der.buffer.toString('base64'); - var len = tmp.length + (tmp.length / 64) + - 18 + 16 + header.length*2 + 10; - var buf = Buffer.alloc(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 64; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} - - -/***/ }), - -/***/ 69367: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readPkcs1: readPkcs1, - write: write, - writePkcs1: writePkcs1 -}; - -var assert = __nccwpck_require__(66631); -var asn1 = __nccwpck_require__(80970); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); - -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var pem = __nccwpck_require__(14324); - -var pkcs8 = __nccwpck_require__(4173); -var readECDSACurve = pkcs8.readECDSACurve; - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs1')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs1')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs1(alg, type, der) { - switch (alg) { - case 'RSA': - if (type === 'public') - return (readPkcs1RSAPublic(der)); - else if (type === 'private') - return (readPkcs1RSAPrivate(der)); - throw (new Error('Unknown key type: ' + type)); - case 'DSA': - if (type === 'public') - return (readPkcs1DSAPublic(der)); - else if (type === 'private') - return (readPkcs1DSAPrivate(der)); - throw (new Error('Unknown key type: ' + type)); - case 'EC': - case 'ECDSA': - if (type === 'private') - return (readPkcs1ECDSAPrivate(der)); - else if (type === 'public') - return (readPkcs1ECDSAPublic(der)); - throw (new Error('Unknown key type: ' + type)); - case 'EDDSA': - case 'EdDSA': - if (type === 'private') - return (readPkcs1EdDSAPrivate(der)); - throw (new Error(type + ' keys not supported with EdDSA')); - default: - throw (new Error('Unknown key algo: ' + alg)); - } -} - -function readPkcs1RSAPublic(der) { - // modulus and exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs1RSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version[0], 0); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1DSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 0); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - var y = readMPInt(der, 'y'); - var x = readMPInt(der, 'x'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1EdDSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 1); - - // private key - var k = der.readString(asn1.Ber.OctetString, true); - - der.readSequence(0xa0); - var oid = der.readOID(); - assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier'); - - der.readSequence(0xa1); - var A = utils.readBitString(der); - - var key = { - type: 'ed25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) }, - { name: 'k', data: k } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs1DSAPublic(der) { - var y = readMPInt(der, 'y'); - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - var key = { - type: 'dsa', - parts: [ - { name: 'y', data: y }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g } - ] - }; - - return (new Key(key)); -} - -function readPkcs1ECDSAPublic(der) { - der.readSequence(); - - var oid = der.readOID(); - assert.strictEqual(oid, '1.2.840.10045.2.1', 'must be ecPublicKey'); - - var curveOid = der.readOID(); - - var curve; - var curves = Object.keys(algs.curves); - for (var j = 0; j < curves.length; ++j) { - var c = curves[j]; - var cd = algs.curves[c]; - if (cd.pkcs8oid === curveOid) { - curve = c; - break; - } - } - assert.string(curve, 'a known ECDSA named curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curve) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function readPkcs1ECDSAPrivate(der) { - var version = readMPInt(der, 'version'); - assert.strictEqual(version.readUInt8(0), 1); - - // private key - var d = der.readString(asn1.Ber.OctetString, true); - - der.readSequence(0xa0); - var curve = readECDSACurve(der); - assert.string(curve, 'a known elliptic curve'); - - der.readSequence(0xa1); - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curve) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function writePkcs1(der, key) { - der.startSequence(); - - switch (key.type) { - case 'rsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1RSAPrivate(der, key); - else - writePkcs1RSAPublic(der, key); - break; - case 'dsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1DSAPrivate(der, key); - else - writePkcs1DSAPublic(der, key); - break; - case 'ecdsa': - if (PrivateKey.isPrivateKey(key)) - writePkcs1ECDSAPrivate(der, key); - else - writePkcs1ECDSAPublic(der, key); - break; - case 'ed25519': - if (PrivateKey.isPrivateKey(key)) - writePkcs1EdDSAPrivate(der, key); - else - writePkcs1EdDSAPublic(der, key); - break; - default: - throw (new Error('Unknown key algo: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs1RSAPublic(der, key) { - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); -} - -function writePkcs1RSAPrivate(der, key) { - var ver = Buffer.from([0]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); -} - -function writePkcs1DSAPrivate(der, key) { - var ver = Buffer.from([0]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); -} - -function writePkcs1DSAPublic(der, key) { - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); -} - -function writePkcs1ECDSAPublic(der, key) { - der.startSequence(); - - der.writeOID('1.2.840.10045.2.1'); /* ecPublicKey */ - var curve = key.part.curve.data.toString(); - var curveOid = algs.curves[curve].pkcs8oid; - assert.string(curveOid, 'a known ECDSA named curve'); - der.writeOID(curveOid); - - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs1ECDSAPrivate(der, key) { - var ver = Buffer.from([1]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa0); - var curve = key.part.curve.data.toString(); - var curveOid = algs.curves[curve].pkcs8oid; - assert.string(curveOid, 'a known ECDSA named curve'); - der.writeOID(curveOid); - der.endSequence(); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); -} - -function writePkcs1EdDSAPrivate(der, key) { - var ver = Buffer.from([1]); - der.writeBuffer(ver, asn1.Ber.Integer); - - der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); - - der.startSequence(0xa0); - der.writeOID('1.3.101.112'); - der.endSequence(); - - der.startSequence(0xa1); - utils.writeBitString(der, key.part.A.data); - der.endSequence(); -} - -function writePkcs1EdDSAPublic(der, key) { - throw (new Error('Public keys are not supported for EdDSA PKCS#1')); -} - - -/***/ }), - -/***/ 4173: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - readPkcs8: readPkcs8, - write: write, - writePkcs8: writePkcs8, - pkcs8ToBuffer: pkcs8ToBuffer, - - readECDSACurve: readECDSACurve, - writeECDSACurve: writeECDSACurve -}; - -var assert = __nccwpck_require__(66631); -var asn1 = __nccwpck_require__(80970); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var pem = __nccwpck_require__(14324); - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs8')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs8')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs8(alg, type, der) { - /* Private keys in pkcs#8 format have a weird extra int */ - if (der.peek() === asn1.Ber.Integer) { - assert.strictEqual(type, 'private', - 'unexpected Integer at start of public key'); - der.readString(asn1.Ber.Integer, true); - } - - der.readSequence(); - var next = der.offset + der.length; - - var oid = der.readOID(); - switch (oid) { - case '1.2.840.113549.1.1.1': - der._offset = next; - if (type === 'public') - return (readPkcs8RSAPublic(der)); - else - return (readPkcs8RSAPrivate(der)); - case '1.2.840.10040.4.1': - if (type === 'public') - return (readPkcs8DSAPublic(der)); - else - return (readPkcs8DSAPrivate(der)); - case '1.2.840.10045.2.1': - if (type === 'public') - return (readPkcs8ECDSAPublic(der)); - else - return (readPkcs8ECDSAPrivate(der)); - case '1.3.101.112': - if (type === 'public') { - return (readPkcs8EdDSAPublic(der)); - } else { - return (readPkcs8EdDSAPrivate(der)); - } - case '1.3.101.110': - if (type === 'public') { - return (readPkcs8X25519Public(der)); - } else { - return (readPkcs8X25519Private(der)); - } - default: - throw (new Error('Unknown key type OID ' + oid)); - } -} - -function readPkcs8RSAPublic(der) { - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - der.readSequence(); - - // modulus - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - source: der.originalInput, - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs8RSAPrivate(der) { - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var ver = readMPInt(der, 'version'); - assert.equal(ver[0], 0x0, 'unknown RSA private key version'); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8DSAPublic(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - - var y = readMPInt(der, 'y'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y } - ] - }; - - return (new Key(key)); -} - -function readPkcs8DSAPrivate(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - der.readSequence(asn1.Ber.OctetString); - var x = readMPInt(der, 'x'); - - /* The pkcs#8 format does not include the public key */ - var y = utils.calculateDSAPublic(g, p, x); - - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readECDSACurve(der) { - var curveName, curveNames; - var j, c, cd; - - if (der.peek() === asn1.Ber.OID) { - var oid = der.readOID(); - - curveNames = Object.keys(algs.curves); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - if (cd.pkcs8oid === oid) { - curveName = c; - break; - } - } - - } else { - // ECParameters sequence - der.readSequence(); - var version = der.readString(asn1.Ber.Integer, true); - assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); - - var curve = {}; - - // FieldID sequence - der.readSequence(); - var fieldTypeOid = der.readOID(); - assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', - 'ECDSA key is not from a prime-field'); - var p = curve.p = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - /* - * p always starts with a 1 bit, so count the zeros to get its - * real size. - */ - curve.size = p.length * 8 - utils.countZeros(p); - - // Curve sequence - der.readSequence(); - curve.a = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - curve.b = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - if (der.peek() === asn1.Ber.BitString) - curve.s = der.readString(asn1.Ber.BitString, true); - - // Combined Gx and Gy - curve.G = der.readString(asn1.Ber.OctetString, true); - assert.strictEqual(curve.G[0], 0x4, - 'uncompressed G is required'); - - curve.n = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - curve.h = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + - 'required'); - - curveNames = Object.keys(algs.curves); - var ks = Object.keys(curve); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - var equal = true; - for (var i = 0; i < ks.length; ++i) { - var k = ks[i]; - if (cd[k] === undefined) - continue; - if (typeof (cd[k]) === 'object' && - cd[k].equals !== undefined) { - if (!cd[k].equals(curve[k])) { - equal = false; - break; - } - } else if (Buffer.isBuffer(cd[k])) { - if (cd[k].toString('binary') - !== curve[k].toString('binary')) { - equal = false; - break; - } - } else { - if (cd[k] !== curve[k]) { - equal = false; - break; - } - } - } - if (equal) { - curveName = c; - break; - } - } - } - return (curveName); -} - -function readPkcs8ECDSAPrivate(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var version = readMPInt(der, 'version'); - assert.equal(version[0], 1, 'unknown version of ECDSA key'); - - var d = der.readString(asn1.Ber.OctetString, true); - var Q; - - if (der.peek() == 0xa0) { - der.readSequence(0xa0); - der._offset += der.length; - } - if (der.peek() == 0xa1) { - der.readSequence(0xa1); - Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - } - - if (Q === undefined) { - var pub = utils.publicFromPrivateECDSA(curveName, d); - Q = pub.part.Q.data; - } - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curveName) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8ECDSAPublic(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: Buffer.from(curveName) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function readPkcs8EdDSAPublic(der) { - if (der.peek() === 0x00) - der.readByte(); - - var A = utils.readBitString(der); - - var key = { - type: 'ed25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) } - ] - }; - - return (new Key(key)); -} - -function readPkcs8X25519Public(der) { - var A = utils.readBitString(der); - - var key = { - type: 'curve25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) } - ] - }; - - return (new Key(key)); -} - -function readPkcs8EdDSAPrivate(der) { - if (der.peek() === 0x00) - der.readByte(); - - der.readSequence(asn1.Ber.OctetString); - var k = der.readString(asn1.Ber.OctetString, true); - k = utils.zeroPadToLength(k, 32); - - var A; - if (der.peek() === asn1.Ber.BitString) { - A = utils.readBitString(der); - A = utils.zeroPadToLength(A, 32); - } else { - A = utils.calculateED25519Public(k); - } - - var key = { - type: 'ed25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) }, - { name: 'k', data: utils.zeroPadToLength(k, 32) } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8X25519Private(der) { - if (der.peek() === 0x00) - der.readByte(); - - der.readSequence(asn1.Ber.OctetString); - var k = der.readString(asn1.Ber.OctetString, true); - k = utils.zeroPadToLength(k, 32); - - var A = utils.calculateX25519Public(k); - - var key = { - type: 'curve25519', - parts: [ - { name: 'A', data: utils.zeroPadToLength(A, 32) }, - { name: 'k', data: utils.zeroPadToLength(k, 32) } - ] - }; - - return (new PrivateKey(key)); -} - -function pkcs8ToBuffer(key) { - var der = new asn1.BerWriter(); - writePkcs8(der, key); - return (der.buffer); -} - -function writePkcs8(der, key) { - der.startSequence(); - - if (PrivateKey.isPrivateKey(key)) { - var sillyInt = Buffer.from([0]); - der.writeBuffer(sillyInt, asn1.Ber.Integer); - } - - der.startSequence(); - switch (key.type) { - case 'rsa': - der.writeOID('1.2.840.113549.1.1.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8RSAPrivate(key, der); - else - writePkcs8RSAPublic(key, der); - break; - case 'dsa': - der.writeOID('1.2.840.10040.4.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8DSAPrivate(key, der); - else - writePkcs8DSAPublic(key, der); - break; - case 'ecdsa': - der.writeOID('1.2.840.10045.2.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8ECDSAPrivate(key, der); - else - writePkcs8ECDSAPublic(key, der); - break; - case 'ed25519': - der.writeOID('1.3.101.112'); - if (PrivateKey.isPrivateKey(key)) - throw (new Error('Ed25519 private keys in pkcs8 ' + - 'format are not supported')); - writePkcs8EdDSAPublic(key, der); - break; - default: - throw (new Error('Unsupported key type: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs8RSAPrivate(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = Buffer.from([0]); - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); - - der.endSequence(); - der.endSequence(); -} - -function writePkcs8RSAPublic(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - - der.startSequence(); - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); -} - -function writePkcs8DSAPrivate(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writePkcs8DSAPublic(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writeECDSACurve(key, der) { - var curve = algs.curves[key.curve]; - if (curve.pkcs8oid) { - /* This one has a name in pkcs#8, so just write the oid */ - der.writeOID(curve.pkcs8oid); - - } else { - // ECParameters sequence - der.startSequence(); - - var version = Buffer.from([1]); - der.writeBuffer(version, asn1.Ber.Integer); - - // FieldID sequence - der.startSequence(); - der.writeOID('1.2.840.10045.1.1'); // prime-field - der.writeBuffer(curve.p, asn1.Ber.Integer); - der.endSequence(); - - // Curve sequence - der.startSequence(); - var a = curve.p; - if (a[0] === 0x0) - a = a.slice(1); - der.writeBuffer(a, asn1.Ber.OctetString); - der.writeBuffer(curve.b, asn1.Ber.OctetString); - der.writeBuffer(curve.s, asn1.Ber.BitString); - der.endSequence(); - - der.writeBuffer(curve.G, asn1.Ber.OctetString); - der.writeBuffer(curve.n, asn1.Ber.Integer); - var h = curve.h; - if (!h) { - h = Buffer.from([1]); - } - der.writeBuffer(h, asn1.Ber.Integer); - - // ECParameters - der.endSequence(); - } -} - -function writePkcs8ECDSAPublic(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs8ECDSAPrivate(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = Buffer.from([1]); - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); - - der.endSequence(); - der.endSequence(); -} - -function writePkcs8EdDSAPublic(key, der) { - der.endSequence(); - - utils.writeBitString(der, key.part.A.data); -} - -function writePkcs8EdDSAPrivate(key, der) { - der.endSequence(); - - var k = utils.mpNormalize(key.part.k.data, true); - der.startSequence(asn1.Ber.OctetString); - der.writeBuffer(k, asn1.Ber.OctetString); - der.endSequence(); -} - - -/***/ }), - -/***/ 80974: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2018 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var rfc4253 = __nccwpck_require__(88688); -var Key = __nccwpck_require__(36814); -var SSHBuffer = __nccwpck_require__(25621); -var crypto = __nccwpck_require__(6113); -var PrivateKey = __nccwpck_require__(29602); - -var errors = __nccwpck_require__(27979); - -// https://tartarus.org/~simon/putty-prerel-snapshots/htmldoc/AppendixC.html -function read(buf, options) { - var lines = buf.toString('ascii').split(/[\r\n]+/); - var found = false; - var parts; - var si = 0; - var formatVersion; - while (si < lines.length) { - parts = splitHeader(lines[si++]); - if (parts) { - formatVersion = { - 'putty-user-key-file-2': 2, - 'putty-user-key-file-3': 3 - }[parts[0].toLowerCase()]; - if (formatVersion) { - found = true; - break; - } - } - } - if (!found) { - throw (new Error('No PuTTY format first line found')); - } - var alg = parts[1]; - - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'encryption'); - var encryption = parts[1]; - - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'comment'); - var comment = parts[1]; - - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'public-lines'); - var publicLines = parseInt(parts[1], 10); - if (!isFinite(publicLines) || publicLines < 0 || - publicLines > lines.length) { - throw (new Error('Invalid public-lines count')); - } - - var publicBuf = Buffer.from( - lines.slice(si, si + publicLines).join(''), 'base64'); - var keyType = rfc4253.algToKeyType(alg); - var key = rfc4253.read(publicBuf); - if (key.type !== keyType) { - throw (new Error('Outer key algorithm mismatch')); - } - - si += publicLines; - if (lines[si]) { - parts = splitHeader(lines[si++]); - assert.equal(parts[0].toLowerCase(), 'private-lines'); - var privateLines = parseInt(parts[1], 10); - if (!isFinite(privateLines) || privateLines < 0 || - privateLines > lines.length) { - throw (new Error('Invalid private-lines count')); - } - - var privateBuf = Buffer.from( - lines.slice(si, si + privateLines).join(''), 'base64'); - - if (encryption !== 'none' && formatVersion === 3) { - throw new Error('Encrypted keys arenot supported for' + - ' PuTTY format version 3'); - } - - if (encryption === 'aes256-cbc') { - if (!options.passphrase) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } - - var iv = Buffer.alloc(16, 0); - var decipher = crypto.createDecipheriv( - 'aes-256-cbc', - derivePPK2EncryptionKey(options.passphrase), - iv); - decipher.setAutoPadding(false); - privateBuf = Buffer.concat([ - decipher.update(privateBuf), decipher.final()]); - } - - key = new PrivateKey(key); - if (key.type !== keyType) { - throw (new Error('Outer key algorithm mismatch')); - } - - var sshbuf = new SSHBuffer({buffer: privateBuf}); - var privateKeyParts; - if (alg === 'ssh-dss') { - privateKeyParts = [ { - name: 'x', - data: sshbuf.readBuffer() - }]; - } else if (alg === 'ssh-rsa') { - privateKeyParts = [ - { name: 'd', data: sshbuf.readBuffer() }, - { name: 'p', data: sshbuf.readBuffer() }, - { name: 'q', data: sshbuf.readBuffer() }, - { name: 'iqmp', data: sshbuf.readBuffer() } - ]; - } else if (alg.match(/^ecdsa-sha2-nistp/)) { - privateKeyParts = [ { - name: 'd', data: sshbuf.readBuffer() - } ]; - } else if (alg === 'ssh-ed25519') { - privateKeyParts = [ { - name: 'k', data: sshbuf.readBuffer() - } ]; - } else { - throw new Error('Unsupported PPK key type: ' + alg); - } - - key = new PrivateKey({ - type: key.type, - parts: key.parts.concat(privateKeyParts) - }); - } - - key.comment = comment; - return (key); -} - -function derivePPK2EncryptionKey(passphrase) { - var hash1 = crypto.createHash('sha1').update(Buffer.concat([ - Buffer.from([0, 0, 0, 0]), - Buffer.from(passphrase) - ])).digest(); - var hash2 = crypto.createHash('sha1').update(Buffer.concat([ - Buffer.from([0, 0, 0, 1]), - Buffer.from(passphrase) - ])).digest(); - return (Buffer.concat([hash1, hash2]).slice(0, 32)); -} - -function splitHeader(line) { - var idx = line.indexOf(':'); - if (idx === -1) - return (null); - var header = line.slice(0, idx); - ++idx; - while (line[idx] === ' ') - ++idx; - var rest = line.slice(idx); - return ([header, rest]); -} - -function write(key, options) { - assert.object(key); - if (!Key.isKey(key)) - throw (new Error('Must be a public key')); - - var alg = rfc4253.keyTypeToAlg(key); - var buf = rfc4253.write(key); - var comment = key.comment || ''; - - var b64 = buf.toString('base64'); - var lines = wrap(b64, 64); - - lines.unshift('Public-Lines: ' + lines.length); - lines.unshift('Comment: ' + comment); - lines.unshift('Encryption: none'); - lines.unshift('PuTTY-User-Key-File-2: ' + alg); - - return (Buffer.from(lines.join('\n') + '\n')); -} - -function wrap(txt, len) { - var lines = []; - var pos = 0; - while (pos < txt.length) { - lines.push(txt.slice(pos, pos + 64)); - pos += 64; - } - return (lines); -} - - -/***/ }), - -/***/ 88688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read.bind(undefined, false, undefined), - readType: read.bind(undefined, false), - write: write, - /* semi-private api, used by sshpk-agent */ - readPartial: read.bind(undefined, true), - - /* shared with ssh format */ - readInternal: read, - keyTypeToAlg: keyTypeToAlg, - algToKeyType: algToKeyType -}; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var SSHBuffer = __nccwpck_require__(25621); - -function algToKeyType(alg) { - assert.string(alg); - if (alg === 'ssh-dss') - return ('dsa'); - else if (alg === 'ssh-rsa') - return ('rsa'); - else if (alg === 'ssh-ed25519') - return ('ed25519'); - else if (alg === 'ssh-curve25519') - return ('curve25519'); - else if (alg.match(/^ecdsa-sha2-/)) - return ('ecdsa'); - else - throw (new Error('Unknown algorithm ' + alg)); -} - -function keyTypeToAlg(key) { - assert.object(key); - if (key.type === 'dsa') - return ('ssh-dss'); - else if (key.type === 'rsa') - return ('ssh-rsa'); - else if (key.type === 'ed25519') - return ('ssh-ed25519'); - else if (key.type === 'curve25519') - return ('ssh-curve25519'); - else if (key.type === 'ecdsa') - return ('ecdsa-sha2-' + key.part.curve.data.toString()); - else - throw (new Error('Unknown key type ' + key.type)); -} - -function read(partial, type, buf, options) { - if (typeof (buf) === 'string') - buf = Buffer.from(buf); - assert.buffer(buf, 'buf'); - - var key = {}; - - var parts = key.parts = []; - var sshbuf = new SSHBuffer({buffer: buf}); - - var alg = sshbuf.readString(); - assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); - - key.type = algToKeyType(alg); - - var partCount = algs.info[key.type].parts.length; - if (type && type === 'private') - partCount = algs.privInfo[key.type].parts.length; - - while (!sshbuf.atEnd() && parts.length < partCount) - parts.push(sshbuf.readPart()); - while (!partial && !sshbuf.atEnd()) - parts.push(sshbuf.readPart()); - - assert.ok(parts.length >= 1, - 'key must have at least one part'); - assert.ok(partial || sshbuf.atEnd(), - 'leftover bytes at end of key'); - - var Constructor = Key; - var algInfo = algs.info[key.type]; - if (type === 'private' || algInfo.parts.length !== parts.length) { - algInfo = algs.privInfo[key.type]; - Constructor = PrivateKey; - } - assert.strictEqual(algInfo.parts.length, parts.length); - - if (key.type === 'ecdsa') { - var res = /^ecdsa-sha2-(.+)$/.exec(alg); - assert.ok(res !== null); - assert.strictEqual(res[1], parts[0].data.toString()); - } - - var normalized = true; - for (var i = 0; i < algInfo.parts.length; ++i) { - var p = parts[i]; - p.name = algInfo.parts[i]; - /* - * OpenSSH stores ed25519 "private" keys as seed + public key - * concat'd together (k followed by A). We want to keep them - * separate for other formats that don't do this. - */ - if (key.type === 'ed25519' && p.name === 'k') - p.data = p.data.slice(0, 32); - - if (p.name !== 'curve' && algInfo.normalize !== false) { - var nd; - if (key.type === 'ed25519') { - nd = utils.zeroPadToLength(p.data, 32); - } else { - nd = utils.mpNormalize(p.data); - } - if (nd.toString('binary') !== - p.data.toString('binary')) { - p.data = nd; - normalized = false; - } - } - } - - if (normalized) - key._rfc4253Cache = sshbuf.toBuffer(); - - if (partial && typeof (partial) === 'object') { - partial.remainder = sshbuf.remainder(); - partial.consumed = sshbuf._offset; - } - - return (new Constructor(key)); -} - -function write(key, options) { - assert.object(key); - - var alg = keyTypeToAlg(key); - var i; - - var algInfo = algs.info[key.type]; - if (PrivateKey.isPrivateKey(key)) - algInfo = algs.privInfo[key.type]; - var parts = algInfo.parts; - - var buf = new SSHBuffer({}); - - buf.writeString(alg); - - for (i = 0; i < parts.length; ++i) { - var data = key.part[parts[i]].data; - if (algInfo.normalize !== false) { - if (key.type === 'ed25519') - data = utils.zeroPadToLength(data, 32); - else - data = utils.mpNormalize(data); - } - if (key.type === 'ed25519' && parts[i] === 'k') - data = Buffer.concat([data, key.part.A.data]); - buf.writeBuffer(data); - } - - return (buf.toBuffer()); -} - - -/***/ }), - -/***/ 3923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readSSHPrivate: readSSHPrivate, - write: write -}; - -var assert = __nccwpck_require__(66631); -var asn1 = __nccwpck_require__(80970); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var crypto = __nccwpck_require__(6113); - -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var pem = __nccwpck_require__(14324); -var rfc4253 = __nccwpck_require__(88688); -var SSHBuffer = __nccwpck_require__(25621); -var errors = __nccwpck_require__(27979); - -var bcrypt; - -function read(buf, options) { - return (pem.read(buf, options)); -} - -var MAGIC = 'openssh-key-v1'; - -function readSSHPrivate(type, buf, options) { - buf = new SSHBuffer({buffer: buf}); - - var magic = buf.readCString(); - assert.strictEqual(magic, MAGIC, 'bad magic string'); - - var cipher = buf.readString(); - var kdf = buf.readString(); - var kdfOpts = buf.readBuffer(); - - var nkeys = buf.readInt(); - if (nkeys !== 1) { - throw (new Error('OpenSSH-format key file contains ' + - 'multiple keys: this is unsupported.')); - } - - var pubKey = buf.readBuffer(); - - if (type === 'public') { - assert.ok(buf.atEnd(), 'excess bytes left after key'); - return (rfc4253.read(pubKey)); - } - - var privKeyBlob = buf.readBuffer(); - assert.ok(buf.atEnd(), 'excess bytes left after key'); - - var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); - switch (kdf) { - case 'none': - if (cipher !== 'none') { - throw (new Error('OpenSSH-format key uses KDF "none" ' + - 'but specifies a cipher other than "none"')); - } - break; - case 'bcrypt': - var salt = kdfOptsBuf.readBuffer(); - var rounds = kdfOptsBuf.readInt(); - var cinf = utils.opensshCipherInfo(cipher); - if (bcrypt === undefined) { - bcrypt = __nccwpck_require__(45447); - } - - if (typeof (options.passphrase) === 'string') { - options.passphrase = Buffer.from(options.passphrase, - 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'OpenSSH')); - } - - var pass = new Uint8Array(options.passphrase); - var salti = new Uint8Array(salt); - /* Use the pbkdf to derive both the key and the IV. */ - var out = new Uint8Array(cinf.keySize + cinf.blockSize); - var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, - out, out.length, rounds); - if (res !== 0) { - throw (new Error('bcrypt_pbkdf function returned ' + - 'failure, parameters invalid')); - } - out = Buffer.from(out); - var ckey = out.slice(0, cinf.keySize); - var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); - var cipherStream = crypto.createDecipheriv(cinf.opensslName, - ckey, iv); - cipherStream.setAutoPadding(false); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(privKeyBlob); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - privKeyBlob = Buffer.concat(chunks); - break; - default: - throw (new Error( - 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); - } - - buf = new SSHBuffer({buffer: privKeyBlob}); - - var checkInt1 = buf.readInt(); - var checkInt2 = buf.readInt(); - if (checkInt1 !== checkInt2) { - throw (new Error('Incorrect passphrase supplied, could not ' + - 'decrypt key')); - } - - var ret = {}; - var key = rfc4253.readInternal(ret, 'private', buf.remainder()); - - buf.skip(ret.consumed); - - var comment = buf.readString(); - key.comment = comment; - - return (key); -} - -function write(key, options) { - var pubKey; - if (PrivateKey.isPrivateKey(key)) - pubKey = key.toPublic(); - else - pubKey = key; - - var cipher = 'none'; - var kdf = 'none'; - var kdfopts = Buffer.alloc(0); - var cinf = { blockSize: 8 }; - var passphrase; - if (options !== undefined) { - passphrase = options.passphrase; - if (typeof (passphrase) === 'string') - passphrase = Buffer.from(passphrase, 'utf-8'); - if (passphrase !== undefined) { - assert.buffer(passphrase, 'options.passphrase'); - assert.optionalString(options.cipher, 'options.cipher'); - cipher = options.cipher; - if (cipher === undefined) - cipher = 'aes128-ctr'; - cinf = utils.opensshCipherInfo(cipher); - kdf = 'bcrypt'; - } - } - - var privBuf; - if (PrivateKey.isPrivateKey(key)) { - privBuf = new SSHBuffer({}); - var checkInt = crypto.randomBytes(4).readUInt32BE(0); - privBuf.writeInt(checkInt); - privBuf.writeInt(checkInt); - privBuf.write(key.toBuffer('rfc4253')); - privBuf.writeString(key.comment || ''); - - var n = 1; - while (privBuf._offset % cinf.blockSize !== 0) - privBuf.writeChar(n++); - privBuf = privBuf.toBuffer(); - } - - switch (kdf) { - case 'none': - break; - case 'bcrypt': - var salt = crypto.randomBytes(16); - var rounds = 16; - var kdfssh = new SSHBuffer({}); - kdfssh.writeBuffer(salt); - kdfssh.writeInt(rounds); - kdfopts = kdfssh.toBuffer(); - - if (bcrypt === undefined) { - bcrypt = __nccwpck_require__(45447); - } - var pass = new Uint8Array(passphrase); - var salti = new Uint8Array(salt); - /* Use the pbkdf to derive both the key and the IV. */ - var out = new Uint8Array(cinf.keySize + cinf.blockSize); - var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, - out, out.length, rounds); - if (res !== 0) { - throw (new Error('bcrypt_pbkdf function returned ' + - 'failure, parameters invalid')); - } - out = Buffer.from(out); - var ckey = out.slice(0, cinf.keySize); - var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); - - var cipherStream = crypto.createCipheriv(cinf.opensslName, - ckey, iv); - cipherStream.setAutoPadding(false); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - throw (e); - }); - cipherStream.write(privBuf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - privBuf = Buffer.concat(chunks); - break; - default: - throw (new Error('Unsupported kdf ' + kdf)); - } - - var buf = new SSHBuffer({}); - - buf.writeCString(MAGIC); - buf.writeString(cipher); /* cipher */ - buf.writeString(kdf); /* kdf */ - buf.writeBuffer(kdfopts); /* kdfoptions */ - - buf.writeInt(1); /* nkeys */ - buf.writeBuffer(pubKey.toBuffer('rfc4253')); - - if (privBuf) - buf.writeBuffer(privBuf); - - buf = buf.toBuffer(); - - var header; - if (PrivateKey.isPrivateKey(key)) - header = 'OPENSSH PRIVATE KEY'; - else - header = 'OPENSSH PUBLIC KEY'; - - var tmp = buf.toString('base64'); - var len = tmp.length + (tmp.length / 70) + - 18 + 16 + header.length*2 + 10; - buf = Buffer.alloc(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 70; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} - - -/***/ }), - -/***/ 68927: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var rfc4253 = __nccwpck_require__(88688); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); - -var sshpriv = __nccwpck_require__(3923); - -/*JSSTYLED*/ -var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; -/*JSSTYLED*/ -var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var trimmed = buf.trim().replace(/[\\\r]/g, ''); - var m = trimmed.match(SSHKEY_RE); - if (!m) - m = trimmed.match(SSHKEY_RE2); - assert.ok(m, 'key must match regex'); - - var type = rfc4253.algToKeyType(m[1]); - var kbuf = Buffer.from(m[2], 'base64'); - - /* - * This is a bit tricky. If we managed to parse the key and locate the - * key comment with the regex, then do a non-partial read and assert - * that we have consumed all bytes. If we couldn't locate the key - * comment, though, there may be whitespace shenanigans going on that - * have conjoined the comment to the rest of the key. We do a partial - * read in this case to try to make the best out of a sorry situation. - */ - var key; - var ret = {}; - if (m[4]) { - try { - key = rfc4253.read(kbuf); - - } catch (e) { - m = trimmed.match(SSHKEY_RE2); - assert.ok(m, 'key must match regex'); - kbuf = Buffer.from(m[2], 'base64'); - key = rfc4253.readInternal(ret, 'public', kbuf); - } - } else { - key = rfc4253.readInternal(ret, 'public', kbuf); - } - - assert.strictEqual(type, key.type); - - if (m[4] && m[4].length > 0) { - key.comment = m[4]; - - } else if (ret.consumed) { - /* - * Now the magic: trying to recover the key comment when it's - * gotten conjoined to the key or otherwise shenanigan'd. - * - * Work out how much base64 we used, then drop all non-base64 - * chars from the beginning up to this point in the the string. - * Then offset in this and try to make up for missing = chars. - */ - var data = m[2] + (m[3] ? m[3] : ''); - var realOffset = Math.ceil(ret.consumed / 3) * 4; - data = data.slice(0, realOffset - 2). /*JSSTYLED*/ - replace(/[^a-zA-Z0-9+\/=]/g, '') + - data.slice(realOffset - 2); - - var padding = ret.consumed % 3; - if (padding > 0 && - data.slice(realOffset - 1, realOffset) !== '=') - realOffset--; - while (data.slice(realOffset, realOffset + 1) === '=') - realOffset++; - - /* Finally, grab what we think is the comment & clean it up. */ - var trailer = data.slice(realOffset); - trailer = trailer.replace(/[\r\n]/g, ' '). - replace(/^\s+/, ''); - if (trailer.match(/^[a-zA-Z0-9]/)) - key.comment = trailer; - } - - return (key); -} - -function write(key, options) { - assert.object(key); - if (!Key.isKey(key)) - throw (new Error('Must be a public key')); - - var parts = []; - var alg = rfc4253.keyTypeToAlg(key); - parts.push(alg); - - var buf = rfc4253.write(key); - parts.push(buf.toString('base64')); - - if (key.comment) - parts.push(key.comment); - - return (Buffer.from(parts.join(' '))); -} - - -/***/ }), - -/***/ 30217: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2016 Joyent, Inc. - -var x509 = __nccwpck_require__(10267); - -module.exports = { - read: read, - verify: x509.verify, - sign: x509.sign, - write: write -}; - -var assert = __nccwpck_require__(66631); -var asn1 = __nccwpck_require__(80970); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var pem = __nccwpck_require__(14324); -var Identity = __nccwpck_require__(70508); -var Signature = __nccwpck_require__(91394); -var Certificate = __nccwpck_require__(7406); - -function read(buf, options) { - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var lines = buf.trim().split(/[\r\n]+/g); - - var m; - var si = -1; - while (!m && si < lines.length) { - m = lines[++si].match(/*JSSTYLED*/ - /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/); - } - assert.ok(m, 'invalid PEM header'); - - var m2; - var ei = lines.length; - while (!m2 && ei > 0) { - m2 = lines[--ei].match(/*JSSTYLED*/ - /[-]+[ ]*END CERTIFICATE[ ]*[-]+/); - } - assert.ok(m2, 'invalid PEM footer'); - - lines = lines.slice(si, ei + 1); - - var headers = {}; - while (true) { - lines = lines.slice(1); - m = lines[0].match(/*JSSTYLED*/ - /^([A-Za-z0-9-]+): (.+)$/); - if (!m) - break; - headers[m[1].toLowerCase()] = m[2]; - } - - /* Chop off the first and last lines */ - lines = lines.slice(0, -1).join(''); - buf = Buffer.from(lines, 'base64'); - - return (x509.read(buf, options)); -} - -function write(cert, options) { - var dbuf = x509.write(cert, options); - - var header = 'CERTIFICATE'; - var tmp = dbuf.toString('base64'); - var len = tmp.length + (tmp.length / 64) + - 18 + 16 + header.length*2 + 10; - var buf = Buffer.alloc(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 64; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} - - -/***/ }), - -/***/ 10267: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2017 Joyent, Inc. - -module.exports = { - read: read, - verify: verify, - sign: sign, - signAsync: signAsync, - write: write -}; - -var assert = __nccwpck_require__(66631); -var asn1 = __nccwpck_require__(80970); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var utils = __nccwpck_require__(80575); -var Key = __nccwpck_require__(36814); -var PrivateKey = __nccwpck_require__(29602); -var pem = __nccwpck_require__(14324); -var Identity = __nccwpck_require__(70508); -var Signature = __nccwpck_require__(91394); -var Certificate = __nccwpck_require__(7406); -var pkcs8 = __nccwpck_require__(4173); - -/* - * This file is based on RFC5280 (X.509). - */ - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function verify(cert, key) { - var sig = cert.signatures.x509; - assert.object(sig, 'x509 signature'); - - var algParts = sig.algo.split('-'); - if (algParts[0] !== key.type) - return (false); - - var blob = sig.cache; - if (blob === undefined) { - var der = new asn1.BerWriter(); - writeTBSCert(cert, der); - blob = der.buffer; - } - - var verifier = key.createVerify(algParts[1]); - verifier.write(blob); - return (verifier.verify(sig.signature)); -} - -function Local(i) { - return (asn1.Ber.Context | asn1.Ber.Constructor | i); -} - -function Context(i) { - return (asn1.Ber.Context | i); -} - -var SIGN_ALGS = { - 'rsa-md5': '1.2.840.113549.1.1.4', - 'rsa-sha1': '1.2.840.113549.1.1.5', - 'rsa-sha256': '1.2.840.113549.1.1.11', - 'rsa-sha384': '1.2.840.113549.1.1.12', - 'rsa-sha512': '1.2.840.113549.1.1.13', - 'dsa-sha1': '1.2.840.10040.4.3', - 'dsa-sha256': '2.16.840.1.101.3.4.3.2', - 'ecdsa-sha1': '1.2.840.10045.4.1', - 'ecdsa-sha256': '1.2.840.10045.4.3.2', - 'ecdsa-sha384': '1.2.840.10045.4.3.3', - 'ecdsa-sha512': '1.2.840.10045.4.3.4', - 'ed25519-sha512': '1.3.101.112' -}; -Object.keys(SIGN_ALGS).forEach(function (k) { - SIGN_ALGS[SIGN_ALGS[k]] = k; -}); -SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5'; -SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1'; - -var EXTS = { - 'issuerKeyId': '2.5.29.35', - 'altName': '2.5.29.17', - 'basicConstraints': '2.5.29.19', - 'keyUsage': '2.5.29.15', - 'extKeyUsage': '2.5.29.37' -}; - -function read(buf, options) { - if (typeof (buf) === 'string') { - buf = Buffer.from(buf, 'binary'); - } - assert.buffer(buf, 'buf'); - - var der = new asn1.BerReader(buf); - - der.readSequence(); - if (Math.abs(der.length - der.remain) > 1) { - throw (new Error('DER sequence does not contain whole byte ' + - 'stream')); - } - - var tbsStart = der.offset; - der.readSequence(); - var sigOffset = der.offset + der.length; - var tbsEnd = sigOffset; - - if (der.peek() === Local(0)) { - der.readSequence(Local(0)); - var version = der.readInt(); - assert.ok(version <= 3, - 'only x.509 versions up to v3 supported'); - } - - var cert = {}; - cert.signatures = {}; - var sig = (cert.signatures.x509 = {}); - sig.extras = {}; - - cert.serial = readMPInt(der, 'serial'); - - der.readSequence(); - var after = der.offset + der.length; - var certAlgOid = der.readOID(); - var certAlg = SIGN_ALGS[certAlgOid]; - if (certAlg === undefined) - throw (new Error('unknown signature algorithm ' + certAlgOid)); - - der._offset = after; - cert.issuer = Identity.parseAsn1(der); - - der.readSequence(); - cert.validFrom = readDate(der); - cert.validUntil = readDate(der); - - cert.subjects = [Identity.parseAsn1(der)]; - - der.readSequence(); - after = der.offset + der.length; - cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der); - der._offset = after; - - /* issuerUniqueID */ - if (der.peek() === Local(1)) { - der.readSequence(Local(1)); - sig.extras.issuerUniqueID = - buf.slice(der.offset, der.offset + der.length); - der._offset += der.length; - } - - /* subjectUniqueID */ - if (der.peek() === Local(2)) { - der.readSequence(Local(2)); - sig.extras.subjectUniqueID = - buf.slice(der.offset, der.offset + der.length); - der._offset += der.length; - } - - /* extensions */ - if (der.peek() === Local(3)) { - der.readSequence(Local(3)); - var extEnd = der.offset + der.length; - der.readSequence(); - - while (der.offset < extEnd) - readExtension(cert, buf, der); - - assert.strictEqual(der.offset, extEnd); - } - - assert.strictEqual(der.offset, sigOffset); - - der.readSequence(); - after = der.offset + der.length; - var sigAlgOid = der.readOID(); - var sigAlg = SIGN_ALGS[sigAlgOid]; - if (sigAlg === undefined) - throw (new Error('unknown signature algorithm ' + sigAlgOid)); - der._offset = after; - - var sigData = der.readString(asn1.Ber.BitString, true); - if (sigData[0] === 0) - sigData = sigData.slice(1); - var algParts = sigAlg.split('-'); - - sig.signature = Signature.parse(sigData, algParts[0], 'asn1'); - sig.signature.hashAlgorithm = algParts[1]; - sig.algo = sigAlg; - sig.cache = buf.slice(tbsStart, tbsEnd); - - return (new Certificate(cert)); -} - -function readDate(der) { - if (der.peek() === asn1.Ber.UTCTime) { - return (utcTimeToDate(der.readString(asn1.Ber.UTCTime))); - } else if (der.peek() === asn1.Ber.GeneralizedTime) { - return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime))); - } else { - throw (new Error('Unsupported date format')); - } -} - -function writeDate(der, date) { - if (date.getUTCFullYear() >= 2050 || date.getUTCFullYear() < 1950) { - der.writeString(dateToGTime(date), asn1.Ber.GeneralizedTime); - } else { - der.writeString(dateToUTCTime(date), asn1.Ber.UTCTime); - } -} - -/* RFC5280, section 4.2.1.6 (GeneralName type) */ -var ALTNAME = { - OtherName: Local(0), - RFC822Name: Context(1), - DNSName: Context(2), - X400Address: Local(3), - DirectoryName: Local(4), - EDIPartyName: Local(5), - URI: Context(6), - IPAddress: Context(7), - OID: Context(8) -}; - -/* RFC5280, section 4.2.1.12 (KeyPurposeId) */ -var EXTPURPOSE = { - 'serverAuth': '1.3.6.1.5.5.7.3.1', - 'clientAuth': '1.3.6.1.5.5.7.3.2', - 'codeSigning': '1.3.6.1.5.5.7.3.3', - - /* See https://github.com/joyent/oid-docs/blob/master/root.md */ - 'joyentDocker': '1.3.6.1.4.1.38678.1.4.1', - 'joyentCmon': '1.3.6.1.4.1.38678.1.4.2' -}; -var EXTPURPOSE_REV = {}; -Object.keys(EXTPURPOSE).forEach(function (k) { - EXTPURPOSE_REV[EXTPURPOSE[k]] = k; -}); - -var KEYUSEBITS = [ - 'signature', 'identity', 'keyEncryption', - 'encryption', 'keyAgreement', 'ca', 'crl' -]; - -function readExtension(cert, buf, der) { - der.readSequence(); - var after = der.offset + der.length; - var extId = der.readOID(); - var id; - var sig = cert.signatures.x509; - if (!sig.extras.exts) - sig.extras.exts = []; - - var critical; - if (der.peek() === asn1.Ber.Boolean) - critical = der.readBoolean(); - - switch (extId) { - case (EXTS.basicConstraints): - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - var bcEnd = der.offset + der.length; - var ca = false; - if (der.peek() === asn1.Ber.Boolean) - ca = der.readBoolean(); - if (cert.purposes === undefined) - cert.purposes = []; - if (ca === true) - cert.purposes.push('ca'); - var bc = { oid: extId, critical: critical }; - if (der.offset < bcEnd && der.peek() === asn1.Ber.Integer) - bc.pathLen = der.readInt(); - sig.extras.exts.push(bc); - break; - case (EXTS.extKeyUsage): - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - if (cert.purposes === undefined) - cert.purposes = []; - var ekEnd = der.offset + der.length; - while (der.offset < ekEnd) { - var oid = der.readOID(); - cert.purposes.push(EXTPURPOSE_REV[oid] || oid); - } - /* - * This is a bit of a hack: in the case where we have a cert - * that's only allowed to do serverAuth or clientAuth (and not - * the other), we want to make sure all our Subjects are of - * the right type. But we already parsed our Subjects and - * decided if they were hosts or users earlier (since it appears - * first in the cert). - * - * So we go through and mutate them into the right kind here if - * it doesn't match. This might not be hugely beneficial, as it - * seems that single-purpose certs are not often seen in the - * wild. - */ - if (cert.purposes.indexOf('serverAuth') !== -1 && - cert.purposes.indexOf('clientAuth') === -1) { - cert.subjects.forEach(function (ide) { - if (ide.type !== 'host') { - ide.type = 'host'; - ide.hostname = ide.uid || - ide.email || - ide.components[0].value; - } - }); - } else if (cert.purposes.indexOf('clientAuth') !== -1 && - cert.purposes.indexOf('serverAuth') === -1) { - cert.subjects.forEach(function (ide) { - if (ide.type !== 'user') { - ide.type = 'user'; - ide.uid = ide.hostname || - ide.email || - ide.components[0].value; - } - }); - } - sig.extras.exts.push({ oid: extId, critical: critical }); - break; - case (EXTS.keyUsage): - der.readSequence(asn1.Ber.OctetString); - var bits = der.readString(asn1.Ber.BitString, true); - var setBits = readBitField(bits, KEYUSEBITS); - setBits.forEach(function (bit) { - if (cert.purposes === undefined) - cert.purposes = []; - if (cert.purposes.indexOf(bit) === -1) - cert.purposes.push(bit); - }); - sig.extras.exts.push({ oid: extId, critical: critical, - bits: bits }); - break; - case (EXTS.altName): - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - var aeEnd = der.offset + der.length; - while (der.offset < aeEnd) { - switch (der.peek()) { - case ALTNAME.OtherName: - case ALTNAME.EDIPartyName: - der.readSequence(); - der._offset += der.length; - break; - case ALTNAME.OID: - der.readOID(ALTNAME.OID); - break; - case ALTNAME.RFC822Name: - /* RFC822 specifies email addresses */ - var email = der.readString(ALTNAME.RFC822Name); - id = Identity.forEmail(email); - if (!cert.subjects[0].equals(id)) - cert.subjects.push(id); - break; - case ALTNAME.DirectoryName: - der.readSequence(ALTNAME.DirectoryName); - id = Identity.parseAsn1(der); - if (!cert.subjects[0].equals(id)) - cert.subjects.push(id); - break; - case ALTNAME.DNSName: - var host = der.readString( - ALTNAME.DNSName); - id = Identity.forHost(host); - if (!cert.subjects[0].equals(id)) - cert.subjects.push(id); - break; - default: - der.readString(der.peek()); - break; - } - } - sig.extras.exts.push({ oid: extId, critical: critical }); - break; - default: - sig.extras.exts.push({ - oid: extId, - critical: critical, - data: der.readString(asn1.Ber.OctetString, true) - }); - break; - } - - der._offset = after; -} - -var UTCTIME_RE = - /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; -function utcTimeToDate(t) { - var m = t.match(UTCTIME_RE); - assert.ok(m, 'timestamps must be in UTC'); - var d = new Date(); - - var thisYear = d.getUTCFullYear(); - var century = Math.floor(thisYear / 100) * 100; - - var year = parseInt(m[1], 10); - if (thisYear % 100 < 50 && year >= 60) - year += (century - 1); - else - year += century; - d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10)); - d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); - if (m[6] && m[6].length > 0) - d.setUTCSeconds(parseInt(m[6], 10)); - return (d); -} - -var GTIME_RE = - /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/; -function gTimeToDate(t) { - var m = t.match(GTIME_RE); - assert.ok(m); - var d = new Date(); - - d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1, - parseInt(m[3], 10)); - d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10)); - if (m[6] && m[6].length > 0) - d.setUTCSeconds(parseInt(m[6], 10)); - return (d); -} - -function zeroPad(n, m) { - if (m === undefined) - m = 2; - var s = '' + n; - while (s.length < m) - s = '0' + s; - return (s); -} - -function dateToUTCTime(d) { - var s = ''; - s += zeroPad(d.getUTCFullYear() % 100); - s += zeroPad(d.getUTCMonth() + 1); - s += zeroPad(d.getUTCDate()); - s += zeroPad(d.getUTCHours()); - s += zeroPad(d.getUTCMinutes()); - s += zeroPad(d.getUTCSeconds()); - s += 'Z'; - return (s); -} - -function dateToGTime(d) { - var s = ''; - s += zeroPad(d.getUTCFullYear(), 4); - s += zeroPad(d.getUTCMonth() + 1); - s += zeroPad(d.getUTCDate()); - s += zeroPad(d.getUTCHours()); - s += zeroPad(d.getUTCMinutes()); - s += zeroPad(d.getUTCSeconds()); - s += 'Z'; - return (s); -} - -function sign(cert, key) { - if (cert.signatures.x509 === undefined) - cert.signatures.x509 = {}; - var sig = cert.signatures.x509; - - sig.algo = key.type + '-' + key.defaultHashAlgorithm(); - if (SIGN_ALGS[sig.algo] === undefined) - return (false); - - var der = new asn1.BerWriter(); - writeTBSCert(cert, der); - var blob = der.buffer; - sig.cache = blob; - - var signer = key.createSign(); - signer.write(blob); - cert.signatures.x509.signature = signer.sign(); - - return (true); -} - -function signAsync(cert, signer, done) { - if (cert.signatures.x509 === undefined) - cert.signatures.x509 = {}; - var sig = cert.signatures.x509; - - var der = new asn1.BerWriter(); - writeTBSCert(cert, der); - var blob = der.buffer; - sig.cache = blob; - - signer(blob, function (err, signature) { - if (err) { - done(err); - return; - } - sig.algo = signature.type + '-' + signature.hashAlgorithm; - if (SIGN_ALGS[sig.algo] === undefined) { - done(new Error('Invalid signing algorithm "' + - sig.algo + '"')); - return; - } - sig.signature = signature; - done(); - }); -} - -function write(cert, options) { - var sig = cert.signatures.x509; - assert.object(sig, 'x509 signature'); - - var der = new asn1.BerWriter(); - der.startSequence(); - if (sig.cache) { - der._ensure(sig.cache.length); - sig.cache.copy(der._buf, der._offset); - der._offset += sig.cache.length; - } else { - writeTBSCert(cert, der); - } - - der.startSequence(); - der.writeOID(SIGN_ALGS[sig.algo]); - if (sig.algo.match(/^rsa-/)) - der.writeNull(); - der.endSequence(); - - var sigData = sig.signature.toBuffer('asn1'); - var data = Buffer.alloc(sigData.length + 1); - data[0] = 0; - sigData.copy(data, 1); - der.writeBuffer(data, asn1.Ber.BitString); - der.endSequence(); - - return (der.buffer); -} - -function writeTBSCert(cert, der) { - var sig = cert.signatures.x509; - assert.object(sig, 'x509 signature'); - - der.startSequence(); - - der.startSequence(Local(0)); - der.writeInt(2); - der.endSequence(); - - der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer); - - der.startSequence(); - der.writeOID(SIGN_ALGS[sig.algo]); - if (sig.algo.match(/^rsa-/)) - der.writeNull(); - der.endSequence(); - - cert.issuer.toAsn1(der); - - der.startSequence(); - writeDate(der, cert.validFrom); - writeDate(der, cert.validUntil); - der.endSequence(); - - var subject = cert.subjects[0]; - var altNames = cert.subjects.slice(1); - subject.toAsn1(der); - - pkcs8.writePkcs8(der, cert.subjectKey); - - if (sig.extras && sig.extras.issuerUniqueID) { - der.writeBuffer(sig.extras.issuerUniqueID, Local(1)); - } - - if (sig.extras && sig.extras.subjectUniqueID) { - der.writeBuffer(sig.extras.subjectUniqueID, Local(2)); - } - - if (altNames.length > 0 || subject.type === 'host' || - (cert.purposes !== undefined && cert.purposes.length > 0) || - (sig.extras && sig.extras.exts)) { - der.startSequence(Local(3)); - der.startSequence(); - - var exts = []; - if (cert.purposes !== undefined && cert.purposes.length > 0) { - exts.push({ - oid: EXTS.basicConstraints, - critical: true - }); - exts.push({ - oid: EXTS.keyUsage, - critical: true - }); - exts.push({ - oid: EXTS.extKeyUsage, - critical: true - }); - } - exts.push({ oid: EXTS.altName }); - if (sig.extras && sig.extras.exts) - exts = sig.extras.exts; - - for (var i = 0; i < exts.length; ++i) { - der.startSequence(); - der.writeOID(exts[i].oid); - - if (exts[i].critical !== undefined) - der.writeBoolean(exts[i].critical); - - if (exts[i].oid === EXTS.altName) { - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - if (subject.type === 'host') { - der.writeString(subject.hostname, - Context(2)); - } - for (var j = 0; j < altNames.length; ++j) { - if (altNames[j].type === 'host') { - der.writeString( - altNames[j].hostname, - ALTNAME.DNSName); - } else if (altNames[j].type === - 'email') { - der.writeString( - altNames[j].email, - ALTNAME.RFC822Name); - } else { - /* - * Encode anything else as a - * DN style name for now. - */ - der.startSequence( - ALTNAME.DirectoryName); - altNames[j].toAsn1(der); - der.endSequence(); - } - } - der.endSequence(); - der.endSequence(); - } else if (exts[i].oid === EXTS.basicConstraints) { - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - var ca = (cert.purposes.indexOf('ca') !== -1); - var pathLen = exts[i].pathLen; - der.writeBoolean(ca); - if (pathLen !== undefined) - der.writeInt(pathLen); - der.endSequence(); - der.endSequence(); - } else if (exts[i].oid === EXTS.extKeyUsage) { - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - cert.purposes.forEach(function (purpose) { - if (purpose === 'ca') - return; - if (KEYUSEBITS.indexOf(purpose) !== -1) - return; - var oid = purpose; - if (EXTPURPOSE[purpose] !== undefined) - oid = EXTPURPOSE[purpose]; - der.writeOID(oid); - }); - der.endSequence(); - der.endSequence(); - } else if (exts[i].oid === EXTS.keyUsage) { - der.startSequence(asn1.Ber.OctetString); - /* - * If we parsed this certificate from a byte - * stream (i.e. we didn't generate it in sshpk) - * then we'll have a ".bits" property on the - * ext with the original raw byte contents. - * - * If we have this, use it here instead of - * regenerating it. This guarantees we output - * the same data we parsed, so signatures still - * validate. - */ - if (exts[i].bits !== undefined) { - der.writeBuffer(exts[i].bits, - asn1.Ber.BitString); - } else { - var bits = writeBitField(cert.purposes, - KEYUSEBITS); - der.writeBuffer(bits, - asn1.Ber.BitString); - } - der.endSequence(); - } else { - der.writeBuffer(exts[i].data, - asn1.Ber.OctetString); - } - - der.endSequence(); - } - - der.endSequence(); - der.endSequence(); - } - - der.endSequence(); -} - -/* - * Reads an ASN.1 BER bitfield out of the Buffer produced by doing - * `BerReader#readString(asn1.Ber.BitString)`. That function gives us the raw - * contents of the BitString tag, which is a count of unused bits followed by - * the bits as a right-padded byte string. - * - * `bits` is the Buffer, `bitIndex` should contain an array of string names - * for the bits in the string, ordered starting with bit #0 in the ASN.1 spec. - * - * Returns an array of Strings, the names of the bits that were set to 1. - */ -function readBitField(bits, bitIndex) { - var bitLen = 8 * (bits.length - 1) - bits[0]; - var setBits = {}; - for (var i = 0; i < bitLen; ++i) { - var byteN = 1 + Math.floor(i / 8); - var bit = 7 - (i % 8); - var mask = 1 << bit; - var bitVal = ((bits[byteN] & mask) !== 0); - var name = bitIndex[i]; - if (bitVal && typeof (name) === 'string') { - setBits[name] = true; - } - } - return (Object.keys(setBits)); -} - -/* - * `setBits` is an array of strings, containing the names for each bit that - * sould be set to 1. `bitIndex` is same as in `readBitField()`. - * - * Returns a Buffer, ready to be written out with `BerWriter#writeString()`. - */ -function writeBitField(setBits, bitIndex) { - var bitLen = bitIndex.length; - var blen = Math.ceil(bitLen / 8); - var unused = blen * 8 - bitLen; - var bits = Buffer.alloc(1 + blen); // zero-filled - bits[0] = unused; - for (var i = 0; i < bitLen; ++i) { - var byteN = 1 + Math.floor(i / 8); - var bit = 7 - (i % 8); - var mask = 1 << bit; - var name = bitIndex[i]; - if (name === undefined) - continue; - var bitVal = (setBits.indexOf(name) !== -1); - if (bitVal) { - bits[byteN] |= mask; - } - } - return (bits); -} - - -/***/ }), - -/***/ 70508: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2017 Joyent, Inc. - -module.exports = Identity; - -var assert = __nccwpck_require__(66631); -var algs = __nccwpck_require__(66126); -var crypto = __nccwpck_require__(6113); -var Fingerprint = __nccwpck_require__(13079); -var Signature = __nccwpck_require__(91394); -var errs = __nccwpck_require__(27979); -var util = __nccwpck_require__(73837); -var utils = __nccwpck_require__(80575); -var asn1 = __nccwpck_require__(80970); -var Buffer = (__nccwpck_require__(15118).Buffer); - -/*JSSTYLED*/ -var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; - -var oids = {}; -oids.cn = '2.5.4.3'; -oids.o = '2.5.4.10'; -oids.ou = '2.5.4.11'; -oids.l = '2.5.4.7'; -oids.s = '2.5.4.8'; -oids.c = '2.5.4.6'; -oids.sn = '2.5.4.4'; -oids.postalCode = '2.5.4.17'; -oids.serialNumber = '2.5.4.5'; -oids.street = '2.5.4.9'; -oids.x500UniqueIdentifier = '2.5.4.45'; -oids.role = '2.5.4.72'; -oids.telephoneNumber = '2.5.4.20'; -oids.description = '2.5.4.13'; -oids.dc = '0.9.2342.19200300.100.1.25'; -oids.uid = '0.9.2342.19200300.100.1.1'; -oids.mail = '0.9.2342.19200300.100.1.3'; -oids.title = '2.5.4.12'; -oids.gn = '2.5.4.42'; -oids.initials = '2.5.4.43'; -oids.pseudonym = '2.5.4.65'; -oids.emailAddress = '1.2.840.113549.1.9.1'; - -var unoids = {}; -Object.keys(oids).forEach(function (k) { - unoids[oids[k]] = k; -}); - -function Identity(opts) { - var self = this; - assert.object(opts, 'options'); - assert.arrayOfObject(opts.components, 'options.components'); - this.components = opts.components; - this.componentLookup = {}; - this.components.forEach(function (c) { - if (c.name && !c.oid) - c.oid = oids[c.name]; - if (c.oid && !c.name) - c.name = unoids[c.oid]; - if (self.componentLookup[c.name] === undefined) - self.componentLookup[c.name] = []; - self.componentLookup[c.name].push(c); - }); - if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { - this.cn = this.componentLookup.cn[0].value; - } - assert.optionalString(opts.type, 'options.type'); - if (opts.type === undefined) { - if (this.components.length === 1 && - this.componentLookup.cn && - this.componentLookup.cn.length === 1 && - this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { - this.type = 'host'; - this.hostname = this.componentLookup.cn[0].value; - - } else if (this.componentLookup.dc && - this.components.length === this.componentLookup.dc.length) { - this.type = 'host'; - this.hostname = this.componentLookup.dc.map( - function (c) { - return (c.value); - }).join('.'); - - } else if (this.componentLookup.uid && - this.components.length === - this.componentLookup.uid.length) { - this.type = 'user'; - this.uid = this.componentLookup.uid[0].value; - - } else if (this.componentLookup.cn && - this.componentLookup.cn.length === 1 && - this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { - this.type = 'host'; - this.hostname = this.componentLookup.cn[0].value; - - } else if (this.componentLookup.uid && - this.componentLookup.uid.length === 1) { - this.type = 'user'; - this.uid = this.componentLookup.uid[0].value; - - } else if (this.componentLookup.mail && - this.componentLookup.mail.length === 1) { - this.type = 'email'; - this.email = this.componentLookup.mail[0].value; - - } else if (this.componentLookup.cn && - this.componentLookup.cn.length === 1) { - this.type = 'user'; - this.uid = this.componentLookup.cn[0].value; - - } else { - this.type = 'unknown'; - } - } else { - this.type = opts.type; - if (this.type === 'host') - this.hostname = opts.hostname; - else if (this.type === 'user') - this.uid = opts.uid; - else if (this.type === 'email') - this.email = opts.email; - else - throw (new Error('Unknown type ' + this.type)); - } -} - -Identity.prototype.toString = function () { - return (this.components.map(function (c) { - var n = c.name.toUpperCase(); - /*JSSTYLED*/ - n = n.replace(/=/g, '\\='); - var v = c.value; - /*JSSTYLED*/ - v = v.replace(/,/g, '\\,'); - return (n + '=' + v); - }).join(', ')); -}; - -Identity.prototype.get = function (name, asArray) { - assert.string(name, 'name'); - var arr = this.componentLookup[name]; - if (arr === undefined || arr.length === 0) - return (undefined); - if (!asArray && arr.length > 1) - throw (new Error('Multiple values for attribute ' + name)); - if (!asArray) - return (arr[0].value); - return (arr.map(function (c) { - return (c.value); - })); -}; - -Identity.prototype.toArray = function (idx) { - return (this.components.map(function (c) { - return ({ - name: c.name, - value: c.value - }); - })); -}; - -/* - * These are from X.680 -- PrintableString allowed chars are in section 37.4 - * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to - * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 - * (the basic ASCII character set). - */ -/* JSSTYLED */ -var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; -/* JSSTYLED */ -var NOT_IA5 = /[^\x00-\x7f]/; - -Identity.prototype.toAsn1 = function (der, tag) { - der.startSequence(tag); - this.components.forEach(function (c) { - der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); - der.startSequence(); - der.writeOID(c.oid); - /* - * If we fit in a PrintableString, use that. Otherwise use an - * IA5String or UTF8String. - * - * If this identity was parsed from a DN, use the ASN.1 types - * from the original representation (otherwise this might not - * be a full match for the original in some validators). - */ - if (c.asn1type === asn1.Ber.Utf8String || - c.value.match(NOT_IA5)) { - var v = Buffer.from(c.value, 'utf8'); - der.writeBuffer(v, asn1.Ber.Utf8String); - - } else if (c.asn1type === asn1.Ber.IA5String || - c.value.match(NOT_PRINTABLE)) { - der.writeString(c.value, asn1.Ber.IA5String); - - } else { - var type = asn1.Ber.PrintableString; - if (c.asn1type !== undefined) - type = c.asn1type; - der.writeString(c.value, type); - } - der.endSequence(); - der.endSequence(); - }); - der.endSequence(); -}; - -function globMatch(a, b) { - if (a === '**' || b === '**') - return (true); - var aParts = a.split('.'); - var bParts = b.split('.'); - if (aParts.length !== bParts.length) - return (false); - for (var i = 0; i < aParts.length; ++i) { - if (aParts[i] === '*' || bParts[i] === '*') - continue; - if (aParts[i] !== bParts[i]) - return (false); - } - return (true); -} - -Identity.prototype.equals = function (other) { - if (!Identity.isIdentity(other, [1, 0])) - return (false); - if (other.components.length !== this.components.length) - return (false); - for (var i = 0; i < this.components.length; ++i) { - if (this.components[i].oid !== other.components[i].oid) - return (false); - if (!globMatch(this.components[i].value, - other.components[i].value)) { - return (false); - } - } - return (true); -}; - -Identity.forHost = function (hostname) { - assert.string(hostname, 'hostname'); - return (new Identity({ - type: 'host', - hostname: hostname, - components: [ { name: 'cn', value: hostname } ] - })); -}; - -Identity.forUser = function (uid) { - assert.string(uid, 'uid'); - return (new Identity({ - type: 'user', - uid: uid, - components: [ { name: 'uid', value: uid } ] - })); -}; - -Identity.forEmail = function (email) { - assert.string(email, 'email'); - return (new Identity({ - type: 'email', - email: email, - components: [ { name: 'mail', value: email } ] - })); -}; - -Identity.parseDN = function (dn) { - assert.string(dn, 'dn'); - var parts = ['']; - var idx = 0; - var rem = dn; - while (rem.length > 0) { - var m; - /*JSSTYLED*/ - if ((m = /^,/.exec(rem)) !== null) { - parts[++idx] = ''; - rem = rem.slice(m[0].length); - /*JSSTYLED*/ - } else if ((m = /^\\,/.exec(rem)) !== null) { - parts[idx] += ','; - rem = rem.slice(m[0].length); - /*JSSTYLED*/ - } else if ((m = /^\\./.exec(rem)) !== null) { - parts[idx] += m[0]; - rem = rem.slice(m[0].length); - /*JSSTYLED*/ - } else if ((m = /^[^\\,]+/.exec(rem)) !== null) { - parts[idx] += m[0]; - rem = rem.slice(m[0].length); - } else { - throw (new Error('Failed to parse DN')); - } - } - var cmps = parts.map(function (c) { - c = c.trim(); - var eqPos = c.indexOf('='); - while (eqPos > 0 && c.charAt(eqPos - 1) === '\\') - eqPos = c.indexOf('=', eqPos + 1); - if (eqPos === -1) { - throw (new Error('Failed to parse DN')); - } - /*JSSTYLED*/ - var name = c.slice(0, eqPos).toLowerCase().replace(/\\=/g, '='); - var value = c.slice(eqPos + 1); - return ({ name: name, value: value }); - }); - return (new Identity({ components: cmps })); -}; - -Identity.fromArray = function (components) { - assert.arrayOfObject(components, 'components'); - components.forEach(function (cmp) { - assert.object(cmp, 'component'); - assert.string(cmp.name, 'component.name'); - if (!Buffer.isBuffer(cmp.value) && - !(typeof (cmp.value) === 'string')) { - throw (new Error('Invalid component value')); - } - }); - return (new Identity({ components: components })); -}; - -Identity.parseAsn1 = function (der, top) { - var components = []; - der.readSequence(top); - var end = der.offset + der.length; - while (der.offset < end) { - der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); - var after = der.offset + der.length; - der.readSequence(); - var oid = der.readOID(); - var type = der.peek(); - var value; - switch (type) { - case asn1.Ber.PrintableString: - case asn1.Ber.IA5String: - case asn1.Ber.OctetString: - case asn1.Ber.T61String: - value = der.readString(type); - break; - case asn1.Ber.Utf8String: - value = der.readString(type, true); - value = value.toString('utf8'); - break; - case asn1.Ber.CharacterString: - case asn1.Ber.BMPString: - value = der.readString(type, true); - value = value.toString('utf16le'); - break; - default: - throw (new Error('Unknown asn1 type ' + type)); - } - components.push({ oid: oid, asn1type: type, value: value }); - der._offset = after; - } - der._offset = end; - return (new Identity({ - components: components - })); -}; - -Identity.isIdentity = function (obj, ver) { - return (utils.isCompatible(obj, Identity, ver)); -}; - -/* - * API versions for Identity: - * [1,0] -- initial ver - */ -Identity.prototype._sshpkApiVersion = [1, 0]; - -Identity._oldVersionDetect = function (obj) { - return ([1, 0]); -}; - - -/***/ }), - -/***/ 87022: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -var Key = __nccwpck_require__(36814); -var Fingerprint = __nccwpck_require__(13079); -var Signature = __nccwpck_require__(91394); -var PrivateKey = __nccwpck_require__(29602); -var Certificate = __nccwpck_require__(7406); -var Identity = __nccwpck_require__(70508); -var errs = __nccwpck_require__(27979); - -module.exports = { - /* top-level classes */ - Key: Key, - parseKey: Key.parse, - Fingerprint: Fingerprint, - parseFingerprint: Fingerprint.parse, - Signature: Signature, - parseSignature: Signature.parse, - PrivateKey: PrivateKey, - parsePrivateKey: PrivateKey.parse, - generatePrivateKey: PrivateKey.generate, - Certificate: Certificate, - parseCertificate: Certificate.parse, - createSelfSignedCertificate: Certificate.createSelfSigned, - createCertificate: Certificate.create, - Identity: Identity, - identityFromDN: Identity.parseDN, - identityForHost: Identity.forHost, - identityForUser: Identity.forUser, - identityForEmail: Identity.forEmail, - identityFromArray: Identity.fromArray, - - /* errors */ - FingerprintFormatError: errs.FingerprintFormatError, - InvalidAlgorithmError: errs.InvalidAlgorithmError, - KeyParseError: errs.KeyParseError, - SignatureParseError: errs.SignatureParseError, - KeyEncryptedError: errs.KeyEncryptedError, - CertificateParseError: errs.CertificateParseError -}; - - -/***/ }), - -/***/ 36814: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2018 Joyent, Inc. - -module.exports = Key; - -var assert = __nccwpck_require__(66631); -var algs = __nccwpck_require__(66126); -var crypto = __nccwpck_require__(6113); -var Fingerprint = __nccwpck_require__(13079); -var Signature = __nccwpck_require__(91394); -var DiffieHellman = (__nccwpck_require__(57602).DiffieHellman); -var errs = __nccwpck_require__(27979); -var utils = __nccwpck_require__(80575); -var PrivateKey = __nccwpck_require__(29602); -var edCompat; - -try { - edCompat = __nccwpck_require__(14694); -} catch (e) { - /* Just continue through, and bail out if we try to use it. */ -} - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var KeyParseError = errs.KeyParseError; - -var formats = {}; -formats['auto'] = __nccwpck_require__(8243); -formats['pem'] = __nccwpck_require__(14324); -formats['pkcs1'] = __nccwpck_require__(69367); -formats['pkcs8'] = __nccwpck_require__(4173); -formats['rfc4253'] = __nccwpck_require__(88688); -formats['ssh'] = __nccwpck_require__(68927); -formats['ssh-private'] = __nccwpck_require__(3923); -formats['openssh'] = formats['ssh-private']; -formats['dnssec'] = __nccwpck_require__(63561); -formats['putty'] = __nccwpck_require__(80974); -formats['ppk'] = formats['putty']; - -function Key(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.parts, 'options.parts'); - assert.string(opts.type, 'options.type'); - assert.optionalString(opts.comment, 'options.comment'); - - var algInfo = algs.info[opts.type]; - if (typeof (algInfo) !== 'object') - throw (new InvalidAlgorithmError(opts.type)); - - var partLookup = {}; - for (var i = 0; i < opts.parts.length; ++i) { - var part = opts.parts[i]; - partLookup[part.name] = part; - } - - this.type = opts.type; - this.parts = opts.parts; - this.part = partLookup; - this.comment = undefined; - this.source = opts.source; - - /* for speeding up hashing/fingerprint operations */ - this._rfc4253Cache = opts._rfc4253Cache; - this._hashCache = {}; - - var sz; - this.curve = undefined; - if (this.type === 'ecdsa') { - var curve = this.part.curve.data.toString(); - this.curve = curve; - sz = algs.curves[curve].size; - } else if (this.type === 'ed25519' || this.type === 'curve25519') { - sz = 256; - this.curve = 'curve25519'; - } else { - var szPart = this.part[algInfo.sizePart]; - sz = szPart.data.length; - sz = sz * 8 - utils.countZeros(szPart.data); - } - this.size = sz; -} - -Key.formats = formats; - -Key.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'ssh'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - if (format === 'rfc4253') { - if (this._rfc4253Cache === undefined) - this._rfc4253Cache = formats['rfc4253'].write(this); - return (this._rfc4253Cache); - } - - return (formats[format].write(this, options)); -}; - -Key.prototype.toString = function (format, options) { - return (this.toBuffer(format, options).toString()); -}; - -Key.prototype.hash = function (algo, type) { - assert.string(algo, 'algorithm'); - assert.optionalString(type, 'type'); - if (type === undefined) - type = 'ssh'; - algo = algo.toLowerCase(); - if (algs.hashAlgs[algo] === undefined) - throw (new InvalidAlgorithmError(algo)); - - var cacheKey = algo + '||' + type; - if (this._hashCache[cacheKey]) - return (this._hashCache[cacheKey]); - - var buf; - if (type === 'ssh') { - buf = this.toBuffer('rfc4253'); - } else if (type === 'spki') { - buf = formats.pkcs8.pkcs8ToBuffer(this); - } else { - throw (new Error('Hash type ' + type + ' not supported')); - } - var hash = crypto.createHash(algo).update(buf).digest(); - this._hashCache[cacheKey] = hash; - return (hash); -}; - -Key.prototype.fingerprint = function (algo, type) { - if (algo === undefined) - algo = 'sha256'; - if (type === undefined) - type = 'ssh'; - assert.string(algo, 'algorithm'); - assert.string(type, 'type'); - var opts = { - type: 'key', - hash: this.hash(algo, type), - algorithm: algo, - hashType: type - }; - return (new Fingerprint(opts)); -}; - -Key.prototype.defaultHashAlgorithm = function () { - var hashAlgo = 'sha1'; - if (this.type === 'rsa') - hashAlgo = 'sha256'; - if (this.type === 'dsa' && this.size > 1024) - hashAlgo = 'sha256'; - if (this.type === 'ed25519') - hashAlgo = 'sha512'; - if (this.type === 'ecdsa') { - if (this.size <= 256) - hashAlgo = 'sha256'; - else if (this.size <= 384) - hashAlgo = 'sha384'; - else - hashAlgo = 'sha512'; - } - return (hashAlgo); -}; - -Key.prototype.createVerify = function (hashAlgo) { - if (hashAlgo === undefined) - hashAlgo = this.defaultHashAlgorithm(); - assert.string(hashAlgo, 'hash algorithm'); - - /* ED25519 is not supported by OpenSSL, use a javascript impl. */ - if (this.type === 'ed25519' && edCompat !== undefined) - return (new edCompat.Verifier(this, hashAlgo)); - if (this.type === 'curve25519') - throw (new Error('Curve25519 keys are not suitable for ' + - 'signing or verification')); - - var v, nm, err; - try { - nm = hashAlgo.toUpperCase(); - v = crypto.createVerify(nm); - } catch (e) { - err = e; - } - if (v === undefined || (err instanceof Error && - err.message.match(/Unknown message digest/))) { - nm = 'RSA-'; - nm += hashAlgo.toUpperCase(); - v = crypto.createVerify(nm); - } - assert.ok(v, 'failed to create verifier'); - var oldVerify = v.verify.bind(v); - var key = this.toBuffer('pkcs8'); - var curve = this.curve; - var self = this; - v.verify = function (signature, fmt) { - if (Signature.isSignature(signature, [2, 0])) { - if (signature.type !== self.type) - return (false); - if (signature.hashAlgorithm && - signature.hashAlgorithm !== hashAlgo) - return (false); - if (signature.curve && self.type === 'ecdsa' && - signature.curve !== curve) - return (false); - return (oldVerify(key, signature.toBuffer('asn1'))); - - } else if (typeof (signature) === 'string' || - Buffer.isBuffer(signature)) { - return (oldVerify(key, signature, fmt)); - - /* - * Avoid doing this on valid arguments, walking the prototype - * chain can be quite slow. - */ - } else if (Signature.isSignature(signature, [1, 0])) { - throw (new Error('signature was created by too old ' + - 'a version of sshpk and cannot be verified')); - - } else { - throw (new TypeError('signature must be a string, ' + - 'Buffer, or Signature object')); - } - }; - return (v); -}; - -Key.prototype.createDiffieHellman = function () { - if (this.type === 'rsa') - throw (new Error('RSA keys do not support Diffie-Hellman')); - - return (new DiffieHellman(this)); -}; -Key.prototype.createDH = Key.prototype.createDiffieHellman; - -Key.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - if (k instanceof PrivateKey) - k = k.toPublic(); - if (!k.comment) - k.comment = options.filename; - return (k); - } catch (e) { - if (e.name === 'KeyEncryptedError') - throw (e); - throw (new KeyParseError(options.filename, format, e)); - } -}; - -Key.isKey = function (obj, ver) { - return (utils.isCompatible(obj, Key, ver)); -}; - -/* - * API versions for Key: - * [1,0] -- initial ver, may take Signature for createVerify or may not - * [1,1] -- added pkcs1, pkcs8 formats - * [1,2] -- added auto, ssh-private, openssh formats - * [1,3] -- added defaultHashAlgorithm - * [1,4] -- added ed support, createDH - * [1,5] -- first explicitly tagged version - * [1,6] -- changed ed25519 part names - * [1,7] -- spki hash types - */ -Key.prototype._sshpkApiVersion = [1, 7]; - -Key._oldVersionDetect = function (obj) { - assert.func(obj.toBuffer); - assert.func(obj.fingerprint); - if (obj.createDH) - return ([1, 4]); - if (obj.defaultHashAlgorithm) - return ([1, 3]); - if (obj.formats['auto']) - return ([1, 2]); - if (obj.formats['pkcs1']) - return ([1, 1]); - return ([1, 0]); -}; - - -/***/ }), - -/***/ 29602: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2017 Joyent, Inc. - -module.exports = PrivateKey; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var crypto = __nccwpck_require__(6113); -var Fingerprint = __nccwpck_require__(13079); -var Signature = __nccwpck_require__(91394); -var errs = __nccwpck_require__(27979); -var util = __nccwpck_require__(73837); -var utils = __nccwpck_require__(80575); -var dhe = __nccwpck_require__(57602); -var generateECDSA = dhe.generateECDSA; -var generateED25519 = dhe.generateED25519; -var edCompat = __nccwpck_require__(14694); -var nacl = __nccwpck_require__(68729); - -var Key = __nccwpck_require__(36814); - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var KeyParseError = errs.KeyParseError; -var KeyEncryptedError = errs.KeyEncryptedError; - -var formats = {}; -formats['auto'] = __nccwpck_require__(8243); -formats['pem'] = __nccwpck_require__(14324); -formats['pkcs1'] = __nccwpck_require__(69367); -formats['pkcs8'] = __nccwpck_require__(4173); -formats['rfc4253'] = __nccwpck_require__(88688); -formats['ssh-private'] = __nccwpck_require__(3923); -formats['openssh'] = formats['ssh-private']; -formats['ssh'] = formats['ssh-private']; -formats['dnssec'] = __nccwpck_require__(63561); -formats['putty'] = __nccwpck_require__(80974); - -function PrivateKey(opts) { - assert.object(opts, 'options'); - Key.call(this, opts); - - this._pubCache = undefined; -} -util.inherits(PrivateKey, Key); - -PrivateKey.formats = formats; - -PrivateKey.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'pkcs1'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - return (formats[format].write(this, options)); -}; - -PrivateKey.prototype.hash = function (algo, type) { - return (this.toPublic().hash(algo, type)); -}; - -PrivateKey.prototype.fingerprint = function (algo, type) { - return (this.toPublic().fingerprint(algo, type)); -}; - -PrivateKey.prototype.toPublic = function () { - if (this._pubCache) - return (this._pubCache); - - var algInfo = algs.info[this.type]; - var pubParts = []; - for (var i = 0; i < algInfo.parts.length; ++i) { - var p = algInfo.parts[i]; - pubParts.push(this.part[p]); - } - - this._pubCache = new Key({ - type: this.type, - source: this, - parts: pubParts - }); - if (this.comment) - this._pubCache.comment = this.comment; - return (this._pubCache); -}; - -PrivateKey.prototype.derive = function (newType) { - assert.string(newType, 'type'); - var priv, pub, pair; - - if (this.type === 'ed25519' && newType === 'curve25519') { - priv = this.part.k.data; - if (priv[0] === 0x00) - priv = priv.slice(1); - - pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); - pub = Buffer.from(pair.publicKey); - - return (new PrivateKey({ - type: 'curve25519', - parts: [ - { name: 'A', data: utils.mpNormalize(pub) }, - { name: 'k', data: utils.mpNormalize(priv) } - ] - })); - } else if (this.type === 'curve25519' && newType === 'ed25519') { - priv = this.part.k.data; - if (priv[0] === 0x00) - priv = priv.slice(1); - - pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); - pub = Buffer.from(pair.publicKey); - - return (new PrivateKey({ - type: 'ed25519', - parts: [ - { name: 'A', data: utils.mpNormalize(pub) }, - { name: 'k', data: utils.mpNormalize(priv) } - ] - })); - } - throw (new Error('Key derivation not supported from ' + this.type + - ' to ' + newType)); -}; - -PrivateKey.prototype.createVerify = function (hashAlgo) { - return (this.toPublic().createVerify(hashAlgo)); -}; - -PrivateKey.prototype.createSign = function (hashAlgo) { - if (hashAlgo === undefined) - hashAlgo = this.defaultHashAlgorithm(); - assert.string(hashAlgo, 'hash algorithm'); - - /* ED25519 is not supported by OpenSSL, use a javascript impl. */ - if (this.type === 'ed25519' && edCompat !== undefined) - return (new edCompat.Signer(this, hashAlgo)); - if (this.type === 'curve25519') - throw (new Error('Curve25519 keys are not suitable for ' + - 'signing or verification')); - - var v, nm, err; - try { - nm = hashAlgo.toUpperCase(); - v = crypto.createSign(nm); - } catch (e) { - err = e; - } - if (v === undefined || (err instanceof Error && - err.message.match(/Unknown message digest/))) { - nm = 'RSA-'; - nm += hashAlgo.toUpperCase(); - v = crypto.createSign(nm); - } - assert.ok(v, 'failed to create verifier'); - var oldSign = v.sign.bind(v); - var key = this.toBuffer('pkcs1'); - var type = this.type; - var curve = this.curve; - v.sign = function () { - var sig = oldSign(key); - if (typeof (sig) === 'string') - sig = Buffer.from(sig, 'binary'); - sig = Signature.parse(sig, type, 'asn1'); - sig.hashAlgorithm = hashAlgo; - sig.curve = curve; - return (sig); - }; - return (v); -}; - -PrivateKey.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - assert.ok(k instanceof PrivateKey, 'key is not a private key'); - if (!k.comment) - k.comment = options.filename; - return (k); - } catch (e) { - if (e.name === 'KeyEncryptedError') - throw (e); - throw (new KeyParseError(options.filename, format, e)); - } -}; - -PrivateKey.isPrivateKey = function (obj, ver) { - return (utils.isCompatible(obj, PrivateKey, ver)); -}; - -PrivateKey.generate = function (type, options) { - if (options === undefined) - options = {}; - assert.object(options, 'options'); - - switch (type) { - case 'ecdsa': - if (options.curve === undefined) - options.curve = 'nistp256'; - assert.string(options.curve, 'options.curve'); - return (generateECDSA(options.curve)); - case 'ed25519': - return (generateED25519()); - default: - throw (new Error('Key generation not supported with key ' + - 'type "' + type + '"')); - } -}; - -/* - * API versions for PrivateKey: - * [1,0] -- initial ver - * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats - * [1,2] -- added defaultHashAlgorithm - * [1,3] -- added derive, ed, createDH - * [1,4] -- first tagged version - * [1,5] -- changed ed25519 part names and format - * [1,6] -- type arguments for hash() and fingerprint() - */ -PrivateKey.prototype._sshpkApiVersion = [1, 6]; - -PrivateKey._oldVersionDetect = function (obj) { - assert.func(obj.toPublic); - assert.func(obj.createSign); - if (obj.derive) - return ([1, 3]); - if (obj.defaultHashAlgorithm) - return ([1, 2]); - if (obj.formats['auto']) - return ([1, 1]); - return ([1, 0]); -}; - - -/***/ }), - -/***/ 91394: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = Signature; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var algs = __nccwpck_require__(66126); -var crypto = __nccwpck_require__(6113); -var errs = __nccwpck_require__(27979); -var utils = __nccwpck_require__(80575); -var asn1 = __nccwpck_require__(80970); -var SSHBuffer = __nccwpck_require__(25621); - -var InvalidAlgorithmError = errs.InvalidAlgorithmError; -var SignatureParseError = errs.SignatureParseError; - -function Signature(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.parts, 'options.parts'); - assert.string(opts.type, 'options.type'); - - var partLookup = {}; - for (var i = 0; i < opts.parts.length; ++i) { - var part = opts.parts[i]; - partLookup[part.name] = part; - } - - this.type = opts.type; - this.hashAlgorithm = opts.hashAlgo; - this.curve = opts.curve; - this.parts = opts.parts; - this.part = partLookup; -} - -Signature.prototype.toBuffer = function (format) { - if (format === undefined) - format = 'asn1'; - assert.string(format, 'format'); - - var buf; - var stype = 'ssh-' + this.type; - - switch (this.type) { - case 'rsa': - switch (this.hashAlgorithm) { - case 'sha256': - stype = 'rsa-sha2-256'; - break; - case 'sha512': - stype = 'rsa-sha2-512'; - break; - case 'sha1': - case undefined: - break; - default: - throw (new Error('SSH signature ' + - 'format does not support hash ' + - 'algorithm ' + this.hashAlgorithm)); - } - if (format === 'ssh') { - buf = new SSHBuffer({}); - buf.writeString(stype); - buf.writePart(this.part.sig); - return (buf.toBuffer()); - } else { - return (this.part.sig.data); - } - break; - - case 'ed25519': - if (format === 'ssh') { - buf = new SSHBuffer({}); - buf.writeString(stype); - buf.writePart(this.part.sig); - return (buf.toBuffer()); - } else { - return (this.part.sig.data); - } - break; - - case 'dsa': - case 'ecdsa': - var r, s; - if (format === 'asn1') { - var der = new asn1.BerWriter(); - der.startSequence(); - r = utils.mpNormalize(this.part.r.data); - s = utils.mpNormalize(this.part.s.data); - der.writeBuffer(r, asn1.Ber.Integer); - der.writeBuffer(s, asn1.Ber.Integer); - der.endSequence(); - return (der.buffer); - } else if (format === 'ssh' && this.type === 'dsa') { - buf = new SSHBuffer({}); - buf.writeString('ssh-dss'); - r = this.part.r.data; - if (r.length > 20 && r[0] === 0x00) - r = r.slice(1); - s = this.part.s.data; - if (s.length > 20 && s[0] === 0x00) - s = s.slice(1); - if ((this.hashAlgorithm && - this.hashAlgorithm !== 'sha1') || - r.length + s.length !== 40) { - throw (new Error('OpenSSH only supports ' + - 'DSA signatures with SHA1 hash')); - } - buf.writeBuffer(Buffer.concat([r, s])); - return (buf.toBuffer()); - } else if (format === 'ssh' && this.type === 'ecdsa') { - var inner = new SSHBuffer({}); - r = this.part.r.data; - inner.writeBuffer(r); - inner.writePart(this.part.s); - - buf = new SSHBuffer({}); - /* XXX: find a more proper way to do this? */ - var curve; - if (r[0] === 0x00) - r = r.slice(1); - var sz = r.length * 8; - if (sz === 256) - curve = 'nistp256'; - else if (sz === 384) - curve = 'nistp384'; - else if (sz === 528) - curve = 'nistp521'; - buf.writeString('ecdsa-sha2-' + curve); - buf.writeBuffer(inner.toBuffer()); - return (buf.toBuffer()); - } - throw (new Error('Invalid signature format')); - default: - throw (new Error('Invalid signature data')); - } -}; - -Signature.prototype.toString = function (format) { - assert.optionalString(format, 'format'); - return (this.toBuffer(format).toString('base64')); -}; - -Signature.parse = function (data, type, format) { - if (typeof (data) === 'string') - data = Buffer.from(data, 'base64'); - assert.buffer(data, 'data'); - assert.string(format, 'format'); - assert.string(type, 'type'); - - var opts = {}; - opts.type = type.toLowerCase(); - opts.parts = []; - - try { - assert.ok(data.length > 0, 'signature must not be empty'); - switch (opts.type) { - case 'rsa': - return (parseOneNum(data, type, format, opts)); - case 'ed25519': - return (parseOneNum(data, type, format, opts)); - - case 'dsa': - case 'ecdsa': - if (format === 'asn1') - return (parseDSAasn1(data, type, format, opts)); - else if (opts.type === 'dsa') - return (parseDSA(data, type, format, opts)); - else - return (parseECDSA(data, type, format, opts)); - - default: - throw (new InvalidAlgorithmError(type)); - } - - } catch (e) { - if (e instanceof InvalidAlgorithmError) - throw (e); - throw (new SignatureParseError(type, format, e)); - } -}; - -function parseOneNum(data, type, format, opts) { - if (format === 'ssh') { - try { - var buf = new SSHBuffer({buffer: data}); - var head = buf.readString(); - } catch (e) { - /* fall through */ - } - if (buf !== undefined) { - var msg = 'SSH signature does not match expected ' + - 'type (expected ' + type + ', got ' + head + ')'; - switch (head) { - case 'ssh-rsa': - assert.strictEqual(type, 'rsa', msg); - opts.hashAlgo = 'sha1'; - break; - case 'rsa-sha2-256': - assert.strictEqual(type, 'rsa', msg); - opts.hashAlgo = 'sha256'; - break; - case 'rsa-sha2-512': - assert.strictEqual(type, 'rsa', msg); - opts.hashAlgo = 'sha512'; - break; - case 'ssh-ed25519': - assert.strictEqual(type, 'ed25519', msg); - opts.hashAlgo = 'sha512'; - break; - default: - throw (new Error('Unknown SSH signature ' + - 'type: ' + head)); - } - var sig = buf.readPart(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - sig.name = 'sig'; - opts.parts.push(sig); - return (new Signature(opts)); - } - } - opts.parts.push({name: 'sig', data: data}); - return (new Signature(opts)); -} - -function parseDSAasn1(data, type, format, opts) { - var der = new asn1.BerReader(data); - der.readSequence(); - var r = der.readString(asn1.Ber.Integer, true); - var s = der.readString(asn1.Ber.Integer, true); - - opts.parts.push({name: 'r', data: utils.mpNormalize(r)}); - opts.parts.push({name: 's', data: utils.mpNormalize(s)}); - - return (new Signature(opts)); -} - -function parseDSA(data, type, format, opts) { - if (data.length != 40) { - var buf = new SSHBuffer({buffer: data}); - var d = buf.readBuffer(); - if (d.toString('ascii') === 'ssh-dss') - d = buf.readBuffer(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - assert.strictEqual(d.length, 40, 'invalid inner length'); - data = d; - } - opts.parts.push({name: 'r', data: data.slice(0, 20)}); - opts.parts.push({name: 's', data: data.slice(20, 40)}); - return (new Signature(opts)); -} - -function parseECDSA(data, type, format, opts) { - var buf = new SSHBuffer({buffer: data}); - - var r, s; - var inner = buf.readBuffer(); - var stype = inner.toString('ascii'); - if (stype.slice(0, 6) === 'ecdsa-') { - var parts = stype.split('-'); - assert.strictEqual(parts[0], 'ecdsa'); - assert.strictEqual(parts[1], 'sha2'); - opts.curve = parts[2]; - switch (opts.curve) { - case 'nistp256': - opts.hashAlgo = 'sha256'; - break; - case 'nistp384': - opts.hashAlgo = 'sha384'; - break; - case 'nistp521': - opts.hashAlgo = 'sha512'; - break; - default: - throw (new Error('Unsupported ECDSA curve: ' + - opts.curve)); - } - inner = buf.readBuffer(); - assert.ok(buf.atEnd(), 'extra trailing bytes on outer'); - buf = new SSHBuffer({buffer: inner}); - r = buf.readPart(); - } else { - r = {data: inner}; - } - - s = buf.readPart(); - assert.ok(buf.atEnd(), 'extra trailing bytes'); - - r.name = 'r'; - s.name = 's'; - - opts.parts.push(r); - opts.parts.push(s); - return (new Signature(opts)); -} - -Signature.isSignature = function (obj, ver) { - return (utils.isCompatible(obj, Signature, ver)); -}; - -/* - * API versions for Signature: - * [1,0] -- initial ver - * [2,0] -- support for rsa in full ssh format, compat with sshpk-agent - * hashAlgorithm property - * [2,1] -- first tagged version - */ -Signature.prototype._sshpkApiVersion = [2, 1]; - -Signature._oldVersionDetect = function (obj) { - assert.func(obj.toBuffer); - if (obj.hasOwnProperty('hashAlgorithm')) - return ([2, 0]); - return ([1, 0]); -}; - - -/***/ }), - -/***/ 25621: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = SSHBuffer; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); - -function SSHBuffer(opts) { - assert.object(opts, 'options'); - if (opts.buffer !== undefined) - assert.buffer(opts.buffer, 'options.buffer'); - - this._size = opts.buffer ? opts.buffer.length : 1024; - this._buffer = opts.buffer || Buffer.alloc(this._size); - this._offset = 0; -} - -SSHBuffer.prototype.toBuffer = function () { - return (this._buffer.slice(0, this._offset)); -}; - -SSHBuffer.prototype.atEnd = function () { - return (this._offset >= this._buffer.length); -}; - -SSHBuffer.prototype.remainder = function () { - return (this._buffer.slice(this._offset)); -}; - -SSHBuffer.prototype.skip = function (n) { - this._offset += n; -}; - -SSHBuffer.prototype.expand = function () { - this._size *= 2; - var buf = Buffer.alloc(this._size); - this._buffer.copy(buf, 0); - this._buffer = buf; -}; - -SSHBuffer.prototype.readPart = function () { - return ({data: this.readBuffer()}); -}; - -SSHBuffer.prototype.readBuffer = function () { - var len = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - assert.ok(this._offset + len <= this._buffer.length, - 'length out of bounds at +0x' + this._offset.toString(16) + - ' (data truncated?)'); - var buf = this._buffer.slice(this._offset, this._offset + len); - this._offset += len; - return (buf); -}; - -SSHBuffer.prototype.readString = function () { - return (this.readBuffer().toString()); -}; - -SSHBuffer.prototype.readCString = function () { - var offset = this._offset; - while (offset < this._buffer.length && - this._buffer[offset] !== 0x00) - offset++; - assert.ok(offset < this._buffer.length, 'c string does not terminate'); - var str = this._buffer.slice(this._offset, offset).toString(); - this._offset = offset + 1; - return (str); -}; - -SSHBuffer.prototype.readInt = function () { - var v = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - return (v); -}; - -SSHBuffer.prototype.readInt64 = function () { - assert.ok(this._offset + 8 < this._buffer.length, - 'buffer not long enough to read Int64'); - var v = this._buffer.slice(this._offset, this._offset + 8); - this._offset += 8; - return (v); -}; - -SSHBuffer.prototype.readChar = function () { - var v = this._buffer[this._offset++]; - return (v); -}; - -SSHBuffer.prototype.writeBuffer = function (buf) { - while (this._offset + 4 + buf.length > this._size) - this.expand(); - this._buffer.writeUInt32BE(buf.length, this._offset); - this._offset += 4; - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; - -SSHBuffer.prototype.writeString = function (str) { - this.writeBuffer(Buffer.from(str, 'utf8')); -}; - -SSHBuffer.prototype.writeCString = function (str) { - while (this._offset + 1 + str.length > this._size) - this.expand(); - this._buffer.write(str, this._offset); - this._offset += str.length; - this._buffer[this._offset++] = 0; -}; - -SSHBuffer.prototype.writeInt = function (v) { - while (this._offset + 4 > this._size) - this.expand(); - this._buffer.writeUInt32BE(v, this._offset); - this._offset += 4; -}; - -SSHBuffer.prototype.writeInt64 = function (v) { - assert.buffer(v, 'value'); - if (v.length > 8) { - var lead = v.slice(0, v.length - 8); - for (var i = 0; i < lead.length; ++i) { - assert.strictEqual(lead[i], 0, - 'must fit in 64 bits of precision'); - } - v = v.slice(v.length - 8, v.length); - } - while (this._offset + 8 > this._size) - this.expand(); - v.copy(this._buffer, this._offset); - this._offset += 8; -}; - -SSHBuffer.prototype.writeChar = function (v) { - while (this._offset + 1 > this._size) - this.expand(); - this._buffer[this._offset++] = v; -}; - -SSHBuffer.prototype.writePart = function (p) { - this.writeBuffer(p.data); -}; - -SSHBuffer.prototype.write = function (buf) { - while (this._offset + buf.length > this._size) - this.expand(); - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; - - -/***/ }), - -/***/ 80575: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - bufferSplit: bufferSplit, - addRSAMissing: addRSAMissing, - calculateDSAPublic: calculateDSAPublic, - calculateED25519Public: calculateED25519Public, - calculateX25519Public: calculateX25519Public, - mpNormalize: mpNormalize, - mpDenormalize: mpDenormalize, - ecNormalize: ecNormalize, - countZeros: countZeros, - assertCompatible: assertCompatible, - isCompatible: isCompatible, - opensslKeyDeriv: opensslKeyDeriv, - opensshCipherInfo: opensshCipherInfo, - publicFromPrivateECDSA: publicFromPrivateECDSA, - zeroPadToLength: zeroPadToLength, - writeBitString: writeBitString, - readBitString: readBitString, - pbkdf2: pbkdf2 -}; - -var assert = __nccwpck_require__(66631); -var Buffer = (__nccwpck_require__(15118).Buffer); -var PrivateKey = __nccwpck_require__(29602); -var Key = __nccwpck_require__(36814); -var crypto = __nccwpck_require__(6113); -var algs = __nccwpck_require__(66126); -var asn1 = __nccwpck_require__(80970); - -var ec = __nccwpck_require__(3943); -var jsbn = (__nccwpck_require__(85587).BigInteger); -var nacl = __nccwpck_require__(68729); - -var MAX_CLASS_DEPTH = 3; - -function isCompatible(obj, klass, needVer) { - if (obj === null || typeof (obj) !== 'object') - return (false); - if (needVer === undefined) - needVer = klass.prototype._sshpkApiVersion; - if (obj instanceof klass && - klass.prototype._sshpkApiVersion[0] == needVer[0]) - return (true); - var proto = Object.getPrototypeOf(obj); - var depth = 0; - while (proto.constructor.name !== klass.name) { - proto = Object.getPrototypeOf(proto); - if (!proto || ++depth > MAX_CLASS_DEPTH) - return (false); - } - if (proto.constructor.name !== klass.name) - return (false); - var ver = proto._sshpkApiVersion; - if (ver === undefined) - ver = klass._oldVersionDetect(obj); - if (ver[0] != needVer[0] || ver[1] < needVer[1]) - return (false); - return (true); -} - -function assertCompatible(obj, klass, needVer, name) { - if (name === undefined) - name = 'object'; - assert.ok(obj, name + ' must not be null'); - assert.object(obj, name + ' must be an object'); - if (needVer === undefined) - needVer = klass.prototype._sshpkApiVersion; - if (obj instanceof klass && - klass.prototype._sshpkApiVersion[0] == needVer[0]) - return; - var proto = Object.getPrototypeOf(obj); - var depth = 0; - while (proto.constructor.name !== klass.name) { - proto = Object.getPrototypeOf(proto); - assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, - name + ' must be a ' + klass.name + ' instance'); - } - assert.strictEqual(proto.constructor.name, klass.name, - name + ' must be a ' + klass.name + ' instance'); - var ver = proto._sshpkApiVersion; - if (ver === undefined) - ver = klass._oldVersionDetect(obj); - assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], - name + ' must be compatible with ' + klass.name + ' klass ' + - 'version ' + needVer[0] + '.' + needVer[1]); -} - -var CIPHER_LEN = { - 'des-ede3-cbc': { key: 24, iv: 8 }, - 'aes-128-cbc': { key: 16, iv: 16 }, - 'aes-256-cbc': { key: 32, iv: 16 } -}; -var PKCS5_SALT_LEN = 8; - -function opensslKeyDeriv(cipher, salt, passphrase, count) { - assert.buffer(salt, 'salt'); - assert.buffer(passphrase, 'passphrase'); - assert.number(count, 'iteration count'); - - var clen = CIPHER_LEN[cipher]; - assert.object(clen, 'supported cipher'); - - salt = salt.slice(0, PKCS5_SALT_LEN); - - var D, D_prev, bufs; - var material = Buffer.alloc(0); - while (material.length < clen.key + clen.iv) { - bufs = []; - if (D_prev) - bufs.push(D_prev); - bufs.push(passphrase); - bufs.push(salt); - D = Buffer.concat(bufs); - for (var j = 0; j < count; ++j) - D = crypto.createHash('md5').update(D).digest(); - material = Buffer.concat([material, D]); - D_prev = D; - } - - return ({ - key: material.slice(0, clen.key), - iv: material.slice(clen.key, clen.key + clen.iv) - }); -} - -/* See: RFC2898 */ -function pbkdf2(hashAlg, salt, iterations, size, passphrase) { - var hkey = Buffer.alloc(salt.length + 4); - salt.copy(hkey); - - var gen = 0, ts = []; - var i = 1; - while (gen < size) { - var t = T(i++); - gen += t.length; - ts.push(t); - } - return (Buffer.concat(ts).slice(0, size)); - - function T(I) { - hkey.writeUInt32BE(I, hkey.length - 4); - - var hmac = crypto.createHmac(hashAlg, passphrase); - hmac.update(hkey); - - var Ti = hmac.digest(); - var Uc = Ti; - var c = 1; - while (c++ < iterations) { - hmac = crypto.createHmac(hashAlg, passphrase); - hmac.update(Uc); - Uc = hmac.digest(); - for (var x = 0; x < Ti.length; ++x) - Ti[x] ^= Uc[x]; - } - return (Ti); - } -} - -/* Count leading zero bits on a buffer */ -function countZeros(buf) { - var o = 0, obit = 8; - while (o < buf.length) { - var mask = (1 << obit); - if ((buf[o] & mask) === mask) - break; - obit--; - if (obit < 0) { - o++; - obit = 8; - } - } - return (o*8 + (8 - obit) - 1); -} - -function bufferSplit(buf, chr) { - assert.buffer(buf); - assert.string(chr); - - var parts = []; - var lastPart = 0; - var matches = 0; - for (var i = 0; i < buf.length; ++i) { - if (buf[i] === chr.charCodeAt(matches)) - ++matches; - else if (buf[i] === chr.charCodeAt(0)) - matches = 1; - else - matches = 0; - - if (matches >= chr.length) { - var newPart = i + 1; - parts.push(buf.slice(lastPart, newPart - matches)); - lastPart = newPart; - matches = 0; - } - } - if (lastPart <= buf.length) - parts.push(buf.slice(lastPart, buf.length)); - - return (parts); -} - -function ecNormalize(buf, addZero) { - assert.buffer(buf); - if (buf[0] === 0x00 && buf[1] === 0x04) { - if (addZero) - return (buf); - return (buf.slice(1)); - } else if (buf[0] === 0x04) { - if (!addZero) - return (buf); - } else { - while (buf[0] === 0x00) - buf = buf.slice(1); - if (buf[0] === 0x02 || buf[0] === 0x03) - throw (new Error('Compressed elliptic curve points ' + - 'are not supported')); - if (buf[0] !== 0x04) - throw (new Error('Not a valid elliptic curve point')); - if (!addZero) - return (buf); - } - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x0; - buf.copy(b, 1); - return (b); -} - -function readBitString(der, tag) { - if (tag === undefined) - tag = asn1.Ber.BitString; - var buf = der.readString(tag, true); - assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + - 'not supported (0x' + buf[0].toString(16) + ')'); - return (buf.slice(1)); -} - -function writeBitString(der, buf, tag) { - if (tag === undefined) - tag = asn1.Ber.BitString; - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - der.writeBuffer(b, tag); -} - -function mpNormalize(buf) { - assert.buffer(buf); - while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) - buf = buf.slice(1); - if ((buf[0] & 0x80) === 0x80) { - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - buf = b; - } - return (buf); -} - -function mpDenormalize(buf) { - assert.buffer(buf); - while (buf.length > 1 && buf[0] === 0x00) - buf = buf.slice(1); - return (buf); -} - -function zeroPadToLength(buf, len) { - assert.buffer(buf); - assert.number(len); - while (buf.length > len) { - assert.equal(buf[0], 0x00); - buf = buf.slice(1); - } - while (buf.length < len) { - var b = Buffer.alloc(buf.length + 1); - b[0] = 0x00; - buf.copy(b, 1); - buf = b; - } - return (buf); -} - -function bigintToMpBuf(bigint) { - var buf = Buffer.from(bigint.toByteArray()); - buf = mpNormalize(buf); - return (buf); -} - -function calculateDSAPublic(g, p, x) { - assert.buffer(g); - assert.buffer(p); - assert.buffer(x); - g = new jsbn(g); - p = new jsbn(p); - x = new jsbn(x); - var y = g.modPow(x, p); - var ybuf = bigintToMpBuf(y); - return (ybuf); -} - -function calculateED25519Public(k) { - assert.buffer(k); - - var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); - return (Buffer.from(kp.publicKey)); -} - -function calculateX25519Public(k) { - assert.buffer(k); - - var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); - return (Buffer.from(kp.publicKey)); -} - -function addRSAMissing(key) { - assert.object(key); - assertCompatible(key, PrivateKey, [1, 1]); - - var d = new jsbn(key.part.d.data); - var buf; - - if (!key.part.dmodp) { - var p = new jsbn(key.part.p.data); - var dmodp = d.mod(p.subtract(1)); - - buf = bigintToMpBuf(dmodp); - key.part.dmodp = {name: 'dmodp', data: buf}; - key.parts.push(key.part.dmodp); - } - if (!key.part.dmodq) { - var q = new jsbn(key.part.q.data); - var dmodq = d.mod(q.subtract(1)); - - buf = bigintToMpBuf(dmodq); - key.part.dmodq = {name: 'dmodq', data: buf}; - key.parts.push(key.part.dmodq); - } -} - -function publicFromPrivateECDSA(curveName, priv) { - assert.string(curveName, 'curveName'); - assert.buffer(priv); - var params = algs.curves[curveName]; - var p = new jsbn(params.p); - var a = new jsbn(params.a); - var b = new jsbn(params.b); - var curve = new ec.ECCurveFp(p, a, b); - var G = curve.decodePointHex(params.G.toString('hex')); - - var d = new jsbn(mpNormalize(priv)); - var pub = G.multiply(d); - pub = Buffer.from(curve.encodePointHex(pub), 'hex'); - - var parts = []; - parts.push({name: 'curve', data: Buffer.from(curveName)}); - parts.push({name: 'Q', data: pub}); - - var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); - return (key); -} - -function opensshCipherInfo(cipher) { - var inf = {}; - switch (cipher) { - case '3des-cbc': - inf.keySize = 24; - inf.blockSize = 8; - inf.opensslName = 'des-ede3-cbc'; - break; - case 'blowfish-cbc': - inf.keySize = 16; - inf.blockSize = 8; - inf.opensslName = 'bf-cbc'; - break; - case 'aes128-cbc': - case 'aes128-ctr': - case 'aes128-gcm@openssh.com': - inf.keySize = 16; - inf.blockSize = 16; - inf.opensslName = 'aes-128-' + cipher.slice(7, 10); - break; - case 'aes192-cbc': - case 'aes192-ctr': - case 'aes192-gcm@openssh.com': - inf.keySize = 24; - inf.blockSize = 16; - inf.opensslName = 'aes-192-' + cipher.slice(7, 10); - break; - case 'aes256-cbc': - case 'aes256-ctr': - case 'aes256-gcm@openssh.com': - inf.keySize = 32; - inf.blockSize = 16; - inf.opensslName = 'aes-256-' + cipher.slice(7, 10); - break; - default: - throw (new Error( - 'Unsupported openssl cipher "' + cipher + '"')); - } - return (inf); -} - - -/***/ }), - -/***/ 2619: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - DEFAULT_INITIAL_SIZE: (8 * 1024), - DEFAULT_INCREMENT_AMOUNT: (8 * 1024), - DEFAULT_FREQUENCY: 1, - DEFAULT_CHUNK_SIZE: 1024 -}; - - -/***/ }), - -/***/ 18838: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var stream = __nccwpck_require__(12781); -var constants = __nccwpck_require__(2619); -var util = __nccwpck_require__(73837); - -var ReadableStreamBuffer = module.exports = function(opts) { - var that = this; - opts = opts || {}; - - stream.Readable.call(this, opts); - - this.stopped = false; - - var frequency = opts.hasOwnProperty('frequency') ? opts.frequency : constants.DEFAULT_FREQUENCY; - var chunkSize = opts.chunkSize || constants.DEFAULT_CHUNK_SIZE; - var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE; - var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT; - - var size = 0; - var buffer = new Buffer(initialSize); - var allowPush = false; - - var sendData = function() { - var amount = Math.min(chunkSize, size); - var sendMore = false; - - if (amount > 0) { - var chunk = null; - chunk = new Buffer(amount); - buffer.copy(chunk, 0, 0, amount); - - sendMore = that.push(chunk) !== false; - allowPush = sendMore; - - buffer.copy(buffer, 0, amount, size); - size -= amount; - } - - if(size === 0 && that.stopped) { - that.push(null); - } - - if (sendMore) { - sendData.timeout = setTimeout(sendData, frequency); - } - else { - sendData.timeout = null; - } - }; - - this.stop = function() { - if (this.stopped) { - throw new Error('stop() called on already stopped ReadableStreamBuffer'); - } - this.stopped = true; - - if (size === 0) { - this.push(null); - } - }; - - this.size = function() { - return size; - }; - - this.maxSize = function() { - return buffer.length; - }; - - var increaseBufferIfNecessary = function(incomingDataSize) { - if((buffer.length - size) < incomingDataSize) { - var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount); - - var newBuffer = new Buffer(buffer.length + (incrementAmount * factor)); - buffer.copy(newBuffer, 0, 0, size); - buffer = newBuffer; - } - }; - - var kickSendDataTask = function () { - if (!sendData.timeout && allowPush) { - sendData.timeout = setTimeout(sendData, frequency); - } - } - - this.put = function(data, encoding) { - if (that.stopped) { - throw new Error('Tried to write data to a stopped ReadableStreamBuffer'); - } - - if(Buffer.isBuffer(data)) { - increaseBufferIfNecessary(data.length); - data.copy(buffer, size, 0); - size += data.length; - } - else { - data = data + ''; - var dataSizeInBytes = Buffer.byteLength(data); - increaseBufferIfNecessary(dataSizeInBytes); - buffer.write(data, size, encoding || 'utf8'); - size += dataSizeInBytes; - } - - kickSendDataTask(); - }; - - this._read = function() { - allowPush = true; - kickSendDataTask(); - }; -}; - -util.inherits(ReadableStreamBuffer, stream.Readable); - - -/***/ }), - -/***/ 48168: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = __nccwpck_require__(2619); -module.exports.ReadableStreamBuffer = __nccwpck_require__(18838); -module.exports.WritableStreamBuffer = __nccwpck_require__(86055); - - -/***/ }), - -/***/ 86055: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var util = __nccwpck_require__(73837); -var stream = __nccwpck_require__(12781); -var constants = __nccwpck_require__(2619); - -var WritableStreamBuffer = module.exports = function(opts) { - opts = opts || {}; - opts.decodeStrings = true; - - stream.Writable.call(this, opts); - - var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE; - var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT; - - var buffer = new Buffer(initialSize); - var size = 0; - - this.size = function() { - return size; - }; - - this.maxSize = function() { - return buffer.length; - }; - - this.getContents = function(length) { - if(!size) return false; - - var data = new Buffer(Math.min(length || size, size)); - buffer.copy(data, 0, 0, data.length); - - if(data.length < size) - buffer.copy(buffer, 0, data.length); - - size -= data.length; - - return data; - }; - - this.getContentsAsString = function(encoding, length) { - if(!size) return false; - - var data = buffer.toString(encoding || 'utf8', 0, Math.min(length || size, size)); - var dataLength = Buffer.byteLength(data); - - if(dataLength < size) - buffer.copy(buffer, 0, dataLength); - - size -= dataLength; - return data; - }; - - var increaseBufferIfNecessary = function(incomingDataSize) { - if((buffer.length - size) < incomingDataSize) { - var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount); - - var newBuffer = new Buffer(buffer.length + (incrementAmount * factor)); - buffer.copy(newBuffer, 0, 0, size); - buffer = newBuffer; - } - }; - - this._write = function(chunk, encoding, callback) { - increaseBufferIfNecessary(chunk.length); - chunk.copy(buffer, size, 0); - size += chunk.length; - callback(); - }; -}; - -util.inherits(WritableStreamBuffer, stream.Writable); - - -/***/ }), - -/***/ 4351: -/***/ ((module) => { - -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __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; -(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.push(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.push(_); - 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); - }; - - 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); -}); - - -/***/ }), - -/***/ 11137: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(41808) - , tls = __nccwpck_require__(24404) - , http = __nccwpck_require__(13685) - , https = __nccwpck_require__(95687) - , events = __nccwpck_require__(82361) - , assert = __nccwpck_require__(39491) - , util = __nccwpck_require__(73837) - , Buffer = (__nccwpck_require__(21867).Buffer) - ; - -exports.httpOverHttp = httpOverHttp -exports.httpsOverHttp = httpsOverHttp -exports.httpOverHttps = httpOverHttps -exports.httpsOverHttps = httpsOverHttps - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - return agent -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - agent.createSocket = createSecureSocket - agent.defaultPort = 443 - return agent -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - return agent -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - agent.createSocket = createSecureSocket - agent.defaultPort = 443 - return agent -} - - -function TunnelingAgent(options) { - var self = this - self.options = options || {} - self.proxyOptions = self.options.proxy || {} - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets - self.requests = [] - self.sockets = [] - - self.on('free', function onFree(socket, host, port) { - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i] - if (pending.host === host && pending.port === port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1) - pending.request.onSocket(socket) - return - } - } - socket.destroy() - self.removeSocket(socket) - }) -} -util.inherits(TunnelingAgent, events.EventEmitter) - -TunnelingAgent.prototype.addRequest = function addRequest(req, options) { - var self = this - - // Legacy API: addRequest(req, host, port, path) - if (typeof options === 'string') { - options = { - host: options, - port: arguments[2], - path: arguments[3] - }; - } - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push({host: options.host, port: options.port, request: req}) - return - } - - // If we are under maxSockets create a new one. - self.createConnection({host: options.host, port: options.port, request: req}) -} - -TunnelingAgent.prototype.createConnection = function createConnection(pending) { - var self = this - - self.createSocket(pending, function(socket) { - socket.on('free', onFree) - socket.on('close', onCloseOrRemove) - socket.on('agentRemove', onCloseOrRemove) - pending.request.onSocket(socket) - - function onFree() { - self.emit('free', socket, pending.host, pending.port) - } - - function onCloseOrRemove(err) { - self.removeSocket(socket) - socket.removeListener('free', onFree) - socket.removeListener('close', onCloseOrRemove) - socket.removeListener('agentRemove', onCloseOrRemove) - } - }) -} - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this - var placeholder = {} - self.sockets.push(placeholder) - - var connectOptions = mergeOptions({}, self.proxyOptions, - { method: 'CONNECT' - , path: options.host + ':' + options.port - , agent: false - } - ) - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {} - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - Buffer.from(connectOptions.proxyAuth).toString('base64') - } - - debug('making CONNECT request') - var connectReq = self.request(connectOptions) - connectReq.useChunkedEncodingByDefault = false // for v0.6 - connectReq.once('response', onResponse) // for v0.6 - connectReq.once('upgrade', onUpgrade) // for v0.6 - connectReq.once('connect', onConnect) // for v0.7 or later - connectReq.once('error', onError) - connectReq.end() - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head) - }) - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners() - socket.removeAllListeners() - - if (res.statusCode === 200) { - assert.equal(head.length, 0) - debug('tunneling connection has established') - self.sockets[self.sockets.indexOf(placeholder)] = socket - cb(socket) - } else { - debug('tunneling socket could not be established, statusCode=%d', res.statusCode) - var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } - } - - function onError(cause) { - connectReq.removeAllListeners() - - debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) - var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } -} - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) return - - this.sockets.splice(pos, 1) - - var pending = this.requests.shift() - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createConnection(pending) - } -} - -function createSecureSocket(options, cb) { - var self = this - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, mergeOptions({}, self.options, - { servername: options.host - , socket: socket - } - )) - self.sockets[self.sockets.indexOf(socket)] = secureSocket - cb(secureSocket) - }) -} - - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i] - if (typeof overrides === 'object') { - var keys = Object.keys(overrides) - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j] - if (overrides[k] !== undefined) { - target[k] = overrides[k] - } - } - } - } - return target -} - - -var debug -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments) - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0] - } else { - args.unshift('TUNNEL:') - } - console.error.apply(console, args) - } -} else { - debug = function() {} -} -exports.debug = debug // for test - - -/***/ }), - -/***/ 74294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(54219); - - -/***/ }), - -/***/ 54219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(41808); -var tls = __nccwpck_require__(24404); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var events = __nccwpck_require__(82361); -var assert = __nccwpck_require__(39491); -var util = __nccwpck_require__(73837); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 68729: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -(function(nacl) { -'use strict'; - -// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. -// Public domain. -// -// Implementation derived from TweetNaCl version 20140427. -// See for details: http://tweetnacl.cr.yp.to/ - -var gf = function(init) { - var i, r = new Float64Array(16); - if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; - return r; -}; - -// Pluggable, initialized in high-level API below. -var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; - -var _0 = new Uint8Array(16); -var _9 = new Uint8Array(32); _9[0] = 9; - -var gf0 = gf(), - gf1 = gf([1]), - _121665 = gf([0xdb41, 1]), - D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), - D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), - X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), - Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), - I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); - -function ts64(x, i, h, l) { - x[i] = (h >> 24) & 0xff; - x[i+1] = (h >> 16) & 0xff; - x[i+2] = (h >> 8) & 0xff; - x[i+3] = h & 0xff; - x[i+4] = (l >> 24) & 0xff; - x[i+5] = (l >> 16) & 0xff; - x[i+6] = (l >> 8) & 0xff; - x[i+7] = l & 0xff; -} - -function vn(x, xi, y, yi, n) { - var i,d = 0; - for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; - return (1 & ((d - 1) >>> 8)) - 1; -} - -function crypto_verify_16(x, xi, y, yi) { - return vn(x,xi,y,yi,16); -} - -function crypto_verify_32(x, xi, y, yi) { - return vn(x,xi,y,yi,32); -} - -function core_salsa20(o, p, k, c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - x0 = x0 + j0 | 0; - x1 = x1 + j1 | 0; - x2 = x2 + j2 | 0; - x3 = x3 + j3 | 0; - x4 = x4 + j4 | 0; - x5 = x5 + j5 | 0; - x6 = x6 + j6 | 0; - x7 = x7 + j7 | 0; - x8 = x8 + j8 | 0; - x9 = x9 + j9 | 0; - x10 = x10 + j10 | 0; - x11 = x11 + j11 | 0; - x12 = x12 + j12 | 0; - x13 = x13 + j13 | 0; - x14 = x14 + j14 | 0; - x15 = x15 + j15 | 0; - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x1 >>> 0 & 0xff; - o[ 5] = x1 >>> 8 & 0xff; - o[ 6] = x1 >>> 16 & 0xff; - o[ 7] = x1 >>> 24 & 0xff; - - o[ 8] = x2 >>> 0 & 0xff; - o[ 9] = x2 >>> 8 & 0xff; - o[10] = x2 >>> 16 & 0xff; - o[11] = x2 >>> 24 & 0xff; - - o[12] = x3 >>> 0 & 0xff; - o[13] = x3 >>> 8 & 0xff; - o[14] = x3 >>> 16 & 0xff; - o[15] = x3 >>> 24 & 0xff; - - o[16] = x4 >>> 0 & 0xff; - o[17] = x4 >>> 8 & 0xff; - o[18] = x4 >>> 16 & 0xff; - o[19] = x4 >>> 24 & 0xff; - - o[20] = x5 >>> 0 & 0xff; - o[21] = x5 >>> 8 & 0xff; - o[22] = x5 >>> 16 & 0xff; - o[23] = x5 >>> 24 & 0xff; - - o[24] = x6 >>> 0 & 0xff; - o[25] = x6 >>> 8 & 0xff; - o[26] = x6 >>> 16 & 0xff; - o[27] = x6 >>> 24 & 0xff; - - o[28] = x7 >>> 0 & 0xff; - o[29] = x7 >>> 8 & 0xff; - o[30] = x7 >>> 16 & 0xff; - o[31] = x7 >>> 24 & 0xff; - - o[32] = x8 >>> 0 & 0xff; - o[33] = x8 >>> 8 & 0xff; - o[34] = x8 >>> 16 & 0xff; - o[35] = x8 >>> 24 & 0xff; - - o[36] = x9 >>> 0 & 0xff; - o[37] = x9 >>> 8 & 0xff; - o[38] = x9 >>> 16 & 0xff; - o[39] = x9 >>> 24 & 0xff; - - o[40] = x10 >>> 0 & 0xff; - o[41] = x10 >>> 8 & 0xff; - o[42] = x10 >>> 16 & 0xff; - o[43] = x10 >>> 24 & 0xff; - - o[44] = x11 >>> 0 & 0xff; - o[45] = x11 >>> 8 & 0xff; - o[46] = x11 >>> 16 & 0xff; - o[47] = x11 >>> 24 & 0xff; - - o[48] = x12 >>> 0 & 0xff; - o[49] = x12 >>> 8 & 0xff; - o[50] = x12 >>> 16 & 0xff; - o[51] = x12 >>> 24 & 0xff; - - o[52] = x13 >>> 0 & 0xff; - o[53] = x13 >>> 8 & 0xff; - o[54] = x13 >>> 16 & 0xff; - o[55] = x13 >>> 24 & 0xff; - - o[56] = x14 >>> 0 & 0xff; - o[57] = x14 >>> 8 & 0xff; - o[58] = x14 >>> 16 & 0xff; - o[59] = x14 >>> 24 & 0xff; - - o[60] = x15 >>> 0 & 0xff; - o[61] = x15 >>> 8 & 0xff; - o[62] = x15 >>> 16 & 0xff; - o[63] = x15 >>> 24 & 0xff; -} - -function core_hsalsa20(o,p,k,c) { - var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, - j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, - j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, - j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, - j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, - j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, - j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, - j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, - j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, - j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, - j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, - j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, - j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, - j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, - j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, - j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; - - var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, - x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, - x15 = j15, u; - - for (var i = 0; i < 20; i += 2) { - u = x0 + x12 | 0; - x4 ^= u<<7 | u>>>(32-7); - u = x4 + x0 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x4 | 0; - x12 ^= u<<13 | u>>>(32-13); - u = x12 + x8 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x1 | 0; - x9 ^= u<<7 | u>>>(32-7); - u = x9 + x5 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x9 | 0; - x1 ^= u<<13 | u>>>(32-13); - u = x1 + x13 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x6 | 0; - x14 ^= u<<7 | u>>>(32-7); - u = x14 + x10 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x14 | 0; - x6 ^= u<<13 | u>>>(32-13); - u = x6 + x2 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x11 | 0; - x3 ^= u<<7 | u>>>(32-7); - u = x3 + x15 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x3 | 0; - x11 ^= u<<13 | u>>>(32-13); - u = x11 + x7 | 0; - x15 ^= u<<18 | u>>>(32-18); - - u = x0 + x3 | 0; - x1 ^= u<<7 | u>>>(32-7); - u = x1 + x0 | 0; - x2 ^= u<<9 | u>>>(32-9); - u = x2 + x1 | 0; - x3 ^= u<<13 | u>>>(32-13); - u = x3 + x2 | 0; - x0 ^= u<<18 | u>>>(32-18); - - u = x5 + x4 | 0; - x6 ^= u<<7 | u>>>(32-7); - u = x6 + x5 | 0; - x7 ^= u<<9 | u>>>(32-9); - u = x7 + x6 | 0; - x4 ^= u<<13 | u>>>(32-13); - u = x4 + x7 | 0; - x5 ^= u<<18 | u>>>(32-18); - - u = x10 + x9 | 0; - x11 ^= u<<7 | u>>>(32-7); - u = x11 + x10 | 0; - x8 ^= u<<9 | u>>>(32-9); - u = x8 + x11 | 0; - x9 ^= u<<13 | u>>>(32-13); - u = x9 + x8 | 0; - x10 ^= u<<18 | u>>>(32-18); - - u = x15 + x14 | 0; - x12 ^= u<<7 | u>>>(32-7); - u = x12 + x15 | 0; - x13 ^= u<<9 | u>>>(32-9); - u = x13 + x12 | 0; - x14 ^= u<<13 | u>>>(32-13); - u = x14 + x13 | 0; - x15 ^= u<<18 | u>>>(32-18); - } - - o[ 0] = x0 >>> 0 & 0xff; - o[ 1] = x0 >>> 8 & 0xff; - o[ 2] = x0 >>> 16 & 0xff; - o[ 3] = x0 >>> 24 & 0xff; - - o[ 4] = x5 >>> 0 & 0xff; - o[ 5] = x5 >>> 8 & 0xff; - o[ 6] = x5 >>> 16 & 0xff; - o[ 7] = x5 >>> 24 & 0xff; - - o[ 8] = x10 >>> 0 & 0xff; - o[ 9] = x10 >>> 8 & 0xff; - o[10] = x10 >>> 16 & 0xff; - o[11] = x10 >>> 24 & 0xff; - - o[12] = x15 >>> 0 & 0xff; - o[13] = x15 >>> 8 & 0xff; - o[14] = x15 >>> 16 & 0xff; - o[15] = x15 >>> 24 & 0xff; - - o[16] = x6 >>> 0 & 0xff; - o[17] = x6 >>> 8 & 0xff; - o[18] = x6 >>> 16 & 0xff; - o[19] = x6 >>> 24 & 0xff; - - o[20] = x7 >>> 0 & 0xff; - o[21] = x7 >>> 8 & 0xff; - o[22] = x7 >>> 16 & 0xff; - o[23] = x7 >>> 24 & 0xff; - - o[24] = x8 >>> 0 & 0xff; - o[25] = x8 >>> 8 & 0xff; - o[26] = x8 >>> 16 & 0xff; - o[27] = x8 >>> 24 & 0xff; - - o[28] = x9 >>> 0 & 0xff; - o[29] = x9 >>> 8 & 0xff; - o[30] = x9 >>> 16 & 0xff; - o[31] = x9 >>> 24 & 0xff; -} - -function crypto_core_salsa20(out,inp,k,c) { - core_salsa20(out,inp,k,c); -} - -function crypto_core_hsalsa20(out,inp,k,c) { - core_hsalsa20(out,inp,k,c); -} - -var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - // "expand 32-byte k" - -function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - mpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; - } - return 0; -} - -function crypto_stream_salsa20(c,cpos,b,n,k) { - var z = new Uint8Array(16), x = new Uint8Array(64); - var u, i; - for (i = 0; i < 16; i++) z[i] = 0; - for (i = 0; i < 8; i++) z[i] = n[i]; - while (b >= 64) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < 64; i++) c[cpos+i] = x[i]; - u = 1; - for (i = 8; i < 16; i++) { - u = u + (z[i] & 0xff) | 0; - z[i] = u & 0xff; - u >>>= 8; - } - b -= 64; - cpos += 64; - } - if (b > 0) { - crypto_core_salsa20(x,z,k,sigma); - for (i = 0; i < b; i++) c[cpos+i] = x[i]; - } - return 0; -} - -function crypto_stream(c,cpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20(c,cpos,d,sn,s); -} - -function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { - var s = new Uint8Array(32); - crypto_core_hsalsa20(s,n,k,sigma); - var sn = new Uint8Array(8); - for (var i = 0; i < 8; i++) sn[i] = n[i+16]; - return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); -} - -/* -* Port of Andrew Moon's Poly1305-donna-16. Public domain. -* https://github.com/floodyberry/poly1305-donna -*/ - -var poly1305 = function(key) { - this.buffer = new Uint8Array(16); - this.r = new Uint16Array(10); - this.h = new Uint16Array(10); - this.pad = new Uint16Array(8); - this.leftover = 0; - this.fin = 0; - - var t0, t1, t2, t3, t4, t5, t6, t7; - - t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; - t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; - t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; - this.r[5] = ((t4 >>> 1)) & 0x1ffe; - t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; - t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - this.r[9] = ((t7 >>> 5)) & 0x007f; - - this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; - this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; - this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; - this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; - this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; - this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; - this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; - this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; -}; - -poly1305.prototype.blocks = function(m, mpos, bytes) { - var hibit = this.fin ? 0 : (1 << 11); - var t0, t1, t2, t3, t4, t5, t6, t7, c; - var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; - - var h0 = this.h[0], - h1 = this.h[1], - h2 = this.h[2], - h3 = this.h[3], - h4 = this.h[4], - h5 = this.h[5], - h6 = this.h[6], - h7 = this.h[7], - h8 = this.h[8], - h9 = this.h[9]; - - var r0 = this.r[0], - r1 = this.r[1], - r2 = this.r[2], - r3 = this.r[3], - r4 = this.r[4], - r5 = this.r[5], - r6 = this.r[6], - r7 = this.r[7], - r8 = this.r[8], - r9 = this.r[9]; - - while (bytes >= 16) { - t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; - t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; - t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; - t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; - t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; - h5 += ((t4 >>> 1)) & 0x1fff; - t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; - t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; - t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; - h9 += ((t7 >>> 5)) | hibit; - - c = 0; - - d0 = c; - d0 += h0 * r0; - d0 += h1 * (5 * r9); - d0 += h2 * (5 * r8); - d0 += h3 * (5 * r7); - d0 += h4 * (5 * r6); - c = (d0 >>> 13); d0 &= 0x1fff; - d0 += h5 * (5 * r5); - d0 += h6 * (5 * r4); - d0 += h7 * (5 * r3); - d0 += h8 * (5 * r2); - d0 += h9 * (5 * r1); - c += (d0 >>> 13); d0 &= 0x1fff; - - d1 = c; - d1 += h0 * r1; - d1 += h1 * r0; - d1 += h2 * (5 * r9); - d1 += h3 * (5 * r8); - d1 += h4 * (5 * r7); - c = (d1 >>> 13); d1 &= 0x1fff; - d1 += h5 * (5 * r6); - d1 += h6 * (5 * r5); - d1 += h7 * (5 * r4); - d1 += h8 * (5 * r3); - d1 += h9 * (5 * r2); - c += (d1 >>> 13); d1 &= 0x1fff; - - d2 = c; - d2 += h0 * r2; - d2 += h1 * r1; - d2 += h2 * r0; - d2 += h3 * (5 * r9); - d2 += h4 * (5 * r8); - c = (d2 >>> 13); d2 &= 0x1fff; - d2 += h5 * (5 * r7); - d2 += h6 * (5 * r6); - d2 += h7 * (5 * r5); - d2 += h8 * (5 * r4); - d2 += h9 * (5 * r3); - c += (d2 >>> 13); d2 &= 0x1fff; - - d3 = c; - d3 += h0 * r3; - d3 += h1 * r2; - d3 += h2 * r1; - d3 += h3 * r0; - d3 += h4 * (5 * r9); - c = (d3 >>> 13); d3 &= 0x1fff; - d3 += h5 * (5 * r8); - d3 += h6 * (5 * r7); - d3 += h7 * (5 * r6); - d3 += h8 * (5 * r5); - d3 += h9 * (5 * r4); - c += (d3 >>> 13); d3 &= 0x1fff; - - d4 = c; - d4 += h0 * r4; - d4 += h1 * r3; - d4 += h2 * r2; - d4 += h3 * r1; - d4 += h4 * r0; - c = (d4 >>> 13); d4 &= 0x1fff; - d4 += h5 * (5 * r9); - d4 += h6 * (5 * r8); - d4 += h7 * (5 * r7); - d4 += h8 * (5 * r6); - d4 += h9 * (5 * r5); - c += (d4 >>> 13); d4 &= 0x1fff; - - d5 = c; - d5 += h0 * r5; - d5 += h1 * r4; - d5 += h2 * r3; - d5 += h3 * r2; - d5 += h4 * r1; - c = (d5 >>> 13); d5 &= 0x1fff; - d5 += h5 * r0; - d5 += h6 * (5 * r9); - d5 += h7 * (5 * r8); - d5 += h8 * (5 * r7); - d5 += h9 * (5 * r6); - c += (d5 >>> 13); d5 &= 0x1fff; - - d6 = c; - d6 += h0 * r6; - d6 += h1 * r5; - d6 += h2 * r4; - d6 += h3 * r3; - d6 += h4 * r2; - c = (d6 >>> 13); d6 &= 0x1fff; - d6 += h5 * r1; - d6 += h6 * r0; - d6 += h7 * (5 * r9); - d6 += h8 * (5 * r8); - d6 += h9 * (5 * r7); - c += (d6 >>> 13); d6 &= 0x1fff; - - d7 = c; - d7 += h0 * r7; - d7 += h1 * r6; - d7 += h2 * r5; - d7 += h3 * r4; - d7 += h4 * r3; - c = (d7 >>> 13); d7 &= 0x1fff; - d7 += h5 * r2; - d7 += h6 * r1; - d7 += h7 * r0; - d7 += h8 * (5 * r9); - d7 += h9 * (5 * r8); - c += (d7 >>> 13); d7 &= 0x1fff; - - d8 = c; - d8 += h0 * r8; - d8 += h1 * r7; - d8 += h2 * r6; - d8 += h3 * r5; - d8 += h4 * r4; - c = (d8 >>> 13); d8 &= 0x1fff; - d8 += h5 * r3; - d8 += h6 * r2; - d8 += h7 * r1; - d8 += h8 * r0; - d8 += h9 * (5 * r9); - c += (d8 >>> 13); d8 &= 0x1fff; - - d9 = c; - d9 += h0 * r9; - d9 += h1 * r8; - d9 += h2 * r7; - d9 += h3 * r6; - d9 += h4 * r5; - c = (d9 >>> 13); d9 &= 0x1fff; - d9 += h5 * r4; - d9 += h6 * r3; - d9 += h7 * r2; - d9 += h8 * r1; - d9 += h9 * r0; - c += (d9 >>> 13); d9 &= 0x1fff; - - c = (((c << 2) + c)) | 0; - c = (c + d0) | 0; - d0 = c & 0x1fff; - c = (c >>> 13); - d1 += c; - - h0 = d0; - h1 = d1; - h2 = d2; - h3 = d3; - h4 = d4; - h5 = d5; - h6 = d6; - h7 = d7; - h8 = d8; - h9 = d9; - - mpos += 16; - bytes -= 16; - } - this.h[0] = h0; - this.h[1] = h1; - this.h[2] = h2; - this.h[3] = h3; - this.h[4] = h4; - this.h[5] = h5; - this.h[6] = h6; - this.h[7] = h7; - this.h[8] = h8; - this.h[9] = h9; -}; - -poly1305.prototype.finish = function(mac, macpos) { - var g = new Uint16Array(10); - var c, mask, f, i; - - if (this.leftover) { - i = this.leftover; - this.buffer[i++] = 1; - for (; i < 16; i++) this.buffer[i] = 0; - this.fin = 1; - this.blocks(this.buffer, 0, 16); - } - - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - for (i = 2; i < 10; i++) { - this.h[i] += c; - c = this.h[i] >>> 13; - this.h[i] &= 0x1fff; - } - this.h[0] += (c * 5); - c = this.h[0] >>> 13; - this.h[0] &= 0x1fff; - this.h[1] += c; - c = this.h[1] >>> 13; - this.h[1] &= 0x1fff; - this.h[2] += c; - - g[0] = this.h[0] + 5; - c = g[0] >>> 13; - g[0] &= 0x1fff; - for (i = 1; i < 10; i++) { - g[i] = this.h[i] + c; - c = g[i] >>> 13; - g[i] &= 0x1fff; - } - g[9] -= (1 << 13); - - mask = (c ^ 1) - 1; - for (i = 0; i < 10; i++) g[i] &= mask; - mask = ~mask; - for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; - - this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; - this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; - this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; - this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; - this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; - this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; - this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; - this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; - - f = this.h[0] + this.pad[0]; - this.h[0] = f & 0xffff; - for (i = 1; i < 8; i++) { - f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; - this.h[i] = f & 0xffff; - } - - mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; - mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; - mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; - mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; - mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; - mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; - mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; - mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; - mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; - mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; - mac[macpos+10] = (this.h[5] >>> 0) & 0xff; - mac[macpos+11] = (this.h[5] >>> 8) & 0xff; - mac[macpos+12] = (this.h[6] >>> 0) & 0xff; - mac[macpos+13] = (this.h[6] >>> 8) & 0xff; - mac[macpos+14] = (this.h[7] >>> 0) & 0xff; - mac[macpos+15] = (this.h[7] >>> 8) & 0xff; -}; - -poly1305.prototype.update = function(m, mpos, bytes) { - var i, want; - - if (this.leftover) { - want = (16 - this.leftover); - if (want > bytes) - want = bytes; - for (i = 0; i < want; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - bytes -= want; - mpos += want; - this.leftover += want; - if (this.leftover < 16) - return; - this.blocks(this.buffer, 0, 16); - this.leftover = 0; - } - - if (bytes >= 16) { - want = bytes - (bytes % 16); - this.blocks(m, mpos, want); - mpos += want; - bytes -= want; - } - - if (bytes) { - for (i = 0; i < bytes; i++) - this.buffer[this.leftover + i] = m[mpos+i]; - this.leftover += bytes; - } -}; - -function crypto_onetimeauth(out, outpos, m, mpos, n, k) { - var s = new poly1305(k); - s.update(m, mpos, n); - s.finish(out, outpos); - return 0; -} - -function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { - var x = new Uint8Array(16); - crypto_onetimeauth(x,0,m,mpos,n,k); - return crypto_verify_16(h,hpos,x,0); -} - -function crypto_secretbox(c,m,d,n,k) { - var i; - if (d < 32) return -1; - crypto_stream_xor(c,0,m,0,d,n,k); - crypto_onetimeauth(c, 16, c, 32, d - 32, c); - for (i = 0; i < 16; i++) c[i] = 0; - return 0; -} - -function crypto_secretbox_open(m,c,d,n,k) { - var i; - var x = new Uint8Array(32); - if (d < 32) return -1; - crypto_stream(x,0,32,n,k); - if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; - crypto_stream_xor(m,0,c,0,d,n,k); - for (i = 0; i < 32; i++) m[i] = 0; - return 0; -} - -function set25519(r, a) { - var i; - for (i = 0; i < 16; i++) r[i] = a[i]|0; -} - -function car25519(o) { - var i, v, c = 1; - for (i = 0; i < 16; i++) { - v = o[i] + c + 65535; - c = Math.floor(v / 65536); - o[i] = v - c * 65536; - } - o[0] += c-1 + 37 * (c-1); -} - -function sel25519(p, q, b) { - var t, c = ~(b-1); - for (var i = 0; i < 16; i++) { - t = c & (p[i] ^ q[i]); - p[i] ^= t; - q[i] ^= t; - } -} - -function pack25519(o, n) { - var i, j, b; - var m = gf(), t = gf(); - for (i = 0; i < 16; i++) t[i] = n[i]; - car25519(t); - car25519(t); - car25519(t); - for (j = 0; j < 2; j++) { - m[0] = t[0] - 0xffed; - for (i = 1; i < 15; i++) { - m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); - m[i-1] &= 0xffff; - } - m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); - b = (m[15]>>16) & 1; - m[14] &= 0xffff; - sel25519(t, m, 1-b); - } - for (i = 0; i < 16; i++) { - o[2*i] = t[i] & 0xff; - o[2*i+1] = t[i]>>8; - } -} - -function neq25519(a, b) { - var c = new Uint8Array(32), d = new Uint8Array(32); - pack25519(c, a); - pack25519(d, b); - return crypto_verify_32(c, 0, d, 0); -} - -function par25519(a) { - var d = new Uint8Array(32); - pack25519(d, a); - return d[0] & 1; -} - -function unpack25519(o, n) { - var i; - for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); - o[15] &= 0x7fff; -} - -function A(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; -} - -function Z(o, a, b) { - for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; -} - -function M(o, a, b) { - var v, c, - t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, - t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, - t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, - t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, - b0 = b[0], - b1 = b[1], - b2 = b[2], - b3 = b[3], - b4 = b[4], - b5 = b[5], - b6 = b[6], - b7 = b[7], - b8 = b[8], - b9 = b[9], - b10 = b[10], - b11 = b[11], - b12 = b[12], - b13 = b[13], - b14 = b[14], - b15 = b[15]; - - v = a[0]; - t0 += v * b0; - t1 += v * b1; - t2 += v * b2; - t3 += v * b3; - t4 += v * b4; - t5 += v * b5; - t6 += v * b6; - t7 += v * b7; - t8 += v * b8; - t9 += v * b9; - t10 += v * b10; - t11 += v * b11; - t12 += v * b12; - t13 += v * b13; - t14 += v * b14; - t15 += v * b15; - v = a[1]; - t1 += v * b0; - t2 += v * b1; - t3 += v * b2; - t4 += v * b3; - t5 += v * b4; - t6 += v * b5; - t7 += v * b6; - t8 += v * b7; - t9 += v * b8; - t10 += v * b9; - t11 += v * b10; - t12 += v * b11; - t13 += v * b12; - t14 += v * b13; - t15 += v * b14; - t16 += v * b15; - v = a[2]; - t2 += v * b0; - t3 += v * b1; - t4 += v * b2; - t5 += v * b3; - t6 += v * b4; - t7 += v * b5; - t8 += v * b6; - t9 += v * b7; - t10 += v * b8; - t11 += v * b9; - t12 += v * b10; - t13 += v * b11; - t14 += v * b12; - t15 += v * b13; - t16 += v * b14; - t17 += v * b15; - v = a[3]; - t3 += v * b0; - t4 += v * b1; - t5 += v * b2; - t6 += v * b3; - t7 += v * b4; - t8 += v * b5; - t9 += v * b6; - t10 += v * b7; - t11 += v * b8; - t12 += v * b9; - t13 += v * b10; - t14 += v * b11; - t15 += v * b12; - t16 += v * b13; - t17 += v * b14; - t18 += v * b15; - v = a[4]; - t4 += v * b0; - t5 += v * b1; - t6 += v * b2; - t7 += v * b3; - t8 += v * b4; - t9 += v * b5; - t10 += v * b6; - t11 += v * b7; - t12 += v * b8; - t13 += v * b9; - t14 += v * b10; - t15 += v * b11; - t16 += v * b12; - t17 += v * b13; - t18 += v * b14; - t19 += v * b15; - v = a[5]; - t5 += v * b0; - t6 += v * b1; - t7 += v * b2; - t8 += v * b3; - t9 += v * b4; - t10 += v * b5; - t11 += v * b6; - t12 += v * b7; - t13 += v * b8; - t14 += v * b9; - t15 += v * b10; - t16 += v * b11; - t17 += v * b12; - t18 += v * b13; - t19 += v * b14; - t20 += v * b15; - v = a[6]; - t6 += v * b0; - t7 += v * b1; - t8 += v * b2; - t9 += v * b3; - t10 += v * b4; - t11 += v * b5; - t12 += v * b6; - t13 += v * b7; - t14 += v * b8; - t15 += v * b9; - t16 += v * b10; - t17 += v * b11; - t18 += v * b12; - t19 += v * b13; - t20 += v * b14; - t21 += v * b15; - v = a[7]; - t7 += v * b0; - t8 += v * b1; - t9 += v * b2; - t10 += v * b3; - t11 += v * b4; - t12 += v * b5; - t13 += v * b6; - t14 += v * b7; - t15 += v * b8; - t16 += v * b9; - t17 += v * b10; - t18 += v * b11; - t19 += v * b12; - t20 += v * b13; - t21 += v * b14; - t22 += v * b15; - v = a[8]; - t8 += v * b0; - t9 += v * b1; - t10 += v * b2; - t11 += v * b3; - t12 += v * b4; - t13 += v * b5; - t14 += v * b6; - t15 += v * b7; - t16 += v * b8; - t17 += v * b9; - t18 += v * b10; - t19 += v * b11; - t20 += v * b12; - t21 += v * b13; - t22 += v * b14; - t23 += v * b15; - v = a[9]; - t9 += v * b0; - t10 += v * b1; - t11 += v * b2; - t12 += v * b3; - t13 += v * b4; - t14 += v * b5; - t15 += v * b6; - t16 += v * b7; - t17 += v * b8; - t18 += v * b9; - t19 += v * b10; - t20 += v * b11; - t21 += v * b12; - t22 += v * b13; - t23 += v * b14; - t24 += v * b15; - v = a[10]; - t10 += v * b0; - t11 += v * b1; - t12 += v * b2; - t13 += v * b3; - t14 += v * b4; - t15 += v * b5; - t16 += v * b6; - t17 += v * b7; - t18 += v * b8; - t19 += v * b9; - t20 += v * b10; - t21 += v * b11; - t22 += v * b12; - t23 += v * b13; - t24 += v * b14; - t25 += v * b15; - v = a[11]; - t11 += v * b0; - t12 += v * b1; - t13 += v * b2; - t14 += v * b3; - t15 += v * b4; - t16 += v * b5; - t17 += v * b6; - t18 += v * b7; - t19 += v * b8; - t20 += v * b9; - t21 += v * b10; - t22 += v * b11; - t23 += v * b12; - t24 += v * b13; - t25 += v * b14; - t26 += v * b15; - v = a[12]; - t12 += v * b0; - t13 += v * b1; - t14 += v * b2; - t15 += v * b3; - t16 += v * b4; - t17 += v * b5; - t18 += v * b6; - t19 += v * b7; - t20 += v * b8; - t21 += v * b9; - t22 += v * b10; - t23 += v * b11; - t24 += v * b12; - t25 += v * b13; - t26 += v * b14; - t27 += v * b15; - v = a[13]; - t13 += v * b0; - t14 += v * b1; - t15 += v * b2; - t16 += v * b3; - t17 += v * b4; - t18 += v * b5; - t19 += v * b6; - t20 += v * b7; - t21 += v * b8; - t22 += v * b9; - t23 += v * b10; - t24 += v * b11; - t25 += v * b12; - t26 += v * b13; - t27 += v * b14; - t28 += v * b15; - v = a[14]; - t14 += v * b0; - t15 += v * b1; - t16 += v * b2; - t17 += v * b3; - t18 += v * b4; - t19 += v * b5; - t20 += v * b6; - t21 += v * b7; - t22 += v * b8; - t23 += v * b9; - t24 += v * b10; - t25 += v * b11; - t26 += v * b12; - t27 += v * b13; - t28 += v * b14; - t29 += v * b15; - v = a[15]; - t15 += v * b0; - t16 += v * b1; - t17 += v * b2; - t18 += v * b3; - t19 += v * b4; - t20 += v * b5; - t21 += v * b6; - t22 += v * b7; - t23 += v * b8; - t24 += v * b9; - t25 += v * b10; - t26 += v * b11; - t27 += v * b12; - t28 += v * b13; - t29 += v * b14; - t30 += v * b15; - - t0 += 38 * t16; - t1 += 38 * t17; - t2 += 38 * t18; - t3 += 38 * t19; - t4 += 38 * t20; - t5 += 38 * t21; - t6 += 38 * t22; - t7 += 38 * t23; - t8 += 38 * t24; - t9 += 38 * t25; - t10 += 38 * t26; - t11 += 38 * t27; - t12 += 38 * t28; - t13 += 38 * t29; - t14 += 38 * t30; - // t15 left as is - - // first car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - // second car - c = 1; - v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; - v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; - v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; - v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; - v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; - v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; - v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; - v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; - v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; - v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; - v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; - v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; - v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; - v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; - v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; - v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; - t0 += c-1 + 37 * (c-1); - - o[ 0] = t0; - o[ 1] = t1; - o[ 2] = t2; - o[ 3] = t3; - o[ 4] = t4; - o[ 5] = t5; - o[ 6] = t6; - o[ 7] = t7; - o[ 8] = t8; - o[ 9] = t9; - o[10] = t10; - o[11] = t11; - o[12] = t12; - o[13] = t13; - o[14] = t14; - o[15] = t15; -} - -function S(o, a) { - M(o, a, a); -} - -function inv25519(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 253; a >= 0; a--) { - S(c, c); - if(a !== 2 && a !== 4) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function pow2523(o, i) { - var c = gf(); - var a; - for (a = 0; a < 16; a++) c[a] = i[a]; - for (a = 250; a >= 0; a--) { - S(c, c); - if(a !== 1) M(c, c, i); - } - for (a = 0; a < 16; a++) o[a] = c[a]; -} - -function crypto_scalarmult(q, n, p) { - var z = new Uint8Array(32); - var x = new Float64Array(80), r, i; - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(); - for (i = 0; i < 31; i++) z[i] = n[i]; - z[31]=(n[31]&127)|64; - z[0]&=248; - unpack25519(x,p); - for (i = 0; i < 16; i++) { - b[i]=x[i]; - d[i]=a[i]=c[i]=0; - } - a[0]=d[0]=1; - for (i=254; i>=0; --i) { - r=(z[i>>>3]>>>(i&7))&1; - sel25519(a,b,r); - sel25519(c,d,r); - A(e,a,c); - Z(a,a,c); - A(c,b,d); - Z(b,b,d); - S(d,e); - S(f,a); - M(a,c,a); - M(c,b,e); - A(e,a,c); - Z(a,a,c); - S(b,a); - Z(c,d,f); - M(a,c,_121665); - A(a,a,d); - M(c,c,a); - M(a,d,f); - M(d,b,x); - S(b,e); - sel25519(a,b,r); - sel25519(c,d,r); - } - for (i = 0; i < 16; i++) { - x[i+16]=a[i]; - x[i+32]=c[i]; - x[i+48]=b[i]; - x[i+64]=d[i]; - } - var x32 = x.subarray(32); - var x16 = x.subarray(16); - inv25519(x32,x32); - M(x16,x16,x32); - pack25519(q,x16); - return 0; -} - -function crypto_scalarmult_base(q, n) { - return crypto_scalarmult(q, n, _9); -} - -function crypto_box_keypair(y, x) { - randombytes(x, 32); - return crypto_scalarmult_base(y, x); -} - -function crypto_box_beforenm(k, y, x) { - var s = new Uint8Array(32); - crypto_scalarmult(s, x, y); - return crypto_core_hsalsa20(k, _0, s, sigma); -} - -var crypto_box_afternm = crypto_secretbox; -var crypto_box_open_afternm = crypto_secretbox_open; - -function crypto_box(c, m, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_afternm(c, m, d, n, k); -} - -function crypto_box_open(m, c, d, n, y, x) { - var k = new Uint8Array(32); - crypto_box_beforenm(k, y, x); - return crypto_box_open_afternm(m, c, d, n, k); -} - -var K = [ - 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, - 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, - 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, - 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, - 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, - 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, - 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, - 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, - 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, - 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, - 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, - 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, - 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, - 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, - 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, - 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, - 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, - 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, - 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, - 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, - 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, - 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, - 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, - 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, - 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, - 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, - 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, - 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, - 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, - 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, - 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, - 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, - 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, - 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, - 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, - 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, - 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, - 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, - 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, - 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -]; - -function crypto_hashblocks_hl(hh, hl, m, n) { - var wh = new Int32Array(16), wl = new Int32Array(16), - bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, - bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, - th, tl, i, j, h, l, a, b, c, d; - - var ah0 = hh[0], - ah1 = hh[1], - ah2 = hh[2], - ah3 = hh[3], - ah4 = hh[4], - ah5 = hh[5], - ah6 = hh[6], - ah7 = hh[7], - - al0 = hl[0], - al1 = hl[1], - al2 = hl[2], - al3 = hl[3], - al4 = hl[4], - al5 = hl[5], - al6 = hl[6], - al7 = hl[7]; - - var pos = 0; - while (n >= 128) { - for (i = 0; i < 16; i++) { - j = 8 * i + pos; - wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; - wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; - } - for (i = 0; i < 80; i++) { - bh0 = ah0; - bh1 = ah1; - bh2 = ah2; - bh3 = ah3; - bh4 = ah4; - bh5 = ah5; - bh6 = ah6; - bh7 = ah7; - - bl0 = al0; - bl1 = al1; - bl2 = al2; - bl3 = al3; - bl4 = al4; - bl5 = al5; - bl6 = al6; - bl7 = al7; - - // add - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma1 - h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); - l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Ch - h = (ah4 & ah5) ^ (~ah4 & ah6); - l = (al4 & al5) ^ (~al4 & al6); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // K - h = K[i*2]; - l = K[i*2+1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // w - h = wh[i%16]; - l = wl[i%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - th = c & 0xffff | d << 16; - tl = a & 0xffff | b << 16; - - // add - h = th; - l = tl; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - // Sigma0 - h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); - l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // Maj - h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); - l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh7 = (c & 0xffff) | (d << 16); - bl7 = (a & 0xffff) | (b << 16); - - // add - h = bh3; - l = bl3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = th; - l = tl; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - bh3 = (c & 0xffff) | (d << 16); - bl3 = (a & 0xffff) | (b << 16); - - ah1 = bh0; - ah2 = bh1; - ah3 = bh2; - ah4 = bh3; - ah5 = bh4; - ah6 = bh5; - ah7 = bh6; - ah0 = bh7; - - al1 = bl0; - al2 = bl1; - al3 = bl2; - al4 = bl3; - al5 = bl4; - al6 = bl5; - al7 = bl6; - al0 = bl7; - - if (i%16 === 15) { - for (j = 0; j < 16; j++) { - // add - h = wh[j]; - l = wl[j]; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = wh[(j+9)%16]; - l = wl[(j+9)%16]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma0 - th = wh[(j+1)%16]; - tl = wl[(j+1)%16]; - h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); - l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - // sigma1 - th = wh[(j+14)%16]; - tl = wl[(j+14)%16]; - h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); - l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - wh[j] = (c & 0xffff) | (d << 16); - wl[j] = (a & 0xffff) | (b << 16); - } - } - } - - // add - h = ah0; - l = al0; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[0]; - l = hl[0]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[0] = ah0 = (c & 0xffff) | (d << 16); - hl[0] = al0 = (a & 0xffff) | (b << 16); - - h = ah1; - l = al1; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[1]; - l = hl[1]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[1] = ah1 = (c & 0xffff) | (d << 16); - hl[1] = al1 = (a & 0xffff) | (b << 16); - - h = ah2; - l = al2; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[2]; - l = hl[2]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[2] = ah2 = (c & 0xffff) | (d << 16); - hl[2] = al2 = (a & 0xffff) | (b << 16); - - h = ah3; - l = al3; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[3]; - l = hl[3]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[3] = ah3 = (c & 0xffff) | (d << 16); - hl[3] = al3 = (a & 0xffff) | (b << 16); - - h = ah4; - l = al4; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[4]; - l = hl[4]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[4] = ah4 = (c & 0xffff) | (d << 16); - hl[4] = al4 = (a & 0xffff) | (b << 16); - - h = ah5; - l = al5; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[5]; - l = hl[5]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[5] = ah5 = (c & 0xffff) | (d << 16); - hl[5] = al5 = (a & 0xffff) | (b << 16); - - h = ah6; - l = al6; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[6]; - l = hl[6]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[6] = ah6 = (c & 0xffff) | (d << 16); - hl[6] = al6 = (a & 0xffff) | (b << 16); - - h = ah7; - l = al7; - - a = l & 0xffff; b = l >>> 16; - c = h & 0xffff; d = h >>> 16; - - h = hh[7]; - l = hl[7]; - - a += l & 0xffff; b += l >>> 16; - c += h & 0xffff; d += h >>> 16; - - b += a >>> 16; - c += b >>> 16; - d += c >>> 16; - - hh[7] = ah7 = (c & 0xffff) | (d << 16); - hl[7] = al7 = (a & 0xffff) | (b << 16); - - pos += 128; - n -= 128; - } - - return n; -} - -function crypto_hash(out, m, n) { - var hh = new Int32Array(8), - hl = new Int32Array(8), - x = new Uint8Array(256), - i, b = n; - - hh[0] = 0x6a09e667; - hh[1] = 0xbb67ae85; - hh[2] = 0x3c6ef372; - hh[3] = 0xa54ff53a; - hh[4] = 0x510e527f; - hh[5] = 0x9b05688c; - hh[6] = 0x1f83d9ab; - hh[7] = 0x5be0cd19; - - hl[0] = 0xf3bcc908; - hl[1] = 0x84caa73b; - hl[2] = 0xfe94f82b; - hl[3] = 0x5f1d36f1; - hl[4] = 0xade682d1; - hl[5] = 0x2b3e6c1f; - hl[6] = 0xfb41bd6b; - hl[7] = 0x137e2179; - - crypto_hashblocks_hl(hh, hl, m, n); - n %= 128; - - for (i = 0; i < n; i++) x[i] = m[b-n+i]; - x[n] = 128; - - n = 256-128*(n<112?1:0); - x[n-9] = 0; - ts64(x, n-8, (b / 0x20000000) | 0, b << 3); - crypto_hashblocks_hl(hh, hl, x, n); - - for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); - - return 0; -} - -function add(p, q) { - var a = gf(), b = gf(), c = gf(), - d = gf(), e = gf(), f = gf(), - g = gf(), h = gf(), t = gf(); - - Z(a, p[1], p[0]); - Z(t, q[1], q[0]); - M(a, a, t); - A(b, p[0], p[1]); - A(t, q[0], q[1]); - M(b, b, t); - M(c, p[3], q[3]); - M(c, c, D2); - M(d, p[2], q[2]); - A(d, d, d); - Z(e, b, a); - Z(f, d, c); - A(g, d, c); - A(h, b, a); - - M(p[0], e, f); - M(p[1], h, g); - M(p[2], g, f); - M(p[3], e, h); -} - -function cswap(p, q, b) { - var i; - for (i = 0; i < 4; i++) { - sel25519(p[i], q[i], b); - } -} - -function pack(r, p) { - var tx = gf(), ty = gf(), zi = gf(); - inv25519(zi, p[2]); - M(tx, p[0], zi); - M(ty, p[1], zi); - pack25519(r, ty); - r[31] ^= par25519(tx) << 7; -} - -function scalarmult(p, q, s) { - var b, i; - set25519(p[0], gf0); - set25519(p[1], gf1); - set25519(p[2], gf1); - set25519(p[3], gf0); - for (i = 255; i >= 0; --i) { - b = (s[(i/8)|0] >> (i&7)) & 1; - cswap(p, q, b); - add(q, p); - add(p, p); - cswap(p, q, b); - } -} - -function scalarbase(p, s) { - var q = [gf(), gf(), gf(), gf()]; - set25519(q[0], X); - set25519(q[1], Y); - set25519(q[2], gf1); - M(q[3], X, Y); - scalarmult(p, q, s); -} - -function crypto_sign_keypair(pk, sk, seeded) { - var d = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()]; - var i; - - if (!seeded) randombytes(sk, 32); - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - scalarbase(p, d); - pack(pk, p); - - for (i = 0; i < 32; i++) sk[i+32] = pk[i]; - return 0; -} - -var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); - -function modL(r, x) { - var carry, i, j, k; - for (i = 63; i >= 32; --i) { - carry = 0; - for (j = i - 32, k = i - 12; j < k; ++j) { - x[j] += carry - 16 * x[i] * L[j - (i - 32)]; - carry = (x[j] + 128) >> 8; - x[j] -= carry * 256; - } - x[j] += carry; - x[i] = 0; - } - carry = 0; - for (j = 0; j < 32; j++) { - x[j] += carry - (x[31] >> 4) * L[j]; - carry = x[j] >> 8; - x[j] &= 255; - } - for (j = 0; j < 32; j++) x[j] -= carry * L[j]; - for (i = 0; i < 32; i++) { - x[i+1] += x[i] >> 8; - r[i] = x[i] & 255; - } -} - -function reduce(r) { - var x = new Float64Array(64), i; - for (i = 0; i < 64; i++) x[i] = r[i]; - for (i = 0; i < 64; i++) r[i] = 0; - modL(r, x); -} - -// Note: difference from C - smlen returned, not passed as argument. -function crypto_sign(sm, m, n, sk) { - var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); - var i, j, x = new Float64Array(64); - var p = [gf(), gf(), gf(), gf()]; - - crypto_hash(d, sk, 32); - d[0] &= 248; - d[31] &= 127; - d[31] |= 64; - - var smlen = n + 64; - for (i = 0; i < n; i++) sm[64 + i] = m[i]; - for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; - - crypto_hash(r, sm.subarray(32), n+32); - reduce(r); - scalarbase(p, r); - pack(sm, p); - - for (i = 32; i < 64; i++) sm[i] = sk[i]; - crypto_hash(h, sm, n + 64); - reduce(h); - - for (i = 0; i < 64; i++) x[i] = 0; - for (i = 0; i < 32; i++) x[i] = r[i]; - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - x[i+j] += h[i] * d[j]; - } - } - - modL(sm.subarray(32), x); - return smlen; -} - -function unpackneg(r, p) { - var t = gf(), chk = gf(), num = gf(), - den = gf(), den2 = gf(), den4 = gf(), - den6 = gf(); - - set25519(r[2], gf1); - unpack25519(r[1], p); - S(num, r[1]); - M(den, num, D); - Z(num, num, r[2]); - A(den, r[2], den); - - S(den2, den); - S(den4, den2); - M(den6, den4, den2); - M(t, den6, num); - M(t, t, den); - - pow2523(t, t); - M(t, t, num); - M(t, t, den); - M(t, t, den); - M(r[0], t, den); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) M(r[0], r[0], I); - - S(chk, r[0]); - M(chk, chk, den); - if (neq25519(chk, num)) return -1; - - if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); - - M(r[3], r[0], r[1]); - return 0; -} - -function crypto_sign_open(m, sm, n, pk) { - var i, mlen; - var t = new Uint8Array(32), h = new Uint8Array(64); - var p = [gf(), gf(), gf(), gf()], - q = [gf(), gf(), gf(), gf()]; - - mlen = -1; - if (n < 64) return -1; - - if (unpackneg(q, pk)) return -1; - - for (i = 0; i < n; i++) m[i] = sm[i]; - for (i = 0; i < 32; i++) m[i+32] = pk[i]; - crypto_hash(h, m, n); - reduce(h); - scalarmult(p, q, h); - - scalarbase(q, sm.subarray(32)); - add(p, q); - pack(t, p); - - n -= 64; - if (crypto_verify_32(sm, 0, t, 0)) { - for (i = 0; i < n; i++) m[i] = 0; - return -1; - } - - for (i = 0; i < n; i++) m[i] = sm[i + 64]; - mlen = n; - return mlen; -} - -var crypto_secretbox_KEYBYTES = 32, - crypto_secretbox_NONCEBYTES = 24, - crypto_secretbox_ZEROBYTES = 32, - crypto_secretbox_BOXZEROBYTES = 16, - crypto_scalarmult_BYTES = 32, - crypto_scalarmult_SCALARBYTES = 32, - crypto_box_PUBLICKEYBYTES = 32, - crypto_box_SECRETKEYBYTES = 32, - crypto_box_BEFORENMBYTES = 32, - crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, - crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, - crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, - crypto_sign_BYTES = 64, - crypto_sign_PUBLICKEYBYTES = 32, - crypto_sign_SECRETKEYBYTES = 64, - crypto_sign_SEEDBYTES = 32, - crypto_hash_BYTES = 64; - -nacl.lowlevel = { - crypto_core_hsalsa20: crypto_core_hsalsa20, - crypto_stream_xor: crypto_stream_xor, - crypto_stream: crypto_stream, - crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, - crypto_stream_salsa20: crypto_stream_salsa20, - crypto_onetimeauth: crypto_onetimeauth, - crypto_onetimeauth_verify: crypto_onetimeauth_verify, - crypto_verify_16: crypto_verify_16, - crypto_verify_32: crypto_verify_32, - crypto_secretbox: crypto_secretbox, - crypto_secretbox_open: crypto_secretbox_open, - crypto_scalarmult: crypto_scalarmult, - crypto_scalarmult_base: crypto_scalarmult_base, - crypto_box_beforenm: crypto_box_beforenm, - crypto_box_afternm: crypto_box_afternm, - crypto_box: crypto_box, - crypto_box_open: crypto_box_open, - crypto_box_keypair: crypto_box_keypair, - crypto_hash: crypto_hash, - crypto_sign: crypto_sign, - crypto_sign_keypair: crypto_sign_keypair, - crypto_sign_open: crypto_sign_open, - - crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, - crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, - crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, - crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, - crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, - crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, - crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, - crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, - crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, - crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, - crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, - crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, - crypto_sign_BYTES: crypto_sign_BYTES, - crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, - crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, - crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, - crypto_hash_BYTES: crypto_hash_BYTES -}; - -/* High-level API */ - -function checkLengths(k, n) { - if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); - if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); -} - -function checkBoxLengths(pk, sk) { - if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); - if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); -} - -function checkArrayTypes() { - var t, i; - for (i = 0; i < arguments.length; i++) { - if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') - throw new TypeError('unexpected type ' + t + ', use Uint8Array'); - } -} - -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - -// TODO: Completely remove this in v0.15. -if (!nacl.util) { - nacl.util = {}; - nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { - throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); - }; -} - -nacl.randomBytes = function(n) { - var b = new Uint8Array(n); - randombytes(b, n); - return b; -}; - -nacl.secretbox = function(msg, nonce, key) { - checkArrayTypes(msg, nonce, key); - checkLengths(key, nonce); - var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); - var c = new Uint8Array(m.length); - for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; - crypto_secretbox(c, m, m.length, nonce, key); - return c.subarray(crypto_secretbox_BOXZEROBYTES); -}; - -nacl.secretbox.open = function(box, nonce, key) { - checkArrayTypes(box, nonce, key); - checkLengths(key, nonce); - var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); - var m = new Uint8Array(c.length); - for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; - if (c.length < 32) return false; - if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; - return m.subarray(crypto_secretbox_ZEROBYTES); -}; - -nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; -nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; -nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; - -nacl.scalarMult = function(n, p) { - checkArrayTypes(n, p); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult(q, n, p); - return q; -}; - -nacl.scalarMult.base = function(n) { - checkArrayTypes(n); - if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); - var q = new Uint8Array(crypto_scalarmult_BYTES); - crypto_scalarmult_base(q, n); - return q; -}; - -nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; -nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; - -nacl.box = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox(msg, nonce, k); -}; - -nacl.box.before = function(publicKey, secretKey) { - checkArrayTypes(publicKey, secretKey); - checkBoxLengths(publicKey, secretKey); - var k = new Uint8Array(crypto_box_BEFORENMBYTES); - crypto_box_beforenm(k, publicKey, secretKey); - return k; -}; - -nacl.box.after = nacl.secretbox; - -nacl.box.open = function(msg, nonce, publicKey, secretKey) { - var k = nacl.box.before(publicKey, secretKey); - return nacl.secretbox.open(msg, nonce, k); -}; - -nacl.box.open.after = nacl.secretbox.open; - -nacl.box.keyPair = function() { - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); - crypto_box_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.box.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_box_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); - crypto_scalarmult_base(pk, secretKey); - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; -nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; -nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; -nacl.box.nonceLength = crypto_box_NONCEBYTES; -nacl.box.overheadLength = nacl.secretbox.overheadLength; - -nacl.sign = function(msg, secretKey) { - checkArrayTypes(msg, secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); - crypto_sign(signedMsg, msg, msg.length, secretKey); - return signedMsg; -}; - -nacl.sign.open = function(signedMsg, publicKey) { - if (arguments.length !== 2) - throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); - checkArrayTypes(signedMsg, publicKey); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var tmp = new Uint8Array(signedMsg.length); - var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); - if (mlen < 0) return null; - var m = new Uint8Array(mlen); - for (var i = 0; i < m.length; i++) m[i] = tmp[i]; - return m; -}; - -nacl.sign.detached = function(msg, secretKey) { - var signedMsg = nacl.sign(msg, secretKey); - var sig = new Uint8Array(crypto_sign_BYTES); - for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; - return sig; -}; - -nacl.sign.detached.verify = function(msg, sig, publicKey) { - checkArrayTypes(msg, sig, publicKey); - if (sig.length !== crypto_sign_BYTES) - throw new Error('bad signature size'); - if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) - throw new Error('bad public key size'); - var sm = new Uint8Array(crypto_sign_BYTES + msg.length); - var m = new Uint8Array(crypto_sign_BYTES + msg.length); - var i; - for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; - for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; - return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); -}; - -nacl.sign.keyPair = function() { - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - crypto_sign_keypair(pk, sk); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.keyPair.fromSecretKey = function(secretKey) { - checkArrayTypes(secretKey); - if (secretKey.length !== crypto_sign_SECRETKEYBYTES) - throw new Error('bad secret key size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; - return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; -}; - -nacl.sign.keyPair.fromSeed = function(seed) { - checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) - throw new Error('bad seed size'); - var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); - var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); - for (var i = 0; i < 32; i++) sk[i] = seed[i]; - crypto_sign_keypair(pk, sk, true); - return {publicKey: pk, secretKey: sk}; -}; - -nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; -nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; -nacl.sign.seedLength = crypto_sign_SEEDBYTES; -nacl.sign.signatureLength = crypto_sign_BYTES; - -nacl.hash = function(msg) { - checkArrayTypes(msg); - var h = new Uint8Array(crypto_hash_BYTES); - crypto_hash(h, msg, msg.length); - return h; -}; - -nacl.hash.hashLength = crypto_hash_BYTES; - -nacl.verify = function(x, y) { - checkArrayTypes(x, y); - // Zero length arguments are considered not equal. - if (x.length === 0 || y.length === 0) return false; - if (x.length !== y.length) return false; - return (vn(x, 0, y, 0, x.length) === 0) ? true : false; -}; - -nacl.setPRNG = function(fn) { - randombytes = fn; -}; - -(function() { - // Initialize PRNG if environment provides CSPRNG. - // If not, methods calling randombytes will throw. - var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; - if (crypto && crypto.getRandomValues) { - // Browsers. - var QUOTA = 65536; - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - for (i = 0; i < n; i += QUOTA) { - crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); - } - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } else if (true) { - // Node.js. - crypto = __nccwpck_require__(6113); - if (crypto && crypto.randomBytes) { - nacl.setPRNG(function(x, n) { - var i, v = crypto.randomBytes(n); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } - } -})(); - -})( true && module.exports ? module.exports : (self.nacl = self.nacl || {})); - - -/***/ }), - -/***/ 70020: -/***/ (function(__unused_webpack_module, exports) { - -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -(function (global, factory) { - true ? factory(exports) : - 0; -}(this, (function (exports) { 'use strict'; - -function merge() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { - sets[_key] = arguments[_key]; - } - - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} -function subexp(str) { - return "(?:" + str + ")"; -} -function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); -} -function toUpperCase(str) { - return str.toUpperCase(); -} -function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; -} -function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; -} - -function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), - //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), - //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), - //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), - //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), - //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), - //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), - //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), - //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -var URI_PROTOCOL = buildExps(false); - -var IRI_PROTOCOL = buildExps(true); - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - - - - - - - - - - - - - -var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}; - -/** Highest positive signed 32-bit float value */ - -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' - -/** Regular expressions */ -var regexPunycode = /^xn--/; -var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error$1(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); -}; - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -var digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -var decode = function decode(input) { - // Don't use UCS-2. - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (var j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - var oldi = i; - for (var w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error$1('invalid-input'); - } - - var digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - - w *= baseMinusT; - } - - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - - return String.fromCodePoint.apply(String, output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -var encode = function encode(input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - - // Handle the basic code points. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var basicLength = output.length; - var handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base;; /* no condition */k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -var SCHEMES = {}; -function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; -} -function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} - -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } -} -var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; -function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - //fix port number - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} - -function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} - -var RDS1 = /^\.\.?\//; -var RDS2 = /^\/\.(\/|$)/; -var RDS3 = /^\/\.\.(\/|$)/; -var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} - -function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) {} - //TODO: normalize IPv6 address as per RFC 5952 - - //if host component is a domain name - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - //convert IDN via punycode - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} - -function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} - -function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} - -function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} - -function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} - -function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); -} - -function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); -} - -var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - //normalize the default port - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; - -var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize -}; - -function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; -} -//RFC 6455 -var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse(components, options) { - var wsComponents = components; - //indicate if the secure flag is set - wsComponents.secure = isSecure(wsComponents); - //construct resouce name - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function serialize(wsComponents, options) { - //normalize the default port - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - //ensure scheme matches secure flag - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; - wsComponents.secure = undefined; - } - //reconstruct path from resource name - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split('?'), - _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), - path = _wsComponents$resourc2[0], - query = _wsComponents$resourc2[1]; - - wsComponents.path = path && path !== '/' ? path : undefined; - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - //forbid fragment component - wsComponents.fragment = undefined; - return wsComponents; - } -}; - -var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize -}; - -var O = {}; -var isIRI = true; -//RFC 3986 -var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -var UNRESERVED = new RegExp(UNRESERVED$$, "g"); -var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -var NOT_HFVALUE = NOT_HFNAME; -function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; -} -var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; - -var URN_PARSE = /^([^\:]+)\:(.*)/; -//RFC 2141 -var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } -}; - -var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -//RFC 4122 -var handler$6 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } -}; - -SCHEMES[handler.scheme] = handler; -SCHEMES[handler$1.scheme] = handler$1; -SCHEMES[handler$2.scheme] = handler$2; -SCHEMES[handler$3.scheme] = handler$3; -SCHEMES[handler$4.scheme] = handler$4; -SCHEMES[handler$5.scheme] = handler$5; -SCHEMES[handler$6.scheme] = handler$6; - -exports.SCHEMES = SCHEMES; -exports.pctEncChar = pctEncChar; -exports.pctDecChars = pctDecChars; -exports.parse = parse; -exports.removeDotSegments = removeDotSegments; -exports.serialize = serialize; -exports.resolveComponents = resolveComponents; -exports.resolve = resolve; -exports.normalize = normalize; -exports.equal = equal; -exports.escapeComponent = escapeComponent; -exports.unescapeComponent = unescapeComponent; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=uri.all.js.map - - -/***/ }), - -/***/ 2155: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var v1 = __nccwpck_require__(18749); -var v4 = __nccwpck_require__(80824); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; - - -/***/ }), - -/***/ 92707: -/***/ ((module) => { - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([ - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]] - ]).join(''); -} - -module.exports = bytesToUuid; - - -/***/ }), - -/***/ 15859: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = __nccwpck_require__(6113); - -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; - - -/***/ }), - -/***/ 18749: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; -var _clockseq; - -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; - -// See https://github.com/uuidjs/uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - var node = options.node || _nodeId; - var 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) { - var seedBytes = rng(); - 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. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var 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` - var 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` - var 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 (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : bytesToUuid(b); -} - -module.exports = v1; - - -/***/ }), - -/***/ 80824: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; - - -/***/ }), - -/***/ 81692: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* - * verror.js: richer JavaScript errors - */ - -var mod_assertplus = __nccwpck_require__(66631); -var mod_util = __nccwpck_require__(73837); - -var mod_extsprintf = __nccwpck_require__(87264); -var mod_isError = (__nccwpck_require__(95898)/* .isError */ .VZ); -var sprintf = mod_extsprintf.sprintf; - -/* - * Public interface - */ - -/* So you can 'var VError = require('verror')' */ -module.exports = VError; -/* For compatibility */ -VError.VError = VError; -/* Other exported classes */ -VError.SError = SError; -VError.WError = WError; -VError.MultiError = MultiError; - -/* - * Common function used to parse constructor arguments for VError, WError, and - * SError. Named arguments to this function: - * - * strict force strict interpretation of sprintf arguments, even - * if the options in "argv" don't say so - * - * argv error's constructor arguments, which are to be - * interpreted as described in README.md. For quick - * reference, "argv" has one of the following forms: - * - * [ sprintf_args... ] (argv[0] is a string) - * [ cause, sprintf_args... ] (argv[0] is an Error) - * [ options, sprintf_args... ] (argv[0] is an object) - * - * This function normalizes these forms, producing an object with the following - * properties: - * - * options equivalent to "options" in third form. This will never - * be a direct reference to what the caller passed in - * (i.e., it may be a shallow copy), so it can be freely - * modified. - * - * shortmessage result of sprintf(sprintf_args), taking options.strict - * into account as described in README.md. - */ -function parseConstructorArguments(args) -{ - var argv, options, sprintf_args, shortmessage, k; - - mod_assertplus.object(args, 'args'); - mod_assertplus.bool(args.strict, 'args.strict'); - mod_assertplus.array(args.argv, 'args.argv'); - argv = args.argv; - - /* - * First, figure out which form of invocation we've been given. - */ - if (argv.length === 0) { - options = {}; - sprintf_args = []; - } else if (mod_isError(argv[0])) { - options = { 'cause': argv[0] }; - sprintf_args = argv.slice(1); - } else if (typeof (argv[0]) === 'object') { - options = {}; - for (k in argv[0]) { - options[k] = argv[0][k]; - } - sprintf_args = argv.slice(1); - } else { - mod_assertplus.string(argv[0], - 'first argument to VError, SError, or WError ' + - 'constructor must be a string, object, or Error'); - options = {}; - sprintf_args = argv; - } - - /* - * Now construct the error's message. - * - * extsprintf (which we invoke here with our caller's arguments in order - * to construct this Error's message) is strict in its interpretation of - * values to be processed by the "%s" specifier. The value passed to - * extsprintf must actually be a string or something convertible to a - * String using .toString(). Passing other values (notably "null" and - * "undefined") is considered a programmer error. The assumption is - * that if you actually want to print the string "null" or "undefined", - * then that's easy to do that when you're calling extsprintf; on the - * other hand, if you did NOT want that (i.e., there's actually a bug - * where the program assumes some variable is non-null and tries to - * print it, which might happen when constructing a packet or file in - * some specific format), then it's better to stop immediately than - * produce bogus output. - * - * However, sometimes the bug is only in the code calling VError, and a - * programmer might prefer to have the error message contain "null" or - * "undefined" rather than have the bug in the error path crash the - * program (making the first bug harder to identify). For that reason, - * by default VError converts "null" or "undefined" arguments to their - * string representations and passes those to extsprintf. Programmers - * desiring the strict behavior can use the SError class or pass the - * "strict" option to the VError constructor. - */ - mod_assertplus.object(options); - if (!options.strict && !args.strict) { - sprintf_args = sprintf_args.map(function (a) { - return (a === null ? 'null' : - a === undefined ? 'undefined' : a); - }); - } - - if (sprintf_args.length === 0) { - shortmessage = ''; - } else { - shortmessage = sprintf.apply(null, sprintf_args); - } - - return ({ - 'options': options, - 'shortmessage': shortmessage - }); -} - -/* - * See README.md for reference documentation. - */ -function VError() -{ - var args, obj, parsed, cause, ctor, message, k; - - args = Array.prototype.slice.call(arguments, 0); - - /* - * This is a regrettable pattern, but JavaScript's built-in Error class - * is defined to work this way, so we allow the constructor to be called - * without "new". - */ - if (!(this instanceof VError)) { - obj = Object.create(VError.prototype); - VError.apply(obj, arguments); - return (obj); - } - - /* - * For convenience and backwards compatibility, we support several - * different calling forms. Normalize them here. - */ - parsed = parseConstructorArguments({ - 'argv': args, - 'strict': false - }); - - /* - * If we've been given a name, apply it now. - */ - if (parsed.options.name) { - mod_assertplus.string(parsed.options.name, - 'error\'s "name" must be a string'); - this.name = parsed.options.name; - } - - /* - * For debugging, we keep track of the original short message (attached - * this Error particularly) separately from the complete message (which - * includes the messages of our cause chain). - */ - this.jse_shortmsg = parsed.shortmessage; - message = parsed.shortmessage; - - /* - * If we've been given a cause, record a reference to it and update our - * message appropriately. - */ - cause = parsed.options.cause; - if (cause) { - mod_assertplus.ok(mod_isError(cause), 'cause is not an Error'); - this.jse_cause = cause; - - if (!parsed.options.skipCauseMessage) { - message += ': ' + cause.message; - } - } - - /* - * If we've been given an object with properties, shallow-copy that - * here. We don't want to use a deep copy in case there are non-plain - * objects here, but we don't want to use the original object in case - * the caller modifies it later. - */ - this.jse_info = {}; - if (parsed.options.info) { - for (k in parsed.options.info) { - this.jse_info[k] = parsed.options.info[k]; - } - } - - this.message = message; - Error.call(this, message); - - if (Error.captureStackTrace) { - ctor = parsed.options.constructorOpt || this.constructor; - Error.captureStackTrace(this, ctor); - } - - return (this); -} - -mod_util.inherits(VError, Error); -VError.prototype.name = 'VError'; - -VError.prototype.toString = function ve_toString() -{ - var str = (this.hasOwnProperty('name') && this.name || - this.constructor.name || this.constructor.prototype.name); - if (this.message) - str += ': ' + this.message; - - return (str); -}; - -/* - * This method is provided for compatibility. New callers should use - * VError.cause() instead. That method also uses the saner `null` return value - * when there is no cause. - */ -VError.prototype.cause = function ve_cause() -{ - var cause = VError.cause(this); - return (cause === null ? undefined : cause); -}; - -/* - * Static methods - * - * These class-level methods are provided so that callers can use them on - * instances of Errors that are not VErrors. New interfaces should be provided - * only using static methods to eliminate the class of programming mistake where - * people fail to check whether the Error object has the corresponding methods. - */ - -VError.cause = function (err) -{ - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - return (mod_isError(err.jse_cause) ? err.jse_cause : null); -}; - -VError.info = function (err) -{ - var rv, cause, k; - - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - cause = VError.cause(err); - if (cause !== null) { - rv = VError.info(cause); - } else { - rv = {}; - } - - if (typeof (err.jse_info) == 'object' && err.jse_info !== null) { - for (k in err.jse_info) { - rv[k] = err.jse_info[k]; - } - } - - return (rv); -}; - -VError.findCauseByName = function (err, name) -{ - var cause; - - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - mod_assertplus.string(name, 'name'); - mod_assertplus.ok(name.length > 0, 'name cannot be empty'); - - for (cause = err; cause !== null; cause = VError.cause(cause)) { - mod_assertplus.ok(mod_isError(cause)); - if (cause.name == name) { - return (cause); - } - } - - return (null); -}; - -VError.hasCauseWithName = function (err, name) -{ - return (VError.findCauseByName(err, name) !== null); -}; - -VError.fullStack = function (err) -{ - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - - var cause = VError.cause(err); - - if (cause) { - return (err.stack + '\ncaused by: ' + VError.fullStack(cause)); - } - - return (err.stack); -}; - -VError.errorFromList = function (errors) -{ - mod_assertplus.arrayOfObject(errors, 'errors'); - - if (errors.length === 0) { - return (null); - } - - errors.forEach(function (e) { - mod_assertplus.ok(mod_isError(e)); - }); - - if (errors.length == 1) { - return (errors[0]); - } - - return (new MultiError(errors)); -}; - -VError.errorForEach = function (err, func) -{ - mod_assertplus.ok(mod_isError(err), 'err must be an Error'); - mod_assertplus.func(func, 'func'); - - if (err instanceof MultiError) { - err.errors().forEach(function iterError(e) { func(e); }); - } else { - func(err); - } -}; - - -/* - * SError is like VError, but stricter about types. You cannot pass "null" or - * "undefined" as string arguments to the formatter. - */ -function SError() -{ - var args, obj, parsed, options; - - args = Array.prototype.slice.call(arguments, 0); - if (!(this instanceof SError)) { - obj = Object.create(SError.prototype); - SError.apply(obj, arguments); - return (obj); - } - - parsed = parseConstructorArguments({ - 'argv': args, - 'strict': true - }); - - options = parsed.options; - VError.call(this, options, '%s', parsed.shortmessage); - - return (this); -} - -/* - * We don't bother setting SError.prototype.name because once constructed, - * SErrors are just like VErrors. - */ -mod_util.inherits(SError, VError); - - -/* - * Represents a collection of errors for the purpose of consumers that generally - * only deal with one error. Callers can extract the individual errors - * contained in this object, but may also just treat it as a normal single - * error, in which case a summary message will be printed. - */ -function MultiError(errors) -{ - mod_assertplus.array(errors, 'list of errors'); - mod_assertplus.ok(errors.length > 0, 'must be at least one error'); - this.ase_errors = errors; - - VError.call(this, { - 'cause': errors[0] - }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); -} - -mod_util.inherits(MultiError, VError); -MultiError.prototype.name = 'MultiError'; - -MultiError.prototype.errors = function me_errors() -{ - return (this.ase_errors.slice(0)); -}; - - -/* - * See README.md for reference details. - */ -function WError() -{ - var args, obj, parsed, options; - - args = Array.prototype.slice.call(arguments, 0); - if (!(this instanceof WError)) { - obj = Object.create(WError.prototype); - WError.apply(obj, args); - return (obj); - } - - parsed = parseConstructorArguments({ - 'argv': args, - 'strict': false - }); - - options = parsed.options; - options['skipCauseMessage'] = true; - VError.call(this, options, '%s', parsed.shortmessage); - - return (this); -} - -mod_util.inherits(WError, VError); -WError.prototype.name = 'WError'; - -WError.prototype.toString = function we_toString() -{ - var str = (this.hasOwnProperty('name') && this.name || - this.constructor.name || this.constructor.prototype.name); - if (this.message) - str += ': ' + this.message; - if (this.jse_cause && this.jse_cause.message) - str += '; caused by ' + this.jse_cause.toString(); - - return (str); -}; - -/* - * For purely historical reasons, WError's cause() function allows you to set - * the cause. - */ -WError.prototype.cause = function we_cause(c) -{ - if (mod_isError(c)) - this.jse_cause = c; - - return (this.jse_cause); -}; - - -/***/ }), - -/***/ 88867: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const WebSocket = __nccwpck_require__(91518); - -WebSocket.createWebSocketStream = __nccwpck_require__(41658); -WebSocket.Server = __nccwpck_require__(58887); -WebSocket.Receiver = __nccwpck_require__(25066); -WebSocket.Sender = __nccwpck_require__(36947); - -module.exports = WebSocket; - - -/***/ }), - -/***/ 9436: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { EMPTY_BUFFER } = __nccwpck_require__(15949); - -/** - * Merges an array of buffers into a new buffer. - * - * @param {Buffer[]} list The array of buffers to concat - * @param {Number} totalLength The total length of buffers in the list - * @return {Buffer} The resulting buffer - * @public - */ -function concat(list, totalLength) { - if (list.length === 0) return EMPTY_BUFFER; - if (list.length === 1) return list[0]; - - const target = Buffer.allocUnsafe(totalLength); - let offset = 0; - - for (let i = 0; i < list.length; i++) { - const buf = list[i]; - target.set(buf, offset); - offset += buf.length; - } - - if (offset < totalLength) return target.slice(0, offset); - - return target; -} - -/** - * Masks a buffer using the given mask. - * - * @param {Buffer} source The buffer to mask - * @param {Buffer} mask The mask to use - * @param {Buffer} output The buffer where to store the result - * @param {Number} offset The offset at which to start writing - * @param {Number} length The number of bytes to mask. - * @public - */ -function _mask(source, mask, output, offset, length) { - for (let i = 0; i < length; i++) { - output[offset + i] = source[i] ^ mask[i & 3]; - } -} - -/** - * Unmasks a buffer using the given mask. - * - * @param {Buffer} buffer The buffer to unmask - * @param {Buffer} mask The mask to use - * @public - */ -function _unmask(buffer, mask) { - // Required until https://github.com/nodejs/node/issues/9006 is resolved. - const length = buffer.length; - for (let i = 0; i < length; i++) { - buffer[i] ^= mask[i & 3]; - } -} - -/** - * Converts a buffer to an `ArrayBuffer`. - * - * @param {Buffer} buf The buffer to convert - * @return {ArrayBuffer} Converted buffer - * @public - */ -function toArrayBuffer(buf) { - if (buf.byteLength === buf.buffer.byteLength) { - return buf.buffer; - } - - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); -} - -/** - * Converts `data` to a `Buffer`. - * - * @param {*} data The data to convert - * @return {Buffer} The buffer - * @throws {TypeError} - * @public - */ -function toBuffer(data) { - toBuffer.readOnly = true; - - if (Buffer.isBuffer(data)) return data; - - let buf; - - if (data instanceof ArrayBuffer) { - buf = Buffer.from(data); - } else if (ArrayBuffer.isView(data)) { - buf = Buffer.from(data.buffer, data.byteOffset, data.byteLength); - } else { - buf = Buffer.from(data); - toBuffer.readOnly = false; - } - - return buf; -} - -try { - const bufferUtil = __nccwpck_require__(71269); - const bu = bufferUtil.BufferUtil || bufferUtil; - - module.exports = { - concat, - mask(source, mask, output, offset, length) { - if (length < 48) _mask(source, mask, output, offset, length); - else bu.mask(source, mask, output, offset, length); - }, - toArrayBuffer, - toBuffer, - unmask(buffer, mask) { - if (buffer.length < 32) _unmask(buffer, mask); - else bu.unmask(buffer, mask); - } - }; -} catch (e) /* istanbul ignore next */ { - module.exports = { - concat, - mask: _mask, - toArrayBuffer, - toBuffer, - unmask: _unmask - }; -} - - -/***/ }), - -/***/ 15949: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'], - GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', - kStatusCode: Symbol('status-code'), - kWebSocket: Symbol('websocket'), - EMPTY_BUFFER: Buffer.alloc(0), - NOOP: () => {} -}; - - -/***/ }), - -/***/ 64561: -/***/ ((module) => { - -"use strict"; - - -/** - * Class representing an event. - * - * @private - */ -class Event { - /** - * Create a new `Event`. - * - * @param {String} type The name of the event - * @param {Object} target A reference to the target to which the event was - * dispatched - */ - constructor(type, target) { - this.target = target; - this.type = type; - } -} - -/** - * Class representing a message event. - * - * @extends Event - * @private - */ -class MessageEvent extends Event { - /** - * Create a new `MessageEvent`. - * - * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data - * @param {WebSocket} target A reference to the target to which the event was - * dispatched - */ - constructor(data, target) { - super('message', target); - - this.data = data; - } -} - -/** - * Class representing a close event. - * - * @extends Event - * @private - */ -class CloseEvent extends Event { - /** - * Create a new `CloseEvent`. - * - * @param {Number} code The status code explaining why the connection is being - * closed - * @param {String} reason A human-readable string explaining why the - * connection is closing - * @param {WebSocket} target A reference to the target to which the event was - * dispatched - */ - constructor(code, reason, target) { - super('close', target); - - this.wasClean = target._closeFrameReceived && target._closeFrameSent; - this.reason = reason; - this.code = code; - } -} - -/** - * Class representing an open event. - * - * @extends Event - * @private - */ -class OpenEvent extends Event { - /** - * Create a new `OpenEvent`. - * - * @param {WebSocket} target A reference to the target to which the event was - * dispatched - */ - constructor(target) { - super('open', target); - } -} - -/** - * Class representing an error event. - * - * @extends Event - * @private - */ -class ErrorEvent extends Event { - /** - * Create a new `ErrorEvent`. - * - * @param {Object} error The error that generated this event - * @param {WebSocket} target A reference to the target to which the event was - * dispatched - */ - constructor(error, target) { - super('error', target); - - this.message = error.message; - this.error = error; - } -} - -/** - * This provides methods for emulating the `EventTarget` interface. It's not - * meant to be used directly. - * - * @mixin - */ -const EventTarget = { - /** - * Register an event listener. - * - * @param {String} type A string representing the event type to listen for - * @param {Function} listener The listener to add - * @param {Object} [options] An options object specifies characteristics about - * the event listener - * @param {Boolean} [options.once=false] A `Boolean`` indicating that the - * listener should be invoked at most once after being added. If `true`, - * the listener would be automatically removed when invoked. - * @public - */ - addEventListener(type, listener, options) { - if (typeof listener !== 'function') return; - - function onMessage(data) { - listener.call(this, new MessageEvent(data, this)); - } - - function onClose(code, message) { - listener.call(this, new CloseEvent(code, message, this)); - } - - function onError(error) { - listener.call(this, new ErrorEvent(error, this)); - } - - function onOpen() { - listener.call(this, new OpenEvent(this)); - } - - const method = options && options.once ? 'once' : 'on'; - - if (type === 'message') { - onMessage._listener = listener; - this[method](type, onMessage); - } else if (type === 'close') { - onClose._listener = listener; - this[method](type, onClose); - } else if (type === 'error') { - onError._listener = listener; - this[method](type, onError); - } else if (type === 'open') { - onOpen._listener = listener; - this[method](type, onOpen); - } else { - this[method](type, listener); - } - }, - - /** - * Remove an event listener. - * - * @param {String} type A string representing the event type to remove - * @param {Function} listener The listener to remove - * @public - */ - removeEventListener(type, listener) { - const listeners = this.listeners(type); - - for (let i = 0; i < listeners.length; i++) { - if (listeners[i] === listener || listeners[i]._listener === listener) { - this.removeListener(type, listeners[i]); - } - } - } -}; - -module.exports = EventTarget; - - -/***/ }), - -/***/ 92035: -/***/ ((module) => { - -"use strict"; - - -// -// Allowed token characters: -// -// '!', '#', '$', '%', '&', ''', '*', '+', '-', -// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~' -// -// tokenChars[32] === 0 // ' ' -// tokenChars[33] === 1 // '!' -// tokenChars[34] === 0 // '"' -// ... -// -// prettier-ignore -const tokenChars = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 - 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127 -]; - -/** - * Adds an offer to the map of extension offers or a parameter to the map of - * parameters. - * - * @param {Object} dest The map of extension offers or parameters - * @param {String} name The extension or parameter name - * @param {(Object|Boolean|String)} elem The extension parameters or the - * parameter value - * @private - */ -function push(dest, name, elem) { - if (dest[name] === undefined) dest[name] = [elem]; - else dest[name].push(elem); -} - -/** - * Parses the `Sec-WebSocket-Extensions` header into an object. - * - * @param {String} header The field value of the header - * @return {Object} The parsed object - * @public - */ -function parse(header) { - const offers = Object.create(null); - - if (header === undefined || header === '') return offers; - - let params = Object.create(null); - let mustUnescape = false; - let isEscaping = false; - let inQuotes = false; - let extensionName; - let paramName; - let start = -1; - let end = -1; - let i = 0; - - for (; i < header.length; i++) { - const code = header.charCodeAt(i); - - if (extensionName === undefined) { - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 0x20 /* ' ' */ || code === 0x09 /* '\t' */) { - if (end === -1 && start !== -1) end = i; - } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - - if (end === -1) end = i; - const name = header.slice(start, end); - if (code === 0x2c) { - push(offers, name, params); - params = Object.create(null); - } else { - extensionName = name; - } - - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } else if (paramName === undefined) { - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 0x20 || code === 0x09) { - if (end === -1 && start !== -1) end = i; - } else if (code === 0x3b || code === 0x2c) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - - if (end === -1) end = i; - push(params, header.slice(start, end), true); - if (code === 0x2c) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = undefined; - } - - start = end = -1; - } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) { - paramName = header.slice(start, i); - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } else { - // - // The value of a quoted-string after unescaping must conform to the - // token ABNF, so only token characters are valid. - // Ref: https://tools.ietf.org/html/rfc6455#section-9.1 - // - if (isEscaping) { - if (tokenChars[code] !== 1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (start === -1) start = i; - else if (!mustUnescape) mustUnescape = true; - isEscaping = false; - } else if (inQuotes) { - if (tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 0x22 /* '"' */ && start !== -1) { - inQuotes = false; - end = i; - } else if (code === 0x5c /* '\' */) { - isEscaping = true; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { - inQuotes = true; - } else if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (start !== -1 && (code === 0x20 || code === 0x09)) { - if (end === -1) end = i; - } else if (code === 0x3b || code === 0x2c) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - - if (end === -1) end = i; - let value = header.slice(start, end); - if (mustUnescape) { - value = value.replace(/\\/g, ''); - mustUnescape = false; - } - push(params, paramName, value); - if (code === 0x2c) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = undefined; - } - - paramName = undefined; - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } - } - - if (start === -1 || inQuotes) { - throw new SyntaxError('Unexpected end of input'); - } - - if (end === -1) end = i; - const token = header.slice(start, end); - if (extensionName === undefined) { - push(offers, token, params); - } else { - if (paramName === undefined) { - push(params, token, true); - } else if (mustUnescape) { - push(params, paramName, token.replace(/\\/g, '')); - } else { - push(params, paramName, token); - } - push(offers, extensionName, params); - } - - return offers; -} - -/** - * Builds the `Sec-WebSocket-Extensions` header field value. - * - * @param {Object} extensions The map of extensions and parameters to format - * @return {String} A string representing the given object - * @public - */ -function format(extensions) { - return Object.keys(extensions) - .map((extension) => { - let configurations = extensions[extension]; - if (!Array.isArray(configurations)) configurations = [configurations]; - return configurations - .map((params) => { - return [extension] - .concat( - Object.keys(params).map((k) => { - let values = params[k]; - if (!Array.isArray(values)) values = [values]; - return values - .map((v) => (v === true ? k : `${k}=${v}`)) - .join('; '); - }) - ) - .join('; '); - }) - .join(', '); - }) - .join(', '); -} - -module.exports = { format, parse }; - - -/***/ }), - -/***/ 41356: -/***/ ((module) => { - -"use strict"; - - -const kDone = Symbol('kDone'); -const kRun = Symbol('kRun'); - -/** - * A very simple job queue with adjustable concurrency. Adapted from - * https://github.com/STRML/async-limiter - */ -class Limiter { - /** - * Creates a new `Limiter`. - * - * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed - * to run concurrently - */ - constructor(concurrency) { - this[kDone] = () => { - this.pending--; - this[kRun](); - }; - this.concurrency = concurrency || Infinity; - this.jobs = []; - this.pending = 0; - } - - /** - * Adds a job to the queue. - * - * @param {Function} job The job to run - * @public - */ - add(job) { - this.jobs.push(job); - this[kRun](); - } - - /** - * Removes a job from the queue and runs it if possible. - * - * @private - */ - [kRun]() { - if (this.pending === this.concurrency) return; - - if (this.jobs.length) { - const job = this.jobs.shift(); - - this.pending++; - job(this[kDone]); - } - } -} - -module.exports = Limiter; - - -/***/ }), - -/***/ 56684: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const zlib = __nccwpck_require__(59796); - -const bufferUtil = __nccwpck_require__(9436); -const Limiter = __nccwpck_require__(41356); -const { kStatusCode, NOOP } = __nccwpck_require__(15949); - -const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); -const kPerMessageDeflate = Symbol('permessage-deflate'); -const kTotalLength = Symbol('total-length'); -const kCallback = Symbol('callback'); -const kBuffers = Symbol('buffers'); -const kError = Symbol('error'); - -// -// We limit zlib concurrency, which prevents severe memory fragmentation -// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913 -// and https://github.com/websockets/ws/issues/1202 -// -// Intentionally global; it's the global thread pool that's an issue. -// -let zlibLimiter; - -/** - * permessage-deflate implementation. - */ -class PerMessageDeflate { - /** - * Creates a PerMessageDeflate instance. - * - * @param {Object} [options] Configuration options - * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept - * disabling of server context takeover - * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/ - * acknowledge disabling of client context takeover - * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the - * use of a custom server window size - * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support - * for, or request, a custom client window size - * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on - * deflate - * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on - * inflate - * @param {Number} [options.threshold=1024] Size (in bytes) below which - * messages should not be compressed - * @param {Number} [options.concurrencyLimit=10] The number of concurrent - * calls to zlib - * @param {Boolean} [isServer=false] Create the instance in either server or - * client mode - * @param {Number} [maxPayload=0] The maximum allowed message length - */ - constructor(options, isServer, maxPayload) { - this._maxPayload = maxPayload | 0; - this._options = options || {}; - this._threshold = - this._options.threshold !== undefined ? this._options.threshold : 1024; - this._isServer = !!isServer; - this._deflate = null; - this._inflate = null; - - this.params = null; - - if (!zlibLimiter) { - const concurrency = - this._options.concurrencyLimit !== undefined - ? this._options.concurrencyLimit - : 10; - zlibLimiter = new Limiter(concurrency); - } - } - - /** - * @type {String} - */ - static get extensionName() { - return 'permessage-deflate'; - } - - /** - * Create an extension negotiation offer. - * - * @return {Object} Extension parameters - * @public - */ - offer() { - const params = {}; - - if (this._options.serverNoContextTakeover) { - params.server_no_context_takeover = true; - } - if (this._options.clientNoContextTakeover) { - params.client_no_context_takeover = true; - } - if (this._options.serverMaxWindowBits) { - params.server_max_window_bits = this._options.serverMaxWindowBits; - } - if (this._options.clientMaxWindowBits) { - params.client_max_window_bits = this._options.clientMaxWindowBits; - } else if (this._options.clientMaxWindowBits == null) { - params.client_max_window_bits = true; - } - - return params; - } - - /** - * Accept an extension negotiation offer/response. - * - * @param {Array} configurations The extension negotiation offers/reponse - * @return {Object} Accepted configuration - * @public - */ - accept(configurations) { - configurations = this.normalizeParams(configurations); - - this.params = this._isServer - ? this.acceptAsServer(configurations) - : this.acceptAsClient(configurations); - - return this.params; - } - - /** - * Releases all resources used by the extension. - * - * @public - */ - cleanup() { - if (this._inflate) { - this._inflate.close(); - this._inflate = null; - } - - if (this._deflate) { - const callback = this._deflate[kCallback]; - - this._deflate.close(); - this._deflate = null; - - if (callback) { - callback( - new Error( - 'The deflate stream was closed while data was being processed' - ) - ); - } - } - } - - /** - * Accept an extension negotiation offer. - * - * @param {Array} offers The extension negotiation offers - * @return {Object} Accepted configuration - * @private - */ - acceptAsServer(offers) { - const opts = this._options; - const accepted = offers.find((params) => { - if ( - (opts.serverNoContextTakeover === false && - params.server_no_context_takeover) || - (params.server_max_window_bits && - (opts.serverMaxWindowBits === false || - (typeof opts.serverMaxWindowBits === 'number' && - opts.serverMaxWindowBits > params.server_max_window_bits))) || - (typeof opts.clientMaxWindowBits === 'number' && - !params.client_max_window_bits) - ) { - return false; - } - - return true; - }); - - if (!accepted) { - throw new Error('None of the extension offers can be accepted'); - } - - if (opts.serverNoContextTakeover) { - accepted.server_no_context_takeover = true; - } - if (opts.clientNoContextTakeover) { - accepted.client_no_context_takeover = true; - } - if (typeof opts.serverMaxWindowBits === 'number') { - accepted.server_max_window_bits = opts.serverMaxWindowBits; - } - if (typeof opts.clientMaxWindowBits === 'number') { - accepted.client_max_window_bits = opts.clientMaxWindowBits; - } else if ( - accepted.client_max_window_bits === true || - opts.clientMaxWindowBits === false - ) { - delete accepted.client_max_window_bits; - } - - return accepted; - } - - /** - * Accept the extension negotiation response. - * - * @param {Array} response The extension negotiation response - * @return {Object} Accepted configuration - * @private - */ - acceptAsClient(response) { - const params = response[0]; - - if ( - this._options.clientNoContextTakeover === false && - params.client_no_context_takeover - ) { - throw new Error('Unexpected parameter "client_no_context_takeover"'); - } - - if (!params.client_max_window_bits) { - if (typeof this._options.clientMaxWindowBits === 'number') { - params.client_max_window_bits = this._options.clientMaxWindowBits; - } - } else if ( - this._options.clientMaxWindowBits === false || - (typeof this._options.clientMaxWindowBits === 'number' && - params.client_max_window_bits > this._options.clientMaxWindowBits) - ) { - throw new Error( - 'Unexpected or invalid parameter "client_max_window_bits"' - ); - } - - return params; - } - - /** - * Normalize parameters. - * - * @param {Array} configurations The extension negotiation offers/reponse - * @return {Array} The offers/response with normalized parameters - * @private - */ - normalizeParams(configurations) { - configurations.forEach((params) => { - Object.keys(params).forEach((key) => { - let value = params[key]; - - if (value.length > 1) { - throw new Error(`Parameter "${key}" must have only a single value`); - } - - value = value[0]; - - if (key === 'client_max_window_bits') { - if (value !== true) { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - value = num; - } else if (!this._isServer) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - } else if (key === 'server_max_window_bits') { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - value = num; - } else if ( - key === 'client_no_context_takeover' || - key === 'server_no_context_takeover' - ) { - if (value !== true) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - } else { - throw new Error(`Unknown parameter "${key}"`); - } - - params[key] = value; - }); - }); - - return configurations; - } - - /** - * Decompress data. Concurrency limited. - * - * @param {Buffer} data Compressed data - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @public - */ - decompress(data, fin, callback) { - zlibLimiter.add((done) => { - this._decompress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - - /** - * Compress data. Concurrency limited. - * - * @param {Buffer} data Data to compress - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @public - */ - compress(data, fin, callback) { - zlibLimiter.add((done) => { - this._compress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - - /** - * Decompress data. - * - * @param {Buffer} data Compressed data - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @private - */ - _decompress(data, fin, callback) { - const endpoint = this._isServer ? 'client' : 'server'; - - if (!this._inflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = - typeof this.params[key] !== 'number' - ? zlib.Z_DEFAULT_WINDOWBITS - : this.params[key]; - - this._inflate = zlib.createInflateRaw({ - ...this._options.zlibInflateOptions, - windowBits - }); - this._inflate[kPerMessageDeflate] = this; - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - this._inflate.on('error', inflateOnError); - this._inflate.on('data', inflateOnData); - } - - this._inflate[kCallback] = callback; - - this._inflate.write(data); - if (fin) this._inflate.write(TRAILER); - - this._inflate.flush(() => { - const err = this._inflate[kError]; - - if (err) { - this._inflate.close(); - this._inflate = null; - callback(err); - return; - } - - const data = bufferUtil.concat( - this._inflate[kBuffers], - this._inflate[kTotalLength] - ); - - if (this._inflate._readableState.endEmitted) { - this._inflate.close(); - this._inflate = null; - } else { - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - - if (fin && this.params[`${endpoint}_no_context_takeover`]) { - this._inflate.reset(); - } - } - - callback(null, data); - }); - } - - /** - * Compress data. - * - * @param {Buffer} data Data to compress - * @param {Boolean} fin Specifies whether or not this is the last fragment - * @param {Function} callback Callback - * @private - */ - _compress(data, fin, callback) { - const endpoint = this._isServer ? 'server' : 'client'; - - if (!this._deflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = - typeof this.params[key] !== 'number' - ? zlib.Z_DEFAULT_WINDOWBITS - : this.params[key]; - - this._deflate = zlib.createDeflateRaw({ - ...this._options.zlibDeflateOptions, - windowBits - }); - - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - - // - // An `'error'` event is emitted, only on Node.js < 10.0.0, if the - // `zlib.DeflateRaw` instance is closed while data is being processed. - // This can happen if `PerMessageDeflate#cleanup()` is called at the wrong - // time due to an abnormal WebSocket closure. - // - this._deflate.on('error', NOOP); - this._deflate.on('data', deflateOnData); - } - - this._deflate[kCallback] = callback; - - this._deflate.write(data); - this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { - if (!this._deflate) { - // - // The deflate stream was closed while data was being processed. - // - return; - } - - let data = bufferUtil.concat( - this._deflate[kBuffers], - this._deflate[kTotalLength] - ); - - if (fin) data = data.slice(0, data.length - 4); - - // - // Ensure that the callback will not be called again in - // `PerMessageDeflate#cleanup()`. - // - this._deflate[kCallback] = null; - - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - - if (fin && this.params[`${endpoint}_no_context_takeover`]) { - this._deflate.reset(); - } - - callback(null, data); - }); - } -} - -module.exports = PerMessageDeflate; - -/** - * The listener of the `zlib.DeflateRaw` stream `'data'` event. - * - * @param {Buffer} chunk A chunk of data - * @private - */ -function deflateOnData(chunk) { - this[kBuffers].push(chunk); - this[kTotalLength] += chunk.length; -} - -/** - * The listener of the `zlib.InflateRaw` stream `'data'` event. - * - * @param {Buffer} chunk A chunk of data - * @private - */ -function inflateOnData(chunk) { - this[kTotalLength] += chunk.length; - - if ( - this[kPerMessageDeflate]._maxPayload < 1 || - this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload - ) { - this[kBuffers].push(chunk); - return; - } - - this[kError] = new RangeError('Max payload size exceeded'); - this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'; - this[kError][kStatusCode] = 1009; - this.removeListener('data', inflateOnData); - this.reset(); -} - -/** - * The listener of the `zlib.InflateRaw` stream `'error'` event. - * - * @param {Error} err The emitted error - * @private - */ -function inflateOnError(err) { - // - // There is no need to call `Zlib#close()` as the handle is automatically - // closed when an error is emitted. - // - this[kPerMessageDeflate]._inflate = null; - err[kStatusCode] = 1007; - this[kCallback](err); -} - - -/***/ }), - -/***/ 25066: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Writable } = __nccwpck_require__(12781); - -const PerMessageDeflate = __nccwpck_require__(56684); -const { - BINARY_TYPES, - EMPTY_BUFFER, - kStatusCode, - kWebSocket -} = __nccwpck_require__(15949); -const { concat, toArrayBuffer, unmask } = __nccwpck_require__(9436); -const { isValidStatusCode, isValidUTF8 } = __nccwpck_require__(86279); - -const GET_INFO = 0; -const GET_PAYLOAD_LENGTH_16 = 1; -const GET_PAYLOAD_LENGTH_64 = 2; -const GET_MASK = 3; -const GET_DATA = 4; -const INFLATING = 5; - -/** - * HyBi Receiver implementation. - * - * @extends Writable - */ -class Receiver extends Writable { - /** - * Creates a Receiver instance. - * - * @param {String} [binaryType=nodebuffer] The type for binary data - * @param {Object} [extensions] An object containing the negotiated extensions - * @param {Boolean} [isServer=false] Specifies whether to operate in client or - * server mode - * @param {Number} [maxPayload=0] The maximum allowed message length - */ - constructor(binaryType, extensions, isServer, maxPayload) { - super(); - - this._binaryType = binaryType || BINARY_TYPES[0]; - this[kWebSocket] = undefined; - this._extensions = extensions || {}; - this._isServer = !!isServer; - this._maxPayload = maxPayload | 0; - - this._bufferedBytes = 0; - this._buffers = []; - - this._compressed = false; - this._payloadLength = 0; - this._mask = undefined; - this._fragmented = 0; - this._masked = false; - this._fin = false; - this._opcode = 0; - - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragments = []; - - this._state = GET_INFO; - this._loop = false; - } - - /** - * Implements `Writable.prototype._write()`. - * - * @param {Buffer} chunk The chunk of data to write - * @param {String} encoding The character encoding of `chunk` - * @param {Function} cb Callback - * @private - */ - _write(chunk, encoding, cb) { - if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); - - this._bufferedBytes += chunk.length; - this._buffers.push(chunk); - this.startLoop(cb); - } - - /** - * Consumes `n` bytes from the buffered data. - * - * @param {Number} n The number of bytes to consume - * @return {Buffer} The consumed bytes - * @private - */ - consume(n) { - this._bufferedBytes -= n; - - if (n === this._buffers[0].length) return this._buffers.shift(); - - if (n < this._buffers[0].length) { - const buf = this._buffers[0]; - this._buffers[0] = buf.slice(n); - return buf.slice(0, n); - } - - const dst = Buffer.allocUnsafe(n); - - do { - const buf = this._buffers[0]; - const offset = dst.length - n; - - if (n >= buf.length) { - dst.set(this._buffers.shift(), offset); - } else { - dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); - this._buffers[0] = buf.slice(n); - } - - n -= buf.length; - } while (n > 0); - - return dst; - } - - /** - * Starts the parsing loop. - * - * @param {Function} cb Callback - * @private - */ - startLoop(cb) { - let err; - this._loop = true; - - do { - switch (this._state) { - case GET_INFO: - err = this.getInfo(); - break; - case GET_PAYLOAD_LENGTH_16: - err = this.getPayloadLength16(); - break; - case GET_PAYLOAD_LENGTH_64: - err = this.getPayloadLength64(); - break; - case GET_MASK: - this.getMask(); - break; - case GET_DATA: - err = this.getData(cb); - break; - default: - // `INFLATING` - this._loop = false; - return; - } - } while (this._loop); - - cb(err); - } - - /** - * Reads the first two bytes of a frame. - * - * @return {(RangeError|undefined)} A possible error - * @private - */ - getInfo() { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - - const buf = this.consume(2); - - if ((buf[0] & 0x30) !== 0x00) { - this._loop = false; - return error( - RangeError, - 'RSV2 and RSV3 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_2_3' - ); - } - - const compressed = (buf[0] & 0x40) === 0x40; - - if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { - this._loop = false; - return error( - RangeError, - 'RSV1 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_1' - ); - } - - this._fin = (buf[0] & 0x80) === 0x80; - this._opcode = buf[0] & 0x0f; - this._payloadLength = buf[1] & 0x7f; - - if (this._opcode === 0x00) { - if (compressed) { - this._loop = false; - return error( - RangeError, - 'RSV1 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_1' - ); - } - - if (!this._fragmented) { - this._loop = false; - return error( - RangeError, - 'invalid opcode 0', - true, - 1002, - 'WS_ERR_INVALID_OPCODE' - ); - } - - this._opcode = this._fragmented; - } else if (this._opcode === 0x01 || this._opcode === 0x02) { - if (this._fragmented) { - this._loop = false; - return error( - RangeError, - `invalid opcode ${this._opcode}`, - true, - 1002, - 'WS_ERR_INVALID_OPCODE' - ); - } - - this._compressed = compressed; - } else if (this._opcode > 0x07 && this._opcode < 0x0b) { - if (!this._fin) { - this._loop = false; - return error( - RangeError, - 'FIN must be set', - true, - 1002, - 'WS_ERR_EXPECTED_FIN' - ); - } - - if (compressed) { - this._loop = false; - return error( - RangeError, - 'RSV1 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_1' - ); - } - - if (this._payloadLength > 0x7d) { - this._loop = false; - return error( - RangeError, - `invalid payload length ${this._payloadLength}`, - true, - 1002, - 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH' - ); - } - } else { - this._loop = false; - return error( - RangeError, - `invalid opcode ${this._opcode}`, - true, - 1002, - 'WS_ERR_INVALID_OPCODE' - ); - } - - if (!this._fin && !this._fragmented) this._fragmented = this._opcode; - this._masked = (buf[1] & 0x80) === 0x80; - - if (this._isServer) { - if (!this._masked) { - this._loop = false; - return error( - RangeError, - 'MASK must be set', - true, - 1002, - 'WS_ERR_EXPECTED_MASK' - ); - } - } else if (this._masked) { - this._loop = false; - return error( - RangeError, - 'MASK must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_MASK' - ); - } - - if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; - else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; - else return this.haveLength(); - } - - /** - * Gets extended payload length (7+16). - * - * @return {(RangeError|undefined)} A possible error - * @private - */ - getPayloadLength16() { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - - this._payloadLength = this.consume(2).readUInt16BE(0); - return this.haveLength(); - } - - /** - * Gets extended payload length (7+64). - * - * @return {(RangeError|undefined)} A possible error - * @private - */ - getPayloadLength64() { - if (this._bufferedBytes < 8) { - this._loop = false; - return; - } - - const buf = this.consume(8); - const num = buf.readUInt32BE(0); - - // - // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned - // if payload length is greater than this number. - // - if (num > Math.pow(2, 53 - 32) - 1) { - this._loop = false; - return error( - RangeError, - 'Unsupported WebSocket frame: payload length > 2^53 - 1', - false, - 1009, - 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH' - ); - } - - this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); - return this.haveLength(); - } - - /** - * Payload length has been read. - * - * @return {(RangeError|undefined)} A possible error - * @private - */ - haveLength() { - if (this._payloadLength && this._opcode < 0x08) { - this._totalPayloadLength += this._payloadLength; - if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { - this._loop = false; - return error( - RangeError, - 'Max payload size exceeded', - false, - 1009, - 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' - ); - } - } - - if (this._masked) this._state = GET_MASK; - else this._state = GET_DATA; - } - - /** - * Reads mask bytes. - * - * @private - */ - getMask() { - if (this._bufferedBytes < 4) { - this._loop = false; - return; - } - - this._mask = this.consume(4); - this._state = GET_DATA; - } - - /** - * Reads data bytes. - * - * @param {Function} cb Callback - * @return {(Error|RangeError|undefined)} A possible error - * @private - */ - getData(cb) { - let data = EMPTY_BUFFER; - - if (this._payloadLength) { - if (this._bufferedBytes < this._payloadLength) { - this._loop = false; - return; - } - - data = this.consume(this._payloadLength); - if (this._masked) unmask(data, this._mask); - } - - if (this._opcode > 0x07) return this.controlMessage(data); - - if (this._compressed) { - this._state = INFLATING; - this.decompress(data, cb); - return; - } - - if (data.length) { - // - // This message is not compressed so its lenght is the sum of the payload - // length of all fragments. - // - this._messageLength = this._totalPayloadLength; - this._fragments.push(data); - } - - return this.dataMessage(); - } - - /** - * Decompresses data. - * - * @param {Buffer} data Compressed data - * @param {Function} cb Callback - * @private - */ - decompress(data, cb) { - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - - perMessageDeflate.decompress(data, this._fin, (err, buf) => { - if (err) return cb(err); - - if (buf.length) { - this._messageLength += buf.length; - if (this._messageLength > this._maxPayload && this._maxPayload > 0) { - return cb( - error( - RangeError, - 'Max payload size exceeded', - false, - 1009, - 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' - ) - ); - } - - this._fragments.push(buf); - } - - const er = this.dataMessage(); - if (er) return cb(er); - - this.startLoop(cb); - }); - } - - /** - * Handles a data message. - * - * @return {(Error|undefined)} A possible error - * @private - */ - dataMessage() { - if (this._fin) { - const messageLength = this._messageLength; - const fragments = this._fragments; - - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragmented = 0; - this._fragments = []; - - if (this._opcode === 2) { - let data; - - if (this._binaryType === 'nodebuffer') { - data = concat(fragments, messageLength); - } else if (this._binaryType === 'arraybuffer') { - data = toArrayBuffer(concat(fragments, messageLength)); - } else { - data = fragments; - } - - this.emit('message', data); - } else { - const buf = concat(fragments, messageLength); - - if (!isValidUTF8(buf)) { - this._loop = false; - return error( - Error, - 'invalid UTF-8 sequence', - true, - 1007, - 'WS_ERR_INVALID_UTF8' - ); - } - - this.emit('message', buf.toString()); - } - } - - this._state = GET_INFO; - } - - /** - * Handles a control message. - * - * @param {Buffer} data Data to handle - * @return {(Error|RangeError|undefined)} A possible error - * @private - */ - controlMessage(data) { - if (this._opcode === 0x08) { - this._loop = false; - - if (data.length === 0) { - this.emit('conclude', 1005, ''); - this.end(); - } else if (data.length === 1) { - return error( - RangeError, - 'invalid payload length 1', - true, - 1002, - 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH' - ); - } else { - const code = data.readUInt16BE(0); - - if (!isValidStatusCode(code)) { - return error( - RangeError, - `invalid status code ${code}`, - true, - 1002, - 'WS_ERR_INVALID_CLOSE_CODE' - ); - } - - const buf = data.slice(2); - - if (!isValidUTF8(buf)) { - return error( - Error, - 'invalid UTF-8 sequence', - true, - 1007, - 'WS_ERR_INVALID_UTF8' - ); - } - - this.emit('conclude', code, buf.toString()); - this.end(); - } - } else if (this._opcode === 0x09) { - this.emit('ping', data); - } else { - this.emit('pong', data); - } - - this._state = GET_INFO; - } -} - -module.exports = Receiver; - -/** - * Builds an error object. - * - * @param {function(new:Error|RangeError)} ErrorCtor The error constructor - * @param {String} message The error message - * @param {Boolean} prefix Specifies whether or not to add a default prefix to - * `message` - * @param {Number} statusCode The status code - * @param {String} errorCode The exposed error code - * @return {(Error|RangeError)} The error - * @private - */ -function error(ErrorCtor, message, prefix, statusCode, errorCode) { - const err = new ErrorCtor( - prefix ? `Invalid WebSocket frame: ${message}` : message - ); - - Error.captureStackTrace(err, error); - err.code = errorCode; - err[kStatusCode] = statusCode; - return err; -} - - -/***/ }), - -/***/ 36947: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^net|tls$" }] */ - - - -const net = __nccwpck_require__(41808); -const tls = __nccwpck_require__(24404); -const { randomFillSync } = __nccwpck_require__(6113); - -const PerMessageDeflate = __nccwpck_require__(56684); -const { EMPTY_BUFFER } = __nccwpck_require__(15949); -const { isValidStatusCode } = __nccwpck_require__(86279); -const { mask: applyMask, toBuffer } = __nccwpck_require__(9436); - -const mask = Buffer.alloc(4); - -/** - * HyBi Sender implementation. - */ -class Sender { - /** - * Creates a Sender instance. - * - * @param {(net.Socket|tls.Socket)} socket The connection socket - * @param {Object} [extensions] An object containing the negotiated extensions - */ - constructor(socket, extensions) { - this._extensions = extensions || {}; - this._socket = socket; - - this._firstFragment = true; - this._compress = false; - - this._bufferedBytes = 0; - this._deflating = false; - this._queue = []; - } - - /** - * Frames a piece of data according to the HyBi WebSocket protocol. - * - * @param {Buffer} data The data to frame - * @param {Object} options Options object - * @param {Number} options.opcode The opcode - * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be - * modified - * @param {Boolean} [options.fin=false] Specifies whether or not to set the - * FIN bit - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the - * RSV1 bit - * @return {Buffer[]} The framed data as a list of `Buffer` instances - * @public - */ - static frame(data, options) { - const merge = options.mask && options.readOnly; - let offset = options.mask ? 6 : 2; - let payloadLength = data.length; - - if (data.length >= 65536) { - offset += 8; - payloadLength = 127; - } else if (data.length > 125) { - offset += 2; - payloadLength = 126; - } - - const target = Buffer.allocUnsafe(merge ? data.length + offset : offset); - - target[0] = options.fin ? options.opcode | 0x80 : options.opcode; - if (options.rsv1) target[0] |= 0x40; - - target[1] = payloadLength; - - if (payloadLength === 126) { - target.writeUInt16BE(data.length, 2); - } else if (payloadLength === 127) { - target.writeUInt32BE(0, 2); - target.writeUInt32BE(data.length, 6); - } - - if (!options.mask) return [target, data]; - - randomFillSync(mask, 0, 4); - - target[1] |= 0x80; - target[offset - 4] = mask[0]; - target[offset - 3] = mask[1]; - target[offset - 2] = mask[2]; - target[offset - 1] = mask[3]; - - if (merge) { - applyMask(data, mask, target, offset, data.length); - return [target]; - } - - applyMask(data, mask, data, 0, data.length); - return [target, data]; - } - - /** - * Sends a close message to the other peer. - * - * @param {Number} [code] The status code component of the body - * @param {String} [data] The message component of the body - * @param {Boolean} [mask=false] Specifies whether or not to mask the message - * @param {Function} [cb] Callback - * @public - */ - close(code, data, mask, cb) { - let buf; - - if (code === undefined) { - buf = EMPTY_BUFFER; - } else if (typeof code !== 'number' || !isValidStatusCode(code)) { - throw new TypeError('First argument must be a valid error code number'); - } else if (data === undefined || data === '') { - buf = Buffer.allocUnsafe(2); - buf.writeUInt16BE(code, 0); - } else { - const length = Buffer.byteLength(data); - - if (length > 123) { - throw new RangeError('The message must not be greater than 123 bytes'); - } - - buf = Buffer.allocUnsafe(2 + length); - buf.writeUInt16BE(code, 0); - buf.write(data, 2); - } - - if (this._deflating) { - this.enqueue([this.doClose, buf, mask, cb]); - } else { - this.doClose(buf, mask, cb); - } - } - - /** - * Frames and sends a close message. - * - * @param {Buffer} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback - * @private - */ - doClose(data, mask, cb) { - this.sendFrame( - Sender.frame(data, { - fin: true, - rsv1: false, - opcode: 0x08, - mask, - readOnly: false - }), - cb - ); - } - - /** - * Sends a ping message to the other peer. - * - * @param {*} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback - * @public - */ - ping(data, mask, cb) { - const buf = toBuffer(data); - - if (buf.length > 125) { - throw new RangeError('The data size must not be greater than 125 bytes'); - } - - if (this._deflating) { - this.enqueue([this.doPing, buf, mask, toBuffer.readOnly, cb]); - } else { - this.doPing(buf, mask, toBuffer.readOnly, cb); - } - } - - /** - * Frames and sends a ping message. - * - * @param {Buffer} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified - * @param {Function} [cb] Callback - * @private - */ - doPing(data, mask, readOnly, cb) { - this.sendFrame( - Sender.frame(data, { - fin: true, - rsv1: false, - opcode: 0x09, - mask, - readOnly - }), - cb - ); - } - - /** - * Sends a pong message to the other peer. - * - * @param {*} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback - * @public - */ - pong(data, mask, cb) { - const buf = toBuffer(data); - - if (buf.length > 125) { - throw new RangeError('The data size must not be greater than 125 bytes'); - } - - if (this._deflating) { - this.enqueue([this.doPong, buf, mask, toBuffer.readOnly, cb]); - } else { - this.doPong(buf, mask, toBuffer.readOnly, cb); - } - } - - /** - * Frames and sends a pong message. - * - * @param {Buffer} data The message to send - * @param {Boolean} [mask=false] Specifies whether or not to mask `data` - * @param {Boolean} [readOnly=false] Specifies whether `data` can be modified - * @param {Function} [cb] Callback - * @private - */ - doPong(data, mask, readOnly, cb) { - this.sendFrame( - Sender.frame(data, { - fin: true, - rsv1: false, - opcode: 0x0a, - mask, - readOnly - }), - cb - ); - } - - /** - * Sends a data message to the other peer. - * - * @param {*} data The message to send - * @param {Object} options Options object - * @param {Boolean} [options.compress=false] Specifies whether or not to - * compress `data` - * @param {Boolean} [options.binary=false] Specifies whether `data` is binary - * or text - * @param {Boolean} [options.fin=false] Specifies whether the fragment is the - * last one - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Function} [cb] Callback - * @public - */ - send(data, options, cb) { - const buf = toBuffer(data); - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - let opcode = options.binary ? 2 : 1; - let rsv1 = options.compress; - - if (this._firstFragment) { - this._firstFragment = false; - if (rsv1 && perMessageDeflate) { - rsv1 = buf.length >= perMessageDeflate._threshold; - } - this._compress = rsv1; - } else { - rsv1 = false; - opcode = 0; - } - - if (options.fin) this._firstFragment = true; - - if (perMessageDeflate) { - const opts = { - fin: options.fin, - rsv1, - opcode, - mask: options.mask, - readOnly: toBuffer.readOnly - }; - - if (this._deflating) { - this.enqueue([this.dispatch, buf, this._compress, opts, cb]); - } else { - this.dispatch(buf, this._compress, opts, cb); - } - } else { - this.sendFrame( - Sender.frame(buf, { - fin: options.fin, - rsv1: false, - opcode, - mask: options.mask, - readOnly: toBuffer.readOnly - }), - cb - ); - } - } - - /** - * Dispatches a data message. - * - * @param {Buffer} data The message to send - * @param {Boolean} [compress=false] Specifies whether or not to compress - * `data` - * @param {Object} options Options object - * @param {Number} options.opcode The opcode - * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be - * modified - * @param {Boolean} [options.fin=false] Specifies whether or not to set the - * FIN bit - * @param {Boolean} [options.mask=false] Specifies whether or not to mask - * `data` - * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the - * RSV1 bit - * @param {Function} [cb] Callback - * @private - */ - dispatch(data, compress, options, cb) { - if (!compress) { - this.sendFrame(Sender.frame(data, options), cb); - return; - } - - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - - this._bufferedBytes += data.length; - this._deflating = true; - perMessageDeflate.compress(data, options.fin, (_, buf) => { - if (this._socket.destroyed) { - const err = new Error( - 'The socket was closed while data was being compressed' - ); - - if (typeof cb === 'function') cb(err); - - for (let i = 0; i < this._queue.length; i++) { - const callback = this._queue[i][4]; - - if (typeof callback === 'function') callback(err); - } - - return; - } - - this._bufferedBytes -= data.length; - this._deflating = false; - options.readOnly = false; - this.sendFrame(Sender.frame(buf, options), cb); - this.dequeue(); - }); - } - - /** - * Executes queued send operations. - * - * @private - */ - dequeue() { - while (!this._deflating && this._queue.length) { - const params = this._queue.shift(); - - this._bufferedBytes -= params[1].length; - Reflect.apply(params[0], this, params.slice(1)); - } - } - - /** - * Enqueues a send operation. - * - * @param {Array} params Send operation parameters. - * @private - */ - enqueue(params) { - this._bufferedBytes += params[1].length; - this._queue.push(params); - } - - /** - * Sends a frame. - * - * @param {Buffer[]} list The frame to send - * @param {Function} [cb] Callback - * @private - */ - sendFrame(list, cb) { - if (list.length === 2) { - this._socket.cork(); - this._socket.write(list[0]); - this._socket.write(list[1], cb); - this._socket.uncork(); - } else { - this._socket.write(list[0], cb); - } - } -} - -module.exports = Sender; - - -/***/ }), - -/***/ 41658: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Duplex } = __nccwpck_require__(12781); - -/** - * Emits the `'close'` event on a stream. - * - * @param {Duplex} stream The stream. - * @private - */ -function emitClose(stream) { - stream.emit('close'); -} - -/** - * The listener of the `'end'` event. - * - * @private - */ -function duplexOnEnd() { - if (!this.destroyed && this._writableState.finished) { - this.destroy(); - } -} - -/** - * The listener of the `'error'` event. - * - * @param {Error} err The error - * @private - */ -function duplexOnError(err) { - this.removeListener('error', duplexOnError); - this.destroy(); - if (this.listenerCount('error') === 0) { - // Do not suppress the throwing behavior. - this.emit('error', err); - } -} - -/** - * Wraps a `WebSocket` in a duplex stream. - * - * @param {WebSocket} ws The `WebSocket` to wrap - * @param {Object} [options] The options for the `Duplex` constructor - * @return {Duplex} The duplex stream - * @public - */ -function createWebSocketStream(ws, options) { - let resumeOnReceiverDrain = true; - let terminateOnDestroy = true; - - function receiverOnDrain() { - if (resumeOnReceiverDrain) ws._socket.resume(); - } - - if (ws.readyState === ws.CONNECTING) { - ws.once('open', function open() { - ws._receiver.removeAllListeners('drain'); - ws._receiver.on('drain', receiverOnDrain); - }); - } else { - ws._receiver.removeAllListeners('drain'); - ws._receiver.on('drain', receiverOnDrain); - } - - const duplex = new Duplex({ - ...options, - autoDestroy: false, - emitClose: false, - objectMode: false, - writableObjectMode: false - }); - - ws.on('message', function message(msg) { - if (!duplex.push(msg)) { - resumeOnReceiverDrain = false; - ws._socket.pause(); - } - }); - - ws.once('error', function error(err) { - if (duplex.destroyed) return; - - // Prevent `ws.terminate()` from being called by `duplex._destroy()`. - // - // - If the `'error'` event is emitted before the `'open'` event, then - // `ws.terminate()` is a noop as no socket is assigned. - // - Otherwise, the error is re-emitted by the listener of the `'error'` - // event of the `Receiver` object. The listener already closes the - // connection by calling `ws.close()`. This allows a close frame to be - // sent to the other peer. If `ws.terminate()` is called right after this, - // then the close frame might not be sent. - terminateOnDestroy = false; - duplex.destroy(err); - }); - - ws.once('close', function close() { - if (duplex.destroyed) return; - - duplex.push(null); - }); - - duplex._destroy = function (err, callback) { - if (ws.readyState === ws.CLOSED) { - callback(err); - process.nextTick(emitClose, duplex); - return; - } - - let called = false; - - ws.once('error', function error(err) { - called = true; - callback(err); - }); - - ws.once('close', function close() { - if (!called) callback(err); - process.nextTick(emitClose, duplex); - }); - - if (terminateOnDestroy) ws.terminate(); - }; - - duplex._final = function (callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once('open', function open() { - duplex._final(callback); - }); - return; - } - - // If the value of the `_socket` property is `null` it means that `ws` is a - // client websocket and the handshake failed. In fact, when this happens, a - // socket is never assigned to the websocket. Wait for the `'error'` event - // that will be emitted by the websocket. - if (ws._socket === null) return; - - if (ws._socket._writableState.finished) { - callback(); - if (duplex._readableState.endEmitted) duplex.destroy(); - } else { - ws._socket.once('finish', function finish() { - // `duplex` is not destroyed here because the `'end'` event will be - // emitted on `duplex` after this `'finish'` event. The EOF signaling - // `null` chunk is, in fact, pushed when the websocket emits `'close'`. - callback(); - }); - ws.close(); - } - }; - - duplex._read = function () { - if ( - (ws.readyState === ws.OPEN || ws.readyState === ws.CLOSING) && - !resumeOnReceiverDrain - ) { - resumeOnReceiverDrain = true; - if (!ws._receiver._writableState.needDrain) ws._socket.resume(); - } - }; - - duplex._write = function (chunk, encoding, callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once('open', function open() { - duplex._write(chunk, encoding, callback); - }); - return; - } - - ws.send(chunk, callback); - }; - - duplex.on('end', duplexOnEnd); - duplex.on('error', duplexOnError); - return duplex; -} - -module.exports = createWebSocketStream; - - -/***/ }), - -/***/ 86279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/** - * Checks if a status code is allowed in a close frame. - * - * @param {Number} code The status code - * @return {Boolean} `true` if the status code is valid, else `false` - * @public - */ -function isValidStatusCode(code) { - return ( - (code >= 1000 && - code <= 1014 && - code !== 1004 && - code !== 1005 && - code !== 1006) || - (code >= 3000 && code <= 4999) - ); -} - -/** - * Checks if a given buffer contains only correct UTF-8. - * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by - * Markus Kuhn. - * - * @param {Buffer} buf The buffer to check - * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` - * @public - */ -function _isValidUTF8(buf) { - const len = buf.length; - let i = 0; - - while (i < len) { - if ((buf[i] & 0x80) === 0) { - // 0xxxxxxx - i++; - } else if ((buf[i] & 0xe0) === 0xc0) { - // 110xxxxx 10xxxxxx - if ( - i + 1 === len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i] & 0xfe) === 0xc0 // Overlong - ) { - return false; - } - - i += 2; - } else if ((buf[i] & 0xf0) === 0xe0) { - // 1110xxxx 10xxxxxx 10xxxxxx - if ( - i + 2 >= len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i + 2] & 0xc0) !== 0x80 || - (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong - (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF) - ) { - return false; - } - - i += 3; - } else if ((buf[i] & 0xf8) === 0xf0) { - // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - if ( - i + 3 >= len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i + 2] & 0xc0) !== 0x80 || - (buf[i + 3] & 0xc0) !== 0x80 || - (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong - (buf[i] === 0xf4 && buf[i + 1] > 0x8f) || - buf[i] > 0xf4 // > U+10FFFF - ) { - return false; - } - - i += 4; - } else { - return false; - } - } - - return true; -} - -try { - let isValidUTF8 = __nccwpck_require__(24592); - - /* istanbul ignore if */ - if (typeof isValidUTF8 === 'object') { - isValidUTF8 = isValidUTF8.Validation.isValidUTF8; // utf-8-validate@<3.0.0 - } - - module.exports = { - isValidStatusCode, - isValidUTF8(buf) { - return buf.length < 150 ? _isValidUTF8(buf) : isValidUTF8(buf); - } - }; -} catch (e) /* istanbul ignore next */ { - module.exports = { - isValidStatusCode, - isValidUTF8: _isValidUTF8 - }; -} - - -/***/ }), - -/***/ 58887: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^net|tls|https$" }] */ - - - -const EventEmitter = __nccwpck_require__(82361); -const http = __nccwpck_require__(13685); -const https = __nccwpck_require__(95687); -const net = __nccwpck_require__(41808); -const tls = __nccwpck_require__(24404); -const { createHash } = __nccwpck_require__(6113); - -const PerMessageDeflate = __nccwpck_require__(56684); -const WebSocket = __nccwpck_require__(91518); -const { format, parse } = __nccwpck_require__(92035); -const { GUID, kWebSocket } = __nccwpck_require__(15949); - -const keyRegex = /^[+/0-9A-Za-z]{22}==$/; - -const RUNNING = 0; -const CLOSING = 1; -const CLOSED = 2; - -/** - * Class representing a WebSocket server. - * - * @extends EventEmitter - */ -class WebSocketServer extends EventEmitter { - /** - * Create a `WebSocketServer` instance. - * - * @param {Object} options Configuration options - * @param {Number} [options.backlog=511] The maximum length of the queue of - * pending connections - * @param {Boolean} [options.clientTracking=true] Specifies whether or not to - * track clients - * @param {Function} [options.handleProtocols] A hook to handle protocols - * @param {String} [options.host] The hostname where to bind the server - * @param {Number} [options.maxPayload=104857600] The maximum allowed message - * size - * @param {Boolean} [options.noServer=false] Enable no server mode - * @param {String} [options.path] Accept only connections matching this path - * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable - * permessage-deflate - * @param {Number} [options.port] The port where to bind the server - * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S - * server to use - * @param {Function} [options.verifyClient] A hook to reject connections - * @param {Function} [callback] A listener for the `listening` event - */ - constructor(options, callback) { - super(); - - options = { - maxPayload: 100 * 1024 * 1024, - perMessageDeflate: false, - handleProtocols: null, - clientTracking: true, - verifyClient: null, - noServer: false, - backlog: null, // use default (511 as implemented in net.js) - server: null, - host: null, - path: null, - port: null, - ...options - }; - - if ( - (options.port == null && !options.server && !options.noServer) || - (options.port != null && (options.server || options.noServer)) || - (options.server && options.noServer) - ) { - throw new TypeError( - 'One and only one of the "port", "server", or "noServer" options ' + - 'must be specified' - ); - } - - if (options.port != null) { - this._server = http.createServer((req, res) => { - const body = http.STATUS_CODES[426]; - - res.writeHead(426, { - 'Content-Length': body.length, - 'Content-Type': 'text/plain' - }); - res.end(body); - }); - this._server.listen( - options.port, - options.host, - options.backlog, - callback - ); - } else if (options.server) { - this._server = options.server; - } - - if (this._server) { - const emitConnection = this.emit.bind(this, 'connection'); - - this._removeListeners = addListeners(this._server, { - listening: this.emit.bind(this, 'listening'), - error: this.emit.bind(this, 'error'), - upgrade: (req, socket, head) => { - this.handleUpgrade(req, socket, head, emitConnection); - } - }); - } - - if (options.perMessageDeflate === true) options.perMessageDeflate = {}; - if (options.clientTracking) this.clients = new Set(); - this.options = options; - this._state = RUNNING; - } - - /** - * Returns the bound address, the address family name, and port of the server - * as reported by the operating system if listening on an IP socket. - * If the server is listening on a pipe or UNIX domain socket, the name is - * returned as a string. - * - * @return {(Object|String|null)} The address of the server - * @public - */ - address() { - if (this.options.noServer) { - throw new Error('The server is operating in "noServer" mode'); - } - - if (!this._server) return null; - return this._server.address(); - } - - /** - * Close the server. - * - * @param {Function} [cb] Callback - * @public - */ - close(cb) { - if (cb) this.once('close', cb); - - if (this._state === CLOSED) { - process.nextTick(emitClose, this); - return; - } - - if (this._state === CLOSING) return; - this._state = CLOSING; - - // - // Terminate all associated clients. - // - if (this.clients) { - for (const client of this.clients) client.terminate(); - } - - const server = this._server; - - if (server) { - this._removeListeners(); - this._removeListeners = this._server = null; - - // - // Close the http server if it was internally created. - // - if (this.options.port != null) { - server.close(emitClose.bind(undefined, this)); - return; - } - } - - process.nextTick(emitClose, this); - } - - /** - * See if a given request should be handled by this server instance. - * - * @param {http.IncomingMessage} req Request object to inspect - * @return {Boolean} `true` if the request is valid, else `false` - * @public - */ - shouldHandle(req) { - if (this.options.path) { - const index = req.url.indexOf('?'); - const pathname = index !== -1 ? req.url.slice(0, index) : req.url; - - if (pathname !== this.options.path) return false; - } - - return true; - } - - /** - * Handle a HTTP Upgrade request. - * - * @param {http.IncomingMessage} req The request object - * @param {(net.Socket|tls.Socket)} socket The network socket between the - * server and client - * @param {Buffer} head The first packet of the upgraded stream - * @param {Function} cb Callback - * @public - */ - handleUpgrade(req, socket, head, cb) { - socket.on('error', socketOnError); - - const key = - req.headers['sec-websocket-key'] !== undefined - ? req.headers['sec-websocket-key'].trim() - : false; - const upgrade = req.headers.upgrade; - const version = +req.headers['sec-websocket-version']; - const extensions = {}; - - if ( - req.method !== 'GET' || - upgrade === undefined || - upgrade.toLowerCase() !== 'websocket' || - !key || - !keyRegex.test(key) || - (version !== 8 && version !== 13) || - !this.shouldHandle(req) - ) { - return abortHandshake(socket, 400); - } - - if (this.options.perMessageDeflate) { - const perMessageDeflate = new PerMessageDeflate( - this.options.perMessageDeflate, - true, - this.options.maxPayload - ); - - try { - const offers = parse(req.headers['sec-websocket-extensions']); - - if (offers[PerMessageDeflate.extensionName]) { - perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); - extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - } catch (err) { - return abortHandshake(socket, 400); - } - } - - // - // Optionally call external client verification handler. - // - if (this.options.verifyClient) { - const info = { - origin: - req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], - secure: !!(req.socket.authorized || req.socket.encrypted), - req - }; - - if (this.options.verifyClient.length === 2) { - this.options.verifyClient(info, (verified, code, message, headers) => { - if (!verified) { - return abortHandshake(socket, code || 401, message, headers); - } - - this.completeUpgrade(key, extensions, req, socket, head, cb); - }); - return; - } - - if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); - } - - this.completeUpgrade(key, extensions, req, socket, head, cb); - } - - /** - * Upgrade the connection to WebSocket. - * - * @param {String} key The value of the `Sec-WebSocket-Key` header - * @param {Object} extensions The accepted extensions - * @param {http.IncomingMessage} req The request object - * @param {(net.Socket|tls.Socket)} socket The network socket between the - * server and client - * @param {Buffer} head The first packet of the upgraded stream - * @param {Function} cb Callback - * @throws {Error} If called more than once with the same socket - * @private - */ - completeUpgrade(key, extensions, req, socket, head, cb) { - // - // Destroy the socket if the client has already sent a FIN packet. - // - if (!socket.readable || !socket.writable) return socket.destroy(); - - if (socket[kWebSocket]) { - throw new Error( - 'server.handleUpgrade() was called more than once with the same ' + - 'socket, possibly due to a misconfiguration' - ); - } - - if (this._state > RUNNING) return abortHandshake(socket, 503); - - const digest = createHash('sha1') - .update(key + GUID) - .digest('base64'); - - const headers = [ - 'HTTP/1.1 101 Switching Protocols', - 'Upgrade: websocket', - 'Connection: Upgrade', - `Sec-WebSocket-Accept: ${digest}` - ]; - - const ws = new WebSocket(null); - let protocol = req.headers['sec-websocket-protocol']; - - if (protocol) { - protocol = protocol.split(',').map(trim); - - // - // Optionally call external protocol selection handler. - // - if (this.options.handleProtocols) { - protocol = this.options.handleProtocols(protocol, req); - } else { - protocol = protocol[0]; - } - - if (protocol) { - headers.push(`Sec-WebSocket-Protocol: ${protocol}`); - ws._protocol = protocol; - } - } - - if (extensions[PerMessageDeflate.extensionName]) { - const params = extensions[PerMessageDeflate.extensionName].params; - const value = format({ - [PerMessageDeflate.extensionName]: [params] - }); - headers.push(`Sec-WebSocket-Extensions: ${value}`); - ws._extensions = extensions; - } - - // - // Allow external modification/inspection of handshake headers. - // - this.emit('headers', headers, req); - - socket.write(headers.concat('\r\n').join('\r\n')); - socket.removeListener('error', socketOnError); - - ws.setSocket(socket, head, this.options.maxPayload); - - if (this.clients) { - this.clients.add(ws); - ws.on('close', () => this.clients.delete(ws)); - } - - cb(ws, req); - } -} - -module.exports = WebSocketServer; - -/** - * Add event listeners on an `EventEmitter` using a map of - * pairs. - * - * @param {EventEmitter} server The event emitter - * @param {Object.} map The listeners to add - * @return {Function} A function that will remove the added listeners when - * called - * @private - */ -function addListeners(server, map) { - for (const event of Object.keys(map)) server.on(event, map[event]); - - return function removeListeners() { - for (const event of Object.keys(map)) { - server.removeListener(event, map[event]); - } - }; -} - -/** - * Emit a `'close'` event on an `EventEmitter`. - * - * @param {EventEmitter} server The event emitter - * @private - */ -function emitClose(server) { - server._state = CLOSED; - server.emit('close'); -} - -/** - * Handle premature socket errors. - * - * @private - */ -function socketOnError() { - this.destroy(); -} - -/** - * Close the connection when preconditions are not fulfilled. - * - * @param {(net.Socket|tls.Socket)} socket The socket of the upgrade request - * @param {Number} code The HTTP response status code - * @param {String} [message] The HTTP response body - * @param {Object} [headers] Additional HTTP response headers - * @private - */ -function abortHandshake(socket, code, message, headers) { - if (socket.writable) { - message = message || http.STATUS_CODES[code]; - headers = { - Connection: 'close', - 'Content-Type': 'text/html', - 'Content-Length': Buffer.byteLength(message), - ...headers - }; - - socket.write( - `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + - Object.keys(headers) - .map((h) => `${h}: ${headers[h]}`) - .join('\r\n') + - '\r\n\r\n' + - message - ); - } - - socket.removeListener('error', socketOnError); - socket.destroy(); -} - -/** - * Remove whitespace characters from both ends of a string. - * - * @param {String} str The string - * @return {String} A new string representing `str` stripped of whitespace - * characters from both its beginning and end - * @private - */ -function trim(str) { - return str.trim(); -} - - -/***/ }), - -/***/ 91518: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */ - - - -const EventEmitter = __nccwpck_require__(82361); -const https = __nccwpck_require__(95687); -const http = __nccwpck_require__(13685); -const net = __nccwpck_require__(41808); -const tls = __nccwpck_require__(24404); -const { randomBytes, createHash } = __nccwpck_require__(6113); -const { Readable } = __nccwpck_require__(12781); -const { URL } = __nccwpck_require__(57310); - -const PerMessageDeflate = __nccwpck_require__(56684); -const Receiver = __nccwpck_require__(25066); -const Sender = __nccwpck_require__(36947); -const { - BINARY_TYPES, - EMPTY_BUFFER, - GUID, - kStatusCode, - kWebSocket, - NOOP -} = __nccwpck_require__(15949); -const { addEventListener, removeEventListener } = __nccwpck_require__(64561); -const { format, parse } = __nccwpck_require__(92035); -const { toBuffer } = __nccwpck_require__(9436); - -const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; -const protocolVersions = [8, 13]; -const closeTimeout = 30 * 1000; - -/** - * Class representing a WebSocket. - * - * @extends EventEmitter - */ -class WebSocket extends EventEmitter { - /** - * Create a new `WebSocket`. - * - * @param {(String|URL)} address The URL to which to connect - * @param {(String|String[])} [protocols] The subprotocols - * @param {Object} [options] Connection options - */ - constructor(address, protocols, options) { - super(); - - this._binaryType = BINARY_TYPES[0]; - this._closeCode = 1006; - this._closeFrameReceived = false; - this._closeFrameSent = false; - this._closeMessage = ''; - this._closeTimer = null; - this._extensions = {}; - this._protocol = ''; - this._readyState = WebSocket.CONNECTING; - this._receiver = null; - this._sender = null; - this._socket = null; - - if (address !== null) { - this._bufferedAmount = 0; - this._isServer = false; - this._redirects = 0; - - if (Array.isArray(protocols)) { - protocols = protocols.join(', '); - } else if (typeof protocols === 'object' && protocols !== null) { - options = protocols; - protocols = undefined; - } - - initAsClient(this, address, protocols, options); - } else { - this._isServer = true; - } - } - - /** - * This deviates from the WHATWG interface since ws doesn't support the - * required default "blob" type (instead we define a custom "nodebuffer" - * type). - * - * @type {String} - */ - get binaryType() { - return this._binaryType; - } - - set binaryType(type) { - if (!BINARY_TYPES.includes(type)) return; - - this._binaryType = type; - - // - // Allow to change `binaryType` on the fly. - // - if (this._receiver) this._receiver._binaryType = type; - } - - /** - * @type {Number} - */ - get bufferedAmount() { - if (!this._socket) return this._bufferedAmount; - - return this._socket._writableState.length + this._sender._bufferedBytes; - } - - /** - * @type {String} - */ - get extensions() { - return Object.keys(this._extensions).join(); - } - - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onclose() { - return undefined; - } - - /* istanbul ignore next */ - set onclose(listener) {} - - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onerror() { - return undefined; - } - - /* istanbul ignore next */ - set onerror(listener) {} - - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onopen() { - return undefined; - } - - /* istanbul ignore next */ - set onopen(listener) {} - - /** - * @type {Function} - */ - /* istanbul ignore next */ - get onmessage() { - return undefined; - } - - /* istanbul ignore next */ - set onmessage(listener) {} - - /** - * @type {String} - */ - get protocol() { - return this._protocol; - } - - /** - * @type {Number} - */ - get readyState() { - return this._readyState; - } - - /** - * @type {String} - */ - get url() { - return this._url; - } - - /** - * Set up the socket and the internal resources. - * - * @param {(net.Socket|tls.Socket)} socket The network socket between the - * server and client - * @param {Buffer} head The first packet of the upgraded stream - * @param {Number} [maxPayload=0] The maximum allowed message size - * @private - */ - setSocket(socket, head, maxPayload) { - const receiver = new Receiver( - this.binaryType, - this._extensions, - this._isServer, - maxPayload - ); - - this._sender = new Sender(socket, this._extensions); - this._receiver = receiver; - this._socket = socket; - - receiver[kWebSocket] = this; - socket[kWebSocket] = this; - - receiver.on('conclude', receiverOnConclude); - receiver.on('drain', receiverOnDrain); - receiver.on('error', receiverOnError); - receiver.on('message', receiverOnMessage); - receiver.on('ping', receiverOnPing); - receiver.on('pong', receiverOnPong); - - socket.setTimeout(0); - socket.setNoDelay(); - - if (head.length > 0) socket.unshift(head); - - socket.on('close', socketOnClose); - socket.on('data', socketOnData); - socket.on('end', socketOnEnd); - socket.on('error', socketOnError); - - this._readyState = WebSocket.OPEN; - this.emit('open'); - } - - /** - * Emit the `'close'` event. - * - * @private - */ - emitClose() { - if (!this._socket) { - this._readyState = WebSocket.CLOSED; - this.emit('close', this._closeCode, this._closeMessage); - return; - } - - if (this._extensions[PerMessageDeflate.extensionName]) { - this._extensions[PerMessageDeflate.extensionName].cleanup(); - } - - this._receiver.removeAllListeners(); - this._readyState = WebSocket.CLOSED; - this.emit('close', this._closeCode, this._closeMessage); - } - - /** - * Start a closing handshake. - * - * +----------+ +-----------+ +----------+ - * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - - * | +----------+ +-----------+ +----------+ | - * +----------+ +-----------+ | - * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING - * +----------+ +-----------+ | - * | | | +---+ | - * +------------------------+-->|fin| - - - - - * | +---+ | +---+ - * - - - - -|fin|<---------------------+ - * +---+ - * - * @param {Number} [code] Status code explaining why the connection is closing - * @param {String} [data] A string explaining why the connection is closing - * @public - */ - close(code, data) { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - const msg = 'WebSocket was closed before the connection was established'; - return abortHandshake(this, this._req, msg); - } - - if (this.readyState === WebSocket.CLOSING) { - if ( - this._closeFrameSent && - (this._closeFrameReceived || this._receiver._writableState.errorEmitted) - ) { - this._socket.end(); - } - - return; - } - - this._readyState = WebSocket.CLOSING; - this._sender.close(code, data, !this._isServer, (err) => { - // - // This error is handled by the `'error'` listener on the socket. We only - // want to know if the close frame has been sent here. - // - if (err) return; - - this._closeFrameSent = true; - - if ( - this._closeFrameReceived || - this._receiver._writableState.errorEmitted - ) { - this._socket.end(); - } - }); - - // - // Specify a timeout for the closing handshake to complete. - // - this._closeTimer = setTimeout( - this._socket.destroy.bind(this._socket), - closeTimeout - ); - } - - /** - * Send a ping. - * - * @param {*} [data] The data to send - * @param {Boolean} [mask] Indicates whether or not to mask `data` - * @param {Function} [cb] Callback which is executed when the ping is sent - * @public - */ - ping(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) { - throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); - } - - if (typeof data === 'function') { - cb = data; - data = mask = undefined; - } else if (typeof mask === 'function') { - cb = mask; - mask = undefined; - } - - if (typeof data === 'number') data = data.toString(); - - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - - if (mask === undefined) mask = !this._isServer; - this._sender.ping(data || EMPTY_BUFFER, mask, cb); - } - - /** - * Send a pong. - * - * @param {*} [data] The data to send - * @param {Boolean} [mask] Indicates whether or not to mask `data` - * @param {Function} [cb] Callback which is executed when the pong is sent - * @public - */ - pong(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) { - throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); - } - - if (typeof data === 'function') { - cb = data; - data = mask = undefined; - } else if (typeof mask === 'function') { - cb = mask; - mask = undefined; - } - - if (typeof data === 'number') data = data.toString(); - - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - - if (mask === undefined) mask = !this._isServer; - this._sender.pong(data || EMPTY_BUFFER, mask, cb); - } - - /** - * Send a data message. - * - * @param {*} data The message to send - * @param {Object} [options] Options object - * @param {Boolean} [options.compress] Specifies whether or not to compress - * `data` - * @param {Boolean} [options.binary] Specifies whether `data` is binary or - * text - * @param {Boolean} [options.fin=true] Specifies whether the fragment is the - * last one - * @param {Boolean} [options.mask] Specifies whether or not to mask `data` - * @param {Function} [cb] Callback which is executed when data is written out - * @public - */ - send(data, options, cb) { - if (this.readyState === WebSocket.CONNECTING) { - throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); - } - - if (typeof options === 'function') { - cb = options; - options = {}; - } - - if (typeof data === 'number') data = data.toString(); - - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - - const opts = { - binary: typeof data !== 'string', - mask: !this._isServer, - compress: true, - fin: true, - ...options - }; - - if (!this._extensions[PerMessageDeflate.extensionName]) { - opts.compress = false; - } - - this._sender.send(data || EMPTY_BUFFER, opts, cb); - } - - /** - * Forcibly close the connection. - * - * @public - */ - terminate() { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - const msg = 'WebSocket was closed before the connection was established'; - return abortHandshake(this, this._req, msg); - } - - if (this._socket) { - this._readyState = WebSocket.CLOSING; - this._socket.destroy(); - } - } -} - -/** - * @constant {Number} CONNECTING - * @memberof WebSocket - */ -Object.defineProperty(WebSocket, 'CONNECTING', { - enumerable: true, - value: readyStates.indexOf('CONNECTING') -}); - -/** - * @constant {Number} CONNECTING - * @memberof WebSocket.prototype - */ -Object.defineProperty(WebSocket.prototype, 'CONNECTING', { - enumerable: true, - value: readyStates.indexOf('CONNECTING') -}); - -/** - * @constant {Number} OPEN - * @memberof WebSocket - */ -Object.defineProperty(WebSocket, 'OPEN', { - enumerable: true, - value: readyStates.indexOf('OPEN') -}); - -/** - * @constant {Number} OPEN - * @memberof WebSocket.prototype - */ -Object.defineProperty(WebSocket.prototype, 'OPEN', { - enumerable: true, - value: readyStates.indexOf('OPEN') -}); - -/** - * @constant {Number} CLOSING - * @memberof WebSocket - */ -Object.defineProperty(WebSocket, 'CLOSING', { - enumerable: true, - value: readyStates.indexOf('CLOSING') -}); - -/** - * @constant {Number} CLOSING - * @memberof WebSocket.prototype - */ -Object.defineProperty(WebSocket.prototype, 'CLOSING', { - enumerable: true, - value: readyStates.indexOf('CLOSING') -}); - -/** - * @constant {Number} CLOSED - * @memberof WebSocket - */ -Object.defineProperty(WebSocket, 'CLOSED', { - enumerable: true, - value: readyStates.indexOf('CLOSED') -}); - -/** - * @constant {Number} CLOSED - * @memberof WebSocket.prototype - */ -Object.defineProperty(WebSocket.prototype, 'CLOSED', { - enumerable: true, - value: readyStates.indexOf('CLOSED') -}); - -[ - 'binaryType', - 'bufferedAmount', - 'extensions', - 'protocol', - 'readyState', - 'url' -].forEach((property) => { - Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); -}); - -// -// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes. -// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface -// -['open', 'error', 'close', 'message'].forEach((method) => { - Object.defineProperty(WebSocket.prototype, `on${method}`, { - enumerable: true, - get() { - const listeners = this.listeners(method); - for (let i = 0; i < listeners.length; i++) { - if (listeners[i]._listener) return listeners[i]._listener; - } - - return undefined; - }, - set(listener) { - const listeners = this.listeners(method); - for (let i = 0; i < listeners.length; i++) { - // - // Remove only the listeners added via `addEventListener`. - // - if (listeners[i]._listener) this.removeListener(method, listeners[i]); - } - this.addEventListener(method, listener); - } - }); -}); - -WebSocket.prototype.addEventListener = addEventListener; -WebSocket.prototype.removeEventListener = removeEventListener; - -module.exports = WebSocket; - -/** - * Initialize a WebSocket client. - * - * @param {WebSocket} websocket The client to initialize - * @param {(String|URL)} address The URL to which to connect - * @param {String} [protocols] The subprotocols - * @param {Object} [options] Connection options - * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable - * permessage-deflate - * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the - * handshake request - * @param {Number} [options.protocolVersion=13] Value of the - * `Sec-WebSocket-Version` header - * @param {String} [options.origin] Value of the `Origin` or - * `Sec-WebSocket-Origin` header - * @param {Number} [options.maxPayload=104857600] The maximum allowed message - * size - * @param {Boolean} [options.followRedirects=false] Whether or not to follow - * redirects - * @param {Number} [options.maxRedirects=10] The maximum number of redirects - * allowed - * @private - */ -function initAsClient(websocket, address, protocols, options) { - const opts = { - protocolVersion: protocolVersions[1], - maxPayload: 100 * 1024 * 1024, - perMessageDeflate: true, - followRedirects: false, - maxRedirects: 10, - ...options, - createConnection: undefined, - socketPath: undefined, - hostname: undefined, - protocol: undefined, - timeout: undefined, - method: undefined, - host: undefined, - path: undefined, - port: undefined - }; - - if (!protocolVersions.includes(opts.protocolVersion)) { - throw new RangeError( - `Unsupported protocol version: ${opts.protocolVersion} ` + - `(supported versions: ${protocolVersions.join(', ')})` - ); - } - - let parsedUrl; - - if (address instanceof URL) { - parsedUrl = address; - websocket._url = address.href; - } else { - parsedUrl = new URL(address); - websocket._url = address; - } - - const isUnixSocket = parsedUrl.protocol === 'ws+unix:'; - - if (!parsedUrl.host && (!isUnixSocket || !parsedUrl.pathname)) { - const err = new Error(`Invalid URL: ${websocket.url}`); - - if (websocket._redirects === 0) { - throw err; - } else { - emitErrorAndClose(websocket, err); - return; - } - } - - const isSecure = - parsedUrl.protocol === 'wss:' || parsedUrl.protocol === 'https:'; - const defaultPort = isSecure ? 443 : 80; - const key = randomBytes(16).toString('base64'); - const get = isSecure ? https.get : http.get; - let perMessageDeflate; - - opts.createConnection = isSecure ? tlsConnect : netConnect; - opts.defaultPort = opts.defaultPort || defaultPort; - opts.port = parsedUrl.port || defaultPort; - opts.host = parsedUrl.hostname.startsWith('[') - ? parsedUrl.hostname.slice(1, -1) - : parsedUrl.hostname; - opts.headers = { - 'Sec-WebSocket-Version': opts.protocolVersion, - 'Sec-WebSocket-Key': key, - Connection: 'Upgrade', - Upgrade: 'websocket', - ...opts.headers - }; - opts.path = parsedUrl.pathname + parsedUrl.search; - opts.timeout = opts.handshakeTimeout; - - if (opts.perMessageDeflate) { - perMessageDeflate = new PerMessageDeflate( - opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, - false, - opts.maxPayload - ); - opts.headers['Sec-WebSocket-Extensions'] = format({ - [PerMessageDeflate.extensionName]: perMessageDeflate.offer() - }); - } - if (protocols) { - opts.headers['Sec-WebSocket-Protocol'] = protocols; - } - if (opts.origin) { - if (opts.protocolVersion < 13) { - opts.headers['Sec-WebSocket-Origin'] = opts.origin; - } else { - opts.headers.Origin = opts.origin; - } - } - if (parsedUrl.username || parsedUrl.password) { - opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; - } - - if (isUnixSocket) { - const parts = opts.path.split(':'); - - opts.socketPath = parts[0]; - opts.path = parts[1]; - } - - if (opts.followRedirects) { - if (websocket._redirects === 0) { - websocket._originalUnixSocket = isUnixSocket; - websocket._originalSecure = isSecure; - websocket._originalHostOrSocketPath = isUnixSocket - ? opts.socketPath - : parsedUrl.host; - - const headers = options && options.headers; - - // - // Shallow copy the user provided options so that headers can be changed - // without mutating the original object. - // - options = { ...options, headers: {} }; - - if (headers) { - for (const [key, value] of Object.entries(headers)) { - options.headers[key.toLowerCase()] = value; - } - } - } else { - const isSameHost = isUnixSocket - ? websocket._originalUnixSocket - ? opts.socketPath === websocket._originalHostOrSocketPath - : false - : websocket._originalUnixSocket - ? false - : parsedUrl.host === websocket._originalHostOrSocketPath; - - if (!isSameHost || (websocket._originalSecure && !isSecure)) { - // - // Match curl 7.77.0 behavior and drop the following headers. These - // headers are also dropped when following a redirect to a subdomain. - // - delete opts.headers.authorization; - delete opts.headers.cookie; - - if (!isSameHost) delete opts.headers.host; - - opts.auth = undefined; - } - } - - // - // Match curl 7.77.0 behavior and make the first `Authorization` header win. - // If the `Authorization` header is set, then there is nothing to do as it - // will take precedence. - // - if (opts.auth && !options.headers.authorization) { - options.headers.authorization = - 'Basic ' + Buffer.from(opts.auth).toString('base64'); - } - } - - let req = (websocket._req = get(opts)); - - if (opts.timeout) { - req.on('timeout', () => { - abortHandshake(websocket, req, 'Opening handshake has timed out'); - }); - } - - req.on('error', (err) => { - if (req === null || req.aborted) return; - - req = websocket._req = null; - emitErrorAndClose(websocket, err); - }); - - req.on('response', (res) => { - const location = res.headers.location; - const statusCode = res.statusCode; - - if ( - location && - opts.followRedirects && - statusCode >= 300 && - statusCode < 400 - ) { - if (++websocket._redirects > opts.maxRedirects) { - abortHandshake(websocket, req, 'Maximum redirects exceeded'); - return; - } - - req.abort(); - - let addr; - - try { - addr = new URL(location, address); - } catch (err) { - emitErrorAndClose(websocket, err); - return; - } - - initAsClient(websocket, addr, protocols, options); - } else if (!websocket.emit('unexpected-response', req, res)) { - abortHandshake( - websocket, - req, - `Unexpected server response: ${res.statusCode}` - ); - } - }); - - req.on('upgrade', (res, socket, head) => { - websocket.emit('upgrade', res); - - // - // The user may have closed the connection from a listener of the `upgrade` - // event. - // - if (websocket.readyState !== WebSocket.CONNECTING) return; - - req = websocket._req = null; - - const upgrade = res.headers.upgrade; - - if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { - abortHandshake(websocket, socket, 'Invalid Upgrade header'); - return; - } - - const digest = createHash('sha1') - .update(key + GUID) - .digest('base64'); - - if (res.headers['sec-websocket-accept'] !== digest) { - abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); - return; - } - - const serverProt = res.headers['sec-websocket-protocol']; - const protList = (protocols || '').split(/, */); - let protError; - - if (!protocols && serverProt) { - protError = 'Server sent a subprotocol but none was requested'; - } else if (protocols && !serverProt) { - protError = 'Server sent no subprotocol'; - } else if (serverProt && !protList.includes(serverProt)) { - protError = 'Server sent an invalid subprotocol'; - } - - if (protError) { - abortHandshake(websocket, socket, protError); - return; - } - - if (serverProt) websocket._protocol = serverProt; - - const secWebSocketExtensions = res.headers['sec-websocket-extensions']; - - if (secWebSocketExtensions !== undefined) { - if (!perMessageDeflate) { - const message = - 'Server sent a Sec-WebSocket-Extensions header but no extension ' + - 'was requested'; - abortHandshake(websocket, socket, message); - return; - } - - let extensions; - - try { - extensions = parse(secWebSocketExtensions); - } catch (err) { - const message = 'Invalid Sec-WebSocket-Extensions header'; - abortHandshake(websocket, socket, message); - return; - } - - const extensionNames = Object.keys(extensions); - - if (extensionNames.length) { - if ( - extensionNames.length !== 1 || - extensionNames[0] !== PerMessageDeflate.extensionName - ) { - const message = - 'Server indicated an extension that was not requested'; - abortHandshake(websocket, socket, message); - return; - } - - try { - perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); - } catch (err) { - const message = 'Invalid Sec-WebSocket-Extensions header'; - abortHandshake(websocket, socket, message); - return; - } - - websocket._extensions[PerMessageDeflate.extensionName] = - perMessageDeflate; - } - } - - websocket.setSocket(socket, head, opts.maxPayload); - }); -} - -/** - * Emit the `'error'` and `'close'` event. - * - * @param {WebSocket} websocket The WebSocket instance - * @param {Error} The error to emit - * @private - */ -function emitErrorAndClose(websocket, err) { - websocket._readyState = WebSocket.CLOSING; - websocket.emit('error', err); - websocket.emitClose(); -} - -/** - * Create a `net.Socket` and initiate a connection. - * - * @param {Object} options Connection options - * @return {net.Socket} The newly created socket used to start the connection - * @private - */ -function netConnect(options) { - options.path = options.socketPath; - return net.connect(options); -} - -/** - * Create a `tls.TLSSocket` and initiate a connection. - * - * @param {Object} options Connection options - * @return {tls.TLSSocket} The newly created socket used to start the connection - * @private - */ -function tlsConnect(options) { - options.path = undefined; - - if (!options.servername && options.servername !== '') { - options.servername = net.isIP(options.host) ? '' : options.host; - } - - return tls.connect(options); -} - -/** - * Abort the handshake and emit an error. - * - * @param {WebSocket} websocket The WebSocket instance - * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to - * abort or the socket to destroy - * @param {String} message The error message - * @private - */ -function abortHandshake(websocket, stream, message) { - websocket._readyState = WebSocket.CLOSING; - - const err = new Error(message); - Error.captureStackTrace(err, abortHandshake); - - if (stream.setHeader) { - stream.abort(); - - if (stream.socket && !stream.socket.destroyed) { - // - // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if - // called after the request completed. See - // https://github.com/websockets/ws/issues/1869. - // - stream.socket.destroy(); - } - - stream.once('abort', websocket.emitClose.bind(websocket)); - websocket.emit('error', err); - } else { - stream.destroy(err); - stream.once('error', websocket.emit.bind(websocket, 'error')); - stream.once('close', websocket.emitClose.bind(websocket)); - } -} - -/** - * Handle cases where the `ping()`, `pong()`, or `send()` methods are called - * when the `readyState` attribute is `CLOSING` or `CLOSED`. - * - * @param {WebSocket} websocket The WebSocket instance - * @param {*} [data] The data to send - * @param {Function} [cb] Callback - * @private - */ -function sendAfterClose(websocket, data, cb) { - if (data) { - const length = toBuffer(data).length; - - // - // The `_bufferedAmount` property is used only when the peer is a client and - // the opening handshake fails. Under these circumstances, in fact, the - // `setSocket()` method is not called, so the `_socket` and `_sender` - // properties are set to `null`. - // - if (websocket._socket) websocket._sender._bufferedBytes += length; - else websocket._bufferedAmount += length; - } - - if (cb) { - const err = new Error( - `WebSocket is not open: readyState ${websocket.readyState} ` + - `(${readyStates[websocket.readyState]})` - ); - cb(err); - } -} - -/** - * The listener of the `Receiver` `'conclude'` event. - * - * @param {Number} code The status code - * @param {String} reason The reason for closing - * @private - */ -function receiverOnConclude(code, reason) { - const websocket = this[kWebSocket]; - - websocket._closeFrameReceived = true; - websocket._closeMessage = reason; - websocket._closeCode = code; - - if (websocket._socket[kWebSocket] === undefined) return; - - websocket._socket.removeListener('data', socketOnData); - process.nextTick(resume, websocket._socket); - - if (code === 1005) websocket.close(); - else websocket.close(code, reason); -} - -/** - * The listener of the `Receiver` `'drain'` event. - * - * @private - */ -function receiverOnDrain() { - this[kWebSocket]._socket.resume(); -} - -/** - * The listener of the `Receiver` `'error'` event. - * - * @param {(RangeError|Error)} err The emitted error - * @private - */ -function receiverOnError(err) { - const websocket = this[kWebSocket]; - - if (websocket._socket[kWebSocket] !== undefined) { - websocket._socket.removeListener('data', socketOnData); - - // - // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See - // https://github.com/websockets/ws/issues/1940. - // - process.nextTick(resume, websocket._socket); - - websocket.close(err[kStatusCode]); - } - - websocket.emit('error', err); -} - -/** - * The listener of the `Receiver` `'finish'` event. - * - * @private - */ -function receiverOnFinish() { - this[kWebSocket].emitClose(); -} - -/** - * The listener of the `Receiver` `'message'` event. - * - * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The message - * @private - */ -function receiverOnMessage(data) { - this[kWebSocket].emit('message', data); -} - -/** - * The listener of the `Receiver` `'ping'` event. - * - * @param {Buffer} data The data included in the ping frame - * @private - */ -function receiverOnPing(data) { - const websocket = this[kWebSocket]; - - websocket.pong(data, !websocket._isServer, NOOP); - websocket.emit('ping', data); -} - -/** - * The listener of the `Receiver` `'pong'` event. - * - * @param {Buffer} data The data included in the pong frame - * @private - */ -function receiverOnPong(data) { - this[kWebSocket].emit('pong', data); -} - -/** - * Resume a readable stream - * - * @param {Readable} stream The readable stream - * @private - */ -function resume(stream) { - stream.resume(); -} - -/** - * The listener of the `net.Socket` `'close'` event. - * - * @private - */ -function socketOnClose() { - const websocket = this[kWebSocket]; - - this.removeListener('close', socketOnClose); - this.removeListener('data', socketOnData); - this.removeListener('end', socketOnEnd); - - websocket._readyState = WebSocket.CLOSING; - - let chunk; - - // - // The close frame might not have been received or the `'end'` event emitted, - // for example, if the socket was destroyed due to an error. Ensure that the - // `receiver` stream is closed after writing any remaining buffered data to - // it. If the readable side of the socket is in flowing mode then there is no - // buffered data as everything has been already written and `readable.read()` - // will return `null`. If instead, the socket is paused, any possible buffered - // data will be read as a single chunk. - // - if ( - !this._readableState.endEmitted && - !websocket._closeFrameReceived && - !websocket._receiver._writableState.errorEmitted && - (chunk = websocket._socket.read()) !== null - ) { - websocket._receiver.write(chunk); - } - - websocket._receiver.end(); - - this[kWebSocket] = undefined; - - clearTimeout(websocket._closeTimer); - - if ( - websocket._receiver._writableState.finished || - websocket._receiver._writableState.errorEmitted - ) { - websocket.emitClose(); - } else { - websocket._receiver.on('error', receiverOnFinish); - websocket._receiver.on('finish', receiverOnFinish); - } -} - -/** - * The listener of the `net.Socket` `'data'` event. - * - * @param {Buffer} chunk A chunk of data - * @private - */ -function socketOnData(chunk) { - if (!this[kWebSocket]._receiver.write(chunk)) { - this.pause(); - } -} - -/** - * The listener of the `net.Socket` `'end'` event. - * - * @private - */ -function socketOnEnd() { - const websocket = this[kWebSocket]; - - websocket._readyState = WebSocket.CLOSING; - websocket._receiver.end(); - this.end(); -} - -/** - * The listener of the `net.Socket` `'error'` event. - * - * @private - */ -function socketOnError() { - const websocket = this[kWebSocket]; - - this.removeListener('error', socketOnError); - this.on('error', NOOP); - - if (websocket) { - websocket._readyState = WebSocket.CLOSING; - this.destroy(); - } -} - - -/***/ }), - -/***/ 71269: -/***/ ((module) => { - -module.exports = eval("require")("bufferutil"); - - -/***/ }), - -/***/ 24592: -/***/ ((module) => { - -module.exports = eval("require")("utf-8-validate"); - - -/***/ }), - -/***/ 39491: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 14300: -/***/ ((module) => { - -"use strict"; -module.exports = require("buffer"); - -/***/ }), - -/***/ 32081: -/***/ ((module) => { - -"use strict"; -module.exports = require("child_process"); - -/***/ }), - -/***/ 6113: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 82361: -/***/ ((module) => { - -"use strict"; -module.exports = require("events"); - -/***/ }), - -/***/ 57147: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 13685: -/***/ ((module) => { - -"use strict"; -module.exports = require("http"); - -/***/ }), - -/***/ 95687: -/***/ ((module) => { - -"use strict"; -module.exports = require("https"); - -/***/ }), - -/***/ 41808: -/***/ ((module) => { - -"use strict"; -module.exports = require("net"); - -/***/ }), - -/***/ 98061: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:assert"); - -/***/ }), - -/***/ 6005: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:crypto"); - -/***/ }), - -/***/ 15673: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:events"); - -/***/ }), - -/***/ 87561: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:fs"); - -/***/ }), - -/***/ 49411: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:path"); - -/***/ }), - -/***/ 84492: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:stream"); - -/***/ }), - -/***/ 76915: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:string_decoder"); - -/***/ }), - -/***/ 22037: -/***/ ((module) => { - -"use strict"; -module.exports = require("os"); - -/***/ }), - -/***/ 71017: -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); - -/***/ }), - -/***/ 85477: -/***/ ((module) => { - -"use strict"; -module.exports = require("punycode"); - -/***/ }), - -/***/ 63477: -/***/ ((module) => { - -"use strict"; -module.exports = require("querystring"); - -/***/ }), - -/***/ 14521: -/***/ ((module) => { - -"use strict"; -module.exports = require("readline"); - -/***/ }), - -/***/ 12781: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream"); - -/***/ }), - -/***/ 39512: -/***/ ((module) => { - -"use strict"; -module.exports = require("timers"); - -/***/ }), - -/***/ 24404: -/***/ ((module) => { - -"use strict"; -module.exports = require("tls"); - -/***/ }), - -/***/ 57310: -/***/ ((module) => { - -"use strict"; -module.exports = require("url"); - -/***/ }), - -/***/ 73837: -/***/ ((module) => { - -"use strict"; -module.exports = require("util"); - -/***/ }), - -/***/ 26144: -/***/ ((module) => { - -"use strict"; -module.exports = require("vm"); - -/***/ }), - -/***/ 59796: -/***/ ((module) => { - -"use strict"; -module.exports = require("zlib"); - -/***/ }), - -/***/ 40675: -/***/ (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.WriteStreamSync = exports.WriteStream = exports.ReadStreamSync = exports.ReadStream = void 0; -const events_1 = __importDefault(__nccwpck_require__(82361)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const minipass_1 = __nccwpck_require__(14968); -const writev = fs_1.default.writev; -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_1.Minipass { - [_errored] = false; - [_fd]; - [_path]; - [_readSize]; - [_reading] = false; - [_size]; - [_remain]; - [_autoClose]; - 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 : undefined; - 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]; - } - //@ts-ignore - write() { - throw new TypeError('this is a readable stream'); - } - //@ts-ignore - end() { - throw new TypeError('this is a readable stream'); - } - [_open]() { - fs_1.default.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](); - /* c8 ignore start */ - if (buf.length === 0) { - return process.nextTick(() => this[_onread](null, 0, buf)); - } - /* c8 ignore stop */ - fs_1.default.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); - } - } - [_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] = undefined; - fs_1.default.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.subarray(0, br) : buf); - } - if (br === 0 || this[_remain] <= 0) { - ret = false; - this[_close](); - super.end(); - } - return ret; - } - emit(ev, ...args) { - switch (ev) { - case 'prefinish': - case 'finish': - return false; - case 'drain': - if (typeof this[_fd] === 'number') { - this[_read](); - } - return false; - case 'error': - if (this[_errored]) { - return false; - } - this[_errored] = true; - return super.emit(ev, ...args); - default: - return super.emit(ev, ...args); - } - } -} -exports.ReadStream = ReadStream; -class ReadStreamSync extends ReadStream { - [_open]() { - let threw = true; - try { - this[_onopen](null, fs_1.default.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](); - /* c8 ignore start */ - const br = buf.length === 0 - ? 0 - : fs_1.default.readSync(this[_fd], buf, 0, buf.length, null); - /* c8 ignore stop */ - 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] = undefined; - fs_1.default.closeSync(fd); - this.emit('close'); - } - } -} -exports.ReadStreamSync = ReadStreamSync; -class WriteStream extends events_1.default { - readable = false; - writable = true; - [_errored] = false; - [_writing] = false; - [_ended] = false; - [_queue] = []; - [_needDrain] = false; - [_path]; - [_mode]; - [_autoClose]; - [_fd]; - [_defaultFlag]; - [_flags]; - [_finished] = false; - [_pos]; - constructor(path, opt) { - opt = opt || {}; - super(opt); - this[_path] = path; - this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; - this[_mode] = opt.mode === undefined ? 0o666 : opt.mode; - this[_pos] = typeof opt.start === 'number' ? opt.start : undefined; - this[_autoClose] = - typeof opt.autoClose === 'boolean' ? opt.autoClose : true; - // truncating makes no sense when writing into the middle - const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'; - this[_defaultFlag] = opt.flags === undefined; - this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags; - if (this[_fd] === undefined) { - this[_open](); - } - } - emit(ev, ...args) { - if (ev === 'error') { - if (this[_errored]) { - return false; - } - this[_errored] = true; - } - return super.emit(ev, ...args); - } - get fd() { - return this[_fd]; - } - get path() { - return this[_path]; - } - [_onerror](er) { - this[_close](); - this[_writing] = true; - this.emit('error', er); - } - [_open]() { - fs_1.default.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); - if (!this[_writing]) { - this[_flush](); - } - } - } - end(buf, enc) { - if (buf) { - //@ts-ignore - 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] === undefined || 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_1.default.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] !== undefined && typeof bw === 'number') { - 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] = undefined; - fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close')); - } - } -} -exports.WriteStream = WriteStream; -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_1.default.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_1.default.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] = undefined; - fs_1.default.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_1.default.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); - threw = false; - } - finally { - if (threw) { - try { - this[_close](); - } - catch { - // ok error - } - } - } - } -} -exports.WriteStreamSync = WriteStreamSync; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 40235: -/***/ (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.chownrSync = exports.chownr = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const lchownSync = (path, uid, gid) => { - try { - return node_fs_1.default.lchownSync(path, uid, gid); - } - catch (er) { - if (er?.code !== 'ENOENT') - throw er; - } -}; -const chown = (cpath, uid, gid, cb) => { - node_fs_1.default.lchown(cpath, uid, gid, er => { - // Skip ENOENT error - cb(er && er?.code !== 'ENOENT' ? er : null); - }); -}; -const chownrKid = (p, child, uid, gid, cb) => { - if (child.isDirectory()) { - (0, exports.chownr)(node_path_1.default.resolve(p, child.name), uid, gid, (er) => { - if (er) - return cb(er); - const cpath = node_path_1.default.resolve(p, child.name); - chown(cpath, uid, gid, cb); - }); - } - else { - const cpath = node_path_1.default.resolve(p, child.name); - chown(cpath, uid, gid, cb); - } -}; -const chownr = (p, uid, gid, cb) => { - node_fs_1.default.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) => { - /* c8 ignore start */ - if (errState) - return; - /* c8 ignore stop */ - if (er) - return cb((errState = er)); - if (--len === 0) - return chown(p, uid, gid, cb); - }; - for (const child of children) { - chownrKid(p, child, uid, gid, then); - } - }); -}; -exports.chownr = chownr; -const chownrKidSync = (p, child, uid, gid) => { - if (child.isDirectory()) - (0, exports.chownrSync)(node_path_1.default.resolve(p, child.name), uid, gid); - lchownSync(node_path_1.default.resolve(p, child.name), uid, gid); -}; -const chownrSync = (p, uid, gid) => { - let children; - try { - children = node_fs_1.default.readdirSync(p, { withFileTypes: true }); - } - catch (er) { - const e = er; - if (e?.code === 'ENOENT') - return; - else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP') - return lchownSync(p, uid, gid); - else - throw e; - } - for (const child of children) { - chownrKidSync(p, child, uid, gid); - } - return lchownSync(p, uid, gid); -}; -exports.chownrSync = chownrSync; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 14968: -/***/ (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.Minipass = exports.isWritable = exports.isReadable = exports.isStream = void 0; -const proc = typeof process === 'object' && process - ? process - : { - stdout: null, - stderr: null, - }; -const node_events_1 = __nccwpck_require__(15673); -const node_stream_1 = __importDefault(__nccwpck_require__(84492)); -const node_string_decoder_1 = __nccwpck_require__(76915); -/** - * Return true if the argument is a Minipass stream, Node stream, or something - * else that Minipass can interact with. - */ -const isStream = (s) => !!s && - typeof s === 'object' && - (s instanceof Minipass || - s instanceof node_stream_1.default || - (0, exports.isReadable)(s) || - (0, exports.isWritable)(s)); -exports.isStream = isStream; -/** - * Return true if the argument is a valid {@link Minipass.Readable} - */ -const isReadable = (s) => !!s && - typeof s === 'object' && - s instanceof node_events_1.EventEmitter && - typeof s.pipe === 'function' && - // node core Writable streams have a pipe() method, but it throws - s.pipe !== node_stream_1.default.Writable.prototype.pipe; -exports.isReadable = isReadable; -/** - * Return true if the argument is a valid {@link Minipass.Writable} - */ -const isWritable = (s) => !!s && - typeof s === 'object' && - s instanceof node_events_1.EventEmitter && - typeof s.write === 'function' && - typeof s.end === 'function'; -exports.isWritable = isWritable; -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 BUFFER = Symbol('buffer'); -const PIPES = Symbol('pipes'); -const BUFFERLENGTH = Symbol('bufferLength'); -const BUFFERPUSH = Symbol('bufferPush'); -const BUFFERSHIFT = Symbol('bufferShift'); -const OBJECTMODE = Symbol('objectMode'); -// internal event when stream is destroyed -const DESTROYED = Symbol('destroyed'); -// internal event when stream has an error -const ERROR = Symbol('error'); -const EMITDATA = Symbol('emitData'); -const EMITEND = Symbol('emitEnd'); -const EMITEND2 = Symbol('emitEnd2'); -const ASYNC = Symbol('async'); -const ABORT = Symbol('abort'); -const ABORTED = Symbol('aborted'); -const SIGNAL = Symbol('signal'); -const DATALISTENERS = Symbol('dataListeners'); -const DISCARDED = Symbol('discarded'); -const defer = (fn) => Promise.resolve().then(fn); -const nodefer = (fn) => fn(); -const isEndish = (ev) => ev === 'end' || ev === 'finish' || ev === 'prefinish'; -const isArrayBufferLike = (b) => b instanceof ArrayBuffer || - (!!b && - typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0); -const isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b); -/** - * Internal class representing a pipe to a destination stream. - * - * @internal - */ -class Pipe { - src; - dest; - opts; - ondrain; - constructor(src, dest, opts) { - this.src = src; - this.dest = dest; - this.opts = opts; - this.ondrain = () => src[RESUME](); - this.dest.on('drain', this.ondrain); - } - unpipe() { - this.dest.removeListener('drain', this.ondrain); - } - // only here for the prototype - /* c8 ignore start */ - proxyErrors(_er) { } - /* c8 ignore stop */ - end() { - this.unpipe(); - if (this.opts.end) - this.dest.end(); - } -} -/** - * Internal class representing a pipe to a destination stream where - * errors are proxied. - * - * @internal - */ -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); - } -} -const isObjectModeOptions = (o) => !!o.objectMode; -const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== 'buffer'; -/** - * Main export, the Minipass class - * - * `RType` is the type of data emitted, defaults to Buffer - * - * `WType` is the type of data to be written, if RType is buffer or string, - * then any {@link Minipass.ContiguousData} is allowed. - * - * `Events` is the set of event handler signatures that this object - * will emit, see {@link Minipass.Events} - */ -class Minipass extends node_events_1.EventEmitter { - [FLOWING] = false; - [PAUSED] = false; - [PIPES] = []; - [BUFFER] = []; - [OBJECTMODE]; - [ENCODING]; - [ASYNC]; - [DECODER]; - [EOF] = false; - [EMITTED_END] = false; - [EMITTING_END] = false; - [CLOSED] = false; - [EMITTED_ERROR] = null; - [BUFFERLENGTH] = 0; - [DESTROYED] = false; - [SIGNAL]; - [ABORTED] = false; - [DATALISTENERS] = 0; - [DISCARDED] = false; - /** - * true if the stream can be written - */ - writable = true; - /** - * true if the stream can be read - */ - readable = true; - /** - * If `RType` is Buffer, then options do not need to be provided. - * Otherwise, an options object must be provided to specify either - * {@link Minipass.SharedOptions.objectMode} or - * {@link Minipass.SharedOptions.encoding}, as appropriate. - */ - constructor(...args) { - const options = (args[0] || - {}); - super(); - if (options.objectMode && typeof options.encoding === 'string') { - throw new TypeError('Encoding and objectMode may not be used together'); - } - if (isObjectModeOptions(options)) { - this[OBJECTMODE] = true; - this[ENCODING] = null; - } - else if (isEncodingOptions(options)) { - this[ENCODING] = options.encoding; - this[OBJECTMODE] = false; - } - else { - this[OBJECTMODE] = false; - this[ENCODING] = null; - } - this[ASYNC] = !!options.async; - this[DECODER] = this[ENCODING] - ? new node_string_decoder_1.StringDecoder(this[ENCODING]) - : null; - //@ts-ignore - private option for debugging and testing - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] }); - } - //@ts-ignore - private option for debugging and testing - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, 'pipes', { get: () => this[PIPES] }); - } - const { signal } = options; - if (signal) { - this[SIGNAL] = signal; - if (signal.aborted) { - this[ABORT](); - } - else { - signal.addEventListener('abort', () => this[ABORT]()); - } - } - } - /** - * The amount of data stored in the buffer waiting to be read. - * - * For Buffer strings, this will be the total byte length. - * For string encoding streams, this will be the string character length, - * according to JavaScript's `string.length` logic. - * For objectMode streams, this is a count of the items waiting to be - * emitted. - */ - get bufferLength() { - return this[BUFFERLENGTH]; - } - /** - * The `BufferEncoding` currently in use, or `null` - */ - get encoding() { - return this[ENCODING]; - } - /** - * @deprecated - This is a read only property - */ - set encoding(_enc) { - throw new Error('Encoding must be set at instantiation time'); - } - /** - * @deprecated - Encoding may only be set at instantiation time - */ - setEncoding(_enc) { - throw new Error('Encoding must be set at instantiation time'); - } - /** - * True if this is an objectMode stream - */ - get objectMode() { - return this[OBJECTMODE]; - } - /** - * @deprecated - This is a read-only property - */ - set objectMode(_om) { - throw new Error('objectMode must be set at instantiation time'); - } - /** - * true if this is an async stream - */ - get ['async']() { - return this[ASYNC]; - } - /** - * Set to true to make this stream async. - * - * Once set, it cannot be unset, as this would potentially cause incorrect - * behavior. Ie, a sync stream can be made async, but an async stream - * cannot be safely made sync. - */ - set ['async'](a) { - this[ASYNC] = this[ASYNC] || !!a; - } - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true; - this.emit('abort', this[SIGNAL]?.reason); - this.destroy(this[SIGNAL]?.reason); - } - /** - * True if the stream has been aborted. - */ - get aborted() { - return this[ABORTED]; - } - /** - * No-op setter. Stream aborted status is set via the AbortSignal provided - * in the constructor options. - */ - set aborted(_) { } - write(chunk, encoding, cb) { - if (this[ABORTED]) - return false; - 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 : nodefer; - // 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 is only allowed if in object mode, so throw - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) { - //@ts-ignore - sinful unsafe type changing - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength); - } - else if (isArrayBufferLike(chunk)) { - //@ts-ignore - sinful unsafe type changing - chunk = Buffer.from(chunk); - } - else if (typeof chunk !== 'string') { - throw new Error('Non-contiguous data written to non-objectMode stream'); - } - } - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - // maybe impossible? - /* c8 ignore start */ - if (this[FLOWING] && this[BUFFERLENGTH] !== 0) - this[FLUSH](true); - /* c8 ignore stop */ - 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)) { - //@ts-ignore - sinful unsafe type change - chunk = Buffer.from(chunk, encoding); - } - if (Buffer.isBuffer(chunk) && this[ENCODING]) { - //@ts-ignore - sinful unsafe type change - 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]; - } - /** - * Low-level explicit read method. - * - * In objectMode, the argument is ignored, and one item is returned if - * available. - * - * `n` is the number of bytes (or in the case of encoding streams, - * characters) to consume. If `n` is not provided, then the entire buffer - * is returned, or `null` is returned if no data is available. - * - * If `n` is greater that the amount of data in the internal buffer, - * then `null` is returned. - */ - read(n) { - if (this[DESTROYED]) - return null; - this[DISCARDED] = false; - if (this[BUFFERLENGTH] === 0 || - n === 0 || - (n && n > this[BUFFERLENGTH])) { - this[MAYBE_EMIT_END](); - return null; - } - if (this[OBJECTMODE]) - n = null; - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - // not object mode, so if we have an encoding, then RType is string - // otherwise, must be Buffer - this[BUFFER] = [ - (this[ENCODING] - ? this[BUFFER].join('') - : 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 (this[OBJECTMODE]) - this[BUFFERSHIFT](); - else { - const c = chunk; - if (n === c.length || n === null) - this[BUFFERSHIFT](); - else if (typeof c === 'string') { - this[BUFFER][0] = c.slice(n); - chunk = c.slice(0, n); - this[BUFFERLENGTH] -= n; - } - else { - this[BUFFER][0] = c.subarray(n); - chunk = c.subarray(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 = undefined; - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = 'utf8'; - } - if (chunk !== undefined) - 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; - if (!this[DATALISTENERS] && !this[PIPES].length) { - this[DISCARDED] = true; - } - 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 the stream if it is currently in a paused state - * - * If called when there are no pipe destinations or `data` event listeners, - * this will place the stream in a "discarded" state, where all data will - * be thrown away. The discarded state is removed if a pipe destination or - * data handler is added, if pause() is called, or if any synchronous or - * asynchronous iteration is started. - */ - resume() { - return this[RESUME](); - } - /** - * Pause the stream - */ - pause() { - this[FLOWING] = false; - this[PAUSED] = true; - this[DISCARDED] = false; - } - /** - * true if the stream has been forcibly destroyed - */ - get destroyed() { - return this[DESTROYED]; - } - /** - * true if the stream is currently in a flowing state, meaning that - * any writes will be immediately emitted. - */ - get flowing() { - return this[FLOWING]; - } - /** - * true if the stream is currently in a paused state - */ - 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[OBJECTMODE]) - this[BUFFERLENGTH] -= 1; - else - this[BUFFERLENGTH] -= this[BUFFER][0].length; - return this[BUFFER].shift(); - } - [FLUSH](noDrain = false) { - do { } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && - this[BUFFER].length); - if (!noDrain && !this[BUFFER].length && !this[EOF]) - this.emit('drain'); - } - [FLUSHCHUNK](chunk) { - this.emit('data', chunk); - return this[FLOWING]; - } - /** - * Pipe all data emitted by this stream into the destination provided. - * - * Triggers the flow of data. - */ - pipe(dest, opts) { - if (this[DESTROYED]) - return dest; - this[DISCARDED] = false; - 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 { - // "as" here just ignores the WType, which pipes don't care about, - // since they're only consuming from us, and writing to the dest - 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; - } - /** - * Fully unhook a piped destination stream. - * - * If the destination stream was the only consumer of this stream (ie, - * there are no other piped destinations or `'data'` event listeners) - * then the flow of data will stop until there is another consumer or - * {@link Minipass#resume} is explicitly called. - */ - unpipe(dest) { - const p = this[PIPES].find(p => p.dest === dest); - if (p) { - if (this[PIPES].length === 1) { - if (this[FLOWING] && this[DATALISTENERS] === 0) { - this[FLOWING] = false; - } - this[PIPES] = []; - } - else - this[PIPES].splice(this[PIPES].indexOf(p), 1); - p.unpipe(); - } - } - /** - * Alias for {@link Minipass#on} - */ - addListener(ev, handler) { - return this.on(ev, handler); - } - /** - * Mostly identical to `EventEmitter.on`, with the following - * behavior differences to prevent data loss and unnecessary hangs: - * - * - Adding a 'data' event handler will trigger the flow of data - * - * - Adding a 'readable' event handler when there is data waiting to be read - * will cause 'readable' to be emitted immediately. - * - * - Adding an 'endish' event handler ('end', 'finish', etc.) which has - * already passed will cause the event to be emitted immediately and all - * handlers removed. - * - * - Adding an 'error' event handler after an error has been emitted will - * cause the event to be re-emitted immediately with the error previously - * raised. - */ - on(ev, handler) { - const ret = super.on(ev, handler); - if (ev === 'data') { - this[DISCARDED] = false; - this[DATALISTENERS]++; - if (!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]) { - const h = handler; - if (this[ASYNC]) - defer(() => h.call(this, this[EMITTED_ERROR])); - else - h.call(this, this[EMITTED_ERROR]); - } - return ret; - } - /** - * Alias for {@link Minipass#off} - */ - removeListener(ev, handler) { - return this.off(ev, handler); - } - /** - * Mostly identical to `EventEmitter.off` - * - * If a 'data' event handler is removed, and it was the last consumer - * (ie, there are no pipe destinations or other 'data' event listeners), - * then the flow of data will stop until there is another consumer or - * {@link Minipass#resume} is explicitly called. - */ - off(ev, handler) { - const ret = super.off(ev, handler); - // if we previously had listeners, and now we don't, and we don't - // have any pipes, then stop the flow, unless it's been explicitly - // put in a discarded flowing state via stream.resume(). - if (ev === 'data') { - this[DATALISTENERS] = this.listeners('data').length; - if (this[DATALISTENERS] === 0 && - !this[DISCARDED] && - !this[PIPES].length) { - this[FLOWING] = false; - } - } - return ret; - } - /** - * Mostly identical to `EventEmitter.removeAllListeners` - * - * If all 'data' event handlers are removed, and they were the last consumer - * (ie, there are no pipe destinations), then the flow of data will stop - * until there is another consumer or {@link Minipass#resume} is explicitly - * called. - */ - removeAllListeners(ev) { - const ret = super.removeAllListeners(ev); - if (ev === 'data' || ev === undefined) { - this[DATALISTENERS] = 0; - if (!this[DISCARDED] && !this[PIPES].length) { - this[FLOWING] = false; - } - } - return ret; - } - /** - * true if the 'end' event has been emitted - */ - 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; - } - } - /** - * Mostly identical to `EventEmitter.emit`, with the following - * behavior differences to prevent data loss and unnecessary hangs: - * - * If the stream has been destroyed, and the event is something other - * than 'close' or 'error', then `false` is returned and no handlers - * are called. - * - * If the event is 'end', and has already been emitted, then the event - * is ignored. If the stream is in a paused or non-flowing state, then - * the event will be deferred until data flow resumes. If the stream is - * async, then handlers will be called on the next tick rather than - * immediately. - * - * If the event is 'close', and 'end' has not yet been emitted, then - * the event will be deferred until after 'end' is emitted. - * - * If the event is 'error', and an AbortSignal was provided for the stream, - * and there are no listeners, then the event is ignored, matching the - * behavior of node core streams in the presense of an AbortSignal. - * - * If the event is 'finish' or 'prefinish', then all listeners will be - * removed after emitting the event, to prevent double-firing. - */ - emit(ev, ...args) { - const data = args[0]; - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && - ev !== 'close' && - ev !== DESTROYED && - this[DESTROYED]) { - return false; - } - else if (ev === 'data') { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? (defer(() => this[EMITDATA](data)), true) - : 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 false; - const ret = super.emit('close'); - this.removeAllListeners('close'); - return ret; - } - else if (ev === 'error') { - this[EMITTED_ERROR] = data; - super.emit(ERROR, data); - const ret = !this[SIGNAL] || this.listeners('error').length - ? super.emit('error', data) - : false; - 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, ...args); - this[MAYBE_EMIT_END](); - return ret; - } - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) - this.pause(); - } - const ret = this[DISCARDED] ? false : super.emit('data', data); - this[MAYBE_EMIT_END](); - return ret; - } - [EMITEND]() { - if (this[EMITTED_END]) - return false; - this[EMITTED_END] = true; - this.readable = false; - return this[ASYNC] - ? (defer(() => this[EMITEND2]()), true) - : this[EMITEND2](); - } - [EMITEND2]() { - if (this[DECODER]) { - const data = this[DECODER].end(); - if (data) { - for (const p of this[PIPES]) { - p.dest.write(data); - } - if (!this[DISCARDED]) - super.emit('data', data); - } - } - for (const p of this[PIPES]) { - p.end(); - } - const ret = super.emit('end'); - this.removeAllListeners('end'); - return ret; - } - /** - * Return a Promise that resolves to an array of all emitted data once - * the stream ends. - */ - async collect() { - const buf = Object.assign([], { - dataLength: 0, - }); - 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; - }); - await p; - return buf; - } - /** - * Return a Promise that resolves to the concatenation of all emitted data - * once the stream ends. - * - * Not allowed on objectMode streams. - */ - async concat() { - if (this[OBJECTMODE]) { - throw new Error('cannot concat in objectMode'); - } - const buf = await this.collect(); - return (this[ENCODING] - ? buf.join('') - : Buffer.concat(buf, buf.dataLength)); - } - /** - * Return a void Promise that resolves once the stream ends. - */ - async promise() { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))); - this.on('error', er => reject(er)); - this.on('end', () => resolve()); - }); - } - /** - * Asynchronous `for await of` iteration. - * - * This will continue emitting all chunks until the stream terminates. - */ - [Symbol.asyncIterator]() { - // set this up front, in case the consumer doesn't call next() - // right away. - this[DISCARDED] = false; - let stopped = false; - const stop = async () => { - this.pause(); - stopped = true; - return { value: undefined, done: true }; - }; - const next = () => { - if (stopped) - return stop(); - const res = this.read(); - if (res !== null) - return Promise.resolve({ done: false, value: res }); - if (this[EOF]) - return stop(); - let resolve; - let reject; - const onerr = (er) => { - this.off('data', ondata); - this.off('end', onend); - this.off(DESTROYED, ondestroy); - stop(); - reject(er); - }; - const ondata = (value) => { - this.off('error', onerr); - this.off('end', onend); - this.off(DESTROYED, ondestroy); - this.pause(); - resolve({ value, done: !!this[EOF] }); - }; - const onend = () => { - this.off('error', onerr); - this.off('data', ondata); - this.off(DESTROYED, ondestroy); - stop(); - resolve({ done: true, value: undefined }); - }; - 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, - throw: stop, - return: stop, - [Symbol.asyncIterator]() { - return this; - }, - }; - } - /** - * Synchronous `for of` iteration. - * - * The iteration will terminate when the internal buffer runs out, even - * if the stream has not yet terminated. - */ - [Symbol.iterator]() { - // set this up front, in case the consumer doesn't call next() - // right away. - this[DISCARDED] = false; - let stopped = false; - const stop = () => { - this.pause(); - this.off(ERROR, stop); - this.off(DESTROYED, stop); - this.off('end', stop); - stopped = true; - return { done: true, value: undefined }; - }; - const next = () => { - if (stopped) - return stop(); - const value = this.read(); - return value === null ? stop() : { done: false, value }; - }; - this.once('end', stop); - this.once(ERROR, stop); - this.once(DESTROYED, stop); - return { - next, - throw: stop, - return: stop, - [Symbol.iterator]() { - return this; - }, - }; - } - /** - * Destroy a stream, preventing it from being used for any further purpose. - * - * If the stream has a `close()` method, then it will be called on - * destruction. - * - * After destruction, any attempt to write data, read data, or emit most - * events will be ignored. - * - * If an error argument is provided, then it will be emitted in an - * 'error' event. - */ - destroy(er) { - if (this[DESTROYED]) { - if (er) - this.emit('error', er); - else - this.emit(DESTROYED); - return this; - } - this[DESTROYED] = true; - this[DISCARDED] = true; - // throw away all buffered data, it's never coming out - this[BUFFER].length = 0; - this[BUFFERLENGTH] = 0; - const wc = this; - if (typeof wc.close === 'function' && !this[CLOSED]) - wc.close(); - if (er) - this.emit('error', er); - // if no error to emit, still reject pending promises - else - this.emit(DESTROYED); - return this; - } - /** - * Alias for {@link isStream} - * - * Former export location, maintained for backwards compatibility. - * - * @deprecated - */ - static get isStream() { - return exports.isStream; - } -} -exports.Minipass = Minipass; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 70499: -/***/ (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.constants = void 0; -// 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 zlib_1 = __importDefault(__nccwpck_require__(59796)); -/* c8 ignore start */ -const realZlibConstants = zlib_1.default.constants || { ZLIB_VERNUM: 4736 }; -/* c8 ignore stop */ -exports.constants = 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)); -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 26139: -/***/ (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.BrotliDecompress = exports.BrotliCompress = exports.Brotli = exports.Unzip = exports.InflateRaw = exports.DeflateRaw = exports.Gunzip = exports.Gzip = exports.Inflate = exports.Deflate = exports.Zlib = exports.ZlibError = exports.constants = void 0; -const assert_1 = __importDefault(__nccwpck_require__(39491)); -const buffer_1 = __nccwpck_require__(14300); -const minipass_1 = __nccwpck_require__(14968); -const zlib_1 = __importDefault(__nccwpck_require__(59796)); -const constants_js_1 = __nccwpck_require__(70499); -var constants_js_2 = __nccwpck_require__(70499); -Object.defineProperty(exports, "constants", ({ enumerable: true, get: function () { return constants_js_2.constants; } })); -const OriginalBufferConcat = buffer_1.Buffer.concat; -const _superWrite = Symbol('_superWrite'); -class ZlibError extends Error { - code; - errno; - constructor(err) { - super('zlib: ' + err.message); - this.code = err.code; - this.errno = err.errno; - /* c8 ignore next */ - if (!this.code) - this.code = 'ZLIB_ERROR'; - this.message = 'zlib: ' + err.message; - Error.captureStackTrace(this, this.constructor); - } - get name() { - return 'ZlibError'; - } -} -exports.ZlibError = 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 _flushFlag = Symbol('flushFlag'); -class ZlibBase extends minipass_1.Minipass { - #sawError = false; - #ended = false; - #flushFlag; - #finishFlushFlag; - #fullFlushFlag; - #handle; - #onError; - get sawError() { - return this.#sawError; - } - get handle() { - return this.#handle; - } - /* c8 ignore start */ - get flushFlag() { - return this.#flushFlag; - } - /* c8 ignore stop */ - constructor(opts, mode) { - if (!opts || typeof opts !== 'object') - throw new TypeError('invalid options for ZlibBase constructor'); - //@ts-ignore - super(opts); - /* c8 ignore start */ - this.#flushFlag = opts.flush ?? 0; - this.#finishFlushFlag = opts.finishFlush ?? 0; - this.#fullFlushFlag = opts.fullFlushFlag ?? 0; - /* c8 ignore stop */ - // this will throw if any options are invalid for the class selected - try { - // @types/node doesn't know that it exports the classes, but they're there - //@ts-ignore - this.#handle = new zlib_1.default[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 = undefined; - this.emit('close'); - } - } - reset() { - if (!this.#sawError) { - (0, assert_1.default)(this.#handle, 'zlib binding closed'); - //@ts-ignore - return this.#handle.reset?.(); - } - } - flush(flushFlag) { - if (this.ended) - return; - if (typeof flushFlag !== 'number') - flushFlag = this.#fullFlushFlag; - this.write(Object.assign(buffer_1.Buffer.alloc(0), { [_flushFlag]: flushFlag })); - } - end(chunk, encoding, cb) { - /* c8 ignore start */ - if (typeof chunk === 'function') { - cb = chunk; - encoding = undefined; - chunk = undefined; - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - /* c8 ignore stop */ - if (chunk) { - if (encoding) - this.write(chunk, encoding); - else - this.write(chunk); - } - this.flush(this.#finishFlushFlag); - this.#ended = true; - return super.end(cb); - } - get ended() { - return this.#ended; - } - // overridden in the gzip classes to do portable writes - [_superWrite](data) { - return super.write(data); - } - 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_1.Buffer.from(chunk, encoding); - if (this.#sawError) - return; - (0, assert_1.default)(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. - // diving into the node:zlib internals a bit here - 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_1.Buffer.concat = args => args; - let result = undefined; - 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_1.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_1.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) { - const r = result[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_1.Buffer.from(r)); - for (let i = 1; i < result.length; i++) { - writeReturn = this[_superWrite](result[i]); - } - } - else { - // either a single Buffer or an empty array - writeReturn = this[_superWrite](buffer_1.Buffer.from(result)); - } - } - if (cb) - cb(); - return writeReturn; - } -} -class Zlib extends ZlibBase { - #level; - #strategy; - constructor(opts, mode) { - opts = opts || {}; - opts.flush = opts.flush || constants_js_1.constants.Z_NO_FLUSH; - opts.finishFlush = opts.finishFlush || constants_js_1.constants.Z_FINISH; - opts.fullFlushFlag = constants_js_1.constants.Z_FULL_FLUSH; - super(opts, mode); - 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 - /* c8 ignore start */ - if (!this.handle.params) - throw new Error('not supported in this implementation'); - /* c8 ignore stop */ - if (this.#level !== level || this.#strategy !== strategy) { - this.flush(constants_js_1.constants.Z_SYNC_FLUSH); - (0, assert_1.default)(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) => { - /* c8 ignore start */ - if (typeof flushFlag === 'function') { - cb = flushFlag; - flushFlag = this.flushFlag; - } - /* c8 ignore stop */ - this.flush(flushFlag); - cb?.(); - }; - try { - ; - this.handle.params(level, strategy); - } - finally { - this.handle.flush = origFlush; - } - /* c8 ignore start */ - if (this.handle) { - this.#level = level; - this.#strategy = strategy; - } - /* c8 ignore stop */ - } - } -} -exports.Zlib = Zlib; -// minimal 2-byte header -class Deflate extends Zlib { - constructor(opts) { - super(opts, 'Deflate'); - } -} -exports.Deflate = Deflate; -class Inflate extends Zlib { - constructor(opts) { - super(opts, 'Inflate'); - } -} -exports.Inflate = Inflate; -class Gzip extends Zlib { - #portable; - 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); - } -} -exports.Gzip = Gzip; -class Gunzip extends Zlib { - constructor(opts) { - super(opts, 'Gunzip'); - } -} -exports.Gunzip = Gunzip; -// raw - no header -class DeflateRaw extends Zlib { - constructor(opts) { - super(opts, 'DeflateRaw'); - } -} -exports.DeflateRaw = DeflateRaw; -class InflateRaw extends Zlib { - constructor(opts) { - super(opts, 'InflateRaw'); - } -} -exports.InflateRaw = InflateRaw; -// auto-detect header. -class Unzip extends Zlib { - constructor(opts) { - super(opts, 'Unzip'); - } -} -exports.Unzip = Unzip; -class Brotli extends ZlibBase { - constructor(opts, mode) { - opts = opts || {}; - opts.flush = opts.flush || constants_js_1.constants.BROTLI_OPERATION_PROCESS; - opts.finishFlush = - opts.finishFlush || constants_js_1.constants.BROTLI_OPERATION_FINISH; - opts.fullFlushFlag = constants_js_1.constants.BROTLI_OPERATION_FLUSH; - super(opts, mode); - } -} -exports.Brotli = Brotli; -class BrotliCompress extends Brotli { - constructor(opts) { - super(opts, 'BrotliCompress'); - } -} -exports.BrotliCompress = BrotliCompress; -class BrotliDecompress extends Brotli { - constructor(opts) { - super(opts, 'BrotliDecompress'); - } -} -exports.BrotliDecompress = BrotliDecompress; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 27329: -/***/ (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.create = void 0; -const fs_minipass_1 = __nccwpck_require__(40675); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const list_js_1 = __nccwpck_require__(84306); -const make_command_js_1 = __nccwpck_require__(33830); -const pack_js_1 = __nccwpck_require__(7788); -const createFileSync = (opt, files) => { - const p = new pack_js_1.PackSync(opt); - const stream = new fs_minipass_1.WriteStreamSync(opt.file, { - mode: opt.mode || 0o666, - }); - p.pipe(stream); - addFilesSync(p, files); -}; -const createFile = (opt, files) => { - const p = new pack_js_1.Pack(opt); - const stream = new fs_minipass_1.WriteStream(opt.file, { - mode: opt.mode || 0o666, - }); - p.pipe(stream); - const promise = new Promise((res, rej) => { - stream.on('error', rej); - stream.on('close', res); - p.on('error', rej); - }); - addFilesAsync(p, files); - return promise; -}; -const addFilesSync = (p, files) => { - files.forEach(file => { - if (file.charAt(0) === '@') { - (0, list_js_1.list)({ - file: node_path_1.default.resolve(p.cwd, file.slice(1)), - sync: true, - noResume: true, - onReadEntry: entry => p.add(entry), - }); - } - else { - p.add(file); - } - }); - p.end(); -}; -const addFilesAsync = async (p, files) => { - for (let i = 0; i < files.length; i++) { - const file = String(files[i]); - if (file.charAt(0) === '@') { - await (0, list_js_1.list)({ - file: node_path_1.default.resolve(String(p.cwd), file.slice(1)), - noResume: true, - onReadEntry: entry => { - p.add(entry); - }, - }); - } - else { - p.add(file); - } - } - p.end(); -}; -const createSync = (opt, files) => { - const p = new pack_js_1.PackSync(opt); - addFilesSync(p, files); - return p; -}; -const createAsync = (opt, files) => { - const p = new pack_js_1.Pack(opt); - addFilesAsync(p, files); - return p; -}; -exports.create = (0, make_command_js_1.makeCommand)(createFileSync, createFile, createSync, createAsync, (_opt, files) => { - if (!files?.length) { - throw new TypeError('no paths specified to add to archive'); - } -}); -//# sourceMappingURL=create.js.map - -/***/ }), - -/***/ 36861: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CwdError = void 0; -class CwdError extends Error { - path; - code; - syscall = 'chdir'; - constructor(path, code) { - super(`${code}: Cannot cd into '${path}'`); - this.path = path; - this.code = code; - } - get name() { - return 'CwdError'; - } -} -exports.CwdError = CwdError; -//# sourceMappingURL=cwd-error.js.map - -/***/ }), - -/***/ 32476: -/***/ (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.extract = void 0; -// tar -x -const fsm = __importStar(__nccwpck_require__(40675)); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const list_js_1 = __nccwpck_require__(84306); -const make_command_js_1 = __nccwpck_require__(33830); -const unpack_js_1 = __nccwpck_require__(86973); -const extractFileSync = (opt) => { - const u = new unpack_js_1.UnpackSync(opt); - const file = opt.file; - const stat = node_fs_1.default.statSync(file); - // This trades a zero-byte read() syscall for a stat - // However, it will usually result in less memory allocation - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - const stream = new fsm.ReadStreamSync(file, { - readSize: readSize, - size: stat.size, - }); - stream.pipe(u); -}; -const extractFile = (opt, _) => { - const u = new unpack_js_1.Unpack(opt); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - const file = opt.file; - const p = new Promise((resolve, reject) => { - u.on('error', reject); - u.on('close', resolve); - // This trades a zero-byte read() syscall for a stat - // However, it will usually result in less memory allocation - node_fs_1.default.stat(file, (er, stat) => { - if (er) { - reject(er); - } - else { - const stream = new fsm.ReadStream(file, { - readSize: readSize, - size: stat.size, - }); - stream.on('error', reject); - stream.pipe(u); - } - }); - }); - return p; -}; -exports.extract = (0, make_command_js_1.makeCommand)(extractFileSync, extractFile, opt => new unpack_js_1.UnpackSync(opt), opt => new unpack_js_1.Unpack(opt), (opt, files) => { - if (files?.length) - (0, list_js_1.filesFilter)(opt, files); -}); -//# sourceMappingURL=extract.js.map - -/***/ }), - -/***/ 81663: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// Get the appropriate flag to use for creating files -// We use fmap on Windows platforms for files less than -// 512kb. This is a fairly low limit, but avoids making -// things slower in some cases. Since most of what this -// library is used for is extracting tarballs of many -// relatively small files in npm packages and the like, -// it can be a big boost on Windows platforms. -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getWriteFlag = void 0; -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const platform = process.env.__FAKE_PLATFORM__ || process.platform; -const isWindows = platform === 'win32'; -/* c8 ignore start */ -const { O_CREAT, O_TRUNC, O_WRONLY } = fs_1.default.constants; -const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || - fs_1.default.constants.UV_FS_O_FILEMAP || - 0; -/* c8 ignore stop */ -const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; -const fMapLimit = 512 * 1024; -const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; -exports.getWriteFlag = !fMapEnabled ? - () => 'w' - : (size) => (size < fMapLimit ? fMapFlag : 'w'); -//# sourceMappingURL=get-write-flag.js.map - -/***/ }), - -/***/ 52374: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// parse a 512-byte header block to a data object, or vice-versa -// encode returns `true` if a pax extended header is needed, because -// the data could not be faithfully encoded in a simple header. -// (Also, check header.needPax to see if it needs a pax header.) -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.Header = void 0; -const node_path_1 = __nccwpck_require__(49411); -const large = __importStar(__nccwpck_require__(8520)); -const types = __importStar(__nccwpck_require__(57390)); -class Header { - cksumValid = false; - needPax = false; - nullBlock = false; - block; - path; - mode; - uid; - gid; - size; - cksum; - #type = 'Unsupported'; - linkpath; - uname; - gname; - devmaj = 0; - devmin = 0; - atime; - ctime; - mtime; - charset; - comment; - constructor(data, off = 0, ex, gex) { - if (Buffer.isBuffer(data)) { - this.decode(data, off || 0, ex, gex); - } - else if (data) { - this.#slurp(data); - } - } - decode(buf, off, ex, gex) { - if (!off) { - off = 0; - } - if (!buf || !(buf.length >= off + 512)) { - throw new Error('need 512 bytes for header'); - } - this.path = decString(buf, off, 100); - this.mode = decNumber(buf, off + 100, 8); - this.uid = decNumber(buf, off + 108, 8); - this.gid = decNumber(buf, off + 116, 8); - this.size = decNumber(buf, off + 124, 12); - this.mtime = decDate(buf, off + 136, 12); - this.cksum = decNumber(buf, off + 148, 12); - // if we have extended or global extended headers, apply them now - // See https://github.com/npm/node-tar/pull/187 - // Apply global before local, so it overrides - if (gex) - this.#slurp(gex, true); - if (ex) - this.#slurp(ex); - // old tar versions marked dirs as a file with a trailing / - const t = decString(buf, off + 156, 1); - if (types.isCode(t)) { - this.#type = t || '0'; - } - if (this.#type === '0' && this.path.slice(-1) === '/') { - this.#type = '5'; - } - // tar implementations sometimes incorrectly put the stat(dir).size - // as the size in the tarball, even though Directory entries are - // not able to have any body at all. In the very rare chance that - // it actually DOES have a body, we weren't going to do anything with - // it anyway, and it'll just be a warning about an invalid header. - if (this.#type === '5') { - this.size = 0; - } - this.linkpath = decString(buf, off + 157, 100); - if (buf.subarray(off + 257, off + 265).toString() === - 'ustar\u000000') { - this.uname = decString(buf, off + 265, 32); - this.gname = decString(buf, off + 297, 32); - /* c8 ignore start */ - this.devmaj = decNumber(buf, off + 329, 8) ?? 0; - this.devmin = decNumber(buf, off + 337, 8) ?? 0; - /* c8 ignore stop */ - if (buf[off + 475] !== 0) { - // definitely a prefix, definitely >130 chars. - const prefix = decString(buf, off + 345, 155); - this.path = prefix + '/' + this.path; - } - else { - const prefix = decString(buf, off + 345, 130); - if (prefix) { - this.path = prefix + '/' + this.path; - } - this.atime = decDate(buf, off + 476, 12); - this.ctime = decDate(buf, off + 488, 12); - } - } - let sum = 8 * 0x20; - for (let i = off; i < off + 148; i++) { - sum += buf[i]; - } - for (let i = off + 156; i < off + 512; i++) { - sum += buf[i]; - } - this.cksumValid = sum === this.cksum; - if (this.cksum === undefined && sum === 8 * 0x20) { - this.nullBlock = true; - } - } - #slurp(ex, gex = false) { - Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { - // we slurp in everything except for the path attribute in - // a global extended header, because that's weird. Also, any - // null/undefined values are ignored. - return !(v === null || - v === undefined || - (k === 'path' && gex) || - (k === 'linkpath' && gex) || - k === 'global'); - }))); - } - encode(buf, off = 0) { - if (!buf) { - buf = this.block = Buffer.alloc(512); - } - if (this.#type === 'Unsupported') { - this.#type = '0'; - } - if (!(buf.length >= off + 512)) { - throw new Error('need 512 bytes for header'); - } - const prefixSize = this.ctime || this.atime ? 130 : 155; - const split = splitPrefix(this.path || '', prefixSize); - const path = split[0]; - const prefix = split[1]; - this.needPax = !!split[2]; - this.needPax = encString(buf, off, 100, path) || this.needPax; - this.needPax = - encNumber(buf, off + 100, 8, this.mode) || this.needPax; - this.needPax = - encNumber(buf, off + 108, 8, this.uid) || this.needPax; - this.needPax = - encNumber(buf, off + 116, 8, this.gid) || this.needPax; - this.needPax = - encNumber(buf, off + 124, 12, this.size) || this.needPax; - this.needPax = - encDate(buf, off + 136, 12, this.mtime) || this.needPax; - buf[off + 156] = this.#type.charCodeAt(0); - this.needPax = - encString(buf, off + 157, 100, this.linkpath) || this.needPax; - buf.write('ustar\u000000', off + 257, 8); - this.needPax = - encString(buf, off + 265, 32, this.uname) || this.needPax; - this.needPax = - encString(buf, off + 297, 32, this.gname) || this.needPax; - this.needPax = - encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; - this.needPax = - encNumber(buf, off + 337, 8, this.devmin) || this.needPax; - this.needPax = - encString(buf, off + 345, prefixSize, prefix) || this.needPax; - if (buf[off + 475] !== 0) { - this.needPax = - encString(buf, off + 345, 155, prefix) || this.needPax; - } - else { - this.needPax = - encString(buf, off + 345, 130, prefix) || this.needPax; - this.needPax = - encDate(buf, off + 476, 12, this.atime) || this.needPax; - this.needPax = - encDate(buf, off + 488, 12, this.ctime) || this.needPax; - } - let sum = 8 * 0x20; - for (let i = off; i < off + 148; i++) { - sum += buf[i]; - } - for (let i = off + 156; i < off + 512; i++) { - sum += buf[i]; - } - this.cksum = sum; - encNumber(buf, off + 148, 8, this.cksum); - this.cksumValid = true; - return this.needPax; - } - get type() { - return (this.#type === 'Unsupported' ? - this.#type - : types.name.get(this.#type)); - } - get typeKey() { - return this.#type; - } - set type(type) { - const c = String(types.code.get(type)); - if (types.isCode(c) || c === 'Unsupported') { - this.#type = c; - } - else if (types.isCode(type)) { - this.#type = type; - } - else { - throw new TypeError('invalid entry type: ' + type); - } - } -} -exports.Header = Header; -const splitPrefix = (p, prefixSize) => { - const pathSize = 100; - let pp = p; - let prefix = ''; - let ret = undefined; - const root = node_path_1.posix.parse(p).root || '.'; - if (Buffer.byteLength(pp) < pathSize) { - ret = [pp, prefix, false]; - } - else { - // first set prefix to the dir, and path to the base - prefix = node_path_1.posix.dirname(pp); - pp = node_path_1.posix.basename(pp); - do { - if (Buffer.byteLength(pp) <= pathSize && - Buffer.byteLength(prefix) <= prefixSize) { - // both fit! - ret = [pp, prefix, false]; - } - else if (Buffer.byteLength(pp) > pathSize && - Buffer.byteLength(prefix) <= prefixSize) { - // prefix fits in prefix, but path doesn't fit in path - ret = [pp.slice(0, pathSize - 1), prefix, true]; - } - else { - // make path take a bit from prefix - pp = node_path_1.posix.join(node_path_1.posix.basename(prefix), pp); - prefix = node_path_1.posix.dirname(prefix); - } - } while (prefix !== root && ret === undefined); - // at this point, found no resolution, just truncate - if (!ret) { - ret = [p.slice(0, pathSize - 1), '', true]; - } - } - return ret; -}; -const decString = (buf, off, size) => buf - .subarray(off, off + size) - .toString('utf8') - .replace(/\0.*/, ''); -const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); -const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000); -const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ? - large.parse(buf.subarray(off, off + size)) - : decSmallNumber(buf, off, size); -const nanUndef = (value) => (isNaN(value) ? undefined : value); -const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf - .subarray(off, off + size) - .toString('utf8') - .replace(/\0.*$/, '') - .trim(), 8)); -// the maximum encodable as a null-terminated octal, by field size -const MAXNUM = { - 12: 0o77777777777, - 8: 0o7777777, -}; -const encNumber = (buf, off, size, num) => num === undefined ? false - : num > MAXNUM[size] || num < 0 ? - (large.encode(num, buf.subarray(off, off + size)), true) - : (encSmallNumber(buf, off, size, num), false); -const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii'); -const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); -const padOctal = (str, size) => (str.length === size - 1 ? - str - : new Array(size - str.length - 1).join('0') + str + ' ') + '\0'; -const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000)); -// enough to fill the longest string we've got -const NULLS = new Array(156).join('\0'); -// pad with nulls, return true if it's longer or non-ascii -const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'), - str.length !== Buffer.byteLength(str) || str.length > size)); -//# sourceMappingURL=header.js.map - -/***/ }), - -/***/ 16630: -/***/ (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 __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); -}; -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.u = exports.types = exports.r = exports.t = exports.x = exports.c = void 0; -__exportStar(__nccwpck_require__(27329), exports); -var create_js_1 = __nccwpck_require__(27329); -Object.defineProperty(exports, "c", ({ enumerable: true, get: function () { return create_js_1.create; } })); -__exportStar(__nccwpck_require__(32476), exports); -var extract_js_1 = __nccwpck_require__(32476); -Object.defineProperty(exports, "x", ({ enumerable: true, get: function () { return extract_js_1.extract; } })); -__exportStar(__nccwpck_require__(52374), exports); -__exportStar(__nccwpck_require__(84306), exports); -var list_js_1 = __nccwpck_require__(84306); -Object.defineProperty(exports, "t", ({ enumerable: true, get: function () { return list_js_1.list; } })); -// classes -__exportStar(__nccwpck_require__(7788), exports); -__exportStar(__nccwpck_require__(72522), exports); -__exportStar(__nccwpck_require__(58567), exports); -__exportStar(__nccwpck_require__(57369), exports); -__exportStar(__nccwpck_require__(45478), exports); -var replace_js_1 = __nccwpck_require__(45478); -Object.defineProperty(exports, "r", ({ enumerable: true, get: function () { return replace_js_1.replace; } })); -exports.types = __importStar(__nccwpck_require__(57390)); -__exportStar(__nccwpck_require__(86973), exports); -__exportStar(__nccwpck_require__(38780), exports); -var update_js_1 = __nccwpck_require__(38780); -Object.defineProperty(exports, "u", ({ enumerable: true, get: function () { return update_js_1.update; } })); -__exportStar(__nccwpck_require__(24028), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 8520: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Tar can encode large and negative numbers using a leading byte of -// 0xff for negative, and 0x80 for positive. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parse = exports.encode = void 0; -const encode = (num, buf) => { - if (!Number.isSafeInteger(num)) { - // The number is so large that javascript cannot represent it with integer - // precision. - throw Error('cannot encode number outside of javascript safe integer range'); - } - else if (num < 0) { - encodeNegative(num, buf); - } - else { - encodePositive(num, buf); - } - return buf; -}; -exports.encode = encode; -const encodePositive = (num, buf) => { - buf[0] = 0x80; - for (var i = buf.length; i > 1; i--) { - buf[i - 1] = num & 0xff; - num = Math.floor(num / 0x100); - } -}; -const encodeNegative = (num, buf) => { - buf[0] = 0xff; - var flipped = false; - num = num * -1; - for (var i = buf.length; i > 1; i--) { - var byte = num & 0xff; - num = Math.floor(num / 0x100); - if (flipped) { - buf[i - 1] = onesComp(byte); - } - else if (byte === 0) { - buf[i - 1] = 0; - } - else { - flipped = true; - buf[i - 1] = twosComp(byte); - } - } -}; -const parse = (buf) => { - const pre = buf[0]; - const value = pre === 0x80 ? pos(buf.subarray(1, buf.length)) - : pre === 0xff ? twos(buf) - : null; - if (value === null) { - throw Error('invalid base256 encoding'); - } - if (!Number.isSafeInteger(value)) { - // The number is so large that javascript cannot represent it with integer - // precision. - throw Error('parsed number outside of javascript safe integer range'); - } - return value; -}; -exports.parse = parse; -const twos = (buf) => { - var len = buf.length; - var sum = 0; - var flipped = false; - for (var i = len - 1; i > -1; i--) { - var byte = Number(buf[i]); - var f; - if (flipped) { - f = onesComp(byte); - } - else if (byte === 0) { - f = byte; - } - else { - flipped = true; - f = twosComp(byte); - } - if (f !== 0) { - sum -= f * Math.pow(256, len - i - 1); - } - } - return sum; -}; -const pos = (buf) => { - var len = buf.length; - var sum = 0; - for (var i = len - 1; i > -1; i--) { - var byte = Number(buf[i]); - if (byte !== 0) { - sum += byte * Math.pow(256, len - i - 1); - } - } - return sum; -}; -const onesComp = (byte) => (0xff ^ byte) & 0xff; -const twosComp = (byte) => ((0xff ^ byte) + 1) & 0xff; -//# sourceMappingURL=large-numbers.js.map - -/***/ }), - -/***/ 84306: -/***/ (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.list = exports.filesFilter = void 0; -// tar -t -const fsm = __importStar(__nccwpck_require__(40675)); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const path_1 = __nccwpck_require__(71017); -const make_command_js_1 = __nccwpck_require__(33830); -const parse_js_1 = __nccwpck_require__(72522); -const strip_trailing_slashes_js_1 = __nccwpck_require__(66018); -const onReadEntryFunction = (opt) => { - const onReadEntry = opt.onReadEntry; - opt.onReadEntry = - onReadEntry ? - e => { - onReadEntry(e); - e.resume(); - } - : e => e.resume(); -}; -// construct a filter that limits the file entries listed -// include child entries if a dir is included -const filesFilter = (opt, files) => { - const map = new Map(files.map(f => [(0, strip_trailing_slashes_js_1.stripTrailingSlashes)(f), true])); - const filter = opt.filter; - const mapHas = (file, r = '') => { - const root = r || (0, path_1.parse)(file).root || '.'; - let ret; - if (file === root) - ret = false; - else { - const m = map.get(file); - if (m !== undefined) { - ret = m; - } - else { - ret = mapHas((0, path_1.dirname)(file), root); - } - } - map.set(file, ret); - return ret; - }; - opt.filter = - filter ? - (file, entry) => filter(file, entry) && mapHas((0, strip_trailing_slashes_js_1.stripTrailingSlashes)(file)) - : file => mapHas((0, strip_trailing_slashes_js_1.stripTrailingSlashes)(file)); -}; -exports.filesFilter = filesFilter; -const listFileSync = (opt) => { - const p = new parse_js_1.Parser(opt); - const file = opt.file; - let fd; - try { - const stat = node_fs_1.default.statSync(file); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - if (stat.size < readSize) { - p.end(node_fs_1.default.readFileSync(file)); - } - else { - let pos = 0; - const buf = Buffer.allocUnsafe(readSize); - fd = node_fs_1.default.openSync(file, 'r'); - while (pos < stat.size) { - const bytesRead = node_fs_1.default.readSync(fd, buf, 0, readSize, pos); - pos += bytesRead; - p.write(buf.subarray(0, bytesRead)); - } - p.end(); - } - } - finally { - if (typeof fd === 'number') { - try { - node_fs_1.default.closeSync(fd); - /* c8 ignore next */ - } - catch (er) { } - } - } -}; -const listFile = (opt, _files) => { - const parse = new parse_js_1.Parser(opt); - const readSize = opt.maxReadSize || 16 * 1024 * 1024; - const file = opt.file; - const p = new Promise((resolve, reject) => { - parse.on('error', reject); - parse.on('end', resolve); - node_fs_1.default.stat(file, (er, stat) => { - if (er) { - reject(er); - } - else { - const stream = new fsm.ReadStream(file, { - readSize: readSize, - size: stat.size, - }); - stream.on('error', reject); - stream.pipe(parse); - } - }); - }); - return p; -}; -exports.list = (0, make_command_js_1.makeCommand)(listFileSync, listFile, opt => new parse_js_1.Parser(opt), opt => new parse_js_1.Parser(opt), (opt, files) => { - if (files?.length) - (0, exports.filesFilter)(opt, files); - if (!opt.noResume) - onReadEntryFunction(opt); -}); -//# sourceMappingURL=list.js.map - -/***/ }), - -/***/ 33830: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.makeCommand = void 0; -const options_js_1 = __nccwpck_require__(14839); -const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { - return Object.assign((opt_ = [], entries, cb) => { - if (Array.isArray(opt_)) { - entries = opt_; - opt_ = {}; - } - if (typeof entries === 'function') { - cb = entries; - entries = undefined; - } - if (!entries) { - entries = []; - } - else { - entries = Array.from(entries); - } - const opt = (0, options_js_1.dealias)(opt_); - validate?.(opt, entries); - if ((0, options_js_1.isSyncFile)(opt)) { - if (typeof cb === 'function') { - throw new TypeError('callback not supported for sync tar functions'); - } - return syncFile(opt, entries); - } - else if ((0, options_js_1.isAsyncFile)(opt)) { - const p = asyncFile(opt, entries); - // weirdness to make TS happy - const c = cb ? cb : undefined; - return c ? p.then(() => c(), c) : p; - } - else if ((0, options_js_1.isSyncNoFile)(opt)) { - if (typeof cb === 'function') { - throw new TypeError('callback not supported for sync tar functions'); - } - return syncNoFile(opt, entries); - } - else if ((0, options_js_1.isAsyncNoFile)(opt)) { - if (typeof cb === 'function') { - throw new TypeError('callback only supported with file option'); - } - return asyncNoFile(opt, entries); - /* c8 ignore start */ - } - else { - throw new Error('impossible options??'); - } - /* c8 ignore stop */ - }, { - syncFile, - asyncFile, - syncNoFile, - asyncNoFile, - validate, - }); -}; -exports.makeCommand = makeCommand; -//# sourceMappingURL=make-command.js.map - -/***/ }), - -/***/ 18704: -/***/ (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.mkdirSync = exports.mkdir = void 0; -const chownr_1 = __nccwpck_require__(40235); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const mkdirp_1 = __nccwpck_require__(27280); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const cwd_error_js_1 = __nccwpck_require__(36861); -const normalize_windows_path_js_1 = __nccwpck_require__(20762); -const symlink_error_js_1 = __nccwpck_require__(23012); -const cGet = (cache, key) => cache.get((0, normalize_windows_path_js_1.normalizeWindowsPath)(key)); -const cSet = (cache, key, val) => cache.set((0, normalize_windows_path_js_1.normalizeWindowsPath)(key), val); -const checkCwd = (dir, cb) => { - fs_1.default.stat(dir, (er, st) => { - if (er || !st.isDirectory()) { - er = new cwd_error_js_1.CwdError(dir, er?.code || 'ENOTDIR'); - } - cb(er); - }); -}; -/** - * Wrapper around mkdirp for tar's needs. - * - * The main purpose is to avoid creating directories if we know that - * they already exist (and track which ones exist for this purpose), - * and prevent entries from being extracted into symlinked folders, - * if `preservePaths` is not set. - */ -const mkdir = (dir, opt, cb) => { - dir = (0, normalize_windows_path_js_1.normalizeWindowsPath)(dir); - // if there's any overlap between mask and mode, - // then we'll need an explicit chmod - /* c8 ignore next */ - const umask = opt.umask ?? 0o22; - const mode = opt.mode | 0o0700; - const needChmod = (mode & umask) !== 0; - const uid = opt.uid; - const gid = opt.gid; - const doChown = typeof uid === 'number' && - typeof gid === 'number' && - (uid !== opt.processUid || gid !== opt.processGid); - const preserve = opt.preserve; - const unlink = opt.unlink; - const cache = opt.cache; - const cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd); - const done = (er, created) => { - if (er) { - cb(er); - } - else { - cSet(cache, dir, true); - if (created && doChown) { - (0, chownr_1.chownr)(created, uid, gid, er => done(er)); - } - else if (needChmod) { - fs_1.default.chmod(dir, mode, cb); - } - else { - cb(); - } - } - }; - if (cache && cGet(cache, dir) === true) { - return done(); - } - if (dir === cwd) { - return checkCwd(dir, done); - } - if (preserve) { - return (0, mkdirp_1.mkdirp)(dir, { mode }).then(made => done(null, made ?? undefined), // oh, ts - done); - } - const sub = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(cwd, dir)); - const parts = sub.split('/'); - mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done); -}; -exports.mkdir = mkdir; -const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => { - if (!parts.length) { - return cb(null, created); - } - const p = parts.shift(); - const part = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(base + '/' + p)); - if (cGet(cache, part)) { - return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); - } - fs_1.default.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); -}; -const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => { - if (er) { - fs_1.default.lstat(part, (statEr, st) => { - if (statEr) { - statEr.path = - statEr.path && (0, normalize_windows_path_js_1.normalizeWindowsPath)(statEr.path); - cb(statEr); - } - else if (st.isDirectory()) { - mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); - } - else if (unlink) { - fs_1.default.unlink(part, er => { - if (er) { - return cb(er); - } - fs_1.default.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); - }); - } - else if (st.isSymbolicLink()) { - return cb(new symlink_error_js_1.SymlinkError(part, part + '/' + parts.join('/'))); - } - else { - cb(er); - } - }); - } - else { - created = created || part; - mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); - } -}; -const checkCwdSync = (dir) => { - let ok = false; - let code = undefined; - try { - ok = fs_1.default.statSync(dir).isDirectory(); - } - catch (er) { - code = er?.code; - } - finally { - if (!ok) { - throw new cwd_error_js_1.CwdError(dir, code ?? 'ENOTDIR'); - } - } -}; -const mkdirSync = (dir, opt) => { - dir = (0, normalize_windows_path_js_1.normalizeWindowsPath)(dir); - // if there's any overlap between mask and mode, - // then we'll need an explicit chmod - /* c8 ignore next */ - const umask = opt.umask ?? 0o22; - const mode = opt.mode | 0o700; - const needChmod = (mode & umask) !== 0; - const uid = opt.uid; - const gid = opt.gid; - const doChown = typeof uid === 'number' && - typeof gid === 'number' && - (uid !== opt.processUid || gid !== opt.processGid); - const preserve = opt.preserve; - const unlink = opt.unlink; - const cache = opt.cache; - const cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd); - const done = (created) => { - cSet(cache, dir, true); - if (created && doChown) { - (0, chownr_1.chownrSync)(created, uid, gid); - } - if (needChmod) { - fs_1.default.chmodSync(dir, mode); - } - }; - if (cache && cGet(cache, dir) === true) { - return done(); - } - if (dir === cwd) { - checkCwdSync(cwd); - return done(); - } - if (preserve) { - return done((0, mkdirp_1.mkdirpSync)(dir, mode) ?? undefined); - } - const sub = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(cwd, dir)); - const parts = sub.split('/'); - let created = undefined; - for (let p = parts.shift(), part = cwd; p && (part += '/' + p); p = parts.shift()) { - part = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(part)); - if (cGet(cache, part)) { - continue; - } - try { - fs_1.default.mkdirSync(part, mode); - created = created || part; - cSet(cache, part, true); - } - catch (er) { - const st = fs_1.default.lstatSync(part); - if (st.isDirectory()) { - cSet(cache, part, true); - continue; - } - else if (unlink) { - fs_1.default.unlinkSync(part); - fs_1.default.mkdirSync(part, mode); - created = created || part; - cSet(cache, part, true); - continue; - } - else if (st.isSymbolicLink()) { - return new symlink_error_js_1.SymlinkError(part, part + '/' + parts.join('/')); - } - } - } - return done(created); -}; -exports.mkdirSync = mkdirSync; -//# sourceMappingURL=mkdir.js.map - -/***/ }), - -/***/ 1810: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.modeFix = void 0; -const modeFix = (mode, isDir, portable) => { - mode &= 0o7777; - // in portable mode, use the minimum reasonable umask - // if this system creates files with 0o664 by default - // (as some linux distros do), then we'll write the - // archive with 0o644 instead. Also, don't ever create - // a file that is not readable/writable by the owner. - if (portable) { - mode = (mode | 0o600) & ~0o22; - } - // if dirs are readable, then they should be listable - if (isDir) { - if (mode & 0o400) { - mode |= 0o100; - } - if (mode & 0o40) { - mode |= 0o10; - } - if (mode & 0o4) { - mode |= 0o1; - } - } - return mode; -}; -exports.modeFix = modeFix; -//# sourceMappingURL=mode-fix.js.map - -/***/ }), - -/***/ 19862: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.normalizeUnicode = void 0; -// warning: extremely hot code path. -// This has been meticulously optimized for use -// within npm install on large package trees. -// Do not edit without careful benchmarking. -const normalizeCache = Object.create(null); -const { hasOwnProperty } = Object.prototype; -const normalizeUnicode = (s) => { - if (!hasOwnProperty.call(normalizeCache, s)) { - normalizeCache[s] = s.normalize('NFD'); - } - return normalizeCache[s]; -}; -exports.normalizeUnicode = normalizeUnicode; -//# sourceMappingURL=normalize-unicode.js.map - -/***/ }), - -/***/ 20762: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// on windows, either \ or / are valid directory separators. -// on unix, \ is a valid character in filenames. -// so, on windows, and only on windows, we replace all \ chars with /, -// so that we can use / as our one and only directory separator char. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.normalizeWindowsPath = void 0; -const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; -exports.normalizeWindowsPath = platform !== 'win32' ? - (p) => p - : (p) => p && p.replace(/\\/g, '/'); -//# sourceMappingURL=normalize-windows-path.js.map - -/***/ }), - -/***/ 14839: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// turn tar(1) style args like `C` into the more verbose things like `cwd` -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.dealias = exports.isNoFile = exports.isFile = exports.isAsync = exports.isSync = exports.isAsyncNoFile = exports.isSyncNoFile = exports.isAsyncFile = exports.isSyncFile = void 0; -const argmap = new Map([ - ['C', 'cwd'], - ['f', 'file'], - ['z', 'gzip'], - ['P', 'preservePaths'], - ['U', 'unlink'], - ['strip-components', 'strip'], - ['stripComponents', 'strip'], - ['keep-newer', 'newer'], - ['keepNewer', 'newer'], - ['keep-newer-files', 'newer'], - ['keepNewerFiles', 'newer'], - ['k', 'keep'], - ['keep-existing', 'keep'], - ['keepExisting', 'keep'], - ['m', 'noMtime'], - ['no-mtime', 'noMtime'], - ['p', 'preserveOwner'], - ['L', 'follow'], - ['h', 'follow'], - ['onentry', 'onReadEntry'], -]); -const isSyncFile = (o) => !!o.sync && !!o.file; -exports.isSyncFile = isSyncFile; -const isAsyncFile = (o) => !o.sync && !!o.file; -exports.isAsyncFile = isAsyncFile; -const isSyncNoFile = (o) => !!o.sync && !o.file; -exports.isSyncNoFile = isSyncNoFile; -const isAsyncNoFile = (o) => !o.sync && !o.file; -exports.isAsyncNoFile = isAsyncNoFile; -const isSync = (o) => !!o.sync; -exports.isSync = isSync; -const isAsync = (o) => !o.sync; -exports.isAsync = isAsync; -const isFile = (o) => !!o.file; -exports.isFile = isFile; -const isNoFile = (o) => !o.file; -exports.isNoFile = isNoFile; -const dealiasKey = (k) => { - const d = argmap.get(k); - if (d) - return d; - return k; -}; -const dealias = (opt = {}) => { - if (!opt) - return {}; - const result = {}; - for (const [key, v] of Object.entries(opt)) { - // TS doesn't know that aliases are going to always be the same type - const k = dealiasKey(key); - result[k] = v; - } - // affordance for deprecated noChmod -> chmod - if (result.chmod === undefined && result.noChmod === false) { - result.chmod = true; - } - delete result.noChmod; - return result; -}; -exports.dealias = dealias; -//# sourceMappingURL=options.js.map - -/***/ }), - -/***/ 7788: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// A readable tar stream creator -// Technically, this is a transform stream that you write paths into, -// and tar format comes out of. -// The `add()` method is like `write()` but returns this, -// and end() return `this` as well, so you can -// do `new Pack(opt).add('files').add('dir').end().pipe(output) -// You could also do something like: -// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar')) -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.PackSync = exports.Pack = exports.PackJob = void 0; -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const write_entry_js_1 = __nccwpck_require__(24028); -class PackJob { - path; - absolute; - entry; - stat; - readdir; - pending = false; - ignore = false; - piped = false; - constructor(path, absolute) { - this.path = path || './'; - this.absolute = absolute; - } -} -exports.PackJob = PackJob; -const minipass_1 = __nccwpck_require__(14968); -const zlib = __importStar(__nccwpck_require__(26139)); -const yallist_1 = __nccwpck_require__(43796); -const read_entry_js_1 = __nccwpck_require__(57369); -const warn_method_js_1 = __nccwpck_require__(449); -const EOF = Buffer.alloc(1024); -const ONSTAT = Symbol('onStat'); -const ENDED = Symbol('ended'); -const QUEUE = Symbol('queue'); -const CURRENT = Symbol('current'); -const PROCESS = Symbol('process'); -const PROCESSING = Symbol('processing'); -const PROCESSJOB = Symbol('processJob'); -const JOBS = Symbol('jobs'); -const JOBDONE = Symbol('jobDone'); -const ADDFSENTRY = Symbol('addFSEntry'); -const ADDTARENTRY = Symbol('addTarEntry'); -const STAT = Symbol('stat'); -const READDIR = Symbol('readdir'); -const ONREADDIR = Symbol('onreaddir'); -const PIPE = Symbol('pipe'); -const ENTRY = Symbol('entry'); -const ENTRYOPT = Symbol('entryOpt'); -const WRITEENTRYCLASS = Symbol('writeEntryClass'); -const WRITE = Symbol('write'); -const ONDRAIN = Symbol('ondrain'); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const normalize_windows_path_js_1 = __nccwpck_require__(20762); -class Pack extends minipass_1.Minipass { - opt; - cwd; - maxReadSize; - preservePaths; - strict; - noPax; - prefix; - linkCache; - statCache; - file; - portable; - zip; - readdirCache; - noDirRecurse; - follow; - noMtime; - mtime; - filter; - jobs; - [WRITEENTRYCLASS]; - onWriteEntry; - [QUEUE]; - [JOBS] = 0; - [PROCESSING] = false; - [ENDED] = false; - constructor(opt = {}) { - //@ts-ignore - super(); - this.opt = opt; - this.file = opt.file || ''; - this.cwd = opt.cwd || process.cwd(); - this.maxReadSize = opt.maxReadSize; - this.preservePaths = !!opt.preservePaths; - this.strict = !!opt.strict; - this.noPax = !!opt.noPax; - this.prefix = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.prefix || ''); - this.linkCache = opt.linkCache || new Map(); - this.statCache = opt.statCache || new Map(); - this.readdirCache = opt.readdirCache || new Map(); - this.onWriteEntry = opt.onWriteEntry; - this[WRITEENTRYCLASS] = write_entry_js_1.WriteEntry; - if (typeof opt.onwarn === 'function') { - this.on('warn', opt.onwarn); - } - this.portable = !!opt.portable; - if (opt.gzip || opt.brotli) { - if (opt.gzip && opt.brotli) { - throw new TypeError('gzip and brotli are mutually exclusive'); - } - if (opt.gzip) { - if (typeof opt.gzip !== 'object') { - opt.gzip = {}; - } - if (this.portable) { - opt.gzip.portable = true; - } - this.zip = new zlib.Gzip(opt.gzip); - } - if (opt.brotli) { - if (typeof opt.brotli !== 'object') { - opt.brotli = {}; - } - this.zip = new zlib.BrotliCompress(opt.brotli); - } - /* c8 ignore next */ - if (!this.zip) - throw new Error('impossible'); - const zip = this.zip; - zip.on('data', chunk => super.write(chunk)); - zip.on('end', () => super.end()); - zip.on('drain', () => this[ONDRAIN]()); - this.on('resume', () => zip.resume()); - } - else { - this.on('drain', this[ONDRAIN]); - } - this.noDirRecurse = !!opt.noDirRecurse; - this.follow = !!opt.follow; - this.noMtime = !!opt.noMtime; - if (opt.mtime) - this.mtime = opt.mtime; - this.filter = - typeof opt.filter === 'function' ? opt.filter : () => true; - this[QUEUE] = new yallist_1.Yallist(); - this[JOBS] = 0; - this.jobs = Number(opt.jobs) || 4; - this[PROCESSING] = false; - this[ENDED] = false; - } - [WRITE](chunk) { - return super.write(chunk); - } - add(path) { - this.write(path); - return this; - } - end(path, encoding, cb) { - /* c8 ignore start */ - if (typeof path === 'function') { - cb = path; - path = undefined; - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - /* c8 ignore stop */ - if (path) { - this.add(path); - } - this[ENDED] = true; - this[PROCESS](); - /* c8 ignore next */ - if (cb) - cb(); - return this; - } - write(path) { - if (this[ENDED]) { - throw new Error('write after end'); - } - if (path instanceof read_entry_js_1.ReadEntry) { - this[ADDTARENTRY](path); - } - else { - this[ADDFSENTRY](path); - } - return this.flowing; - } - [ADDTARENTRY](p) { - const absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.resolve(this.cwd, p.path)); - // in this case, we don't have to wait for the stat - if (!this.filter(p.path, p)) { - p.resume(); - } - else { - const job = new PackJob(p.path, absolute); - job.entry = new write_entry_js_1.WriteEntryTar(p, this[ENTRYOPT](job)); - job.entry.on('end', () => this[JOBDONE](job)); - this[JOBS] += 1; - this[QUEUE].push(job); - } - this[PROCESS](); - } - [ADDFSENTRY](p) { - const absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.resolve(this.cwd, p)); - this[QUEUE].push(new PackJob(p, absolute)); - this[PROCESS](); - } - [STAT](job) { - job.pending = true; - this[JOBS] += 1; - const stat = this.follow ? 'stat' : 'lstat'; - fs_1.default[stat](job.absolute, (er, stat) => { - job.pending = false; - this[JOBS] -= 1; - if (er) { - this.emit('error', er); - } - else { - this[ONSTAT](job, stat); - } - }); - } - [ONSTAT](job, stat) { - this.statCache.set(job.absolute, stat); - job.stat = stat; - // now we have the stat, we can filter it. - if (!this.filter(job.path, stat)) { - job.ignore = true; - } - this[PROCESS](); - } - [READDIR](job) { - job.pending = true; - this[JOBS] += 1; - fs_1.default.readdir(job.absolute, (er, entries) => { - job.pending = false; - this[JOBS] -= 1; - if (er) { - return this.emit('error', er); - } - this[ONREADDIR](job, entries); - }); - } - [ONREADDIR](job, entries) { - this.readdirCache.set(job.absolute, entries); - job.readdir = entries; - this[PROCESS](); - } - [PROCESS]() { - if (this[PROCESSING]) { - return; - } - this[PROCESSING] = true; - for (let w = this[QUEUE].head; !!w && this[JOBS] < this.jobs; w = w.next) { - this[PROCESSJOB](w.value); - if (w.value.ignore) { - const p = w.next; - this[QUEUE].removeNode(w); - w.next = p; - } - } - this[PROCESSING] = false; - if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) { - if (this.zip) { - this.zip.end(EOF); - } - else { - super.write(EOF); - super.end(); - } - } - } - get [CURRENT]() { - return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value; - } - [JOBDONE](_job) { - this[QUEUE].shift(); - this[JOBS] -= 1; - this[PROCESS](); - } - [PROCESSJOB](job) { - if (job.pending) { - return; - } - if (job.entry) { - if (job === this[CURRENT] && !job.piped) { - this[PIPE](job); - } - return; - } - if (!job.stat) { - const sc = this.statCache.get(job.absolute); - if (sc) { - this[ONSTAT](job, sc); - } - else { - this[STAT](job); - } - } - if (!job.stat) { - return; - } - // filtered out! - if (job.ignore) { - return; - } - if (!this.noDirRecurse && - job.stat.isDirectory() && - !job.readdir) { - const rc = this.readdirCache.get(job.absolute); - if (rc) { - this[ONREADDIR](job, rc); - } - else { - this[READDIR](job); - } - if (!job.readdir) { - return; - } - } - // we know it doesn't have an entry, because that got checked above - job.entry = this[ENTRY](job); - if (!job.entry) { - job.ignore = true; - return; - } - if (job === this[CURRENT] && !job.piped) { - this[PIPE](job); - } - } - [ENTRYOPT](job) { - return { - onwarn: (code, msg, data) => this.warn(code, msg, data), - noPax: this.noPax, - cwd: this.cwd, - absolute: job.absolute, - preservePaths: this.preservePaths, - maxReadSize: this.maxReadSize, - strict: this.strict, - portable: this.portable, - linkCache: this.linkCache, - statCache: this.statCache, - noMtime: this.noMtime, - mtime: this.mtime, - prefix: this.prefix, - onWriteEntry: this.onWriteEntry, - }; - } - [ENTRY](job) { - this[JOBS] += 1; - try { - const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); - return e - .on('end', () => this[JOBDONE](job)) - .on('error', er => this.emit('error', er)); - } - catch (er) { - this.emit('error', er); - } - } - [ONDRAIN]() { - if (this[CURRENT] && this[CURRENT].entry) { - this[CURRENT].entry.resume(); - } - } - // like .pipe() but using super, because our write() is special - [PIPE](job) { - job.piped = true; - if (job.readdir) { - job.readdir.forEach(entry => { - const p = job.path; - const base = p === './' ? '' : p.replace(/\/*$/, '/'); - this[ADDFSENTRY](base + entry); - }); - } - const source = job.entry; - const zip = this.zip; - /* c8 ignore start */ - if (!source) - throw new Error('cannot pipe without source'); - /* c8 ignore stop */ - if (zip) { - source.on('data', chunk => { - if (!zip.write(chunk)) { - source.pause(); - } - }); - } - else { - source.on('data', chunk => { - if (!super.write(chunk)) { - source.pause(); - } - }); - } - } - pause() { - if (this.zip) { - this.zip.pause(); - } - return super.pause(); - } - warn(code, message, data = {}) { - (0, warn_method_js_1.warnMethod)(this, code, message, data); - } -} -exports.Pack = Pack; -class PackSync extends Pack { - sync = true; - constructor(opt) { - super(opt); - this[WRITEENTRYCLASS] = write_entry_js_1.WriteEntrySync; - } - // pause/resume are no-ops in sync streams. - pause() { } - resume() { } - [STAT](job) { - const stat = this.follow ? 'statSync' : 'lstatSync'; - this[ONSTAT](job, fs_1.default[stat](job.absolute)); - } - [READDIR](job) { - this[ONREADDIR](job, fs_1.default.readdirSync(job.absolute)); - } - // gotta get it all in this tick - [PIPE](job) { - const source = job.entry; - const zip = this.zip; - if (job.readdir) { - job.readdir.forEach(entry => { - const p = job.path; - const base = p === './' ? '' : p.replace(/\/*$/, '/'); - this[ADDFSENTRY](base + entry); - }); - } - /* c8 ignore start */ - if (!source) - throw new Error('Cannot pipe without source'); - /* c8 ignore stop */ - if (zip) { - source.on('data', chunk => { - zip.write(chunk); - }); - } - else { - source.on('data', chunk => { - super[WRITE](chunk); - }); - } - } -} -exports.PackSync = PackSync; -//# sourceMappingURL=pack.js.map - -/***/ }), - -/***/ 72522: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// this[BUFFER] is the remainder of a chunk if we're waiting for -// the full 512 bytes of a header to come in. We will Buffer.concat() -// it to the next write(), which is a mem copy, but a small one. -// -// this[QUEUE] is a Yallist of entries that haven't been emitted -// yet this can only get filled up if the user keeps write()ing after -// a write() returns false, or does a write() with more than one entry -// -// We don't buffer chunks, we always parse them and either create an -// entry, or push it into the active entry. The ReadEntry class knows -// to throw data away if .ignore=true -// -// Shift entry off the buffer when it emits 'end', and emit 'entry' for -// the next one in the list. -// -// At any time, we're pushing body chunks into the entry at WRITEENTRY, -// and waiting for 'end' on the entry at READENTRY -// -// ignored entries get .resume() called on them straight away -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Parser = void 0; -const events_1 = __nccwpck_require__(82361); -const minizlib_1 = __nccwpck_require__(26139); -const yallist_1 = __nccwpck_require__(43796); -const header_js_1 = __nccwpck_require__(52374); -const pax_js_1 = __nccwpck_require__(58567); -const read_entry_js_1 = __nccwpck_require__(57369); -const warn_method_js_1 = __nccwpck_require__(449); -const maxMetaEntrySize = 1024 * 1024; -const gzipHeader = Buffer.from([0x1f, 0x8b]); -const STATE = Symbol('state'); -const WRITEENTRY = Symbol('writeEntry'); -const READENTRY = Symbol('readEntry'); -const NEXTENTRY = Symbol('nextEntry'); -const PROCESSENTRY = Symbol('processEntry'); -const EX = Symbol('extendedHeader'); -const GEX = Symbol('globalExtendedHeader'); -const META = Symbol('meta'); -const EMITMETA = Symbol('emitMeta'); -const BUFFER = Symbol('buffer'); -const QUEUE = Symbol('queue'); -const ENDED = Symbol('ended'); -const EMITTEDEND = Symbol('emittedEnd'); -const EMIT = Symbol('emit'); -const UNZIP = Symbol('unzip'); -const CONSUMECHUNK = Symbol('consumeChunk'); -const CONSUMECHUNKSUB = Symbol('consumeChunkSub'); -const CONSUMEBODY = Symbol('consumeBody'); -const CONSUMEMETA = Symbol('consumeMeta'); -const CONSUMEHEADER = Symbol('consumeHeader'); -const CONSUMING = Symbol('consuming'); -const BUFFERCONCAT = Symbol('bufferConcat'); -const MAYBEEND = Symbol('maybeEnd'); -const WRITING = Symbol('writing'); -const ABORTED = Symbol('aborted'); -const DONE = Symbol('onDone'); -const SAW_VALID_ENTRY = Symbol('sawValidEntry'); -const SAW_NULL_BLOCK = Symbol('sawNullBlock'); -const SAW_EOF = Symbol('sawEOF'); -const CLOSESTREAM = Symbol('closeStream'); -const noop = () => true; -class Parser extends events_1.EventEmitter { - file; - strict; - maxMetaEntrySize; - filter; - brotli; - writable = true; - readable = false; - [QUEUE] = new yallist_1.Yallist(); - [BUFFER]; - [READENTRY]; - [WRITEENTRY]; - [STATE] = 'begin'; - [META] = ''; - [EX]; - [GEX]; - [ENDED] = false; - [UNZIP]; - [ABORTED] = false; - [SAW_VALID_ENTRY]; - [SAW_NULL_BLOCK] = false; - [SAW_EOF] = false; - [WRITING] = false; - [CONSUMING] = false; - [EMITTEDEND] = false; - constructor(opt = {}) { - super(); - this.file = opt.file || ''; - // these BADARCHIVE errors can't be detected early. listen on DONE. - this.on(DONE, () => { - if (this[STATE] === 'begin' || - this[SAW_VALID_ENTRY] === false) { - // either less than 1 block of data, or all entries were invalid. - // Either way, probably not even a tarball. - this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format'); - } - }); - if (opt.ondone) { - this.on(DONE, opt.ondone); - } - else { - this.on(DONE, () => { - this.emit('prefinish'); - this.emit('finish'); - this.emit('end'); - }); - } - this.strict = !!opt.strict; - this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; - this.filter = typeof opt.filter === 'function' ? opt.filter : noop; - // Unlike gzip, brotli doesn't have any magic bytes to identify it - // Users need to explicitly tell us they're extracting a brotli file - // Or we infer from the file extension - const isTBR = opt.file && - (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')); - // if it's a tbr file it MIGHT be brotli, but we don't know until - // we look at it and verify it's not a valid tar file. - this.brotli = - !opt.gzip && opt.brotli !== undefined ? opt.brotli - : isTBR ? undefined - : false; - // have to set this so that streams are ok piping into it - this.on('end', () => this[CLOSESTREAM]()); - if (typeof opt.onwarn === 'function') { - this.on('warn', opt.onwarn); - } - if (typeof opt.onReadEntry === 'function') { - this.on('entry', opt.onReadEntry); - } - } - warn(code, message, data = {}) { - (0, warn_method_js_1.warnMethod)(this, code, message, data); - } - [CONSUMEHEADER](chunk, position) { - if (this[SAW_VALID_ENTRY] === undefined) { - this[SAW_VALID_ENTRY] = false; - } - let header; - try { - header = new header_js_1.Header(chunk, position, this[EX], this[GEX]); - } - catch (er) { - return this.warn('TAR_ENTRY_INVALID', er); - } - if (header.nullBlock) { - if (this[SAW_NULL_BLOCK]) { - this[SAW_EOF] = true; - // ending an archive with no entries. pointless, but legal. - if (this[STATE] === 'begin') { - this[STATE] = 'header'; - } - this[EMIT]('eof'); - } - else { - this[SAW_NULL_BLOCK] = true; - this[EMIT]('nullBlock'); - } - } - else { - this[SAW_NULL_BLOCK] = false; - if (!header.cksumValid) { - this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header }); - } - else if (!header.path) { - this.warn('TAR_ENTRY_INVALID', 'path is required', { header }); - } - else { - const type = header.type; - if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { - this.warn('TAR_ENTRY_INVALID', 'linkpath required', { - header, - }); - } - else if (!/^(Symbolic)?Link$/.test(type) && - !/^(Global)?ExtendedHeader$/.test(type) && - header.linkpath) { - this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', { - header, - }); - } - else { - const entry = (this[WRITEENTRY] = new read_entry_js_1.ReadEntry(header, this[EX], this[GEX])); - // we do this for meta & ignored entries as well, because they - // are still valid tar, or else we wouldn't know to ignore them - if (!this[SAW_VALID_ENTRY]) { - if (entry.remain) { - // this might be the one! - const onend = () => { - if (!entry.invalid) { - this[SAW_VALID_ENTRY] = true; - } - }; - entry.on('end', onend); - } - else { - this[SAW_VALID_ENTRY] = true; - } - } - if (entry.meta) { - if (entry.size > this.maxMetaEntrySize) { - entry.ignore = true; - this[EMIT]('ignoredEntry', entry); - this[STATE] = 'ignore'; - entry.resume(); - } - else if (entry.size > 0) { - this[META] = ''; - entry.on('data', c => (this[META] += c)); - this[STATE] = 'meta'; - } - } - else { - this[EX] = undefined; - entry.ignore = - entry.ignore || !this.filter(entry.path, entry); - if (entry.ignore) { - // probably valid, just not something we care about - this[EMIT]('ignoredEntry', entry); - this[STATE] = entry.remain ? 'ignore' : 'header'; - entry.resume(); - } - else { - if (entry.remain) { - this[STATE] = 'body'; - } - else { - this[STATE] = 'header'; - entry.end(); - } - if (!this[READENTRY]) { - this[QUEUE].push(entry); - this[NEXTENTRY](); - } - else { - this[QUEUE].push(entry); - } - } - } - } - } - } - } - [CLOSESTREAM]() { - queueMicrotask(() => this.emit('close')); - } - [PROCESSENTRY](entry) { - let go = true; - if (!entry) { - this[READENTRY] = undefined; - go = false; - } - else if (Array.isArray(entry)) { - const [ev, ...args] = entry; - this.emit(ev, ...args); - } - else { - this[READENTRY] = entry; - this.emit('entry', entry); - if (!entry.emittedEnd) { - entry.on('end', () => this[NEXTENTRY]()); - go = false; - } - } - return go; - } - [NEXTENTRY]() { - do { } while (this[PROCESSENTRY](this[QUEUE].shift())); - if (!this[QUEUE].length) { - // At this point, there's nothing in the queue, but we may have an - // entry which is being consumed (readEntry). - // If we don't, then we definitely can handle more data. - // If we do, and either it's flowing, or it has never had any data - // written to it, then it needs more. - // The only other possibility is that it has returned false from a - // write() call, so we wait for the next drain to continue. - const re = this[READENTRY]; - const drainNow = !re || re.flowing || re.size === re.remain; - if (drainNow) { - if (!this[WRITING]) { - this.emit('drain'); - } - } - else { - re.once('drain', () => this.emit('drain')); - } - } - } - [CONSUMEBODY](chunk, position) { - // write up to but no more than writeEntry.blockRemain - const entry = this[WRITEENTRY]; - /* c8 ignore start */ - if (!entry) { - throw new Error('attempt to consume body without entry??'); - } - const br = entry.blockRemain ?? 0; - /* c8 ignore stop */ - const c = br >= chunk.length && position === 0 ? - chunk - : chunk.subarray(position, position + br); - entry.write(c); - if (!entry.blockRemain) { - this[STATE] = 'header'; - this[WRITEENTRY] = undefined; - entry.end(); - } - return c.length; - } - [CONSUMEMETA](chunk, position) { - const entry = this[WRITEENTRY]; - const ret = this[CONSUMEBODY](chunk, position); - // if we finished, then the entry is reset - if (!this[WRITEENTRY] && entry) { - this[EMITMETA](entry); - } - return ret; - } - [EMIT](ev, data, extra) { - if (!this[QUEUE].length && !this[READENTRY]) { - this.emit(ev, data, extra); - } - else { - this[QUEUE].push([ev, data, extra]); - } - } - [EMITMETA](entry) { - this[EMIT]('meta', this[META]); - switch (entry.type) { - case 'ExtendedHeader': - case 'OldExtendedHeader': - this[EX] = pax_js_1.Pax.parse(this[META], this[EX], false); - break; - case 'GlobalExtendedHeader': - this[GEX] = pax_js_1.Pax.parse(this[META], this[GEX], true); - break; - case 'NextFileHasLongPath': - case 'OldGnuLongPath': { - const ex = this[EX] ?? Object.create(null); - this[EX] = ex; - ex.path = this[META].replace(/\0.*/, ''); - break; - } - case 'NextFileHasLongLinkpath': { - const ex = this[EX] || Object.create(null); - this[EX] = ex; - ex.linkpath = this[META].replace(/\0.*/, ''); - break; - } - /* c8 ignore start */ - default: - throw new Error('unknown meta: ' + entry.type); - /* c8 ignore stop */ - } - } - abort(error) { - this[ABORTED] = true; - this.emit('abort', error); - // always throws, even in non-strict mode - this.warn('TAR_ABORT', error, { recoverable: false }); - } - write(chunk, encoding, cb) { - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - if (typeof chunk === 'string') { - chunk = Buffer.from(chunk, - /* c8 ignore next */ - typeof encoding === 'string' ? encoding : 'utf8'); - } - if (this[ABORTED]) { - /* c8 ignore next */ - cb?.(); - return false; - } - // first write, might be gzipped - const needSniff = this[UNZIP] === undefined || - (this.brotli === undefined && this[UNZIP] === false); - if (needSniff && chunk) { - if (this[BUFFER]) { - chunk = Buffer.concat([this[BUFFER], chunk]); - this[BUFFER] = undefined; - } - if (chunk.length < gzipHeader.length) { - this[BUFFER] = chunk; - /* c8 ignore next */ - cb?.(); - return true; - } - // look for gzip header - for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) { - if (chunk[i] !== gzipHeader[i]) { - this[UNZIP] = false; - } - } - const maybeBrotli = this.brotli === undefined; - if (this[UNZIP] === false && maybeBrotli) { - // read the first header to see if it's a valid tar file. If so, - // we can safely assume that it's not actually brotli, despite the - // .tbr or .tar.br file extension. - // if we ended before getting a full chunk, yes, def brotli - if (chunk.length < 512) { - if (this[ENDED]) { - this.brotli = true; - } - else { - this[BUFFER] = chunk; - /* c8 ignore next */ - cb?.(); - return true; - } - } - else { - // if it's tar, it's pretty reliably not brotli, chances of - // that happening are astronomical. - try { - new header_js_1.Header(chunk.subarray(0, 512)); - this.brotli = false; - } - catch (_) { - this.brotli = true; - } - } - } - if (this[UNZIP] === undefined || - (this[UNZIP] === false && this.brotli)) { - const ended = this[ENDED]; - this[ENDED] = false; - this[UNZIP] = - this[UNZIP] === undefined ? - new minizlib_1.Unzip({}) - : new minizlib_1.BrotliDecompress({}); - this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk)); - this[UNZIP].on('error', er => this.abort(er)); - this[UNZIP].on('end', () => { - this[ENDED] = true; - this[CONSUMECHUNK](); - }); - this[WRITING] = true; - const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk); - this[WRITING] = false; - cb?.(); - return ret; - } - } - this[WRITING] = true; - if (this[UNZIP]) { - this[UNZIP].write(chunk); - } - else { - this[CONSUMECHUNK](chunk); - } - this[WRITING] = false; - // return false if there's a queue, or if the current entry isn't flowing - const ret = this[QUEUE].length ? false - : this[READENTRY] ? this[READENTRY].flowing - : true; - // if we have no queue, then that means a clogged READENTRY - if (!ret && !this[QUEUE].length) { - this[READENTRY]?.once('drain', () => this.emit('drain')); - } - /* c8 ignore next */ - cb?.(); - return ret; - } - [BUFFERCONCAT](c) { - if (c && !this[ABORTED]) { - this[BUFFER] = - this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c; - } - } - [MAYBEEND]() { - if (this[ENDED] && - !this[EMITTEDEND] && - !this[ABORTED] && - !this[CONSUMING]) { - this[EMITTEDEND] = true; - const entry = this[WRITEENTRY]; - if (entry && entry.blockRemain) { - // truncated, likely a damaged file - const have = this[BUFFER] ? this[BUFFER].length : 0; - this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); - if (this[BUFFER]) { - entry.write(this[BUFFER]); - } - entry.end(); - } - this[EMIT](DONE); - } - } - [CONSUMECHUNK](chunk) { - if (this[CONSUMING] && chunk) { - this[BUFFERCONCAT](chunk); - } - else if (!chunk && !this[BUFFER]) { - this[MAYBEEND](); - } - else if (chunk) { - this[CONSUMING] = true; - if (this[BUFFER]) { - this[BUFFERCONCAT](chunk); - const c = this[BUFFER]; - this[BUFFER] = undefined; - this[CONSUMECHUNKSUB](c); - } - else { - this[CONSUMECHUNKSUB](chunk); - } - while (this[BUFFER] && - this[BUFFER]?.length >= 512 && - !this[ABORTED] && - !this[SAW_EOF]) { - const c = this[BUFFER]; - this[BUFFER] = undefined; - this[CONSUMECHUNKSUB](c); - } - this[CONSUMING] = false; - } - if (!this[BUFFER] || this[ENDED]) { - this[MAYBEEND](); - } - } - [CONSUMECHUNKSUB](chunk) { - // we know that we are in CONSUMING mode, so anything written goes into - // the buffer. Advance the position and put any remainder in the buffer. - let position = 0; - const length = chunk.length; - while (position + 512 <= length && - !this[ABORTED] && - !this[SAW_EOF]) { - switch (this[STATE]) { - case 'begin': - case 'header': - this[CONSUMEHEADER](chunk, position); - position += 512; - break; - case 'ignore': - case 'body': - position += this[CONSUMEBODY](chunk, position); - break; - case 'meta': - position += this[CONSUMEMETA](chunk, position); - break; - /* c8 ignore start */ - default: - throw new Error('invalid state: ' + this[STATE]); - /* c8 ignore stop */ - } - } - if (position < length) { - if (this[BUFFER]) { - this[BUFFER] = Buffer.concat([ - chunk.subarray(position), - this[BUFFER], - ]); - } - else { - this[BUFFER] = chunk.subarray(position); - } - } - } - end(chunk, encoding, cb) { - if (typeof chunk === 'function') { - cb = chunk; - encoding = undefined; - chunk = undefined; - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - if (typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - if (cb) - this.once('finish', cb); - if (!this[ABORTED]) { - if (this[UNZIP]) { - /* c8 ignore start */ - if (chunk) - this[UNZIP].write(chunk); - /* c8 ignore stop */ - this[UNZIP].end(); - } - else { - this[ENDED] = true; - if (this.brotli === undefined) - chunk = chunk || Buffer.alloc(0); - if (chunk) - this.write(chunk); - this[MAYBEEND](); - } - } - return this; - } -} -exports.Parser = Parser; -//# sourceMappingURL=parse.js.map - -/***/ }), - -/***/ 13588: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// A path exclusive reservation system -// reserve([list, of, paths], fn) -// When the fn is first in line for all its paths, it -// is called with a cb that clears the reservation. -// -// Used by async unpack to avoid clobbering paths in use, -// while still allowing maximal safe parallelization. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathReservations = void 0; -const node_path_1 = __nccwpck_require__(49411); -const normalize_unicode_js_1 = __nccwpck_require__(19862); -const strip_trailing_slashes_js_1 = __nccwpck_require__(66018); -const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; -const isWindows = platform === 'win32'; -// return a set of parent dirs for a given path -// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d'] -const getDirs = (path) => { - const dirs = path - .split('/') - .slice(0, -1) - .reduce((set, path) => { - const s = set[set.length - 1]; - if (s !== undefined) { - path = (0, node_path_1.join)(s, path); - } - set.push(path || '/'); - return set; - }, []); - return dirs; -}; -class PathReservations { - // path => [function or Set] - // A Set object means a directory reservation - // A fn is a direct reservation on that path - #queues = new Map(); - // fn => {paths:[path,...], dirs:[path, ...]} - #reservations = new Map(); - // functions currently running - #running = new Set(); - reserve(paths, fn) { - paths = - isWindows ? - ['win32 parallelization disabled'] - : paths.map(p => { - // don't need normPath, because we skip this entirely for windows - return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, node_path_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(p))).toLowerCase(); - }); - const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))); - this.#reservations.set(fn, { dirs, paths }); - for (const p of paths) { - const q = this.#queues.get(p); - if (!q) { - this.#queues.set(p, [fn]); - } - else { - q.push(fn); - } - } - for (const dir of dirs) { - const q = this.#queues.get(dir); - if (!q) { - this.#queues.set(dir, [new Set([fn])]); - } - else { - const l = q[q.length - 1]; - if (l instanceof Set) { - l.add(fn); - } - else { - q.push(new Set([fn])); - } - } - } - return this.#run(fn); - } - // return the queues for each path the function cares about - // fn => {paths, dirs} - #getQueues(fn) { - const res = this.#reservations.get(fn); - /* c8 ignore start */ - if (!res) { - throw new Error('function does not have any path reservations'); - } - /* c8 ignore stop */ - return { - paths: res.paths.map((path) => this.#queues.get(path)), - dirs: [...res.dirs].map(path => this.#queues.get(path)), - }; - } - // check if fn is first in line for all its paths, and is - // included in the first set for all its dir queues - check(fn) { - const { paths, dirs } = this.#getQueues(fn); - return (paths.every(q => q && q[0] === fn) && - dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))); - } - // run the function if it's first in line and not already running - #run(fn) { - if (this.#running.has(fn) || !this.check(fn)) { - return false; - } - this.#running.add(fn); - fn(() => this.#clear(fn)); - return true; - } - #clear(fn) { - if (!this.#running.has(fn)) { - return false; - } - const res = this.#reservations.get(fn); - /* c8 ignore start */ - if (!res) { - throw new Error('invalid reservation'); - } - /* c8 ignore stop */ - const { paths, dirs } = res; - const next = new Set(); - for (const path of paths) { - const q = this.#queues.get(path); - /* c8 ignore start */ - if (!q || q?.[0] !== fn) { - continue; - } - /* c8 ignore stop */ - const q0 = q[1]; - if (!q0) { - this.#queues.delete(path); - continue; - } - q.shift(); - if (typeof q0 === 'function') { - next.add(q0); - } - else { - for (const f of q0) { - next.add(f); - } - } - } - for (const dir of dirs) { - const q = this.#queues.get(dir); - const q0 = q?.[0]; - /* c8 ignore next - type safety only */ - if (!q || !(q0 instanceof Set)) - continue; - if (q0.size === 1 && q.length === 1) { - this.#queues.delete(dir); - continue; - } - else if (q0.size === 1) { - q.shift(); - // next one must be a function, - // or else the Set would've been reused - const n = q[0]; - if (typeof n === 'function') { - next.add(n); - } - } - else { - q0.delete(fn); - } - } - this.#running.delete(fn); - next.forEach(fn => this.#run(fn)); - return true; - } -} -exports.PathReservations = PathReservations; -//# sourceMappingURL=path-reservations.js.map - -/***/ }), - -/***/ 58567: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Pax = void 0; -const node_path_1 = __nccwpck_require__(49411); -const header_js_1 = __nccwpck_require__(52374); -class Pax { - atime; - mtime; - ctime; - charset; - comment; - gid; - uid; - gname; - uname; - linkpath; - dev; - ino; - nlink; - path; - size; - mode; - global; - constructor(obj, global = false) { - this.atime = obj.atime; - this.charset = obj.charset; - this.comment = obj.comment; - this.ctime = obj.ctime; - this.dev = obj.dev; - this.gid = obj.gid; - this.global = global; - this.gname = obj.gname; - this.ino = obj.ino; - this.linkpath = obj.linkpath; - this.mtime = obj.mtime; - this.nlink = obj.nlink; - this.path = obj.path; - this.size = obj.size; - this.uid = obj.uid; - this.uname = obj.uname; - } - encode() { - const body = this.encodeBody(); - if (body === '') { - return Buffer.allocUnsafe(0); - } - const bodyLen = Buffer.byteLength(body); - // round up to 512 bytes - // add 512 for header - const bufLen = 512 * Math.ceil(1 + bodyLen / 512); - const buf = Buffer.allocUnsafe(bufLen); - // 0-fill the header section, it might not hit every field - for (let i = 0; i < 512; i++) { - buf[i] = 0; - } - new header_js_1.Header({ - // XXX split the path - // then the path should be PaxHeader + basename, but less than 99, - // prepend with the dirname - /* c8 ignore start */ - path: ('PaxHeader/' + (0, node_path_1.basename)(this.path ?? '')).slice(0, 99), - /* c8 ignore stop */ - mode: this.mode || 0o644, - uid: this.uid, - gid: this.gid, - size: bodyLen, - mtime: this.mtime, - type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader', - linkpath: '', - uname: this.uname || '', - gname: this.gname || '', - devmaj: 0, - devmin: 0, - atime: this.atime, - ctime: this.ctime, - }).encode(buf); - buf.write(body, 512, bodyLen, 'utf8'); - // null pad after the body - for (let i = bodyLen + 512; i < buf.length; i++) { - buf[i] = 0; - } - return buf; - } - encodeBody() { - return (this.encodeField('path') + - this.encodeField('ctime') + - this.encodeField('atime') + - this.encodeField('dev') + - this.encodeField('ino') + - this.encodeField('nlink') + - this.encodeField('charset') + - this.encodeField('comment') + - this.encodeField('gid') + - this.encodeField('gname') + - this.encodeField('linkpath') + - this.encodeField('mtime') + - this.encodeField('size') + - this.encodeField('uid') + - this.encodeField('uname')); - } - encodeField(field) { - if (this[field] === undefined) { - return ''; - } - const r = this[field]; - const v = r instanceof Date ? r.getTime() / 1000 : r; - const s = ' ' + - (field === 'dev' || field === 'ino' || field === 'nlink' ? - 'SCHILY.' - : '') + - field + - '=' + - v + - '\n'; - const byteLen = Buffer.byteLength(s); - // the digits includes the length of the digits in ascii base-10 - // so if it's 9 characters, then adding 1 for the 9 makes it 10 - // which makes it 11 chars. - let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; - if (byteLen + digits >= Math.pow(10, digits)) { - digits += 1; - } - const len = digits + byteLen; - return len + s; - } - static parse(str, ex, g = false) { - return new Pax(merge(parseKV(str), ex), g); - } -} -exports.Pax = Pax; -const merge = (a, b) => b ? Object.assign({}, b, a) : a; -const parseKV = (str) => str - .replace(/\n$/, '') - .split('\n') - .reduce(parseKVLine, Object.create(null)); -const parseKVLine = (set, line) => { - const n = parseInt(line, 10); - // XXX Values with \n in them will fail this. - // Refactor to not be a naive line-by-line parse. - if (n !== Buffer.byteLength(line) + 1) { - return set; - } - line = line.slice((n + ' ').length); - const kv = line.split('='); - const r = kv.shift(); - if (!r) { - return set; - } - const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1'); - const v = kv.join('='); - set[k] = - /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? - new Date(Number(v) * 1000) - : /^[0-9]+$/.test(v) ? +v - : v; - return set; -}; -//# sourceMappingURL=pax.js.map - -/***/ }), - -/***/ 57369: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ReadEntry = void 0; -const minipass_1 = __nccwpck_require__(14968); -const normalize_windows_path_js_1 = __nccwpck_require__(20762); -class ReadEntry extends minipass_1.Minipass { - extended; - globalExtended; - header; - startBlockSize; - blockRemain; - remain; - type; - meta = false; - ignore = false; - path; - mode; - uid; - gid; - uname; - gname; - size = 0; - mtime; - atime; - ctime; - linkpath; - dev; - ino; - nlink; - invalid = false; - absolute; - unsupported = false; - constructor(header, ex, gex) { - super({}); - // read entries always start life paused. this is to avoid the - // situation where Minipass's auto-ending empty streams results - // in an entry ending before we're ready for it. - this.pause(); - this.extended = ex; - this.globalExtended = gex; - this.header = header; - /* c8 ignore start */ - this.remain = header.size ?? 0; - /* c8 ignore stop */ - this.startBlockSize = 512 * Math.ceil(this.remain / 512); - this.blockRemain = this.startBlockSize; - this.type = header.type; - switch (this.type) { - case 'File': - case 'OldFile': - case 'Link': - case 'SymbolicLink': - case 'CharacterDevice': - case 'BlockDevice': - case 'Directory': - case 'FIFO': - case 'ContiguousFile': - case 'GNUDumpDir': - break; - case 'NextFileHasLongLinkpath': - case 'NextFileHasLongPath': - case 'OldGnuLongPath': - case 'GlobalExtendedHeader': - case 'ExtendedHeader': - case 'OldExtendedHeader': - this.meta = true; - break; - // NOTE: gnutar and bsdtar treat unrecognized types as 'File' - // it may be worth doing the same, but with a warning. - default: - this.ignore = true; - } - /* c8 ignore start */ - if (!header.path) { - throw new Error('no path provided for tar.ReadEntry'); - } - /* c8 ignore stop */ - this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(header.path); - this.mode = header.mode; - if (this.mode) { - this.mode = this.mode & 0o7777; - } - this.uid = header.uid; - this.gid = header.gid; - this.uname = header.uname; - this.gname = header.gname; - this.size = this.remain; - this.mtime = header.mtime; - this.atime = header.atime; - this.ctime = header.ctime; - /* c8 ignore start */ - this.linkpath = - header.linkpath ? - (0, normalize_windows_path_js_1.normalizeWindowsPath)(header.linkpath) - : undefined; - /* c8 ignore stop */ - this.uname = header.uname; - this.gname = header.gname; - if (ex) { - this.#slurp(ex); - } - if (gex) { - this.#slurp(gex, true); - } - } - write(data) { - const writeLen = data.length; - if (writeLen > this.blockRemain) { - throw new Error('writing more to entry than is appropriate'); - } - const r = this.remain; - const br = this.blockRemain; - this.remain = Math.max(0, r - writeLen); - this.blockRemain = Math.max(0, br - writeLen); - if (this.ignore) { - return true; - } - if (r >= writeLen) { - return super.write(data); - } - // r < writeLen - return super.write(data.subarray(0, r)); - } - #slurp(ex, gex = false) { - if (ex.path) - ex.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(ex.path); - if (ex.linkpath) - ex.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(ex.linkpath); - Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { - // we slurp in everything except for the path attribute in - // a global extended header, because that's weird. Also, any - // null/undefined values are ignored. - return !(v === null || - v === undefined || - (k === 'path' && gex)); - }))); - } -} -exports.ReadEntry = ReadEntry; -//# sourceMappingURL=read-entry.js.map - -/***/ }), - -/***/ 45478: -/***/ (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.replace = void 0; -// tar -r -const fs_minipass_1 = __nccwpck_require__(40675); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const header_js_1 = __nccwpck_require__(52374); -const list_js_1 = __nccwpck_require__(84306); -const make_command_js_1 = __nccwpck_require__(33830); -const options_js_1 = __nccwpck_require__(14839); -const pack_js_1 = __nccwpck_require__(7788); -// starting at the head of the file, read a Header -// If the checksum is invalid, that's our position to start writing -// If it is, jump forward by the specified size (round up to 512) -// and try again. -// Write the new Pack stream starting there. -const replaceSync = (opt, files) => { - const p = new pack_js_1.PackSync(opt); - let threw = true; - let fd; - let position; - try { - try { - fd = node_fs_1.default.openSync(opt.file, 'r+'); - } - catch (er) { - if (er?.code === 'ENOENT') { - fd = node_fs_1.default.openSync(opt.file, 'w+'); - } - else { - throw er; - } - } - const st = node_fs_1.default.fstatSync(fd); - const headBuf = Buffer.alloc(512); - POSITION: for (position = 0; position < st.size; position += 512) { - for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) { - bytes = node_fs_1.default.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos); - if (position === 0 && - headBuf[0] === 0x1f && - headBuf[1] === 0x8b) { - throw new Error('cannot append to compressed archives'); - } - if (!bytes) { - break POSITION; - } - } - const h = new header_js_1.Header(headBuf); - if (!h.cksumValid) { - break; - } - const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512); - if (position + entryBlockSize + 512 > st.size) { - break; - } - // the 512 for the header we just parsed will be added as well - // also jump ahead all the blocks for the body - position += entryBlockSize; - if (opt.mtimeCache && h.mtime) { - opt.mtimeCache.set(String(h.path), h.mtime); - } - } - threw = false; - streamSync(opt, p, position, fd, files); - } - finally { - if (threw) { - try { - node_fs_1.default.closeSync(fd); - } - catch (er) { } - } - } -}; -const streamSync = (opt, p, position, fd, files) => { - const stream = new fs_minipass_1.WriteStreamSync(opt.file, { - fd: fd, - start: position, - }); - p.pipe(stream); - addFilesSync(p, files); -}; -const replaceAsync = (opt, files) => { - files = Array.from(files); - const p = new pack_js_1.Pack(opt); - const getPos = (fd, size, cb_) => { - const cb = (er, pos) => { - if (er) { - node_fs_1.default.close(fd, _ => cb_(er)); - } - else { - cb_(null, pos); - } - }; - let position = 0; - if (size === 0) { - return cb(null, 0); - } - let bufPos = 0; - const headBuf = Buffer.alloc(512); - const onread = (er, bytes) => { - if (er || typeof bytes === 'undefined') { - return cb(er); - } - bufPos += bytes; - if (bufPos < 512 && bytes) { - return node_fs_1.default.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread); - } - if (position === 0 && - headBuf[0] === 0x1f && - headBuf[1] === 0x8b) { - return cb(new Error('cannot append to compressed archives')); - } - // truncated header - if (bufPos < 512) { - return cb(null, position); - } - const h = new header_js_1.Header(headBuf); - if (!h.cksumValid) { - return cb(null, position); - } - /* c8 ignore next */ - const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512); - if (position + entryBlockSize + 512 > size) { - return cb(null, position); - } - position += entryBlockSize + 512; - if (position >= size) { - return cb(null, position); - } - if (opt.mtimeCache && h.mtime) { - opt.mtimeCache.set(String(h.path), h.mtime); - } - bufPos = 0; - node_fs_1.default.read(fd, headBuf, 0, 512, position, onread); - }; - node_fs_1.default.read(fd, headBuf, 0, 512, position, onread); - }; - const promise = new Promise((resolve, reject) => { - p.on('error', reject); - let flag = 'r+'; - const onopen = (er, fd) => { - if (er && er.code === 'ENOENT' && flag === 'r+') { - flag = 'w+'; - return node_fs_1.default.open(opt.file, flag, onopen); - } - if (er || !fd) { - return reject(er); - } - node_fs_1.default.fstat(fd, (er, st) => { - if (er) { - return node_fs_1.default.close(fd, () => reject(er)); - } - getPos(fd, st.size, (er, position) => { - if (er) { - return reject(er); - } - const stream = new fs_minipass_1.WriteStream(opt.file, { - fd: fd, - start: position, - }); - p.pipe(stream); - stream.on('error', reject); - stream.on('close', resolve); - addFilesAsync(p, files); - }); - }); - }; - node_fs_1.default.open(opt.file, flag, onopen); - }); - return promise; -}; -const addFilesSync = (p, files) => { - files.forEach(file => { - if (file.charAt(0) === '@') { - (0, list_js_1.list)({ - file: node_path_1.default.resolve(p.cwd, file.slice(1)), - sync: true, - noResume: true, - onReadEntry: entry => p.add(entry), - }); - } - else { - p.add(file); - } - }); - p.end(); -}; -const addFilesAsync = async (p, files) => { - for (let i = 0; i < files.length; i++) { - const file = String(files[i]); - if (file.charAt(0) === '@') { - await (0, list_js_1.list)({ - file: node_path_1.default.resolve(String(p.cwd), file.slice(1)), - noResume: true, - onReadEntry: entry => p.add(entry), - }); - } - else { - p.add(file); - } - } - p.end(); -}; -exports.replace = (0, make_command_js_1.makeCommand)(replaceSync, replaceAsync, -/* c8 ignore start */ -() => { - throw new TypeError('file is required'); -}, () => { - throw new TypeError('file is required'); -}, -/* c8 ignore stop */ -(opt, entries) => { - if (!(0, options_js_1.isFile)(opt)) { - throw new TypeError('file is required'); - } - if (opt.gzip || - opt.brotli || - opt.file.endsWith('.br') || - opt.file.endsWith('.tbr')) { - throw new TypeError('cannot append to compressed archives'); - } - if (!entries?.length) { - throw new TypeError('no paths specified to add/replace'); - } -}); -//# sourceMappingURL=replace.js.map - -/***/ }), - -/***/ 71126: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stripAbsolutePath = void 0; -// unix absolute paths are also absolute on win32, so we use this for both -const node_path_1 = __nccwpck_require__(49411); -const { isAbsolute, parse } = node_path_1.win32; -// returns [root, stripped] -// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in -// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip / -// explicitly if it's the first character. -// drive-specific relative paths on Windows get their root stripped off even -// though they are not absolute, so `c:../foo` becomes ['c:', '../foo'] -const stripAbsolutePath = (path) => { - let r = ''; - let parsed = parse(path); - while (isAbsolute(path) || parsed.root) { - // windows will think that //x/y/z has a "root" of //x/y/ - // but strip the //?/C:/ off of //?/C:/path - const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? - '/' - : parsed.root; - path = path.slice(root.length); - r += root; - parsed = parse(path); - } - return [r, path]; -}; -exports.stripAbsolutePath = stripAbsolutePath; -//# sourceMappingURL=strip-absolute-path.js.map - -/***/ }), - -/***/ 66018: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stripTrailingSlashes = void 0; -// warning: extremely hot code path. -// This has been meticulously optimized for use -// within npm install on large package trees. -// Do not edit without careful benchmarking. -const stripTrailingSlashes = (str) => { - let i = str.length - 1; - let slashesStart = -1; - while (i > -1 && str.charAt(i) === '/') { - slashesStart = i; - i--; - } - return slashesStart === -1 ? str : str.slice(0, slashesStart); -}; -exports.stripTrailingSlashes = stripTrailingSlashes; -//# sourceMappingURL=strip-trailing-slashes.js.map - -/***/ }), - -/***/ 23012: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SymlinkError = void 0; -class SymlinkError extends Error { - path; - symlink; - syscall = 'symlink'; - code = 'TAR_SYMLINK_ERROR'; - constructor(symlink, path) { - super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link'); - this.symlink = symlink; - this.path = path; - } - get name() { - return 'SymlinkError'; - } -} -exports.SymlinkError = SymlinkError; -//# sourceMappingURL=symlink-error.js.map - -/***/ }), - -/***/ 57390: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.code = exports.name = exports.isName = exports.isCode = void 0; -const isCode = (c) => exports.name.has(c); -exports.isCode = isCode; -const isName = (c) => exports.code.has(c); -exports.isName = isName; -// map types from key to human-friendly name -exports.name = new Map([ - ['0', 'File'], - // same as File - ['', 'OldFile'], - ['1', 'Link'], - ['2', 'SymbolicLink'], - // Devices and FIFOs aren't fully supported - // they are parsed, but skipped when unpacking - ['3', 'CharacterDevice'], - ['4', 'BlockDevice'], - ['5', 'Directory'], - ['6', 'FIFO'], - // same as File - ['7', 'ContiguousFile'], - // pax headers - ['g', 'GlobalExtendedHeader'], - ['x', 'ExtendedHeader'], - // vendor-specific stuff - // skip - ['A', 'SolarisACL'], - // like 5, but with data, which should be skipped - ['D', 'GNUDumpDir'], - // metadata only, skip - ['I', 'Inode'], - // data = link path of next file - ['K', 'NextFileHasLongLinkpath'], - // data = path of next file - ['L', 'NextFileHasLongPath'], - // skip - ['M', 'ContinuationFile'], - // like L - ['N', 'OldGnuLongPath'], - // skip - ['S', 'SparseFile'], - // skip - ['V', 'TapeVolumeHeader'], - // like x - ['X', 'OldExtendedHeader'], -]); -// map the other direction -exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]])); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 86973: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet. -// but the path reservations are required to avoid race conditions where -// parallelized unpack ops may mess with one another, due to dependencies -// (like a Link depending on its target) or destructive operations (like -// clobbering an fs object to create one of a different type.) -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.UnpackSync = exports.Unpack = void 0; -const fsm = __importStar(__nccwpck_require__(40675)); -const node_assert_1 = __importDefault(__nccwpck_require__(98061)); -const node_crypto_1 = __nccwpck_require__(6005); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const get_write_flag_js_1 = __nccwpck_require__(81663); -const mkdir_js_1 = __nccwpck_require__(18704); -const normalize_unicode_js_1 = __nccwpck_require__(19862); -const normalize_windows_path_js_1 = __nccwpck_require__(20762); -const parse_js_1 = __nccwpck_require__(72522); -const strip_absolute_path_js_1 = __nccwpck_require__(71126); -const strip_trailing_slashes_js_1 = __nccwpck_require__(66018); -const wc = __importStar(__nccwpck_require__(64978)); -const path_reservations_js_1 = __nccwpck_require__(13588); -const ONENTRY = Symbol('onEntry'); -const CHECKFS = Symbol('checkFs'); -const CHECKFS2 = Symbol('checkFs2'); -const PRUNECACHE = Symbol('pruneCache'); -const ISREUSABLE = Symbol('isReusable'); -const MAKEFS = Symbol('makeFs'); -const FILE = Symbol('file'); -const DIRECTORY = Symbol('directory'); -const LINK = Symbol('link'); -const SYMLINK = Symbol('symlink'); -const HARDLINK = Symbol('hardlink'); -const UNSUPPORTED = Symbol('unsupported'); -const CHECKPATH = Symbol('checkPath'); -const MKDIR = Symbol('mkdir'); -const ONERROR = Symbol('onError'); -const PENDING = Symbol('pending'); -const PEND = Symbol('pend'); -const UNPEND = Symbol('unpend'); -const ENDED = Symbol('ended'); -const MAYBECLOSE = Symbol('maybeClose'); -const SKIP = Symbol('skip'); -const DOCHOWN = Symbol('doChown'); -const UID = Symbol('uid'); -const GID = Symbol('gid'); -const CHECKED_CWD = Symbol('checkedCwd'); -const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; -const isWindows = platform === 'win32'; -const DEFAULT_MAX_DEPTH = 1024; -// Unlinks on Windows are not atomic. -// -// This means that if you have a file entry, followed by another -// file entry with an identical name, and you cannot re-use the file -// (because it's a hardlink, or because unlink:true is set, or it's -// Windows, which does not have useful nlink values), then the unlink -// will be committed to the disk AFTER the new file has been written -// over the old one, deleting the new file. -// -// To work around this, on Windows systems, we rename the file and then -// delete the renamed file. It's a sloppy kludge, but frankly, I do not -// know of a better way to do this, given windows' non-atomic unlink -// semantics. -// -// See: https://github.com/npm/node-tar/issues/183 -/* c8 ignore start */ -const unlinkFile = (path, cb) => { - if (!isWindows) { - return node_fs_1.default.unlink(path, cb); - } - const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex'); - node_fs_1.default.rename(path, name, er => { - if (er) { - return cb(er); - } - node_fs_1.default.unlink(name, cb); - }); -}; -/* c8 ignore stop */ -/* c8 ignore start */ -const unlinkFileSync = (path) => { - if (!isWindows) { - return node_fs_1.default.unlinkSync(path); - } - const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex'); - node_fs_1.default.renameSync(path, name); - node_fs_1.default.unlinkSync(name); -}; -/* c8 ignore stop */ -// this.gid, entry.gid, this.processUid -const uint32 = (a, b, c) => a !== undefined && a === a >>> 0 ? a - : b !== undefined && b === b >>> 0 ? b - : c; -// clear the cache if it's a case-insensitive unicode-squashing match. -// we can't know if the current file system is case-sensitive or supports -// unicode fully, so we check for similarity on the maximally compatible -// representation. Err on the side of pruning, since all it's doing is -// preventing lstats, and it's not the end of the world if we get a false -// positive. -// Note that on windows, we always drop the entire cache whenever a -// symbolic link is encountered, because 8.3 filenames are impossible -// to reason about, and collisions are hazards rather than just failures. -const cacheKeyNormalize = (path) => (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, normalize_windows_path_js_1.normalizeWindowsPath)((0, normalize_unicode_js_1.normalizeUnicode)(path))).toLowerCase(); -// remove all cache entries matching ${abs}/** -const pruneCache = (cache, abs) => { - abs = cacheKeyNormalize(abs); - for (const path of cache.keys()) { - const pnorm = cacheKeyNormalize(path); - if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) { - cache.delete(path); - } - } -}; -const dropCache = (cache) => { - for (const key of cache.keys()) { - cache.delete(key); - } -}; -class Unpack extends parse_js_1.Parser { - [ENDED] = false; - [CHECKED_CWD] = false; - [PENDING] = 0; - reservations = new path_reservations_js_1.PathReservations(); - transform; - writable = true; - readable = false; - dirCache; - uid; - gid; - setOwner; - preserveOwner; - processGid; - processUid; - maxDepth; - forceChown; - win32; - newer; - keep; - noMtime; - preservePaths; - unlink; - cwd; - strip; - processUmask; - umask; - dmode; - fmode; - chmod; - constructor(opt = {}) { - opt.ondone = () => { - this[ENDED] = true; - this[MAYBECLOSE](); - }; - super(opt); - this.transform = opt.transform; - this.dirCache = opt.dirCache || new Map(); - this.chmod = !!opt.chmod; - if (typeof opt.uid === 'number' || typeof opt.gid === 'number') { - // need both or neither - if (typeof opt.uid !== 'number' || - typeof opt.gid !== 'number') { - throw new TypeError('cannot set owner without number uid and gid'); - } - if (opt.preserveOwner) { - throw new TypeError('cannot preserve owner in archive and also set owner explicitly'); - } - this.uid = opt.uid; - this.gid = opt.gid; - this.setOwner = true; - } - else { - this.uid = undefined; - this.gid = undefined; - this.setOwner = false; - } - // default true for root - if (opt.preserveOwner === undefined && - typeof opt.uid !== 'number') { - this.preserveOwner = !!(process.getuid && process.getuid() === 0); - } - else { - this.preserveOwner = !!opt.preserveOwner; - } - this.processUid = - (this.preserveOwner || this.setOwner) && process.getuid ? - process.getuid() - : undefined; - this.processGid = - (this.preserveOwner || this.setOwner) && process.getgid ? - process.getgid() - : undefined; - // prevent excessively deep nesting of subfolders - // set to `Infinity` to remove this restriction - this.maxDepth = - typeof opt.maxDepth === 'number' ? - opt.maxDepth - : DEFAULT_MAX_DEPTH; - // mostly just for testing, but useful in some cases. - // Forcibly trigger a chown on every entry, no matter what - this.forceChown = opt.forceChown === true; - // turn > this[ONENTRY](entry)); - } - // a bad or damaged archive is a warning for Parser, but an error - // when extracting. Mark those errors as unrecoverable, because - // the Unpack contract cannot be met. - warn(code, msg, data = {}) { - if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') { - data.recoverable = false; - } - return super.warn(code, msg, data); - } - [MAYBECLOSE]() { - if (this[ENDED] && this[PENDING] === 0) { - this.emit('prefinish'); - this.emit('finish'); - this.emit('end'); - } - } - [CHECKPATH](entry) { - const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path); - const parts = p.split('/'); - if (this.strip) { - if (parts.length < this.strip) { - return false; - } - if (entry.type === 'Link') { - const linkparts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/'); - if (linkparts.length >= this.strip) { - entry.linkpath = linkparts.slice(this.strip).join('/'); - } - else { - return false; - } - } - parts.splice(0, this.strip); - entry.path = parts.join('/'); - } - if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { - this.warn('TAR_ENTRY_ERROR', 'path excessively deep', { - entry, - path: p, - depth: parts.length, - maxDepth: this.maxDepth, - }); - return false; - } - if (!this.preservePaths) { - if (parts.includes('..') || - /* c8 ignore next */ - (isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) { - this.warn('TAR_ENTRY_ERROR', `path contains '..'`, { - entry, - path: p, - }); - return false; - } - // strip off the root - const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(p); - if (root) { - entry.path = String(stripped); - this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, { - entry, - path: p, - }); - } - } - if (node_path_1.default.isAbsolute(entry.path)) { - entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(entry.path)); - } - else { - entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, entry.path)); - } - // if we somehow ended up with a path that escapes the cwd, and we are - // not in preservePaths mode, then something is fishy! This should have - // been prevented above, so ignore this for coverage. - /* c8 ignore start - defense in depth */ - if (!this.preservePaths && - typeof entry.absolute === 'string' && - entry.absolute.indexOf(this.cwd + '/') !== 0 && - entry.absolute !== this.cwd) { - this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', { - entry, - path: (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path), - resolvedPath: entry.absolute, - cwd: this.cwd, - }); - return false; - } - /* c8 ignore stop */ - // an archive can set properties on the extraction directory, but it - // may not replace the cwd with a different kind of thing entirely. - if (entry.absolute === this.cwd && - entry.type !== 'Directory' && - entry.type !== 'GNUDumpDir') { - return false; - } - // only encode : chars that aren't drive letter indicators - if (this.win32) { - const { root: aRoot } = node_path_1.default.win32.parse(String(entry.absolute)); - entry.absolute = - aRoot + wc.encode(String(entry.absolute).slice(aRoot.length)); - const { root: pRoot } = node_path_1.default.win32.parse(entry.path); - entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length)); - } - return true; - } - [ONENTRY](entry) { - if (!this[CHECKPATH](entry)) { - return entry.resume(); - } - node_assert_1.default.equal(typeof entry.absolute, 'string'); - switch (entry.type) { - case 'Directory': - case 'GNUDumpDir': - if (entry.mode) { - entry.mode = entry.mode | 0o700; - } - // eslint-disable-next-line no-fallthrough - case 'File': - case 'OldFile': - case 'ContiguousFile': - case 'Link': - case 'SymbolicLink': - return this[CHECKFS](entry); - case 'CharacterDevice': - case 'BlockDevice': - case 'FIFO': - default: - return this[UNSUPPORTED](entry); - } - } - [ONERROR](er, entry) { - // Cwd has to exist, or else nothing works. That's serious. - // Other errors are warnings, which raise the error in strict - // mode, but otherwise continue on. - if (er.name === 'CwdError') { - this.emit('error', er); - } - else { - this.warn('TAR_ENTRY_ERROR', er, { entry }); - this[UNPEND](); - entry.resume(); - } - } - [MKDIR](dir, mode, cb) { - (0, mkdir_js_1.mkdir)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), { - uid: this.uid, - gid: this.gid, - processUid: this.processUid, - processGid: this.processGid, - umask: this.processUmask, - preserve: this.preservePaths, - unlink: this.unlink, - cache: this.dirCache, - cwd: this.cwd, - mode: mode, - }, cb); - } - [DOCHOWN](entry) { - // in preserve owner mode, chown if the entry doesn't match process - // in set owner mode, chown if setting doesn't match process - return (this.forceChown || - (this.preserveOwner && - ((typeof entry.uid === 'number' && - entry.uid !== this.processUid) || - (typeof entry.gid === 'number' && - entry.gid !== this.processGid))) || - (typeof this.uid === 'number' && - this.uid !== this.processUid) || - (typeof this.gid === 'number' && this.gid !== this.processGid)); - } - [UID](entry) { - return uint32(this.uid, entry.uid, this.processUid); - } - [GID](entry) { - return uint32(this.gid, entry.gid, this.processGid); - } - [FILE](entry, fullyDone) { - const mode = typeof entry.mode === 'number' ? - entry.mode & 0o7777 - : this.fmode; - const stream = new fsm.WriteStream(String(entry.absolute), { - // slight lie, but it can be numeric flags - flags: (0, get_write_flag_js_1.getWriteFlag)(entry.size), - mode: mode, - autoClose: false, - }); - stream.on('error', (er) => { - if (stream.fd) { - node_fs_1.default.close(stream.fd, () => { }); - } - // flush all the data out so that we aren't left hanging - // if the error wasn't actually fatal. otherwise the parse - // is blocked, and we never proceed. - stream.write = () => true; - this[ONERROR](er, entry); - fullyDone(); - }); - let actions = 1; - const done = (er) => { - if (er) { - /* c8 ignore start - we should always have a fd by now */ - if (stream.fd) { - node_fs_1.default.close(stream.fd, () => { }); - } - /* c8 ignore stop */ - this[ONERROR](er, entry); - fullyDone(); - return; - } - if (--actions === 0) { - if (stream.fd !== undefined) { - node_fs_1.default.close(stream.fd, er => { - if (er) { - this[ONERROR](er, entry); - } - else { - this[UNPEND](); - } - fullyDone(); - }); - } - } - }; - stream.on('finish', () => { - // if futimes fails, try utimes - // if utimes fails, fail with the original error - // same for fchown/chown - const abs = String(entry.absolute); - const fd = stream.fd; - if (typeof fd === 'number' && entry.mtime && !this.noMtime) { - actions++; - const atime = entry.atime || new Date(); - const mtime = entry.mtime; - node_fs_1.default.futimes(fd, atime, mtime, er => er ? - node_fs_1.default.utimes(abs, atime, mtime, er2 => done(er2 && er)) - : done()); - } - if (typeof fd === 'number' && this[DOCHOWN](entry)) { - actions++; - const uid = this[UID](entry); - const gid = this[GID](entry); - if (typeof uid === 'number' && typeof gid === 'number') { - node_fs_1.default.fchown(fd, uid, gid, er => er ? - node_fs_1.default.chown(abs, uid, gid, er2 => done(er2 && er)) - : done()); - } - } - done(); - }); - const tx = this.transform ? this.transform(entry) || entry : entry; - if (tx !== entry) { - tx.on('error', (er) => { - this[ONERROR](er, entry); - fullyDone(); - }); - entry.pipe(tx); - } - tx.pipe(stream); - } - [DIRECTORY](entry, fullyDone) { - const mode = typeof entry.mode === 'number' ? - entry.mode & 0o7777 - : this.dmode; - this[MKDIR](String(entry.absolute), mode, er => { - if (er) { - this[ONERROR](er, entry); - fullyDone(); - return; - } - let actions = 1; - const done = () => { - if (--actions === 0) { - fullyDone(); - this[UNPEND](); - entry.resume(); - } - }; - if (entry.mtime && !this.noMtime) { - actions++; - node_fs_1.default.utimes(String(entry.absolute), entry.atime || new Date(), entry.mtime, done); - } - if (this[DOCHOWN](entry)) { - actions++; - node_fs_1.default.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); - } - done(); - }); - } - [UNSUPPORTED](entry) { - entry.unsupported = true; - this.warn('TAR_ENTRY_UNSUPPORTED', `unsupported entry type: ${entry.type}`, { entry }); - entry.resume(); - } - [SYMLINK](entry, done) { - this[LINK](entry, String(entry.linkpath), 'symlink', done); - } - [HARDLINK](entry, done) { - const linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, String(entry.linkpath))); - this[LINK](entry, linkpath, 'link', done); - } - [PEND]() { - this[PENDING]++; - } - [UNPEND]() { - this[PENDING]--; - this[MAYBECLOSE](); - } - [SKIP](entry) { - this[UNPEND](); - entry.resume(); - } - // Check if we can reuse an existing filesystem entry safely and - // overwrite it, rather than unlinking and recreating - // Windows doesn't report a useful nlink, so we just never reuse entries - [ISREUSABLE](entry, st) { - return (entry.type === 'File' && - !this.unlink && - st.isFile() && - st.nlink <= 1 && - !isWindows); - } - // check if a thing is there, and if so, try to clobber it - [CHECKFS](entry) { - this[PEND](); - const paths = [entry.path]; - if (entry.linkpath) { - paths.push(entry.linkpath); - } - this.reservations.reserve(paths, done => this[CHECKFS2](entry, done)); - } - [PRUNECACHE](entry) { - // if we are not creating a directory, and the path is in the dirCache, - // then that means we are about to delete the directory we created - // previously, and it is no longer going to be a directory, and neither - // is any of its children. - // If a symbolic link is encountered, all bets are off. There is no - // reasonable way to sanitize the cache in such a way we will be able to - // avoid having filesystem collisions. If this happens with a non-symlink - // entry, it'll just fail to unpack, but a symlink to a directory, using an - // 8.3 shortname or certain unicode attacks, can evade detection and lead - // to arbitrary writes to anywhere on the system. - if (entry.type === 'SymbolicLink') { - dropCache(this.dirCache); - } - else if (entry.type !== 'Directory') { - pruneCache(this.dirCache, String(entry.absolute)); - } - } - [CHECKFS2](entry, fullyDone) { - this[PRUNECACHE](entry); - const done = (er) => { - this[PRUNECACHE](entry); - fullyDone(er); - }; - const checkCwd = () => { - this[MKDIR](this.cwd, this.dmode, er => { - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - this[CHECKED_CWD] = true; - start(); - }); - }; - const start = () => { - if (entry.absolute !== this.cwd) { - const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute))); - if (parent !== this.cwd) { - return this[MKDIR](parent, this.dmode, er => { - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - afterMakeParent(); - }); - } - } - afterMakeParent(); - }; - const afterMakeParent = () => { - node_fs_1.default.lstat(String(entry.absolute), (lstatEr, st) => { - if (st && - (this.keep || - /* c8 ignore next */ - (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { - this[SKIP](entry); - done(); - return; - } - if (lstatEr || this[ISREUSABLE](entry, st)) { - return this[MAKEFS](null, entry, done); - } - if (st.isDirectory()) { - if (entry.type === 'Directory') { - const needChmod = this.chmod && - entry.mode && - (st.mode & 0o7777) !== entry.mode; - const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); - if (!needChmod) { - return afterChmod(); - } - return node_fs_1.default.chmod(String(entry.absolute), Number(entry.mode), afterChmod); - } - // Not a dir entry, have to remove it. - // NB: the only way to end up with an entry that is the cwd - // itself, in such a way that == does not detect, is a - // tricky windows absolute path with UNC or 8.3 parts (and - // preservePaths:true, or else it will have been stripped). - // In that case, the user has opted out of path protections - // explicitly, so if they blow away the cwd, c'est la vie. - if (entry.absolute !== this.cwd) { - return node_fs_1.default.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); - } - } - // not a dir, and not reusable - // don't remove if the cwd, we want that error - if (entry.absolute === this.cwd) { - return this[MAKEFS](null, entry, done); - } - unlinkFile(String(entry.absolute), er => this[MAKEFS](er ?? null, entry, done)); - }); - }; - if (this[CHECKED_CWD]) { - start(); - } - else { - checkCwd(); - } - } - [MAKEFS](er, entry, done) { - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - switch (entry.type) { - case 'File': - case 'OldFile': - case 'ContiguousFile': - return this[FILE](entry, done); - case 'Link': - return this[HARDLINK](entry, done); - case 'SymbolicLink': - return this[SYMLINK](entry, done); - case 'Directory': - case 'GNUDumpDir': - return this[DIRECTORY](entry, done); - } - } - [LINK](entry, linkpath, link, done) { - // XXX: get the type ('symlink' or 'junction') for windows - node_fs_1.default[link](linkpath, String(entry.absolute), er => { - if (er) { - this[ONERROR](er, entry); - } - else { - this[UNPEND](); - entry.resume(); - } - done(); - }); - } -} -exports.Unpack = Unpack; -const callSync = (fn) => { - try { - return [null, fn()]; - } - catch (er) { - return [er, null]; - } -}; -class UnpackSync extends Unpack { - sync = true; - [MAKEFS](er, entry) { - return super[MAKEFS](er, entry, () => { }); - } - [CHECKFS](entry) { - this[PRUNECACHE](entry); - if (!this[CHECKED_CWD]) { - const er = this[MKDIR](this.cwd, this.dmode); - if (er) { - return this[ONERROR](er, entry); - } - this[CHECKED_CWD] = true; - } - // don't bother to make the parent if the current entry is the cwd, - // we've already checked it. - if (entry.absolute !== this.cwd) { - const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute))); - if (parent !== this.cwd) { - const mkParent = this[MKDIR](parent, this.dmode); - if (mkParent) { - return this[ONERROR](mkParent, entry); - } - } - } - const [lstatEr, st] = callSync(() => node_fs_1.default.lstatSync(String(entry.absolute))); - if (st && - (this.keep || - /* c8 ignore next */ - (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { - return this[SKIP](entry); - } - if (lstatEr || this[ISREUSABLE](entry, st)) { - return this[MAKEFS](null, entry); - } - if (st.isDirectory()) { - if (entry.type === 'Directory') { - const needChmod = this.chmod && - entry.mode && - (st.mode & 0o7777) !== entry.mode; - const [er] = needChmod ? - callSync(() => { - node_fs_1.default.chmodSync(String(entry.absolute), Number(entry.mode)); - }) - : []; - return this[MAKEFS](er, entry); - } - // not a dir entry, have to remove it - const [er] = callSync(() => node_fs_1.default.rmdirSync(String(entry.absolute))); - this[MAKEFS](er, entry); - } - // not a dir, and not reusable. - // don't remove if it's the cwd, since we want that error. - const [er] = entry.absolute === this.cwd ? - [] - : callSync(() => unlinkFileSync(String(entry.absolute))); - this[MAKEFS](er, entry); - } - [FILE](entry, done) { - const mode = typeof entry.mode === 'number' ? - entry.mode & 0o7777 - : this.fmode; - const oner = (er) => { - let closeError; - try { - node_fs_1.default.closeSync(fd); - } - catch (e) { - closeError = e; - } - if (er || closeError) { - this[ONERROR](er || closeError, entry); - } - done(); - }; - let fd; - try { - fd = node_fs_1.default.openSync(String(entry.absolute), (0, get_write_flag_js_1.getWriteFlag)(entry.size), mode); - } - catch (er) { - return oner(er); - } - const tx = this.transform ? this.transform(entry) || entry : entry; - if (tx !== entry) { - tx.on('error', (er) => this[ONERROR](er, entry)); - entry.pipe(tx); - } - tx.on('data', (chunk) => { - try { - node_fs_1.default.writeSync(fd, chunk, 0, chunk.length); - } - catch (er) { - oner(er); - } - }); - tx.on('end', () => { - let er = null; - // try both, falling futimes back to utimes - // if either fails, handle the first error - if (entry.mtime && !this.noMtime) { - const atime = entry.atime || new Date(); - const mtime = entry.mtime; - try { - node_fs_1.default.futimesSync(fd, atime, mtime); - } - catch (futimeser) { - try { - node_fs_1.default.utimesSync(String(entry.absolute), atime, mtime); - } - catch (utimeser) { - er = futimeser; - } - } - } - if (this[DOCHOWN](entry)) { - const uid = this[UID](entry); - const gid = this[GID](entry); - try { - node_fs_1.default.fchownSync(fd, Number(uid), Number(gid)); - } - catch (fchowner) { - try { - node_fs_1.default.chownSync(String(entry.absolute), Number(uid), Number(gid)); - } - catch (chowner) { - er = er || fchowner; - } - } - } - oner(er); - }); - } - [DIRECTORY](entry, done) { - const mode = typeof entry.mode === 'number' ? - entry.mode & 0o7777 - : this.dmode; - const er = this[MKDIR](String(entry.absolute), mode); - if (er) { - this[ONERROR](er, entry); - done(); - return; - } - if (entry.mtime && !this.noMtime) { - try { - node_fs_1.default.utimesSync(String(entry.absolute), entry.atime || new Date(), entry.mtime); - /* c8 ignore next */ - } - catch (er) { } - } - if (this[DOCHOWN](entry)) { - try { - node_fs_1.default.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); - } - catch (er) { } - } - done(); - entry.resume(); - } - [MKDIR](dir, mode) { - try { - return (0, mkdir_js_1.mkdirSync)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), { - uid: this.uid, - gid: this.gid, - processUid: this.processUid, - processGid: this.processGid, - umask: this.processUmask, - preserve: this.preservePaths, - unlink: this.unlink, - cache: this.dirCache, - cwd: this.cwd, - mode: mode, - }); - } - catch (er) { - return er; - } - } - [LINK](entry, linkpath, link, done) { - const ls = `${link}Sync`; - try { - node_fs_1.default[ls](linkpath, String(entry.absolute)); - done(); - entry.resume(); - } - catch (er) { - return this[ONERROR](er, entry); - } - } -} -exports.UnpackSync = UnpackSync; -//# sourceMappingURL=unpack.js.map - -/***/ }), - -/***/ 38780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// tar -u -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.update = void 0; -const make_command_js_1 = __nccwpck_require__(33830); -const replace_js_1 = __nccwpck_require__(45478); -// just call tar.r with the filter and mtimeCache -exports.update = (0, make_command_js_1.makeCommand)(replace_js_1.replace.syncFile, replace_js_1.replace.asyncFile, replace_js_1.replace.syncNoFile, replace_js_1.replace.asyncNoFile, (opt, entries = []) => { - replace_js_1.replace.validate?.(opt, entries); - mtimeFilter(opt); -}); -const mtimeFilter = (opt) => { - const filter = opt.filter; - if (!opt.mtimeCache) { - opt.mtimeCache = new Map(); - } - opt.filter = - filter ? - (path, stat) => filter(path, stat) && - !( - /* c8 ignore start */ - ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > - (stat.mtime ?? 0)) - /* c8 ignore stop */ - ) - : (path, stat) => !( - /* c8 ignore start */ - ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > - (stat.mtime ?? 0)) - /* c8 ignore stop */ - ); -}; -//# sourceMappingURL=update.js.map - -/***/ }), - -/***/ 449: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.warnMethod = void 0; -const warnMethod = (self, code, message, data = {}) => { - if (self.file) { - data.file = self.file; - } - if (self.cwd) { - data.cwd = self.cwd; - } - data.code = - (message instanceof Error && - message.code) || - code; - data.tarCode = code; - if (!self.strict && data.recoverable !== false) { - if (message instanceof Error) { - data = Object.assign(message, data); - message = message.message; - } - self.emit('warn', code, message, data); - } - else if (message instanceof Error) { - self.emit('error', Object.assign(message, data)); - } - else { - self.emit('error', Object.assign(new Error(`${code}: ${message}`), data)); - } -}; -exports.warnMethod = warnMethod; -//# sourceMappingURL=warn-method.js.map - -/***/ }), - -/***/ 64978: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// When writing files on Windows, translate the characters to their -// 0xf000 higher-encoded versions. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decode = exports.encode = void 0; -const raw = ['|', '<', '>', '?', ':']; -const win = raw.map(char => String.fromCharCode(0xf000 + char.charCodeAt(0))); -const toWin = new Map(raw.map((char, i) => [char, win[i]])); -const toRaw = new Map(win.map((char, i) => [char, raw[i]])); -const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s); -exports.encode = encode; -const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s); -exports.decode = decode; -//# sourceMappingURL=winchars.js.map - -/***/ }), - -/***/ 24028: -/***/ (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.WriteEntryTar = exports.WriteEntrySync = exports.WriteEntry = void 0; -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const minipass_1 = __nccwpck_require__(14968); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const header_js_1 = __nccwpck_require__(52374); -const mode_fix_js_1 = __nccwpck_require__(1810); -const normalize_windows_path_js_1 = __nccwpck_require__(20762); -const options_js_1 = __nccwpck_require__(14839); -const pax_js_1 = __nccwpck_require__(58567); -const strip_absolute_path_js_1 = __nccwpck_require__(71126); -const strip_trailing_slashes_js_1 = __nccwpck_require__(66018); -const warn_method_js_1 = __nccwpck_require__(449); -const winchars = __importStar(__nccwpck_require__(64978)); -const prefixPath = (path, prefix) => { - if (!prefix) { - return (0, normalize_windows_path_js_1.normalizeWindowsPath)(path); - } - path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path).replace(/^\.(\/|$)/, ''); - return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)(prefix) + '/' + path; -}; -const maxReadSize = 16 * 1024 * 1024; -const PROCESS = Symbol('process'); -const FILE = Symbol('file'); -const DIRECTORY = Symbol('directory'); -const SYMLINK = Symbol('symlink'); -const HARDLINK = Symbol('hardlink'); -const HEADER = Symbol('header'); -const READ = Symbol('read'); -const LSTAT = Symbol('lstat'); -const ONLSTAT = Symbol('onlstat'); -const ONREAD = Symbol('onread'); -const ONREADLINK = Symbol('onreadlink'); -const OPENFILE = Symbol('openfile'); -const ONOPENFILE = Symbol('onopenfile'); -const CLOSE = Symbol('close'); -const MODE = Symbol('mode'); -const AWAITDRAIN = Symbol('awaitDrain'); -const ONDRAIN = Symbol('ondrain'); -const PREFIX = Symbol('prefix'); -class WriteEntry extends minipass_1.Minipass { - path; - portable; - myuid = (process.getuid && process.getuid()) || 0; - // until node has builtin pwnam functions, this'll have to do - myuser = process.env.USER || ''; - maxReadSize; - linkCache; - statCache; - preservePaths; - cwd; - strict; - mtime; - noPax; - noMtime; - prefix; - fd; - blockLen = 0; - blockRemain = 0; - buf; - pos = 0; - remain = 0; - length = 0; - offset = 0; - win32; - absolute; - header; - type; - linkpath; - stat; - onWriteEntry; - #hadError = false; - constructor(p, opt_ = {}) { - const opt = (0, options_js_1.dealias)(opt_); - super(); - this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(p); - // suppress atime, ctime, uid, gid, uname, gname - this.portable = !!opt.portable; - this.maxReadSize = opt.maxReadSize || maxReadSize; - this.linkCache = opt.linkCache || new Map(); - this.statCache = opt.statCache || new Map(); - this.preservePaths = !!opt.preservePaths; - this.cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd || process.cwd()); - this.strict = !!opt.strict; - this.noPax = !!opt.noPax; - this.noMtime = !!opt.noMtime; - this.mtime = opt.mtime; - this.prefix = - opt.prefix ? (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.prefix) : undefined; - this.onWriteEntry = opt.onWriteEntry; - if (typeof opt.onwarn === 'function') { - this.on('warn', opt.onwarn); - } - let pathWarn = false; - if (!this.preservePaths) { - const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(this.path); - if (root && typeof stripped === 'string') { - this.path = stripped; - pathWarn = root; - } - } - this.win32 = !!opt.win32 || process.platform === 'win32'; - if (this.win32) { - // force the \ to / normalization, since we might not *actually* - // be on windows, but want \ to be considered a path separator. - this.path = winchars.decode(this.path.replace(/\\/g, '/')); - p = p.replace(/\\/g, '/'); - } - this.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.absolute || path_1.default.resolve(this.cwd, p)); - if (this.path === '') { - this.path = './'; - } - if (pathWarn) { - this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { - entry: this, - path: pathWarn + this.path, - }); - } - const cs = this.statCache.get(this.absolute); - if (cs) { - this[ONLSTAT](cs); - } - else { - this[LSTAT](); - } - } - warn(code, message, data = {}) { - return (0, warn_method_js_1.warnMethod)(this, code, message, data); - } - emit(ev, ...data) { - if (ev === 'error') { - this.#hadError = true; - } - return super.emit(ev, ...data); - } - [LSTAT]() { - fs_1.default.lstat(this.absolute, (er, stat) => { - if (er) { - return this.emit('error', er); - } - this[ONLSTAT](stat); - }); - } - [ONLSTAT](stat) { - this.statCache.set(this.absolute, stat); - this.stat = stat; - if (!stat.isFile()) { - stat.size = 0; - } - this.type = getType(stat); - this.emit('stat', stat); - this[PROCESS](); - } - [PROCESS]() { - switch (this.type) { - case 'File': - return this[FILE](); - case 'Directory': - return this[DIRECTORY](); - case 'SymbolicLink': - return this[SYMLINK](); - // unsupported types are ignored. - default: - return this.end(); - } - } - [MODE](mode) { - return (0, mode_fix_js_1.modeFix)(mode, this.type === 'Directory', this.portable); - } - [PREFIX](path) { - return prefixPath(path, this.prefix); - } - [HEADER]() { - /* c8 ignore start */ - if (!this.stat) { - throw new Error('cannot write header before stat'); - } - /* c8 ignore stop */ - if (this.type === 'Directory' && this.portable) { - this.noMtime = true; - } - this.onWriteEntry?.(this); - this.header = new header_js_1.Header({ - path: this[PREFIX](this.path), - // only apply the prefix to hard links. - linkpath: this.type === 'Link' && this.linkpath !== undefined ? - this[PREFIX](this.linkpath) - : this.linkpath, - // only the permissions and setuid/setgid/sticky bitflags - // not the higher-order bits that specify file type - mode: this[MODE](this.stat.mode), - uid: this.portable ? undefined : this.stat.uid, - gid: this.portable ? undefined : this.stat.gid, - size: this.stat.size, - mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime, - /* c8 ignore next */ - type: this.type === 'Unsupported' ? undefined : this.type, - uname: this.portable ? undefined - : this.stat.uid === this.myuid ? this.myuser - : '', - atime: this.portable ? undefined : this.stat.atime, - ctime: this.portable ? undefined : this.stat.ctime, - }); - if (this.header.encode() && !this.noPax) { - super.write(new pax_js_1.Pax({ - atime: this.portable ? undefined : this.header.atime, - ctime: this.portable ? undefined : this.header.ctime, - gid: this.portable ? undefined : this.header.gid, - mtime: this.noMtime ? undefined : (this.mtime || this.header.mtime), - path: this[PREFIX](this.path), - linkpath: this.type === 'Link' && this.linkpath !== undefined ? - this[PREFIX](this.linkpath) - : this.linkpath, - size: this.header.size, - uid: this.portable ? undefined : this.header.uid, - uname: this.portable ? undefined : this.header.uname, - dev: this.portable ? undefined : this.stat.dev, - ino: this.portable ? undefined : this.stat.ino, - nlink: this.portable ? undefined : this.stat.nlink, - }).encode()); - } - const block = this.header?.block; - /* c8 ignore start */ - if (!block) { - throw new Error('failed to encode header'); - } - /* c8 ignore stop */ - super.write(block); - } - [DIRECTORY]() { - /* c8 ignore start */ - if (!this.stat) { - throw new Error('cannot create directory entry without stat'); - } - /* c8 ignore stop */ - if (this.path.slice(-1) !== '/') { - this.path += '/'; - } - this.stat.size = 0; - this[HEADER](); - this.end(); - } - [SYMLINK]() { - fs_1.default.readlink(this.absolute, (er, linkpath) => { - if (er) { - return this.emit('error', er); - } - this[ONREADLINK](linkpath); - }); - } - [ONREADLINK](linkpath) { - this.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(linkpath); - this[HEADER](); - this.end(); - } - [HARDLINK](linkpath) { - /* c8 ignore start */ - if (!this.stat) { - throw new Error('cannot create link entry without stat'); - } - /* c8 ignore stop */ - this.type = 'Link'; - this.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.relative(this.cwd, linkpath)); - this.stat.size = 0; - this[HEADER](); - this.end(); - } - [FILE]() { - /* c8 ignore start */ - if (!this.stat) { - throw new Error('cannot create file entry without stat'); - } - /* c8 ignore stop */ - if (this.stat.nlink > 1) { - const linkKey = `${this.stat.dev}:${this.stat.ino}`; - const linkpath = this.linkCache.get(linkKey); - if (linkpath?.indexOf(this.cwd) === 0) { - return this[HARDLINK](linkpath); - } - this.linkCache.set(linkKey, this.absolute); - } - this[HEADER](); - if (this.stat.size === 0) { - return this.end(); - } - this[OPENFILE](); - } - [OPENFILE]() { - fs_1.default.open(this.absolute, 'r', (er, fd) => { - if (er) { - return this.emit('error', er); - } - this[ONOPENFILE](fd); - }); - } - [ONOPENFILE](fd) { - this.fd = fd; - if (this.#hadError) { - return this[CLOSE](); - } - /* c8 ignore start */ - if (!this.stat) { - throw new Error('should stat before calling onopenfile'); - } - /* c8 ignore start */ - this.blockLen = 512 * Math.ceil(this.stat.size / 512); - this.blockRemain = this.blockLen; - const bufLen = Math.min(this.blockLen, this.maxReadSize); - this.buf = Buffer.allocUnsafe(bufLen); - this.offset = 0; - this.pos = 0; - this.remain = this.stat.size; - this.length = this.buf.length; - this[READ](); - } - [READ]() { - const { fd, buf, offset, length, pos } = this; - if (fd === undefined || buf === undefined) { - throw new Error('cannot read file without first opening'); - } - fs_1.default.read(fd, buf, offset, length, pos, (er, bytesRead) => { - if (er) { - // ignoring the error from close(2) is a bad practice, but at - // this point we already have an error, don't need another one - return this[CLOSE](() => this.emit('error', er)); - } - this[ONREAD](bytesRead); - }); - } - /* c8 ignore start */ - [CLOSE](cb = () => { }) { - /* c8 ignore stop */ - if (this.fd !== undefined) - fs_1.default.close(this.fd, cb); - } - [ONREAD](bytesRead) { - if (bytesRead <= 0 && this.remain > 0) { - const er = Object.assign(new Error('encountered unexpected EOF'), { - path: this.absolute, - syscall: 'read', - code: 'EOF', - }); - return this[CLOSE](() => this.emit('error', er)); - } - if (bytesRead > this.remain) { - const er = Object.assign(new Error('did not encounter expected EOF'), { - path: this.absolute, - syscall: 'read', - code: 'EOF', - }); - return this[CLOSE](() => this.emit('error', er)); - } - /* c8 ignore start */ - if (!this.buf) { - throw new Error('should have created buffer prior to reading'); - } - /* c8 ignore stop */ - // null out the rest of the buffer, if we could fit the block padding - // at the end of this loop, we've incremented bytesRead and this.remain - // to be incremented up to the blockRemain level, as if we had expected - // to get a null-padded file, and read it until the end. then we will - // decrement both remain and blockRemain by bytesRead, and know that we - // reached the expected EOF, without any null buffer to append. - if (bytesRead === this.remain) { - for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { - this.buf[i + this.offset] = 0; - bytesRead++; - this.remain++; - } - } - const chunk = this.offset === 0 && bytesRead === this.buf.length ? - this.buf - : this.buf.subarray(this.offset, this.offset + bytesRead); - const flushed = this.write(chunk); - if (!flushed) { - this[AWAITDRAIN](() => this[ONDRAIN]()); - } - else { - this[ONDRAIN](); - } - } - [AWAITDRAIN](cb) { - this.once('drain', cb); - } - write(chunk, encoding, cb) { - /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - if (typeof chunk === 'string') { - chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); - } - /* c8 ignore stop */ - if (this.blockRemain < chunk.length) { - const er = Object.assign(new Error('writing more data than expected'), { - path: this.absolute, - }); - return this.emit('error', er); - } - this.remain -= chunk.length; - this.blockRemain -= chunk.length; - this.pos += chunk.length; - this.offset += chunk.length; - return super.write(chunk, null, cb); - } - [ONDRAIN]() { - if (!this.remain) { - if (this.blockRemain) { - super.write(Buffer.alloc(this.blockRemain)); - } - return this[CLOSE](er => er ? this.emit('error', er) : this.end()); - } - /* c8 ignore start */ - if (!this.buf) { - throw new Error('buffer lost somehow in ONDRAIN'); - } - /* c8 ignore stop */ - if (this.offset >= this.length) { - // if we only have a smaller bit left to read, alloc a smaller buffer - // otherwise, keep it the same length it was before. - this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); - this.offset = 0; - } - this.length = this.buf.length - this.offset; - this[READ](); - } -} -exports.WriteEntry = WriteEntry; -class WriteEntrySync extends WriteEntry { - sync = true; - [LSTAT]() { - this[ONLSTAT](fs_1.default.lstatSync(this.absolute)); - } - [SYMLINK]() { - this[ONREADLINK](fs_1.default.readlinkSync(this.absolute)); - } - [OPENFILE]() { - this[ONOPENFILE](fs_1.default.openSync(this.absolute, 'r')); - } - [READ]() { - let threw = true; - try { - const { fd, buf, offset, length, pos } = this; - /* c8 ignore start */ - if (fd === undefined || buf === undefined) { - throw new Error('fd and buf must be set in READ method'); - } - /* c8 ignore stop */ - const bytesRead = fs_1.default.readSync(fd, buf, offset, length, pos); - this[ONREAD](bytesRead); - threw = false; - } - finally { - // ignoring the error from close(2) is a bad practice, but at - // this point we already have an error, don't need another one - if (threw) { - try { - this[CLOSE](() => { }); - } - catch (er) { } - } - } - } - [AWAITDRAIN](cb) { - cb(); - } - /* c8 ignore start */ - [CLOSE](cb = () => { }) { - /* c8 ignore stop */ - if (this.fd !== undefined) - fs_1.default.closeSync(this.fd); - cb(); - } -} -exports.WriteEntrySync = WriteEntrySync; -class WriteEntryTar extends minipass_1.Minipass { - blockLen = 0; - blockRemain = 0; - buf = 0; - pos = 0; - remain = 0; - length = 0; - preservePaths; - portable; - strict; - noPax; - noMtime; - readEntry; - type; - prefix; - path; - mode; - uid; - gid; - uname; - gname; - header; - mtime; - atime; - ctime; - linkpath; - size; - onWriteEntry; - warn(code, message, data = {}) { - return (0, warn_method_js_1.warnMethod)(this, code, message, data); - } - constructor(readEntry, opt_ = {}) { - const opt = (0, options_js_1.dealias)(opt_); - super(); - this.preservePaths = !!opt.preservePaths; - this.portable = !!opt.portable; - this.strict = !!opt.strict; - this.noPax = !!opt.noPax; - this.noMtime = !!opt.noMtime; - this.onWriteEntry = opt.onWriteEntry; - this.readEntry = readEntry; - const { type } = readEntry; - /* c8 ignore start */ - if (type === 'Unsupported') { - throw new Error('writing entry that should be ignored'); - } - /* c8 ignore stop */ - this.type = type; - if (this.type === 'Directory' && this.portable) { - this.noMtime = true; - } - this.prefix = opt.prefix; - this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(readEntry.path); - this.mode = - readEntry.mode !== undefined ? - this[MODE](readEntry.mode) - : undefined; - this.uid = this.portable ? undefined : readEntry.uid; - this.gid = this.portable ? undefined : readEntry.gid; - this.uname = this.portable ? undefined : readEntry.uname; - this.gname = this.portable ? undefined : readEntry.gname; - this.size = readEntry.size; - this.mtime = - this.noMtime ? undefined : opt.mtime || readEntry.mtime; - this.atime = this.portable ? undefined : readEntry.atime; - this.ctime = this.portable ? undefined : readEntry.ctime; - this.linkpath = - readEntry.linkpath !== undefined ? - (0, normalize_windows_path_js_1.normalizeWindowsPath)(readEntry.linkpath) - : undefined; - if (typeof opt.onwarn === 'function') { - this.on('warn', opt.onwarn); - } - let pathWarn = false; - if (!this.preservePaths) { - const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(this.path); - if (root && typeof stripped === 'string') { - this.path = stripped; - pathWarn = root; - } - } - this.remain = readEntry.size; - this.blockRemain = readEntry.startBlockSize; - this.onWriteEntry?.(this); - this.header = new header_js_1.Header({ - path: this[PREFIX](this.path), - linkpath: this.type === 'Link' && this.linkpath !== undefined ? - this[PREFIX](this.linkpath) - : this.linkpath, - // only the permissions and setuid/setgid/sticky bitflags - // not the higher-order bits that specify file type - mode: this.mode, - uid: this.portable ? undefined : this.uid, - gid: this.portable ? undefined : this.gid, - size: this.size, - mtime: this.noMtime ? undefined : this.mtime, - type: this.type, - uname: this.portable ? undefined : this.uname, - atime: this.portable ? undefined : this.atime, - ctime: this.portable ? undefined : this.ctime, - }); - if (pathWarn) { - this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { - entry: this, - path: pathWarn + this.path, - }); - } - if (this.header.encode() && !this.noPax) { - super.write(new pax_js_1.Pax({ - atime: this.portable ? undefined : this.atime, - ctime: this.portable ? undefined : this.ctime, - gid: this.portable ? undefined : this.gid, - mtime: this.noMtime ? undefined : this.mtime, - path: this[PREFIX](this.path), - linkpath: this.type === 'Link' && this.linkpath !== undefined ? - this[PREFIX](this.linkpath) - : this.linkpath, - size: this.size, - uid: this.portable ? undefined : this.uid, - uname: this.portable ? undefined : this.uname, - dev: this.portable ? undefined : this.readEntry.dev, - ino: this.portable ? undefined : this.readEntry.ino, - nlink: this.portable ? undefined : this.readEntry.nlink, - }).encode()); - } - const b = this.header?.block; - /* c8 ignore start */ - if (!b) - throw new Error('failed to encode header'); - /* c8 ignore stop */ - super.write(b); - readEntry.pipe(this); - } - [PREFIX](path) { - return prefixPath(path, this.prefix); - } - [MODE](mode) { - return (0, mode_fix_js_1.modeFix)(mode, this.type === 'Directory', this.portable); - } - write(chunk, encoding, cb) { - /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - if (typeof chunk === 'string') { - chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); - } - /* c8 ignore stop */ - const writeLen = chunk.length; - if (writeLen > this.blockRemain) { - throw new Error('writing more to entry than is appropriate'); - } - this.blockRemain -= writeLen; - return super.write(chunk, cb); - } - end(chunk, encoding, cb) { - if (this.blockRemain) { - super.write(Buffer.alloc(this.blockRemain)); - } - /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ - if (typeof chunk === 'function') { - cb = chunk; - encoding = undefined; - chunk = undefined; - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = undefined; - } - if (typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding ?? 'utf8'); - } - if (cb) - this.once('finish', cb); - chunk ? super.end(chunk, cb) : super.end(cb); - /* c8 ignore stop */ - return this; - } -} -exports.WriteEntryTar = WriteEntryTar; -const getType = (stat) => stat.isFile() ? 'File' - : stat.isDirectory() ? 'Directory' - : stat.isSymbolicLink() ? 'SymbolicLink' - : 'Unsupported'; -//# sourceMappingURL=write-entry.js.map - -/***/ }), - -/***/ 43796: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Node = exports.Yallist = void 0; -class Yallist { - tail; - head; - length = 0; - static create(list = []) { - return new Yallist(list); - } - constructor(list = []) { - for (const item of list) { - this.push(item); - } - } - *[Symbol.iterator]() { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - } - removeNode(node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list'); - } - const next = node.next; - const prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - this.length--; - node.next = undefined; - node.prev = undefined; - node.list = undefined; - return next; - } - unshiftNode(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - const head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - } - pushNode(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - const tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - } - push(...args) { - for (let i = 0, l = args.length; i < l; i++) { - push(this, args[i]); - } - return this.length; - } - unshift(...args) { - for (var i = 0, l = args.length; i < l; i++) { - unshift(this, args[i]); - } - return this.length; - } - pop() { - if (!this.tail) { - return undefined; - } - const res = this.tail.value; - const t = this.tail; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = undefined; - } - else { - this.head = undefined; - } - t.list = undefined; - this.length--; - return res; - } - shift() { - if (!this.head) { - return undefined; - } - const res = this.head.value; - const h = this.head; - this.head = this.head.next; - if (this.head) { - this.head.prev = undefined; - } - else { - this.tail = undefined; - } - h.list = undefined; - this.length--; - return res; - } - forEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this.head, i = 0; !!walker; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - } - forEachReverse(fn, thisp) { - thisp = thisp || this; - for (let walker = this.tail, i = this.length - 1; !!walker; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - } - get(n) { - let i = 0; - let walker = this.head; - for (; !!walker && i < n; i++) { - walker = walker.next; - } - if (i === n && !!walker) { - return walker.value; - } - } - getReverse(n) { - let i = 0; - let walker = this.tail; - for (; !!walker && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev; - } - if (i === n && !!walker) { - return walker.value; - } - } - map(fn, thisp) { - thisp = thisp || this; - const res = new Yallist(); - for (let walker = this.head; !!walker;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - } - mapReverse(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (let walker = this.tail; !!walker;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - } - reduce(fn, initial) { - let acc; - let walker = this.head; - if (arguments.length > 1) { - acc = initial; - } - else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } - else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = 0; !!walker; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - } - reduceReverse(fn, initial) { - let acc; - let walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } - else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } - else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (let i = this.length - 1; !!walker; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - } - toArray() { - const arr = new Array(this.length); - for (let i = 0, walker = this.head; !!walker; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - } - toArrayReverse() { - const arr = new Array(this.length); - for (let i = 0, walker = this.tail; !!walker; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - } - slice(from = 0, to = this.length) { - if (to < 0) { - to += this.length; - } - if (from < 0) { - from += this.length; - } - const ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - let walker = this.head; - let i = 0; - for (i = 0; !!walker && i < from; i++) { - walker = walker.next; - } - for (; !!walker && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - } - sliceReverse(from = 0, to = this.length) { - if (to < 0) { - to += this.length; - } - if (from < 0) { - from += this.length; - } - const ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - let i = this.length; - let walker = this.tail; - for (; !!walker && i > to; i--) { - walker = walker.prev; - } - for (; !!walker && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - } - splice(start, deleteCount = 0, ...nodes) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - let walker = this.head; - for (let i = 0; !!walker && i < start; i++) { - walker = walker.next; - } - const ret = []; - for (let i = 0; !!walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (!walker) { - walker = this.tail; - } - else if (walker !== this.tail) { - walker = walker.prev; - } - for (const v of nodes) { - walker = insertAfter(this, walker, v); - } - return ret; - } - reverse() { - const head = this.head; - const tail = this.tail; - for (let walker = head; !!walker; walker = walker.prev) { - const p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - } -} -exports.Yallist = Yallist; -// insertAfter undefined means "make the node the new head of list" -function insertAfter(self, node, value) { - const prev = node; - const next = node ? node.next : self.head; - const inserted = new Node(value, prev, next, self); - if (inserted.next === undefined) { - self.tail = inserted; - } - if (inserted.prev === undefined) { - self.head = inserted; - } - self.length++; - return inserted; -} -function push(self, item) { - self.tail = new Node(item, self.tail, undefined, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; -} -function unshift(self, item) { - self.head = new Node(item, undefined, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; -} -class Node { - list; - next; - prev; - value; - constructor(value, prev, next, list) { - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } - else { - this.prev = undefined; - } - if (next) { - next.prev = this; - this.next = next; - } - else { - this.next = undefined; - } - } -} -exports.Node = Node; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 24697: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var vm = __nccwpck_require__(26144); - -/** - * @implements {IHooks} - */ -class Hooks { - /** - * @callback HookCallback - * @this {*|Jsep} this - * @param {Jsep} env - * @returns: void - */ - /** - * Adds the given callback to the list of callbacks for the given hook. - * - * The callback will be invoked when the hook it is registered for is run. - * - * One callback function can be registered to multiple hooks and the same hook multiple times. - * - * @param {string|object} name The name of the hook, or an object of callbacks keyed by name - * @param {HookCallback|boolean} callback The callback function which is given environment variables. - * @param {?boolean} [first=false] Will add the hook to the top of the list (defaults to the bottom) - * @public - */ - add(name, callback, first) { - if (typeof arguments[0] != 'string') { - // Multiple hook callbacks, keyed by name - for (let name in arguments[0]) { - this.add(name, arguments[0][name], arguments[1]); - } - } else { - (Array.isArray(name) ? name : [name]).forEach(function (name) { - this[name] = this[name] || []; - if (callback) { - this[name][first ? 'unshift' : 'push'](callback); - } - }, this); - } - } - - /** - * Runs a hook invoking all registered callbacks with the given environment variables. - * - * Callbacks will be invoked synchronously and in the order in which they were registered. - * - * @param {string} name The name of the hook. - * @param {Object} env The environment variables of the hook passed to all callbacks registered. - * @public - */ - run(name, env) { - this[name] = this[name] || []; - this[name].forEach(function (callback) { - callback.call(env && env.context ? env.context : env, env); - }); - } -} - -/** - * @implements {IPlugins} - */ -class Plugins { - constructor(jsep) { - this.jsep = jsep; - this.registered = {}; - } - - /** - * @callback PluginSetup - * @this {Jsep} jsep - * @returns: void - */ - /** - * Adds the given plugin(s) to the registry - * - * @param {object} plugins - * @param {string} plugins.name The name of the plugin - * @param {PluginSetup} plugins.init The init function - * @public - */ - register(...plugins) { - plugins.forEach(plugin => { - if (typeof plugin !== 'object' || !plugin.name || !plugin.init) { - throw new Error('Invalid JSEP plugin format'); - } - if (this.registered[plugin.name]) { - // already registered. Ignore. - return; - } - plugin.init(this.jsep); - this.registered[plugin.name] = plugin; - }); - } -} - -// JavaScript Expression Parser (JSEP) 1.4.0 - -class Jsep { - /** - * @returns {string} - */ - static get version() { - // To be filled in by the template - return '1.4.0'; - } - - /** - * @returns {string} - */ - static toString() { - return 'JavaScript Expression Parser (JSEP) v' + Jsep.version; - } - // ==================== CONFIG ================================ - /** - * @method addUnaryOp - * @param {string} op_name The name of the unary op to add - * @returns {Jsep} - */ - static addUnaryOp(op_name) { - Jsep.max_unop_len = Math.max(op_name.length, Jsep.max_unop_len); - Jsep.unary_ops[op_name] = 1; - return Jsep; - } - - /** - * @method jsep.addBinaryOp - * @param {string} op_name The name of the binary op to add - * @param {number} precedence The precedence of the binary op (can be a float). Higher number = higher precedence - * @param {boolean} [isRightAssociative=false] whether operator is right-associative - * @returns {Jsep} - */ - static addBinaryOp(op_name, precedence, isRightAssociative) { - Jsep.max_binop_len = Math.max(op_name.length, Jsep.max_binop_len); - Jsep.binary_ops[op_name] = precedence; - if (isRightAssociative) { - Jsep.right_associative.add(op_name); - } else { - Jsep.right_associative.delete(op_name); - } - return Jsep; - } - - /** - * @method addIdentifierChar - * @param {string} char The additional character to treat as a valid part of an identifier - * @returns {Jsep} - */ - static addIdentifierChar(char) { - Jsep.additional_identifier_chars.add(char); - return Jsep; - } - - /** - * @method addLiteral - * @param {string} literal_name The name of the literal to add - * @param {*} literal_value The value of the literal - * @returns {Jsep} - */ - static addLiteral(literal_name, literal_value) { - Jsep.literals[literal_name] = literal_value; - return Jsep; - } - - /** - * @method removeUnaryOp - * @param {string} op_name The name of the unary op to remove - * @returns {Jsep} - */ - static removeUnaryOp(op_name) { - delete Jsep.unary_ops[op_name]; - if (op_name.length === Jsep.max_unop_len) { - Jsep.max_unop_len = Jsep.getMaxKeyLen(Jsep.unary_ops); - } - return Jsep; - } - - /** - * @method removeAllUnaryOps - * @returns {Jsep} - */ - static removeAllUnaryOps() { - Jsep.unary_ops = {}; - Jsep.max_unop_len = 0; - return Jsep; - } - - /** - * @method removeIdentifierChar - * @param {string} char The additional character to stop treating as a valid part of an identifier - * @returns {Jsep} - */ - static removeIdentifierChar(char) { - Jsep.additional_identifier_chars.delete(char); - return Jsep; - } - - /** - * @method removeBinaryOp - * @param {string} op_name The name of the binary op to remove - * @returns {Jsep} - */ - static removeBinaryOp(op_name) { - delete Jsep.binary_ops[op_name]; - if (op_name.length === Jsep.max_binop_len) { - Jsep.max_binop_len = Jsep.getMaxKeyLen(Jsep.binary_ops); - } - Jsep.right_associative.delete(op_name); - return Jsep; - } - - /** - * @method removeAllBinaryOps - * @returns {Jsep} - */ - static removeAllBinaryOps() { - Jsep.binary_ops = {}; - Jsep.max_binop_len = 0; - return Jsep; - } - - /** - * @method removeLiteral - * @param {string} literal_name The name of the literal to remove - * @returns {Jsep} - */ - static removeLiteral(literal_name) { - delete Jsep.literals[literal_name]; - return Jsep; - } - - /** - * @method removeAllLiterals - * @returns {Jsep} - */ - static removeAllLiterals() { - Jsep.literals = {}; - return Jsep; - } - // ==================== END CONFIG ============================ - - /** - * @returns {string} - */ - get char() { - return this.expr.charAt(this.index); - } - - /** - * @returns {number} - */ - get code() { - return this.expr.charCodeAt(this.index); - } - /** - * @param {string} expr a string with the passed in express - * @returns Jsep - */ - constructor(expr) { - // `index` stores the character number we are currently at - // All of the gobbles below will modify `index` as we move along - this.expr = expr; - this.index = 0; - } - - /** - * static top-level parser - * @returns {jsep.Expression} - */ - static parse(expr) { - return new Jsep(expr).parse(); - } - - /** - * Get the longest key length of any object - * @param {object} obj - * @returns {number} - */ - static getMaxKeyLen(obj) { - return Math.max(0, ...Object.keys(obj).map(k => k.length)); - } - - /** - * `ch` is a character code in the next three functions - * @param {number} ch - * @returns {boolean} - */ - static isDecimalDigit(ch) { - return ch >= 48 && ch <= 57; // 0...9 - } - - /** - * Returns the precedence of a binary operator or `0` if it isn't a binary operator. Can be float. - * @param {string} op_val - * @returns {number} - */ - static binaryPrecedence(op_val) { - return Jsep.binary_ops[op_val] || 0; - } - - /** - * Looks for start of identifier - * @param {number} ch - * @returns {boolean} - */ - static isIdentifierStart(ch) { - return ch >= 65 && ch <= 90 || - // A...Z - ch >= 97 && ch <= 122 || - // a...z - ch >= 128 && !Jsep.binary_ops[String.fromCharCode(ch)] || - // any non-ASCII that is not an operator - Jsep.additional_identifier_chars.has(String.fromCharCode(ch)); // additional characters - } - - /** - * @param {number} ch - * @returns {boolean} - */ - static isIdentifierPart(ch) { - return Jsep.isIdentifierStart(ch) || Jsep.isDecimalDigit(ch); - } - - /** - * throw error at index of the expression - * @param {string} message - * @throws - */ - throwError(message) { - const error = new Error(message + ' at character ' + this.index); - error.index = this.index; - error.description = message; - throw error; - } - - /** - * Run a given hook - * @param {string} name - * @param {jsep.Expression|false} [node] - * @returns {?jsep.Expression} - */ - runHook(name, node) { - if (Jsep.hooks[name]) { - const env = { - context: this, - node - }; - Jsep.hooks.run(name, env); - return env.node; - } - return node; - } - - /** - * Runs a given hook until one returns a node - * @param {string} name - * @returns {?jsep.Expression} - */ - searchHook(name) { - if (Jsep.hooks[name]) { - const env = { - context: this - }; - Jsep.hooks[name].find(function (callback) { - callback.call(env.context, env); - return env.node; - }); - return env.node; - } - } - - /** - * Push `index` up to the next non-space character - */ - gobbleSpaces() { - let ch = this.code; - // Whitespace - while (ch === Jsep.SPACE_CODE || ch === Jsep.TAB_CODE || ch === Jsep.LF_CODE || ch === Jsep.CR_CODE) { - ch = this.expr.charCodeAt(++this.index); - } - this.runHook('gobble-spaces'); - } - - /** - * Top-level method to parse all expressions and returns compound or single node - * @returns {jsep.Expression} - */ - parse() { - this.runHook('before-all'); - const nodes = this.gobbleExpressions(); - - // If there's only one expression just try returning the expression - const node = nodes.length === 1 ? nodes[0] : { - type: Jsep.COMPOUND, - body: nodes - }; - return this.runHook('after-all', node); - } - - /** - * top-level parser (but can be reused within as well) - * @param {number} [untilICode] - * @returns {jsep.Expression[]} - */ - gobbleExpressions(untilICode) { - let nodes = [], - ch_i, - node; - while (this.index < this.expr.length) { - ch_i = this.code; - - // Expressions can be separated by semicolons, commas, or just inferred without any - // separators - if (ch_i === Jsep.SEMCOL_CODE || ch_i === Jsep.COMMA_CODE) { - this.index++; // ignore separators - } else { - // Try to gobble each expression individually - if (node = this.gobbleExpression()) { - nodes.push(node); - // If we weren't able to find a binary expression and are out of room, then - // the expression passed in probably has too much - } else if (this.index < this.expr.length) { - if (ch_i === untilICode) { - break; - } - this.throwError('Unexpected "' + this.char + '"'); - } - } - } - return nodes; - } - - /** - * The main parsing function. - * @returns {?jsep.Expression} - */ - gobbleExpression() { - const node = this.searchHook('gobble-expression') || this.gobbleBinaryExpression(); - this.gobbleSpaces(); - return this.runHook('after-expression', node); - } - - /** - * Search for the operation portion of the string (e.g. `+`, `===`) - * Start by taking the longest possible binary operations (3 characters: `===`, `!==`, `>>>`) - * and move down from 3 to 2 to 1 character until a matching binary operation is found - * then, return that binary operation - * @returns {string|boolean} - */ - gobbleBinaryOp() { - this.gobbleSpaces(); - let to_check = this.expr.substr(this.index, Jsep.max_binop_len); - let tc_len = to_check.length; - while (tc_len > 0) { - // Don't accept a binary op when it is an identifier. - // Binary ops that start with a identifier-valid character must be followed - // by a non identifier-part valid character - if (Jsep.binary_ops.hasOwnProperty(to_check) && (!Jsep.isIdentifierStart(this.code) || this.index + to_check.length < this.expr.length && !Jsep.isIdentifierPart(this.expr.charCodeAt(this.index + to_check.length)))) { - this.index += tc_len; - return to_check; - } - to_check = to_check.substr(0, --tc_len); - } - return false; - } - - /** - * This function is responsible for gobbling an individual expression, - * e.g. `1`, `1+2`, `a+(b*2)-Math.sqrt(2)` - * @returns {?jsep.BinaryExpression} - */ - gobbleBinaryExpression() { - let node, biop, prec, stack, biop_info, left, right, i, cur_biop; - - // First, try to get the leftmost thing - // Then, check to see if there's a binary operator operating on that leftmost thing - // Don't gobbleBinaryOp without a left-hand-side - left = this.gobbleToken(); - if (!left) { - return left; - } - biop = this.gobbleBinaryOp(); - - // If there wasn't a binary operator, just return the leftmost node - if (!biop) { - return left; - } - - // Otherwise, we need to start a stack to properly place the binary operations in their - // precedence structure - biop_info = { - value: biop, - prec: Jsep.binaryPrecedence(biop), - right_a: Jsep.right_associative.has(biop) - }; - right = this.gobbleToken(); - if (!right) { - this.throwError("Expected expression after " + biop); - } - stack = [left, biop_info, right]; - - // Properly deal with precedence using [recursive descent](http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm) - while (biop = this.gobbleBinaryOp()) { - prec = Jsep.binaryPrecedence(biop); - if (prec === 0) { - this.index -= biop.length; - break; - } - biop_info = { - value: biop, - prec, - right_a: Jsep.right_associative.has(biop) - }; - cur_biop = biop; - - // Reduce: make a binary expression from the three topmost entries. - const comparePrev = prev => biop_info.right_a && prev.right_a ? prec > prev.prec : prec <= prev.prec; - while (stack.length > 2 && comparePrev(stack[stack.length - 2])) { - right = stack.pop(); - biop = stack.pop().value; - left = stack.pop(); - node = { - type: Jsep.BINARY_EXP, - operator: biop, - left, - right - }; - stack.push(node); - } - node = this.gobbleToken(); - if (!node) { - this.throwError("Expected expression after " + cur_biop); - } - stack.push(biop_info, node); - } - i = stack.length - 1; - node = stack[i]; - while (i > 1) { - node = { - type: Jsep.BINARY_EXP, - operator: stack[i - 1].value, - left: stack[i - 2], - right: node - }; - i -= 2; - } - return node; - } - - /** - * An individual part of a binary expression: - * e.g. `foo.bar(baz)`, `1`, `"abc"`, `(a % 2)` (because it's in parenthesis) - * @returns {boolean|jsep.Expression} - */ - gobbleToken() { - let ch, to_check, tc_len, node; - this.gobbleSpaces(); - node = this.searchHook('gobble-token'); - if (node) { - return this.runHook('after-token', node); - } - ch = this.code; - if (Jsep.isDecimalDigit(ch) || ch === Jsep.PERIOD_CODE) { - // Char code 46 is a dot `.` which can start off a numeric literal - return this.gobbleNumericLiteral(); - } - if (ch === Jsep.SQUOTE_CODE || ch === Jsep.DQUOTE_CODE) { - // Single or double quotes - node = this.gobbleStringLiteral(); - } else if (ch === Jsep.OBRACK_CODE) { - node = this.gobbleArray(); - } else { - to_check = this.expr.substr(this.index, Jsep.max_unop_len); - tc_len = to_check.length; - while (tc_len > 0) { - // Don't accept an unary op when it is an identifier. - // Unary ops that start with a identifier-valid character must be followed - // by a non identifier-part valid character - if (Jsep.unary_ops.hasOwnProperty(to_check) && (!Jsep.isIdentifierStart(this.code) || this.index + to_check.length < this.expr.length && !Jsep.isIdentifierPart(this.expr.charCodeAt(this.index + to_check.length)))) { - this.index += tc_len; - const argument = this.gobbleToken(); - if (!argument) { - this.throwError('missing unaryOp argument'); - } - return this.runHook('after-token', { - type: Jsep.UNARY_EXP, - operator: to_check, - argument, - prefix: true - }); - } - to_check = to_check.substr(0, --tc_len); - } - if (Jsep.isIdentifierStart(ch)) { - node = this.gobbleIdentifier(); - if (Jsep.literals.hasOwnProperty(node.name)) { - node = { - type: Jsep.LITERAL, - value: Jsep.literals[node.name], - raw: node.name - }; - } else if (node.name === Jsep.this_str) { - node = { - type: Jsep.THIS_EXP - }; - } - } else if (ch === Jsep.OPAREN_CODE) { - // open parenthesis - node = this.gobbleGroup(); - } - } - if (!node) { - return this.runHook('after-token', false); - } - node = this.gobbleTokenProperty(node); - return this.runHook('after-token', node); - } - - /** - * Gobble properties of of identifiers/strings/arrays/groups. - * e.g. `foo`, `bar.baz`, `foo['bar'].baz` - * It also gobbles function calls: - * e.g. `Math.acos(obj.angle)` - * @param {jsep.Expression} node - * @returns {jsep.Expression} - */ - gobbleTokenProperty(node) { - this.gobbleSpaces(); - let ch = this.code; - while (ch === Jsep.PERIOD_CODE || ch === Jsep.OBRACK_CODE || ch === Jsep.OPAREN_CODE || ch === Jsep.QUMARK_CODE) { - let optional; - if (ch === Jsep.QUMARK_CODE) { - if (this.expr.charCodeAt(this.index + 1) !== Jsep.PERIOD_CODE) { - break; - } - optional = true; - this.index += 2; - this.gobbleSpaces(); - ch = this.code; - } - this.index++; - if (ch === Jsep.OBRACK_CODE) { - node = { - type: Jsep.MEMBER_EXP, - computed: true, - object: node, - property: this.gobbleExpression() - }; - if (!node.property) { - this.throwError('Unexpected "' + this.char + '"'); - } - this.gobbleSpaces(); - ch = this.code; - if (ch !== Jsep.CBRACK_CODE) { - this.throwError('Unclosed ['); - } - this.index++; - } else if (ch === Jsep.OPAREN_CODE) { - // A function call is being made; gobble all the arguments - node = { - type: Jsep.CALL_EXP, - 'arguments': this.gobbleArguments(Jsep.CPAREN_CODE), - callee: node - }; - } else if (ch === Jsep.PERIOD_CODE || optional) { - if (optional) { - this.index--; - } - this.gobbleSpaces(); - node = { - type: Jsep.MEMBER_EXP, - computed: false, - object: node, - property: this.gobbleIdentifier() - }; - } - if (optional) { - node.optional = true; - } // else leave undefined for compatibility with esprima - - this.gobbleSpaces(); - ch = this.code; - } - return node; - } - - /** - * Parse simple numeric literals: `12`, `3.4`, `.5`. Do this by using a string to - * keep track of everything in the numeric literal and then calling `parseFloat` on that string - * @returns {jsep.Literal} - */ - gobbleNumericLiteral() { - let number = '', - ch, - chCode; - while (Jsep.isDecimalDigit(this.code)) { - number += this.expr.charAt(this.index++); - } - if (this.code === Jsep.PERIOD_CODE) { - // can start with a decimal marker - number += this.expr.charAt(this.index++); - while (Jsep.isDecimalDigit(this.code)) { - number += this.expr.charAt(this.index++); - } - } - ch = this.char; - if (ch === 'e' || ch === 'E') { - // exponent marker - number += this.expr.charAt(this.index++); - ch = this.char; - if (ch === '+' || ch === '-') { - // exponent sign - number += this.expr.charAt(this.index++); - } - while (Jsep.isDecimalDigit(this.code)) { - // exponent itself - number += this.expr.charAt(this.index++); - } - if (!Jsep.isDecimalDigit(this.expr.charCodeAt(this.index - 1))) { - this.throwError('Expected exponent (' + number + this.char + ')'); - } - } - chCode = this.code; - - // Check to make sure this isn't a variable name that start with a number (123abc) - if (Jsep.isIdentifierStart(chCode)) { - this.throwError('Variable names cannot start with a number (' + number + this.char + ')'); - } else if (chCode === Jsep.PERIOD_CODE || number.length === 1 && number.charCodeAt(0) === Jsep.PERIOD_CODE) { - this.throwError('Unexpected period'); - } - return { - type: Jsep.LITERAL, - value: parseFloat(number), - raw: number - }; - } - - /** - * Parses a string literal, staring with single or double quotes with basic support for escape codes - * e.g. `"hello world"`, `'this is\nJSEP'` - * @returns {jsep.Literal} - */ - gobbleStringLiteral() { - let str = ''; - const startIndex = this.index; - const quote = this.expr.charAt(this.index++); - let closed = false; - while (this.index < this.expr.length) { - let ch = this.expr.charAt(this.index++); - if (ch === quote) { - closed = true; - break; - } else if (ch === '\\') { - // Check for all of the common escape codes - ch = this.expr.charAt(this.index++); - switch (ch) { - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - default: - str += ch; - } - } else { - str += ch; - } - } - if (!closed) { - this.throwError('Unclosed quote after "' + str + '"'); - } - return { - type: Jsep.LITERAL, - value: str, - raw: this.expr.substring(startIndex, this.index) - }; - } - - /** - * Gobbles only identifiers - * e.g.: `foo`, `_value`, `$x1` - * Also, this function checks if that identifier is a literal: - * (e.g. `true`, `false`, `null`) or `this` - * @returns {jsep.Identifier} - */ - gobbleIdentifier() { - let ch = this.code, - start = this.index; - if (Jsep.isIdentifierStart(ch)) { - this.index++; - } else { - this.throwError('Unexpected ' + this.char); - } - while (this.index < this.expr.length) { - ch = this.code; - if (Jsep.isIdentifierPart(ch)) { - this.index++; - } else { - break; - } - } - return { - type: Jsep.IDENTIFIER, - name: this.expr.slice(start, this.index) - }; - } - - /** - * Gobbles a list of arguments within the context of a function call - * or array literal. This function also assumes that the opening character - * `(` or `[` has already been gobbled, and gobbles expressions and commas - * until the terminator character `)` or `]` is encountered. - * e.g. `foo(bar, baz)`, `my_func()`, or `[bar, baz]` - * @param {number} termination - * @returns {jsep.Expression[]} - */ - gobbleArguments(termination) { - const args = []; - let closed = false; - let separator_count = 0; - while (this.index < this.expr.length) { - this.gobbleSpaces(); - let ch_i = this.code; - if (ch_i === termination) { - // done parsing - closed = true; - this.index++; - if (termination === Jsep.CPAREN_CODE && separator_count && separator_count >= args.length) { - this.throwError('Unexpected token ' + String.fromCharCode(termination)); - } - break; - } else if (ch_i === Jsep.COMMA_CODE) { - // between expressions - this.index++; - separator_count++; - if (separator_count !== args.length) { - // missing argument - if (termination === Jsep.CPAREN_CODE) { - this.throwError('Unexpected token ,'); - } else if (termination === Jsep.CBRACK_CODE) { - for (let arg = args.length; arg < separator_count; arg++) { - args.push(null); - } - } - } - } else if (args.length !== separator_count && separator_count !== 0) { - // NOTE: `&& separator_count !== 0` allows for either all commas, or all spaces as arguments - this.throwError('Expected comma'); - } else { - const node = this.gobbleExpression(); - if (!node || node.type === Jsep.COMPOUND) { - this.throwError('Expected comma'); - } - args.push(node); - } - } - if (!closed) { - this.throwError('Expected ' + String.fromCharCode(termination)); - } - return args; - } - - /** - * Responsible for parsing a group of things within parentheses `()` - * that have no identifier in front (so not a function call) - * This function assumes that it needs to gobble the opening parenthesis - * and then tries to gobble everything within that parenthesis, assuming - * that the next thing it should see is the close parenthesis. If not, - * then the expression probably doesn't have a `)` - * @returns {boolean|jsep.Expression} - */ - gobbleGroup() { - this.index++; - let nodes = this.gobbleExpressions(Jsep.CPAREN_CODE); - if (this.code === Jsep.CPAREN_CODE) { - this.index++; - if (nodes.length === 1) { - return nodes[0]; - } else if (!nodes.length) { - return false; - } else { - return { - type: Jsep.SEQUENCE_EXP, - expressions: nodes - }; - } - } else { - this.throwError('Unclosed ('); - } - } - - /** - * Responsible for parsing Array literals `[1, 2, 3]` - * This function assumes that it needs to gobble the opening bracket - * and then tries to gobble the expressions as arguments. - * @returns {jsep.ArrayExpression} - */ - gobbleArray() { - this.index++; - return { - type: Jsep.ARRAY_EXP, - elements: this.gobbleArguments(Jsep.CBRACK_CODE) - }; - } -} - -// Static fields: -const hooks = new Hooks(); -Object.assign(Jsep, { - hooks, - plugins: new Plugins(Jsep), - // Node Types - // ---------- - // This is the full set of types that any JSEP node can be. - // Store them here to save space when minified - COMPOUND: 'Compound', - SEQUENCE_EXP: 'SequenceExpression', - IDENTIFIER: 'Identifier', - MEMBER_EXP: 'MemberExpression', - LITERAL: 'Literal', - THIS_EXP: 'ThisExpression', - CALL_EXP: 'CallExpression', - UNARY_EXP: 'UnaryExpression', - BINARY_EXP: 'BinaryExpression', - ARRAY_EXP: 'ArrayExpression', - TAB_CODE: 9, - LF_CODE: 10, - CR_CODE: 13, - SPACE_CODE: 32, - PERIOD_CODE: 46, - // '.' - COMMA_CODE: 44, - // ',' - SQUOTE_CODE: 39, - // single quote - DQUOTE_CODE: 34, - // double quotes - OPAREN_CODE: 40, - // ( - CPAREN_CODE: 41, - // ) - OBRACK_CODE: 91, - // [ - CBRACK_CODE: 93, - // ] - QUMARK_CODE: 63, - // ? - SEMCOL_CODE: 59, - // ; - COLON_CODE: 58, - // : - - // Operations - // ---------- - // Use a quickly-accessible map to store all of the unary operators - // Values are set to `1` (it really doesn't matter) - unary_ops: { - '-': 1, - '!': 1, - '~': 1, - '+': 1 - }, - // Also use a map for the binary operations but set their values to their - // binary precedence for quick reference (higher number = higher precedence) - // see [Order of operations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence) - binary_ops: { - '||': 1, - '??': 1, - '&&': 2, - '|': 3, - '^': 4, - '&': 5, - '==': 6, - '!=': 6, - '===': 6, - '!==': 6, - '<': 7, - '>': 7, - '<=': 7, - '>=': 7, - '<<': 8, - '>>': 8, - '>>>': 8, - '+': 9, - '-': 9, - '*': 10, - '/': 10, - '%': 10, - '**': 11 - }, - // sets specific binary_ops as right-associative - right_associative: new Set(['**']), - // Additional valid identifier chars, apart from a-z, A-Z and 0-9 (except on the starting char) - additional_identifier_chars: new Set(['$', '_']), - // Literals - // ---------- - // Store the values to return for the various literals we may encounter - literals: { - 'true': true, - 'false': false, - 'null': null - }, - // Except for `this`, which is special. This could be changed to something like `'self'` as well - this_str: 'this' -}); -Jsep.max_unop_len = Jsep.getMaxKeyLen(Jsep.unary_ops); -Jsep.max_binop_len = Jsep.getMaxKeyLen(Jsep.binary_ops); - -// Backward Compatibility: -const jsep = expr => new Jsep(expr).parse(); -const stdClassProps = Object.getOwnPropertyNames(class Test {}); -Object.getOwnPropertyNames(Jsep).filter(prop => !stdClassProps.includes(prop) && jsep[prop] === undefined).forEach(m => { - jsep[m] = Jsep[m]; -}); -jsep.Jsep = Jsep; // allows for const { Jsep } = require('jsep'); - -const CONDITIONAL_EXP = 'ConditionalExpression'; -var ternary = { - name: 'ternary', - init(jsep) { - // Ternary expression: test ? consequent : alternate - jsep.hooks.add('after-expression', function gobbleTernary(env) { - if (env.node && this.code === jsep.QUMARK_CODE) { - this.index++; - const test = env.node; - const consequent = this.gobbleExpression(); - if (!consequent) { - this.throwError('Expected expression'); - } - this.gobbleSpaces(); - if (this.code === jsep.COLON_CODE) { - this.index++; - const alternate = this.gobbleExpression(); - if (!alternate) { - this.throwError('Expected expression'); - } - env.node = { - type: CONDITIONAL_EXP, - test, - consequent, - alternate - }; - - // check for operators of higher priority than ternary (i.e. assignment) - // jsep sets || at 1, and assignment at 0.9, and conditional should be between them - if (test.operator && jsep.binary_ops[test.operator] <= 0.9) { - let newTest = test; - while (newTest.right.operator && jsep.binary_ops[newTest.right.operator] <= 0.9) { - newTest = newTest.right; - } - env.node.test = newTest.right; - newTest.right = env.node; - env.node = test; - } - } else { - this.throwError('Expected :'); - } - } - }); - } -}; - -// Add default plugins: - -jsep.plugins.register(ternary); - -const FSLASH_CODE = 47; // '/' -const BSLASH_CODE = 92; // '\\' - -var index = { - name: 'regex', - init(jsep) { - // Regex literal: /abc123/ig - jsep.hooks.add('gobble-token', function gobbleRegexLiteral(env) { - if (this.code === FSLASH_CODE) { - const patternIndex = ++this.index; - let inCharSet = false; - while (this.index < this.expr.length) { - if (this.code === FSLASH_CODE && !inCharSet) { - const pattern = this.expr.slice(patternIndex, this.index); - let flags = ''; - while (++this.index < this.expr.length) { - const code = this.code; - if (code >= 97 && code <= 122 // a...z - || code >= 65 && code <= 90 // A...Z - || code >= 48 && code <= 57) { - // 0-9 - flags += this.char; - } else { - break; - } - } - let value; - try { - value = new RegExp(pattern, flags); - } catch (e) { - this.throwError(e.message); - } - env.node = { - type: jsep.LITERAL, - value, - raw: this.expr.slice(patternIndex - 1, this.index) - }; - - // allow . [] and () after regex: /regex/.test(a) - env.node = this.gobbleTokenProperty(env.node); - return env.node; - } - if (this.code === jsep.OBRACK_CODE) { - inCharSet = true; - } else if (inCharSet && this.code === jsep.CBRACK_CODE) { - inCharSet = false; - } - this.index += this.code === BSLASH_CODE ? 2 : 1; - } - this.throwError('Unclosed Regex'); - } - }); - } -}; - -const PLUS_CODE = 43; // + -const MINUS_CODE = 45; // - - -const plugin = { - name: 'assignment', - assignmentOperators: new Set(['=', '*=', '**=', '/=', '%=', '+=', '-=', '<<=', '>>=', '>>>=', '&=', '^=', '|=', '||=', '&&=', '??=']), - updateOperators: [PLUS_CODE, MINUS_CODE], - assignmentPrecedence: 0.9, - init(jsep) { - const updateNodeTypes = [jsep.IDENTIFIER, jsep.MEMBER_EXP]; - plugin.assignmentOperators.forEach(op => jsep.addBinaryOp(op, plugin.assignmentPrecedence, true)); - jsep.hooks.add('gobble-token', function gobbleUpdatePrefix(env) { - const code = this.code; - if (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) { - this.index += 2; - env.node = { - type: 'UpdateExpression', - operator: code === PLUS_CODE ? '++' : '--', - argument: this.gobbleTokenProperty(this.gobbleIdentifier()), - prefix: true - }; - if (!env.node.argument || !updateNodeTypes.includes(env.node.argument.type)) { - this.throwError(`Unexpected ${env.node.operator}`); - } - } - }); - jsep.hooks.add('after-token', function gobbleUpdatePostfix(env) { - if (env.node) { - const code = this.code; - if (plugin.updateOperators.some(c => c === code && c === this.expr.charCodeAt(this.index + 1))) { - if (!updateNodeTypes.includes(env.node.type)) { - this.throwError(`Unexpected ${env.node.operator}`); - } - this.index += 2; - env.node = { - type: 'UpdateExpression', - operator: code === PLUS_CODE ? '++' : '--', - argument: env.node, - prefix: false - }; - } - } - }); - jsep.hooks.add('after-expression', function gobbleAssignment(env) { - if (env.node) { - // Note: Binaries can be chained in a single expression to respect - // operator precedence (i.e. a = b = 1 + 2 + 3) - // Update all binary assignment nodes in the tree - updateBinariesToAssignments(env.node); - } - }); - function updateBinariesToAssignments(node) { - if (plugin.assignmentOperators.has(node.operator)) { - node.type = 'AssignmentExpression'; - updateBinariesToAssignments(node.left); - updateBinariesToAssignments(node.right); - } else if (!node.operator) { - Object.values(node).forEach(val => { - if (val && typeof val === 'object') { - updateBinariesToAssignments(val); - } - }); - } - } - } -}; - -/* eslint-disable no-bitwise -- Convenient */ - -// register plugins -jsep.plugins.register(index, plugin); -jsep.addUnaryOp('typeof'); -jsep.addLiteral('null', null); -jsep.addLiteral('undefined', undefined); -const BLOCKED_PROTO_PROPERTIES = new Set(['constructor', '__proto__', '__defineGetter__', '__defineSetter__']); -const SafeEval = { - /** - * @param {jsep.Expression} ast - * @param {Record} subs - */ - evalAst(ast, subs) { - switch (ast.type) { - case 'BinaryExpression': - case 'LogicalExpression': - return SafeEval.evalBinaryExpression(ast, subs); - case 'Compound': - return SafeEval.evalCompound(ast, subs); - case 'ConditionalExpression': - return SafeEval.evalConditionalExpression(ast, subs); - case 'Identifier': - return SafeEval.evalIdentifier(ast, subs); - case 'Literal': - return SafeEval.evalLiteral(ast, subs); - case 'MemberExpression': - return SafeEval.evalMemberExpression(ast, subs); - case 'UnaryExpression': - return SafeEval.evalUnaryExpression(ast, subs); - case 'ArrayExpression': - return SafeEval.evalArrayExpression(ast, subs); - case 'CallExpression': - return SafeEval.evalCallExpression(ast, subs); - case 'AssignmentExpression': - return SafeEval.evalAssignmentExpression(ast, subs); - default: - throw SyntaxError('Unexpected expression', ast); - } - }, - evalBinaryExpression(ast, subs) { - const result = { - '||': (a, b) => a || b(), - '&&': (a, b) => a && b(), - '|': (a, b) => a | b(), - '^': (a, b) => a ^ b(), - '&': (a, b) => a & b(), - // eslint-disable-next-line eqeqeq -- API - '==': (a, b) => a == b(), - // eslint-disable-next-line eqeqeq -- API - '!=': (a, b) => a != b(), - '===': (a, b) => a === b(), - '!==': (a, b) => a !== b(), - '<': (a, b) => a < b(), - '>': (a, b) => a > b(), - '<=': (a, b) => a <= b(), - '>=': (a, b) => a >= b(), - '<<': (a, b) => a << b(), - '>>': (a, b) => a >> b(), - '>>>': (a, b) => a >>> b(), - '+': (a, b) => a + b(), - '-': (a, b) => a - b(), - '*': (a, b) => a * b(), - '/': (a, b) => a / b(), - '%': (a, b) => a % b() - }[ast.operator](SafeEval.evalAst(ast.left, subs), () => SafeEval.evalAst(ast.right, subs)); - return result; - }, - evalCompound(ast, subs) { - let last; - for (let i = 0; i < ast.body.length; i++) { - if (ast.body[i].type === 'Identifier' && ['var', 'let', 'const'].includes(ast.body[i].name) && ast.body[i + 1] && ast.body[i + 1].type === 'AssignmentExpression') { - // var x=2; is detected as - // [{Identifier var}, {AssignmentExpression x=2}] - // eslint-disable-next-line @stylistic/max-len -- Long - // eslint-disable-next-line sonarjs/updated-loop-counter -- Convenient - i += 1; - } - const expr = ast.body[i]; - last = SafeEval.evalAst(expr, subs); - } - return last; - }, - evalConditionalExpression(ast, subs) { - if (SafeEval.evalAst(ast.test, subs)) { - return SafeEval.evalAst(ast.consequent, subs); - } - return SafeEval.evalAst(ast.alternate, subs); - }, - evalIdentifier(ast, subs) { - if (Object.hasOwn(subs, ast.name)) { - return subs[ast.name]; - } - throw ReferenceError(`${ast.name} is not defined`); - }, - evalLiteral(ast) { - return ast.value; - }, - evalMemberExpression(ast, subs) { - const prop = ast.computed ? SafeEval.evalAst(ast.property) // `object[property]` - : ast.property.name; // `object.property` property is Identifier - const obj = SafeEval.evalAst(ast.object, subs); - if (obj === undefined || obj === null) { - throw TypeError(`Cannot read properties of ${obj} (reading '${prop}')`); - } - if (!Object.hasOwn(obj, prop) && BLOCKED_PROTO_PROPERTIES.has(prop)) { - throw TypeError(`Cannot read properties of ${obj} (reading '${prop}')`); - } - const result = obj[prop]; - if (typeof result === 'function') { - return result.bind(obj); // arrow functions aren't affected by bind. - } - return result; - }, - evalUnaryExpression(ast, subs) { - const result = { - '-': a => -SafeEval.evalAst(a, subs), - '!': a => !SafeEval.evalAst(a, subs), - '~': a => ~SafeEval.evalAst(a, subs), - // eslint-disable-next-line no-implicit-coercion -- API - '+': a => +SafeEval.evalAst(a, subs), - typeof: a => typeof SafeEval.evalAst(a, subs) - }[ast.operator](ast.argument); - return result; - }, - evalArrayExpression(ast, subs) { - return ast.elements.map(el => SafeEval.evalAst(el, subs)); - }, - evalCallExpression(ast, subs) { - const args = ast.arguments.map(arg => SafeEval.evalAst(arg, subs)); - const func = SafeEval.evalAst(ast.callee, subs); - // if (func === Function) { - // throw new Error('Function constructor is disabled'); - // } - return func(...args); - }, - evalAssignmentExpression(ast, subs) { - if (ast.left.type !== 'Identifier') { - throw SyntaxError('Invalid left-hand side in assignment'); - } - const id = ast.left.name; - const value = SafeEval.evalAst(ast.right, subs); - subs[id] = value; - return subs[id]; - } -}; - -/** - * A replacement for NodeJS' VM.Script which is also {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | Content Security Policy} friendly. - */ -class SafeScript { - /** - * @param {string} expr Expression to evaluate - */ - constructor(expr) { - this.code = expr; - this.ast = jsep(this.code); - } - - /** - * @param {object} context Object whose items will be added - * to evaluation - * @returns {EvaluatedResult} Result of evaluated code - */ - runInNewContext(context) { - // `Object.create(null)` creates a prototypeless object - const keyMap = Object.assign(Object.create(null), context); - return SafeEval.evalAst(this.ast, keyMap); - } -} - -/* eslint-disable camelcase -- Convenient for escaping */ - - -/** - * @typedef {null|boolean|number|string|object|GenericArray} JSONObject - */ - -/** - * @typedef {any} AnyItem - */ - -/** - * @typedef {any} AnyResult - */ - -/** - * Copies array and then pushes item into it. - * @param {GenericArray} arr Array to copy and into which to push - * @param {AnyItem} item Array item to add (to end) - * @returns {GenericArray} 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 {AnyItem} item Array item to add (to beginning) - * @param {GenericArray} arr Array to copy and into which to unshift - * @returns {GenericArray} 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 - */ -class NewError extends Error { - /** - * @param {AnyResult} value The evaluated scalar value - */ - constructor(value) { - super('JSONPath should not be called with "new" (it prevents return ' + 'of (unwrapped) scalar values)'); - this.avoidNew = true; - this.value = value; - this.name = 'NewError'; - } -} - -/** -* @typedef {object} ReturnObject -* @property {string} path -* @property {JSONObject} value -* @property {object|GenericArray} parent -* @property {string} parentProperty -*/ - -/** -* @callback JSONPathCallback -* @param {string|object} preferredOutput -* @param {"value"|"property"} type -* @param {ReturnObject} fullRetObj -* @returns {void} -*/ - -/** -* @callback OtherTypeCallback -* @param {JSONObject} val -* @param {string} path -* @param {object|GenericArray} parent -* @param {string} parentPropName -* @returns {boolean} -*/ - -/** - * @typedef {any} ContextItem - */ - -/** - * @typedef {any} EvaluatedResult - */ - -/** -* @callback EvalCallback -* @param {string} code -* @param {ContextItem} context -* @returns {EvaluatedResult} -*/ - -/** - * @typedef {typeof SafeScript} EvalClass - */ - -/** - * @typedef {object} JSONPathOptions - * @property {JSON} json - * @property {string|string[]} path - * @property {"value"|"path"|"pointer"|"parent"|"parentProperty"| - * "all"} [resultType="value"] - * @property {boolean} [flatten=false] - * @property {boolean} [wrap=true] - * @property {object} [sandbox={}] - * @property {EvalCallback|EvalClass|'safe'|'native'| - * boolean} [eval = 'safe'] - * @property {object|GenericArray|null} [parent=null] - * @property {string|null} [parentProperty=null] - * @property {JSONPathCallback} [callback] - * @property {OtherTypeCallback} [otherTypeCallback] Defaults to - * function which throws on encountering `@other` - * @property {boolean} [autostart=true] - */ - -/** - * @param {string|JSONPathOptions} opts If a string, will be treated as `expr` - * @param {string} [expr] JSON path to evaluate - * @param {JSON} [obj] JSON object to evaluate against - * @param {JSONPathCallback} [callback] Passed 3 arguments: 1) desired payload - * per `resultType`, 2) `"value"|"property"`, 3) Full returned object with - * all payloads - * @param {OtherTypeCallback} [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 -- Allow for pseudo-class - 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 = null; - } - const optObj = opts && typeof opts === 'object'; - opts = opts || {}; - this.json = opts.json || obj; - this.path = opts.path || expr; - this.resultType = opts.resultType || 'value'; - this.flatten = opts.flatten || false; - this.wrap = Object.hasOwn(opts, 'wrap') ? opts.wrap : true; - this.sandbox = opts.sandbox || {}; - this.eval = opts.eval === undefined ? 'safe' : opts.eval; - this.ignoreEvalErrors = typeof opts.ignoreEvalErrors === 'undefined' ? false : opts.ignoreEvalErrors; - this.parent = opts.parent || null; - this.parentProperty = opts.parentProperty || null; - this.callback = opts.callback || callback || null; - this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function () { - throw new TypeError('You must supply an otherTypeCallback callback option ' + 'with the @other() operator.'); - }; - if (opts.autostart !== false) { - const args = { - path: optObj ? opts.path : expr - }; - if (!optObj) { - args.json = obj; - } else if ('json' in opts) { - args.json = opts.json; - } - const ret = this.evaluate(args); - if (!ret || typeof ret !== 'object') { - throw new NewError(ret); - } - return ret; - } -} - -// PUBLIC METHODS -JSONPath.prototype.evaluate = function (expr, json, callback, otherTypeCallback) { - let currParent = this.parent, - currParentProperty = this.parentProperty; - let { - flatten, - wrap - } = this; - this.currResultType = this.resultType; - this.currEval = this.eval; - 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' && !Array.isArray(expr)) { - if (!expr.path && expr.path !== '') { - throw new TypeError('You must supply a "path" property when providing an object ' + 'argument to JSONPath.evaluate().'); - } - if (!Object.hasOwn(expr, 'json')) { - throw new TypeError('You must supply a "json" property when providing an object ' + 'argument to JSONPath.evaluate().'); - } - ({ - json - } = expr); - flatten = Object.hasOwn(expr, 'flatten') ? expr.flatten : flatten; - this.currResultType = Object.hasOwn(expr, 'resultType') ? expr.resultType : this.currResultType; - this.currSandbox = Object.hasOwn(expr, 'sandbox') ? expr.sandbox : this.currSandbox; - wrap = Object.hasOwn(expr, 'wrap') ? expr.wrap : wrap; - this.currEval = Object.hasOwn(expr, 'eval') ? expr.eval : this.currEval; - callback = Object.hasOwn(expr, 'callback') ? expr.callback : callback; - this.currOtherTypeCallback = Object.hasOwn(expr, 'otherTypeCallback') ? expr.otherTypeCallback : this.currOtherTypeCallback; - currParent = Object.hasOwn(expr, 'parent') ? expr.parent : currParent; - currParentProperty = Object.hasOwn(expr, 'parentProperty') ? expr.parentProperty : currParentProperty; - expr = expr.path; - } - currParent = currParent || null; - currParentProperty = currParentProperty || null; - if (Array.isArray(expr)) { - expr = JSONPath.toPathString(expr); - } - if (!expr && expr !== '' || !json) { - return undefined; - } - const exprList = JSONPath.toPathArray(expr); - if (exprList[0] === '$' && exprList.length > 1) { - exprList.shift(); - } - this._hasParentSelector = null; - const result = this._trace(exprList, json, ['$'], currParent, currParentProperty, callback).filter(function (ea) { - return ea && !ea.isParentSelector; - }); - if (!result.length) { - return wrap ? [] : undefined; - } - if (!wrap && result.length === 1 && !result[0].hasArrExpr) { - return this._getPreferredOutput(result[0]); - } - return result.reduce((rslt, ea) => { - const valOrPath = this._getPreferredOutput(ea); - if (flatten && Array.isArray(valOrPath)) { - rslt = rslt.concat(valOrPath); - } else { - rslt.push(valOrPath); - } - return rslt; - }, []); -}; - -// PRIVATE METHODS - -JSONPath.prototype._getPreferredOutput = function (ea) { - const resultType = this.currResultType; - switch (resultType) { - case 'all': - { - const path = Array.isArray(ea.path) ? ea.path : JSONPath.toPathArray(ea.path); - ea.pointer = JSONPath.toPointer(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); - default: - throw new TypeError('Unknown result type'); - } -}; -JSONPath.prototype._handleCallback = function (fullRetObj, callback, type) { - if (callback) { - const preferredOutput = this._getPreferredOutput(fullRetObj); - fullRetObj.path = typeof fullRetObj.path === 'string' ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); - // eslint-disable-next-line n/callback-return -- No need to return - callback(preferredOutput, type, fullRetObj); - } -}; - -/** - * - * @param {string} expr - * @param {JSONObject} val - * @param {string} path - * @param {object|GenericArray} parent - * @param {string} parentPropName - * @param {JSONPathCallback} callback - * @param {boolean} hasArrExpr - * @param {boolean} literalPriority - * @returns {ReturnObject|ReturnObject[]} - */ -JSONPath.prototype._trace = function (expr, val, path, parent, parentPropName, callback, hasArrExpr, literalPriority) { - // No expr to follow? return path and value as the result of - // this trace branch - let retObj; - if (!expr.length) { - retObj = { - path, - value: val, - parent, - parentProperty: parentPropName, - hasArrExpr - }; - this._handleCallback(retObj, callback, 'value'); - return retObj; - } - const 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. - const ret = []; - /** - * - * @param {ReturnObject|ReturnObject[]} elems - * @returns {void} - */ - 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(t => { - ret.push(t); - }); - } else { - ret.push(elems); - } - } - if ((typeof loc !== 'string' || literalPriority) && val && Object.hasOwn(val, loc)) { - // simple case--directly follow property - addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr)); - // eslint-disable-next-line unicorn/prefer-switch -- Part of larger `if` - } else if (loc === '*') { - // all child properties - this._walk(val, m => { - addRet(this._trace(x, val[m], push(path, m), val, m, callback, true, true)); - }); - } else if (loc === '..') { - // all descendent parent properties - // Check remaining expression with val's immediate children - addRet(this._trace(x, val, path, parent, parentPropName, callback, hasArrExpr)); - this._walk(val, m => { - // We don't join m and x here because we only want parents, - // not scalar values - if (typeof val[m] === 'object') { - // Keep going with recursive descent on val's - // object children - addRet(this._trace(expr.slice(), val[m], push(path, m), val, m, callback, true)); - } - }); - // 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: path.slice(0, -1), - expr: x, - isParentSelector: true - }; - } else if (loc === '~') { - // property name - retObj = { - path: push(path, loc), - value: parentPropName, - parent, - parentProperty: null - }; - this._handleCallback(retObj, callback, 'property'); - return retObj; - } else if (loc === '$') { - // root only - addRet(this._trace(x, val, path, null, null, callback, hasArrExpr)); - } else if (/^(-?\d*):(-?\d*):?(\d*)$/u.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.currEval === false) { - throw new Error('Eval [?(expr)] prevented in JSONPath expression.'); - } - const safeLoc = loc.replace(/^\?\((.*?)\)$/u, '$1'); - // check for a nested filter expression - const nested = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(safeLoc); - if (nested) { - // find if there are matches in the nested expression - // add them to the result set if there is at least one match - this._walk(val, m => { - const npath = [nested[2]]; - const nvalue = nested[1] ? val[m][nested[1]] : val[m]; - const filterResults = this._trace(npath, nvalue, path, parent, parentPropName, callback, true); - if (filterResults.length > 0) { - addRet(this._trace(x, val[m], push(path, m), val, m, callback, true)); - } - }); - } else { - this._walk(val, m => { - if (this._eval(safeLoc, val[m], m, path, parent, parentPropName)) { - addRet(this._trace(x, val[m], push(path, m), val, m, callback, true)); - } - }); - } - } else if (loc[0] === '(') { - // [(expr)] (dynamic property/index) - if (this.currEval === false) { - 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.at(-1), path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback, hasArrExpr)); - } else if (loc[0] === '@') { - // value type: @boolean(), etc. - let addType = false; - const valueType = loc.slice(1, -2); - switch (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) { - addType = true; - } - break; - case 'integer': - if (Number.isFinite(val) && !(val % 1)) { - addType = true; - } - break; - case 'number': - if (Number.isFinite(val)) { - addType = true; - } - break; - case 'nonFinite': - if (typeof val === 'number' && !Number.isFinite(val)) { - addType = true; - } - break; - case 'object': - if (val && typeof val === valueType) { - addType = true; - } - break; - case 'array': - if (Array.isArray(val)) { - addType = true; - } - break; - case 'other': - addType = this.currOtherTypeCallback(val, path, parent, parentPropName); - break; - case 'null': - if (val === null) { - addType = true; - } - break; - /* c8 ignore next 2 */ - default: - throw new TypeError('Unknown value type ' + valueType); - } - if (addType) { - retObj = { - path, - value: val, - parent, - parentProperty: parentPropName - }; - this._handleCallback(retObj, callback, 'value'); - return retObj; - } - // `-escaped property - } else if (loc[0] === '`' && val && Object.hasOwn(val, loc.slice(1))) { - const locProp = loc.slice(1); - addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, hasArrExpr, true)); - } else if (loc.includes(',')) { - // [name1,name2,...] - const parts = loc.split(','); - for (const part of parts) { - addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback, true)); - } - // simple case--directly follow property - } else if (!literalPriority && val && Object.hasOwn(val, loc)) { - addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr, 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) { - for (let t = 0; t < ret.length; t++) { - const rett = ret[t]; - if (rett && rett.isParentSelector) { - const tmp = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr); - if (Array.isArray(tmp)) { - ret[t] = tmp[0]; - const tl = tmp.length; - for (let tt = 1; tt < tl; tt++) { - // eslint-disable-next-line @stylistic/max-len -- Long - // eslint-disable-next-line sonarjs/updated-loop-counter -- Convenient - t++; - ret.splice(t, 0, tmp[tt]); - } - } else { - ret[t] = tmp; - } - } - } - } - return ret; -}; -JSONPath.prototype._walk = function (val, f) { - if (Array.isArray(val)) { - const n = val.length; - for (let i = 0; i < n; i++) { - f(i); - } - } else if (val && typeof val === 'object') { - Object.keys(val).forEach(m => { - f(m); - }); - } -}; -JSONPath.prototype._slice = function (loc, expr, val, path, parent, parentPropName, callback) { - if (!Array.isArray(val)) { - return undefined; - } - const len = val.length, - parts = loc.split(':'), - step = parts[2] && Number.parseInt(parts[2]) || 1; - let start = parts[0] && Number.parseInt(parts[0]) || 0, - end = parts[1] && Number.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); - const ret = []; - for (let i = start; i < end; i += step) { - const tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback, true); - // Should only be possible to be an array here since first part of - // ``unshift(i, expr)` passed in above would not be empty, nor `~`, - // nor begin with `@` (as could return objects) - // This was causing excessive stack size in Node (with or - // without Babel) against our performance test: `ret.push(...tmp);` - tmp.forEach(t => { - ret.push(t); - }); - } - return ret; -}; -JSONPath.prototype._eval = function (code, _v, _vname, path, parent, parentPropName) { - this.currSandbox._$_parentProperty = parentPropName; - this.currSandbox._$_parent = parent; - this.currSandbox._$_property = _vname; - this.currSandbox._$_root = this.json; - this.currSandbox._$_v = _v; - const containsPath = code.includes('@path'); - if (containsPath) { - this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname])); - } - const scriptCacheKey = this.currEval + 'Script:' + code; - if (!JSONPath.cache[scriptCacheKey]) { - let script = code.replaceAll('@parentProperty', '_$_parentProperty').replaceAll('@parent', '_$_parent').replaceAll('@property', '_$_property').replaceAll('@root', '_$_root').replaceAll(/@([.\s)[])/gu, '_$_v$1'); - if (containsPath) { - script = script.replaceAll('@path', '_$_path'); - } - if (this.currEval === 'safe' || this.currEval === true || this.currEval === undefined) { - JSONPath.cache[scriptCacheKey] = new this.safeVm.Script(script); - } else if (this.currEval === 'native') { - JSONPath.cache[scriptCacheKey] = new this.vm.Script(script); - } else if (typeof this.currEval === 'function' && this.currEval.prototype && Object.hasOwn(this.currEval.prototype, 'runInNewContext')) { - const CurrEval = this.currEval; - JSONPath.cache[scriptCacheKey] = new CurrEval(script); - } else if (typeof this.currEval === 'function') { - JSONPath.cache[scriptCacheKey] = { - runInNewContext: context => this.currEval(script, context) - }; - } else { - throw new TypeError(`Unknown "eval" property "${this.currEval}"`); - } - } - try { - return JSONPath.cache[scriptCacheKey].runInNewContext(this.currSandbox); - } catch (e) { - if (this.ignoreEvalErrors) { - return false; - } - 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) { - const x = pathArr, - n = x.length; - let p = '$'; - for (let i = 1; i < n; i++) { - if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) { - p += /^[0-9*]+$/u.test(x[i]) ? '[' + x[i] + ']' : "['" + x[i] + "']"; - } - } - return p; -}; - -/** - * @param {string} pointer JSON Path - * @returns {string} JSON Pointer - */ -JSONPath.toPointer = function (pointer) { - const x = pointer, - n = x.length; - let p = ''; - for (let i = 1; i < n; i++) { - if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) { - p += '/' + x[i].toString().replaceAll('~', '~0').replaceAll('/', '~1'); - } - } - return p; -}; - -/** - * @param {string} expr Expression to convert - * @returns {string[]} - */ -JSONPath.toPathArray = function (expr) { - const { - cache - } = JSONPath; - if (cache[expr]) { - return cache[expr].concat(); - } - const subx = []; - const normalized = expr - // Properties - .replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ';$&;') - // Parenthetical evaluations (filtering and otherwise), directly - // within brackets or single quotes - .replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu, function ($0, $1) { - return '[#' + (subx.push($1) - 1) + ']'; - }) - // Escape periods and tildes within properties - .replaceAll(/\[['"]([^'\]]*)['"]\]/gu, function ($0, prop) { - return "['" + prop.replaceAll('.', '%@%').replaceAll('~', '%%@@%%') + "']"; - }) - // Properties operator - .replaceAll('~', ';~;') - // Split by property boundaries - .replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ';') - // Reinsert periods within properties - .replaceAll('%@%', '.') - // Reinsert tildes within properties - .replaceAll('%%@@%%', '~') - // Parent - .replaceAll(/(?:;)?(\^+)(?:;)?/gu, function ($0, ups) { - return ';' + ups.split('').join(';') + ';'; - }) - // Descendents - .replaceAll(/;;;|;;/gu, ';..;') - // Remove trailing - .replaceAll(/;$|'?\]|'$/gu, ''); - const exprList = normalized.split(';').map(function (exp) { - const match = exp.match(/#(\d+)/u); - return !match || !match[1] ? exp : subx[match[1]]; - }); - cache[expr] = exprList; - return cache[expr].concat(); -}; -JSONPath.prototype.safeVm = { - Script: SafeScript -}; - -JSONPath.prototype.vm = vm; - -exports.JSONPath = JSONPath; - - -/***/ }), - -/***/ 97178: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -"use strict"; -// ESM COMPAT FLAG -__nccwpck_require__.r(__webpack_exports__); - -// EXPORTS -__nccwpck_require__.d(__webpack_exports__, { - "AuthorizationResponseError": () => (/* reexport */ AuthorizationResponseError), - "ClientError": () => (/* binding */ ClientError), - "ClientSecretBasic": () => (/* binding */ build_ClientSecretBasic), - "ClientSecretJwt": () => (/* binding */ build_ClientSecretJwt), - "ClientSecretPost": () => (/* binding */ build_ClientSecretPost), - "Configuration": () => (/* binding */ Configuration), - "None": () => (/* binding */ build_None), - "PrivateKeyJwt": () => (/* binding */ build_PrivateKeyJwt), - "ResponseBodyError": () => (/* reexport */ ResponseBodyError), - "TlsClientAuth": () => (/* binding */ build_TlsClientAuth), - "WWWAuthenticateChallengeError": () => (/* reexport */ WWWAuthenticateChallengeError), - "allowInsecureRequests": () => (/* binding */ build_allowInsecureRequests), - "authorizationCodeGrant": () => (/* binding */ authorizationCodeGrant), - "buildAuthorizationUrl": () => (/* binding */ buildAuthorizationUrl), - "buildAuthorizationUrlWithJAR": () => (/* binding */ buildAuthorizationUrlWithJAR), - "buildAuthorizationUrlWithPAR": () => (/* binding */ buildAuthorizationUrlWithPAR), - "buildEndSessionUrl": () => (/* binding */ buildEndSessionUrl), - "calculatePKCECodeChallenge": () => (/* binding */ build_calculatePKCECodeChallenge), - "clientCredentialsGrant": () => (/* binding */ clientCredentialsGrant), - "clockSkew": () => (/* binding */ build_clockSkew), - "clockTolerance": () => (/* binding */ build_clockTolerance), - "customFetch": () => (/* binding */ build_customFetch), - "discovery": () => (/* binding */ discovery), - "enableDecryptingResponses": () => (/* binding */ enableDecryptingResponses), - "enableDetachedSignatureResponseChecks": () => (/* binding */ enableDetachedSignatureResponseChecks), - "enableNonRepudiationChecks": () => (/* binding */ enableNonRepudiationChecks), - "fetchProtectedResource": () => (/* binding */ fetchProtectedResource), - "fetchUserInfo": () => (/* binding */ fetchUserInfo), - "genericGrantRequest": () => (/* binding */ genericGrantRequest), - "getDPoPHandle": () => (/* binding */ getDPoPHandle), - "getJwksCache": () => (/* binding */ getJwksCache), - "initiateDeviceAuthorization": () => (/* binding */ initiateDeviceAuthorization), - "modifyAssertion": () => (/* binding */ build_modifyAssertion), - "pollDeviceAuthorizationGrant": () => (/* binding */ pollDeviceAuthorizationGrant), - "randomDPoPKeyPair": () => (/* binding */ randomDPoPKeyPair), - "randomNonce": () => (/* binding */ randomNonce), - "randomPKCECodeVerifier": () => (/* binding */ randomPKCECodeVerifier), - "randomState": () => (/* binding */ randomState), - "refreshTokenGrant": () => (/* binding */ refreshTokenGrant), - "setJwksCache": () => (/* binding */ build_setJwksCache), - "skipStateCheck": () => (/* binding */ build_skipStateCheck), - "skipSubjectCheck": () => (/* binding */ build_skipSubjectCheck), - "tokenIntrospection": () => (/* binding */ tokenIntrospection), - "tokenRevocation": () => (/* binding */ tokenRevocation), - "useCodeIdTokenResponseType": () => (/* binding */ useCodeIdTokenResponseType), - "useJwtResponseMode": () => (/* binding */ useJwtResponseMode) -}); - -;// CONCATENATED MODULE: ./node_modules/oauth4webapi/build/index.js -let USER_AGENT; -if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) { - const NAME = 'oauth4webapi'; - const VERSION = 'v3.1.2'; - USER_AGENT = `${NAME}/${VERSION}`; -} -function looseInstanceOf(input, expected) { - if (input == null) { - return false; - } - try { - return (input instanceof expected || - Object.getPrototypeOf(input)[Symbol.toStringTag] === expected.prototype[Symbol.toStringTag]); - } - catch { - return false; - } -} -const ERR_INVALID_ARG_VALUE = 'ERR_INVALID_ARG_VALUE'; -const ERR_INVALID_ARG_TYPE = 'ERR_INVALID_ARG_TYPE'; -function CodedTypeError(message, code, cause) { - const err = new TypeError(message, { cause }); - Object.assign(err, { code }); - return err; -} -const allowInsecureRequests = Symbol(); -const clockSkew = Symbol(); -const clockTolerance = Symbol(); -const customFetch = Symbol(); -const modifyAssertion = Symbol(); -const jweDecrypt = Symbol(); -const build_jwksCache = Symbol(); -const encoder = new TextEncoder(); -const decoder = new TextDecoder(); -function buf(input) { - if (typeof input === 'string') { - return encoder.encode(input); - } - return decoder.decode(input); -} -const CHUNK_SIZE = 0x8000; -function encodeBase64Url(input) { - if (input instanceof ArrayBuffer) { - input = new Uint8Array(input); - } - const arr = []; - for (let i = 0; i < input.byteLength; i += CHUNK_SIZE) { - arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE))); - } - return btoa(arr.join('')).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); -} -function decodeBase64Url(input) { - try { - const binary = atob(input.replace(/-/g, '+').replace(/_/g, '/').replace(/\s/g, '')); - const bytes = new Uint8Array(binary.length); - for (let i = 0; i < binary.length; i++) { - bytes[i] = binary.charCodeAt(i); - } - return bytes; - } - catch (cause) { - throw CodedTypeError('The input to be decoded is not correctly encoded.', ERR_INVALID_ARG_VALUE, cause); - } -} -function b64u(input) { - if (typeof input === 'string') { - return decodeBase64Url(input); - } - return encodeBase64Url(input); -} -class UnsupportedOperationError extends Error { - code; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - this.code = UNSUPPORTED_OPERATION; - Error.captureStackTrace?.(this, this.constructor); - } -} -class OperationProcessingError extends Error { - code; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - if (options?.code) { - this.code = options?.code; - } - Error.captureStackTrace?.(this, this.constructor); - } -} -function OPE(message, code, cause) { - return new OperationProcessingError(message, { code, cause }); -} -function assertCryptoKey(key, it) { - if (!(key instanceof CryptoKey)) { - throw CodedTypeError(`${it} must be a CryptoKey`, ERR_INVALID_ARG_TYPE); - } -} -function assertPrivateKey(key, it) { - assertCryptoKey(key, it); - if (key.type !== 'private') { - throw CodedTypeError(`${it} must be a private CryptoKey`, ERR_INVALID_ARG_VALUE); - } -} -function assertPublicKey(key, it) { - assertCryptoKey(key, it); - if (key.type !== 'public') { - throw CodedTypeError(`${it} must be a public CryptoKey`, ERR_INVALID_ARG_VALUE); - } -} -function normalizeTyp(value) { - return value.toLowerCase().replace(/^application\//, ''); -} -function isJsonObject(input) { - if (input === null || typeof input !== 'object' || Array.isArray(input)) { - return false; - } - return true; -} -function prepareHeaders(input) { - if (looseInstanceOf(input, Headers)) { - input = Object.fromEntries(input.entries()); - } - const headers = new Headers(input); - if (USER_AGENT && !headers.has('user-agent')) { - headers.set('user-agent', USER_AGENT); - } - if (headers.has('authorization')) { - throw CodedTypeError('"options.headers" must not include the "authorization" header name', ERR_INVALID_ARG_VALUE); - } - if (headers.has('dpop')) { - throw CodedTypeError('"options.headers" must not include the "dpop" header name', ERR_INVALID_ARG_VALUE); - } - return headers; -} -function signal(value) { - if (typeof value === 'function') { - value = value(); - } - if (!(value instanceof AbortSignal)) { - throw CodedTypeError('"options.signal" must return or be an instance of AbortSignal', ERR_INVALID_ARG_TYPE); - } - return value; -} -async function discoveryRequest(issuerIdentifier, options) { - if (!(issuerIdentifier instanceof URL)) { - throw CodedTypeError('"issuerIdentifier" must be an instance of URL', ERR_INVALID_ARG_TYPE); - } - checkProtocol(issuerIdentifier, options?.[allowInsecureRequests] !== true); - const url = new URL(issuerIdentifier.href); - switch (options?.algorithm) { - case undefined: - case 'oidc': - url.pathname = `${url.pathname}/.well-known/openid-configuration`.replace('//', '/'); - break; - case 'oauth2': - if (url.pathname === '/') { - url.pathname = '.well-known/oauth-authorization-server'; - } - else { - url.pathname = `.well-known/oauth-authorization-server/${url.pathname}`.replace('//', '/'); - } - break; - default: - throw CodedTypeError('"options.algorithm" must be "oidc" (default), or "oauth2"', ERR_INVALID_ARG_VALUE); - } - const headers = prepareHeaders(options?.headers); - headers.set('accept', 'application/json'); - return (options?.[customFetch] || fetch)(url.href, { - body: undefined, - headers: Object.fromEntries(headers.entries()), - method: 'GET', - redirect: 'manual', - signal: options?.signal ? signal(options.signal) : undefined, - }); -} -function assertNumber(input, allow0, it, code, cause) { - try { - if (typeof input !== 'number' || !Number.isFinite(input)) { - throw CodedTypeError(`${it} must be a number`, ERR_INVALID_ARG_TYPE, cause); - } - if (input > 0) - return; - if (allow0 && input !== 0) { - throw CodedTypeError(`${it} must be a non-negative number`, ERR_INVALID_ARG_VALUE, cause); - } - throw CodedTypeError(`${it} must be a positive number`, ERR_INVALID_ARG_VALUE, cause); - } - catch (err) { - if (code) { - throw OPE(err.message, code, cause); - } - throw err; - } -} -function assertString(input, it, code, cause) { - try { - if (typeof input !== 'string') { - throw CodedTypeError(`${it} must be a string`, ERR_INVALID_ARG_TYPE, cause); - } - if (input.length === 0) { - throw CodedTypeError(`${it} must not be empty`, ERR_INVALID_ARG_VALUE, cause); - } - } - catch (err) { - if (code) { - throw OPE(err.message, code, cause); - } - throw err; - } -} -async function processDiscoveryResponse(expectedIssuerIdentifier, response) { - if (!(expectedIssuerIdentifier instanceof URL) && - expectedIssuerIdentifier !== _nodiscoverycheck) { - throw CodedTypeError('"expectedIssuer" must be an instance of URL', ERR_INVALID_ARG_TYPE); - } - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - if (response.status !== 200) { - throw OPE('"response" is not a conform Authorization Server Metadata response', RESPONSE_IS_NOT_CONFORM, response); - } - assertReadableResponse(response); - assertApplicationJson(response); - let json; - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - assertString(json.issuer, '"response" body "issuer" property', INVALID_RESPONSE, { body: json }); - if (new URL(json.issuer).href !== expectedIssuerIdentifier.href && - expectedIssuerIdentifier !== _nodiscoverycheck) { - throw OPE('"response" body "issuer" property does not match the expected value', JSON_ATTRIBUTE_COMPARISON, { expected: expectedIssuerIdentifier.href, body: json, attribute: 'issuer' }); - } - return json; -} -function assertApplicationJson(response) { - assertContentType(response, 'application/json'); -} -function notJson(response, ...types) { - let msg = '"response" content-type must be '; - if (types.length > 2) { - const last = types.pop(); - msg += `${types.join(', ')}, or ${last}`; - } - else if (types.length === 2) { - msg += `${types[0]} or ${types[1]}`; - } - else { - msg += types[0]; - } - return OPE(msg, RESPONSE_IS_NOT_JSON, response); -} -function assertContentTypes(response, ...types) { - if (!types.includes(getContentType(response))) { - throw notJson(response, ...types); - } -} -function assertContentType(response, contentType) { - if (getContentType(response) !== contentType) { - throw notJson(response, contentType); - } -} -function randomBytes() { - return b64u(crypto.getRandomValues(new Uint8Array(32))); -} -function generateRandomCodeVerifier() { - return randomBytes(); -} -function generateRandomState() { - return randomBytes(); -} -function generateRandomNonce() { - return randomBytes(); -} -async function calculatePKCECodeChallenge(codeVerifier) { - assertString(codeVerifier, 'codeVerifier'); - return b64u(await crypto.subtle.digest('SHA-256', buf(codeVerifier))); -} -function getKeyAndKid(input) { - if (input instanceof CryptoKey) { - return { key: input }; - } - if (!(input?.key instanceof CryptoKey)) { - return {}; - } - if (input.kid !== undefined) { - assertString(input.kid, '"kid"'); - } - return { - key: input.key, - kid: input.kid, - }; -} -function psAlg(key) { - switch (key.algorithm.hash.name) { - case 'SHA-256': - return 'PS256'; - case 'SHA-384': - return 'PS384'; - case 'SHA-512': - return 'PS512'; - default: - throw new UnsupportedOperationError('unsupported RsaHashedKeyAlgorithm hash name', { - cause: key, - }); - } -} -function rsAlg(key) { - switch (key.algorithm.hash.name) { - case 'SHA-256': - return 'RS256'; - case 'SHA-384': - return 'RS384'; - case 'SHA-512': - return 'RS512'; - default: - throw new UnsupportedOperationError('unsupported RsaHashedKeyAlgorithm hash name', { - cause: key, - }); - } -} -function esAlg(key) { - switch (key.algorithm.namedCurve) { - case 'P-256': - return 'ES256'; - case 'P-384': - return 'ES384'; - case 'P-521': - return 'ES512'; - default: - throw new UnsupportedOperationError('unsupported EcKeyAlgorithm namedCurve', { cause: key }); - } -} -function keyToJws(key) { - switch (key.algorithm.name) { - case 'RSA-PSS': - return psAlg(key); - case 'RSASSA-PKCS1-v1_5': - return rsAlg(key); - case 'ECDSA': - return esAlg(key); - case 'Ed25519': - case 'EdDSA': - return 'Ed25519'; - default: - throw new UnsupportedOperationError('unsupported CryptoKey algorithm name', { cause: key }); - } -} -function getClockSkew(client) { - const skew = client?.[clockSkew]; - return typeof skew === 'number' && Number.isFinite(skew) ? skew : 0; -} -function getClockTolerance(client) { - const tolerance = client?.[clockTolerance]; - return typeof tolerance === 'number' && Number.isFinite(tolerance) && Math.sign(tolerance) !== -1 - ? tolerance - : 30; -} -function epochTime() { - return Math.floor(Date.now() / 1000); -} -function assertAs(as) { - if (typeof as !== 'object' || as === null) { - throw CodedTypeError('"as" must be an object', ERR_INVALID_ARG_TYPE); - } - assertString(as.issuer, '"as.issuer"'); -} -function assertClient(client) { - if (typeof client !== 'object' || client === null) { - throw CodedTypeError('"client" must be an object', ERR_INVALID_ARG_TYPE); - } - assertString(client.client_id, '"client.client_id"'); -} -function formUrlEncode(token) { - return encodeURIComponent(token).replace(/(?:[-_.!~*'()]|%20)/g, (substring) => { - switch (substring) { - case '-': - case '_': - case '.': - case '!': - case '~': - case '*': - case "'": - case '(': - case ')': - return `%${substring.charCodeAt(0).toString(16).toUpperCase()}`; - case '%20': - return '+'; - default: - throw new Error(); - } - }); -} -function ClientSecretPost(clientSecret) { - assertString(clientSecret, '"clientSecret"'); - return (_as, client, body, _headers) => { - body.set('client_id', client.client_id); - body.set('client_secret', clientSecret); - }; -} -function ClientSecretBasic(clientSecret) { - assertString(clientSecret, '"clientSecret"'); - return (_as, client, _body, headers) => { - const username = formUrlEncode(client.client_id); - const password = formUrlEncode(clientSecret); - const credentials = btoa(`${username}:${password}`); - headers.set('authorization', `Basic ${credentials}`); - }; -} -function clientAssertionPayload(as, client) { - const now = epochTime() + getClockSkew(client); - return { - jti: randomBytes(), - aud: as.issuer, - exp: now + 60, - iat: now, - nbf: now, - iss: client.client_id, - sub: client.client_id, - }; -} -function PrivateKeyJwt(clientPrivateKey, options) { - const { key, kid } = getKeyAndKid(clientPrivateKey); - assertPrivateKey(key, '"clientPrivateKey.key"'); - return async (as, client, body, _headers) => { - const header = { alg: keyToJws(key), kid }; - const payload = clientAssertionPayload(as, client); - options?.[modifyAssertion]?.(header, payload); - body.set('client_id', client.client_id); - body.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'); - body.set('client_assertion', await signJwt(header, payload, key)); - }; -} -function ClientSecretJwt(clientSecret, options) { - assertString(clientSecret, '"clientSecret"'); - const modify = options?.[modifyAssertion]; - let key; - return async (as, client, body, _headers) => { - key ||= await crypto.subtle.importKey('raw', buf(clientSecret), { hash: 'SHA-256', name: 'HMAC' }, false, ['sign']); - const header = { alg: 'HS256' }; - const payload = clientAssertionPayload(as, client); - modify?.(header, payload); - const data = `${b64u(buf(JSON.stringify(header)))}.${b64u(buf(JSON.stringify(payload)))}`; - const hmac = await crypto.subtle.sign(key.algorithm, key, buf(data)); - body.set('client_id', client.client_id); - body.set('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'); - body.set('client_assertion', `${data}.${b64u(new Uint8Array(hmac))}`); - }; -} -function None() { - return (_as, client, body, _headers) => { - body.set('client_id', client.client_id); - }; -} -function TlsClientAuth() { - return None(); -} -async function signJwt(header, payload, key) { - if (!key.usages.includes('sign')) { - throw CodedTypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"', ERR_INVALID_ARG_VALUE); - } - const input = `${b64u(buf(JSON.stringify(header)))}.${b64u(buf(JSON.stringify(payload)))}`; - const signature = b64u(await crypto.subtle.sign(keyToSubtle(key), key, buf(input))); - return `${input}.${signature}`; -} -async function issueRequestObject(as, client, parameters, privateKey, options) { - assertAs(as); - assertClient(client); - parameters = new URLSearchParams(parameters); - const { key, kid } = getKeyAndKid(privateKey); - assertPrivateKey(key, '"privateKey.key"'); - parameters.set('client_id', client.client_id); - const now = epochTime() + getClockSkew(client); - const claims = { - ...Object.fromEntries(parameters.entries()), - jti: randomBytes(), - aud: as.issuer, - exp: now + 60, - iat: now, - nbf: now, - iss: client.client_id, - }; - let resource; - if (parameters.has('resource') && - (resource = parameters.getAll('resource')) && - resource.length > 1) { - claims.resource = resource; - } - { - let value = parameters.get('max_age'); - if (value !== null) { - claims.max_age = parseInt(value, 10); - assertNumber(claims.max_age, true, '"max_age" parameter'); - } - } - { - let value = parameters.get('claims'); - if (value !== null) { - try { - claims.claims = JSON.parse(value); - } - catch (cause) { - throw OPE('failed to parse the "claims" parameter as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(claims.claims)) { - throw CodedTypeError('"claims" parameter must be a JSON with a top level object', ERR_INVALID_ARG_VALUE); - } - } - } - { - let value = parameters.get('authorization_details'); - if (value !== null) { - try { - claims.authorization_details = JSON.parse(value); - } - catch (cause) { - throw OPE('failed to parse the "authorization_details" parameter as JSON', PARSE_ERROR, cause); - } - if (!Array.isArray(claims.authorization_details)) { - throw CodedTypeError('"authorization_details" parameter must be a JSON with a top level array', ERR_INVALID_ARG_VALUE); - } - } - } - const header = { - alg: keyToJws(key), - typ: 'oauth-authz-req+jwt', - kid, - }; - options?.[modifyAssertion]?.(header, claims); - return signJwt(header, claims, key); -} -let jwkCache; -async function getSetPublicJwkCache(key) { - const { kty, e, n, x, y, crv } = await crypto.subtle.exportKey('jwk', key); - const jwk = { kty, e, n, x, y, crv }; - jwkCache.set(key, jwk); - return jwk; -} -async function publicJwk(key) { - jwkCache ||= new WeakMap(); - return jwkCache.get(key) || getSetPublicJwkCache(key); -} -const URLParse = URL.parse - ? - (url, base) => URL.parse(url, base) - : (url, base) => { - try { - return new URL(url, base); - } - catch { - return null; - } - }; -function checkProtocol(url, enforceHttps) { - if (enforceHttps && url.protocol !== 'https:') { - throw OPE('only requests to HTTPS are allowed', HTTP_REQUEST_FORBIDDEN, url); - } - if (url.protocol !== 'https:' && url.protocol !== 'http:') { - throw OPE('only HTTP and HTTPS requests are allowed', REQUEST_PROTOCOL_FORBIDDEN, url); - } -} -function validateEndpoint(value, endpoint, useMtlsAlias, enforceHttps) { - let url; - if (typeof value !== 'string' || !(url = URLParse(value))) { - throw OPE(`authorization server metadata does not contain a valid ${useMtlsAlias ? `"as.mtls_endpoint_aliases.${endpoint}"` : `"as.${endpoint}"`}`, value === undefined ? MISSING_SERVER_METADATA : INVALID_SERVER_METADATA, { attribute: useMtlsAlias ? `mtls_endpoint_aliases.${endpoint}` : endpoint }); - } - checkProtocol(url, enforceHttps); - return url; -} -function resolveEndpoint(as, endpoint, useMtlsAlias, enforceHttps) { - if (useMtlsAlias && as.mtls_endpoint_aliases && endpoint in as.mtls_endpoint_aliases) { - return validateEndpoint(as.mtls_endpoint_aliases[endpoint], endpoint, useMtlsAlias, enforceHttps); - } - return validateEndpoint(as[endpoint], endpoint, useMtlsAlias, enforceHttps); -} -async function pushedAuthorizationRequest(as, client, clientAuthentication, parameters, options) { - assertAs(as); - assertClient(client); - const url = resolveEndpoint(as, 'pushed_authorization_request_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true); - const body = new URLSearchParams(parameters); - body.set('client_id', client.client_id); - const headers = prepareHeaders(options?.headers); - headers.set('accept', 'application/json'); - if (options?.DPoP !== undefined) { - assertDPoP(options.DPoP); - await options.DPoP.addProof(url, headers, 'POST'); - } - const response = await authenticatedRequest(as, client, clientAuthentication, url, body, headers, options); - options?.DPoP?.cacheNonce(response); - return response; -} -class DPoPHandler { - #header; - #privateKey; - #publicKey; - #clockSkew; - #modifyAssertion; - #map; - constructor(client, keyPair, options) { - assertPrivateKey(keyPair?.privateKey, '"DPoP.privateKey"'); - assertPublicKey(keyPair?.publicKey, '"DPoP.publicKey"'); - if (!keyPair.publicKey.extractable) { - throw CodedTypeError('"DPoP.publicKey.extractable" must be true', ERR_INVALID_ARG_VALUE); - } - this.#modifyAssertion = options?.[modifyAssertion]; - this.#clockSkew = getClockSkew(client); - this.#privateKey = keyPair.privateKey; - this.#publicKey = keyPair.publicKey; - branded.add(this); - } - #get(key) { - this.#map ||= new Map(); - let item = this.#map.get(key); - if (item) { - this.#map.delete(key); - this.#map.set(key, item); - } - return item; - } - #set(key, val) { - this.#map ||= new Map(); - this.#map.delete(key); - if (this.#map.size === 100) { - this.#map.delete(this.#map.keys().next().value); - } - this.#map.set(key, val); - } - async addProof(url, headers, htm, accessToken) { - this.#header ||= { - alg: keyToJws(this.#privateKey), - typ: 'dpop+jwt', - jwk: await publicJwk(this.#publicKey), - }; - const nonce = this.#get(url.origin); - const now = epochTime() + this.#clockSkew; - const payload = { - iat: now, - jti: randomBytes(), - htm, - nonce, - htu: `${url.origin}${url.pathname}`, - ath: accessToken ? b64u(await crypto.subtle.digest('SHA-256', buf(accessToken))) : undefined, - }; - this.#modifyAssertion?.(this.#header, payload); - headers.set('dpop', await signJwt(this.#header, payload, this.#privateKey)); - } - cacheNonce(response) { - try { - const nonce = response.headers.get('dpop-nonce'); - if (nonce) { - this.#set(new URL(response.url).origin, nonce); - } - } - catch { } - } -} -function isDPoPNonceError(err) { - if (err instanceof WWWAuthenticateChallengeError) { - const { 0: challenge, length } = err.cause; - return (length === 1 && challenge.scheme === 'dpop' && challenge.parameters.error === 'use_dpop_nonce'); - } - if (err instanceof ResponseBodyError) { - return err.error === 'use_dpop_nonce'; - } - return false; -} -function DPoP(client, keyPair, options) { - return new DPoPHandler(client, keyPair, options); -} -class ResponseBodyError extends Error { - cause; - code; - error; - status; - error_description; - response; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - this.code = RESPONSE_BODY_ERROR; - this.cause = options.cause; - this.error = options.cause.error; - this.status = options.response.status; - this.error_description = options.cause.error_description; - Object.defineProperty(this, 'response', { enumerable: false, value: options.response }); - Error.captureStackTrace?.(this, this.constructor); - } -} -class AuthorizationResponseError extends Error { - cause; - code; - error; - error_description; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - this.code = AUTHORIZATION_RESPONSE_ERROR; - this.cause = options.cause; - this.error = options.cause.get('error'); - this.error_description = options.cause.get('error_description') ?? undefined; - Error.captureStackTrace?.(this, this.constructor); - } -} -class WWWAuthenticateChallengeError extends Error { - cause; - code; - response; - status; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - this.code = WWW_AUTHENTICATE_CHALLENGE; - this.cause = options.cause; - this.status = options.response.status; - this.response = options.response; - Object.defineProperty(this, 'response', { enumerable: false }); - Error.captureStackTrace?.(this, this.constructor); - } -} -function unquote(value) { - if (value.length >= 2 && value[0] === '"' && value[value.length - 1] === '"') { - return value.slice(1, -1); - } - return value; -} -const SPLIT_REGEXP = /((?:,|, )?[0-9a-zA-Z!#$%&'*+-.^_`|~]+=)/; -const SCHEMES_REGEXP = /(?:^|, ?)([0-9a-zA-Z!#$%&'*+\-.^_`|~]+)(?=$|[ ,])/g; -function wwwAuth(scheme, params) { - const arr = params.split(SPLIT_REGEXP).slice(1); - if (!arr.length) { - return { scheme: scheme.toLowerCase(), parameters: {} }; - } - arr[arr.length - 1] = arr[arr.length - 1].replace(/,$/, ''); - const parameters = {}; - for (let i = 1; i < arr.length; i += 2) { - const idx = i; - if (arr[idx][0] === '"') { - while (arr[idx].slice(-1) !== '"' && ++i < arr.length) { - arr[idx] += arr[i]; - } - } - const key = arr[idx - 1].replace(/^(?:, ?)|=$/g, '').toLowerCase(); - parameters[key] = unquote(arr[idx]); - } - return { - scheme: scheme.toLowerCase(), - parameters, - }; -} -function parseWwwAuthenticateChallenges(response) { - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - const header = response.headers.get('www-authenticate'); - if (header === null) { - return undefined; - } - const result = []; - for (const { 1: scheme, index } of header.matchAll(SCHEMES_REGEXP)) { - result.push([scheme, index]); - } - if (!result.length) { - return undefined; - } - const challenges = result.map(([scheme, indexOf], i, others) => { - const next = others[i + 1]; - let parameters; - if (next) { - parameters = header.slice(indexOf, next[1]); - } - else { - parameters = header.slice(indexOf); - } - return wwwAuth(scheme, parameters); - }); - return challenges; -} -async function processPushedAuthorizationResponse(as, client, response) { - assertAs(as); - assertClient(client); - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - if (response.status !== 201) { - let err; - if ((err = await handleOAuthBodyError(response))) { - await response.body?.cancel(); - throw new ResponseBodyError('server responded with an error in the response body', { - cause: err, - response, - }); - } - throw OPE('"response" is not a conform Pushed Authorization Request Endpoint response', RESPONSE_IS_NOT_CONFORM, response); - } - assertReadableResponse(response); - assertApplicationJson(response); - let json; - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - assertString(json.request_uri, '"response" body "request_uri" property', INVALID_RESPONSE, { - body: json, - }); - let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in; - assertNumber(expiresIn, false, '"response" body "expires_in" property', INVALID_RESPONSE, { - body: json, - }); - json.expires_in = expiresIn; - return json; -} -function assertDPoP(option) { - if (!branded.has(option)) { - throw CodedTypeError('"options.DPoP" is not a valid DPoPHandle', ERR_INVALID_ARG_VALUE); - } -} -async function resourceRequest(accessToken, method, url, headers, body, options) { - assertString(accessToken, '"accessToken"'); - if (!(url instanceof URL)) { - throw CodedTypeError('"url" must be an instance of URL', ERR_INVALID_ARG_TYPE); - } - checkProtocol(url, options?.[allowInsecureRequests] !== true); - headers = prepareHeaders(headers); - if (options?.DPoP) { - assertDPoP(options.DPoP); - await options.DPoP.addProof(url, headers, method.toUpperCase(), accessToken); - headers.set('authorization', `DPoP ${accessToken}`); - } - else { - headers.set('authorization', `Bearer ${accessToken}`); - } - const response = await (options?.[customFetch] || fetch)(url.href, { - body, - headers: Object.fromEntries(headers.entries()), - method, - redirect: 'manual', - signal: options?.signal ? signal(options.signal) : undefined, - }); - options?.DPoP?.cacheNonce(response); - return response; -} -async function protectedResourceRequest(accessToken, method, url, headers, body, options) { - return resourceRequest(accessToken, method, url, headers, body, options).then((response) => { - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - return response; - }); -} -async function userInfoRequest(as, client, accessToken, options) { - assertAs(as); - assertClient(client); - const url = resolveEndpoint(as, 'userinfo_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true); - const headers = prepareHeaders(options?.headers); - if (client.userinfo_signed_response_alg) { - headers.set('accept', 'application/jwt'); - } - else { - headers.set('accept', 'application/json'); - headers.append('accept', 'application/jwt'); - } - return resourceRequest(accessToken, 'GET', url, headers, null, { - ...options, - [clockSkew]: getClockSkew(client), - }); -} -let jwksMap; -function setJwksCache(as, jwks, uat, cache) { - jwksMap ||= new WeakMap(); - jwksMap.set(as, { - jwks, - uat, - get age() { - return epochTime() - this.uat; - }, - }); - if (cache) { - Object.assign(cache, { jwks: structuredClone(jwks), uat }); - } -} -function isFreshJwksCache(input) { - if (typeof input !== 'object' || input === null) { - return false; - } - if (!('uat' in input) || typeof input.uat !== 'number' || epochTime() - input.uat >= 300) { - return false; - } - if (!('jwks' in input) || - !isJsonObject(input.jwks) || - !Array.isArray(input.jwks.keys) || - !Array.prototype.every.call(input.jwks.keys, isJsonObject)) { - return false; - } - return true; -} -function clearJwksCache(as, cache) { - jwksMap?.delete(as); - delete cache?.jwks; - delete cache?.uat; -} -async function getPublicSigKeyFromIssuerJwksUri(as, options, header) { - const { alg, kid } = header; - checkSupportedJwsAlg(header); - if (!jwksMap?.has(as) && isFreshJwksCache(options?.[build_jwksCache])) { - setJwksCache(as, options?.[build_jwksCache].jwks, options?.[build_jwksCache].uat); - } - let jwks; - let age; - if (jwksMap?.has(as)) { - ; - ({ jwks, age } = jwksMap.get(as)); - if (age >= 300) { - clearJwksCache(as, options?.[build_jwksCache]); - return getPublicSigKeyFromIssuerJwksUri(as, options, header); - } - } - else { - jwks = await jwksRequest(as, options).then(processJwksResponse); - age = 0; - setJwksCache(as, jwks, epochTime(), options?.[build_jwksCache]); - } - let kty; - switch (alg.slice(0, 2)) { - case 'RS': - case 'PS': - kty = 'RSA'; - break; - case 'ES': - kty = 'EC'; - break; - case 'Ed': - kty = 'OKP'; - break; - default: - throw new UnsupportedOperationError('unsupported JWS algorithm', { cause: { alg } }); - } - const candidates = jwks.keys.filter((jwk) => { - if (jwk.kty !== kty) { - return false; - } - if (kid !== undefined && kid !== jwk.kid) { - return false; - } - if (jwk.alg !== undefined && alg !== jwk.alg) { - return false; - } - if (jwk.use !== undefined && jwk.use !== 'sig') { - return false; - } - if (jwk.key_ops?.includes('verify') === false) { - return false; - } - switch (true) { - case alg === 'ES256' && jwk.crv !== 'P-256': - case alg === 'ES384' && jwk.crv !== 'P-384': - case alg === 'ES512' && jwk.crv !== 'P-521': - case alg === 'Ed25519' && jwk.crv !== 'Ed25519': - case alg === 'EdDSA' && jwk.crv !== 'Ed25519': - return false; - } - return true; - }); - const { 0: jwk, length } = candidates; - if (!length) { - if (age >= 60) { - clearJwksCache(as, options?.[build_jwksCache]); - return getPublicSigKeyFromIssuerJwksUri(as, options, header); - } - throw OPE('error when selecting a JWT verification key, no applicable keys found', KEY_SELECTION, { header, candidates, jwks_uri: new URL(as.jwks_uri) }); - } - if (length !== 1) { - throw OPE('error when selecting a JWT verification key, multiple applicable keys found, a "kid" JWT Header Parameter is required', KEY_SELECTION, { header, candidates, jwks_uri: new URL(as.jwks_uri) }); - } - return importJwk(alg, jwk); -} -const skipSubjectCheck = Symbol(); -function getContentType(input) { - return input.headers.get('content-type')?.split(';')[0]; -} -async function processUserInfoResponse(as, client, expectedSubject, response, options) { - assertAs(as); - assertClient(client); - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - if (response.status !== 200) { - throw OPE('"response" is not a conform UserInfo Endpoint response', RESPONSE_IS_NOT_CONFORM, response); - } - assertReadableResponse(response); - let json; - if (getContentType(response) === 'application/jwt') { - const { claims, jwt } = await validateJwt(await response.text(), checkSigningAlgorithm.bind(undefined, client.userinfo_signed_response_alg, as.userinfo_signing_alg_values_supported, undefined), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt]) - .then(validateOptionalAudience.bind(undefined, client.client_id)) - .then(validateOptionalIssuer.bind(undefined, as)); - jwtRefs.set(response, jwt); - json = claims; - } - else { - if (client.userinfo_signed_response_alg) { - throw OPE('JWT UserInfo Response expected', JWT_USERINFO_EXPECTED, response); - } - assertApplicationJson(response); - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - assertString(json.sub, '"response" body "sub" property', INVALID_RESPONSE, { body: json }); - switch (expectedSubject) { - case skipSubjectCheck: - break; - default: - assertString(expectedSubject, '"expectedSubject"'); - if (json.sub !== expectedSubject) { - throw OPE('unexpected "response" body "sub" property value', JSON_ATTRIBUTE_COMPARISON, { - expected: expectedSubject, - body: json, - attribute: 'sub', - }); - } - } - return json; -} -async function authenticatedRequest(as, client, clientAuthentication, url, body, headers, options) { - await clientAuthentication(as, client, body, headers); - headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); - return (options?.[customFetch] || fetch)(url.href, { - body, - headers: Object.fromEntries(headers.entries()), - method: 'POST', - redirect: 'manual', - signal: options?.signal ? signal(options.signal) : undefined, - }); -} -async function tokenEndpointRequest(as, client, clientAuthentication, grantType, parameters, options) { - const url = resolveEndpoint(as, 'token_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true); - parameters.set('grant_type', grantType); - const headers = prepareHeaders(options?.headers); - headers.set('accept', 'application/json'); - if (options?.DPoP !== undefined) { - assertDPoP(options.DPoP); - await options.DPoP.addProof(url, headers, 'POST'); - } - const response = await authenticatedRequest(as, client, clientAuthentication, url, parameters, headers, options); - options?.DPoP?.cacheNonce(response); - return response; -} -async function refreshTokenGrantRequest(as, client, clientAuthentication, refreshToken, options) { - assertAs(as); - assertClient(client); - assertString(refreshToken, '"refreshToken"'); - const parameters = new URLSearchParams(options?.additionalParameters); - parameters.set('refresh_token', refreshToken); - return tokenEndpointRequest(as, client, clientAuthentication, 'refresh_token', parameters, options); -} -const idTokenClaims = new WeakMap(); -const jwtRefs = new WeakMap(); -function getValidatedIdTokenClaims(ref) { - if (!ref.id_token) { - return undefined; - } - const claims = idTokenClaims.get(ref); - if (!claims) { - throw CodedTypeError('"ref" was already garbage collected or did not resolve from the proper sources', ERR_INVALID_ARG_VALUE); - } - return claims; -} -async function validateApplicationLevelSignature(as, ref, options) { - assertAs(as); - if (!jwtRefs.has(ref)) { - throw CodedTypeError('"ref" does not contain a processed JWT Response to verify the signature of', ERR_INVALID_ARG_VALUE); - } - const { 0: protectedHeader, 1: payload, 2: encodedSignature } = jwtRefs.get(ref).split('.'); - const header = JSON.parse(buf(b64u(protectedHeader))); - if (header.alg.startsWith('HS')) { - throw new UnsupportedOperationError('unsupported JWS algorithm', { cause: { alg: header.alg } }); - } - let key; - key = await getPublicSigKeyFromIssuerJwksUri(as, options, header); - await validateJwsSignature(protectedHeader, payload, key, b64u(encodedSignature)); -} -async function processGenericAccessTokenResponse(as, client, response, additionalRequiredIdTokenClaims, options) { - assertAs(as); - assertClient(client); - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - if (response.status !== 200) { - let err; - if ((err = await handleOAuthBodyError(response))) { - await response.body?.cancel(); - throw new ResponseBodyError('server responded with an error in the response body', { - cause: err, - response, - }); - } - throw OPE('"response" is not a conform Token Endpoint response', RESPONSE_IS_NOT_CONFORM, response); - } - assertReadableResponse(response); - assertApplicationJson(response); - let json; - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - assertString(json.access_token, '"response" body "access_token" property', INVALID_RESPONSE, { - body: json, - }); - assertString(json.token_type, '"response" body "token_type" property', INVALID_RESPONSE, { - body: json, - }); - json.token_type = json.token_type.toLowerCase(); - if (json.token_type !== 'dpop' && json.token_type !== 'bearer') { - throw new UnsupportedOperationError('unsupported `token_type` value', { cause: { body: json } }); - } - if (json.expires_in !== undefined) { - let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in; - assertNumber(expiresIn, false, '"response" body "expires_in" property', INVALID_RESPONSE, { - body: json, - }); - json.expires_in = expiresIn; - } - if (json.refresh_token !== undefined) { - assertString(json.refresh_token, '"response" body "refresh_token" property', INVALID_RESPONSE, { - body: json, - }); - } - if (json.scope !== undefined && typeof json.scope !== 'string') { - throw OPE('"response" body "scope" property must be a string', INVALID_RESPONSE, { body: json }); - } - if (json.id_token !== undefined) { - assertString(json.id_token, '"response" body "id_token" property', INVALID_RESPONSE, { - body: json, - }); - const requiredClaims = ['aud', 'exp', 'iat', 'iss', 'sub']; - if (client.require_auth_time === true) { - requiredClaims.push('auth_time'); - } - if (client.default_max_age !== undefined) { - assertNumber(client.default_max_age, false, '"client.default_max_age"'); - requiredClaims.push('auth_time'); - } - if (additionalRequiredIdTokenClaims?.length) { - requiredClaims.push(...additionalRequiredIdTokenClaims); - } - const { claims, jwt } = await validateJwt(json.id_token, checkSigningAlgorithm.bind(undefined, client.id_token_signed_response_alg, as.id_token_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt]) - .then(validatePresence.bind(undefined, requiredClaims)) - .then(validateIssuer.bind(undefined, as)) - .then(validateAudience.bind(undefined, client.client_id)); - if (Array.isArray(claims.aud) && claims.aud.length !== 1) { - if (claims.azp === undefined) { - throw OPE('ID Token "aud" (audience) claim includes additional untrusted audiences', JWT_CLAIM_COMPARISON, { claims, claim: 'aud' }); - } - if (claims.azp !== client.client_id) { - throw OPE('unexpected ID Token "azp" (authorized party) claim value', JWT_CLAIM_COMPARISON, { expected: client.client_id, claims, claim: 'azp' }); - } - } - if (claims.auth_time !== undefined) { - assertNumber(claims.auth_time, false, 'ID Token "auth_time" (authentication time)', INVALID_RESPONSE, { claims }); - } - jwtRefs.set(response, jwt); - idTokenClaims.set(json, claims); - } - return json; -} -async function processRefreshTokenResponse(as, client, response, options) { - return processGenericAccessTokenResponse(as, client, response, undefined, options); -} -function validateOptionalAudience(expected, result) { - if (result.claims.aud !== undefined) { - return validateAudience(expected, result); - } - return result; -} -function validateAudience(expected, result) { - if (Array.isArray(result.claims.aud)) { - if (!result.claims.aud.includes(expected)) { - throw OPE('unexpected JWT "aud" (audience) claim value', JWT_CLAIM_COMPARISON, { - expected, - claims: result.claims, - claim: 'aud', - }); - } - } - else if (result.claims.aud !== expected) { - throw OPE('unexpected JWT "aud" (audience) claim value', JWT_CLAIM_COMPARISON, { - expected, - claims: result.claims, - claim: 'aud', - }); - } - return result; -} -function validateOptionalIssuer(as, result) { - if (result.claims.iss !== undefined) { - return validateIssuer(as, result); - } - return result; -} -function validateIssuer(as, result) { - const expected = as[_expectedIssuer]?.(result) ?? as.issuer; - if (result.claims.iss !== expected) { - throw OPE('unexpected JWT "iss" (issuer) claim value', JWT_CLAIM_COMPARISON, { - expected, - claims: result.claims, - claim: 'iss', - }); - } - return result; -} -const branded = new WeakSet(); -function brand(searchParams) { - branded.add(searchParams); - return searchParams; -} -async function authorizationCodeGrantRequest(as, client, clientAuthentication, callbackParameters, redirectUri, codeVerifier, options) { - assertAs(as); - assertClient(client); - if (!branded.has(callbackParameters)) { - throw CodedTypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()', ERR_INVALID_ARG_VALUE); - } - assertString(redirectUri, '"redirectUri"'); - const code = getURLSearchParameter(callbackParameters, 'code'); - if (!code) { - throw OPE('no authorization code in "callbackParameters"', INVALID_RESPONSE); - } - const parameters = new URLSearchParams(options?.additionalParameters); - parameters.set('redirect_uri', redirectUri); - parameters.set('code', code); - if (codeVerifier !== _nopkce) { - assertString(codeVerifier, '"codeVerifier"'); - parameters.set('code_verifier', codeVerifier); - } - return tokenEndpointRequest(as, client, clientAuthentication, 'authorization_code', parameters, options); -} -const jwtClaimNames = { - aud: 'audience', - c_hash: 'code hash', - client_id: 'client id', - exp: 'expiration time', - iat: 'issued at', - iss: 'issuer', - jti: 'jwt id', - nonce: 'nonce', - s_hash: 'state hash', - sub: 'subject', - ath: 'access token hash', - htm: 'http method', - htu: 'http uri', - cnf: 'confirmation', - auth_time: 'authentication time', -}; -function validatePresence(required, result) { - for (const claim of required) { - if (result.claims[claim] === undefined) { - throw OPE(`JWT "${claim}" (${jwtClaimNames[claim]}) claim missing`, INVALID_RESPONSE, { - claims: result.claims, - }); - } - } - return result; -} -const expectNoNonce = Symbol(); -const skipAuthTimeCheck = Symbol(); -async function processAuthorizationCodeResponse(as, client, response, options) { - if (typeof options?.expectedNonce === 'string' || - typeof options?.maxAge === 'number' || - options?.requireIdToken) { - return processAuthorizationCodeOpenIDResponse(as, client, response, options.expectedNonce, options.maxAge, { - [jweDecrypt]: options[jweDecrypt], - }); - } - return processAuthorizationCodeOAuth2Response(as, client, response, options); -} -async function processAuthorizationCodeOpenIDResponse(as, client, response, expectedNonce, maxAge, options) { - const additionalRequiredClaims = []; - switch (expectedNonce) { - case undefined: - expectedNonce = expectNoNonce; - break; - case expectNoNonce: - break; - default: - assertString(expectedNonce, '"expectedNonce" argument'); - additionalRequiredClaims.push('nonce'); - } - maxAge ??= client.default_max_age; - switch (maxAge) { - case undefined: - maxAge = skipAuthTimeCheck; - break; - case skipAuthTimeCheck: - break; - default: - assertNumber(maxAge, false, '"maxAge" argument'); - additionalRequiredClaims.push('auth_time'); - } - const result = await processGenericAccessTokenResponse(as, client, response, additionalRequiredClaims, options); - assertString(result.id_token, '"response" body "id_token" property', INVALID_RESPONSE, { - body: result, - }); - const claims = getValidatedIdTokenClaims(result); - if (maxAge !== skipAuthTimeCheck) { - const now = epochTime() + getClockSkew(client); - const tolerance = getClockTolerance(client); - if (claims.auth_time + maxAge < now - tolerance) { - throw OPE('too much time has elapsed since the last End-User authentication', JWT_TIMESTAMP_CHECK, { claims, now, tolerance, claim: 'auth_time' }); - } - } - if (expectedNonce === expectNoNonce) { - if (claims.nonce !== undefined) { - throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, { - expected: undefined, - claims, - claim: 'nonce', - }); - } - } - else if (claims.nonce !== expectedNonce) { - throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, { - expected: expectedNonce, - claims, - claim: 'nonce', - }); - } - return result; -} -async function processAuthorizationCodeOAuth2Response(as, client, response, options) { - const result = await processGenericAccessTokenResponse(as, client, response, undefined, options); - const claims = getValidatedIdTokenClaims(result); - if (claims) { - if (client.default_max_age !== undefined) { - assertNumber(client.default_max_age, false, '"client.default_max_age"'); - const now = epochTime() + getClockSkew(client); - const tolerance = getClockTolerance(client); - if (claims.auth_time + client.default_max_age < now - tolerance) { - throw OPE('too much time has elapsed since the last End-User authentication', JWT_TIMESTAMP_CHECK, { claims, now, tolerance, claim: 'auth_time' }); - } - } - if (claims.nonce !== undefined) { - throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, { - expected: undefined, - claims, - claim: 'nonce', - }); - } - } - return result; -} -const WWW_AUTHENTICATE_CHALLENGE = 'OAUTH_WWW_AUTHENTICATE_CHALLENGE'; -const RESPONSE_BODY_ERROR = 'OAUTH_RESPONSE_BODY_ERROR'; -const UNSUPPORTED_OPERATION = 'OAUTH_UNSUPPORTED_OPERATION'; -const AUTHORIZATION_RESPONSE_ERROR = 'OAUTH_AUTHORIZATION_RESPONSE_ERROR'; -const JWT_USERINFO_EXPECTED = 'OAUTH_JWT_USERINFO_EXPECTED'; -const PARSE_ERROR = 'OAUTH_PARSE_ERROR'; -const INVALID_RESPONSE = 'OAUTH_INVALID_RESPONSE'; -const INVALID_REQUEST = 'OAUTH_INVALID_REQUEST'; -const RESPONSE_IS_NOT_JSON = 'OAUTH_RESPONSE_IS_NOT_JSON'; -const RESPONSE_IS_NOT_CONFORM = 'OAUTH_RESPONSE_IS_NOT_CONFORM'; -const HTTP_REQUEST_FORBIDDEN = 'OAUTH_HTTP_REQUEST_FORBIDDEN'; -const REQUEST_PROTOCOL_FORBIDDEN = 'OAUTH_REQUEST_PROTOCOL_FORBIDDEN'; -const JWT_TIMESTAMP_CHECK = 'OAUTH_JWT_TIMESTAMP_CHECK_FAILED'; -const JWT_CLAIM_COMPARISON = 'OAUTH_JWT_CLAIM_COMPARISON_FAILED'; -const JSON_ATTRIBUTE_COMPARISON = 'OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED'; -const KEY_SELECTION = 'OAUTH_KEY_SELECTION_FAILED'; -const MISSING_SERVER_METADATA = 'OAUTH_MISSING_SERVER_METADATA'; -const INVALID_SERVER_METADATA = 'OAUTH_INVALID_SERVER_METADATA'; -function checkJwtType(expected, result) { - if (typeof result.header.typ !== 'string' || normalizeTyp(result.header.typ) !== expected) { - throw OPE('unexpected JWT "typ" header parameter value', INVALID_RESPONSE, { - header: result.header, - }); - } - return result; -} -async function clientCredentialsGrantRequest(as, client, clientAuthentication, parameters, options) { - assertAs(as); - assertClient(client); - return tokenEndpointRequest(as, client, clientAuthentication, 'client_credentials', new URLSearchParams(parameters), options); -} -async function genericTokenEndpointRequest(as, client, clientAuthentication, grantType, parameters, options) { - assertAs(as); - assertClient(client); - assertString(grantType, '"grantType"'); - return tokenEndpointRequest(as, client, clientAuthentication, grantType, new URLSearchParams(parameters), options); -} -async function processGenericTokenEndpointResponse(as, client, response, options) { - return processGenericAccessTokenResponse(as, client, response, undefined, options); -} -async function processClientCredentialsResponse(as, client, response, options) { - return processGenericAccessTokenResponse(as, client, response, undefined, options); -} -async function revocationRequest(as, client, clientAuthentication, token, options) { - assertAs(as); - assertClient(client); - assertString(token, '"token"'); - const url = resolveEndpoint(as, 'revocation_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true); - const body = new URLSearchParams(options?.additionalParameters); - body.set('token', token); - const headers = prepareHeaders(options?.headers); - headers.delete('accept'); - return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options); -} -async function processRevocationResponse(response) { - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - if (response.status !== 200) { - let err; - if ((err = await handleOAuthBodyError(response))) { - await response.body?.cancel(); - throw new ResponseBodyError('server responded with an error in the response body', { - cause: err, - response, - }); - } - throw OPE('"response" is not a conform Revocation Endpoint response', RESPONSE_IS_NOT_CONFORM, response); - } - return undefined; -} -function assertReadableResponse(response) { - if (response.bodyUsed) { - throw CodedTypeError('"response" body has been used already', ERR_INVALID_ARG_VALUE); - } -} -async function introspectionRequest(as, client, clientAuthentication, token, options) { - assertAs(as); - assertClient(client); - assertString(token, '"token"'); - const url = resolveEndpoint(as, 'introspection_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true); - const body = new URLSearchParams(options?.additionalParameters); - body.set('token', token); - const headers = prepareHeaders(options?.headers); - if (options?.requestJwtResponse ?? client.introspection_signed_response_alg) { - headers.set('accept', 'application/token-introspection+jwt'); - } - else { - headers.set('accept', 'application/json'); - } - return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options); -} -async function processIntrospectionResponse(as, client, response, options) { - assertAs(as); - assertClient(client); - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - if (response.status !== 200) { - let err; - if ((err = await handleOAuthBodyError(response))) { - await response.body?.cancel(); - throw new ResponseBodyError('server responded with an error in the response body', { - cause: err, - response, - }); - } - throw OPE('"response" is not a conform Introspection Endpoint response', RESPONSE_IS_NOT_CONFORM, response); - } - let json; - if (getContentType(response) === 'application/token-introspection+jwt') { - assertReadableResponse(response); - const { claims, jwt } = await validateJwt(await response.text(), checkSigningAlgorithm.bind(undefined, client.introspection_signed_response_alg, as.introspection_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt]) - .then(checkJwtType.bind(undefined, 'token-introspection+jwt')) - .then(validatePresence.bind(undefined, ['aud', 'iat', 'iss'])) - .then(validateIssuer.bind(undefined, as)) - .then(validateAudience.bind(undefined, client.client_id)); - jwtRefs.set(response, jwt); - json = claims.token_introspection; - if (!isJsonObject(json)) { - throw OPE('JWT "token_introspection" claim must be a JSON object', INVALID_RESPONSE, { - claims, - }); - } - } - else { - assertReadableResponse(response); - assertApplicationJson(response); - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - } - if (typeof json.active !== 'boolean') { - throw OPE('"response" body "active" property must be a boolean', INVALID_RESPONSE, { - body: json, - }); - } - return json; -} -async function jwksRequest(as, options) { - assertAs(as); - const url = resolveEndpoint(as, 'jwks_uri', false, options?.[allowInsecureRequests] !== true); - const headers = prepareHeaders(options?.headers); - headers.set('accept', 'application/json'); - headers.append('accept', 'application/jwk-set+json'); - return (options?.[customFetch] || fetch)(url.href, { - body: undefined, - headers: Object.fromEntries(headers.entries()), - method: 'GET', - redirect: 'manual', - signal: options?.signal ? signal(options.signal) : undefined, - }); -} -async function processJwksResponse(response) { - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - if (response.status !== 200) { - throw OPE('"response" is not a conform JSON Web Key Set response', RESPONSE_IS_NOT_CONFORM, response); - } - assertReadableResponse(response); - assertContentTypes(response, 'application/json', 'application/jwk-set+json'); - let json; - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - if (!Array.isArray(json.keys)) { - throw OPE('"response" body "keys" property must be an array', INVALID_RESPONSE, { body: json }); - } - if (!Array.prototype.every.call(json.keys, isJsonObject)) { - throw OPE('"response" body "keys" property members must be JWK formatted objects', INVALID_RESPONSE, { body: json }); - } - return json; -} -async function handleOAuthBodyError(response) { - if (response.status > 399 && response.status < 500) { - assertReadableResponse(response); - assertApplicationJson(response); - try { - const json = await response.clone().json(); - if (isJsonObject(json) && typeof json.error === 'string' && json.error.length) { - return json; - } - } - catch { } - } - return undefined; -} -function build_supported(alg) { - switch (alg) { - case 'PS256': - case 'ES256': - case 'RS256': - case 'PS384': - case 'ES384': - case 'RS384': - case 'PS512': - case 'ES512': - case 'RS512': - case 'Ed25519': - case 'EdDSA': - return true; - default: - return false; - } -} -function checkSupportedJwsAlg(header) { - if (!build_supported(header.alg)) { - throw new UnsupportedOperationError('unsupported JWS "alg" identifier', { - cause: { alg: header.alg }, - }); - } -} -function checkRsaKeyAlgorithm(key) { - const { algorithm } = key; - if (typeof algorithm.modulusLength !== 'number' || algorithm.modulusLength < 2048) { - throw new UnsupportedOperationError(`unsupported ${algorithm.name} modulusLength`, { - cause: key, - }); - } -} -function ecdsaHashName(key) { - const { algorithm } = key; - switch (algorithm.namedCurve) { - case 'P-256': - return 'SHA-256'; - case 'P-384': - return 'SHA-384'; - case 'P-521': - return 'SHA-512'; - default: - throw new UnsupportedOperationError('unsupported ECDSA namedCurve', { cause: key }); - } -} -function keyToSubtle(key) { - switch (key.algorithm.name) { - case 'ECDSA': - return { - name: key.algorithm.name, - hash: ecdsaHashName(key), - }; - case 'RSA-PSS': { - checkRsaKeyAlgorithm(key); - switch (key.algorithm.hash.name) { - case 'SHA-256': - case 'SHA-384': - case 'SHA-512': - return { - name: key.algorithm.name, - saltLength: parseInt(key.algorithm.hash.name.slice(-3), 10) >> 3, - }; - default: - throw new UnsupportedOperationError('unsupported RSA-PSS hash name', { cause: key }); - } - } - case 'RSASSA-PKCS1-v1_5': - checkRsaKeyAlgorithm(key); - return key.algorithm.name; - case 'Ed25519': - case 'EdDSA': - return key.algorithm.name; - } - throw new UnsupportedOperationError('unsupported CryptoKey algorithm name', { cause: key }); -} -async function validateJwsSignature(protectedHeader, payload, key, signature) { - const data = buf(`${protectedHeader}.${payload}`); - const algorithm = keyToSubtle(key); - const verified = await crypto.subtle.verify(algorithm, key, signature, data); - if (!verified) { - throw OPE('JWT signature verification failed', INVALID_RESPONSE, { - key, - data, - signature, - algorithm, - }); - } -} -async function validateJwt(jws, checkAlg, clockSkew, clockTolerance, decryptJwt) { - let { 0: protectedHeader, 1: payload, length } = jws.split('.'); - if (length === 5) { - if (decryptJwt !== undefined) { - jws = await decryptJwt(jws); - ({ 0: protectedHeader, 1: payload, length } = jws.split('.')); - } - else { - throw new UnsupportedOperationError('JWE decryption is not configured', { cause: jws }); - } - } - if (length !== 3) { - throw OPE('Invalid JWT', INVALID_RESPONSE, jws); - } - let header; - try { - header = JSON.parse(buf(b64u(protectedHeader))); - } - catch (cause) { - throw OPE('failed to parse JWT Header body as base64url encoded JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(header)) { - throw OPE('JWT Header must be a top level object', INVALID_RESPONSE, jws); - } - checkAlg(header); - if (header.crit !== undefined) { - throw new UnsupportedOperationError('no JWT "crit" header parameter extensions are supported', { - cause: { header }, - }); - } - let claims; - try { - claims = JSON.parse(buf(b64u(payload))); - } - catch (cause) { - throw OPE('failed to parse JWT Payload body as base64url encoded JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(claims)) { - throw OPE('JWT Payload must be a top level object', INVALID_RESPONSE, jws); - } - const now = epochTime() + clockSkew; - if (claims.exp !== undefined) { - if (typeof claims.exp !== 'number') { - throw OPE('unexpected JWT "exp" (expiration time) claim type', INVALID_RESPONSE, { claims }); - } - if (claims.exp <= now - clockTolerance) { - throw OPE('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp', JWT_TIMESTAMP_CHECK, { claims, now, tolerance: clockTolerance, claim: 'exp' }); - } - } - if (claims.iat !== undefined) { - if (typeof claims.iat !== 'number') { - throw OPE('unexpected JWT "iat" (issued at) claim type', INVALID_RESPONSE, { claims }); - } - } - if (claims.iss !== undefined) { - if (typeof claims.iss !== 'string') { - throw OPE('unexpected JWT "iss" (issuer) claim type', INVALID_RESPONSE, { claims }); - } - } - if (claims.nbf !== undefined) { - if (typeof claims.nbf !== 'number') { - throw OPE('unexpected JWT "nbf" (not before) claim type', INVALID_RESPONSE, { claims }); - } - if (claims.nbf > now + clockTolerance) { - throw OPE('unexpected JWT "nbf" (not before) claim value', JWT_TIMESTAMP_CHECK, { - claims, - now, - tolerance: clockTolerance, - claim: 'nbf', - }); - } - } - if (claims.aud !== undefined) { - if (typeof claims.aud !== 'string' && !Array.isArray(claims.aud)) { - throw OPE('unexpected JWT "aud" (audience) claim type', INVALID_RESPONSE, { claims }); - } - } - return { header, claims, jwt: jws }; -} -async function validateJwtAuthResponse(as, client, parameters, expectedState, options) { - assertAs(as); - assertClient(client); - if (parameters instanceof URL) { - parameters = parameters.searchParams; - } - if (!(parameters instanceof URLSearchParams)) { - throw CodedTypeError('"parameters" must be an instance of URLSearchParams, or URL', ERR_INVALID_ARG_TYPE); - } - const response = getURLSearchParameter(parameters, 'response'); - if (!response) { - throw OPE('"parameters" does not contain a JARM response', INVALID_RESPONSE); - } - const { claims, header, jwt } = await validateJwt(response, checkSigningAlgorithm.bind(undefined, client.authorization_signed_response_alg, as.authorization_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt]) - .then(validatePresence.bind(undefined, ['aud', 'exp', 'iss'])) - .then(validateIssuer.bind(undefined, as)) - .then(validateAudience.bind(undefined, client.client_id)); - const { 0: protectedHeader, 1: payload, 2: encodedSignature } = jwt.split('.'); - const signature = b64u(encodedSignature); - const key = await getPublicSigKeyFromIssuerJwksUri(as, options, header); - await validateJwsSignature(protectedHeader, payload, key, signature); - const result = new URLSearchParams(); - for (const [key, value] of Object.entries(claims)) { - if (typeof value === 'string' && key !== 'aud') { - result.set(key, value); - } - } - return validateAuthResponse(as, client, result, expectedState); -} -async function idTokenHash(data, header, claimName) { - let algorithm; - switch (header.alg) { - case 'RS256': - case 'PS256': - case 'ES256': - algorithm = 'SHA-256'; - break; - case 'RS384': - case 'PS384': - case 'ES384': - algorithm = 'SHA-384'; - break; - case 'RS512': - case 'PS512': - case 'ES512': - case 'Ed25519': - case 'EdDSA': - algorithm = 'SHA-512'; - break; - default: - throw new UnsupportedOperationError(`unsupported JWS algorithm for ${claimName} calculation`, { cause: { alg: header.alg } }); - } - const digest = await crypto.subtle.digest(algorithm, buf(data)); - return b64u(digest.slice(0, digest.byteLength / 2)); -} -async function idTokenHashMatches(data, actual, header, claimName) { - const expected = await idTokenHash(data, header, claimName); - return actual === expected; -} -async function validateDetachedSignatureResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options) { - return validateHybridResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options, true); -} -async function validateCodeIdTokenResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options) { - return validateHybridResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options, false); -} -async function consumeStream(request) { - if (request.bodyUsed) { - throw CodedTypeError('form_post Request instances must contain a readable body', ERR_INVALID_ARG_VALUE, { cause: request }); - } - return request.text(); -} -async function formPostResponse(request) { - if (request.method !== 'POST') { - throw CodedTypeError('form_post responses are expected to use the POST method', ERR_INVALID_ARG_VALUE, { cause: request }); - } - if (getContentType(request) !== 'application/x-www-form-urlencoded') { - throw CodedTypeError('form_post responses are expected to use the application/x-www-form-urlencoded content-type', ERR_INVALID_ARG_VALUE, { cause: request }); - } - return consumeStream(request); -} -async function validateHybridResponse(as, client, parameters, expectedNonce, expectedState, maxAge, options, fapi) { - assertAs(as); - assertClient(client); - if (parameters instanceof URL) { - if (!parameters.hash.length) { - throw CodedTypeError('"parameters" as an instance of URL must contain a hash (fragment) with the Authorization Response parameters', ERR_INVALID_ARG_VALUE); - } - parameters = new URLSearchParams(parameters.hash.slice(1)); - } - else if (looseInstanceOf(parameters, Request)) { - parameters = new URLSearchParams(await formPostResponse(parameters)); - } - else if (parameters instanceof URLSearchParams) { - parameters = new URLSearchParams(parameters); - } - else { - throw CodedTypeError('"parameters" must be an instance of URLSearchParams, URL, or Response', ERR_INVALID_ARG_TYPE); - } - const id_token = getURLSearchParameter(parameters, 'id_token'); - parameters.delete('id_token'); - switch (expectedState) { - case undefined: - case expectNoState: - break; - default: - assertString(expectedState, '"expectedState" argument'); - } - const result = validateAuthResponse({ - ...as, - authorization_response_iss_parameter_supported: false, - }, client, parameters, expectedState); - if (!id_token) { - throw OPE('"parameters" does not contain an ID Token', INVALID_RESPONSE); - } - const code = getURLSearchParameter(parameters, 'code'); - if (!code) { - throw OPE('"parameters" does not contain an Authorization Code', INVALID_RESPONSE); - } - const requiredClaims = [ - 'aud', - 'exp', - 'iat', - 'iss', - 'sub', - 'nonce', - 'c_hash', - ]; - const state = parameters.get('state'); - if (fapi && (typeof expectedState === 'string' || state !== null)) { - requiredClaims.push('s_hash'); - } - if (maxAge !== undefined) { - assertNumber(maxAge, false, '"maxAge" argument'); - } - else if (client.default_max_age !== undefined) { - assertNumber(client.default_max_age, false, '"client.default_max_age"'); - } - maxAge ??= client.default_max_age ?? skipAuthTimeCheck; - if (client.require_auth_time || maxAge !== skipAuthTimeCheck) { - requiredClaims.push('auth_time'); - } - const { claims, header, jwt } = await validateJwt(id_token, checkSigningAlgorithm.bind(undefined, client.id_token_signed_response_alg, as.id_token_signing_alg_values_supported, 'RS256'), getClockSkew(client), getClockTolerance(client), options?.[jweDecrypt]) - .then(validatePresence.bind(undefined, requiredClaims)) - .then(validateIssuer.bind(undefined, as)) - .then(validateAudience.bind(undefined, client.client_id)); - const clockSkew = getClockSkew(client); - const now = epochTime() + clockSkew; - if (claims.iat < now - 3600) { - throw OPE('unexpected JWT "iat" (issued at) claim value, it is too far in the past', JWT_TIMESTAMP_CHECK, { now, claims, claim: 'iat' }); - } - assertString(claims.c_hash, 'ID Token "c_hash" (code hash) claim value', INVALID_RESPONSE, { - claims, - }); - if (claims.auth_time !== undefined) { - assertNumber(claims.auth_time, false, 'ID Token "auth_time" (authentication time)', INVALID_RESPONSE, { claims }); - } - if (maxAge !== skipAuthTimeCheck) { - const now = epochTime() + getClockSkew(client); - const tolerance = getClockTolerance(client); - if (claims.auth_time + maxAge < now - tolerance) { - throw OPE('too much time has elapsed since the last End-User authentication', JWT_TIMESTAMP_CHECK, { claims, now, tolerance, claim: 'auth_time' }); - } - } - assertString(expectedNonce, '"expectedNonce" argument'); - if (claims.nonce !== expectedNonce) { - throw OPE('unexpected ID Token "nonce" claim value', JWT_CLAIM_COMPARISON, { - expected: expectedNonce, - claims, - claim: 'nonce', - }); - } - if (Array.isArray(claims.aud) && claims.aud.length !== 1) { - if (claims.azp === undefined) { - throw OPE('ID Token "aud" (audience) claim includes additional untrusted audiences', JWT_CLAIM_COMPARISON, { claims, claim: 'aud' }); - } - if (claims.azp !== client.client_id) { - throw OPE('unexpected ID Token "azp" (authorized party) claim value', JWT_CLAIM_COMPARISON, { - expected: client.client_id, - claims, - claim: 'azp', - }); - } - } - const { 0: protectedHeader, 1: payload, 2: encodedSignature } = jwt.split('.'); - const signature = b64u(encodedSignature); - const key = await getPublicSigKeyFromIssuerJwksUri(as, options, header); - await validateJwsSignature(protectedHeader, payload, key, signature); - if ((await idTokenHashMatches(code, claims.c_hash, header, 'c_hash')) !== true) { - throw OPE('invalid ID Token "c_hash" (code hash) claim value', JWT_CLAIM_COMPARISON, { - code, - alg: header.alg, - claim: 'c_hash', - claims, - }); - } - if ((fapi && state !== null) || claims.s_hash !== undefined) { - assertString(claims.s_hash, 'ID Token "s_hash" (state hash) claim value', INVALID_RESPONSE, { - claims, - }); - assertString(state, '"state" response parameter', INVALID_RESPONSE, { parameters }); - if ((await idTokenHashMatches(state, claims.s_hash, header, 's_hash')) !== true) { - throw OPE('invalid ID Token "s_hash" (state hash) claim value', JWT_CLAIM_COMPARISON, { - state, - alg: header.alg, - claim: 's_hash', - claims, - }); - } - } - return result; -} -function checkSigningAlgorithm(client, issuer, fallback, header) { - if (client !== undefined) { - if (typeof client === 'string' ? header.alg !== client : !client.includes(header.alg)) { - throw OPE('unexpected JWT "alg" header parameter', INVALID_RESPONSE, { - header, - expected: client, - reason: 'client configuration', - }); - } - return; - } - if (Array.isArray(issuer)) { - if (!issuer.includes(header.alg)) { - throw OPE('unexpected JWT "alg" header parameter', INVALID_RESPONSE, { - header, - expected: issuer, - reason: 'authorization server metadata', - }); - } - return; - } - if (fallback !== undefined) { - if (typeof fallback === 'string' - ? header.alg !== fallback - : typeof fallback === 'function' - ? !fallback(header.alg) - : !fallback.includes(header.alg)) { - throw OPE('unexpected JWT "alg" header parameter', INVALID_RESPONSE, { - header, - expected: fallback, - reason: 'default value', - }); - } - return; - } - throw OPE('missing client or server configuration to verify used JWT "alg" header parameter', undefined, { client, issuer, fallback }); -} -function getURLSearchParameter(parameters, name) { - const { 0: value, length } = parameters.getAll(name); - if (length > 1) { - throw OPE(`"${name}" parameter must be provided only once`, INVALID_RESPONSE); - } - return value; -} -const skipStateCheck = Symbol(); -const expectNoState = Symbol(); -function validateAuthResponse(as, client, parameters, expectedState) { - assertAs(as); - assertClient(client); - if (parameters instanceof URL) { - parameters = parameters.searchParams; - } - if (!(parameters instanceof URLSearchParams)) { - throw CodedTypeError('"parameters" must be an instance of URLSearchParams, or URL', ERR_INVALID_ARG_TYPE); - } - if (getURLSearchParameter(parameters, 'response')) { - throw OPE('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()', INVALID_RESPONSE, { parameters }); - } - const iss = getURLSearchParameter(parameters, 'iss'); - const state = getURLSearchParameter(parameters, 'state'); - if (!iss && as.authorization_response_iss_parameter_supported) { - throw OPE('response parameter "iss" (issuer) missing', INVALID_RESPONSE, { parameters }); - } - if (iss && iss !== as.issuer) { - throw OPE('unexpected "iss" (issuer) response parameter value', INVALID_RESPONSE, { - expected: as.issuer, - parameters, - }); - } - switch (expectedState) { - case undefined: - case expectNoState: - if (state !== undefined) { - throw OPE('unexpected "state" response parameter encountered', INVALID_RESPONSE, { - expected: undefined, - parameters, - }); - } - break; - case skipStateCheck: - break; - default: - assertString(expectedState, '"expectedState" argument'); - if (state !== expectedState) { - throw OPE(state === undefined - ? 'response parameter "state" missing' - : 'unexpected "state" response parameter value', INVALID_RESPONSE, { expected: expectedState, parameters }); - } - } - const error = getURLSearchParameter(parameters, 'error'); - if (error) { - throw new AuthorizationResponseError('authorization response from the server is an error', { - cause: parameters, - }); - } - const id_token = getURLSearchParameter(parameters, 'id_token'); - const token = getURLSearchParameter(parameters, 'token'); - if (id_token !== undefined || token !== undefined) { - throw new UnsupportedOperationError('implicit and hybrid flows are not supported'); - } - return brand(new URLSearchParams(parameters)); -} -function algToSubtle(alg) { - switch (alg) { - case 'PS256': - case 'PS384': - case 'PS512': - return { name: 'RSA-PSS', hash: `SHA-${alg.slice(-3)}` }; - case 'RS256': - case 'RS384': - case 'RS512': - return { name: 'RSASSA-PKCS1-v1_5', hash: `SHA-${alg.slice(-3)}` }; - case 'ES256': - case 'ES384': - return { name: 'ECDSA', namedCurve: `P-${alg.slice(-3)}` }; - case 'ES512': - return { name: 'ECDSA', namedCurve: 'P-521' }; - case 'Ed25519': - case 'EdDSA': - return 'Ed25519'; - default: - throw new UnsupportedOperationError('unsupported JWS algorithm', { cause: { alg } }); - } -} -async function importJwk(alg, jwk) { - const { ext, key_ops, use, ...key } = jwk; - return crypto.subtle.importKey('jwk', key, algToSubtle(alg), true, ['verify']); -} -async function deviceAuthorizationRequest(as, client, clientAuthentication, parameters, options) { - assertAs(as); - assertClient(client); - const url = resolveEndpoint(as, 'device_authorization_endpoint', client.use_mtls_endpoint_aliases, options?.[allowInsecureRequests] !== true); - const body = new URLSearchParams(parameters); - body.set('client_id', client.client_id); - const headers = prepareHeaders(options?.headers); - headers.set('accept', 'application/json'); - return authenticatedRequest(as, client, clientAuthentication, url, body, headers, options); -} -async function processDeviceAuthorizationResponse(as, client, response) { - assertAs(as); - assertClient(client); - if (!looseInstanceOf(response, Response)) { - throw CodedTypeError('"response" must be an instance of Response', ERR_INVALID_ARG_TYPE); - } - let challenges; - if ((challenges = parseWwwAuthenticateChallenges(response))) { - throw new WWWAuthenticateChallengeError('server responded with a challenge in the WWW-Authenticate HTTP Header', { cause: challenges, response }); - } - if (response.status !== 200) { - let err; - if ((err = await handleOAuthBodyError(response))) { - await response.body?.cancel(); - throw new ResponseBodyError('server responded with an error in the response body', { - cause: err, - response, - }); - } - throw OPE('"response" is not a conform Device Authorization Endpoint response', RESPONSE_IS_NOT_CONFORM, response); - } - assertReadableResponse(response); - assertApplicationJson(response); - let json; - try { - json = await response.json(); - } - catch (cause) { - throw OPE('failed to parse "response" body as JSON', PARSE_ERROR, cause); - } - if (!isJsonObject(json)) { - throw OPE('"response" body must be a top level object', INVALID_RESPONSE, { body: json }); - } - assertString(json.device_code, '"response" body "device_code" property', INVALID_RESPONSE, { - body: json, - }); - assertString(json.user_code, '"response" body "user_code" property', INVALID_RESPONSE, { - body: json, - }); - assertString(json.verification_uri, '"response" body "verification_uri" property', INVALID_RESPONSE, { body: json }); - let expiresIn = typeof json.expires_in !== 'number' ? parseFloat(json.expires_in) : json.expires_in; - assertNumber(expiresIn, false, '"response" body "expires_in" property', INVALID_RESPONSE, { - body: json, - }); - json.expires_in = expiresIn; - if (json.verification_uri_complete !== undefined) { - assertString(json.verification_uri_complete, '"response" body "verification_uri_complete" property', INVALID_RESPONSE, { body: json }); - } - if (json.interval !== undefined) { - assertNumber(json.interval, false, '"response" body "interval" property', INVALID_RESPONSE, { - body: json, - }); - } - return json; -} -async function deviceCodeGrantRequest(as, client, clientAuthentication, deviceCode, options) { - assertAs(as); - assertClient(client); - assertString(deviceCode, '"deviceCode"'); - const parameters = new URLSearchParams(options?.additionalParameters); - parameters.set('device_code', deviceCode); - return tokenEndpointRequest(as, client, clientAuthentication, 'urn:ietf:params:oauth:grant-type:device_code', parameters, options); -} -async function processDeviceCodeResponse(as, client, response, options) { - return processGenericAccessTokenResponse(as, client, response, undefined, options); -} -async function generateKeyPair(alg, options) { - assertString(alg, '"alg"'); - const algorithm = algToSubtle(alg); - if (alg.startsWith('PS') || alg.startsWith('RS')) { - Object.assign(algorithm, { - modulusLength: options?.modulusLength ?? 2048, - publicExponent: new Uint8Array([0x01, 0x00, 0x01]), - }); - } - return crypto.subtle.generateKey(algorithm, options?.extractable ?? false, [ - 'sign', - 'verify', - ]); -} -function normalizeHtu(htu) { - const url = new URL(htu); - url.search = ''; - url.hash = ''; - return url.href; -} -async function validateDPoP(request, accessToken, accessTokenClaims, options) { - const headerValue = request.headers.get('dpop'); - if (headerValue === null) { - throw OPE('operation indicated DPoP use but the request has no DPoP HTTP Header', INVALID_REQUEST, { headers: request.headers }); - } - if (request.headers.get('authorization')?.toLowerCase().startsWith('dpop ') === false) { - throw OPE(`operation indicated DPoP use but the request's Authorization HTTP Header scheme is not DPoP`, INVALID_REQUEST, { headers: request.headers }); - } - if (typeof accessTokenClaims.cnf?.jkt !== 'string') { - throw OPE('operation indicated DPoP use but the JWT Access Token has no jkt confirmation claim', INVALID_REQUEST, { claims: accessTokenClaims }); - } - const clockSkew = getClockSkew(options); - const proof = await validateJwt(headerValue, checkSigningAlgorithm.bind(undefined, options?.signingAlgorithms, undefined, build_supported), clockSkew, getClockTolerance(options), undefined) - .then(checkJwtType.bind(undefined, 'dpop+jwt')) - .then(validatePresence.bind(undefined, ['iat', 'jti', 'ath', 'htm', 'htu'])); - const now = epochTime() + clockSkew; - const diff = Math.abs(now - proof.claims.iat); - if (diff > 300) { - throw OPE('DPoP Proof iat is not recent enough', JWT_TIMESTAMP_CHECK, { - now, - claims: proof.claims, - claim: 'iat', - }); - } - if (proof.claims.htm !== request.method) { - throw OPE('DPoP Proof htm mismatch', JWT_CLAIM_COMPARISON, { - expected: request.method, - claims: proof.claims, - claim: 'htm', - }); - } - if (typeof proof.claims.htu !== 'string' || - normalizeHtu(proof.claims.htu) !== normalizeHtu(request.url)) { - throw OPE('DPoP Proof htu mismatch', JWT_CLAIM_COMPARISON, { - expected: normalizeHtu(request.url), - claims: proof.claims, - claim: 'htu', - }); - } - { - const expected = b64u(await crypto.subtle.digest('SHA-256', buf(accessToken))); - if (proof.claims.ath !== expected) { - throw OPE('DPoP Proof ath mismatch', JWT_CLAIM_COMPARISON, { - expected, - claims: proof.claims, - claim: 'ath', - }); - } - } - { - let components; - switch (proof.header.jwk.kty) { - case 'EC': - components = { - crv: proof.header.jwk.crv, - kty: proof.header.jwk.kty, - x: proof.header.jwk.x, - y: proof.header.jwk.y, - }; - break; - case 'OKP': - components = { - crv: proof.header.jwk.crv, - kty: proof.header.jwk.kty, - x: proof.header.jwk.x, - }; - break; - case 'RSA': - components = { - e: proof.header.jwk.e, - kty: proof.header.jwk.kty, - n: proof.header.jwk.n, - }; - break; - default: - throw new UnsupportedOperationError('unsupported JWK key type', { cause: proof.header.jwk }); - } - const expected = b64u(await crypto.subtle.digest('SHA-256', buf(JSON.stringify(components)))); - if (accessTokenClaims.cnf.jkt !== expected) { - throw OPE('JWT Access Token confirmation mismatch', JWT_CLAIM_COMPARISON, { - expected, - claims: accessTokenClaims, - claim: 'cnf.jkt', - }); - } - } - const { 0: protectedHeader, 1: payload, 2: encodedSignature } = headerValue.split('.'); - const signature = b64u(encodedSignature); - const { jwk, alg } = proof.header; - if (!jwk) { - throw OPE('DPoP Proof is missing the jwk header parameter', INVALID_REQUEST, { - header: proof.header, - }); - } - const key = await importJwk(alg, jwk); - if (key.type !== 'public') { - throw OPE('DPoP Proof jwk header parameter must contain a public key', INVALID_REQUEST, { - header: proof.header, - }); - } - await validateJwsSignature(protectedHeader, payload, key, signature); -} -async function validateJwtAccessToken(as, request, expectedAudience, options) { - assertAs(as); - if (!looseInstanceOf(request, Request)) { - throw CodedTypeError('"request" must be an instance of Request', ERR_INVALID_ARG_TYPE); - } - assertString(expectedAudience, '"expectedAudience"'); - const authorization = request.headers.get('authorization'); - if (authorization === null) { - throw OPE('"request" is missing an Authorization HTTP Header', INVALID_REQUEST, { - headers: request.headers, - }); - } - let { 0: scheme, 1: accessToken, length } = authorization.split(' '); - scheme = scheme.toLowerCase(); - switch (scheme) { - case 'dpop': - case 'bearer': - break; - default: - throw new UnsupportedOperationError('unsupported Authorization HTTP Header scheme', { - cause: { headers: request.headers }, - }); - } - if (length !== 2) { - throw OPE('invalid Authorization HTTP Header format', INVALID_REQUEST, { - headers: request.headers, - }); - } - const requiredClaims = [ - 'iss', - 'exp', - 'aud', - 'sub', - 'iat', - 'jti', - 'client_id', - ]; - if (options?.requireDPoP || scheme === 'dpop' || request.headers.has('dpop')) { - requiredClaims.push('cnf'); - } - const { claims, header } = await validateJwt(accessToken, checkSigningAlgorithm.bind(undefined, options?.signingAlgorithms, undefined, build_supported), getClockSkew(options), getClockTolerance(options), undefined) - .then(checkJwtType.bind(undefined, 'at+jwt')) - .then(validatePresence.bind(undefined, requiredClaims)) - .then(validateIssuer.bind(undefined, as)) - .then(validateAudience.bind(undefined, expectedAudience)) - .catch(reassignRSCode); - for (const claim of ['client_id', 'jti', 'sub']) { - if (typeof claims[claim] !== 'string') { - throw OPE(`unexpected JWT "${claim}" claim type`, INVALID_REQUEST, { claims }); - } - } - if ('cnf' in claims) { - if (!isJsonObject(claims.cnf)) { - throw OPE('unexpected JWT "cnf" (confirmation) claim value', INVALID_REQUEST, { claims }); - } - const { 0: cnf, length } = Object.keys(claims.cnf); - if (length) { - if (length !== 1) { - throw new UnsupportedOperationError('multiple confirmation claims are not supported', { - cause: { claims }, - }); - } - if (cnf !== 'jkt') { - throw new UnsupportedOperationError('unsupported JWT Confirmation method', { - cause: { claims }, - }); - } - } - } - const { 0: protectedHeader, 1: payload, 2: encodedSignature } = accessToken.split('.'); - const signature = b64u(encodedSignature); - const key = await getPublicSigKeyFromIssuerJwksUri(as, options, header); - await validateJwsSignature(protectedHeader, payload, key, signature); - if (options?.requireDPoP || - scheme === 'dpop' || - claims.cnf?.jkt !== undefined || - request.headers.has('dpop')) { - await validateDPoP(request, accessToken, claims, options).catch(reassignRSCode); - } - return claims; -} -function reassignRSCode(err) { - if (err instanceof OperationProcessingError && err?.code === INVALID_REQUEST) { - err.code = INVALID_RESPONSE; - } - throw err; -} -const _nopkce = Symbol(); -const _nodiscoverycheck = Symbol(); -const _expectedIssuer = Symbol(); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: external "node:buffer" -const external_node_buffer_namespaceObject = require("node:buffer"); -// EXTERNAL MODULE: external "node:crypto" -var external_node_crypto_ = __nccwpck_require__(6005); -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/digest.js - -const digest = (algorithm, data) => (0,external_node_crypto_.createHash)(algorithm).update(data).digest(); -/* harmony default export */ const runtime_digest = (digest); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/buffer_utils.js - -const buffer_utils_encoder = new TextEncoder(); -const buffer_utils_decoder = new TextDecoder(); -const MAX_INT32 = 2 ** 32; -function buffer_utils_concat(...buffers) { - const size = buffers.reduce((acc, { length }) => acc + length, 0); - const buf = new Uint8Array(size); - let i = 0; - for (const buffer of buffers) { - buf.set(buffer, i); - i += buffer.length; - } - return buf; -} -function buffer_utils_p2s(alg, p2sInput) { - return buffer_utils_concat(buffer_utils_encoder.encode(alg), new Uint8Array([0]), p2sInput); -} -function writeUInt32BE(buf, value, offset) { - if (value < 0 || value >= MAX_INT32) { - throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`); - } - buf.set([value >>> 24, value >>> 16, value >>> 8, value & 0xff], offset); -} -function uint64be(value) { - const high = Math.floor(value / MAX_INT32); - const low = value % MAX_INT32; - const buf = new Uint8Array(8); - writeUInt32BE(buf, high, 0); - writeUInt32BE(buf, low, 4); - return buf; -} -function uint32be(value) { - const buf = new Uint8Array(4); - writeUInt32BE(buf, value); - return buf; -} -function lengthAndInput(input) { - return buffer_utils_concat(uint32be(input.length), input); -} -async function concatKdf(secret, bits, value) { - const iterations = Math.ceil((bits >> 3) / 32); - const res = new Uint8Array(iterations * 32); - for (let iter = 0; iter < iterations; iter++) { - const buf = new Uint8Array(4 + secret.length + value.length); - buf.set(uint32be(iter + 1)); - buf.set(secret, 4); - buf.set(value, 4 + secret.length); - res.set(await runtime_digest('sha256', buf), iter * 32); - } - return res.slice(0, bits >> 3); -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/base64url.js - - -function normalize(input) { - let encoded = input; - if (encoded instanceof Uint8Array) { - encoded = buffer_utils_decoder.decode(encoded); - } - return encoded; -} -const encode = (input) => Buffer.from(input).toString('base64url'); -const decodeBase64 = (input) => new Uint8Array(Buffer.from(input, 'base64')); -const encodeBase64 = (input) => Buffer.from(input).toString('base64'); - -const decode = (input) => new Uint8Array(external_node_buffer_namespaceObject.Buffer.from(normalize(input), 'base64url')); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/util/errors.js -class JOSEError extends Error { - static code = 'ERR_JOSE_GENERIC'; - code = 'ERR_JOSE_GENERIC'; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - Error.captureStackTrace?.(this, this.constructor); - } -} -class JWTClaimValidationFailed extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWT_CLAIM_VALIDATION_FAILED')); - code = 'ERR_JWT_CLAIM_VALIDATION_FAILED'; - claim; - reason; - payload; - constructor(message, payload, claim = 'unspecified', reason = 'unspecified') { - super(message, { cause: { claim, reason, payload } }); - this.claim = claim; - this.reason = reason; - this.payload = payload; - } -} -class JWTExpired extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWT_EXPIRED')); - code = 'ERR_JWT_EXPIRED'; - claim; - reason; - payload; - constructor(message, payload, claim = 'unspecified', reason = 'unspecified') { - super(message, { cause: { claim, reason, payload } }); - this.claim = claim; - this.reason = reason; - this.payload = payload; - } -} -class JOSEAlgNotAllowed extends JOSEError { - static code = 'ERR_JOSE_ALG_NOT_ALLOWED'; - code = 'ERR_JOSE_ALG_NOT_ALLOWED'; -} -class errors_JOSENotSupported extends JOSEError { - static code = 'ERR_JOSE_NOT_SUPPORTED'; - code = 'ERR_JOSE_NOT_SUPPORTED'; -} -class JWEDecryptionFailed extends JOSEError { - static code = 'ERR_JWE_DECRYPTION_FAILED'; - code = 'ERR_JWE_DECRYPTION_FAILED'; - constructor(message = 'decryption operation failed', options) { - super(message, options); - } -} -class JWEInvalid extends JOSEError { - static code = 'ERR_JWE_INVALID'; - code = 'ERR_JWE_INVALID'; -} -class JWSInvalid extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWS_INVALID')); - code = 'ERR_JWS_INVALID'; -} -class JWTInvalid extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWT_INVALID')); - code = 'ERR_JWT_INVALID'; -} -class JWKInvalid extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWK_INVALID')); - code = 'ERR_JWK_INVALID'; -} -class JWKSInvalid extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWKS_INVALID')); - code = 'ERR_JWKS_INVALID'; -} -class JWKSNoMatchingKey extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWKS_NO_MATCHING_KEY')); - code = 'ERR_JWKS_NO_MATCHING_KEY'; - constructor(message = 'no applicable key found in the JSON Web Key Set', options) { - super(message, options); - } -} -class JWKSMultipleMatchingKeys extends (/* unused pure expression or super */ null && (JOSEError)) { - [Symbol.asyncIterator]; - static code = (/* unused pure expression or super */ null && ('ERR_JWKS_MULTIPLE_MATCHING_KEYS')); - code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'; - constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) { - super(message, options); - } -} -class JWKSTimeout extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWKS_TIMEOUT')); - code = 'ERR_JWKS_TIMEOUT'; - constructor(message = 'request timed out', options) { - super(message, options); - } -} -class JWSSignatureVerificationFailed extends (/* unused pure expression or super */ null && (JOSEError)) { - static code = (/* unused pure expression or super */ null && ('ERR_JWS_SIGNATURE_VERIFICATION_FAILED')); - code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'; - constructor(message = 'signature verification failed', options) { - super(message, options); - } -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/iv.js - - -function bitLength(alg) { - switch (alg) { - case 'A128GCM': - case 'A128GCMKW': - case 'A192GCM': - case 'A192GCMKW': - case 'A256GCM': - case 'A256GCMKW': - return 96; - case 'A128CBC-HS256': - case 'A192CBC-HS384': - case 'A256CBC-HS512': - return 128; - default: - throw new errors_JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); - } -} -/* harmony default export */ const iv = ((alg) => random(new Uint8Array(bitLength(alg) >> 3))); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/check_iv_length.js - - -const checkIvLength = (enc, iv) => { - if (iv.length << 3 !== bitLength(enc)) { - throw new JWEInvalid('Invalid Initialization Vector length'); - } -}; -/* harmony default export */ const check_iv_length = (checkIvLength); - -;// CONCATENATED MODULE: external "node:util" -const external_node_util_namespaceObject = require("node:util"); -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/is_key_object.js - -/* harmony default export */ const is_key_object = ((obj) => external_node_util_namespaceObject.types.isKeyObject(obj)); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/check_cek_length.js - - -const checkCekLength = (enc, cek) => { - let expected; - switch (enc) { - case 'A128CBC-HS256': - case 'A192CBC-HS384': - case 'A256CBC-HS512': - expected = parseInt(enc.slice(-3), 10); - break; - case 'A128GCM': - case 'A192GCM': - case 'A256GCM': - expected = parseInt(enc.slice(1, 4), 10); - break; - default: - throw new errors_JOSENotSupported(`Content Encryption Algorithm ${enc} is not supported either by JOSE or your javascript runtime`); - } - if (cek instanceof Uint8Array) { - const actual = cek.byteLength << 3; - if (actual !== expected) { - throw new JWEInvalid(`Invalid Content Encryption Key length. Expected ${expected} bits, got ${actual} bits`); - } - return; - } - if (is_key_object(cek) && cek.type === 'secret') { - const actual = cek.symmetricKeySize << 3; - if (actual !== expected) { - throw new JWEInvalid(`Invalid Content Encryption Key length. Expected ${expected} bits, got ${actual} bits`); - } - return; - } - throw new TypeError('Invalid Content Encryption Key type'); -}; -/* harmony default export */ const check_cek_length = (checkCekLength); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/timing_safe_equal.js - -const timingSafeEqual = external_node_crypto_.timingSafeEqual; -/* harmony default export */ const timing_safe_equal = (timingSafeEqual); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/cbc_tag.js - - -function cbcTag(aad, iv, ciphertext, macSize, macKey, keySize) { - const macData = buffer_utils_concat(aad, iv, ciphertext, uint64be(aad.length << 3)); - const hmac = (0,external_node_crypto_.createHmac)(`sha${macSize}`, macKey); - hmac.update(macData); - return hmac.digest().slice(0, keySize >> 3); -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/webcrypto.js - - -const webcrypto = external_node_crypto_.webcrypto; -/* harmony default export */ const runtime_webcrypto = (webcrypto); -const webcrypto_isCryptoKey = (key) => external_node_util_namespaceObject.types.isCryptoKey(key); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/crypto_key.js -function unusable(name, prop = 'algorithm.name') { - return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`); -} -function isAlgorithm(algorithm, name) { - return algorithm.name === name; -} -function getHashLength(hash) { - return parseInt(hash.name.slice(4), 10); -} -function crypto_key_getNamedCurve(alg) { - switch (alg) { - case 'ES256': - return 'P-256'; - case 'ES384': - return 'P-384'; - case 'ES512': - return 'P-521'; - default: - throw new Error('unreachable'); - } -} -function checkUsage(key, usages) { - if (usages.length && !usages.some((expected) => key.usages.includes(expected))) { - let msg = 'CryptoKey does not support this operation, its usages must include '; - if (usages.length > 2) { - const last = usages.pop(); - msg += `one of ${usages.join(', ')}, or ${last}.`; - } - else if (usages.length === 2) { - msg += `one of ${usages[0]} or ${usages[1]}.`; - } - else { - msg += `${usages[0]}.`; - } - throw new TypeError(msg); - } -} -function checkSigCryptoKey(key, alg, ...usages) { - switch (alg) { - case 'HS256': - case 'HS384': - case 'HS512': { - if (!isAlgorithm(key.algorithm, 'HMAC')) - throw unusable('HMAC'); - const expected = parseInt(alg.slice(2), 10); - const actual = getHashLength(key.algorithm.hash); - if (actual !== expected) - throw unusable(`SHA-${expected}`, 'algorithm.hash'); - break; - } - case 'RS256': - case 'RS384': - case 'RS512': { - if (!isAlgorithm(key.algorithm, 'RSASSA-PKCS1-v1_5')) - throw unusable('RSASSA-PKCS1-v1_5'); - const expected = parseInt(alg.slice(2), 10); - const actual = getHashLength(key.algorithm.hash); - if (actual !== expected) - throw unusable(`SHA-${expected}`, 'algorithm.hash'); - break; - } - case 'PS256': - case 'PS384': - case 'PS512': { - if (!isAlgorithm(key.algorithm, 'RSA-PSS')) - throw unusable('RSA-PSS'); - const expected = parseInt(alg.slice(2), 10); - const actual = getHashLength(key.algorithm.hash); - if (actual !== expected) - throw unusable(`SHA-${expected}`, 'algorithm.hash'); - break; - } - case 'EdDSA': { - if (key.algorithm.name !== 'Ed25519' && key.algorithm.name !== 'Ed448') { - throw unusable('Ed25519 or Ed448'); - } - break; - } - case 'ES256': - case 'ES384': - case 'ES512': { - if (!isAlgorithm(key.algorithm, 'ECDSA')) - throw unusable('ECDSA'); - const expected = crypto_key_getNamedCurve(alg); - const actual = key.algorithm.namedCurve; - if (actual !== expected) - throw unusable(expected, 'algorithm.namedCurve'); - break; - } - default: - throw new TypeError('CryptoKey does not support this operation'); - } - checkUsage(key, usages); -} -function checkEncCryptoKey(key, alg, ...usages) { - switch (alg) { - case 'A128GCM': - case 'A192GCM': - case 'A256GCM': { - if (!isAlgorithm(key.algorithm, 'AES-GCM')) - throw unusable('AES-GCM'); - const expected = parseInt(alg.slice(1, 4), 10); - const actual = key.algorithm.length; - if (actual !== expected) - throw unusable(expected, 'algorithm.length'); - break; - } - case 'A128KW': - case 'A192KW': - case 'A256KW': { - if (!isAlgorithm(key.algorithm, 'AES-KW')) - throw unusable('AES-KW'); - const expected = parseInt(alg.slice(1, 4), 10); - const actual = key.algorithm.length; - if (actual !== expected) - throw unusable(expected, 'algorithm.length'); - break; - } - case 'ECDH': { - switch (key.algorithm.name) { - case 'ECDH': - case 'X25519': - case 'X448': - break; - default: - throw unusable('ECDH, X25519, or X448'); - } - break; - } - case 'PBES2-HS256+A128KW': - case 'PBES2-HS384+A192KW': - case 'PBES2-HS512+A256KW': - if (!isAlgorithm(key.algorithm, 'PBKDF2')) - throw unusable('PBKDF2'); - break; - case 'RSA-OAEP': - case 'RSA-OAEP-256': - case 'RSA-OAEP-384': - case 'RSA-OAEP-512': { - if (!isAlgorithm(key.algorithm, 'RSA-OAEP')) - throw unusable('RSA-OAEP'); - const expected = parseInt(alg.slice(9), 10) || 1; - const actual = getHashLength(key.algorithm.hash); - if (actual !== expected) - throw unusable(`SHA-${expected}`, 'algorithm.hash'); - break; - } - default: - throw new TypeError('CryptoKey does not support this operation'); - } - checkUsage(key, usages); -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/invalid_key_input.js -function message(msg, actual, ...types) { - types = types.filter(Boolean); - if (types.length > 2) { - const last = types.pop(); - msg += `one of type ${types.join(', ')}, or ${last}.`; - } - else if (types.length === 2) { - msg += `one of type ${types[0]} or ${types[1]}.`; - } - else { - msg += `of type ${types[0]}.`; - } - if (actual == null) { - msg += ` Received ${actual}`; - } - else if (typeof actual === 'function' && actual.name) { - msg += ` Received function ${actual.name}`; - } - else if (typeof actual === 'object' && actual != null) { - if (actual.constructor?.name) { - msg += ` Received an instance of ${actual.constructor.name}`; - } - } - return msg; -} -/* harmony default export */ const invalid_key_input = ((actual, ...types) => { - return message('Key must be ', actual, ...types); -}); -function withAlg(alg, actual, ...types) { - return message(`Key for the ${alg} algorithm must be `, actual, ...types); -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/ciphers.js - -let ciphers; -/* harmony default export */ const runtime_ciphers = ((algorithm) => { - ciphers ||= new Set((0,external_node_crypto_.getCiphers)()); - return ciphers.has(algorithm); -}); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/is_key_like.js - - -/* harmony default export */ const is_key_like = ((key) => is_key_object(key) || webcrypto_isCryptoKey(key)); -const is_key_like_types = ['KeyObject']; -if (globalThis.CryptoKey || runtime_webcrypto.CryptoKey) { - is_key_like_types.push('CryptoKey'); -} - - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/decrypt.js - - - - - - - - - - - - - -function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) { - const keySize = parseInt(enc.slice(1, 4), 10); - if (is_key_object(cek)) { - cek = cek.export(); - } - const encKey = cek.subarray(keySize >> 3); - const macKey = cek.subarray(0, keySize >> 3); - const macSize = parseInt(enc.slice(-3), 10); - const algorithm = `aes-${keySize}-cbc`; - if (!runtime_ciphers(algorithm)) { - throw new errors_JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); - } - const expectedTag = cbcTag(aad, iv, ciphertext, macSize, macKey, keySize); - let macCheckPassed; - try { - macCheckPassed = timing_safe_equal(tag, expectedTag); - } - catch { - } - if (!macCheckPassed) { - throw new JWEDecryptionFailed(); - } - let plaintext; - try { - const decipher = (0,external_node_crypto_.createDecipheriv)(algorithm, encKey, iv); - plaintext = buffer_utils_concat(decipher.update(ciphertext), decipher.final()); - } - catch { - } - if (!plaintext) { - throw new JWEDecryptionFailed(); - } - return plaintext; -} -function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) { - const keySize = parseInt(enc.slice(1, 4), 10); - const algorithm = `aes-${keySize}-gcm`; - if (!runtime_ciphers(algorithm)) { - throw new errors_JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`); - } - try { - const decipher = (0,external_node_crypto_.createDecipheriv)(algorithm, cek, iv, { authTagLength: 16 }); - decipher.setAuthTag(tag); - if (aad.byteLength) { - decipher.setAAD(aad, { plaintextLength: ciphertext.length }); - } - const plaintext = decipher.update(ciphertext); - decipher.final(); - return plaintext; - } - catch { - throw new JWEDecryptionFailed(); - } -} -const decrypt = (enc, cek, ciphertext, iv, tag, aad) => { - let key; - if (webcrypto_isCryptoKey(cek)) { - checkEncCryptoKey(cek, enc, 'decrypt'); - key = external_node_crypto_.KeyObject.from(cek); - } - else if (cek instanceof Uint8Array || is_key_object(cek)) { - key = cek; - } - else { - throw new TypeError(invalid_key_input(cek, ...is_key_like_types, 'Uint8Array')); - } - if (!iv) { - throw new JWEInvalid('JWE Initialization Vector missing'); - } - if (!tag) { - throw new JWEInvalid('JWE Authentication Tag missing'); - } - check_cek_length(enc, key); - check_iv_length(enc, iv); - switch (enc) { - case 'A128CBC-HS256': - case 'A192CBC-HS384': - case 'A256CBC-HS512': - return cbcDecrypt(enc, key, ciphertext, iv, tag, aad); - case 'A128GCM': - case 'A192GCM': - case 'A256GCM': - return gcmDecrypt(enc, key, ciphertext, iv, tag, aad); - default: - throw new errors_JOSENotSupported('Unsupported JWE Content Encryption Algorithm'); - } -}; -/* harmony default export */ const runtime_decrypt = (decrypt); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/is_disjoint.js -const isDisjoint = (...headers) => { - const sources = headers.filter(Boolean); - if (sources.length === 0 || sources.length === 1) { - return true; - } - let acc; - for (const header of sources) { - const parameters = Object.keys(header); - if (!acc || acc.size === 0) { - acc = new Set(parameters); - continue; - } - for (const parameter of parameters) { - if (acc.has(parameter)) { - return false; - } - acc.add(parameter); - } - } - return true; -}; -/* harmony default export */ const is_disjoint = (isDisjoint); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/is_object.js -function isObjectLike(value) { - return typeof value === 'object' && value !== null; -} -function isObject(input) { - if (!isObjectLike(input) || Object.prototype.toString.call(input) !== '[object Object]') { - return false; - } - if (Object.getPrototypeOf(input) === null) { - return true; - } - let proto = input; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - return Object.getPrototypeOf(input) === proto; -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/aeskw.js - - - - - - - - - - -function checkKeySize(key, alg) { - if (key.symmetricKeySize << 3 !== parseInt(alg.slice(1, 4), 10)) { - throw new TypeError(`Invalid key size for alg: ${alg}`); - } -} -function ensureKeyObject(key, alg, usage) { - if (is_key_object(key)) { - return key; - } - if (key instanceof Uint8Array) { - return (0,external_node_crypto_.createSecretKey)(key); - } - if (webcrypto_isCryptoKey(key)) { - checkEncCryptoKey(key, alg, usage); - return external_node_crypto_.KeyObject.from(key); - } - throw new TypeError(invalid_key_input(key, ...is_key_like_types, 'Uint8Array')); -} -const aeskw_wrap = (alg, key, cek) => { - const size = parseInt(alg.slice(1, 4), 10); - const algorithm = `aes${size}-wrap`; - if (!supported(algorithm)) { - throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); - } - const keyObject = ensureKeyObject(key, alg, 'wrapKey'); - checkKeySize(keyObject, alg); - const cipher = createCipheriv(algorithm, keyObject, Buffer.alloc(8, 0xa6)); - return concat(cipher.update(cek), cipher.final()); -}; -const unwrap = (alg, key, encryptedKey) => { - const size = parseInt(alg.slice(1, 4), 10); - const algorithm = `aes${size}-wrap`; - if (!runtime_ciphers(algorithm)) { - throw new errors_JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`); - } - const keyObject = ensureKeyObject(key, alg, 'unwrapKey'); - checkKeySize(keyObject, alg); - const cipher = (0,external_node_crypto_.createDecipheriv)(algorithm, keyObject, external_node_buffer_namespaceObject.Buffer.alloc(8, 0xa6)); - return buffer_utils_concat(cipher.update(encryptedKey), cipher.final()); -}; - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/is_jwk.js - -function isJWK(key) { - return isObject(key) && typeof key.kty === 'string'; -} -function isPrivateJWK(key) { - return key.kty !== 'oct' && typeof key.d === 'string'; -} -function isPublicJWK(key) { - return key.kty !== 'oct' && typeof key.d === 'undefined'; -} -function isSecretJWK(key) { - return isJWK(key) && key.kty === 'oct' && typeof key.k === 'string'; -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/get_named_curve.js - - - - - - - -const weakMap = new WeakMap(); -const namedCurveToJOSE = (namedCurve) => { - switch (namedCurve) { - case 'prime256v1': - return 'P-256'; - case 'secp384r1': - return 'P-384'; - case 'secp521r1': - return 'P-521'; - case 'secp256k1': - return 'secp256k1'; - default: - throw new errors_JOSENotSupported('Unsupported key curve for this operation'); - } -}; -const get_named_curve_getNamedCurve = (kee, raw) => { - let key; - if (webcrypto_isCryptoKey(kee)) { - key = external_node_crypto_.KeyObject.from(kee); - } - else if (is_key_object(kee)) { - key = kee; - } - else if (isJWK(kee)) { - return kee.crv; - } - else { - throw new TypeError(invalid_key_input(kee, ...is_key_like_types)); - } - if (key.type === 'secret') { - throw new TypeError('only "private" or "public" type keys can be used for this operation'); - } - switch (key.asymmetricKeyType) { - case 'ed25519': - case 'ed448': - return `Ed${key.asymmetricKeyType.slice(2)}`; - case 'x25519': - case 'x448': - return `X${key.asymmetricKeyType.slice(1)}`; - case 'ec': { - const namedCurve = key.asymmetricKeyDetails.namedCurve; - if (raw) { - return namedCurve; - } - return namedCurveToJOSE(namedCurve); - } - default: - throw new TypeError('Invalid asymmetric key type for this operation'); - } -}; -/* harmony default export */ const get_named_curve = (get_named_curve_getNamedCurve); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/ecdhes.js - - - - - - - - - - -const ecdhes_generateKeyPair = (0,external_node_util_namespaceObject.promisify)(external_node_crypto_.generateKeyPair); -async function deriveKey(publicKee, privateKee, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) { - let publicKey; - if (webcrypto_isCryptoKey(publicKee)) { - checkEncCryptoKey(publicKee, 'ECDH'); - publicKey = external_node_crypto_.KeyObject.from(publicKee); - } - else if (is_key_object(publicKee)) { - publicKey = publicKee; - } - else { - throw new TypeError(invalid_key_input(publicKee, ...is_key_like_types)); - } - let privateKey; - if (webcrypto_isCryptoKey(privateKee)) { - checkEncCryptoKey(privateKee, 'ECDH', 'deriveBits'); - privateKey = external_node_crypto_.KeyObject.from(privateKee); - } - else if (is_key_object(privateKee)) { - privateKey = privateKee; - } - else { - throw new TypeError(invalid_key_input(privateKee, ...is_key_like_types)); - } - const value = buffer_utils_concat(lengthAndInput(buffer_utils_encoder.encode(algorithm)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyLength)); - const sharedSecret = (0,external_node_crypto_.diffieHellman)({ privateKey, publicKey }); - return concatKdf(sharedSecret, keyLength, value); -} -async function generateEpk(kee) { - let key; - if (isCryptoKey(kee)) { - key = KeyObject.from(kee); - } - else if (isKeyObject(kee)) { - key = kee; - } - else { - throw new TypeError(invalidKeyInput(kee, ...types)); - } - switch (key.asymmetricKeyType) { - case 'x25519': - return ecdhes_generateKeyPair('x25519'); - case 'x448': { - return ecdhes_generateKeyPair('x448'); - } - case 'ec': { - const namedCurve = getNamedCurve(key); - return ecdhes_generateKeyPair('ec', { namedCurve }); - } - default: - throw new JOSENotSupported('Invalid or unsupported EPK'); - } -} -const ecdhAllowed = (key) => ['P-256', 'P-384', 'P-521', 'X25519', 'X448'].includes(get_named_curve(key)); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/check_p2s.js - -function check_p2s_checkP2s(p2s) { - if (!(p2s instanceof Uint8Array) || p2s.length < 8) { - throw new JWEInvalid('PBES2 Salt Input must be 8 or more octets'); - } -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/pbes2kw.js - - - - - - - - - - - - -const pbkdf2 = (0,external_node_util_namespaceObject.promisify)(external_node_crypto_.pbkdf2); -function getPassword(key, alg) { - if (is_key_object(key)) { - return key.export(); - } - if (key instanceof Uint8Array) { - return key; - } - if (webcrypto_isCryptoKey(key)) { - checkEncCryptoKey(key, alg, 'deriveBits', 'deriveKey'); - return external_node_crypto_.KeyObject.from(key).export(); - } - throw new TypeError(invalid_key_input(key, ...is_key_like_types, 'Uint8Array')); -} -const pbes2kw_encrypt = async (alg, key, cek, p2c = 2048, p2s = random(new Uint8Array(16))) => { - checkP2s(p2s); - const salt = concatSalt(alg, p2s); - const keylen = parseInt(alg.slice(13, 16), 10) >> 3; - const password = getPassword(key, alg); - const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`); - const encryptedKey = await wrap(alg.slice(-6), derivedKey, cek); - return { encryptedKey, p2c, p2s: base64url(p2s) }; -}; -const pbes2kw_decrypt = async (alg, key, encryptedKey, p2c, p2s) => { - check_p2s_checkP2s(p2s); - const salt = buffer_utils_p2s(alg, p2s); - const keylen = parseInt(alg.slice(13, 16), 10) >> 3; - const password = getPassword(key, alg); - const derivedKey = await pbkdf2(password, salt, p2c, keylen, `sha${alg.slice(8, 11)}`); - return unwrap(alg.slice(-6), derivedKey, encryptedKey); -}; - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/check_key_length.js - -/* harmony default export */ const check_key_length = ((key, alg) => { - let modulusLength; - try { - if (key instanceof external_node_crypto_.KeyObject) { - modulusLength = key.asymmetricKeyDetails?.modulusLength; - } - else { - modulusLength = Buffer.from(key.n, 'base64url').byteLength << 3; - } - } - catch { } - if (typeof modulusLength !== 'number' || modulusLength < 2048) { - throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`); - } -}); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/rsaes.js - - - - - - - - -const checkKey = (key, alg) => { - if (key.asymmetricKeyType !== 'rsa') { - throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa'); - } - check_key_length(key, alg); -}; -const RSA1_5 = (0,external_node_util_namespaceObject.deprecate)(() => external_node_crypto_.constants.RSA_PKCS1_PADDING, 'The RSA1_5 "alg" (JWE Algorithm) is deprecated and will be removed in the next major revision.'); -const resolvePadding = (alg) => { - switch (alg) { - case 'RSA-OAEP': - case 'RSA-OAEP-256': - case 'RSA-OAEP-384': - case 'RSA-OAEP-512': - return external_node_crypto_.constants.RSA_PKCS1_OAEP_PADDING; - case 'RSA1_5': - return RSA1_5(); - default: - return undefined; - } -}; -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; - } -}; -function rsaes_ensureKeyObject(key, alg, ...usages) { - if (is_key_object(key)) { - return key; - } - if (webcrypto_isCryptoKey(key)) { - checkEncCryptoKey(key, alg, ...usages); - return external_node_crypto_.KeyObject.from(key); - } - throw new TypeError(invalid_key_input(key, ...is_key_like_types)); -} -const rsaes_encrypt = (alg, key, cek) => { - const padding = resolvePadding(alg); - const oaepHash = resolveOaepHash(alg); - const keyObject = rsaes_ensureKeyObject(key, alg, 'wrapKey', 'encrypt'); - checkKey(keyObject, alg); - return publicEncrypt({ key: keyObject, oaepHash, padding }, cek); -}; -const rsaes_decrypt = (alg, key, encryptedKey) => { - const padding = resolvePadding(alg); - const oaepHash = resolveOaepHash(alg); - const keyObject = rsaes_ensureKeyObject(key, alg, 'unwrapKey', 'decrypt'); - checkKey(keyObject, alg); - return (0,external_node_crypto_.privateDecrypt)({ key: keyObject, oaepHash, padding }, encryptedKey); -}; - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/normalize_key.js -/* harmony default export */ const normalize_key = ({}); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/cek.js - - -function cek_bitLength(alg) { - switch (alg) { - case 'A128GCM': - return 128; - case 'A192GCM': - return 192; - case 'A256GCM': - case 'A128CBC-HS256': - return 256; - case 'A192CBC-HS384': - return 384; - case 'A256CBC-HS512': - return 512; - default: - throw new errors_JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`); - } -} -/* harmony default export */ const lib_cek = ((alg) => (0,external_node_crypto_.randomFillSync)(new Uint8Array(cek_bitLength(alg) >> 3))); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/runtime/jwk_to_key.js - -const parse = (key) => { - if (key.d) { - return (0,external_node_crypto_.createPrivateKey)({ format: 'jwk', key }); - } - return (0,external_node_crypto_.createPublicKey)({ format: 'jwk', key }); -}; -/* harmony default export */ const jwk_to_key = (parse); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/key/import.js - - - - - -async function importSPKI(spki, alg, options) { - if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) { - throw new TypeError('"spki" must be SPKI formatted string'); - } - return fromSPKI(spki, alg, options); -} -async function importX509(x509, alg, options) { - if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) { - throw new TypeError('"x509" must be X.509 formatted string'); - } - return fromX509(x509, alg, options); -} -async function importPKCS8(pkcs8, alg, options) { - if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) { - throw new TypeError('"pkcs8" must be PKCS#8 formatted string'); - } - return fromPKCS8(pkcs8, alg, options); -} -async function importJWK(jwk, alg) { - if (!isObject(jwk)) { - throw new TypeError('JWK must be an object'); - } - alg ||= jwk.alg; - switch (jwk.kty) { - case 'oct': - if (typeof jwk.k !== 'string' || !jwk.k) { - throw new TypeError('missing "k" (Key Value) Parameter value'); - } - return decode(jwk.k); - case 'RSA': - if (jwk.oth !== undefined) { - throw new errors_JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported'); - } - case 'EC': - case 'OKP': - return jwk_to_key({ ...jwk, alg }); - default: - throw new errors_JOSENotSupported('Unsupported "kty" (Key Type) Parameter value'); - } -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/check_key_type.js - - - -const tag = (key) => key?.[Symbol.toStringTag]; -const jwkMatchesOp = (alg, key, usage) => { - if (key.use !== undefined && key.use !== 'sig') { - throw new TypeError('Invalid key for this operation, when present its use must be sig'); - } - if (key.key_ops !== undefined && key.key_ops.includes?.(usage) !== true) { - throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${usage}`); - } - if (key.alg !== undefined && key.alg !== alg) { - throw new TypeError(`Invalid key for this operation, when present its alg must be ${alg}`); - } - return true; -}; -const symmetricTypeCheck = (alg, key, usage, allowJwk) => { - if (key instanceof Uint8Array) - return; - if (allowJwk && isJWK(key)) { - if (isSecretJWK(key) && jwkMatchesOp(alg, key, usage)) - return; - throw new TypeError(`JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present`); - } - if (!is_key_like(key)) { - throw new TypeError(withAlg(alg, key, ...is_key_like_types, 'Uint8Array', allowJwk ? 'JSON Web Key' : null)); - } - if (key.type !== 'secret') { - throw new TypeError(`${tag(key)} instances for symmetric algorithms must be of type "secret"`); - } -}; -const asymmetricTypeCheck = (alg, key, usage, allowJwk) => { - if (allowJwk && isJWK(key)) { - switch (usage) { - case 'sign': - if (isPrivateJWK(key) && jwkMatchesOp(alg, key, usage)) - return; - throw new TypeError(`JSON Web Key for this operation be a private JWK`); - case 'verify': - if (isPublicJWK(key) && jwkMatchesOp(alg, key, usage)) - return; - throw new TypeError(`JSON Web Key for this operation be a public JWK`); - } - } - if (!is_key_like(key)) { - throw new TypeError(withAlg(alg, key, ...is_key_like_types, allowJwk ? 'JSON Web Key' : null)); - } - if (key.type === 'secret') { - throw new TypeError(`${tag(key)} instances for asymmetric algorithms must not be of type "secret"`); - } - if (usage === 'sign' && key.type === 'public') { - throw new TypeError(`${tag(key)} instances for asymmetric algorithm signing must be of type "private"`); - } - if (usage === 'decrypt' && key.type === 'public') { - throw new TypeError(`${tag(key)} instances for asymmetric algorithm decryption must be of type "private"`); - } - if (key.algorithm && usage === 'verify' && key.type === 'private') { - throw new TypeError(`${tag(key)} instances for asymmetric algorithm verifying must be of type "public"`); - } - if (key.algorithm && usage === 'encrypt' && key.type === 'private') { - throw new TypeError(`${tag(key)} instances for asymmetric algorithm encryption must be of type "public"`); - } -}; -function checkKeyType(allowJwk, alg, key, usage) { - const symmetric = alg.startsWith('HS') || - alg === 'dir' || - alg.startsWith('PBES2') || - /^A\d{3}(?:GCM)?KW$/.test(alg); - if (symmetric) { - symmetricTypeCheck(alg, key, usage, allowJwk); - } - else { - asymmetricTypeCheck(alg, key, usage, allowJwk); - } -} -/* harmony default export */ const check_key_type = (checkKeyType.bind(undefined, false)); -const checkKeyTypeWithJwk = checkKeyType.bind(undefined, true); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/aesgcmkw.js - - - -async function aesgcmkw_wrap(alg, key, cek, iv) { - const jweAlgorithm = alg.slice(0, 7); - const wrapped = await encrypt(jweAlgorithm, cek, key, iv, new Uint8Array(0)); - return { - encryptedKey: wrapped.ciphertext, - iv: base64url(wrapped.iv), - tag: base64url(wrapped.tag), - }; -} -async function aesgcmkw_unwrap(alg, key, encryptedKey, iv, tag) { - const jweAlgorithm = alg.slice(0, 7); - return runtime_decrypt(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0)); -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/decrypt_key_management.js - - - - - - - - - - - - -async function decryptKeyManagement(alg, key, encryptedKey, joseHeader, options) { - check_key_type(alg, key, 'decrypt'); - key = (await normalize_key.normalizePrivateKey?.(key, alg)) || key; - switch (alg) { - case 'dir': { - if (encryptedKey !== undefined) - throw new JWEInvalid('Encountered unexpected JWE Encrypted Key'); - return key; - } - case 'ECDH-ES': - if (encryptedKey !== undefined) - throw new JWEInvalid('Encountered unexpected JWE Encrypted Key'); - case 'ECDH-ES+A128KW': - case 'ECDH-ES+A192KW': - case 'ECDH-ES+A256KW': { - if (!isObject(joseHeader.epk)) - throw new JWEInvalid(`JOSE Header "epk" (Ephemeral Public Key) missing or invalid`); - if (!ecdhAllowed(key)) - throw new errors_JOSENotSupported('ECDH with the provided key is not allowed or not supported by your javascript runtime'); - const epk = await importJWK(joseHeader.epk, alg); - let partyUInfo; - let partyVInfo; - if (joseHeader.apu !== undefined) { - if (typeof joseHeader.apu !== 'string') - throw new JWEInvalid(`JOSE Header "apu" (Agreement PartyUInfo) invalid`); - try { - partyUInfo = decode(joseHeader.apu); - } - catch { - throw new JWEInvalid('Failed to base64url decode the apu'); - } - } - if (joseHeader.apv !== undefined) { - if (typeof joseHeader.apv !== 'string') - throw new JWEInvalid(`JOSE Header "apv" (Agreement PartyVInfo) invalid`); - try { - partyVInfo = decode(joseHeader.apv); - } - catch { - throw new JWEInvalid('Failed to base64url decode the apv'); - } - } - const sharedSecret = await deriveKey(epk, key, alg === 'ECDH-ES' ? joseHeader.enc : alg, alg === 'ECDH-ES' ? cek_bitLength(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo); - if (alg === 'ECDH-ES') - return sharedSecret; - if (encryptedKey === undefined) - throw new JWEInvalid('JWE Encrypted Key missing'); - return unwrap(alg.slice(-6), sharedSecret, encryptedKey); - } - case 'RSA1_5': - case 'RSA-OAEP': - case 'RSA-OAEP-256': - case 'RSA-OAEP-384': - case 'RSA-OAEP-512': { - if (encryptedKey === undefined) - throw new JWEInvalid('JWE Encrypted Key missing'); - return rsaes_decrypt(alg, key, encryptedKey); - } - case 'PBES2-HS256+A128KW': - case 'PBES2-HS384+A192KW': - case 'PBES2-HS512+A256KW': { - if (encryptedKey === undefined) - throw new JWEInvalid('JWE Encrypted Key missing'); - if (typeof joseHeader.p2c !== 'number') - throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) missing or invalid`); - const p2cLimit = options?.maxPBES2Count || 10_000; - if (joseHeader.p2c > p2cLimit) - throw new JWEInvalid(`JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds`); - if (typeof joseHeader.p2s !== 'string') - throw new JWEInvalid(`JOSE Header "p2s" (PBES2 Salt) missing or invalid`); - let p2s; - try { - p2s = decode(joseHeader.p2s); - } - catch { - throw new JWEInvalid('Failed to base64url decode the p2s'); - } - return pbes2kw_decrypt(alg, key, encryptedKey, joseHeader.p2c, p2s); - } - case 'A128KW': - case 'A192KW': - case 'A256KW': { - if (encryptedKey === undefined) - throw new JWEInvalid('JWE Encrypted Key missing'); - return unwrap(alg, key, encryptedKey); - } - case 'A128GCMKW': - case 'A192GCMKW': - case 'A256GCMKW': { - if (encryptedKey === undefined) - throw new JWEInvalid('JWE Encrypted Key missing'); - if (typeof joseHeader.iv !== 'string') - throw new JWEInvalid(`JOSE Header "iv" (Initialization Vector) missing or invalid`); - if (typeof joseHeader.tag !== 'string') - throw new JWEInvalid(`JOSE Header "tag" (Authentication Tag) missing or invalid`); - let iv; - try { - iv = decode(joseHeader.iv); - } - catch { - throw new JWEInvalid('Failed to base64url decode the iv'); - } - let tag; - try { - tag = decode(joseHeader.tag); - } - catch { - throw new JWEInvalid('Failed to base64url decode the tag'); - } - return aesgcmkw_unwrap(alg, key, encryptedKey, iv, tag); - } - default: { - throw new errors_JOSENotSupported('Invalid or unsupported "alg" (JWE Algorithm) header value'); - } - } -} -/* harmony default export */ const decrypt_key_management = (decryptKeyManagement); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/validate_crit.js - -function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) { - if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) { - throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected'); - } - if (!protectedHeader || protectedHeader.crit === undefined) { - return new Set(); - } - if (!Array.isArray(protectedHeader.crit) || - protectedHeader.crit.length === 0 || - protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) { - throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present'); - } - let recognized; - if (recognizedOption !== undefined) { - recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]); - } - else { - recognized = recognizedDefault; - } - for (const parameter of protectedHeader.crit) { - if (!recognized.has(parameter)) { - throw new errors_JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`); - } - if (joseHeader[parameter] === undefined) { - throw new Err(`Extension Header Parameter "${parameter}" is missing`); - } - if (recognized.get(parameter) && protectedHeader[parameter] === undefined) { - throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`); - } - } - return new Set(protectedHeader.crit); -} -/* harmony default export */ const validate_crit = (validateCrit); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/lib/validate_algorithms.js -const validateAlgorithms = (option, algorithms) => { - if (algorithms !== undefined && - (!Array.isArray(algorithms) || algorithms.some((s) => typeof s !== 'string'))) { - throw new TypeError(`"${option}" option must be an array of strings`); - } - if (!algorithms) { - return undefined; - } - return new Set(algorithms); -}; -/* harmony default export */ const validate_algorithms = (validateAlgorithms); - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/jwe/flattened/decrypt.js - - - - - - - - - - -async function flattenedDecrypt(jwe, key, options) { - if (!isObject(jwe)) { - throw new JWEInvalid('Flattened JWE must be an object'); - } - if (jwe.protected === undefined && jwe.header === undefined && jwe.unprotected === undefined) { - throw new JWEInvalid('JOSE Header missing'); - } - if (jwe.iv !== undefined && typeof jwe.iv !== 'string') { - throw new JWEInvalid('JWE Initialization Vector incorrect type'); - } - if (typeof jwe.ciphertext !== 'string') { - throw new JWEInvalid('JWE Ciphertext missing or incorrect type'); - } - if (jwe.tag !== undefined && typeof jwe.tag !== 'string') { - throw new JWEInvalid('JWE Authentication Tag incorrect type'); - } - if (jwe.protected !== undefined && typeof jwe.protected !== 'string') { - throw new JWEInvalid('JWE Protected Header incorrect type'); - } - if (jwe.encrypted_key !== undefined && typeof jwe.encrypted_key !== 'string') { - throw new JWEInvalid('JWE Encrypted Key incorrect type'); - } - if (jwe.aad !== undefined && typeof jwe.aad !== 'string') { - throw new JWEInvalid('JWE AAD incorrect type'); - } - if (jwe.header !== undefined && !isObject(jwe.header)) { - throw new JWEInvalid('JWE Shared Unprotected Header incorrect type'); - } - if (jwe.unprotected !== undefined && !isObject(jwe.unprotected)) { - throw new JWEInvalid('JWE Per-Recipient Unprotected Header incorrect type'); - } - let parsedProt; - if (jwe.protected) { - try { - const protectedHeader = decode(jwe.protected); - parsedProt = JSON.parse(buffer_utils_decoder.decode(protectedHeader)); - } - catch { - throw new JWEInvalid('JWE Protected Header is invalid'); - } - } - if (!is_disjoint(parsedProt, jwe.header, jwe.unprotected)) { - throw new JWEInvalid('JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint'); - } - const joseHeader = { - ...parsedProt, - ...jwe.header, - ...jwe.unprotected, - }; - validate_crit(JWEInvalid, new Map(), options?.crit, parsedProt, joseHeader); - if (joseHeader.zip !== undefined) { - throw new errors_JOSENotSupported('JWE "zip" (Compression Algorithm) Header Parameter is not supported.'); - } - const { alg, enc } = joseHeader; - if (typeof alg !== 'string' || !alg) { - throw new JWEInvalid('missing JWE Algorithm (alg) in JWE Header'); - } - if (typeof enc !== 'string' || !enc) { - throw new JWEInvalid('missing JWE Encryption Algorithm (enc) in JWE Header'); - } - const keyManagementAlgorithms = options && validate_algorithms('keyManagementAlgorithms', options.keyManagementAlgorithms); - const contentEncryptionAlgorithms = options && - validate_algorithms('contentEncryptionAlgorithms', options.contentEncryptionAlgorithms); - if ((keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) || - (!keyManagementAlgorithms && alg.startsWith('PBES2'))) { - throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed'); - } - if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) { - throw new JOSEAlgNotAllowed('"enc" (Encryption Algorithm) Header Parameter value not allowed'); - } - let encryptedKey; - if (jwe.encrypted_key !== undefined) { - try { - encryptedKey = decode(jwe.encrypted_key); - } - catch { - throw new JWEInvalid('Failed to base64url decode the encrypted_key'); - } - } - let resolvedKey = false; - if (typeof key === 'function') { - key = await key(parsedProt, jwe); - resolvedKey = true; - } - let cek; - try { - cek = await decrypt_key_management(alg, key, encryptedKey, joseHeader, options); - } - catch (err) { - if (err instanceof TypeError || err instanceof JWEInvalid || err instanceof errors_JOSENotSupported) { - throw err; - } - cek = lib_cek(enc); - } - let iv; - let tag; - if (jwe.iv !== undefined) { - try { - iv = decode(jwe.iv); - } - catch { - throw new JWEInvalid('Failed to base64url decode the iv'); - } - } - if (jwe.tag !== undefined) { - try { - tag = decode(jwe.tag); - } - catch { - throw new JWEInvalid('Failed to base64url decode the tag'); - } - } - const protectedHeader = buffer_utils_encoder.encode(jwe.protected ?? ''); - let additionalData; - if (jwe.aad !== undefined) { - additionalData = buffer_utils_concat(protectedHeader, buffer_utils_encoder.encode('.'), buffer_utils_encoder.encode(jwe.aad)); - } - else { - additionalData = protectedHeader; - } - let ciphertext; - try { - ciphertext = decode(jwe.ciphertext); - } - catch { - throw new JWEInvalid('Failed to base64url decode the ciphertext'); - } - const plaintext = await runtime_decrypt(enc, cek, ciphertext, iv, tag, additionalData); - const result = { plaintext }; - if (jwe.protected !== undefined) { - result.protectedHeader = parsedProt; - } - if (jwe.aad !== undefined) { - try { - result.additionalAuthenticatedData = decode(jwe.aad); - } - catch { - throw new JWEInvalid('Failed to base64url decode the aad'); - } - } - if (jwe.unprotected !== undefined) { - result.sharedUnprotectedHeader = jwe.unprotected; - } - if (jwe.header !== undefined) { - result.unprotectedHeader = jwe.header; - } - if (resolvedKey) { - return { ...result, key }; - } - return result; -} - -;// CONCATENATED MODULE: ./node_modules/jose/dist/node/esm/jwe/compact/decrypt.js - - - -async function compactDecrypt(jwe, key, options) { - if (jwe instanceof Uint8Array) { - jwe = buffer_utils_decoder.decode(jwe); - } - if (typeof jwe !== 'string') { - throw new JWEInvalid('Compact JWE must be a string or Uint8Array'); - } - const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length, } = jwe.split('.'); - if (length !== 5) { - throw new JWEInvalid('Invalid Compact JWE'); - } - const decrypted = await flattenedDecrypt({ - ciphertext, - iv: iv || undefined, - protected: protectedHeader, - tag: tag || undefined, - encrypted_key: encryptedKey || undefined, - }, key, options); - const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader }; - if (typeof key === 'function') { - return { ...result, key: decrypted.key }; - } - return result; -} - -;// CONCATENATED MODULE: ./node_modules/openid-client/build/index.js - - - -let headers; -let build_USER_AGENT; -if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) { - const NAME = 'openid-client'; - const VERSION = 'v6.1.3'; - build_USER_AGENT = `${NAME}/${VERSION}`; - headers = { 'user-agent': build_USER_AGENT }; -} -const build_int = (config) => { - return props.get(config); -}; -let props; - -function build_ClientSecretPost(clientSecret) { - return ClientSecretPost(clientSecret); -} -function build_ClientSecretBasic(clientSecret) { - return ClientSecretBasic(clientSecret); -} -function build_ClientSecretJwt(clientSecret, options) { - return ClientSecretJwt(clientSecret, options); -} -function build_None() { - return None(); -} -function build_PrivateKeyJwt(clientPrivateKey, options) { - return PrivateKeyJwt(clientPrivateKey, options); -} -function build_TlsClientAuth() { - return TlsClientAuth(); -} -const build_skipStateCheck = skipStateCheck; -const build_skipSubjectCheck = skipSubjectCheck; -const build_customFetch = customFetch; -const build_modifyAssertion = modifyAssertion; -const build_clockSkew = clockSkew; -const build_clockTolerance = clockTolerance; -const build_ERR_INVALID_ARG_VALUE = 'ERR_INVALID_ARG_VALUE'; -const build_ERR_INVALID_ARG_TYPE = 'ERR_INVALID_ARG_TYPE'; -function build_CodedTypeError(message, code, cause) { - const err = new TypeError(message, { cause }); - Object.assign(err, { code }); - return err; -} -function build_calculatePKCECodeChallenge(codeVerifier) { - return calculatePKCECodeChallenge(codeVerifier); -} -function randomPKCECodeVerifier() { - return generateRandomCodeVerifier(); -} -function randomNonce() { - return generateRandomNonce(); -} -function randomState() { - return generateRandomState(); -} -class ClientError extends Error { - code; - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - this.code = options?.code; - Error.captureStackTrace?.(this, this.constructor); - } -} -const build_decoder = new TextDecoder(); -function e(msg, cause, code) { - return new ClientError(msg, { cause, code }); -} -function errorHandler(err) { - if (err instanceof TypeError || - err instanceof ClientError || - err instanceof ResponseBodyError || - err instanceof AuthorizationResponseError || - err instanceof WWWAuthenticateChallengeError) { - throw err; - } - if (err instanceof OperationProcessingError) { - switch (err.code) { - case HTTP_REQUEST_FORBIDDEN: - throw e('only requests to HTTPS are allowed', err, err.code); - case REQUEST_PROTOCOL_FORBIDDEN: - throw e('only requests to HTTP or HTTPS are allowed', err, err.code); - case RESPONSE_IS_NOT_CONFORM: - throw e('unexpected HTTP response status code', err.cause, err.code); - case RESPONSE_IS_NOT_JSON: - throw e('unexpected response content-type', err.cause, err.code); - case PARSE_ERROR: - throw e('parsing error occured', err, err.code); - case INVALID_RESPONSE: - throw e('invalid response encountered', err, err.code); - case JWT_CLAIM_COMPARISON: - throw e('unexpected JWT claim value encountered', err, err.code); - case JSON_ATTRIBUTE_COMPARISON: - throw e('unexpected JSON attribute value encountered', err, err.code); - case JWT_TIMESTAMP_CHECK: - throw e('JWT timestamp claim value failed validation', err, err.code); - default: - throw e(err.message, err, err.code); - } - } - if (err instanceof UnsupportedOperationError) { - throw e('unsupported operation', err, err.code); - } - if (err instanceof DOMException) { - switch (err.name) { - case 'OperationError': - throw e('runtime operation error', err, UNSUPPORTED_OPERATION); - case 'NotSupportedError': - throw e('runtime unsupported operation', err, UNSUPPORTED_OPERATION); - case 'TimeoutError': - throw e('operation timed out', err, 'OAUTH_TIMEOUT'); - case 'AbortError': - throw e('operation aborted', err, 'OAUTH_ABORT'); - } - } - throw new ClientError('something went wrong', { cause: err }); -} -function randomDPoPKeyPair(alg, options) { - return generateKeyPair(alg ?? 'ES256', { - extractable: options?.extractable, - }) - .catch(errorHandler); -} -function handleEntraId(server, as, options) { - if (server.origin === 'https://login.microsoftonline.com' && - (!options?.algorithm || options.algorithm === 'oidc')) { - as[kEntraId] = true; - return true; - } - return false; -} -function handleB2Clogin(server, options) { - if (server.hostname.endsWith('.b2clogin.com') && - (!options?.algorithm || options.algorithm === 'oidc')) { - return true; - } - return false; -} -async function discovery(server, clientId, metadata, clientAuthentication, options) { - if (!(server instanceof URL)) { - throw build_CodedTypeError('"server" must be an instance of URL', build_ERR_INVALID_ARG_TYPE); - } - const resolve = !server.href.includes('/.well-known/'); - const timeout = options?.timeout ?? 30; - const signal = AbortSignal.timeout(timeout * 1000); - const as = await (resolve - ? discoveryRequest(server, { - algorithm: options?.algorithm, - [customFetch]: options?.[build_customFetch], - [allowInsecureRequests]: options?.execute?.includes(build_allowInsecureRequests), - signal, - headers: new Headers(headers), - }) - : (options?.[build_customFetch] || fetch)((() => { - checkProtocol(server, options?.execute?.includes(build_allowInsecureRequests) ? false : true); - return server.href; - })(), { - headers: Object.fromEntries(new Headers({ accept: 'application/json', ...headers }).entries()), - body: undefined, - method: 'GET', - redirect: 'manual', - signal, - })) - .then((response) => processDiscoveryResponse(_nodiscoverycheck, response)) - .catch(errorHandler); - if (resolve && new URL(as.issuer).href !== server.href) { - handleEntraId(server, as, options) || - handleB2Clogin(server, options) || - (() => { - throw new ClientError('discovered metadata issuer does not match the expected issuer', { - code: JSON_ATTRIBUTE_COMPARISON, - cause: { - expected: server.href, - body: as, - attribute: 'issuer', - }, - }); - })(); - } - const instance = new Configuration(as, clientId, metadata, clientAuthentication); - let internals = build_int(instance); - if (options?.[build_customFetch]) { - internals.fetch = options[build_customFetch]; - } - if (options?.timeout) { - internals.timeout = options.timeout; - } - if (options?.execute) { - for (const extension of options.execute) { - extension(instance); - } - } - return instance; -} -function isRsaOaep(input) { - return input.name === 'RSA-OAEP'; -} -function isEcdh(input) { - return input.name === 'ECDH'; -} -const ecdhEs = 'ECDH-ES'; -const ecdhEsA128Kw = 'ECDH-ES+A128KW'; -const ecdhEsA192Kw = 'ECDH-ES+A192KW'; -const ecdhEsA256Kw = 'ECDH-ES+A256KW'; -function checkEcdhAlg(algs, alg, pk) { - switch (alg) { - case undefined: - algs.add(ecdhEs); - algs.add(ecdhEsA128Kw); - algs.add(ecdhEsA192Kw); - algs.add(ecdhEsA256Kw); - break; - case ecdhEs: - case ecdhEsA128Kw: - case ecdhEsA192Kw: - case ecdhEsA256Kw: - algs.add(alg); - break; - default: - throw build_CodedTypeError('invalid key alg', build_ERR_INVALID_ARG_VALUE, { pk }); - } -} -function enableDecryptingResponses(config, contentEncryptionAlgorithms = [ - 'A128GCM', - 'A192GCM', - 'A256GCM', - 'A128CBC-HS256', - 'A192CBC-HS384', - 'A256CBC-HS512', -], ...keys) { - if (build_int(config).decrypt !== undefined) { - throw new TypeError('enableDecryptingResponses can only be called on a given Configuration instance once'); - } - if (keys.length === 0) { - throw build_CodedTypeError('no keys were provided', build_ERR_INVALID_ARG_VALUE); - } - const algs = new Set(); - const normalized = []; - for (const pk of keys) { - let key; - if ('key' in pk) { - key = { key: pk.key }; - if (typeof pk.alg === 'string') - key.alg = pk.alg; - if (typeof pk.kid === 'string') - key.kid = pk.kid; - } - else { - key = { key: pk }; - } - if (key.key.type !== 'private') { - throw build_CodedTypeError('only private keys must be provided', build_ERR_INVALID_ARG_VALUE); - } - if (isRsaOaep(key.key.algorithm)) { - switch (key.key.algorithm.hash.name) { - case 'SHA-1': - case 'SHA-256': - case 'SHA-384': - case 'SHA-512': { - let alg = 'RSA-OAEP'; - let sha; - if ((sha = parseInt(key.key.algorithm.hash.name.slice(-3), 10))) { - alg = `${alg}-${sha}`; - } - key.alg ||= alg; - if (alg !== key.alg) - throw build_CodedTypeError('invalid key alg', build_ERR_INVALID_ARG_VALUE, { - pk, - }); - algs.add(key.alg); - break; - } - default: - throw build_CodedTypeError('only SHA-512, SHA-384, SHA-256, and SHA-1 RSA-OAEP keys are supported', build_ERR_INVALID_ARG_VALUE); - } - } - else if (isEcdh(key.key.algorithm)) { - if (key.key.algorithm.namedCurve !== 'P-256') { - throw build_CodedTypeError('Only P-256 ECDH keys are supported', build_ERR_INVALID_ARG_VALUE); - } - checkEcdhAlg(algs, key.alg, pk); - } - else if (key.key.algorithm.name === 'X25519') { - checkEcdhAlg(algs, key.alg, pk); - } - else { - throw build_CodedTypeError('only RSA-OAEP, ECDH, or X25519 keys are supported', build_ERR_INVALID_ARG_VALUE); - } - normalized.push(key); - } - build_int(config).decrypt = async (jwe) => build_decrypt(normalized, jwe, contentEncryptionAlgorithms, [...algs]).catch(errorHandler); -} -function checkCryptoKey(key, alg, epk) { - if (alg.startsWith('RSA-OAEP')) { - return true; - } - if (alg.startsWith('ECDH-ES')) { - if (key.algorithm.name !== 'ECDH' && key.algorithm.name !== 'X25519') { - return false; - } - if (key.algorithm.name === 'ECDH') { - return epk?.crv === key.algorithm.namedCurve; - } - if (key.algorithm.name === 'X25519') { - return epk?.crv === 'X25519'; - } - } - return false; -} -function selectCryptoKeyForDecryption(keys, alg, kid, epk) { - const { 0: key, length } = keys.filter((key) => { - if (kid !== key.kid) { - return false; - } - if (key.alg && alg !== key.alg) { - return false; - } - return checkCryptoKey(key.key, alg, epk); - }); - if (!key) { - throw e('no applicable decryption key selected', undefined, 'OAUTH_DECRYPTION_FAILED'); - } - if (length !== 1) { - throw e('multiple applicable decryption keys selected', undefined, 'OAUTH_DECRYPTION_FAILED'); - } - return key.key; -} -async function build_decrypt(keys, jwe, contentEncryptionAlgorithms, keyManagementAlgorithms) { - return build_decoder.decode((await compactDecrypt(jwe, async (header) => { - const { kid, alg, epk } = header; - return selectCryptoKeyForDecryption(keys, alg, kid, epk); - }, { keyManagementAlgorithms, contentEncryptionAlgorithms }) - .catch((err) => { - if (err instanceof JOSEError) { - throw e('decryption failed', err, 'OAUTH_DECRYPTION_FAILED'); - } - errorHandler(err); - })).plaintext); -} -function getServerHelpers(metadata) { - return { - supportsPKCE: { - __proto__: null, - value(method = 'S256') { - return (metadata.code_challenge_methods_supported?.includes(method) === true); - }, - }, - }; -} -function addServerHelpers(metadata) { - Object.defineProperties(metadata, getServerHelpers(metadata)); -} -const kEntraId = Symbol(); -class Configuration { - constructor(server, clientId, metadata, clientAuthentication) { - if (typeof clientId !== 'string' || !clientId.length) { - throw build_CodedTypeError('"clientId" must be a non-empty string', build_ERR_INVALID_ARG_TYPE); - } - if (typeof metadata === 'string') { - metadata = { client_secret: metadata }; - } - if (metadata?.client_id !== undefined && clientId !== metadata.client_id) { - throw build_CodedTypeError('"clientId" and "metadata.client_id" must be the same', build_ERR_INVALID_ARG_VALUE); - } - const client = { - ...structuredClone(metadata), - client_id: clientId, - }; - client[clockSkew] = metadata?.[clockSkew] ?? 0; - client[clockTolerance] = metadata?.[clockTolerance] ?? 30; - let auth; - if (clientAuthentication) { - auth = clientAuthentication; - } - else { - if (typeof client.client_secret === 'string' && - client.client_secret.length) { - auth = build_ClientSecretPost(client.client_secret); - } - else { - auth = build_None(); - } - } - let c = Object.freeze(client); - const clone = structuredClone(server); - if (kEntraId in server) { - clone[_expectedIssuer] = ({ claims: { tid } }) => server.issuer.replace('{tenantid}', tid); - } - let as = Object.freeze(clone); - props ||= new WeakMap(); - props.set(this, { - __proto__: null, - as, - c, - auth, - tlsOnly: true, - jwksCache: {}, - }); - } - serverMetadata() { - const metadata = structuredClone(build_int(this).as); - addServerHelpers(metadata); - return metadata; - } - get timeout() { - return build_int(this).timeout; - } - set timeout(value) { - build_int(this).timeout = value; - } - get [build_customFetch]() { - return build_int(this).fetch; - } - set [build_customFetch](value) { - build_int(this).fetch = value; - } -} -Object.freeze(Configuration.prototype); -function getHelpers(response) { - let exp = undefined; - if (response.expires_in !== undefined) { - const now = new Date(); - now.setSeconds(now.getSeconds() + response.expires_in); - exp = now.getTime(); - } - return { - expiresIn: { - __proto__: null, - value() { - if (exp) { - const now = Date.now(); - if (exp > now) { - return Math.floor((exp - now) / 1000); - } - return 0; - } - return undefined; - }, - }, - claims: { - __proto__: null, - value() { - try { - return getValidatedIdTokenClaims(this); - } - catch { - return undefined; - } - }, - }, - }; -} -function addHelpers(response) { - Object.defineProperties(response, getHelpers(response)); -} -function getDPoPHandle(config, keyPair, options) { - checkConfig(config); - return DPoP(build_int(config).c, keyPair, options); -} -function wait(interval) { - return new Promise((resolve) => { - setTimeout(resolve, interval * 1000); - }); -} -async function pollDeviceAuthorizationGrant(config, deviceAuthorizationResponse, parameters, options) { - checkConfig(config); - parameters = new URLSearchParams(parameters); - let interval = deviceAuthorizationResponse.interval ?? 5; - const pollingSignal = options?.signal ?? - AbortSignal.timeout(deviceAuthorizationResponse.expires_in * 1000); - try { - pollingSignal.throwIfAborted(); - } - catch (err) { - errorHandler(err); - } - await wait(interval); - const { as, c, auth, fetch, tlsOnly, nonRepudiation, timeout, decrypt } = build_int(config); - const response = await deviceCodeGrantRequest(as, c, auth, deviceAuthorizationResponse.device_code, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - additionalParameters: parameters, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: pollingSignal.aborted ? pollingSignal : build_signal(timeout), - }) - .catch(errorHandler); - const p = processDeviceCodeResponse(as, c, response, { - [jweDecrypt]: decrypt, - }); - let result; - try { - result = await p; - } - catch (err) { - if (retryable(err, options)) { - return pollDeviceAuthorizationGrant(config, { - ...deviceAuthorizationResponse, - interval, - }, parameters, { - ...options, - signal: pollingSignal, - flag: retry, - }); - } - if (err instanceof ResponseBodyError) { - switch (err.error) { - case 'slow_down': - interval += 5; - case 'authorization_pending': - return pollDeviceAuthorizationGrant(config, { - ...deviceAuthorizationResponse, - interval, - }, parameters, { - ...options, - signal: pollingSignal, - flag: undefined, - }); - } - } - errorHandler(err); - } - result.id_token && (await nonRepudiation?.(response)); - addHelpers(result); - return result; -} -async function initiateDeviceAuthorization(config, parameters) { - checkConfig(config); - const { as, c, auth, fetch, tlsOnly, timeout } = build_int(config); - return deviceAuthorizationRequest(as, c, auth, parameters, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .then((response) => processDeviceAuthorizationResponse(as, c, response)) - .catch(errorHandler); -} -function build_allowInsecureRequests(config) { - build_int(config).tlsOnly = false; -} -function build_setJwksCache(config, jwksCache) { - build_int(config).jwksCache = structuredClone(jwksCache); -} -function getJwksCache(config) { - const cache = build_int(config).jwksCache; - if (cache.uat) { - return cache; - } - return undefined; -} -function enableNonRepudiationChecks(config) { - checkConfig(config); - build_int(config).nonRepudiation = (response) => { - const { as, fetch, tlsOnly, timeout, jwksCache } = build_int(config); - return validateApplicationLevelSignature(as, response, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - headers: new Headers(headers), - signal: build_signal(timeout), - [build_jwksCache]: jwksCache, - }) - .catch(errorHandler); - }; -} -function useJwtResponseMode(config) { - checkConfig(config); - if (build_int(config).hybrid) { - throw e('JARM cannot be combined with a hybrid response mode', undefined, UNSUPPORTED_OPERATION); - } - build_int(config).jarm = (authorizationResponse, expectedState) => validateJARMResponse(config, authorizationResponse, expectedState); -} -function enableDetachedSignatureResponseChecks(config) { - if (!build_int(config).hybrid) { - throw e('"code id_token" response type must be configured to be used first', undefined, UNSUPPORTED_OPERATION); - } - build_int(config).hybrid = (authorizationResponse, expectedNonce, expectedState, maxAge) => build_validateCodeIdTokenResponse(config, authorizationResponse, expectedNonce, expectedState, maxAge, true); -} -function useCodeIdTokenResponseType(config) { - checkConfig(config); - if (build_int(config).jarm) { - throw e('"code id_token" response type cannot be combined with JARM', undefined, UNSUPPORTED_OPERATION); - } - build_int(config).hybrid = (authorizationResponse, expectedNonce, expectedState, maxAge) => build_validateCodeIdTokenResponse(config, authorizationResponse, expectedNonce, expectedState, maxAge, false); -} -function stripParams(url) { - url = new URL(url); - url.search = ''; - url.hash = ''; - return url.href; -} -function webInstanceOf(input, toStringTag) { - try { - return Object.getPrototypeOf(input)[Symbol.toStringTag] === toStringTag; - } - catch { - return false; - } -} -async function authorizationCodeGrant(config, currentUrl, checks, tokenEndpointParameters, options) { - checkConfig(config); - if (options?.flag !== retry && - !(currentUrl instanceof URL) && - !webInstanceOf(currentUrl, 'Request')) { - throw build_CodedTypeError('"currentUrl" must be an instance of URL, or Request', build_ERR_INVALID_ARG_TYPE); - } - let authResponse; - let redirectUri; - const { as, c, auth, fetch, tlsOnly, jarm, hybrid, nonRepudiation, timeout, decrypt } = build_int(config); - if (options?.flag === retry) { - authResponse = options.authResponse; - redirectUri = options.redirectUri; - } - else { - let request; - if (!(currentUrl instanceof URL)) { - if (currentUrl.method === 'POST') { - request = currentUrl; - } - currentUrl = new URL(currentUrl.url); - } - redirectUri = stripParams(currentUrl); - switch (true) { - case !!jarm: - authResponse = await jarm(currentUrl, checks?.expectedState); - break; - case !!hybrid: - authResponse = await hybrid(request || currentUrl, checks?.expectedNonce, checks?.expectedState, checks?.maxAge); - break; - default: - try { - authResponse = validateAuthResponse(as, c, currentUrl.searchParams, checks?.expectedState); - } - catch (err) { - return errorHandler(err); - } - } - } - const response = await authorizationCodeGrantRequest(as, c, auth, authResponse, redirectUri, checks?.pkceCodeVerifier || _nopkce, { - additionalParameters: tokenEndpointParameters, - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .catch(errorHandler); - if (typeof checks?.expectedNonce === 'string' || - typeof checks?.maxAge === 'number') { - checks.idTokenExpected = true; - } - const p = processAuthorizationCodeResponse(as, c, response, { - expectedNonce: checks?.expectedNonce, - maxAge: checks?.maxAge, - requireIdToken: checks?.idTokenExpected, - [jweDecrypt]: decrypt, - }); - let result; - try { - result = await p; - } - catch (err) { - if (retryable(err, options)) { - return authorizationCodeGrant(config, undefined, checks, tokenEndpointParameters, { - ...options, - flag: retry, - authResponse: authResponse, - redirectUri: redirectUri, - }); - } - errorHandler(err); - } - result.id_token && (await nonRepudiation?.(response)); - addHelpers(result); - return result; -} -async function validateJARMResponse(config, authorizationResponse, expectedState) { - const { as, c, fetch, tlsOnly, timeout, decrypt, jwksCache } = build_int(config); - return validateJwtAuthResponse(as, c, authorizationResponse, expectedState, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - headers: new Headers(headers), - signal: build_signal(timeout), - [jweDecrypt]: decrypt, - [build_jwksCache]: jwksCache, - }) - .catch(errorHandler); -} -async function build_validateCodeIdTokenResponse(config, authorizationResponse, expectedNonce, expectedState, maxAge, fapi) { - if (typeof expectedNonce !== 'string') { - throw build_CodedTypeError('"expectedNonce" must be a string', build_ERR_INVALID_ARG_TYPE); - } - if (expectedState !== undefined && typeof expectedState !== 'string') { - throw build_CodedTypeError('"expectedState" must be a string', build_ERR_INVALID_ARG_TYPE); - } - const { as, c, fetch, tlsOnly, timeout, decrypt, jwksCache } = build_int(config); - return (fapi - ? validateDetachedSignatureResponse - : validateCodeIdTokenResponse)(as, c, authorizationResponse, expectedNonce, expectedState, maxAge, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - headers: new Headers(headers), - signal: build_signal(timeout), - [jweDecrypt]: decrypt, - [build_jwksCache]: jwksCache, - }).catch(errorHandler); -} -async function refreshTokenGrant(config, refreshToken, parameters, options) { - checkConfig(config); - parameters = new URLSearchParams(parameters); - const { as, c, auth, fetch, tlsOnly, nonRepudiation, timeout, decrypt } = build_int(config); - const response = await refreshTokenGrantRequest(as, c, auth, refreshToken, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - additionalParameters: parameters, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .catch(errorHandler); - const p = processRefreshTokenResponse(as, c, response, { - [jweDecrypt]: decrypt, - }); - let result; - try { - result = await p; - } - catch (err) { - if (retryable(err, options)) { - return refreshTokenGrant(config, refreshToken, parameters, { - ...options, - flag: retry, - }); - } - errorHandler(err); - } - result.id_token && (await nonRepudiation?.(response)); - addHelpers(result); - return result; -} -async function clientCredentialsGrant(config, parameters, options) { - checkConfig(config); - parameters = new URLSearchParams(parameters); - const { as, c, auth, fetch, tlsOnly, timeout } = build_int(config); - const response = await clientCredentialsGrantRequest(as, c, auth, parameters, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .catch(errorHandler); - const p = processClientCredentialsResponse(as, c, response); - let result; - try { - result = await p; - } - catch (err) { - if (retryable(err, options)) { - return clientCredentialsGrant(config, parameters, { - ...options, - flag: retry, - }); - } - errorHandler(err); - } - addHelpers(result); - return result; -} -function buildAuthorizationUrl(config, parameters) { - checkConfig(config); - const { as, c, tlsOnly, hybrid, jarm } = build_int(config); - const authorizationEndpoint = resolveEndpoint(as, 'authorization_endpoint', false, tlsOnly); - parameters = new URLSearchParams(parameters); - if (!parameters.has('client_id')) { - parameters.set('client_id', c.client_id); - } - if (!parameters.has('request_uri') && !parameters.has('request')) { - if (!parameters.has('response_type')) { - parameters.set('response_type', hybrid ? 'code id_token' : 'code'); - } - if (jarm) { - parameters.set('response_mode', 'jwt'); - } - } - for (const [k, v] of parameters.entries()) { - authorizationEndpoint.searchParams.append(k, v); - } - return authorizationEndpoint; -} -async function buildAuthorizationUrlWithJAR(config, parameters, signingKey, options) { - checkConfig(config); - const authorizationEndpoint = buildAuthorizationUrl(config, parameters); - parameters = authorizationEndpoint.searchParams; - if (!signingKey) { - throw build_CodedTypeError('"signingKey" must be provided', build_ERR_INVALID_ARG_VALUE); - } - const { as, c } = build_int(config); - const request = await issueRequestObject(as, c, parameters, signingKey, options) - .catch(errorHandler); - return buildAuthorizationUrl(config, { request }); -} -async function buildAuthorizationUrlWithPAR(config, parameters, options) { - checkConfig(config); - const authorizationEndpoint = buildAuthorizationUrl(config, parameters); - const { as, c, auth, fetch, tlsOnly, timeout } = build_int(config); - const response = await pushedAuthorizationRequest(as, c, auth, authorizationEndpoint.searchParams, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .catch(errorHandler); - const p = processPushedAuthorizationResponse(as, c, response); - let result; - try { - result = await p; - } - catch (err) { - if (retryable(err, options)) { - return buildAuthorizationUrlWithPAR(config, parameters, { - ...options, - flag: retry, - }); - } - errorHandler(err); - } - return buildAuthorizationUrl(config, { request_uri: result.request_uri }); -} -function buildEndSessionUrl(config, parameters) { - checkConfig(config); - const { as, c, tlsOnly } = build_int(config); - const endSessionEndpoint = resolveEndpoint(as, 'end_session_endpoint', false, tlsOnly); - parameters = new URLSearchParams(parameters); - if (!parameters.has('client_id')) { - parameters.set('client_id', c.client_id); - } - for (const [k, v] of parameters.entries()) { - endSessionEndpoint.searchParams.append(k, v); - } - return endSessionEndpoint; -} -function checkConfig(input) { - if (!(input instanceof Configuration)) { - throw build_CodedTypeError('"config" must be an instance of Configuration', build_ERR_INVALID_ARG_TYPE); - } - if (Object.getPrototypeOf(input) !== Configuration.prototype) { - throw build_CodedTypeError('subclassing Configuration is not allowed', build_ERR_INVALID_ARG_VALUE); - } -} -function build_signal(timeout) { - return timeout ? AbortSignal.timeout(timeout * 1000) : undefined; -} -async function fetchUserInfo(config, accessToken, expectedSubject, options) { - checkConfig(config); - const { as, c, fetch, tlsOnly, nonRepudiation, timeout, decrypt } = build_int(config); - const response = await userInfoRequest(as, c, accessToken, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .catch(errorHandler); - let exec = processUserInfoResponse(as, c, expectedSubject, response, { - [jweDecrypt]: decrypt, - }); - let result; - try { - result = await exec; - } - catch (err) { - if (retryable(err, options)) { - return fetchUserInfo(config, accessToken, expectedSubject, { - ...options, - flag: retry, - }); - } - errorHandler(err); - } - build_getContentType(response) === 'application/jwt' && - (await nonRepudiation?.(response)); - return result; -} -function retryable(err, options) { - if (options?.DPoP && options.flag !== retry) { - return isDPoPNonceError(err); - } - return false; -} -async function tokenIntrospection(config, token, parameters) { - checkConfig(config); - const { as, c, auth, fetch, tlsOnly, nonRepudiation, timeout, decrypt } = build_int(config); - const response = await introspectionRequest(as, c, auth, token, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - additionalParameters: new URLSearchParams(parameters), - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .catch(errorHandler); - const result = await processIntrospectionResponse(as, c, response, { - [jweDecrypt]: decrypt, - }) - .catch(errorHandler); - build_getContentType(response) === 'application/token-introspection+jwt' && - (await nonRepudiation?.(response)); - return result; -} -const retry = Symbol(); -async function genericGrantRequest(config, grantType, parameters, options) { - checkConfig(config); - const { as, c, auth, fetch, tlsOnly, timeout, decrypt } = build_int(config); - const result = await genericTokenEndpointRequest(as, c, auth, grantType, new URLSearchParams(parameters), { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - DPoP: options?.DPoP, - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .then((response) => processGenericTokenEndpointResponse(as, c, response, { - [jweDecrypt]: decrypt, - })) - .catch(errorHandler); - addHelpers(result); - return result; -} -async function tokenRevocation(config, token, parameters) { - checkConfig(config); - const { as, c, auth, fetch, tlsOnly, timeout } = build_int(config); - return revocationRequest(as, c, auth, token, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - additionalParameters: new URLSearchParams(parameters), - headers: new Headers(headers), - signal: build_signal(timeout), - }) - .then(processRevocationResponse) - .catch(errorHandler); -} -async function fetchProtectedResource(config, accessToken, url, method, body, headers, options) { - checkConfig(config); - headers ||= new Headers(); - if (!headers.has('user-agent')) { - headers.set('user-agent', build_USER_AGENT); - } - const { fetch, tlsOnly, timeout } = build_int(config); - const exec = protectedResourceRequest(accessToken, method, url, headers, body, { - [customFetch]: fetch, - [allowInsecureRequests]: !tlsOnly, - DPoP: options?.DPoP, - signal: build_signal(timeout), - }); - let result; - try { - result = await exec; - } - catch (err) { - if (retryable(err, options)) { - return fetchProtectedResource(config, accessToken, url, method, body, headers, { - ...options, - flag: retry, - }); - } - errorHandler(err); - } - return result; -} -function build_getContentType(response) { - return response.headers.get('content-type')?.split(';')[0]; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 894: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}'); - -/***/ }), - -/***/ 96273: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}'); - -/***/ }), - -/***/ 6680: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}'); - -/***/ }), - -/***/ 83932: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"afterRequest.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 36136: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"beforeRequest.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["lastAccess","eTag","hitCount"],"properties":{"expires":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"lastAccess":{"type":"string","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))?"},"eTag":{"type":"string"},"hitCount":{"type":"integer"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 805: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"browser.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 51632: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"cache.json#","$schema":"http://json-schema.org/draft-06/schema#","properties":{"beforeRequest":{"oneOf":[{"type":"null"},{"$ref":"beforeRequest.json#"}]},"afterRequest":{"oneOf":[{"type":"null"},{"$ref":"afterRequest.json#"}]},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 61567: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"content.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["size","mimeType"],"properties":{"size":{"type":"integer"},"compression":{"type":"integer"},"mimeType":{"type":"string"},"text":{"type":"string"},"encoding":{"type":"string"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 25725: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"cookie.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"path":{"type":"string"},"domain":{"type":"string"},"expires":{"type":["string","null"],"format":"date-time"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 47218: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"creator.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 74560: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"entry.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["startedDateTime","time","request","response","cache","timings"],"properties":{"pageref":{"type":"string"},"startedDateTime":{"type":"string","format":"date-time","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))"},"time":{"type":"number","min":0},"request":{"$ref":"request.json#"},"response":{"$ref":"response.json#"},"cache":{"$ref":"cache.json#"},"timings":{"$ref":"timings.json#"},"serverIPAddress":{"type":"string","oneOf":[{"format":"ipv4"},{"format":"ipv6"}]},"connection":{"type":"string"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 75579: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"har.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["log"],"properties":{"log":{"$ref":"log.json#"}}}'); - -/***/ }), - -/***/ 75147: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"header.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 53013: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"log.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["version","creator","entries"],"properties":{"version":{"type":"string"},"creator":{"$ref":"creator.json#"},"browser":{"$ref":"browser.json#"},"pages":{"type":"array","items":{"$ref":"page.json#"}},"entries":{"type":"array","items":{"$ref":"entry.json#"}},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 34777: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"page.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["startedDateTime","id","title","pageTimings"],"properties":{"startedDateTime":{"type":"string","format":"date-time","pattern":"^(\\\\d{4})(-)?(\\\\d\\\\d)(-)?(\\\\d\\\\d)(T)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(:)?(\\\\d\\\\d)(\\\\.\\\\d+)?(Z|([+-])(\\\\d\\\\d)(:)?(\\\\d\\\\d))"},"id":{"type":"string","unique":true},"title":{"type":"string"},"pageTimings":{"$ref":"pageTimings.json#"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 5538: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"pageTimings.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","properties":{"onContentLoad":{"type":"number","min":-1},"onLoad":{"type":"number","min":-1},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 12096: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"postData.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","optional":true,"required":["mimeType"],"properties":{"mimeType":{"type":"string"},"text":{"type":"string"},"params":{"type":"array","required":["name"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"comment":{"type":"string"}}},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 21251: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"query.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 99646: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"request.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],"properties":{"method":{"type":"string"},"url":{"type":"string","format":"uri"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"cookie.json#"}},"headers":{"type":"array","items":{"$ref":"header.json#"}},"queryString":{"type":"array","items":{"$ref":"query.json#"}},"postData":{"$ref":"postData.json#"},"headersSize":{"type":"integer"},"bodySize":{"type":"integer"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 9103: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"response.json#","$schema":"http://json-schema.org/draft-06/schema#","type":"object","required":["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],"properties":{"status":{"type":"integer"},"statusText":{"type":"string"},"httpVersion":{"type":"string"},"cookies":{"type":"array","items":{"$ref":"cookie.json#"}},"headers":{"type":"array","items":{"$ref":"header.json#"}},"content":{"$ref":"content.json#"},"redirectURL":{"type":"string"},"headersSize":{"type":"integer"},"bodySize":{"type":"integer"},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 22007: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$id":"timings.json#","$schema":"http://json-schema.org/draft-06/schema#","required":["send","wait","receive"],"properties":{"dns":{"type":"number","min":-1},"connect":{"type":"number","min":-1},"blocked":{"type":"number","min":-1},"send":{"type":"number","min":-1},"wait":{"type":"number","min":-1},"receive":{"type":"number","min":-1},"ssl":{"type":"number","min":-1},"comment":{"type":"string"}}}'); - -/***/ }), - -/***/ 53765: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}'); - -/***/ }), - -/***/ 3704: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('["ac","com.ac","edu.ac","gov.ac","net.ac","mil.ac","org.ac","ad","nom.ad","ae","co.ae","net.ae","org.ae","sch.ae","ac.ae","gov.ae","mil.ae","aero","accident-investigation.aero","accident-prevention.aero","aerobatic.aero","aeroclub.aero","aerodrome.aero","agents.aero","aircraft.aero","airline.aero","airport.aero","air-surveillance.aero","airtraffic.aero","air-traffic-control.aero","ambulance.aero","amusement.aero","association.aero","author.aero","ballooning.aero","broker.aero","caa.aero","cargo.aero","catering.aero","certification.aero","championship.aero","charter.aero","civilaviation.aero","club.aero","conference.aero","consultant.aero","consulting.aero","control.aero","council.aero","crew.aero","design.aero","dgca.aero","educator.aero","emergency.aero","engine.aero","engineer.aero","entertainment.aero","equipment.aero","exchange.aero","express.aero","federation.aero","flight.aero","freight.aero","fuel.aero","gliding.aero","government.aero","groundhandling.aero","group.aero","hanggliding.aero","homebuilt.aero","insurance.aero","journal.aero","journalist.aero","leasing.aero","logistics.aero","magazine.aero","maintenance.aero","media.aero","microlight.aero","modelling.aero","navigation.aero","parachuting.aero","paragliding.aero","passenger-association.aero","pilot.aero","press.aero","production.aero","recreation.aero","repbody.aero","res.aero","research.aero","rotorcraft.aero","safety.aero","scientist.aero","services.aero","show.aero","skydiving.aero","software.aero","student.aero","trader.aero","trading.aero","trainer.aero","union.aero","workinggroup.aero","works.aero","af","gov.af","com.af","org.af","net.af","edu.af","ag","com.ag","org.ag","net.ag","co.ag","nom.ag","ai","off.ai","com.ai","net.ai","org.ai","al","com.al","edu.al","gov.al","mil.al","net.al","org.al","am","co.am","com.am","commune.am","net.am","org.am","ao","ed.ao","gv.ao","og.ao","co.ao","pb.ao","it.ao","aq","ar","com.ar","edu.ar","gob.ar","gov.ar","int.ar","mil.ar","musica.ar","net.ar","org.ar","tur.ar","arpa","e164.arpa","in-addr.arpa","ip6.arpa","iris.arpa","uri.arpa","urn.arpa","as","gov.as","asia","at","ac.at","co.at","gv.at","or.at","au","com.au","net.au","org.au","edu.au","gov.au","asn.au","id.au","info.au","conf.au","oz.au","act.au","nsw.au","nt.au","qld.au","sa.au","tas.au","vic.au","wa.au","act.edu.au","catholic.edu.au","nsw.edu.au","nt.edu.au","qld.edu.au","sa.edu.au","tas.edu.au","vic.edu.au","wa.edu.au","qld.gov.au","sa.gov.au","tas.gov.au","vic.gov.au","wa.gov.au","education.tas.edu.au","schools.nsw.edu.au","aw","com.aw","ax","az","com.az","net.az","int.az","gov.az","org.az","edu.az","info.az","pp.az","mil.az","name.az","pro.az","biz.az","ba","com.ba","edu.ba","gov.ba","mil.ba","net.ba","org.ba","bb","biz.bb","co.bb","com.bb","edu.bb","gov.bb","info.bb","net.bb","org.bb","store.bb","tv.bb","*.bd","be","ac.be","bf","gov.bf","bg","a.bg","b.bg","c.bg","d.bg","e.bg","f.bg","g.bg","h.bg","i.bg","j.bg","k.bg","l.bg","m.bg","n.bg","o.bg","p.bg","q.bg","r.bg","s.bg","t.bg","u.bg","v.bg","w.bg","x.bg","y.bg","z.bg","0.bg","1.bg","2.bg","3.bg","4.bg","5.bg","6.bg","7.bg","8.bg","9.bg","bh","com.bh","edu.bh","net.bh","org.bh","gov.bh","bi","co.bi","com.bi","edu.bi","or.bi","org.bi","biz","bj","asso.bj","barreau.bj","gouv.bj","bm","com.bm","edu.bm","gov.bm","net.bm","org.bm","bn","com.bn","edu.bn","gov.bn","net.bn","org.bn","bo","com.bo","edu.bo","gob.bo","int.bo","org.bo","net.bo","mil.bo","tv.bo","web.bo","academia.bo","agro.bo","arte.bo","blog.bo","bolivia.bo","ciencia.bo","cooperativa.bo","democracia.bo","deporte.bo","ecologia.bo","economia.bo","empresa.bo","indigena.bo","industria.bo","info.bo","medicina.bo","movimiento.bo","musica.bo","natural.bo","nombre.bo","noticias.bo","patria.bo","politica.bo","profesional.bo","plurinacional.bo","pueblo.bo","revista.bo","salud.bo","tecnologia.bo","tksat.bo","transporte.bo","wiki.bo","br","9guacu.br","abc.br","adm.br","adv.br","agr.br","aju.br","am.br","anani.br","aparecida.br","arq.br","art.br","ato.br","b.br","barueri.br","belem.br","bhz.br","bio.br","blog.br","bmd.br","boavista.br","bsb.br","campinagrande.br","campinas.br","caxias.br","cim.br","cng.br","cnt.br","com.br","contagem.br","coop.br","cri.br","cuiaba.br","curitiba.br","def.br","ecn.br","eco.br","edu.br","emp.br","eng.br","esp.br","etc.br","eti.br","far.br","feira.br","flog.br","floripa.br","fm.br","fnd.br","fortal.br","fot.br","foz.br","fst.br","g12.br","ggf.br","goiania.br","gov.br","ac.gov.br","al.gov.br","am.gov.br","ap.gov.br","ba.gov.br","ce.gov.br","df.gov.br","es.gov.br","go.gov.br","ma.gov.br","mg.gov.br","ms.gov.br","mt.gov.br","pa.gov.br","pb.gov.br","pe.gov.br","pi.gov.br","pr.gov.br","rj.gov.br","rn.gov.br","ro.gov.br","rr.gov.br","rs.gov.br","sc.gov.br","se.gov.br","sp.gov.br","to.gov.br","gru.br","imb.br","ind.br","inf.br","jab.br","jampa.br","jdf.br","joinville.br","jor.br","jus.br","leg.br","lel.br","londrina.br","macapa.br","maceio.br","manaus.br","maringa.br","mat.br","med.br","mil.br","morena.br","mp.br","mus.br","natal.br","net.br","niteroi.br","*.nom.br","not.br","ntr.br","odo.br","ong.br","org.br","osasco.br","palmas.br","poa.br","ppg.br","pro.br","psc.br","psi.br","pvh.br","qsl.br","radio.br","rec.br","recife.br","ribeirao.br","rio.br","riobranco.br","riopreto.br","salvador.br","sampa.br","santamaria.br","santoandre.br","saobernardo.br","saogonca.br","sjc.br","slg.br","slz.br","sorocaba.br","srv.br","taxi.br","tc.br","teo.br","the.br","tmp.br","trd.br","tur.br","tv.br","udi.br","vet.br","vix.br","vlog.br","wiki.br","zlg.br","bs","com.bs","net.bs","org.bs","edu.bs","gov.bs","bt","com.bt","edu.bt","gov.bt","net.bt","org.bt","bv","bw","co.bw","org.bw","by","gov.by","mil.by","com.by","of.by","bz","com.bz","net.bz","org.bz","edu.bz","gov.bz","ca","ab.ca","bc.ca","mb.ca","nb.ca","nf.ca","nl.ca","ns.ca","nt.ca","nu.ca","on.ca","pe.ca","qc.ca","sk.ca","yk.ca","gc.ca","cat","cc","cd","gov.cd","cf","cg","ch","ci","org.ci","or.ci","com.ci","co.ci","edu.ci","ed.ci","ac.ci","net.ci","go.ci","asso.ci","aéroport.ci","int.ci","presse.ci","md.ci","gouv.ci","*.ck","!www.ck","cl","aprendemas.cl","co.cl","gob.cl","gov.cl","mil.cl","cm","co.cm","com.cm","gov.cm","net.cm","cn","ac.cn","com.cn","edu.cn","gov.cn","net.cn","org.cn","mil.cn","公司.cn","网络.cn","網絡.cn","ah.cn","bj.cn","cq.cn","fj.cn","gd.cn","gs.cn","gz.cn","gx.cn","ha.cn","hb.cn","he.cn","hi.cn","hl.cn","hn.cn","jl.cn","js.cn","jx.cn","ln.cn","nm.cn","nx.cn","qh.cn","sc.cn","sd.cn","sh.cn","sn.cn","sx.cn","tj.cn","xj.cn","xz.cn","yn.cn","zj.cn","hk.cn","mo.cn","tw.cn","co","arts.co","com.co","edu.co","firm.co","gov.co","info.co","int.co","mil.co","net.co","nom.co","org.co","rec.co","web.co","com","coop","cr","ac.cr","co.cr","ed.cr","fi.cr","go.cr","or.cr","sa.cr","cu","com.cu","edu.cu","org.cu","net.cu","gov.cu","inf.cu","cv","cw","com.cw","edu.cw","net.cw","org.cw","cx","gov.cx","cy","ac.cy","biz.cy","com.cy","ekloges.cy","gov.cy","ltd.cy","name.cy","net.cy","org.cy","parliament.cy","press.cy","pro.cy","tm.cy","cz","de","dj","dk","dm","com.dm","net.dm","org.dm","edu.dm","gov.dm","do","art.do","com.do","edu.do","gob.do","gov.do","mil.do","net.do","org.do","sld.do","web.do","dz","com.dz","org.dz","net.dz","gov.dz","edu.dz","asso.dz","pol.dz","art.dz","ec","com.ec","info.ec","net.ec","fin.ec","k12.ec","med.ec","pro.ec","org.ec","edu.ec","gov.ec","gob.ec","mil.ec","edu","ee","edu.ee","gov.ee","riik.ee","lib.ee","med.ee","com.ee","pri.ee","aip.ee","org.ee","fie.ee","eg","com.eg","edu.eg","eun.eg","gov.eg","mil.eg","name.eg","net.eg","org.eg","sci.eg","*.er","es","com.es","nom.es","org.es","gob.es","edu.es","et","com.et","gov.et","org.et","edu.et","biz.et","name.et","info.et","net.et","eu","fi","aland.fi","fj","ac.fj","biz.fj","com.fj","gov.fj","info.fj","mil.fj","name.fj","net.fj","org.fj","pro.fj","*.fk","fm","fo","fr","asso.fr","com.fr","gouv.fr","nom.fr","prd.fr","tm.fr","aeroport.fr","avocat.fr","avoues.fr","cci.fr","chambagri.fr","chirurgiens-dentistes.fr","experts-comptables.fr","geometre-expert.fr","greta.fr","huissier-justice.fr","medecin.fr","notaires.fr","pharmacien.fr","port.fr","veterinaire.fr","ga","gb","gd","ge","com.ge","edu.ge","gov.ge","org.ge","mil.ge","net.ge","pvt.ge","gf","gg","co.gg","net.gg","org.gg","gh","com.gh","edu.gh","gov.gh","org.gh","mil.gh","gi","com.gi","ltd.gi","gov.gi","mod.gi","edu.gi","org.gi","gl","co.gl","com.gl","edu.gl","net.gl","org.gl","gm","gn","ac.gn","com.gn","edu.gn","gov.gn","org.gn","net.gn","gov","gp","com.gp","net.gp","mobi.gp","edu.gp","org.gp","asso.gp","gq","gr","com.gr","edu.gr","net.gr","org.gr","gov.gr","gs","gt","com.gt","edu.gt","gob.gt","ind.gt","mil.gt","net.gt","org.gt","gu","com.gu","edu.gu","gov.gu","guam.gu","info.gu","net.gu","org.gu","web.gu","gw","gy","co.gy","com.gy","edu.gy","gov.gy","net.gy","org.gy","hk","com.hk","edu.hk","gov.hk","idv.hk","net.hk","org.hk","公司.hk","教育.hk","敎育.hk","政府.hk","個人.hk","个人.hk","箇人.hk","網络.hk","网络.hk","组織.hk","網絡.hk","网絡.hk","组织.hk","組織.hk","組织.hk","hm","hn","com.hn","edu.hn","org.hn","net.hn","mil.hn","gob.hn","hr","iz.hr","from.hr","name.hr","com.hr","ht","com.ht","shop.ht","firm.ht","info.ht","adult.ht","net.ht","pro.ht","org.ht","med.ht","art.ht","coop.ht","pol.ht","asso.ht","edu.ht","rel.ht","gouv.ht","perso.ht","hu","co.hu","info.hu","org.hu","priv.hu","sport.hu","tm.hu","2000.hu","agrar.hu","bolt.hu","casino.hu","city.hu","erotica.hu","erotika.hu","film.hu","forum.hu","games.hu","hotel.hu","ingatlan.hu","jogasz.hu","konyvelo.hu","lakas.hu","media.hu","news.hu","reklam.hu","sex.hu","shop.hu","suli.hu","szex.hu","tozsde.hu","utazas.hu","video.hu","id","ac.id","biz.id","co.id","desa.id","go.id","mil.id","my.id","net.id","or.id","ponpes.id","sch.id","web.id","ie","gov.ie","il","ac.il","co.il","gov.il","idf.il","k12.il","muni.il","net.il","org.il","im","ac.im","co.im","com.im","ltd.co.im","net.im","org.im","plc.co.im","tt.im","tv.im","in","co.in","firm.in","net.in","org.in","gen.in","ind.in","nic.in","ac.in","edu.in","res.in","gov.in","mil.in","info","int","eu.int","io","com.io","iq","gov.iq","edu.iq","mil.iq","com.iq","org.iq","net.iq","ir","ac.ir","co.ir","gov.ir","id.ir","net.ir","org.ir","sch.ir","ایران.ir","ايران.ir","is","net.is","com.is","edu.is","gov.is","org.is","int.is","it","gov.it","edu.it","abr.it","abruzzo.it","aosta-valley.it","aostavalley.it","bas.it","basilicata.it","cal.it","calabria.it","cam.it","campania.it","emilia-romagna.it","emiliaromagna.it","emr.it","friuli-v-giulia.it","friuli-ve-giulia.it","friuli-vegiulia.it","friuli-venezia-giulia.it","friuli-veneziagiulia.it","friuli-vgiulia.it","friuliv-giulia.it","friulive-giulia.it","friulivegiulia.it","friulivenezia-giulia.it","friuliveneziagiulia.it","friulivgiulia.it","fvg.it","laz.it","lazio.it","lig.it","liguria.it","lom.it","lombardia.it","lombardy.it","lucania.it","mar.it","marche.it","mol.it","molise.it","piedmont.it","piemonte.it","pmn.it","pug.it","puglia.it","sar.it","sardegna.it","sardinia.it","sic.it","sicilia.it","sicily.it","taa.it","tos.it","toscana.it","trentin-sud-tirol.it","trentin-süd-tirol.it","trentin-sudtirol.it","trentin-südtirol.it","trentin-sued-tirol.it","trentin-suedtirol.it","trentino-a-adige.it","trentino-aadige.it","trentino-alto-adige.it","trentino-altoadige.it","trentino-s-tirol.it","trentino-stirol.it","trentino-sud-tirol.it","trentino-süd-tirol.it","trentino-sudtirol.it","trentino-südtirol.it","trentino-sued-tirol.it","trentino-suedtirol.it","trentino.it","trentinoa-adige.it","trentinoaadige.it","trentinoalto-adige.it","trentinoaltoadige.it","trentinos-tirol.it","trentinostirol.it","trentinosud-tirol.it","trentinosüd-tirol.it","trentinosudtirol.it","trentinosüdtirol.it","trentinosued-tirol.it","trentinosuedtirol.it","trentinsud-tirol.it","trentinsüd-tirol.it","trentinsudtirol.it","trentinsüdtirol.it","trentinsued-tirol.it","trentinsuedtirol.it","tuscany.it","umb.it","umbria.it","val-d-aosta.it","val-daosta.it","vald-aosta.it","valdaosta.it","valle-aosta.it","valle-d-aosta.it","valle-daosta.it","valleaosta.it","valled-aosta.it","valledaosta.it","vallee-aoste.it","vallée-aoste.it","vallee-d-aoste.it","vallée-d-aoste.it","valleeaoste.it","valléeaoste.it","valleedaoste.it","valléedaoste.it","vao.it","vda.it","ven.it","veneto.it","ag.it","agrigento.it","al.it","alessandria.it","alto-adige.it","altoadige.it","an.it","ancona.it","andria-barletta-trani.it","andria-trani-barletta.it","andriabarlettatrani.it","andriatranibarletta.it","ao.it","aosta.it","aoste.it","ap.it","aq.it","aquila.it","ar.it","arezzo.it","ascoli-piceno.it","ascolipiceno.it","asti.it","at.it","av.it","avellino.it","ba.it","balsan-sudtirol.it","balsan-südtirol.it","balsan-suedtirol.it","balsan.it","bari.it","barletta-trani-andria.it","barlettatraniandria.it","belluno.it","benevento.it","bergamo.it","bg.it","bi.it","biella.it","bl.it","bn.it","bo.it","bologna.it","bolzano-altoadige.it","bolzano.it","bozen-sudtirol.it","bozen-südtirol.it","bozen-suedtirol.it","bozen.it","br.it","brescia.it","brindisi.it","bs.it","bt.it","bulsan-sudtirol.it","bulsan-südtirol.it","bulsan-suedtirol.it","bulsan.it","bz.it","ca.it","cagliari.it","caltanissetta.it","campidano-medio.it","campidanomedio.it","campobasso.it","carbonia-iglesias.it","carboniaiglesias.it","carrara-massa.it","carraramassa.it","caserta.it","catania.it","catanzaro.it","cb.it","ce.it","cesena-forli.it","cesena-forlì.it","cesenaforli.it","cesenaforlì.it","ch.it","chieti.it","ci.it","cl.it","cn.it","co.it","como.it","cosenza.it","cr.it","cremona.it","crotone.it","cs.it","ct.it","cuneo.it","cz.it","dell-ogliastra.it","dellogliastra.it","en.it","enna.it","fc.it","fe.it","fermo.it","ferrara.it","fg.it","fi.it","firenze.it","florence.it","fm.it","foggia.it","forli-cesena.it","forlì-cesena.it","forlicesena.it","forlìcesena.it","fr.it","frosinone.it","ge.it","genoa.it","genova.it","go.it","gorizia.it","gr.it","grosseto.it","iglesias-carbonia.it","iglesiascarbonia.it","im.it","imperia.it","is.it","isernia.it","kr.it","la-spezia.it","laquila.it","laspezia.it","latina.it","lc.it","le.it","lecce.it","lecco.it","li.it","livorno.it","lo.it","lodi.it","lt.it","lu.it","lucca.it","macerata.it","mantova.it","massa-carrara.it","massacarrara.it","matera.it","mb.it","mc.it","me.it","medio-campidano.it","mediocampidano.it","messina.it","mi.it","milan.it","milano.it","mn.it","mo.it","modena.it","monza-brianza.it","monza-e-della-brianza.it","monza.it","monzabrianza.it","monzaebrianza.it","monzaedellabrianza.it","ms.it","mt.it","na.it","naples.it","napoli.it","no.it","novara.it","nu.it","nuoro.it","og.it","ogliastra.it","olbia-tempio.it","olbiatempio.it","or.it","oristano.it","ot.it","pa.it","padova.it","padua.it","palermo.it","parma.it","pavia.it","pc.it","pd.it","pe.it","perugia.it","pesaro-urbino.it","pesarourbino.it","pescara.it","pg.it","pi.it","piacenza.it","pisa.it","pistoia.it","pn.it","po.it","pordenone.it","potenza.it","pr.it","prato.it","pt.it","pu.it","pv.it","pz.it","ra.it","ragusa.it","ravenna.it","rc.it","re.it","reggio-calabria.it","reggio-emilia.it","reggiocalabria.it","reggioemilia.it","rg.it","ri.it","rieti.it","rimini.it","rm.it","rn.it","ro.it","roma.it","rome.it","rovigo.it","sa.it","salerno.it","sassari.it","savona.it","si.it","siena.it","siracusa.it","so.it","sondrio.it","sp.it","sr.it","ss.it","suedtirol.it","südtirol.it","sv.it","ta.it","taranto.it","te.it","tempio-olbia.it","tempioolbia.it","teramo.it","terni.it","tn.it","to.it","torino.it","tp.it","tr.it","trani-andria-barletta.it","trani-barletta-andria.it","traniandriabarletta.it","tranibarlettaandria.it","trapani.it","trento.it","treviso.it","trieste.it","ts.it","turin.it","tv.it","ud.it","udine.it","urbino-pesaro.it","urbinopesaro.it","va.it","varese.it","vb.it","vc.it","ve.it","venezia.it","venice.it","verbania.it","vercelli.it","verona.it","vi.it","vibo-valentia.it","vibovalentia.it","vicenza.it","viterbo.it","vr.it","vs.it","vt.it","vv.it","je","co.je","net.je","org.je","*.jm","jo","com.jo","org.jo","net.jo","edu.jo","sch.jo","gov.jo","mil.jo","name.jo","jobs","jp","ac.jp","ad.jp","co.jp","ed.jp","go.jp","gr.jp","lg.jp","ne.jp","or.jp","aichi.jp","akita.jp","aomori.jp","chiba.jp","ehime.jp","fukui.jp","fukuoka.jp","fukushima.jp","gifu.jp","gunma.jp","hiroshima.jp","hokkaido.jp","hyogo.jp","ibaraki.jp","ishikawa.jp","iwate.jp","kagawa.jp","kagoshima.jp","kanagawa.jp","kochi.jp","kumamoto.jp","kyoto.jp","mie.jp","miyagi.jp","miyazaki.jp","nagano.jp","nagasaki.jp","nara.jp","niigata.jp","oita.jp","okayama.jp","okinawa.jp","osaka.jp","saga.jp","saitama.jp","shiga.jp","shimane.jp","shizuoka.jp","tochigi.jp","tokushima.jp","tokyo.jp","tottori.jp","toyama.jp","wakayama.jp","yamagata.jp","yamaguchi.jp","yamanashi.jp","栃木.jp","愛知.jp","愛媛.jp","兵庫.jp","熊本.jp","茨城.jp","北海道.jp","千葉.jp","和歌山.jp","長崎.jp","長野.jp","新潟.jp","青森.jp","静岡.jp","東京.jp","石川.jp","埼玉.jp","三重.jp","京都.jp","佐賀.jp","大分.jp","大阪.jp","奈良.jp","宮城.jp","宮崎.jp","富山.jp","山口.jp","山形.jp","山梨.jp","岩手.jp","岐阜.jp","岡山.jp","島根.jp","広島.jp","徳島.jp","沖縄.jp","滋賀.jp","神奈川.jp","福井.jp","福岡.jp","福島.jp","秋田.jp","群馬.jp","香川.jp","高知.jp","鳥取.jp","鹿児島.jp","*.kawasaki.jp","*.kitakyushu.jp","*.kobe.jp","*.nagoya.jp","*.sapporo.jp","*.sendai.jp","*.yokohama.jp","!city.kawasaki.jp","!city.kitakyushu.jp","!city.kobe.jp","!city.nagoya.jp","!city.sapporo.jp","!city.sendai.jp","!city.yokohama.jp","aisai.aichi.jp","ama.aichi.jp","anjo.aichi.jp","asuke.aichi.jp","chiryu.aichi.jp","chita.aichi.jp","fuso.aichi.jp","gamagori.aichi.jp","handa.aichi.jp","hazu.aichi.jp","hekinan.aichi.jp","higashiura.aichi.jp","ichinomiya.aichi.jp","inazawa.aichi.jp","inuyama.aichi.jp","isshiki.aichi.jp","iwakura.aichi.jp","kanie.aichi.jp","kariya.aichi.jp","kasugai.aichi.jp","kira.aichi.jp","kiyosu.aichi.jp","komaki.aichi.jp","konan.aichi.jp","kota.aichi.jp","mihama.aichi.jp","miyoshi.aichi.jp","nishio.aichi.jp","nisshin.aichi.jp","obu.aichi.jp","oguchi.aichi.jp","oharu.aichi.jp","okazaki.aichi.jp","owariasahi.aichi.jp","seto.aichi.jp","shikatsu.aichi.jp","shinshiro.aichi.jp","shitara.aichi.jp","tahara.aichi.jp","takahama.aichi.jp","tobishima.aichi.jp","toei.aichi.jp","togo.aichi.jp","tokai.aichi.jp","tokoname.aichi.jp","toyoake.aichi.jp","toyohashi.aichi.jp","toyokawa.aichi.jp","toyone.aichi.jp","toyota.aichi.jp","tsushima.aichi.jp","yatomi.aichi.jp","akita.akita.jp","daisen.akita.jp","fujisato.akita.jp","gojome.akita.jp","hachirogata.akita.jp","happou.akita.jp","higashinaruse.akita.jp","honjo.akita.jp","honjyo.akita.jp","ikawa.akita.jp","kamikoani.akita.jp","kamioka.akita.jp","katagami.akita.jp","kazuno.akita.jp","kitaakita.akita.jp","kosaka.akita.jp","kyowa.akita.jp","misato.akita.jp","mitane.akita.jp","moriyoshi.akita.jp","nikaho.akita.jp","noshiro.akita.jp","odate.akita.jp","oga.akita.jp","ogata.akita.jp","semboku.akita.jp","yokote.akita.jp","yurihonjo.akita.jp","aomori.aomori.jp","gonohe.aomori.jp","hachinohe.aomori.jp","hashikami.aomori.jp","hiranai.aomori.jp","hirosaki.aomori.jp","itayanagi.aomori.jp","kuroishi.aomori.jp","misawa.aomori.jp","mutsu.aomori.jp","nakadomari.aomori.jp","noheji.aomori.jp","oirase.aomori.jp","owani.aomori.jp","rokunohe.aomori.jp","sannohe.aomori.jp","shichinohe.aomori.jp","shingo.aomori.jp","takko.aomori.jp","towada.aomori.jp","tsugaru.aomori.jp","tsuruta.aomori.jp","abiko.chiba.jp","asahi.chiba.jp","chonan.chiba.jp","chosei.chiba.jp","choshi.chiba.jp","chuo.chiba.jp","funabashi.chiba.jp","futtsu.chiba.jp","hanamigawa.chiba.jp","ichihara.chiba.jp","ichikawa.chiba.jp","ichinomiya.chiba.jp","inzai.chiba.jp","isumi.chiba.jp","kamagaya.chiba.jp","kamogawa.chiba.jp","kashiwa.chiba.jp","katori.chiba.jp","katsuura.chiba.jp","kimitsu.chiba.jp","kisarazu.chiba.jp","kozaki.chiba.jp","kujukuri.chiba.jp","kyonan.chiba.jp","matsudo.chiba.jp","midori.chiba.jp","mihama.chiba.jp","minamiboso.chiba.jp","mobara.chiba.jp","mutsuzawa.chiba.jp","nagara.chiba.jp","nagareyama.chiba.jp","narashino.chiba.jp","narita.chiba.jp","noda.chiba.jp","oamishirasato.chiba.jp","omigawa.chiba.jp","onjuku.chiba.jp","otaki.chiba.jp","sakae.chiba.jp","sakura.chiba.jp","shimofusa.chiba.jp","shirako.chiba.jp","shiroi.chiba.jp","shisui.chiba.jp","sodegaura.chiba.jp","sosa.chiba.jp","tako.chiba.jp","tateyama.chiba.jp","togane.chiba.jp","tohnosho.chiba.jp","tomisato.chiba.jp","urayasu.chiba.jp","yachimata.chiba.jp","yachiyo.chiba.jp","yokaichiba.chiba.jp","yokoshibahikari.chiba.jp","yotsukaido.chiba.jp","ainan.ehime.jp","honai.ehime.jp","ikata.ehime.jp","imabari.ehime.jp","iyo.ehime.jp","kamijima.ehime.jp","kihoku.ehime.jp","kumakogen.ehime.jp","masaki.ehime.jp","matsuno.ehime.jp","matsuyama.ehime.jp","namikata.ehime.jp","niihama.ehime.jp","ozu.ehime.jp","saijo.ehime.jp","seiyo.ehime.jp","shikokuchuo.ehime.jp","tobe.ehime.jp","toon.ehime.jp","uchiko.ehime.jp","uwajima.ehime.jp","yawatahama.ehime.jp","echizen.fukui.jp","eiheiji.fukui.jp","fukui.fukui.jp","ikeda.fukui.jp","katsuyama.fukui.jp","mihama.fukui.jp","minamiechizen.fukui.jp","obama.fukui.jp","ohi.fukui.jp","ono.fukui.jp","sabae.fukui.jp","sakai.fukui.jp","takahama.fukui.jp","tsuruga.fukui.jp","wakasa.fukui.jp","ashiya.fukuoka.jp","buzen.fukuoka.jp","chikugo.fukuoka.jp","chikuho.fukuoka.jp","chikujo.fukuoka.jp","chikushino.fukuoka.jp","chikuzen.fukuoka.jp","chuo.fukuoka.jp","dazaifu.fukuoka.jp","fukuchi.fukuoka.jp","hakata.fukuoka.jp","higashi.fukuoka.jp","hirokawa.fukuoka.jp","hisayama.fukuoka.jp","iizuka.fukuoka.jp","inatsuki.fukuoka.jp","kaho.fukuoka.jp","kasuga.fukuoka.jp","kasuya.fukuoka.jp","kawara.fukuoka.jp","keisen.fukuoka.jp","koga.fukuoka.jp","kurate.fukuoka.jp","kurogi.fukuoka.jp","kurume.fukuoka.jp","minami.fukuoka.jp","miyako.fukuoka.jp","miyama.fukuoka.jp","miyawaka.fukuoka.jp","mizumaki.fukuoka.jp","munakata.fukuoka.jp","nakagawa.fukuoka.jp","nakama.fukuoka.jp","nishi.fukuoka.jp","nogata.fukuoka.jp","ogori.fukuoka.jp","okagaki.fukuoka.jp","okawa.fukuoka.jp","oki.fukuoka.jp","omuta.fukuoka.jp","onga.fukuoka.jp","onojo.fukuoka.jp","oto.fukuoka.jp","saigawa.fukuoka.jp","sasaguri.fukuoka.jp","shingu.fukuoka.jp","shinyoshitomi.fukuoka.jp","shonai.fukuoka.jp","soeda.fukuoka.jp","sue.fukuoka.jp","tachiarai.fukuoka.jp","tagawa.fukuoka.jp","takata.fukuoka.jp","toho.fukuoka.jp","toyotsu.fukuoka.jp","tsuiki.fukuoka.jp","ukiha.fukuoka.jp","umi.fukuoka.jp","usui.fukuoka.jp","yamada.fukuoka.jp","yame.fukuoka.jp","yanagawa.fukuoka.jp","yukuhashi.fukuoka.jp","aizubange.fukushima.jp","aizumisato.fukushima.jp","aizuwakamatsu.fukushima.jp","asakawa.fukushima.jp","bandai.fukushima.jp","date.fukushima.jp","fukushima.fukushima.jp","furudono.fukushima.jp","futaba.fukushima.jp","hanawa.fukushima.jp","higashi.fukushima.jp","hirata.fukushima.jp","hirono.fukushima.jp","iitate.fukushima.jp","inawashiro.fukushima.jp","ishikawa.fukushima.jp","iwaki.fukushima.jp","izumizaki.fukushima.jp","kagamiishi.fukushima.jp","kaneyama.fukushima.jp","kawamata.fukushima.jp","kitakata.fukushima.jp","kitashiobara.fukushima.jp","koori.fukushima.jp","koriyama.fukushima.jp","kunimi.fukushima.jp","miharu.fukushima.jp","mishima.fukushima.jp","namie.fukushima.jp","nango.fukushima.jp","nishiaizu.fukushima.jp","nishigo.fukushima.jp","okuma.fukushima.jp","omotego.fukushima.jp","ono.fukushima.jp","otama.fukushima.jp","samegawa.fukushima.jp","shimogo.fukushima.jp","shirakawa.fukushima.jp","showa.fukushima.jp","soma.fukushima.jp","sukagawa.fukushima.jp","taishin.fukushima.jp","tamakawa.fukushima.jp","tanagura.fukushima.jp","tenei.fukushima.jp","yabuki.fukushima.jp","yamato.fukushima.jp","yamatsuri.fukushima.jp","yanaizu.fukushima.jp","yugawa.fukushima.jp","anpachi.gifu.jp","ena.gifu.jp","gifu.gifu.jp","ginan.gifu.jp","godo.gifu.jp","gujo.gifu.jp","hashima.gifu.jp","hichiso.gifu.jp","hida.gifu.jp","higashishirakawa.gifu.jp","ibigawa.gifu.jp","ikeda.gifu.jp","kakamigahara.gifu.jp","kani.gifu.jp","kasahara.gifu.jp","kasamatsu.gifu.jp","kawaue.gifu.jp","kitagata.gifu.jp","mino.gifu.jp","minokamo.gifu.jp","mitake.gifu.jp","mizunami.gifu.jp","motosu.gifu.jp","nakatsugawa.gifu.jp","ogaki.gifu.jp","sakahogi.gifu.jp","seki.gifu.jp","sekigahara.gifu.jp","shirakawa.gifu.jp","tajimi.gifu.jp","takayama.gifu.jp","tarui.gifu.jp","toki.gifu.jp","tomika.gifu.jp","wanouchi.gifu.jp","yamagata.gifu.jp","yaotsu.gifu.jp","yoro.gifu.jp","annaka.gunma.jp","chiyoda.gunma.jp","fujioka.gunma.jp","higashiagatsuma.gunma.jp","isesaki.gunma.jp","itakura.gunma.jp","kanna.gunma.jp","kanra.gunma.jp","katashina.gunma.jp","kawaba.gunma.jp","kiryu.gunma.jp","kusatsu.gunma.jp","maebashi.gunma.jp","meiwa.gunma.jp","midori.gunma.jp","minakami.gunma.jp","naganohara.gunma.jp","nakanojo.gunma.jp","nanmoku.gunma.jp","numata.gunma.jp","oizumi.gunma.jp","ora.gunma.jp","ota.gunma.jp","shibukawa.gunma.jp","shimonita.gunma.jp","shinto.gunma.jp","showa.gunma.jp","takasaki.gunma.jp","takayama.gunma.jp","tamamura.gunma.jp","tatebayashi.gunma.jp","tomioka.gunma.jp","tsukiyono.gunma.jp","tsumagoi.gunma.jp","ueno.gunma.jp","yoshioka.gunma.jp","asaminami.hiroshima.jp","daiwa.hiroshima.jp","etajima.hiroshima.jp","fuchu.hiroshima.jp","fukuyama.hiroshima.jp","hatsukaichi.hiroshima.jp","higashihiroshima.hiroshima.jp","hongo.hiroshima.jp","jinsekikogen.hiroshima.jp","kaita.hiroshima.jp","kui.hiroshima.jp","kumano.hiroshima.jp","kure.hiroshima.jp","mihara.hiroshima.jp","miyoshi.hiroshima.jp","naka.hiroshima.jp","onomichi.hiroshima.jp","osakikamijima.hiroshima.jp","otake.hiroshima.jp","saka.hiroshima.jp","sera.hiroshima.jp","seranishi.hiroshima.jp","shinichi.hiroshima.jp","shobara.hiroshima.jp","takehara.hiroshima.jp","abashiri.hokkaido.jp","abira.hokkaido.jp","aibetsu.hokkaido.jp","akabira.hokkaido.jp","akkeshi.hokkaido.jp","asahikawa.hokkaido.jp","ashibetsu.hokkaido.jp","ashoro.hokkaido.jp","assabu.hokkaido.jp","atsuma.hokkaido.jp","bibai.hokkaido.jp","biei.hokkaido.jp","bifuka.hokkaido.jp","bihoro.hokkaido.jp","biratori.hokkaido.jp","chippubetsu.hokkaido.jp","chitose.hokkaido.jp","date.hokkaido.jp","ebetsu.hokkaido.jp","embetsu.hokkaido.jp","eniwa.hokkaido.jp","erimo.hokkaido.jp","esan.hokkaido.jp","esashi.hokkaido.jp","fukagawa.hokkaido.jp","fukushima.hokkaido.jp","furano.hokkaido.jp","furubira.hokkaido.jp","haboro.hokkaido.jp","hakodate.hokkaido.jp","hamatonbetsu.hokkaido.jp","hidaka.hokkaido.jp","higashikagura.hokkaido.jp","higashikawa.hokkaido.jp","hiroo.hokkaido.jp","hokuryu.hokkaido.jp","hokuto.hokkaido.jp","honbetsu.hokkaido.jp","horokanai.hokkaido.jp","horonobe.hokkaido.jp","ikeda.hokkaido.jp","imakane.hokkaido.jp","ishikari.hokkaido.jp","iwamizawa.hokkaido.jp","iwanai.hokkaido.jp","kamifurano.hokkaido.jp","kamikawa.hokkaido.jp","kamishihoro.hokkaido.jp","kamisunagawa.hokkaido.jp","kamoenai.hokkaido.jp","kayabe.hokkaido.jp","kembuchi.hokkaido.jp","kikonai.hokkaido.jp","kimobetsu.hokkaido.jp","kitahiroshima.hokkaido.jp","kitami.hokkaido.jp","kiyosato.hokkaido.jp","koshimizu.hokkaido.jp","kunneppu.hokkaido.jp","kuriyama.hokkaido.jp","kuromatsunai.hokkaido.jp","kushiro.hokkaido.jp","kutchan.hokkaido.jp","kyowa.hokkaido.jp","mashike.hokkaido.jp","matsumae.hokkaido.jp","mikasa.hokkaido.jp","minamifurano.hokkaido.jp","mombetsu.hokkaido.jp","moseushi.hokkaido.jp","mukawa.hokkaido.jp","muroran.hokkaido.jp","naie.hokkaido.jp","nakagawa.hokkaido.jp","nakasatsunai.hokkaido.jp","nakatombetsu.hokkaido.jp","nanae.hokkaido.jp","nanporo.hokkaido.jp","nayoro.hokkaido.jp","nemuro.hokkaido.jp","niikappu.hokkaido.jp","niki.hokkaido.jp","nishiokoppe.hokkaido.jp","noboribetsu.hokkaido.jp","numata.hokkaido.jp","obihiro.hokkaido.jp","obira.hokkaido.jp","oketo.hokkaido.jp","okoppe.hokkaido.jp","otaru.hokkaido.jp","otobe.hokkaido.jp","otofuke.hokkaido.jp","otoineppu.hokkaido.jp","oumu.hokkaido.jp","ozora.hokkaido.jp","pippu.hokkaido.jp","rankoshi.hokkaido.jp","rebun.hokkaido.jp","rikubetsu.hokkaido.jp","rishiri.hokkaido.jp","rishirifuji.hokkaido.jp","saroma.hokkaido.jp","sarufutsu.hokkaido.jp","shakotan.hokkaido.jp","shari.hokkaido.jp","shibecha.hokkaido.jp","shibetsu.hokkaido.jp","shikabe.hokkaido.jp","shikaoi.hokkaido.jp","shimamaki.hokkaido.jp","shimizu.hokkaido.jp","shimokawa.hokkaido.jp","shinshinotsu.hokkaido.jp","shintoku.hokkaido.jp","shiranuka.hokkaido.jp","shiraoi.hokkaido.jp","shiriuchi.hokkaido.jp","sobetsu.hokkaido.jp","sunagawa.hokkaido.jp","taiki.hokkaido.jp","takasu.hokkaido.jp","takikawa.hokkaido.jp","takinoue.hokkaido.jp","teshikaga.hokkaido.jp","tobetsu.hokkaido.jp","tohma.hokkaido.jp","tomakomai.hokkaido.jp","tomari.hokkaido.jp","toya.hokkaido.jp","toyako.hokkaido.jp","toyotomi.hokkaido.jp","toyoura.hokkaido.jp","tsubetsu.hokkaido.jp","tsukigata.hokkaido.jp","urakawa.hokkaido.jp","urausu.hokkaido.jp","uryu.hokkaido.jp","utashinai.hokkaido.jp","wakkanai.hokkaido.jp","wassamu.hokkaido.jp","yakumo.hokkaido.jp","yoichi.hokkaido.jp","aioi.hyogo.jp","akashi.hyogo.jp","ako.hyogo.jp","amagasaki.hyogo.jp","aogaki.hyogo.jp","asago.hyogo.jp","ashiya.hyogo.jp","awaji.hyogo.jp","fukusaki.hyogo.jp","goshiki.hyogo.jp","harima.hyogo.jp","himeji.hyogo.jp","ichikawa.hyogo.jp","inagawa.hyogo.jp","itami.hyogo.jp","kakogawa.hyogo.jp","kamigori.hyogo.jp","kamikawa.hyogo.jp","kasai.hyogo.jp","kasuga.hyogo.jp","kawanishi.hyogo.jp","miki.hyogo.jp","minamiawaji.hyogo.jp","nishinomiya.hyogo.jp","nishiwaki.hyogo.jp","ono.hyogo.jp","sanda.hyogo.jp","sannan.hyogo.jp","sasayama.hyogo.jp","sayo.hyogo.jp","shingu.hyogo.jp","shinonsen.hyogo.jp","shiso.hyogo.jp","sumoto.hyogo.jp","taishi.hyogo.jp","taka.hyogo.jp","takarazuka.hyogo.jp","takasago.hyogo.jp","takino.hyogo.jp","tamba.hyogo.jp","tatsuno.hyogo.jp","toyooka.hyogo.jp","yabu.hyogo.jp","yashiro.hyogo.jp","yoka.hyogo.jp","yokawa.hyogo.jp","ami.ibaraki.jp","asahi.ibaraki.jp","bando.ibaraki.jp","chikusei.ibaraki.jp","daigo.ibaraki.jp","fujishiro.ibaraki.jp","hitachi.ibaraki.jp","hitachinaka.ibaraki.jp","hitachiomiya.ibaraki.jp","hitachiota.ibaraki.jp","ibaraki.ibaraki.jp","ina.ibaraki.jp","inashiki.ibaraki.jp","itako.ibaraki.jp","iwama.ibaraki.jp","joso.ibaraki.jp","kamisu.ibaraki.jp","kasama.ibaraki.jp","kashima.ibaraki.jp","kasumigaura.ibaraki.jp","koga.ibaraki.jp","miho.ibaraki.jp","mito.ibaraki.jp","moriya.ibaraki.jp","naka.ibaraki.jp","namegata.ibaraki.jp","oarai.ibaraki.jp","ogawa.ibaraki.jp","omitama.ibaraki.jp","ryugasaki.ibaraki.jp","sakai.ibaraki.jp","sakuragawa.ibaraki.jp","shimodate.ibaraki.jp","shimotsuma.ibaraki.jp","shirosato.ibaraki.jp","sowa.ibaraki.jp","suifu.ibaraki.jp","takahagi.ibaraki.jp","tamatsukuri.ibaraki.jp","tokai.ibaraki.jp","tomobe.ibaraki.jp","tone.ibaraki.jp","toride.ibaraki.jp","tsuchiura.ibaraki.jp","tsukuba.ibaraki.jp","uchihara.ibaraki.jp","ushiku.ibaraki.jp","yachiyo.ibaraki.jp","yamagata.ibaraki.jp","yawara.ibaraki.jp","yuki.ibaraki.jp","anamizu.ishikawa.jp","hakui.ishikawa.jp","hakusan.ishikawa.jp","kaga.ishikawa.jp","kahoku.ishikawa.jp","kanazawa.ishikawa.jp","kawakita.ishikawa.jp","komatsu.ishikawa.jp","nakanoto.ishikawa.jp","nanao.ishikawa.jp","nomi.ishikawa.jp","nonoichi.ishikawa.jp","noto.ishikawa.jp","shika.ishikawa.jp","suzu.ishikawa.jp","tsubata.ishikawa.jp","tsurugi.ishikawa.jp","uchinada.ishikawa.jp","wajima.ishikawa.jp","fudai.iwate.jp","fujisawa.iwate.jp","hanamaki.iwate.jp","hiraizumi.iwate.jp","hirono.iwate.jp","ichinohe.iwate.jp","ichinoseki.iwate.jp","iwaizumi.iwate.jp","iwate.iwate.jp","joboji.iwate.jp","kamaishi.iwate.jp","kanegasaki.iwate.jp","karumai.iwate.jp","kawai.iwate.jp","kitakami.iwate.jp","kuji.iwate.jp","kunohe.iwate.jp","kuzumaki.iwate.jp","miyako.iwate.jp","mizusawa.iwate.jp","morioka.iwate.jp","ninohe.iwate.jp","noda.iwate.jp","ofunato.iwate.jp","oshu.iwate.jp","otsuchi.iwate.jp","rikuzentakata.iwate.jp","shiwa.iwate.jp","shizukuishi.iwate.jp","sumita.iwate.jp","tanohata.iwate.jp","tono.iwate.jp","yahaba.iwate.jp","yamada.iwate.jp","ayagawa.kagawa.jp","higashikagawa.kagawa.jp","kanonji.kagawa.jp","kotohira.kagawa.jp","manno.kagawa.jp","marugame.kagawa.jp","mitoyo.kagawa.jp","naoshima.kagawa.jp","sanuki.kagawa.jp","tadotsu.kagawa.jp","takamatsu.kagawa.jp","tonosho.kagawa.jp","uchinomi.kagawa.jp","utazu.kagawa.jp","zentsuji.kagawa.jp","akune.kagoshima.jp","amami.kagoshima.jp","hioki.kagoshima.jp","isa.kagoshima.jp","isen.kagoshima.jp","izumi.kagoshima.jp","kagoshima.kagoshima.jp","kanoya.kagoshima.jp","kawanabe.kagoshima.jp","kinko.kagoshima.jp","kouyama.kagoshima.jp","makurazaki.kagoshima.jp","matsumoto.kagoshima.jp","minamitane.kagoshima.jp","nakatane.kagoshima.jp","nishinoomote.kagoshima.jp","satsumasendai.kagoshima.jp","soo.kagoshima.jp","tarumizu.kagoshima.jp","yusui.kagoshima.jp","aikawa.kanagawa.jp","atsugi.kanagawa.jp","ayase.kanagawa.jp","chigasaki.kanagawa.jp","ebina.kanagawa.jp","fujisawa.kanagawa.jp","hadano.kanagawa.jp","hakone.kanagawa.jp","hiratsuka.kanagawa.jp","isehara.kanagawa.jp","kaisei.kanagawa.jp","kamakura.kanagawa.jp","kiyokawa.kanagawa.jp","matsuda.kanagawa.jp","minamiashigara.kanagawa.jp","miura.kanagawa.jp","nakai.kanagawa.jp","ninomiya.kanagawa.jp","odawara.kanagawa.jp","oi.kanagawa.jp","oiso.kanagawa.jp","sagamihara.kanagawa.jp","samukawa.kanagawa.jp","tsukui.kanagawa.jp","yamakita.kanagawa.jp","yamato.kanagawa.jp","yokosuka.kanagawa.jp","yugawara.kanagawa.jp","zama.kanagawa.jp","zushi.kanagawa.jp","aki.kochi.jp","geisei.kochi.jp","hidaka.kochi.jp","higashitsuno.kochi.jp","ino.kochi.jp","kagami.kochi.jp","kami.kochi.jp","kitagawa.kochi.jp","kochi.kochi.jp","mihara.kochi.jp","motoyama.kochi.jp","muroto.kochi.jp","nahari.kochi.jp","nakamura.kochi.jp","nankoku.kochi.jp","nishitosa.kochi.jp","niyodogawa.kochi.jp","ochi.kochi.jp","okawa.kochi.jp","otoyo.kochi.jp","otsuki.kochi.jp","sakawa.kochi.jp","sukumo.kochi.jp","susaki.kochi.jp","tosa.kochi.jp","tosashimizu.kochi.jp","toyo.kochi.jp","tsuno.kochi.jp","umaji.kochi.jp","yasuda.kochi.jp","yusuhara.kochi.jp","amakusa.kumamoto.jp","arao.kumamoto.jp","aso.kumamoto.jp","choyo.kumamoto.jp","gyokuto.kumamoto.jp","kamiamakusa.kumamoto.jp","kikuchi.kumamoto.jp","kumamoto.kumamoto.jp","mashiki.kumamoto.jp","mifune.kumamoto.jp","minamata.kumamoto.jp","minamioguni.kumamoto.jp","nagasu.kumamoto.jp","nishihara.kumamoto.jp","oguni.kumamoto.jp","ozu.kumamoto.jp","sumoto.kumamoto.jp","takamori.kumamoto.jp","uki.kumamoto.jp","uto.kumamoto.jp","yamaga.kumamoto.jp","yamato.kumamoto.jp","yatsushiro.kumamoto.jp","ayabe.kyoto.jp","fukuchiyama.kyoto.jp","higashiyama.kyoto.jp","ide.kyoto.jp","ine.kyoto.jp","joyo.kyoto.jp","kameoka.kyoto.jp","kamo.kyoto.jp","kita.kyoto.jp","kizu.kyoto.jp","kumiyama.kyoto.jp","kyotamba.kyoto.jp","kyotanabe.kyoto.jp","kyotango.kyoto.jp","maizuru.kyoto.jp","minami.kyoto.jp","minamiyamashiro.kyoto.jp","miyazu.kyoto.jp","muko.kyoto.jp","nagaokakyo.kyoto.jp","nakagyo.kyoto.jp","nantan.kyoto.jp","oyamazaki.kyoto.jp","sakyo.kyoto.jp","seika.kyoto.jp","tanabe.kyoto.jp","uji.kyoto.jp","ujitawara.kyoto.jp","wazuka.kyoto.jp","yamashina.kyoto.jp","yawata.kyoto.jp","asahi.mie.jp","inabe.mie.jp","ise.mie.jp","kameyama.mie.jp","kawagoe.mie.jp","kiho.mie.jp","kisosaki.mie.jp","kiwa.mie.jp","komono.mie.jp","kumano.mie.jp","kuwana.mie.jp","matsusaka.mie.jp","meiwa.mie.jp","mihama.mie.jp","minamiise.mie.jp","misugi.mie.jp","miyama.mie.jp","nabari.mie.jp","shima.mie.jp","suzuka.mie.jp","tado.mie.jp","taiki.mie.jp","taki.mie.jp","tamaki.mie.jp","toba.mie.jp","tsu.mie.jp","udono.mie.jp","ureshino.mie.jp","watarai.mie.jp","yokkaichi.mie.jp","furukawa.miyagi.jp","higashimatsushima.miyagi.jp","ishinomaki.miyagi.jp","iwanuma.miyagi.jp","kakuda.miyagi.jp","kami.miyagi.jp","kawasaki.miyagi.jp","marumori.miyagi.jp","matsushima.miyagi.jp","minamisanriku.miyagi.jp","misato.miyagi.jp","murata.miyagi.jp","natori.miyagi.jp","ogawara.miyagi.jp","ohira.miyagi.jp","onagawa.miyagi.jp","osaki.miyagi.jp","rifu.miyagi.jp","semine.miyagi.jp","shibata.miyagi.jp","shichikashuku.miyagi.jp","shikama.miyagi.jp","shiogama.miyagi.jp","shiroishi.miyagi.jp","tagajo.miyagi.jp","taiwa.miyagi.jp","tome.miyagi.jp","tomiya.miyagi.jp","wakuya.miyagi.jp","watari.miyagi.jp","yamamoto.miyagi.jp","zao.miyagi.jp","aya.miyazaki.jp","ebino.miyazaki.jp","gokase.miyazaki.jp","hyuga.miyazaki.jp","kadogawa.miyazaki.jp","kawaminami.miyazaki.jp","kijo.miyazaki.jp","kitagawa.miyazaki.jp","kitakata.miyazaki.jp","kitaura.miyazaki.jp","kobayashi.miyazaki.jp","kunitomi.miyazaki.jp","kushima.miyazaki.jp","mimata.miyazaki.jp","miyakonojo.miyazaki.jp","miyazaki.miyazaki.jp","morotsuka.miyazaki.jp","nichinan.miyazaki.jp","nishimera.miyazaki.jp","nobeoka.miyazaki.jp","saito.miyazaki.jp","shiiba.miyazaki.jp","shintomi.miyazaki.jp","takaharu.miyazaki.jp","takanabe.miyazaki.jp","takazaki.miyazaki.jp","tsuno.miyazaki.jp","achi.nagano.jp","agematsu.nagano.jp","anan.nagano.jp","aoki.nagano.jp","asahi.nagano.jp","azumino.nagano.jp","chikuhoku.nagano.jp","chikuma.nagano.jp","chino.nagano.jp","fujimi.nagano.jp","hakuba.nagano.jp","hara.nagano.jp","hiraya.nagano.jp","iida.nagano.jp","iijima.nagano.jp","iiyama.nagano.jp","iizuna.nagano.jp","ikeda.nagano.jp","ikusaka.nagano.jp","ina.nagano.jp","karuizawa.nagano.jp","kawakami.nagano.jp","kiso.nagano.jp","kisofukushima.nagano.jp","kitaaiki.nagano.jp","komagane.nagano.jp","komoro.nagano.jp","matsukawa.nagano.jp","matsumoto.nagano.jp","miasa.nagano.jp","minamiaiki.nagano.jp","minamimaki.nagano.jp","minamiminowa.nagano.jp","minowa.nagano.jp","miyada.nagano.jp","miyota.nagano.jp","mochizuki.nagano.jp","nagano.nagano.jp","nagawa.nagano.jp","nagiso.nagano.jp","nakagawa.nagano.jp","nakano.nagano.jp","nozawaonsen.nagano.jp","obuse.nagano.jp","ogawa.nagano.jp","okaya.nagano.jp","omachi.nagano.jp","omi.nagano.jp","ookuwa.nagano.jp","ooshika.nagano.jp","otaki.nagano.jp","otari.nagano.jp","sakae.nagano.jp","sakaki.nagano.jp","saku.nagano.jp","sakuho.nagano.jp","shimosuwa.nagano.jp","shinanomachi.nagano.jp","shiojiri.nagano.jp","suwa.nagano.jp","suzaka.nagano.jp","takagi.nagano.jp","takamori.nagano.jp","takayama.nagano.jp","tateshina.nagano.jp","tatsuno.nagano.jp","togakushi.nagano.jp","togura.nagano.jp","tomi.nagano.jp","ueda.nagano.jp","wada.nagano.jp","yamagata.nagano.jp","yamanouchi.nagano.jp","yasaka.nagano.jp","yasuoka.nagano.jp","chijiwa.nagasaki.jp","futsu.nagasaki.jp","goto.nagasaki.jp","hasami.nagasaki.jp","hirado.nagasaki.jp","iki.nagasaki.jp","isahaya.nagasaki.jp","kawatana.nagasaki.jp","kuchinotsu.nagasaki.jp","matsuura.nagasaki.jp","nagasaki.nagasaki.jp","obama.nagasaki.jp","omura.nagasaki.jp","oseto.nagasaki.jp","saikai.nagasaki.jp","sasebo.nagasaki.jp","seihi.nagasaki.jp","shimabara.nagasaki.jp","shinkamigoto.nagasaki.jp","togitsu.nagasaki.jp","tsushima.nagasaki.jp","unzen.nagasaki.jp","ando.nara.jp","gose.nara.jp","heguri.nara.jp","higashiyoshino.nara.jp","ikaruga.nara.jp","ikoma.nara.jp","kamikitayama.nara.jp","kanmaki.nara.jp","kashiba.nara.jp","kashihara.nara.jp","katsuragi.nara.jp","kawai.nara.jp","kawakami.nara.jp","kawanishi.nara.jp","koryo.nara.jp","kurotaki.nara.jp","mitsue.nara.jp","miyake.nara.jp","nara.nara.jp","nosegawa.nara.jp","oji.nara.jp","ouda.nara.jp","oyodo.nara.jp","sakurai.nara.jp","sango.nara.jp","shimoichi.nara.jp","shimokitayama.nara.jp","shinjo.nara.jp","soni.nara.jp","takatori.nara.jp","tawaramoto.nara.jp","tenkawa.nara.jp","tenri.nara.jp","uda.nara.jp","yamatokoriyama.nara.jp","yamatotakada.nara.jp","yamazoe.nara.jp","yoshino.nara.jp","aga.niigata.jp","agano.niigata.jp","gosen.niigata.jp","itoigawa.niigata.jp","izumozaki.niigata.jp","joetsu.niigata.jp","kamo.niigata.jp","kariwa.niigata.jp","kashiwazaki.niigata.jp","minamiuonuma.niigata.jp","mitsuke.niigata.jp","muika.niigata.jp","murakami.niigata.jp","myoko.niigata.jp","nagaoka.niigata.jp","niigata.niigata.jp","ojiya.niigata.jp","omi.niigata.jp","sado.niigata.jp","sanjo.niigata.jp","seiro.niigata.jp","seirou.niigata.jp","sekikawa.niigata.jp","shibata.niigata.jp","tagami.niigata.jp","tainai.niigata.jp","tochio.niigata.jp","tokamachi.niigata.jp","tsubame.niigata.jp","tsunan.niigata.jp","uonuma.niigata.jp","yahiko.niigata.jp","yoita.niigata.jp","yuzawa.niigata.jp","beppu.oita.jp","bungoono.oita.jp","bungotakada.oita.jp","hasama.oita.jp","hiji.oita.jp","himeshima.oita.jp","hita.oita.jp","kamitsue.oita.jp","kokonoe.oita.jp","kuju.oita.jp","kunisaki.oita.jp","kusu.oita.jp","oita.oita.jp","saiki.oita.jp","taketa.oita.jp","tsukumi.oita.jp","usa.oita.jp","usuki.oita.jp","yufu.oita.jp","akaiwa.okayama.jp","asakuchi.okayama.jp","bizen.okayama.jp","hayashima.okayama.jp","ibara.okayama.jp","kagamino.okayama.jp","kasaoka.okayama.jp","kibichuo.okayama.jp","kumenan.okayama.jp","kurashiki.okayama.jp","maniwa.okayama.jp","misaki.okayama.jp","nagi.okayama.jp","niimi.okayama.jp","nishiawakura.okayama.jp","okayama.okayama.jp","satosho.okayama.jp","setouchi.okayama.jp","shinjo.okayama.jp","shoo.okayama.jp","soja.okayama.jp","takahashi.okayama.jp","tamano.okayama.jp","tsuyama.okayama.jp","wake.okayama.jp","yakage.okayama.jp","aguni.okinawa.jp","ginowan.okinawa.jp","ginoza.okinawa.jp","gushikami.okinawa.jp","haebaru.okinawa.jp","higashi.okinawa.jp","hirara.okinawa.jp","iheya.okinawa.jp","ishigaki.okinawa.jp","ishikawa.okinawa.jp","itoman.okinawa.jp","izena.okinawa.jp","kadena.okinawa.jp","kin.okinawa.jp","kitadaito.okinawa.jp","kitanakagusuku.okinawa.jp","kumejima.okinawa.jp","kunigami.okinawa.jp","minamidaito.okinawa.jp","motobu.okinawa.jp","nago.okinawa.jp","naha.okinawa.jp","nakagusuku.okinawa.jp","nakijin.okinawa.jp","nanjo.okinawa.jp","nishihara.okinawa.jp","ogimi.okinawa.jp","okinawa.okinawa.jp","onna.okinawa.jp","shimoji.okinawa.jp","taketomi.okinawa.jp","tarama.okinawa.jp","tokashiki.okinawa.jp","tomigusuku.okinawa.jp","tonaki.okinawa.jp","urasoe.okinawa.jp","uruma.okinawa.jp","yaese.okinawa.jp","yomitan.okinawa.jp","yonabaru.okinawa.jp","yonaguni.okinawa.jp","zamami.okinawa.jp","abeno.osaka.jp","chihayaakasaka.osaka.jp","chuo.osaka.jp","daito.osaka.jp","fujiidera.osaka.jp","habikino.osaka.jp","hannan.osaka.jp","higashiosaka.osaka.jp","higashisumiyoshi.osaka.jp","higashiyodogawa.osaka.jp","hirakata.osaka.jp","ibaraki.osaka.jp","ikeda.osaka.jp","izumi.osaka.jp","izumiotsu.osaka.jp","izumisano.osaka.jp","kadoma.osaka.jp","kaizuka.osaka.jp","kanan.osaka.jp","kashiwara.osaka.jp","katano.osaka.jp","kawachinagano.osaka.jp","kishiwada.osaka.jp","kita.osaka.jp","kumatori.osaka.jp","matsubara.osaka.jp","minato.osaka.jp","minoh.osaka.jp","misaki.osaka.jp","moriguchi.osaka.jp","neyagawa.osaka.jp","nishi.osaka.jp","nose.osaka.jp","osakasayama.osaka.jp","sakai.osaka.jp","sayama.osaka.jp","sennan.osaka.jp","settsu.osaka.jp","shijonawate.osaka.jp","shimamoto.osaka.jp","suita.osaka.jp","tadaoka.osaka.jp","taishi.osaka.jp","tajiri.osaka.jp","takaishi.osaka.jp","takatsuki.osaka.jp","tondabayashi.osaka.jp","toyonaka.osaka.jp","toyono.osaka.jp","yao.osaka.jp","ariake.saga.jp","arita.saga.jp","fukudomi.saga.jp","genkai.saga.jp","hamatama.saga.jp","hizen.saga.jp","imari.saga.jp","kamimine.saga.jp","kanzaki.saga.jp","karatsu.saga.jp","kashima.saga.jp","kitagata.saga.jp","kitahata.saga.jp","kiyama.saga.jp","kouhoku.saga.jp","kyuragi.saga.jp","nishiarita.saga.jp","ogi.saga.jp","omachi.saga.jp","ouchi.saga.jp","saga.saga.jp","shiroishi.saga.jp","taku.saga.jp","tara.saga.jp","tosu.saga.jp","yoshinogari.saga.jp","arakawa.saitama.jp","asaka.saitama.jp","chichibu.saitama.jp","fujimi.saitama.jp","fujimino.saitama.jp","fukaya.saitama.jp","hanno.saitama.jp","hanyu.saitama.jp","hasuda.saitama.jp","hatogaya.saitama.jp","hatoyama.saitama.jp","hidaka.saitama.jp","higashichichibu.saitama.jp","higashimatsuyama.saitama.jp","honjo.saitama.jp","ina.saitama.jp","iruma.saitama.jp","iwatsuki.saitama.jp","kamiizumi.saitama.jp","kamikawa.saitama.jp","kamisato.saitama.jp","kasukabe.saitama.jp","kawagoe.saitama.jp","kawaguchi.saitama.jp","kawajima.saitama.jp","kazo.saitama.jp","kitamoto.saitama.jp","koshigaya.saitama.jp","kounosu.saitama.jp","kuki.saitama.jp","kumagaya.saitama.jp","matsubushi.saitama.jp","minano.saitama.jp","misato.saitama.jp","miyashiro.saitama.jp","miyoshi.saitama.jp","moroyama.saitama.jp","nagatoro.saitama.jp","namegawa.saitama.jp","niiza.saitama.jp","ogano.saitama.jp","ogawa.saitama.jp","ogose.saitama.jp","okegawa.saitama.jp","omiya.saitama.jp","otaki.saitama.jp","ranzan.saitama.jp","ryokami.saitama.jp","saitama.saitama.jp","sakado.saitama.jp","satte.saitama.jp","sayama.saitama.jp","shiki.saitama.jp","shiraoka.saitama.jp","soka.saitama.jp","sugito.saitama.jp","toda.saitama.jp","tokigawa.saitama.jp","tokorozawa.saitama.jp","tsurugashima.saitama.jp","urawa.saitama.jp","warabi.saitama.jp","yashio.saitama.jp","yokoze.saitama.jp","yono.saitama.jp","yorii.saitama.jp","yoshida.saitama.jp","yoshikawa.saitama.jp","yoshimi.saitama.jp","aisho.shiga.jp","gamo.shiga.jp","higashiomi.shiga.jp","hikone.shiga.jp","koka.shiga.jp","konan.shiga.jp","kosei.shiga.jp","koto.shiga.jp","kusatsu.shiga.jp","maibara.shiga.jp","moriyama.shiga.jp","nagahama.shiga.jp","nishiazai.shiga.jp","notogawa.shiga.jp","omihachiman.shiga.jp","otsu.shiga.jp","ritto.shiga.jp","ryuoh.shiga.jp","takashima.shiga.jp","takatsuki.shiga.jp","torahime.shiga.jp","toyosato.shiga.jp","yasu.shiga.jp","akagi.shimane.jp","ama.shimane.jp","gotsu.shimane.jp","hamada.shimane.jp","higashiizumo.shimane.jp","hikawa.shimane.jp","hikimi.shimane.jp","izumo.shimane.jp","kakinoki.shimane.jp","masuda.shimane.jp","matsue.shimane.jp","misato.shimane.jp","nishinoshima.shimane.jp","ohda.shimane.jp","okinoshima.shimane.jp","okuizumo.shimane.jp","shimane.shimane.jp","tamayu.shimane.jp","tsuwano.shimane.jp","unnan.shimane.jp","yakumo.shimane.jp","yasugi.shimane.jp","yatsuka.shimane.jp","arai.shizuoka.jp","atami.shizuoka.jp","fuji.shizuoka.jp","fujieda.shizuoka.jp","fujikawa.shizuoka.jp","fujinomiya.shizuoka.jp","fukuroi.shizuoka.jp","gotemba.shizuoka.jp","haibara.shizuoka.jp","hamamatsu.shizuoka.jp","higashiizu.shizuoka.jp","ito.shizuoka.jp","iwata.shizuoka.jp","izu.shizuoka.jp","izunokuni.shizuoka.jp","kakegawa.shizuoka.jp","kannami.shizuoka.jp","kawanehon.shizuoka.jp","kawazu.shizuoka.jp","kikugawa.shizuoka.jp","kosai.shizuoka.jp","makinohara.shizuoka.jp","matsuzaki.shizuoka.jp","minamiizu.shizuoka.jp","mishima.shizuoka.jp","morimachi.shizuoka.jp","nishiizu.shizuoka.jp","numazu.shizuoka.jp","omaezaki.shizuoka.jp","shimada.shizuoka.jp","shimizu.shizuoka.jp","shimoda.shizuoka.jp","shizuoka.shizuoka.jp","susono.shizuoka.jp","yaizu.shizuoka.jp","yoshida.shizuoka.jp","ashikaga.tochigi.jp","bato.tochigi.jp","haga.tochigi.jp","ichikai.tochigi.jp","iwafune.tochigi.jp","kaminokawa.tochigi.jp","kanuma.tochigi.jp","karasuyama.tochigi.jp","kuroiso.tochigi.jp","mashiko.tochigi.jp","mibu.tochigi.jp","moka.tochigi.jp","motegi.tochigi.jp","nasu.tochigi.jp","nasushiobara.tochigi.jp","nikko.tochigi.jp","nishikata.tochigi.jp","nogi.tochigi.jp","ohira.tochigi.jp","ohtawara.tochigi.jp","oyama.tochigi.jp","sakura.tochigi.jp","sano.tochigi.jp","shimotsuke.tochigi.jp","shioya.tochigi.jp","takanezawa.tochigi.jp","tochigi.tochigi.jp","tsuga.tochigi.jp","ujiie.tochigi.jp","utsunomiya.tochigi.jp","yaita.tochigi.jp","aizumi.tokushima.jp","anan.tokushima.jp","ichiba.tokushima.jp","itano.tokushima.jp","kainan.tokushima.jp","komatsushima.tokushima.jp","matsushige.tokushima.jp","mima.tokushima.jp","minami.tokushima.jp","miyoshi.tokushima.jp","mugi.tokushima.jp","nakagawa.tokushima.jp","naruto.tokushima.jp","sanagochi.tokushima.jp","shishikui.tokushima.jp","tokushima.tokushima.jp","wajiki.tokushima.jp","adachi.tokyo.jp","akiruno.tokyo.jp","akishima.tokyo.jp","aogashima.tokyo.jp","arakawa.tokyo.jp","bunkyo.tokyo.jp","chiyoda.tokyo.jp","chofu.tokyo.jp","chuo.tokyo.jp","edogawa.tokyo.jp","fuchu.tokyo.jp","fussa.tokyo.jp","hachijo.tokyo.jp","hachioji.tokyo.jp","hamura.tokyo.jp","higashikurume.tokyo.jp","higashimurayama.tokyo.jp","higashiyamato.tokyo.jp","hino.tokyo.jp","hinode.tokyo.jp","hinohara.tokyo.jp","inagi.tokyo.jp","itabashi.tokyo.jp","katsushika.tokyo.jp","kita.tokyo.jp","kiyose.tokyo.jp","kodaira.tokyo.jp","koganei.tokyo.jp","kokubunji.tokyo.jp","komae.tokyo.jp","koto.tokyo.jp","kouzushima.tokyo.jp","kunitachi.tokyo.jp","machida.tokyo.jp","meguro.tokyo.jp","minato.tokyo.jp","mitaka.tokyo.jp","mizuho.tokyo.jp","musashimurayama.tokyo.jp","musashino.tokyo.jp","nakano.tokyo.jp","nerima.tokyo.jp","ogasawara.tokyo.jp","okutama.tokyo.jp","ome.tokyo.jp","oshima.tokyo.jp","ota.tokyo.jp","setagaya.tokyo.jp","shibuya.tokyo.jp","shinagawa.tokyo.jp","shinjuku.tokyo.jp","suginami.tokyo.jp","sumida.tokyo.jp","tachikawa.tokyo.jp","taito.tokyo.jp","tama.tokyo.jp","toshima.tokyo.jp","chizu.tottori.jp","hino.tottori.jp","kawahara.tottori.jp","koge.tottori.jp","kotoura.tottori.jp","misasa.tottori.jp","nanbu.tottori.jp","nichinan.tottori.jp","sakaiminato.tottori.jp","tottori.tottori.jp","wakasa.tottori.jp","yazu.tottori.jp","yonago.tottori.jp","asahi.toyama.jp","fuchu.toyama.jp","fukumitsu.toyama.jp","funahashi.toyama.jp","himi.toyama.jp","imizu.toyama.jp","inami.toyama.jp","johana.toyama.jp","kamiichi.toyama.jp","kurobe.toyama.jp","nakaniikawa.toyama.jp","namerikawa.toyama.jp","nanto.toyama.jp","nyuzen.toyama.jp","oyabe.toyama.jp","taira.toyama.jp","takaoka.toyama.jp","tateyama.toyama.jp","toga.toyama.jp","tonami.toyama.jp","toyama.toyama.jp","unazuki.toyama.jp","uozu.toyama.jp","yamada.toyama.jp","arida.wakayama.jp","aridagawa.wakayama.jp","gobo.wakayama.jp","hashimoto.wakayama.jp","hidaka.wakayama.jp","hirogawa.wakayama.jp","inami.wakayama.jp","iwade.wakayama.jp","kainan.wakayama.jp","kamitonda.wakayama.jp","katsuragi.wakayama.jp","kimino.wakayama.jp","kinokawa.wakayama.jp","kitayama.wakayama.jp","koya.wakayama.jp","koza.wakayama.jp","kozagawa.wakayama.jp","kudoyama.wakayama.jp","kushimoto.wakayama.jp","mihama.wakayama.jp","misato.wakayama.jp","nachikatsuura.wakayama.jp","shingu.wakayama.jp","shirahama.wakayama.jp","taiji.wakayama.jp","tanabe.wakayama.jp","wakayama.wakayama.jp","yuasa.wakayama.jp","yura.wakayama.jp","asahi.yamagata.jp","funagata.yamagata.jp","higashine.yamagata.jp","iide.yamagata.jp","kahoku.yamagata.jp","kaminoyama.yamagata.jp","kaneyama.yamagata.jp","kawanishi.yamagata.jp","mamurogawa.yamagata.jp","mikawa.yamagata.jp","murayama.yamagata.jp","nagai.yamagata.jp","nakayama.yamagata.jp","nanyo.yamagata.jp","nishikawa.yamagata.jp","obanazawa.yamagata.jp","oe.yamagata.jp","oguni.yamagata.jp","ohkura.yamagata.jp","oishida.yamagata.jp","sagae.yamagata.jp","sakata.yamagata.jp","sakegawa.yamagata.jp","shinjo.yamagata.jp","shirataka.yamagata.jp","shonai.yamagata.jp","takahata.yamagata.jp","tendo.yamagata.jp","tozawa.yamagata.jp","tsuruoka.yamagata.jp","yamagata.yamagata.jp","yamanobe.yamagata.jp","yonezawa.yamagata.jp","yuza.yamagata.jp","abu.yamaguchi.jp","hagi.yamaguchi.jp","hikari.yamaguchi.jp","hofu.yamaguchi.jp","iwakuni.yamaguchi.jp","kudamatsu.yamaguchi.jp","mitou.yamaguchi.jp","nagato.yamaguchi.jp","oshima.yamaguchi.jp","shimonoseki.yamaguchi.jp","shunan.yamaguchi.jp","tabuse.yamaguchi.jp","tokuyama.yamaguchi.jp","toyota.yamaguchi.jp","ube.yamaguchi.jp","yuu.yamaguchi.jp","chuo.yamanashi.jp","doshi.yamanashi.jp","fuefuki.yamanashi.jp","fujikawa.yamanashi.jp","fujikawaguchiko.yamanashi.jp","fujiyoshida.yamanashi.jp","hayakawa.yamanashi.jp","hokuto.yamanashi.jp","ichikawamisato.yamanashi.jp","kai.yamanashi.jp","kofu.yamanashi.jp","koshu.yamanashi.jp","kosuge.yamanashi.jp","minami-alps.yamanashi.jp","minobu.yamanashi.jp","nakamichi.yamanashi.jp","nanbu.yamanashi.jp","narusawa.yamanashi.jp","nirasaki.yamanashi.jp","nishikatsura.yamanashi.jp","oshino.yamanashi.jp","otsuki.yamanashi.jp","showa.yamanashi.jp","tabayama.yamanashi.jp","tsuru.yamanashi.jp","uenohara.yamanashi.jp","yamanakako.yamanashi.jp","yamanashi.yamanashi.jp","ke","ac.ke","co.ke","go.ke","info.ke","me.ke","mobi.ke","ne.ke","or.ke","sc.ke","kg","org.kg","net.kg","com.kg","edu.kg","gov.kg","mil.kg","*.kh","ki","edu.ki","biz.ki","net.ki","org.ki","gov.ki","info.ki","com.ki","km","org.km","nom.km","gov.km","prd.km","tm.km","edu.km","mil.km","ass.km","com.km","coop.km","asso.km","presse.km","medecin.km","notaires.km","pharmaciens.km","veterinaire.km","gouv.km","kn","net.kn","org.kn","edu.kn","gov.kn","kp","com.kp","edu.kp","gov.kp","org.kp","rep.kp","tra.kp","kr","ac.kr","co.kr","es.kr","go.kr","hs.kr","kg.kr","mil.kr","ms.kr","ne.kr","or.kr","pe.kr","re.kr","sc.kr","busan.kr","chungbuk.kr","chungnam.kr","daegu.kr","daejeon.kr","gangwon.kr","gwangju.kr","gyeongbuk.kr","gyeonggi.kr","gyeongnam.kr","incheon.kr","jeju.kr","jeonbuk.kr","jeonnam.kr","seoul.kr","ulsan.kr","kw","com.kw","edu.kw","emb.kw","gov.kw","ind.kw","net.kw","org.kw","ky","edu.ky","gov.ky","com.ky","org.ky","net.ky","kz","org.kz","edu.kz","net.kz","gov.kz","mil.kz","com.kz","la","int.la","net.la","info.la","edu.la","gov.la","per.la","com.la","org.la","lb","com.lb","edu.lb","gov.lb","net.lb","org.lb","lc","com.lc","net.lc","co.lc","org.lc","edu.lc","gov.lc","li","lk","gov.lk","sch.lk","net.lk","int.lk","com.lk","org.lk","edu.lk","ngo.lk","soc.lk","web.lk","ltd.lk","assn.lk","grp.lk","hotel.lk","ac.lk","lr","com.lr","edu.lr","gov.lr","org.lr","net.lr","ls","ac.ls","biz.ls","co.ls","edu.ls","gov.ls","info.ls","net.ls","org.ls","sc.ls","lt","gov.lt","lu","lv","com.lv","edu.lv","gov.lv","org.lv","mil.lv","id.lv","net.lv","asn.lv","conf.lv","ly","com.ly","net.ly","gov.ly","plc.ly","edu.ly","sch.ly","med.ly","org.ly","id.ly","ma","co.ma","net.ma","gov.ma","org.ma","ac.ma","press.ma","mc","tm.mc","asso.mc","md","me","co.me","net.me","org.me","edu.me","ac.me","gov.me","its.me","priv.me","mg","org.mg","nom.mg","gov.mg","prd.mg","tm.mg","edu.mg","mil.mg","com.mg","co.mg","mh","mil","mk","com.mk","org.mk","net.mk","edu.mk","gov.mk","inf.mk","name.mk","ml","com.ml","edu.ml","gouv.ml","gov.ml","net.ml","org.ml","presse.ml","*.mm","mn","gov.mn","edu.mn","org.mn","mo","com.mo","net.mo","org.mo","edu.mo","gov.mo","mobi","mp","mq","mr","gov.mr","ms","com.ms","edu.ms","gov.ms","net.ms","org.ms","mt","com.mt","edu.mt","net.mt","org.mt","mu","com.mu","net.mu","org.mu","gov.mu","ac.mu","co.mu","or.mu","museum","academy.museum","agriculture.museum","air.museum","airguard.museum","alabama.museum","alaska.museum","amber.museum","ambulance.museum","american.museum","americana.museum","americanantiques.museum","americanart.museum","amsterdam.museum","and.museum","annefrank.museum","anthro.museum","anthropology.museum","antiques.museum","aquarium.museum","arboretum.museum","archaeological.museum","archaeology.museum","architecture.museum","art.museum","artanddesign.museum","artcenter.museum","artdeco.museum","arteducation.museum","artgallery.museum","arts.museum","artsandcrafts.museum","asmatart.museum","assassination.museum","assisi.museum","association.museum","astronomy.museum","atlanta.museum","austin.museum","australia.museum","automotive.museum","aviation.museum","axis.museum","badajoz.museum","baghdad.museum","bahn.museum","bale.museum","baltimore.museum","barcelona.museum","baseball.museum","basel.museum","baths.museum","bauern.museum","beauxarts.museum","beeldengeluid.museum","bellevue.museum","bergbau.museum","berkeley.museum","berlin.museum","bern.museum","bible.museum","bilbao.museum","bill.museum","birdart.museum","birthplace.museum","bonn.museum","boston.museum","botanical.museum","botanicalgarden.museum","botanicgarden.museum","botany.museum","brandywinevalley.museum","brasil.museum","bristol.museum","british.museum","britishcolumbia.museum","broadcast.museum","brunel.museum","brussel.museum","brussels.museum","bruxelles.museum","building.museum","burghof.museum","bus.museum","bushey.museum","cadaques.museum","california.museum","cambridge.museum","can.museum","canada.museum","capebreton.museum","carrier.museum","cartoonart.museum","casadelamoneda.museum","castle.museum","castres.museum","celtic.museum","center.museum","chattanooga.museum","cheltenham.museum","chesapeakebay.museum","chicago.museum","children.museum","childrens.museum","childrensgarden.museum","chiropractic.museum","chocolate.museum","christiansburg.museum","cincinnati.museum","cinema.museum","circus.museum","civilisation.museum","civilization.museum","civilwar.museum","clinton.museum","clock.museum","coal.museum","coastaldefence.museum","cody.museum","coldwar.museum","collection.museum","colonialwilliamsburg.museum","coloradoplateau.museum","columbia.museum","columbus.museum","communication.museum","communications.museum","community.museum","computer.museum","computerhistory.museum","comunicações.museum","contemporary.museum","contemporaryart.museum","convent.museum","copenhagen.museum","corporation.museum","correios-e-telecomunicações.museum","corvette.museum","costume.museum","countryestate.museum","county.museum","crafts.museum","cranbrook.museum","creation.museum","cultural.museum","culturalcenter.museum","culture.museum","cyber.museum","cymru.museum","dali.museum","dallas.museum","database.museum","ddr.museum","decorativearts.museum","delaware.museum","delmenhorst.museum","denmark.museum","depot.museum","design.museum","detroit.museum","dinosaur.museum","discovery.museum","dolls.museum","donostia.museum","durham.museum","eastafrica.museum","eastcoast.museum","education.museum","educational.museum","egyptian.museum","eisenbahn.museum","elburg.museum","elvendrell.museum","embroidery.museum","encyclopedic.museum","england.museum","entomology.museum","environment.museum","environmentalconservation.museum","epilepsy.museum","essex.museum","estate.museum","ethnology.museum","exeter.museum","exhibition.museum","family.museum","farm.museum","farmequipment.museum","farmers.museum","farmstead.museum","field.museum","figueres.museum","filatelia.museum","film.museum","fineart.museum","finearts.museum","finland.museum","flanders.museum","florida.museum","force.museum","fortmissoula.museum","fortworth.museum","foundation.museum","francaise.museum","frankfurt.museum","franziskaner.museum","freemasonry.museum","freiburg.museum","fribourg.museum","frog.museum","fundacio.museum","furniture.museum","gallery.museum","garden.museum","gateway.museum","geelvinck.museum","gemological.museum","geology.museum","georgia.museum","giessen.museum","glas.museum","glass.museum","gorge.museum","grandrapids.museum","graz.museum","guernsey.museum","halloffame.museum","hamburg.museum","handson.museum","harvestcelebration.museum","hawaii.museum","health.museum","heimatunduhren.museum","hellas.museum","helsinki.museum","hembygdsforbund.museum","heritage.museum","histoire.museum","historical.museum","historicalsociety.museum","historichouses.museum","historisch.museum","historisches.museum","history.museum","historyofscience.museum","horology.museum","house.museum","humanities.museum","illustration.museum","imageandsound.museum","indian.museum","indiana.museum","indianapolis.museum","indianmarket.museum","intelligence.museum","interactive.museum","iraq.museum","iron.museum","isleofman.museum","jamison.museum","jefferson.museum","jerusalem.museum","jewelry.museum","jewish.museum","jewishart.museum","jfk.museum","journalism.museum","judaica.museum","judygarland.museum","juedisches.museum","juif.museum","karate.museum","karikatur.museum","kids.museum","koebenhavn.museum","koeln.museum","kunst.museum","kunstsammlung.museum","kunstunddesign.museum","labor.museum","labour.museum","lajolla.museum","lancashire.museum","landes.museum","lans.museum","läns.museum","larsson.museum","lewismiller.museum","lincoln.museum","linz.museum","living.museum","livinghistory.museum","localhistory.museum","london.museum","losangeles.museum","louvre.museum","loyalist.museum","lucerne.museum","luxembourg.museum","luzern.museum","mad.museum","madrid.museum","mallorca.museum","manchester.museum","mansion.museum","mansions.museum","manx.museum","marburg.museum","maritime.museum","maritimo.museum","maryland.museum","marylhurst.museum","media.museum","medical.museum","medizinhistorisches.museum","meeres.museum","memorial.museum","mesaverde.museum","michigan.museum","midatlantic.museum","military.museum","mill.museum","miners.museum","mining.museum","minnesota.museum","missile.museum","missoula.museum","modern.museum","moma.museum","money.museum","monmouth.museum","monticello.museum","montreal.museum","moscow.museum","motorcycle.museum","muenchen.museum","muenster.museum","mulhouse.museum","muncie.museum","museet.museum","museumcenter.museum","museumvereniging.museum","music.museum","national.museum","nationalfirearms.museum","nationalheritage.museum","nativeamerican.museum","naturalhistory.museum","naturalhistorymuseum.museum","naturalsciences.museum","nature.museum","naturhistorisches.museum","natuurwetenschappen.museum","naumburg.museum","naval.museum","nebraska.museum","neues.museum","newhampshire.museum","newjersey.museum","newmexico.museum","newport.museum","newspaper.museum","newyork.museum","niepce.museum","norfolk.museum","north.museum","nrw.museum","nyc.museum","nyny.museum","oceanographic.museum","oceanographique.museum","omaha.museum","online.museum","ontario.museum","openair.museum","oregon.museum","oregontrail.museum","otago.museum","oxford.museum","pacific.museum","paderborn.museum","palace.museum","paleo.museum","palmsprings.museum","panama.museum","paris.museum","pasadena.museum","pharmacy.museum","philadelphia.museum","philadelphiaarea.museum","philately.museum","phoenix.museum","photography.museum","pilots.museum","pittsburgh.museum","planetarium.museum","plantation.museum","plants.museum","plaza.museum","portal.museum","portland.museum","portlligat.museum","posts-and-telecommunications.museum","preservation.museum","presidio.museum","press.museum","project.museum","public.museum","pubol.museum","quebec.museum","railroad.museum","railway.museum","research.museum","resistance.museum","riodejaneiro.museum","rochester.museum","rockart.museum","roma.museum","russia.museum","saintlouis.museum","salem.museum","salvadordali.museum","salzburg.museum","sandiego.museum","sanfrancisco.museum","santabarbara.museum","santacruz.museum","santafe.museum","saskatchewan.museum","satx.museum","savannahga.museum","schlesisches.museum","schoenbrunn.museum","schokoladen.museum","school.museum","schweiz.museum","science.museum","scienceandhistory.museum","scienceandindustry.museum","sciencecenter.museum","sciencecenters.museum","science-fiction.museum","sciencehistory.museum","sciences.museum","sciencesnaturelles.museum","scotland.museum","seaport.museum","settlement.museum","settlers.museum","shell.museum","sherbrooke.museum","sibenik.museum","silk.museum","ski.museum","skole.museum","society.museum","sologne.museum","soundandvision.museum","southcarolina.museum","southwest.museum","space.museum","spy.museum","square.museum","stadt.museum","stalbans.museum","starnberg.museum","state.museum","stateofdelaware.museum","station.museum","steam.museum","steiermark.museum","stjohn.museum","stockholm.museum","stpetersburg.museum","stuttgart.museum","suisse.museum","surgeonshall.museum","surrey.museum","svizzera.museum","sweden.museum","sydney.museum","tank.museum","tcm.museum","technology.museum","telekommunikation.museum","television.museum","texas.museum","textile.museum","theater.museum","time.museum","timekeeping.museum","topology.museum","torino.museum","touch.museum","town.museum","transport.museum","tree.museum","trolley.museum","trust.museum","trustee.museum","uhren.museum","ulm.museum","undersea.museum","university.museum","usa.museum","usantiques.museum","usarts.museum","uscountryestate.museum","usculture.museum","usdecorativearts.museum","usgarden.museum","ushistory.museum","ushuaia.museum","uslivinghistory.museum","utah.museum","uvic.museum","valley.museum","vantaa.museum","versailles.museum","viking.museum","village.museum","virginia.museum","virtual.museum","virtuel.museum","vlaanderen.museum","volkenkunde.museum","wales.museum","wallonie.museum","war.museum","washingtondc.museum","watchandclock.museum","watch-and-clock.museum","western.museum","westfalen.museum","whaling.museum","wildlife.museum","williamsburg.museum","windmill.museum","workshop.museum","york.museum","yorkshire.museum","yosemite.museum","youth.museum","zoological.museum","zoology.museum","ירושלים.museum","иком.museum","mv","aero.mv","biz.mv","com.mv","coop.mv","edu.mv","gov.mv","info.mv","int.mv","mil.mv","museum.mv","name.mv","net.mv","org.mv","pro.mv","mw","ac.mw","biz.mw","co.mw","com.mw","coop.mw","edu.mw","gov.mw","int.mw","museum.mw","net.mw","org.mw","mx","com.mx","org.mx","gob.mx","edu.mx","net.mx","my","com.my","net.my","org.my","gov.my","edu.my","mil.my","name.my","mz","ac.mz","adv.mz","co.mz","edu.mz","gov.mz","mil.mz","net.mz","org.mz","na","info.na","pro.na","name.na","school.na","or.na","dr.na","us.na","mx.na","ca.na","in.na","cc.na","tv.na","ws.na","mobi.na","co.na","com.na","org.na","name","nc","asso.nc","nom.nc","ne","net","nf","com.nf","net.nf","per.nf","rec.nf","web.nf","arts.nf","firm.nf","info.nf","other.nf","store.nf","ng","com.ng","edu.ng","gov.ng","i.ng","mil.ng","mobi.ng","name.ng","net.ng","org.ng","sch.ng","ni","ac.ni","biz.ni","co.ni","com.ni","edu.ni","gob.ni","in.ni","info.ni","int.ni","mil.ni","net.ni","nom.ni","org.ni","web.ni","nl","no","fhs.no","vgs.no","fylkesbibl.no","folkebibl.no","museum.no","idrett.no","priv.no","mil.no","stat.no","dep.no","kommune.no","herad.no","aa.no","ah.no","bu.no","fm.no","hl.no","hm.no","jan-mayen.no","mr.no","nl.no","nt.no","of.no","ol.no","oslo.no","rl.no","sf.no","st.no","svalbard.no","tm.no","tr.no","va.no","vf.no","gs.aa.no","gs.ah.no","gs.bu.no","gs.fm.no","gs.hl.no","gs.hm.no","gs.jan-mayen.no","gs.mr.no","gs.nl.no","gs.nt.no","gs.of.no","gs.ol.no","gs.oslo.no","gs.rl.no","gs.sf.no","gs.st.no","gs.svalbard.no","gs.tm.no","gs.tr.no","gs.va.no","gs.vf.no","akrehamn.no","åkrehamn.no","algard.no","ålgård.no","arna.no","brumunddal.no","bryne.no","bronnoysund.no","brønnøysund.no","drobak.no","drøbak.no","egersund.no","fetsund.no","floro.no","florø.no","fredrikstad.no","hokksund.no","honefoss.no","hønefoss.no","jessheim.no","jorpeland.no","jørpeland.no","kirkenes.no","kopervik.no","krokstadelva.no","langevag.no","langevåg.no","leirvik.no","mjondalen.no","mjøndalen.no","mo-i-rana.no","mosjoen.no","mosjøen.no","nesoddtangen.no","orkanger.no","osoyro.no","osøyro.no","raholt.no","råholt.no","sandnessjoen.no","sandnessjøen.no","skedsmokorset.no","slattum.no","spjelkavik.no","stathelle.no","stavern.no","stjordalshalsen.no","stjørdalshalsen.no","tananger.no","tranby.no","vossevangen.no","afjord.no","åfjord.no","agdenes.no","al.no","ål.no","alesund.no","ålesund.no","alstahaug.no","alta.no","áltá.no","alaheadju.no","álaheadju.no","alvdal.no","amli.no","åmli.no","amot.no","åmot.no","andebu.no","andoy.no","andøy.no","andasuolo.no","ardal.no","årdal.no","aremark.no","arendal.no","ås.no","aseral.no","åseral.no","asker.no","askim.no","askvoll.no","askoy.no","askøy.no","asnes.no","åsnes.no","audnedaln.no","aukra.no","aure.no","aurland.no","aurskog-holand.no","aurskog-høland.no","austevoll.no","austrheim.no","averoy.no","averøy.no","balestrand.no","ballangen.no","balat.no","bálát.no","balsfjord.no","bahccavuotna.no","báhccavuotna.no","bamble.no","bardu.no","beardu.no","beiarn.no","bajddar.no","bájddar.no","baidar.no","báidár.no","berg.no","bergen.no","berlevag.no","berlevåg.no","bearalvahki.no","bearalváhki.no","bindal.no","birkenes.no","bjarkoy.no","bjarkøy.no","bjerkreim.no","bjugn.no","bodo.no","bodø.no","badaddja.no","bådåddjå.no","budejju.no","bokn.no","bremanger.no","bronnoy.no","brønnøy.no","bygland.no","bykle.no","barum.no","bærum.no","bo.telemark.no","bø.telemark.no","bo.nordland.no","bø.nordland.no","bievat.no","bievát.no","bomlo.no","bømlo.no","batsfjord.no","båtsfjord.no","bahcavuotna.no","báhcavuotna.no","dovre.no","drammen.no","drangedal.no","dyroy.no","dyrøy.no","donna.no","dønna.no","eid.no","eidfjord.no","eidsberg.no","eidskog.no","eidsvoll.no","eigersund.no","elverum.no","enebakk.no","engerdal.no","etne.no","etnedal.no","evenes.no","evenassi.no","evenášši.no","evje-og-hornnes.no","farsund.no","fauske.no","fuossko.no","fuoisku.no","fedje.no","fet.no","finnoy.no","finnøy.no","fitjar.no","fjaler.no","fjell.no","flakstad.no","flatanger.no","flekkefjord.no","flesberg.no","flora.no","fla.no","flå.no","folldal.no","forsand.no","fosnes.no","frei.no","frogn.no","froland.no","frosta.no","frana.no","fræna.no","froya.no","frøya.no","fusa.no","fyresdal.no","forde.no","førde.no","gamvik.no","gangaviika.no","gáŋgaviika.no","gaular.no","gausdal.no","gildeskal.no","gildeskål.no","giske.no","gjemnes.no","gjerdrum.no","gjerstad.no","gjesdal.no","gjovik.no","gjøvik.no","gloppen.no","gol.no","gran.no","grane.no","granvin.no","gratangen.no","grimstad.no","grong.no","kraanghke.no","kråanghke.no","grue.no","gulen.no","hadsel.no","halden.no","halsa.no","hamar.no","hamaroy.no","habmer.no","hábmer.no","hapmir.no","hápmir.no","hammerfest.no","hammarfeasta.no","hámmárfeasta.no","haram.no","hareid.no","harstad.no","hasvik.no","aknoluokta.no","ákŋoluokta.no","hattfjelldal.no","aarborte.no","haugesund.no","hemne.no","hemnes.no","hemsedal.no","heroy.more-og-romsdal.no","herøy.møre-og-romsdal.no","heroy.nordland.no","herøy.nordland.no","hitra.no","hjartdal.no","hjelmeland.no","hobol.no","hobøl.no","hof.no","hol.no","hole.no","holmestrand.no","holtalen.no","holtålen.no","hornindal.no","horten.no","hurdal.no","hurum.no","hvaler.no","hyllestad.no","hagebostad.no","hægebostad.no","hoyanger.no","høyanger.no","hoylandet.no","høylandet.no","ha.no","hå.no","ibestad.no","inderoy.no","inderøy.no","iveland.no","jevnaker.no","jondal.no","jolster.no","jølster.no","karasjok.no","karasjohka.no","kárášjohka.no","karlsoy.no","galsa.no","gálsá.no","karmoy.no","karmøy.no","kautokeino.no","guovdageaidnu.no","klepp.no","klabu.no","klæbu.no","kongsberg.no","kongsvinger.no","kragero.no","kragerø.no","kristiansand.no","kristiansund.no","krodsherad.no","krødsherad.no","kvalsund.no","rahkkeravju.no","ráhkkerávju.no","kvam.no","kvinesdal.no","kvinnherad.no","kviteseid.no","kvitsoy.no","kvitsøy.no","kvafjord.no","kvæfjord.no","giehtavuoatna.no","kvanangen.no","kvænangen.no","navuotna.no","návuotna.no","kafjord.no","kåfjord.no","gaivuotna.no","gáivuotna.no","larvik.no","lavangen.no","lavagis.no","loabat.no","loabát.no","lebesby.no","davvesiida.no","leikanger.no","leirfjord.no","leka.no","leksvik.no","lenvik.no","leangaviika.no","leaŋgaviika.no","lesja.no","levanger.no","lier.no","lierne.no","lillehammer.no","lillesand.no","lindesnes.no","lindas.no","lindås.no","lom.no","loppa.no","lahppi.no","láhppi.no","lund.no","lunner.no","luroy.no","lurøy.no","luster.no","lyngdal.no","lyngen.no","ivgu.no","lardal.no","lerdal.no","lærdal.no","lodingen.no","lødingen.no","lorenskog.no","lørenskog.no","loten.no","løten.no","malvik.no","masoy.no","måsøy.no","muosat.no","muosát.no","mandal.no","marker.no","marnardal.no","masfjorden.no","meland.no","meldal.no","melhus.no","meloy.no","meløy.no","meraker.no","meråker.no","moareke.no","moåreke.no","midsund.no","midtre-gauldal.no","modalen.no","modum.no","molde.no","moskenes.no","moss.no","mosvik.no","malselv.no","målselv.no","malatvuopmi.no","málatvuopmi.no","namdalseid.no","aejrie.no","namsos.no","namsskogan.no","naamesjevuemie.no","nååmesjevuemie.no","laakesvuemie.no","nannestad.no","narvik.no","narviika.no","naustdal.no","nedre-eiker.no","nes.akershus.no","nes.buskerud.no","nesna.no","nesodden.no","nesseby.no","unjarga.no","unjárga.no","nesset.no","nissedal.no","nittedal.no","nord-aurdal.no","nord-fron.no","nord-odal.no","norddal.no","nordkapp.no","davvenjarga.no","davvenjárga.no","nordre-land.no","nordreisa.no","raisa.no","ráisa.no","nore-og-uvdal.no","notodden.no","naroy.no","nærøy.no","notteroy.no","nøtterøy.no","odda.no","oksnes.no","øksnes.no","oppdal.no","oppegard.no","oppegård.no","orkdal.no","orland.no","ørland.no","orskog.no","ørskog.no","orsta.no","ørsta.no","os.hedmark.no","os.hordaland.no","osen.no","osteroy.no","osterøy.no","ostre-toten.no","østre-toten.no","overhalla.no","ovre-eiker.no","øvre-eiker.no","oyer.no","øyer.no","oygarden.no","øygarden.no","oystre-slidre.no","øystre-slidre.no","porsanger.no","porsangu.no","porsáŋgu.no","porsgrunn.no","radoy.no","radøy.no","rakkestad.no","rana.no","ruovat.no","randaberg.no","rauma.no","rendalen.no","rennebu.no","rennesoy.no","rennesøy.no","rindal.no","ringebu.no","ringerike.no","ringsaker.no","rissa.no","risor.no","risør.no","roan.no","rollag.no","rygge.no","ralingen.no","rælingen.no","rodoy.no","rødøy.no","romskog.no","rømskog.no","roros.no","røros.no","rost.no","røst.no","royken.no","røyken.no","royrvik.no","røyrvik.no","rade.no","råde.no","salangen.no","siellak.no","saltdal.no","salat.no","sálát.no","sálat.no","samnanger.no","sande.more-og-romsdal.no","sande.møre-og-romsdal.no","sande.vestfold.no","sandefjord.no","sandnes.no","sandoy.no","sandøy.no","sarpsborg.no","sauda.no","sauherad.no","sel.no","selbu.no","selje.no","seljord.no","sigdal.no","siljan.no","sirdal.no","skaun.no","skedsmo.no","ski.no","skien.no","skiptvet.no","skjervoy.no","skjervøy.no","skierva.no","skiervá.no","skjak.no","skjåk.no","skodje.no","skanland.no","skånland.no","skanit.no","skánit.no","smola.no","smøla.no","snillfjord.no","snasa.no","snåsa.no","snoasa.no","snaase.no","snåase.no","sogndal.no","sokndal.no","sola.no","solund.no","songdalen.no","sortland.no","spydeberg.no","stange.no","stavanger.no","steigen.no","steinkjer.no","stjordal.no","stjørdal.no","stokke.no","stor-elvdal.no","stord.no","stordal.no","storfjord.no","omasvuotna.no","strand.no","stranda.no","stryn.no","sula.no","suldal.no","sund.no","sunndal.no","surnadal.no","sveio.no","svelvik.no","sykkylven.no","sogne.no","søgne.no","somna.no","sømna.no","sondre-land.no","søndre-land.no","sor-aurdal.no","sør-aurdal.no","sor-fron.no","sør-fron.no","sor-odal.no","sør-odal.no","sor-varanger.no","sør-varanger.no","matta-varjjat.no","mátta-várjjat.no","sorfold.no","sørfold.no","sorreisa.no","sørreisa.no","sorum.no","sørum.no","tana.no","deatnu.no","time.no","tingvoll.no","tinn.no","tjeldsund.no","dielddanuorri.no","tjome.no","tjøme.no","tokke.no","tolga.no","torsken.no","tranoy.no","tranøy.no","tromso.no","tromsø.no","tromsa.no","romsa.no","trondheim.no","troandin.no","trysil.no","trana.no","træna.no","trogstad.no","trøgstad.no","tvedestrand.no","tydal.no","tynset.no","tysfjord.no","divtasvuodna.no","divttasvuotna.no","tysnes.no","tysvar.no","tysvær.no","tonsberg.no","tønsberg.no","ullensaker.no","ullensvang.no","ulvik.no","utsira.no","vadso.no","vadsø.no","cahcesuolo.no","čáhcesuolo.no","vaksdal.no","valle.no","vang.no","vanylven.no","vardo.no","vardø.no","varggat.no","várggát.no","vefsn.no","vaapste.no","vega.no","vegarshei.no","vegårshei.no","vennesla.no","verdal.no","verran.no","vestby.no","vestnes.no","vestre-slidre.no","vestre-toten.no","vestvagoy.no","vestvågøy.no","vevelstad.no","vik.no","vikna.no","vindafjord.no","volda.no","voss.no","varoy.no","værøy.no","vagan.no","vågan.no","voagat.no","vagsoy.no","vågsøy.no","vaga.no","vågå.no","valer.ostfold.no","våler.østfold.no","valer.hedmark.no","våler.hedmark.no","*.np","nr","biz.nr","info.nr","gov.nr","edu.nr","org.nr","net.nr","com.nr","nu","nz","ac.nz","co.nz","cri.nz","geek.nz","gen.nz","govt.nz","health.nz","iwi.nz","kiwi.nz","maori.nz","mil.nz","māori.nz","net.nz","org.nz","parliament.nz","school.nz","om","co.om","com.om","edu.om","gov.om","med.om","museum.om","net.om","org.om","pro.om","onion","org","pa","ac.pa","gob.pa","com.pa","org.pa","sld.pa","edu.pa","net.pa","ing.pa","abo.pa","med.pa","nom.pa","pe","edu.pe","gob.pe","nom.pe","mil.pe","org.pe","com.pe","net.pe","pf","com.pf","org.pf","edu.pf","*.pg","ph","com.ph","net.ph","org.ph","gov.ph","edu.ph","ngo.ph","mil.ph","i.ph","pk","com.pk","net.pk","edu.pk","org.pk","fam.pk","biz.pk","web.pk","gov.pk","gob.pk","gok.pk","gon.pk","gop.pk","gos.pk","info.pk","pl","com.pl","net.pl","org.pl","aid.pl","agro.pl","atm.pl","auto.pl","biz.pl","edu.pl","gmina.pl","gsm.pl","info.pl","mail.pl","miasta.pl","media.pl","mil.pl","nieruchomosci.pl","nom.pl","pc.pl","powiat.pl","priv.pl","realestate.pl","rel.pl","sex.pl","shop.pl","sklep.pl","sos.pl","szkola.pl","targi.pl","tm.pl","tourism.pl","travel.pl","turystyka.pl","gov.pl","ap.gov.pl","ic.gov.pl","is.gov.pl","us.gov.pl","kmpsp.gov.pl","kppsp.gov.pl","kwpsp.gov.pl","psp.gov.pl","wskr.gov.pl","kwp.gov.pl","mw.gov.pl","ug.gov.pl","um.gov.pl","umig.gov.pl","ugim.gov.pl","upow.gov.pl","uw.gov.pl","starostwo.gov.pl","pa.gov.pl","po.gov.pl","psse.gov.pl","pup.gov.pl","rzgw.gov.pl","sa.gov.pl","so.gov.pl","sr.gov.pl","wsa.gov.pl","sko.gov.pl","uzs.gov.pl","wiih.gov.pl","winb.gov.pl","pinb.gov.pl","wios.gov.pl","witd.gov.pl","wzmiuw.gov.pl","piw.gov.pl","wiw.gov.pl","griw.gov.pl","wif.gov.pl","oum.gov.pl","sdn.gov.pl","zp.gov.pl","uppo.gov.pl","mup.gov.pl","wuoz.gov.pl","konsulat.gov.pl","oirm.gov.pl","augustow.pl","babia-gora.pl","bedzin.pl","beskidy.pl","bialowieza.pl","bialystok.pl","bielawa.pl","bieszczady.pl","boleslawiec.pl","bydgoszcz.pl","bytom.pl","cieszyn.pl","czeladz.pl","czest.pl","dlugoleka.pl","elblag.pl","elk.pl","glogow.pl","gniezno.pl","gorlice.pl","grajewo.pl","ilawa.pl","jaworzno.pl","jelenia-gora.pl","jgora.pl","kalisz.pl","kazimierz-dolny.pl","karpacz.pl","kartuzy.pl","kaszuby.pl","katowice.pl","kepno.pl","ketrzyn.pl","klodzko.pl","kobierzyce.pl","kolobrzeg.pl","konin.pl","konskowola.pl","kutno.pl","lapy.pl","lebork.pl","legnica.pl","lezajsk.pl","limanowa.pl","lomza.pl","lowicz.pl","lubin.pl","lukow.pl","malbork.pl","malopolska.pl","mazowsze.pl","mazury.pl","mielec.pl","mielno.pl","mragowo.pl","naklo.pl","nowaruda.pl","nysa.pl","olawa.pl","olecko.pl","olkusz.pl","olsztyn.pl","opoczno.pl","opole.pl","ostroda.pl","ostroleka.pl","ostrowiec.pl","ostrowwlkp.pl","pila.pl","pisz.pl","podhale.pl","podlasie.pl","polkowice.pl","pomorze.pl","pomorskie.pl","prochowice.pl","pruszkow.pl","przeworsk.pl","pulawy.pl","radom.pl","rawa-maz.pl","rybnik.pl","rzeszow.pl","sanok.pl","sejny.pl","slask.pl","slupsk.pl","sosnowiec.pl","stalowa-wola.pl","skoczow.pl","starachowice.pl","stargard.pl","suwalki.pl","swidnica.pl","swiebodzin.pl","swinoujscie.pl","szczecin.pl","szczytno.pl","tarnobrzeg.pl","tgory.pl","turek.pl","tychy.pl","ustka.pl","walbrzych.pl","warmia.pl","warszawa.pl","waw.pl","wegrow.pl","wielun.pl","wlocl.pl","wloclawek.pl","wodzislaw.pl","wolomin.pl","wroclaw.pl","zachpomor.pl","zagan.pl","zarow.pl","zgora.pl","zgorzelec.pl","pm","pn","gov.pn","co.pn","org.pn","edu.pn","net.pn","post","pr","com.pr","net.pr","org.pr","gov.pr","edu.pr","isla.pr","pro.pr","biz.pr","info.pr","name.pr","est.pr","prof.pr","ac.pr","pro","aaa.pro","aca.pro","acct.pro","avocat.pro","bar.pro","cpa.pro","eng.pro","jur.pro","law.pro","med.pro","recht.pro","ps","edu.ps","gov.ps","sec.ps","plo.ps","com.ps","org.ps","net.ps","pt","net.pt","gov.pt","org.pt","edu.pt","int.pt","publ.pt","com.pt","nome.pt","pw","co.pw","ne.pw","or.pw","ed.pw","go.pw","belau.pw","py","com.py","coop.py","edu.py","gov.py","mil.py","net.py","org.py","qa","com.qa","edu.qa","gov.qa","mil.qa","name.qa","net.qa","org.qa","sch.qa","re","asso.re","com.re","nom.re","ro","arts.ro","com.ro","firm.ro","info.ro","nom.ro","nt.ro","org.ro","rec.ro","store.ro","tm.ro","www.ro","rs","ac.rs","co.rs","edu.rs","gov.rs","in.rs","org.rs","ru","rw","ac.rw","co.rw","coop.rw","gov.rw","mil.rw","net.rw","org.rw","sa","com.sa","net.sa","org.sa","gov.sa","med.sa","pub.sa","edu.sa","sch.sa","sb","com.sb","edu.sb","gov.sb","net.sb","org.sb","sc","com.sc","gov.sc","net.sc","org.sc","edu.sc","sd","com.sd","net.sd","org.sd","edu.sd","med.sd","tv.sd","gov.sd","info.sd","se","a.se","ac.se","b.se","bd.se","brand.se","c.se","d.se","e.se","f.se","fh.se","fhsk.se","fhv.se","g.se","h.se","i.se","k.se","komforb.se","kommunalforbund.se","komvux.se","l.se","lanbib.se","m.se","n.se","naturbruksgymn.se","o.se","org.se","p.se","parti.se","pp.se","press.se","r.se","s.se","t.se","tm.se","u.se","w.se","x.se","y.se","z.se","sg","com.sg","net.sg","org.sg","gov.sg","edu.sg","per.sg","sh","com.sh","net.sh","gov.sh","org.sh","mil.sh","si","sj","sk","sl","com.sl","net.sl","edu.sl","gov.sl","org.sl","sm","sn","art.sn","com.sn","edu.sn","gouv.sn","org.sn","perso.sn","univ.sn","so","com.so","edu.so","gov.so","me.so","net.so","org.so","sr","ss","biz.ss","com.ss","edu.ss","gov.ss","net.ss","org.ss","st","co.st","com.st","consulado.st","edu.st","embaixada.st","gov.st","mil.st","net.st","org.st","principe.st","saotome.st","store.st","su","sv","com.sv","edu.sv","gob.sv","org.sv","red.sv","sx","gov.sx","sy","edu.sy","gov.sy","net.sy","mil.sy","com.sy","org.sy","sz","co.sz","ac.sz","org.sz","tc","td","tel","tf","tg","th","ac.th","co.th","go.th","in.th","mi.th","net.th","or.th","tj","ac.tj","biz.tj","co.tj","com.tj","edu.tj","go.tj","gov.tj","int.tj","mil.tj","name.tj","net.tj","nic.tj","org.tj","test.tj","web.tj","tk","tl","gov.tl","tm","com.tm","co.tm","org.tm","net.tm","nom.tm","gov.tm","mil.tm","edu.tm","tn","com.tn","ens.tn","fin.tn","gov.tn","ind.tn","intl.tn","nat.tn","net.tn","org.tn","info.tn","perso.tn","tourism.tn","edunet.tn","rnrt.tn","rns.tn","rnu.tn","mincom.tn","agrinet.tn","defense.tn","turen.tn","to","com.to","gov.to","net.to","org.to","edu.to","mil.to","tr","av.tr","bbs.tr","bel.tr","biz.tr","com.tr","dr.tr","edu.tr","gen.tr","gov.tr","info.tr","mil.tr","k12.tr","kep.tr","name.tr","net.tr","org.tr","pol.tr","tel.tr","tsk.tr","tv.tr","web.tr","nc.tr","gov.nc.tr","tt","co.tt","com.tt","org.tt","net.tt","biz.tt","info.tt","pro.tt","int.tt","coop.tt","jobs.tt","mobi.tt","travel.tt","museum.tt","aero.tt","name.tt","gov.tt","edu.tt","tv","tw","edu.tw","gov.tw","mil.tw","com.tw","net.tw","org.tw","idv.tw","game.tw","ebiz.tw","club.tw","網路.tw","組織.tw","商業.tw","tz","ac.tz","co.tz","go.tz","hotel.tz","info.tz","me.tz","mil.tz","mobi.tz","ne.tz","or.tz","sc.tz","tv.tz","ua","com.ua","edu.ua","gov.ua","in.ua","net.ua","org.ua","cherkassy.ua","cherkasy.ua","chernigov.ua","chernihiv.ua","chernivtsi.ua","chernovtsy.ua","ck.ua","cn.ua","cr.ua","crimea.ua","cv.ua","dn.ua","dnepropetrovsk.ua","dnipropetrovsk.ua","dominic.ua","donetsk.ua","dp.ua","if.ua","ivano-frankivsk.ua","kh.ua","kharkiv.ua","kharkov.ua","kherson.ua","khmelnitskiy.ua","khmelnytskyi.ua","kiev.ua","kirovograd.ua","km.ua","kr.ua","krym.ua","ks.ua","kv.ua","kyiv.ua","lg.ua","lt.ua","lugansk.ua","lutsk.ua","lv.ua","lviv.ua","mk.ua","mykolaiv.ua","nikolaev.ua","od.ua","odesa.ua","odessa.ua","pl.ua","poltava.ua","rivne.ua","rovno.ua","rv.ua","sb.ua","sebastopol.ua","sevastopol.ua","sm.ua","sumy.ua","te.ua","ternopil.ua","uz.ua","uzhgorod.ua","vinnica.ua","vinnytsia.ua","vn.ua","volyn.ua","yalta.ua","zaporizhzhe.ua","zaporizhzhia.ua","zhitomir.ua","zhytomyr.ua","zp.ua","zt.ua","ug","co.ug","or.ug","ac.ug","sc.ug","go.ug","ne.ug","com.ug","org.ug","uk","ac.uk","co.uk","gov.uk","ltd.uk","me.uk","net.uk","nhs.uk","org.uk","plc.uk","police.uk","*.sch.uk","us","dni.us","fed.us","isa.us","kids.us","nsn.us","ak.us","al.us","ar.us","as.us","az.us","ca.us","co.us","ct.us","dc.us","de.us","fl.us","ga.us","gu.us","hi.us","ia.us","id.us","il.us","in.us","ks.us","ky.us","la.us","ma.us","md.us","me.us","mi.us","mn.us","mo.us","ms.us","mt.us","nc.us","nd.us","ne.us","nh.us","nj.us","nm.us","nv.us","ny.us","oh.us","ok.us","or.us","pa.us","pr.us","ri.us","sc.us","sd.us","tn.us","tx.us","ut.us","vi.us","vt.us","va.us","wa.us","wi.us","wv.us","wy.us","k12.ak.us","k12.al.us","k12.ar.us","k12.as.us","k12.az.us","k12.ca.us","k12.co.us","k12.ct.us","k12.dc.us","k12.de.us","k12.fl.us","k12.ga.us","k12.gu.us","k12.ia.us","k12.id.us","k12.il.us","k12.in.us","k12.ks.us","k12.ky.us","k12.la.us","k12.ma.us","k12.md.us","k12.me.us","k12.mi.us","k12.mn.us","k12.mo.us","k12.ms.us","k12.mt.us","k12.nc.us","k12.ne.us","k12.nh.us","k12.nj.us","k12.nm.us","k12.nv.us","k12.ny.us","k12.oh.us","k12.ok.us","k12.or.us","k12.pa.us","k12.pr.us","k12.ri.us","k12.sc.us","k12.tn.us","k12.tx.us","k12.ut.us","k12.vi.us","k12.vt.us","k12.va.us","k12.wa.us","k12.wi.us","k12.wy.us","cc.ak.us","cc.al.us","cc.ar.us","cc.as.us","cc.az.us","cc.ca.us","cc.co.us","cc.ct.us","cc.dc.us","cc.de.us","cc.fl.us","cc.ga.us","cc.gu.us","cc.hi.us","cc.ia.us","cc.id.us","cc.il.us","cc.in.us","cc.ks.us","cc.ky.us","cc.la.us","cc.ma.us","cc.md.us","cc.me.us","cc.mi.us","cc.mn.us","cc.mo.us","cc.ms.us","cc.mt.us","cc.nc.us","cc.nd.us","cc.ne.us","cc.nh.us","cc.nj.us","cc.nm.us","cc.nv.us","cc.ny.us","cc.oh.us","cc.ok.us","cc.or.us","cc.pa.us","cc.pr.us","cc.ri.us","cc.sc.us","cc.sd.us","cc.tn.us","cc.tx.us","cc.ut.us","cc.vi.us","cc.vt.us","cc.va.us","cc.wa.us","cc.wi.us","cc.wv.us","cc.wy.us","lib.ak.us","lib.al.us","lib.ar.us","lib.as.us","lib.az.us","lib.ca.us","lib.co.us","lib.ct.us","lib.dc.us","lib.fl.us","lib.ga.us","lib.gu.us","lib.hi.us","lib.ia.us","lib.id.us","lib.il.us","lib.in.us","lib.ks.us","lib.ky.us","lib.la.us","lib.ma.us","lib.md.us","lib.me.us","lib.mi.us","lib.mn.us","lib.mo.us","lib.ms.us","lib.mt.us","lib.nc.us","lib.nd.us","lib.ne.us","lib.nh.us","lib.nj.us","lib.nm.us","lib.nv.us","lib.ny.us","lib.oh.us","lib.ok.us","lib.or.us","lib.pa.us","lib.pr.us","lib.ri.us","lib.sc.us","lib.sd.us","lib.tn.us","lib.tx.us","lib.ut.us","lib.vi.us","lib.vt.us","lib.va.us","lib.wa.us","lib.wi.us","lib.wy.us","pvt.k12.ma.us","chtr.k12.ma.us","paroch.k12.ma.us","ann-arbor.mi.us","cog.mi.us","dst.mi.us","eaton.mi.us","gen.mi.us","mus.mi.us","tec.mi.us","washtenaw.mi.us","uy","com.uy","edu.uy","gub.uy","mil.uy","net.uy","org.uy","uz","co.uz","com.uz","net.uz","org.uz","va","vc","com.vc","net.vc","org.vc","gov.vc","mil.vc","edu.vc","ve","arts.ve","co.ve","com.ve","e12.ve","edu.ve","firm.ve","gob.ve","gov.ve","info.ve","int.ve","mil.ve","net.ve","org.ve","rec.ve","store.ve","tec.ve","web.ve","vg","vi","co.vi","com.vi","k12.vi","net.vi","org.vi","vn","com.vn","net.vn","org.vn","edu.vn","gov.vn","int.vn","ac.vn","biz.vn","info.vn","name.vn","pro.vn","health.vn","vu","com.vu","edu.vu","net.vu","org.vu","wf","ws","com.ws","net.ws","org.ws","gov.ws","edu.ws","yt","امارات","հայ","বাংলা","бг","бел","中国","中國","الجزائر","مصر","ею","ευ","موريتانيا","გე","ελ","香港","公司.香港","教育.香港","政府.香港","個人.香港","網絡.香港","組織.香港","ಭಾರತ","ଭାରତ","ভাৰত","भारतम्","भारोत","ڀارت","ഭാരതം","भारत","بارت","بھارت","భారత్","ભારત","ਭਾਰਤ","ভারত","இந்தியா","ایران","ايران","عراق","الاردن","한국","қаз","ලංකා","இலங்கை","المغرب","мкд","мон","澳門","澳门","مليسيا","عمان","پاکستان","پاكستان","فلسطين","срб","пр.срб","орг.срб","обр.срб","од.срб","упр.срб","ак.срб","рф","قطر","السعودية","السعودیة","السعودیۃ","السعوديه","سودان","新加坡","சிங்கப்பூர்","سورية","سوريا","ไทย","ศึกษา.ไทย","ธุรกิจ.ไทย","รัฐบาล.ไทย","ทหาร.ไทย","เน็ต.ไทย","องค์กร.ไทย","تونس","台灣","台湾","臺灣","укр","اليمن","xxx","*.ye","ac.za","agric.za","alt.za","co.za","edu.za","gov.za","grondar.za","law.za","mil.za","net.za","ngo.za","nic.za","nis.za","nom.za","org.za","school.za","tm.za","web.za","zm","ac.zm","biz.zm","co.zm","com.zm","edu.zm","gov.zm","info.zm","mil.zm","net.zm","org.zm","sch.zm","zw","ac.zw","co.zw","gov.zw","mil.zw","org.zw","aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","academy","accenture","accountant","accountants","aco","actor","adac","ads","adult","aeg","aetna","afamilycompany","afl","africa","agakhan","agency","aig","aigo","airbus","airforce","airtel","akdn","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","aol","apartments","app","apple","aquarelle","arab","aramco","archi","army","art","arte","asda","associates","athleta","attorney","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aws","axa","azure","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bbc","bbt","bbva","bcg","bcn","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bharti","bible","bid","bike","bing","bingo","bio","black","blackfriday","blockbuster","blog","bloomberg","blue","bms","bmw","bnpparibas","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","bradesco","bridgestone","broadway","broker","brother","brussels","budapest","bugatti","build","builders","business","buy","buzz","bzh","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","caseih","cash","casino","catering","catholic","cba","cbn","cbre","cbs","ceb","center","ceo","cern","cfa","cfd","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","coach","codes","coffee","college","cologne","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","corsica","country","coupon","coupons","courses","cpa","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cuisinella","cymru","cyou","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dnp","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","duck","dunlop","dupont","durban","dvag","dvr","earth","eat","eco","edeka","education","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","ericsson","erni","esq","estate","esurance","etisalat","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","flickr","flights","flir","florist","flowers","fly","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gbiz","gdn","gea","gent","genting","george","ggee","gift","gifts","gives","giving","glade","glass","gle","global","globo","gmail","gmbh","gmo","gmx","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","grainger","graphics","gratis","green","gripe","grocery","group","guardian","gucci","guge","guide","guitars","guru","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hkt","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hsbc","hughes","hyatt","hyundai","ibm","icbc","ice","icu","ieee","ifm","ikano","imamat","imdb","immo","immobilien","inc","industries","infiniti","ing","ink","institute","insurance","insure","intel","international","intuit","investments","ipiranga","irish","ismaili","ist","istanbul","itau","itv","iveco","jaguar","java","jcb","jcp","jeep","jetzt","jewelry","jio","jll","jmp","jnj","joburg","jot","joy","jpmorgan","jprs","juegos","juniper","kaufen","kddi","kerryhotels","kerrylogistics","kerryproperties","kfh","kia","kim","kinder","kindle","kitchen","kiwi","koeln","komatsu","kosher","kpmg","kpn","krd","kred","kuokgroup","kyoto","lacaixa","lamborghini","lamer","lancaster","lancia","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","llc","llp","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","ltd","ltda","lundbeck","lupin","luxe","luxury","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mckinsey","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","metlife","miami","microsoft","mini","mint","mit","mitsubishi","mlb","mls","mma","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","msd","mtn","mtr","mutual","nab","nadex","nagoya","nationwide","natura","navy","nba","nec","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nfl","ngo","nhk","nico","nike","nikon","ninja","nissan","nissay","nokia","northwesternmutual","norton","now","nowruz","nowtv","nra","nrw","ntt","nyc","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","organic","origins","osaka","otsuka","ott","ovh","page","panasonic","paris","pars","partners","parts","party","passagens","pay","pccw","pet","pfizer","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","place","play","playstation","plumbing","plus","pnc","pohl","poker","politie","porn","pramerica","praxi","press","prime","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","pub","pwc","qpon","quebec","quest","qvc","racing","radio","raid","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","rocher","rocks","rodeo","rogers","room","rsvp","rugby","ruhr","run","rwe","ryukyu","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sbi","sbs","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","silk","sina","singles","site","ski","skin","sky","skype","sling","smart","smile","sncf","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","spreadbetting","srl","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","sucks","supplies","supply","support","surf","surgery","suzuki","swatch","swiftcover","swiss","sydney","symantec","systems","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tci","tdk","team","tech","technology","temasek","tennis","teva","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tjmaxx","tjx","tkmaxx","tmall","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tube","tui","tunes","tushu","tvs","ubank","ubs","unicom","university","uno","uol","ups","vacations","vana","vanguard","vegas","ventures","verisign","versicherung","vet","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vodka","volkswagen","volvo","vote","voting","voto","voyage","vuelos","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","慈善","集团","在线","大众汽车","点看","คอม","八卦","موقع","公益","公司","香格里拉","网站","移动","我爱你","москва","католик","онлайн","сайт","联通","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","アマゾン","삼성","商标","商店","商城","дети","ポイント","新闻","工行","家電","كوم","中文网","中信","娱乐","谷歌","電訊盈科","购物","クラウド","通販","网店","संगठन","餐厅","网络","ком","亚马逊","诺基亚","食品","飞利浦","手表","手机","ارامكو","العليان","اتصالات","بازار","ابوظبي","كاثوليك","همراه","닷컴","政府","شبكة","بيتك","عرب","机构","组织机构","健康","招聘","рус","珠宝","大拿","みんな","グーグル","世界","書籍","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","广东","政务","xyz","yachts","yahoo","yamaxun","yandex","yodobashi","yoga","yokohama","you","youtube","yun","zappos","zara","zero","zip","zone","zuerich","cc.ua","inf.ua","ltd.ua","adobeaemcloud.com","adobeaemcloud.net","*.dev.adobeaemcloud.com","beep.pl","barsy.ca","*.compute.estate","*.alces.network","altervista.org","alwaysdata.net","cloudfront.net","*.compute.amazonaws.com","*.compute-1.amazonaws.com","*.compute.amazonaws.com.cn","us-east-1.amazonaws.com","cn-north-1.eb.amazonaws.com.cn","cn-northwest-1.eb.amazonaws.com.cn","elasticbeanstalk.com","ap-northeast-1.elasticbeanstalk.com","ap-northeast-2.elasticbeanstalk.com","ap-northeast-3.elasticbeanstalk.com","ap-south-1.elasticbeanstalk.com","ap-southeast-1.elasticbeanstalk.com","ap-southeast-2.elasticbeanstalk.com","ca-central-1.elasticbeanstalk.com","eu-central-1.elasticbeanstalk.com","eu-west-1.elasticbeanstalk.com","eu-west-2.elasticbeanstalk.com","eu-west-3.elasticbeanstalk.com","sa-east-1.elasticbeanstalk.com","us-east-1.elasticbeanstalk.com","us-east-2.elasticbeanstalk.com","us-gov-west-1.elasticbeanstalk.com","us-west-1.elasticbeanstalk.com","us-west-2.elasticbeanstalk.com","*.elb.amazonaws.com","*.elb.amazonaws.com.cn","s3.amazonaws.com","s3-ap-northeast-1.amazonaws.com","s3-ap-northeast-2.amazonaws.com","s3-ap-south-1.amazonaws.com","s3-ap-southeast-1.amazonaws.com","s3-ap-southeast-2.amazonaws.com","s3-ca-central-1.amazonaws.com","s3-eu-central-1.amazonaws.com","s3-eu-west-1.amazonaws.com","s3-eu-west-2.amazonaws.com","s3-eu-west-3.amazonaws.com","s3-external-1.amazonaws.com","s3-fips-us-gov-west-1.amazonaws.com","s3-sa-east-1.amazonaws.com","s3-us-gov-west-1.amazonaws.com","s3-us-east-2.amazonaws.com","s3-us-west-1.amazonaws.com","s3-us-west-2.amazonaws.com","s3.ap-northeast-2.amazonaws.com","s3.ap-south-1.amazonaws.com","s3.cn-north-1.amazonaws.com.cn","s3.ca-central-1.amazonaws.com","s3.eu-central-1.amazonaws.com","s3.eu-west-2.amazonaws.com","s3.eu-west-3.amazonaws.com","s3.us-east-2.amazonaws.com","s3.dualstack.ap-northeast-1.amazonaws.com","s3.dualstack.ap-northeast-2.amazonaws.com","s3.dualstack.ap-south-1.amazonaws.com","s3.dualstack.ap-southeast-1.amazonaws.com","s3.dualstack.ap-southeast-2.amazonaws.com","s3.dualstack.ca-central-1.amazonaws.com","s3.dualstack.eu-central-1.amazonaws.com","s3.dualstack.eu-west-1.amazonaws.com","s3.dualstack.eu-west-2.amazonaws.com","s3.dualstack.eu-west-3.amazonaws.com","s3.dualstack.sa-east-1.amazonaws.com","s3.dualstack.us-east-1.amazonaws.com","s3.dualstack.us-east-2.amazonaws.com","s3-website-us-east-1.amazonaws.com","s3-website-us-west-1.amazonaws.com","s3-website-us-west-2.amazonaws.com","s3-website-ap-northeast-1.amazonaws.com","s3-website-ap-southeast-1.amazonaws.com","s3-website-ap-southeast-2.amazonaws.com","s3-website-eu-west-1.amazonaws.com","s3-website-sa-east-1.amazonaws.com","s3-website.ap-northeast-2.amazonaws.com","s3-website.ap-south-1.amazonaws.com","s3-website.ca-central-1.amazonaws.com","s3-website.eu-central-1.amazonaws.com","s3-website.eu-west-2.amazonaws.com","s3-website.eu-west-3.amazonaws.com","s3-website.us-east-2.amazonaws.com","amsw.nl","t3l3p0rt.net","tele.amune.org","apigee.io","on-aptible.com","user.aseinet.ne.jp","gv.vc","d.gv.vc","user.party.eus","pimienta.org","poivron.org","potager.org","sweetpepper.org","myasustor.com","myfritz.net","*.awdev.ca","*.advisor.ws","b-data.io","backplaneapp.io","balena-devices.com","app.banzaicloud.io","betainabox.com","bnr.la","blackbaudcdn.net","boomla.net","boxfuse.io","square7.ch","bplaced.com","bplaced.de","square7.de","bplaced.net","square7.net","browsersafetymark.io","uk0.bigv.io","dh.bytemark.co.uk","vm.bytemark.co.uk","mycd.eu","carrd.co","crd.co","uwu.ai","ae.org","ar.com","br.com","cn.com","com.de","com.se","de.com","eu.com","gb.com","gb.net","hu.com","hu.net","jp.net","jpn.com","kr.com","mex.com","no.com","qc.com","ru.com","sa.com","se.net","uk.com","uk.net","us.com","uy.com","za.bz","za.com","africa.com","gr.com","in.net","us.org","co.com","c.la","certmgr.org","xenapponazure.com","discourse.group","discourse.team","virtueeldomein.nl","cleverapps.io","*.lcl.dev","*.stg.dev","c66.me","cloud66.ws","cloud66.zone","jdevcloud.com","wpdevcloud.com","cloudaccess.host","freesite.host","cloudaccess.net","cloudcontrolled.com","cloudcontrolapp.com","cloudera.site","trycloudflare.com","workers.dev","wnext.app","co.ca","*.otap.co","co.cz","c.cdn77.org","cdn77-ssl.net","r.cdn77.net","rsc.cdn77.org","ssl.origin.cdn77-secure.org","cloudns.asia","cloudns.biz","cloudns.club","cloudns.cc","cloudns.eu","cloudns.in","cloudns.info","cloudns.org","cloudns.pro","cloudns.pw","cloudns.us","cloudeity.net","cnpy.gdn","co.nl","co.no","webhosting.be","hosting-cluster.nl","ac.ru","edu.ru","gov.ru","int.ru","mil.ru","test.ru","dyn.cosidns.de","dynamisches-dns.de","dnsupdater.de","internet-dns.de","l-o-g-i-n.de","dynamic-dns.info","feste-ip.net","knx-server.net","static-access.net","realm.cz","*.cryptonomic.net","cupcake.is","*.customer-oci.com","*.oci.customer-oci.com","*.ocp.customer-oci.com","*.ocs.customer-oci.com","cyon.link","cyon.site","daplie.me","localhost.daplie.me","dattolocal.com","dattorelay.com","dattoweb.com","mydatto.com","dattolocal.net","mydatto.net","biz.dk","co.dk","firm.dk","reg.dk","store.dk","*.dapps.earth","*.bzz.dapps.earth","builtwithdark.com","edgestack.me","debian.net","dedyn.io","dnshome.de","online.th","shop.th","drayddns.com","dreamhosters.com","mydrobo.com","drud.io","drud.us","duckdns.org","dy.fi","tunk.org","dyndns-at-home.com","dyndns-at-work.com","dyndns-blog.com","dyndns-free.com","dyndns-home.com","dyndns-ip.com","dyndns-mail.com","dyndns-office.com","dyndns-pics.com","dyndns-remote.com","dyndns-server.com","dyndns-web.com","dyndns-wiki.com","dyndns-work.com","dyndns.biz","dyndns.info","dyndns.org","dyndns.tv","at-band-camp.net","ath.cx","barrel-of-knowledge.info","barrell-of-knowledge.info","better-than.tv","blogdns.com","blogdns.net","blogdns.org","blogsite.org","boldlygoingnowhere.org","broke-it.net","buyshouses.net","cechire.com","dnsalias.com","dnsalias.net","dnsalias.org","dnsdojo.com","dnsdojo.net","dnsdojo.org","does-it.net","doesntexist.com","doesntexist.org","dontexist.com","dontexist.net","dontexist.org","doomdns.com","doomdns.org","dvrdns.org","dyn-o-saur.com","dynalias.com","dynalias.net","dynalias.org","dynathome.net","dyndns.ws","endofinternet.net","endofinternet.org","endoftheinternet.org","est-a-la-maison.com","est-a-la-masion.com","est-le-patron.com","est-mon-blogueur.com","for-better.biz","for-more.biz","for-our.info","for-some.biz","for-the.biz","forgot.her.name","forgot.his.name","from-ak.com","from-al.com","from-ar.com","from-az.net","from-ca.com","from-co.net","from-ct.com","from-dc.com","from-de.com","from-fl.com","from-ga.com","from-hi.com","from-ia.com","from-id.com","from-il.com","from-in.com","from-ks.com","from-ky.com","from-la.net","from-ma.com","from-md.com","from-me.org","from-mi.com","from-mn.com","from-mo.com","from-ms.com","from-mt.com","from-nc.com","from-nd.com","from-ne.com","from-nh.com","from-nj.com","from-nm.com","from-nv.com","from-ny.net","from-oh.com","from-ok.com","from-or.com","from-pa.com","from-pr.com","from-ri.com","from-sc.com","from-sd.com","from-tn.com","from-tx.com","from-ut.com","from-va.com","from-vt.com","from-wa.com","from-wi.com","from-wv.com","from-wy.com","ftpaccess.cc","fuettertdasnetz.de","game-host.org","game-server.cc","getmyip.com","gets-it.net","go.dyndns.org","gotdns.com","gotdns.org","groks-the.info","groks-this.info","ham-radio-op.net","here-for-more.info","hobby-site.com","hobby-site.org","home.dyndns.org","homedns.org","homeftp.net","homeftp.org","homeip.net","homelinux.com","homelinux.net","homelinux.org","homeunix.com","homeunix.net","homeunix.org","iamallama.com","in-the-band.net","is-a-anarchist.com","is-a-blogger.com","is-a-bookkeeper.com","is-a-bruinsfan.org","is-a-bulls-fan.com","is-a-candidate.org","is-a-caterer.com","is-a-celticsfan.org","is-a-chef.com","is-a-chef.net","is-a-chef.org","is-a-conservative.com","is-a-cpa.com","is-a-cubicle-slave.com","is-a-democrat.com","is-a-designer.com","is-a-doctor.com","is-a-financialadvisor.com","is-a-geek.com","is-a-geek.net","is-a-geek.org","is-a-green.com","is-a-guru.com","is-a-hard-worker.com","is-a-hunter.com","is-a-knight.org","is-a-landscaper.com","is-a-lawyer.com","is-a-liberal.com","is-a-libertarian.com","is-a-linux-user.org","is-a-llama.com","is-a-musician.com","is-a-nascarfan.com","is-a-nurse.com","is-a-painter.com","is-a-patsfan.org","is-a-personaltrainer.com","is-a-photographer.com","is-a-player.com","is-a-republican.com","is-a-rockstar.com","is-a-socialist.com","is-a-soxfan.org","is-a-student.com","is-a-teacher.com","is-a-techie.com","is-a-therapist.com","is-an-accountant.com","is-an-actor.com","is-an-actress.com","is-an-anarchist.com","is-an-artist.com","is-an-engineer.com","is-an-entertainer.com","is-by.us","is-certified.com","is-found.org","is-gone.com","is-into-anime.com","is-into-cars.com","is-into-cartoons.com","is-into-games.com","is-leet.com","is-lost.org","is-not-certified.com","is-saved.org","is-slick.com","is-uberleet.com","is-very-bad.org","is-very-evil.org","is-very-good.org","is-very-nice.org","is-very-sweet.org","is-with-theband.com","isa-geek.com","isa-geek.net","isa-geek.org","isa-hockeynut.com","issmarterthanyou.com","isteingeek.de","istmein.de","kicks-ass.net","kicks-ass.org","knowsitall.info","land-4-sale.us","lebtimnetz.de","leitungsen.de","likes-pie.com","likescandy.com","merseine.nu","mine.nu","misconfused.org","mypets.ws","myphotos.cc","neat-url.com","office-on-the.net","on-the-web.tv","podzone.net","podzone.org","readmyblog.org","saves-the-whales.com","scrapper-site.net","scrapping.cc","selfip.biz","selfip.com","selfip.info","selfip.net","selfip.org","sells-for-less.com","sells-for-u.com","sells-it.net","sellsyourhome.org","servebbs.com","servebbs.net","servebbs.org","serveftp.net","serveftp.org","servegame.org","shacknet.nu","simple-url.com","space-to-rent.com","stuff-4-sale.org","stuff-4-sale.us","teaches-yoga.com","thruhere.net","traeumtgerade.de","webhop.biz","webhop.info","webhop.net","webhop.org","worse-than.tv","writesthisblog.com","ddnss.de","dyn.ddnss.de","dyndns.ddnss.de","dyndns1.de","dyn-ip24.de","home-webserver.de","dyn.home-webserver.de","myhome-server.de","ddnss.org","definima.net","definima.io","bci.dnstrace.pro","ddnsfree.com","ddnsgeek.com","giize.com","gleeze.com","kozow.com","loseyourip.com","ooguy.com","theworkpc.com","casacam.net","dynu.net","accesscam.org","camdvr.org","freeddns.org","mywire.org","webredirect.org","myddns.rocks","blogsite.xyz","dynv6.net","e4.cz","en-root.fr","mytuleap.com","onred.one","staging.onred.one","enonic.io","customer.enonic.io","eu.org","al.eu.org","asso.eu.org","at.eu.org","au.eu.org","be.eu.org","bg.eu.org","ca.eu.org","cd.eu.org","ch.eu.org","cn.eu.org","cy.eu.org","cz.eu.org","de.eu.org","dk.eu.org","edu.eu.org","ee.eu.org","es.eu.org","fi.eu.org","fr.eu.org","gr.eu.org","hr.eu.org","hu.eu.org","ie.eu.org","il.eu.org","in.eu.org","int.eu.org","is.eu.org","it.eu.org","jp.eu.org","kr.eu.org","lt.eu.org","lu.eu.org","lv.eu.org","mc.eu.org","me.eu.org","mk.eu.org","mt.eu.org","my.eu.org","net.eu.org","ng.eu.org","nl.eu.org","no.eu.org","nz.eu.org","paris.eu.org","pl.eu.org","pt.eu.org","q-a.eu.org","ro.eu.org","ru.eu.org","se.eu.org","si.eu.org","sk.eu.org","tr.eu.org","uk.eu.org","us.eu.org","eu-1.evennode.com","eu-2.evennode.com","eu-3.evennode.com","eu-4.evennode.com","us-1.evennode.com","us-2.evennode.com","us-3.evennode.com","us-4.evennode.com","twmail.cc","twmail.net","twmail.org","mymailer.com.tw","url.tw","apps.fbsbx.com","ru.net","adygeya.ru","bashkiria.ru","bir.ru","cbg.ru","com.ru","dagestan.ru","grozny.ru","kalmykia.ru","kustanai.ru","marine.ru","mordovia.ru","msk.ru","mytis.ru","nalchik.ru","nov.ru","pyatigorsk.ru","spb.ru","vladikavkaz.ru","vladimir.ru","abkhazia.su","adygeya.su","aktyubinsk.su","arkhangelsk.su","armenia.su","ashgabad.su","azerbaijan.su","balashov.su","bashkiria.su","bryansk.su","bukhara.su","chimkent.su","dagestan.su","east-kazakhstan.su","exnet.su","georgia.su","grozny.su","ivanovo.su","jambyl.su","kalmykia.su","kaluga.su","karacol.su","karaganda.su","karelia.su","khakassia.su","krasnodar.su","kurgan.su","kustanai.su","lenug.su","mangyshlak.su","mordovia.su","msk.su","murmansk.su","nalchik.su","navoi.su","north-kazakhstan.su","nov.su","obninsk.su","penza.su","pokrovsk.su","sochi.su","spb.su","tashkent.su","termez.su","togliatti.su","troitsk.su","tselinograd.su","tula.su","tuva.su","vladikavkaz.su","vladimir.su","vologda.su","channelsdvr.net","u.channelsdvr.net","fastly-terrarium.com","fastlylb.net","map.fastlylb.net","freetls.fastly.net","map.fastly.net","a.prod.fastly.net","global.prod.fastly.net","a.ssl.fastly.net","b.ssl.fastly.net","global.ssl.fastly.net","fastpanel.direct","fastvps-server.com","fhapp.xyz","fedorainfracloud.org","fedorapeople.org","cloud.fedoraproject.org","app.os.fedoraproject.org","app.os.stg.fedoraproject.org","mydobiss.com","filegear.me","filegear-au.me","filegear-de.me","filegear-gb.me","filegear-ie.me","filegear-jp.me","filegear-sg.me","firebaseapp.com","flynnhub.com","flynnhosting.net","0e.vc","freebox-os.com","freeboxos.com","fbx-os.fr","fbxos.fr","freebox-os.fr","freeboxos.fr","freedesktop.org","*.futurecms.at","*.ex.futurecms.at","*.in.futurecms.at","futurehosting.at","futuremailing.at","*.ex.ortsinfo.at","*.kunden.ortsinfo.at","*.statics.cloud","service.gov.uk","gehirn.ne.jp","usercontent.jp","gentapps.com","lab.ms","github.io","githubusercontent.com","gitlab.io","glitch.me","lolipop.io","cloudapps.digital","london.cloudapps.digital","homeoffice.gov.uk","ro.im","shop.ro","goip.de","run.app","a.run.app","web.app","*.0emm.com","appspot.com","*.r.appspot.com","blogspot.ae","blogspot.al","blogspot.am","blogspot.ba","blogspot.be","blogspot.bg","blogspot.bj","blogspot.ca","blogspot.cf","blogspot.ch","blogspot.cl","blogspot.co.at","blogspot.co.id","blogspot.co.il","blogspot.co.ke","blogspot.co.nz","blogspot.co.uk","blogspot.co.za","blogspot.com","blogspot.com.ar","blogspot.com.au","blogspot.com.br","blogspot.com.by","blogspot.com.co","blogspot.com.cy","blogspot.com.ee","blogspot.com.eg","blogspot.com.es","blogspot.com.mt","blogspot.com.ng","blogspot.com.tr","blogspot.com.uy","blogspot.cv","blogspot.cz","blogspot.de","blogspot.dk","blogspot.fi","blogspot.fr","blogspot.gr","blogspot.hk","blogspot.hr","blogspot.hu","blogspot.ie","blogspot.in","blogspot.is","blogspot.it","blogspot.jp","blogspot.kr","blogspot.li","blogspot.lt","blogspot.lu","blogspot.md","blogspot.mk","blogspot.mr","blogspot.mx","blogspot.my","blogspot.nl","blogspot.no","blogspot.pe","blogspot.pt","blogspot.qa","blogspot.re","blogspot.ro","blogspot.rs","blogspot.ru","blogspot.se","blogspot.sg","blogspot.si","blogspot.sk","blogspot.sn","blogspot.td","blogspot.tw","blogspot.ug","blogspot.vn","cloudfunctions.net","cloud.goog","codespot.com","googleapis.com","googlecode.com","pagespeedmobilizer.com","publishproxy.com","withgoogle.com","withyoutube.com","awsmppl.com","fin.ci","free.hr","caa.li","ua.rs","conf.se","hs.zone","hs.run","hashbang.sh","hasura.app","hasura-app.io","hepforge.org","herokuapp.com","herokussl.com","myravendb.com","ravendb.community","ravendb.me","development.run","ravendb.run","bpl.biz","orx.biz","ng.city","biz.gl","ng.ink","col.ng","firm.ng","gen.ng","ltd.ng","ngo.ng","ng.school","sch.so","häkkinen.fi","*.moonscale.io","moonscale.net","iki.fi","dyn-berlin.de","in-berlin.de","in-brb.de","in-butter.de","in-dsl.de","in-dsl.net","in-dsl.org","in-vpn.de","in-vpn.net","in-vpn.org","biz.at","info.at","info.cx","ac.leg.br","al.leg.br","am.leg.br","ap.leg.br","ba.leg.br","ce.leg.br","df.leg.br","es.leg.br","go.leg.br","ma.leg.br","mg.leg.br","ms.leg.br","mt.leg.br","pa.leg.br","pb.leg.br","pe.leg.br","pi.leg.br","pr.leg.br","rj.leg.br","rn.leg.br","ro.leg.br","rr.leg.br","rs.leg.br","sc.leg.br","se.leg.br","sp.leg.br","to.leg.br","pixolino.com","ipifony.net","mein-iserv.de","test-iserv.de","iserv.dev","iobb.net","myjino.ru","*.hosting.myjino.ru","*.landing.myjino.ru","*.spectrum.myjino.ru","*.vps.myjino.ru","*.triton.zone","*.cns.joyent.com","js.org","kaas.gg","khplay.nl","keymachine.de","kinghost.net","uni5.net","knightpoint.systems","oya.to","co.krd","edu.krd","git-repos.de","lcube-server.de","svn-repos.de","leadpages.co","lpages.co","lpusercontent.com","lelux.site","co.business","co.education","co.events","co.financial","co.network","co.place","co.technology","app.lmpm.com","linkitools.space","linkyard.cloud","linkyard-cloud.ch","members.linode.com","nodebalancer.linode.com","we.bs","loginline.app","loginline.dev","loginline.io","loginline.services","loginline.site","krasnik.pl","leczna.pl","lubartow.pl","lublin.pl","poniatowa.pl","swidnik.pl","uklugs.org","glug.org.uk","lug.org.uk","lugs.org.uk","barsy.bg","barsy.co.uk","barsyonline.co.uk","barsycenter.com","barsyonline.com","barsy.club","barsy.de","barsy.eu","barsy.in","barsy.info","barsy.io","barsy.me","barsy.menu","barsy.mobi","barsy.net","barsy.online","barsy.org","barsy.pro","barsy.pub","barsy.shop","barsy.site","barsy.support","barsy.uk","*.magentosite.cloud","mayfirst.info","mayfirst.org","hb.cldmail.ru","miniserver.com","memset.net","cloud.metacentrum.cz","custom.metacentrum.cz","flt.cloud.muni.cz","usr.cloud.muni.cz","meteorapp.com","eu.meteorapp.com","co.pl","azurecontainer.io","azurewebsites.net","azure-mobile.net","cloudapp.net","mozilla-iot.org","bmoattachments.org","net.ru","org.ru","pp.ru","ui.nabu.casa","pony.club","of.fashion","on.fashion","of.football","in.london","of.london","for.men","and.mom","for.mom","for.one","for.sale","of.work","to.work","nctu.me","bitballoon.com","netlify.com","4u.com","ngrok.io","nh-serv.co.uk","nfshost.com","dnsking.ch","mypi.co","n4t.co","001www.com","ddnslive.com","myiphost.com","forumz.info","16-b.it","32-b.it","64-b.it","soundcast.me","tcp4.me","dnsup.net","hicam.net","now-dns.net","ownip.net","vpndns.net","dynserv.org","now-dns.org","x443.pw","now-dns.top","ntdll.top","freeddns.us","crafting.xyz","zapto.xyz","nsupdate.info","nerdpol.ovh","blogsyte.com","brasilia.me","cable-modem.org","ciscofreak.com","collegefan.org","couchpotatofries.org","damnserver.com","ddns.me","ditchyourip.com","dnsfor.me","dnsiskinky.com","dvrcam.info","dynns.com","eating-organic.net","fantasyleague.cc","geekgalaxy.com","golffan.us","health-carereform.com","homesecuritymac.com","homesecuritypc.com","hopto.me","ilovecollege.info","loginto.me","mlbfan.org","mmafan.biz","myactivedirectory.com","mydissent.net","myeffect.net","mymediapc.net","mypsx.net","mysecuritycamera.com","mysecuritycamera.net","mysecuritycamera.org","net-freaks.com","nflfan.org","nhlfan.net","no-ip.ca","no-ip.co.uk","no-ip.net","noip.us","onthewifi.com","pgafan.net","point2this.com","pointto.us","privatizehealthinsurance.net","quicksytes.com","read-books.org","securitytactics.com","serveexchange.com","servehumour.com","servep2p.com","servesarcasm.com","stufftoread.com","ufcfan.org","unusualperson.com","workisboring.com","3utilities.com","bounceme.net","ddns.net","ddnsking.com","gotdns.ch","hopto.org","myftp.biz","myftp.org","myvnc.com","no-ip.biz","no-ip.info","no-ip.org","noip.me","redirectme.net","servebeer.com","serveblog.net","servecounterstrike.com","serveftp.com","servegame.com","servehalflife.com","servehttp.com","serveirc.com","serveminecraft.net","servemp3.com","servepics.com","servequake.com","sytes.net","webhop.me","zapto.org","stage.nodeart.io","nodum.co","nodum.io","pcloud.host","nyc.mn","nom.ae","nom.af","nom.ai","nom.al","nym.by","nom.bz","nym.bz","nom.cl","nym.ec","nom.gd","nom.ge","nom.gl","nym.gr","nom.gt","nym.gy","nym.hk","nom.hn","nym.ie","nom.im","nom.ke","nym.kz","nym.la","nym.lc","nom.li","nym.li","nym.lt","nym.lu","nom.lv","nym.me","nom.mk","nym.mn","nym.mx","nom.nu","nym.nz","nym.pe","nym.pt","nom.pw","nom.qa","nym.ro","nom.rs","nom.si","nym.sk","nom.st","nym.su","nym.sx","nom.tj","nym.tw","nom.ug","nom.uy","nom.vc","nom.vg","static.observableusercontent.com","cya.gg","cloudycluster.net","nid.io","opencraft.hosting","operaunite.com","skygearapp.com","outsystemscloud.com","ownprovider.com","own.pm","ox.rs","oy.lc","pgfog.com","pagefrontapp.com","art.pl","gliwice.pl","krakow.pl","poznan.pl","wroc.pl","zakopane.pl","pantheonsite.io","gotpantheon.com","mypep.link","perspecta.cloud","on-web.fr","*.platform.sh","*.platformsh.site","dyn53.io","co.bn","xen.prgmr.com","priv.at","prvcy.page","*.dweb.link","protonet.io","chirurgiens-dentistes-en-france.fr","byen.site","pubtls.org","qualifioapp.com","qbuser.com","instantcloud.cn","ras.ru","qa2.com","qcx.io","*.sys.qcx.io","dev-myqnapcloud.com","alpha-myqnapcloud.com","myqnapcloud.com","*.quipelements.com","vapor.cloud","vaporcloud.io","rackmaze.com","rackmaze.net","*.on-k3s.io","*.on-rancher.cloud","*.on-rio.io","readthedocs.io","rhcloud.com","app.render.com","onrender.com","repl.co","repl.run","resindevice.io","devices.resinstaging.io","hzc.io","wellbeingzone.eu","ptplus.fit","wellbeingzone.co.uk","git-pages.rit.edu","sandcats.io","logoip.de","logoip.com","schokokeks.net","gov.scot","scrysec.com","firewall-gateway.com","firewall-gateway.de","my-gateway.de","my-router.de","spdns.de","spdns.eu","firewall-gateway.net","my-firewall.org","myfirewall.org","spdns.org","senseering.net","biz.ua","co.ua","pp.ua","shiftedit.io","myshopblocks.com","shopitsite.com","mo-siemens.io","1kapp.com","appchizi.com","applinzi.com","sinaapp.com","vipsinaapp.com","siteleaf.net","bounty-full.com","alpha.bounty-full.com","beta.bounty-full.com","stackhero-network.com","static.land","dev.static.land","sites.static.land","apps.lair.io","*.stolos.io","spacekit.io","customer.speedpartner.de","api.stdlib.com","storj.farm","utwente.io","soc.srcf.net","user.srcf.net","temp-dns.com","applicationcloud.io","scapp.io","*.s5y.io","*.sensiosite.cloud","syncloud.it","diskstation.me","dscloud.biz","dscloud.me","dscloud.mobi","dsmynas.com","dsmynas.net","dsmynas.org","familyds.com","familyds.net","familyds.org","i234.me","myds.me","synology.me","vpnplus.to","direct.quickconnect.to","taifun-dns.de","gda.pl","gdansk.pl","gdynia.pl","med.pl","sopot.pl","edugit.org","telebit.app","telebit.io","*.telebit.xyz","gwiddle.co.uk","thingdustdata.com","cust.dev.thingdust.io","cust.disrec.thingdust.io","cust.prod.thingdust.io","cust.testing.thingdust.io","arvo.network","azimuth.network","bloxcms.com","townnews-staging.com","12hp.at","2ix.at","4lima.at","lima-city.at","12hp.ch","2ix.ch","4lima.ch","lima-city.ch","trafficplex.cloud","de.cool","12hp.de","2ix.de","4lima.de","lima-city.de","1337.pictures","clan.rip","lima-city.rocks","webspace.rocks","lima.zone","*.transurl.be","*.transurl.eu","*.transurl.nl","tuxfamily.org","dd-dns.de","diskstation.eu","diskstation.org","dray-dns.de","draydns.de","dyn-vpn.de","dynvpn.de","mein-vigor.de","my-vigor.de","my-wan.de","syno-ds.de","synology-diskstation.de","synology-ds.de","uber.space","*.uberspace.de","hk.com","hk.org","ltd.hk","inc.hk","virtualuser.de","virtual-user.de","urown.cloud","dnsupdate.info","lib.de.us","2038.io","router.management","v-info.info","voorloper.cloud","v.ua","wafflecell.com","*.webhare.dev","wedeploy.io","wedeploy.me","wedeploy.sh","remotewd.com","wmflabs.org","myforum.community","community-pro.de","diskussionsbereich.de","community-pro.net","meinforum.net","half.host","xnbay.com","u2.xnbay.com","u2-local.xnbay.com","cistron.nl","demon.nl","xs4all.space","yandexcloud.net","storage.yandexcloud.net","website.yandexcloud.net","official.academy","yolasite.com","ybo.faith","yombo.me","homelink.one","ybo.party","ybo.review","ybo.science","ybo.trade","nohost.me","noho.st","za.net","za.org","now.sh","bss.design","basicserver.io","virtualserver.io","enterprisecloud.nu"]'); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __nccwpck_require__(94822); -/******/ module.exports = __webpack_exports__; -/******/ -/******/ })() -; \ No newline at end of file diff --git a/cluster/images/splice-test-temp-runner-hook/local.mk b/cluster/images/splice-test-temp-runner-hook/local.mk deleted file mode 100644 index 52006328..00000000 --- a/cluster/images/splice-test-temp-runner-hook/local.mk +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -dir := $(call current_dir) - -$(dir)/$(docker-build): $(dir)/target/LICENSE - -$(dir)/target/LICENSE: LICENSE - cp $< $@ diff --git a/cluster/images/splitwell-app/app.conf b/cluster/images/splitwell-app/app.conf index 3b247945..a77e8a59 100644 --- a/cluster/images/splitwell-app/app.conf +++ b/cluster/images/splitwell-app/app.conf @@ -1,3 +1,5 @@ +include required(file("/app/storage.conf")) + _client_credentials_auth_config { type = "client-credentials" well-known-config-url = ${?SPLICE_APP_SPLITWELL_LEDGER_API_AUTH_URL} @@ -33,7 +35,7 @@ _scan_client { canton { splitwell-apps { splitwell_backend { - storage.type = postgres + storage = ${_storage} admin-api = { address = "0.0.0.0" port = 5213 diff --git a/cluster/images/sv-app/app.conf b/cluster/images/sv-app/app.conf index ae37e49f..6171c801 100644 --- a/cluster/images/sv-app/app.conf +++ b/cluster/images/sv-app/app.conf @@ -1,3 +1,5 @@ +include required(file("/app/storage.conf")) + _client_credentials_auth_config { type = "client-credentials" well-known-config-url = ${?SPLICE_APP_SV_LEDGER_API_AUTH_URL} @@ -41,7 +43,7 @@ _comet_bft_config { canton { sv-apps { sv { - storage.type = postgres + storage = ${_storage} admin-api = { address = "0.0.0.0" port = 5014 diff --git a/cluster/images/validator-app/app.conf b/cluster/images/validator-app/app.conf index 8557d7ad..cd0a22ba 100644 --- a/cluster/images/validator-app/app.conf +++ b/cluster/images/validator-app/app.conf @@ -1,3 +1,5 @@ +include required(file("/app/storage.conf")) + _client_credentials_auth_config { type = "client-credentials" well-known-config-url = ${?SPLICE_APP_VALIDATOR_LEDGER_API_AUTH_URL} @@ -18,7 +20,7 @@ _scan { canton { validator-apps { validator_backend { - storage.type = postgres + storage = ${_storage} admin-api = { address = "0.0.0.0" port = 5003 diff --git a/cluster/pulumi/infra/grafana-dashboards/canton-network/sequencer-client.json b/cluster/pulumi/infra/grafana-dashboards/canton-network/sequencer-client.json new file mode 100644 index 00000000..e639a4bd --- /dev/null +++ b/cluster/pulumi/infra/grafana-dashboards/canton-network/sequencer-client.json @@ -0,0 +1,668 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Metrics exposed by the sequencer client (aka sequencer connection) in participants and mediators", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1961, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Latency of a sequencer submission from submission until the node observes it being sequenced.\nNote that this is the latency of an individuals sequencer submission not a Daml transaction which involves multiple sequencer submissions", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": " histogram_quantile(0.9, sum by (namespace, job) (rate(daml_sequencer_client_submissions_sequencing_duration_seconds{namespace=~\"$namespace\",job=~\"$job\"}[$__rate_interval])))", + "legendFormat": "0.9 quantile for ({{namespace}}, {{job}})", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": " histogram_quantile(0.99, sum by (namespace, job) (rate(daml_sequencer_client_submissions_sequencing_duration_seconds{namespace=~\"$namespace\",job=~\"$job\"}[$__rate_interval])))", + "hide": false, + "instant": false, + "legendFormat": "0.99 quantile for ({{namespace}}, {{job}})", + "range": true, + "refId": "B" + } + ], + "title": "Sequencer Submission Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Rate of sequencer submissions both successful and failed", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "editorMode": "code", + "expr": "sum by (namespace, job) (histogram_count(rate(daml_sequencer_client_submissions_sends_duration_seconds{namespace=~\"$namespace\",job=~\"$job\"}[$__rate_interval])))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Rate of sequencer submissions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Rate of sequencer submissions that have not been sequenced.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "editorMode": "code", + "expr": "sum by (namespace, job) (rate(daml_sequencer_client_submissions_dropped{namespace=~\"$namespace\",job=~\"$job\"}[$__rate_interval]))", + "legendFormat": "{{label_name}}", + "range": true, + "refId": "A" + } + ], + "title": "Rate of dropped sequencer submissions", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Rate of events received from the sequencer", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "editorMode": "code", + "expr": "sum by (namespace, job) (rate(daml_sequencer_client_handler_sequencer_events{namespace=~\"$namespace\",job=~\"$job\"}[$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Rate of received sequencer events", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "The sequencer delay on the overall BFT connection, i.e., the difference between wallclock time and record time of the last received event where an event only counts as received once it has been received from a threshold of SVs.\n\nNote that this only changes when a new event is received so if no events are received it will not go up.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "editorMode": "code", + "expr": "min by (namespace, job)(daml_sequencer_client_handler_delay{namespace=~\"$namespace\",job=~\"$job\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Sequencer Delay", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Delay between wallclock time and the record time of the last sequencer event received on each connection. Note that this only goes up or down if an event actually was received. So for a sequencer that is completely down you will not see it go up.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "editorMode": "code", + "expr": "min by (namespace, job, sequencer) (daml_sequencer_client_handler_delay_per_connection{namespace=~\"$namespace\",job=~\"$job\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Delay per sequencer connection", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 40, + "tags": [], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "definition": "label_values(daml_sequencer_client_submissions_sequencing_duration_seconds,namespace)", + "includeAll": true, + "multi": true, + "name": "namespace", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(daml_sequencer_client_submissions_sequencing_duration_seconds,namespace)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + }, + { + "allValue": ".*", + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "definition": "label_values(daml_sequencer_client_submissions_sequencing_duration_seconds,job)", + "includeAll": true, + "multi": true, + "name": "job", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(daml_sequencer_client_submissions_sequencing_duration_seconds,job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "UTC", + "title": "Sequencer Client", + "uid": "eecxhade03n5se", + "version": 12, + "weekStart": "" +} diff --git a/load-tester/package-lock.json b/load-tester/package-lock.json index 1a338276..72f73121 100644 --- a/load-tester/package-lock.json +++ b/load-tester/package-lock.json @@ -18,7 +18,7 @@ "@types/node": "^20.9.0", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", - "esbuild": "^0.19.5", + "esbuild": "^0.25.0", "eslint": "^8.53.0", "prettier": "^3.1.0", "typescript": "^5.2.2" @@ -283,356 +283,429 @@ "node": ">=6.9.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", - "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", - "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", - "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", - "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", - "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", - "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", - "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", - "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", - "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", - "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", - "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", - "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", - "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", - "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", - "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", - "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", - "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", - "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", - "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", - "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", - "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", - "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -1282,40 +1355,44 @@ } }, "node_modules/esbuild": { - "version": "0.19.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", - "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.5", - "@esbuild/android-arm64": "0.19.5", - "@esbuild/android-x64": "0.19.5", - "@esbuild/darwin-arm64": "0.19.5", - "@esbuild/darwin-x64": "0.19.5", - "@esbuild/freebsd-arm64": "0.19.5", - "@esbuild/freebsd-x64": "0.19.5", - "@esbuild/linux-arm": "0.19.5", - "@esbuild/linux-arm64": "0.19.5", - "@esbuild/linux-ia32": "0.19.5", - "@esbuild/linux-loong64": "0.19.5", - "@esbuild/linux-mips64el": "0.19.5", - "@esbuild/linux-ppc64": "0.19.5", - "@esbuild/linux-riscv64": "0.19.5", - "@esbuild/linux-s390x": "0.19.5", - "@esbuild/linux-x64": "0.19.5", - "@esbuild/netbsd-x64": "0.19.5", - "@esbuild/openbsd-x64": "0.19.5", - "@esbuild/sunos-x64": "0.19.5", - "@esbuild/win32-arm64": "0.19.5", - "@esbuild/win32-ia32": "0.19.5", - "@esbuild/win32-x64": "0.19.5" + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" } }, "node_modules/escape-string-regexp": { diff --git a/load-tester/package.json b/load-tester/package.json index 0caa19e5..7bd8f3a9 100644 --- a/load-tester/package.json +++ b/load-tester/package.json @@ -21,7 +21,7 @@ "@types/node": "^20.9.0", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", - "esbuild": "^0.19.5", + "esbuild": "^0.25.0", "eslint": "^8.53.0", "prettier": "^3.1.0", "typescript": "^5.2.2" diff --git a/nix/canton-sources.json b/nix/canton-sources.json index 38ba6afc..643e7d74 100644 --- a/nix/canton-sources.json +++ b/nix/canton-sources.json @@ -1,5 +1,5 @@ { - "version": "3.2.0-snapshot.20250203.14539.0.v5142c0b4", + "version": "3.2.0-snapshot.20250212.14546.0.vadd98462", "tooling_sdk_version": "3.1.0-snapshot.20240717.13187.0.va47ab77f", - "sha256": "sha256:05v3rvvmm8y0fa9iik624v7l7pdmdd4737gsyz5jf8wrxv2y4kmz" + "sha256": "sha256:1sr43wv0678zcdmxcjskbw3swj7qcrbh9y5asqb8nq9q1wg68yaf" } diff --git a/nix/shell.nix b/nix/shell.nix index 357bbb0c..560baf8b 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -29,6 +29,8 @@ in pkgs.mkShell { getopt gh git + # Required for the runner-container-hooks submodule + git-lfs git-search-replace (google-cloud-sdk.withExtraComponents ([google-cloud-sdk.components.gke-gcloud-auth-plugin ])) grpcurl @@ -64,6 +66,7 @@ in pkgs.mkShell { doCheck = false; doInstallCheck = false; })) + python3Packages.flask python3Packages.GitPython python3Packages.gql python3Packages.humanize @@ -72,12 +75,14 @@ in pkgs.mkShell { python3Packages.marshmallow-dataclass python3Packages.polib python3Packages.pyjwt + python3Packages.json-logging python3Packages.pyyaml python3Packages.regex python3Packages.requests python3Packages.requests_toolbelt python3Packages.sphinx_rtd_theme python3Packages.sphinx-copybutton + python3Packages.waitress python3.pkgs.sphinx-reredirects ripgrep rsync diff --git a/project/Headers.scala b/project/Headers.scala index 230706b0..b71e648b 100644 --- a/project/Headers.scala +++ b/project/Headers.scala @@ -103,7 +103,8 @@ object Headers { ((Compile / baseDirectory).value ** "community" ** "*") --- ((Compile / baseDirectory).value ** "*ts-client" ** "*") --- ((Compile / baseDirectory).value ** "target" ** "*") --- - ((Compile / baseDirectory).value ** "cmd-*.sh") + ((Compile / baseDirectory).value ** "cmd-*.sh") --- + ((Compile / baseDirectory).value ** "example-script.sh") ).get val sbtScalaSources = (