From 3c127fca6ce4d0d043f79fa1f3072893aacff76c Mon Sep 17 00:00:00 2001 From: Daniel Lamando Date: Thu, 19 Sep 2024 20:22:44 +0200 Subject: [PATCH] Set up jsr publication of client lib (#13) * Start preparing jsr publication of client lib * Remove internal import from deps.ts * Update more imports for file renamings * Add deps.ts file for JSR * Add jsr.json to git * Update code generation for JSR slowtypes rules Generally, all public functions shall have explicit return types. * Remaining slowtypes issues in lib * Wrap API function parameters over multiple lines * Shorten function signature for watch APIs * Restore customized param name for proxy APIs * Try passing typecheck on Deno 1.41 * Update release notes --- .github/workflows/deno-ci.yaml | 23 +- .github/workflows/jsr-publish-lib.yaml | 25 + .gitignore | 1 - generation/codegen-mod.ts | 59 +- generation/codegen-structs.ts | 2 +- lib/LICENSE | 201 +++ lib/README.md | 7 +- lib/argo-cd/argoproj.io@v1alpha1/mod.ts | 166 ++- lib/argo-cd/argoproj.io@v1alpha1/structs.ts | 274 ++--- .../admissionregistration.k8s.io@v1/mod.ts | 80 +- .../mod.ts | 98 +- .../mod.ts | 98 +- lib/builtin/apiextensions.k8s.io@v1/mod.ts | 58 +- lib/builtin/apiregistration.k8s.io@v1/mod.ts | 58 +- lib/builtin/apps@v1/mod.ts | 370 ++++-- lib/builtin/authentication.k8s.io@v1/mod.ts | 10 +- .../authentication.k8s.io@v1alpha1/mod.ts | 5 +- .../authentication.k8s.io@v1beta1/mod.ts | 5 +- lib/builtin/authorization.k8s.io@v1/mod.ts | 24 +- lib/builtin/autoscaling@v1/mod.ts | 70 +- lib/builtin/autoscaling@v2/mod.ts | 70 +- lib/builtin/batch@v1/mod.ts | 136 ++- lib/builtin/certificates.k8s.io@v1/mod.ts | 76 +- .../certificates.k8s.io@v1alpha1/mod.ts | 40 +- lib/builtin/coordination.k8s.io@v1/mod.ts | 52 +- lib/builtin/core@v1/mod.ts | 1088 +++++++++++++---- lib/builtin/discovery.k8s.io@v1/mod.ts | 52 +- lib/builtin/events.k8s.io@v1/mod.ts | 52 +- .../mod.ts | 116 +- .../mod.ts | 116 +- .../internal.apiserver.k8s.io@v1alpha1/mod.ts | 58 +- lib/builtin/networking.k8s.io@v1/mod.ts | 158 ++- lib/builtin/networking.k8s.io@v1alpha1/mod.ts | 80 +- lib/builtin/node.k8s.io@v1/mod.ts | 40 +- lib/builtin/policy@v1/mod.ts | 70 +- .../rbac.authorization.k8s.io@v1/mod.ts | 180 ++- lib/builtin/resource.k8s.io@v1alpha2/mod.ts | 224 +++- lib/builtin/scheduling.k8s.io@v1/mod.ts | 40 +- lib/builtin/storage.k8s.io@v1/mod.ts | 230 +++- .../acme.cert-manager.io@v1/mod.ts | 136 ++- .../acme.cert-manager.io@v1/structs.ts | 16 +- lib/cert-manager/cert-manager.io@v1/mod.ts | 260 +++- .../cert-manager.io@v1/structs.ts | 106 +- lib/client.ts | 6 - lib/common.ts | 32 +- lib/deps.ts | 11 + lib/deps_jsr.ts | 5 + lib/examples/argocd.ts | 2 +- lib/examples/demo.ts | 2 +- lib/examples/follow-logs.ts | 2 +- lib/examples/list-crds.ts | 2 +- lib/examples/pod-exec-output.ts | 2 +- lib/examples/pod-exec-tty.ts | 2 +- lib/examples/pod-portforward.ts | 2 +- lib/examples/run-job-evented.ts | 2 +- lib/examples/run-job.ts | 2 +- lib/examples/top-nodes.ts | 2 +- lib/examples/watch-ingress.ts | 2 +- lib/examples/watch-nodes.ts | 2 +- .../externaldns.k8s.io@v1alpha1/mod.ts | 70 +- .../externaldns.k8s.io@v1alpha1/structs.ts | 8 +- lib/jsr.json | 58 + lib/tunnels.ts | 35 +- lib/vpa/autoscaling.k8s.io@v1/mod.ts | 100 +- lib/vpa/autoscaling.k8s.io@v1/structs.ts | 28 +- with-jsr-deps.sh | 14 + 66 files changed, 4213 insertions(+), 1208 deletions(-) create mode 100644 .github/workflows/jsr-publish-lib.yaml delete mode 100644 .gitignore create mode 100644 lib/LICENSE delete mode 100644 lib/client.ts create mode 100644 lib/deps.ts create mode 100644 lib/deps_jsr.ts create mode 100644 lib/jsr.json create mode 100755 with-jsr-deps.sh diff --git a/.github/workflows/deno-ci.yaml b/.github/workflows/deno-ci.yaml index ff5b66a..122c3cf 100644 --- a/.github/workflows/deno-ci.yaml +++ b/.github/workflows/deno-ci.yaml @@ -13,9 +13,9 @@ jobs: strategy: matrix: deno-version: - - v1.28 - - v1.32 - - v1.36 + - v1.41 + - v1.43 + - v1.45 - canary fail-fast: false # run each branch to completion @@ -51,3 +51,20 @@ jobs: - name: Test run: time deno test + + audit-lib: + runs-on: ubuntu-latest + name: Audit ./lib + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Use Deno v1 + uses: denoland/setup-deno@v1 + with: + deno-version: v1 + + - name: Check publish rules + working-directory: lib + run: ../with-jsr-deps.sh deno publish --dry-run --allow-dirty diff --git a/.github/workflows/jsr-publish-lib.yaml b/.github/workflows/jsr-publish-lib.yaml new file mode 100644 index 0000000..2daf0cc --- /dev/null +++ b/.github/workflows/jsr-publish-lib.yaml @@ -0,0 +1,25 @@ +name: Publish +on: + push: + branches: + - main + paths: + - lib/jsr.json + +jobs: + publish: + runs-on: ubuntu-latest + name: Publish ./lib + + permissions: + contents: read + id-token: write + + steps: + - uses: denoland/setup-deno@v1 + + - uses: actions/checkout@v4 + + - name: Publish to JSR + working-directory: lib + run: ../with-jsr-deps.sh deno publish --allow-dirty diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a6c57f5..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.json diff --git a/generation/codegen-mod.ts b/generation/codegen-mod.ts index 05826c1..4a4a02b 100644 --- a/generation/codegen-mod.ts +++ b/generation/codegen-mod.ts @@ -37,10 +37,10 @@ export function generateModuleTypescript(surface: SurfaceMap, api: SurfaceApi): chunks.push(` }\n`); if (hasNamespaced) { - chunks.push(` namespace(name: string) {`); + chunks.push(` namespace(name: string): ${api.friendlyName}NamespacedApi {`); chunks.push(` return new ${api.friendlyName}NamespacedApi(this.#client, name);`); chunks.push(` }`); - chunks.push(` myNamespace() {`); + chunks.push(` myNamespace(): ${api.friendlyName}NamespacedApi {`); chunks.push(` if (!this.#client.defaultNamespace) throw new Error("No current namespace is set");`); chunks.push(` return new ${api.friendlyName}NamespacedApi(this.#client, this.#client.defaultNamespace);`); chunks.push(` }\n`); @@ -126,13 +126,13 @@ export function generateModuleTypescript(surface: SurfaceMap, api: SurfaceApi): const funcName = `proxy${middleName}Request`; args.push([{name: 'opts', in: 'path'}, {type: 'special', name: 'ProxyOptions'}]); - const baseSignature = `${funcName}(${writeSig(args, false, ' ')}`.replace('(name:', `(${nameArgName}:`); + const baseSignature = `${funcName}(${writeSig(args, false, ' ')}`.replace('name:', `${nameArgName}:`); - chunks.push(` ${baseSignature} & {expectStream: true; expectJson: true}): Promise>;`); - chunks.push(` ${baseSignature} & {expectStream: true}): Promise>;`); - chunks.push(` ${baseSignature} & {expectJson: true}): Promise;`); - chunks.push(` ${baseSignature}): Promise;`); - chunks.push(` async ${baseSignature}): Promise {`); + chunks.push(` ${baseSignature} & {expectStream: true; expectJson: true},\n ): Promise>;`); + chunks.push(` ${baseSignature} & {expectStream: true},\n ): Promise>;`); + chunks.push(` ${baseSignature} & {expectJson: true},\n ): Promise;`); + chunks.push(` ${baseSignature},\n ): Promise;`); + chunks.push(` async ${baseSignature},\n ): Promise {`); chunks.push(` if (opts.path && !opts.path.startsWith('/')) throw new Error("Proxy path cannot be relative");`); chunks.push(` const name = (opts.port != null) ? \`\${${nameArgName}}:\${opts.port}\` : ${nameArgName};`); chunks.push(` const path = \`\${this.#root}${JSON.stringify(opPath).slice(1,-1).replace(/{/g, '${')}\${opts.path || ''}\`;`); @@ -185,10 +185,47 @@ export function generateModuleTypescript(surface: SurfaceMap, api: SurfaceApi): // return AcmeCertManagerIoV1.toOrder(resp); // } - chunks.push(` async ${funcName}(${writeSig(args, opts, ' ')}) {`); const isWatch = op.operationName.startsWith('watch'); const isStream = op.operationName.startsWith('stream'); + let returnSig = 'unknown'; + if (expectsTunnel) { + returnSig = `tunnels.${expectsTunnel}`; + } else if (isStream) { + if (accept === 'text/plain') { + returnSig = 'ReadableStream'; + } else { + returnSig = 'ReadableStream'; + } + } else if (accept === 'text/plain') { + returnSig = 'string'; + } else if (outShape) { + let shape = outShape; + // QUIRK: individual deletes can either return a Status or the 'lastExisting' resource + // More details further down in this file + if (shape.type === 'foreign' && + shape.api.apiGroup === 'meta' && + shape.name === 'Status' && + op.method === 'delete') { + shape = api.shapes.shapes.get(op.operationName.replace(/^delete/, ''))!; + } + + if (shape.type === 'foreign') { + returnSig = `${shape.api.friendlyName}.${shape.name}`; + } else if (shape.reference) { + returnSig = `${api.friendlyName}.${shape.reference}`; + } else throw new Error(`TODO: weird output shape on ${op.operationId}`); + + if (op["x-kubernetes-action"] == 'delete') { + returnSig += ` | MetaV1.Status`; + } + if (isWatch) { + returnSig = `c.WatchEventStream<${returnSig.slice(0, -4)}>`; + } + } + + chunks.push(` async ${funcName}(${writeSig(args, opts, ' ')},\n ): Promise<${returnSig}> {`); + const allOptKeys = opts.map(x => x[0].name).sort().join(','); const knownOptShape = knownOpts[allOptKeys]; if (!knownOptShape) { @@ -342,7 +379,7 @@ export function generateModuleTypescript(surface: SurfaceMap, api: SurfaceApi): } function writeSig(args: [OpenAPI2RequestParameter, ApiShape][], opts: [OpenAPI2RequestParameter, ApiShape][] | false, indent=''): string { - let sigs = new Array(); + const sigs = new Array(); for (const arg of args) { sigs.push(`${arg[0].name}: ${writeType(arg[1])}`); } @@ -367,7 +404,7 @@ export function generateModuleTypescript(surface: SurfaceMap, api: SurfaceApi): sigs.push(`opts: {\n${lines.join('\n')}\n}${allAreOpt ? ' = {}' : ''}`); } } - return sigs.join(', ').replace(/\n/g, '\n'+indent); + return `\n${indent}` + sigs.join(',\n').replace(/\n/g, '\n'+indent); } } diff --git a/generation/codegen-structs.ts b/generation/codegen-structs.ts index 6be5a71..de21c6c 100644 --- a/generation/codegen-structs.ts +++ b/generation/codegen-structs.ts @@ -243,7 +243,7 @@ export function generateStructsTypescript(surface: SurfaceMap, apiS: SurfaceApi) const extraStruct = extraStructs.shift(); if (!extraStruct) break; - chunks.push(`export function to${extraStruct.name}(input: c.JSONValue) {`); + chunks.push(`function to${extraStruct.name}(input: c.JSONValue) {`); chunks.push(` const obj = c.checkObj(input);`); chunks.push(` return {`); for (const [field, inner] of extraStruct.struct.fields) { diff --git a/lib/LICENSE b/lib/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/lib/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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. diff --git a/lib/README.md b/lib/README.md index 8f6c347..7d14289 100644 --- a/lib/README.md +++ b/lib/README.md @@ -6,7 +6,7 @@ Generated, typed interfaces to make every possible Kubernetes API request and work with richer data structures. -Actual request transports implemented in `/x/kubernetes_client`. +The actual request transports are implemented in `/x/kubernetes_client`. ## Usage @@ -32,6 +32,11 @@ see `/x/kubernetes_client` for more information. ## Changelog +* `v0.5.1` on `2024-09-18`: + * Updating `/x/kubernetes_client` API contract to `v0.7.3`. + * Add [JSR publication](https://jsr.io/@cloudydeno/kubernetes-apis) of the module. + * Exposed API surface has been adjusted to satisfy JSR "slow types" checks. Shouldn't affect most code. + * `v0.5.0` on `2023-08-19`: * Updating `/x/kubernetes_client` API contract to `v0.7.0`. * Actually implement PodExec, PodAttach, PodPortForward APIs with a new tunnel implementation. diff --git a/lib/argo-cd/argoproj.io@v1alpha1/mod.ts b/lib/argo-cd/argoproj.io@v1alpha1/mod.ts index f73ede7..69b39fb 100644 --- a/lib/argo-cd/argoproj.io@v1alpha1/mod.ts +++ b/lib/argo-cd/argoproj.io@v1alpha1/mod.ts @@ -13,15 +13,17 @@ export class ArgoprojIoV1alpha1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): ArgoprojIoV1alpha1NamespacedApi { return new ArgoprojIoV1alpha1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): ArgoprojIoV1alpha1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new ArgoprojIoV1alpha1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getApplicationListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getApplicationListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applications`, @@ -32,7 +34,9 @@ export class ArgoprojIoV1alpha1Api { return ArgoprojIoV1alpha1.toApplicationList(resp); } - async watchApplicationListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchApplicationListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applications`, @@ -44,7 +48,9 @@ export class ArgoprojIoV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(ArgoprojIoV1alpha1.toApplication, MetaV1.toStatus)); } - async getApplicationSetListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getApplicationSetListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applicationsets`, @@ -55,7 +61,9 @@ export class ArgoprojIoV1alpha1Api { return ArgoprojIoV1alpha1.toApplicationSetList(resp); } - async watchApplicationSetListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchApplicationSetListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applicationsets`, @@ -67,7 +75,9 @@ export class ArgoprojIoV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(ArgoprojIoV1alpha1.toApplicationSet, MetaV1.toStatus)); } - async getAppProjectListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getAppProjectListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}appprojects`, @@ -78,7 +88,9 @@ export class ArgoprojIoV1alpha1Api { return ArgoprojIoV1alpha1.toAppProjectList(resp); } - async watchAppProjectListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchAppProjectListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}appprojects`, @@ -100,7 +112,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { this.#root = `/apis/argoproj.io/v1alpha1/namespaces/${namespace}/`; } - async getApplicationList(opts: operations.GetListOpts = {}) { + async getApplicationList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applications`, @@ -111,7 +125,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationList(resp); } - async watchApplicationList(opts: operations.WatchListOpts = {}) { + async watchApplicationList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applications`, @@ -123,7 +139,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ArgoprojIoV1alpha1.toApplication, MetaV1.toStatus)); } - async createApplication(body: ArgoprojIoV1alpha1.Application, opts: operations.PutOpts = {}) { + async createApplication( + body: ArgoprojIoV1alpha1.Application, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}applications`, @@ -135,7 +154,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplication(resp); } - async deleteApplicationList(opts: operations.DeleteListOpts = {}) { + async deleteApplicationList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}applications`, @@ -146,7 +167,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationList(resp); } - async getApplication(name: string, opts: operations.NoOpts = {}) { + async getApplication( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applications/${name}`, @@ -156,7 +180,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplication(resp); } - async deleteApplication(name: string, opts: operations.DeleteOpts = {}) { + async deleteApplication( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}applications/${name}`, @@ -168,7 +195,11 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplication(resp); } - async replaceApplication(name: string, body: ArgoprojIoV1alpha1.Application, opts: operations.PutOpts = {}) { + async replaceApplication( + name: string, + body: ArgoprojIoV1alpha1.Application, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}applications/${name}`, @@ -180,7 +211,12 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplication(resp); } - async patchApplication(name: string, type: c.PatchType, body: ArgoprojIoV1alpha1.Application | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchApplication( + name: string, + type: c.PatchType, + body: ArgoprojIoV1alpha1.Application | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}applications/${name}`, @@ -193,7 +229,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplication(resp); } - async getApplicationSetList(opts: operations.GetListOpts = {}) { + async getApplicationSetList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applicationsets`, @@ -204,7 +242,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSetList(resp); } - async watchApplicationSetList(opts: operations.WatchListOpts = {}) { + async watchApplicationSetList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applicationsets`, @@ -216,7 +256,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ArgoprojIoV1alpha1.toApplicationSet, MetaV1.toStatus)); } - async createApplicationSet(body: ArgoprojIoV1alpha1.ApplicationSet, opts: operations.PutOpts = {}) { + async createApplicationSet( + body: ArgoprojIoV1alpha1.ApplicationSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}applicationsets`, @@ -228,7 +271,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async deleteApplicationSetList(opts: operations.DeleteListOpts = {}) { + async deleteApplicationSetList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}applicationsets`, @@ -239,7 +284,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSetList(resp); } - async getApplicationSet(name: string, opts: operations.NoOpts = {}) { + async getApplicationSet( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applicationsets/${name}`, @@ -249,7 +297,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async deleteApplicationSet(name: string, opts: operations.DeleteOpts = {}) { + async deleteApplicationSet( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}applicationsets/${name}`, @@ -261,7 +312,11 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async replaceApplicationSet(name: string, body: ArgoprojIoV1alpha1.ApplicationSet, opts: operations.PutOpts = {}) { + async replaceApplicationSet( + name: string, + body: ArgoprojIoV1alpha1.ApplicationSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}applicationsets/${name}`, @@ -273,7 +328,12 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async patchApplicationSet(name: string, type: c.PatchType, body: ArgoprojIoV1alpha1.ApplicationSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchApplicationSet( + name: string, + type: c.PatchType, + body: ArgoprojIoV1alpha1.ApplicationSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}applicationsets/${name}`, @@ -286,7 +346,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async getApplicationSetStatus(name: string, opts: operations.NoOpts = {}) { + async getApplicationSetStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}applicationsets/${name}/status`, @@ -296,7 +359,11 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async replaceApplicationSetStatus(name: string, body: ArgoprojIoV1alpha1.ApplicationSet, opts: operations.PutOpts = {}) { + async replaceApplicationSetStatus( + name: string, + body: ArgoprojIoV1alpha1.ApplicationSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}applicationsets/${name}/status`, @@ -308,7 +375,12 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async patchApplicationSetStatus(name: string, type: c.PatchType, body: ArgoprojIoV1alpha1.ApplicationSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchApplicationSetStatus( + name: string, + type: c.PatchType, + body: ArgoprojIoV1alpha1.ApplicationSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}applicationsets/${name}/status`, @@ -321,7 +393,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toApplicationSet(resp); } - async getAppProjectList(opts: operations.GetListOpts = {}) { + async getAppProjectList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}appprojects`, @@ -332,7 +406,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toAppProjectList(resp); } - async watchAppProjectList(opts: operations.WatchListOpts = {}) { + async watchAppProjectList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}appprojects`, @@ -344,7 +420,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ArgoprojIoV1alpha1.toAppProject, MetaV1.toStatus)); } - async createAppProject(body: ArgoprojIoV1alpha1.AppProject, opts: operations.PutOpts = {}) { + async createAppProject( + body: ArgoprojIoV1alpha1.AppProject, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}appprojects`, @@ -356,7 +435,9 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toAppProject(resp); } - async deleteAppProjectList(opts: operations.DeleteListOpts = {}) { + async deleteAppProjectList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}appprojects`, @@ -367,7 +448,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toAppProjectList(resp); } - async getAppProject(name: string, opts: operations.NoOpts = {}) { + async getAppProject( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}appprojects/${name}`, @@ -377,7 +461,10 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toAppProject(resp); } - async deleteAppProject(name: string, opts: operations.DeleteOpts = {}) { + async deleteAppProject( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}appprojects/${name}`, @@ -389,7 +476,11 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toAppProject(resp); } - async replaceAppProject(name: string, body: ArgoprojIoV1alpha1.AppProject, opts: operations.PutOpts = {}) { + async replaceAppProject( + name: string, + body: ArgoprojIoV1alpha1.AppProject, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}appprojects/${name}`, @@ -401,7 +492,12 @@ export class ArgoprojIoV1alpha1NamespacedApi { return ArgoprojIoV1alpha1.toAppProject(resp); } - async patchAppProject(name: string, type: c.PatchType, body: ArgoprojIoV1alpha1.AppProject | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchAppProject( + name: string, + type: c.PatchType, + body: ArgoprojIoV1alpha1.AppProject | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}appprojects/${name}`, diff --git a/lib/argo-cd/argoproj.io@v1alpha1/structs.ts b/lib/argo-cd/argoproj.io@v1alpha1/structs.ts index b498d86..c6c4999 100644 --- a/lib/argo-cd/argoproj.io@v1alpha1/structs.ts +++ b/lib/argo-cd/argoproj.io@v1alpha1/structs.ts @@ -98,7 +98,7 @@ export function fromApplicationSource(input: ApplicationSource): c.JSONValue { return { ...input, }} -export function toApplicationSource_directory(input: c.JSONValue) { +function toApplicationSource_directory(input: c.JSONValue) { const obj = c.checkObj(input); return { exclude: c.readOpt(obj["exclude"], c.checkStr), @@ -106,7 +106,7 @@ export function toApplicationSource_directory(input: c.JSONValue) { jsonnet: c.readOpt(obj["jsonnet"], toApplicationSource_directory_jsonnet), recurse: c.readOpt(obj["recurse"], c.checkBool), }} -export function toApplicationSource_helm(input: c.JSONValue) { +function toApplicationSource_helm(input: c.JSONValue) { const obj = c.checkObj(input); return { fileParameters: c.readOpt(obj["fileParameters"], x => c.readList(x, toApplicationSource_helm_fileParameters)), @@ -120,7 +120,7 @@ export function toApplicationSource_helm(input: c.JSONValue) { valuesObject: c.readOpt(obj["valuesObject"], c.identity), version: c.readOpt(obj["version"], c.checkStr), }} -export function toApplicationSource_kustomize(input: c.JSONValue) { +function toApplicationSource_kustomize(input: c.JSONValue) { const obj = c.checkObj(input); return { commonAnnotations: c.readOpt(obj["commonAnnotations"], x => c.readMap(x, c.checkStr)), @@ -135,46 +135,46 @@ export function toApplicationSource_kustomize(input: c.JSONValue) { replicas: c.readOpt(obj["replicas"], x => c.readList(x, toApplicationSource_kustomize_replicas)), version: c.readOpt(obj["version"], c.checkStr), }} -export function toApplicationSource_plugin(input: c.JSONValue) { +function toApplicationSource_plugin(input: c.JSONValue) { const obj = c.checkObj(input); return { env: c.readOpt(obj["env"], x => c.readList(x, toApplicationSource_plugin_env)), name: c.readOpt(obj["name"], c.checkStr), parameters: c.readOpt(obj["parameters"], x => c.readList(x, toApplicationSource_plugin_parameters)), }} -export function toApplicationSource_directory_jsonnet(input: c.JSONValue) { +function toApplicationSource_directory_jsonnet(input: c.JSONValue) { const obj = c.checkObj(input); return { extVars: c.readOpt(obj["extVars"], x => c.readList(x, toApplicationSource_directory_jsonnet_extVars)), libs: c.readOpt(obj["libs"], x => c.readList(x, c.checkStr)), tlas: c.readOpt(obj["tlas"], x => c.readList(x, toApplicationSource_directory_jsonnet_tlas)), }} -export function toApplicationSource_helm_fileParameters(input: c.JSONValue) { +function toApplicationSource_helm_fileParameters(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), path: c.readOpt(obj["path"], c.checkStr), }} -export function toApplicationSource_helm_parameters(input: c.JSONValue) { +function toApplicationSource_helm_parameters(input: c.JSONValue) { const obj = c.checkObj(input); return { forceString: c.readOpt(obj["forceString"], c.checkBool), name: c.readOpt(obj["name"], c.checkStr), value: c.readOpt(obj["value"], c.checkStr), }} -export function toApplicationSource_kustomize_replicas(input: c.JSONValue) { +function toApplicationSource_kustomize_replicas(input: c.JSONValue) { const obj = c.checkObj(input); return { count: c.toIntOrString(obj["count"]), name: c.checkStr(obj["name"]), }} -export function toApplicationSource_plugin_env(input: c.JSONValue) { +function toApplicationSource_plugin_env(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), value: c.checkStr(obj["value"]), }} -export function toApplicationSource_plugin_parameters(input: c.JSONValue) { +function toApplicationSource_plugin_parameters(input: c.JSONValue) { const obj = c.checkObj(input); return { array: c.readOpt(obj["array"], x => c.readList(x, c.checkStr)), @@ -182,14 +182,14 @@ export function toApplicationSource_plugin_parameters(input: c.JSONValue) { name: c.readOpt(obj["name"], c.checkStr), string: c.readOpt(obj["string"], c.checkStr), }} -export function toApplicationSource_directory_jsonnet_extVars(input: c.JSONValue) { +function toApplicationSource_directory_jsonnet_extVars(input: c.JSONValue) { const obj = c.checkObj(input); return { code: c.readOpt(obj["code"], c.checkBool), name: c.checkStr(obj["name"]), value: c.checkStr(obj["value"]), }} -export function toApplicationSource_directory_jsonnet_tlas(input: c.JSONValue) { +function toApplicationSource_directory_jsonnet_tlas(input: c.JSONValue) { const obj = c.checkObj(input); return { code: c.readOpt(obj["code"], c.checkBool), @@ -498,7 +498,7 @@ export function fromApplication(input: Application): c.JSONValue { } : undefined, } : undefined, }} -export function toApplication_operation(input: c.JSONValue) { +function toApplication_operation(input: c.JSONValue) { const obj = c.checkObj(input); return { info: c.readOpt(obj["info"], x => c.readList(x, toApplication_operation_info)), @@ -506,7 +506,7 @@ export function toApplication_operation(input: c.JSONValue) { retry: c.readOpt(obj["retry"], toApplication_operation_retry), sync: c.readOpt(obj["sync"], toApplication_operation_sync), }} -export function toApplication_spec(input: c.JSONValue) { +function toApplication_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { destination: toApplication_spec_destination(obj["destination"]), @@ -518,7 +518,7 @@ export function toApplication_spec(input: c.JSONValue) { sources: c.readOpt(obj["sources"], x => c.readList(x, toApplicationSource)), syncPolicy: c.readOpt(obj["syncPolicy"], toApplication_spec_syncPolicy), }} -export function toApplication_status(input: c.JSONValue) { +function toApplication_status(input: c.JSONValue) { const obj = c.checkObj(input); return { conditions: c.readOpt(obj["conditions"], x => c.readList(x, toApplication_status_conditions)), @@ -535,25 +535,25 @@ export function toApplication_status(input: c.JSONValue) { summary: c.readOpt(obj["summary"], toApplication_status_summary), sync: c.readOpt(obj["sync"], toApplication_status_sync), }} -export function toApplication_operation_info(input: c.JSONValue) { +function toApplication_operation_info(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), value: c.checkStr(obj["value"]), }} -export function toApplication_operation_initiatedBy(input: c.JSONValue) { +function toApplication_operation_initiatedBy(input: c.JSONValue) { const obj = c.checkObj(input); return { automated: c.readOpt(obj["automated"], c.checkBool), username: c.readOpt(obj["username"], c.checkStr), }} -export function toApplication_operation_retry(input: c.JSONValue) { +function toApplication_operation_retry(input: c.JSONValue) { const obj = c.checkObj(input); return { backoff: c.readOpt(obj["backoff"], toApplication_operation_retry_backoff), limit: c.readOpt(obj["limit"], c.checkNum), }} -export function toApplication_operation_sync(input: c.JSONValue) { +function toApplication_operation_sync(input: c.JSONValue) { const obj = c.checkObj(input); return { dryRun: c.readOpt(obj["dryRun"], c.checkBool), @@ -567,14 +567,14 @@ export function toApplication_operation_sync(input: c.JSONValue) { syncOptions: c.readOpt(obj["syncOptions"], x => c.readList(x, c.checkStr)), syncStrategy: c.readOpt(obj["syncStrategy"], toApplication_operation_sync_syncStrategy), }} -export function toApplication_spec_destination(input: c.JSONValue) { +function toApplication_spec_destination(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), server: c.readOpt(obj["server"], c.checkStr), }} -export function toApplication_spec_ignoreDifferences(input: c.JSONValue) { +function toApplication_spec_ignoreDifferences(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -585,13 +585,13 @@ export function toApplication_spec_ignoreDifferences(input: c.JSONValue) { name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), }} -export function toApplication_spec_info(input: c.JSONValue) { +function toApplication_spec_info(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), value: c.checkStr(obj["value"]), }} -export function toApplication_spec_syncPolicy(input: c.JSONValue) { +function toApplication_spec_syncPolicy(input: c.JSONValue) { const obj = c.checkObj(input); return { automated: c.readOpt(obj["automated"], toApplication_spec_syncPolicy_automated), @@ -599,20 +599,20 @@ export function toApplication_spec_syncPolicy(input: c.JSONValue) { retry: c.readOpt(obj["retry"], toApplication_spec_syncPolicy_retry), syncOptions: c.readOpt(obj["syncOptions"], x => c.readList(x, c.checkStr)), }} -export function toApplication_status_conditions(input: c.JSONValue) { +function toApplication_status_conditions(input: c.JSONValue) { const obj = c.checkObj(input); return { lastTransitionTime: c.readOpt(obj["lastTransitionTime"], c.toTime), message: c.checkStr(obj["message"]), type: c.checkStr(obj["type"]), }} -export function toApplication_status_health(input: c.JSONValue) { +function toApplication_status_health(input: c.JSONValue) { const obj = c.checkObj(input); return { message: c.readOpt(obj["message"], c.checkStr), status: c.readOpt(obj["status"], c.checkStr), }} -export function toApplication_status_history(input: c.JSONValue) { +function toApplication_status_history(input: c.JSONValue) { const obj = c.checkObj(input); return { deployStartedAt: c.readOpt(obj["deployStartedAt"], c.toTime), @@ -623,7 +623,7 @@ export function toApplication_status_history(input: c.JSONValue) { source: c.readOpt(obj["source"], toApplicationSource), sources: c.readOpt(obj["sources"], x => c.readList(x, toApplicationSource)), }} -export function toApplication_status_operationState(input: c.JSONValue) { +function toApplication_status_operationState(input: c.JSONValue) { const obj = c.checkObj(input); return { finishedAt: c.readOpt(obj["finishedAt"], c.toTime), @@ -634,7 +634,7 @@ export function toApplication_status_operationState(input: c.JSONValue) { startedAt: c.toTime(obj["startedAt"]), syncResult: c.readOpt(obj["syncResult"], toApplication_status_operationState_syncResult), }} -export function toApplication_status_resources(input: c.JSONValue) { +function toApplication_status_resources(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -648,13 +648,13 @@ export function toApplication_status_resources(input: c.JSONValue) { syncWave: c.readOpt(obj["syncWave"], c.checkNum), version: c.readOpt(obj["version"], c.checkStr), }} -export function toApplication_status_summary(input: c.JSONValue) { +function toApplication_status_summary(input: c.JSONValue) { const obj = c.checkObj(input); return { externalURLs: c.readOpt(obj["externalURLs"], x => c.readList(x, c.checkStr)), images: c.readOpt(obj["images"], x => c.readList(x, c.checkStr)), }} -export function toApplication_status_sync(input: c.JSONValue) { +function toApplication_status_sync(input: c.JSONValue) { const obj = c.checkObj(input); return { comparedTo: c.readOpt(obj["comparedTo"], toApplication_status_sync_comparedTo), @@ -662,14 +662,14 @@ export function toApplication_status_sync(input: c.JSONValue) { revisions: c.readOpt(obj["revisions"], x => c.readList(x, c.checkStr)), status: c.checkStr(obj["status"]), }} -export function toApplication_operation_retry_backoff(input: c.JSONValue) { +function toApplication_operation_retry_backoff(input: c.JSONValue) { const obj = c.checkObj(input); return { duration: c.readOpt(obj["duration"], c.checkStr), factor: c.readOpt(obj["factor"], c.checkNum), maxDuration: c.readOpt(obj["maxDuration"], c.checkStr), }} -export function toApplication_operation_sync_resources(input: c.JSONValue) { +function toApplication_operation_sync_resources(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -677,32 +677,32 @@ export function toApplication_operation_sync_resources(input: c.JSONValue) { name: c.checkStr(obj["name"]), namespace: c.readOpt(obj["namespace"], c.checkStr), }} -export function toApplication_operation_sync_syncStrategy(input: c.JSONValue) { +function toApplication_operation_sync_syncStrategy(input: c.JSONValue) { const obj = c.checkObj(input); return { apply: c.readOpt(obj["apply"], toApplication_operation_sync_syncStrategy_apply), hook: c.readOpt(obj["hook"], toApplication_operation_sync_syncStrategy_hook), }} -export function toApplication_spec_syncPolicy_automated(input: c.JSONValue) { +function toApplication_spec_syncPolicy_automated(input: c.JSONValue) { const obj = c.checkObj(input); return { allowEmpty: c.readOpt(obj["allowEmpty"], c.checkBool), prune: c.readOpt(obj["prune"], c.checkBool), selfHeal: c.readOpt(obj["selfHeal"], c.checkBool), }} -export function toApplication_spec_syncPolicy_managedNamespaceMetadata(input: c.JSONValue) { +function toApplication_spec_syncPolicy_managedNamespaceMetadata(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), }} -export function toApplication_spec_syncPolicy_retry(input: c.JSONValue) { +function toApplication_spec_syncPolicy_retry(input: c.JSONValue) { const obj = c.checkObj(input); return { backoff: c.readOpt(obj["backoff"], toApplication_spec_syncPolicy_retry_backoff), limit: c.readOpt(obj["limit"], c.checkNum), }} -export function toApplication_status_operationState_operation(input: c.JSONValue) { +function toApplication_status_operationState_operation(input: c.JSONValue) { const obj = c.checkObj(input); return { info: c.readOpt(obj["info"], x => c.readList(x, toApplication_status_operationState_operation_info)), @@ -710,7 +710,7 @@ export function toApplication_status_operationState_operation(input: c.JSONValue retry: c.readOpt(obj["retry"], toApplication_status_operationState_operation_retry), sync: c.readOpt(obj["sync"], toApplication_status_operationState_operation_sync), }} -export function toApplication_status_operationState_syncResult(input: c.JSONValue) { +function toApplication_status_operationState_syncResult(input: c.JSONValue) { const obj = c.checkObj(input); return { managedNamespaceMetadata: c.readOpt(obj["managedNamespaceMetadata"], toApplication_status_operationState_syncResult_managedNamespaceMetadata), @@ -720,13 +720,13 @@ export function toApplication_status_operationState_syncResult(input: c.JSONValu source: c.readOpt(obj["source"], toApplicationSource), sources: c.readOpt(obj["sources"], x => c.readList(x, toApplicationSource)), }} -export function toApplication_status_resources_health(input: c.JSONValue) { +function toApplication_status_resources_health(input: c.JSONValue) { const obj = c.checkObj(input); return { message: c.readOpt(obj["message"], c.checkStr), status: c.readOpt(obj["status"], c.checkStr), }} -export function toApplication_status_sync_comparedTo(input: c.JSONValue) { +function toApplication_status_sync_comparedTo(input: c.JSONValue) { const obj = c.checkObj(input); return { destination: toApplication_status_sync_comparedTo_destination(obj["destination"]), @@ -734,42 +734,42 @@ export function toApplication_status_sync_comparedTo(input: c.JSONValue) { source: c.readOpt(obj["source"], toApplicationSource), sources: c.readOpt(obj["sources"], x => c.readList(x, toApplicationSource)), }} -export function toApplication_operation_sync_syncStrategy_apply(input: c.JSONValue) { +function toApplication_operation_sync_syncStrategy_apply(input: c.JSONValue) { const obj = c.checkObj(input); return { force: c.readOpt(obj["force"], c.checkBool), }} -export function toApplication_operation_sync_syncStrategy_hook(input: c.JSONValue) { +function toApplication_operation_sync_syncStrategy_hook(input: c.JSONValue) { const obj = c.checkObj(input); return { force: c.readOpt(obj["force"], c.checkBool), }} -export function toApplication_spec_syncPolicy_retry_backoff(input: c.JSONValue) { +function toApplication_spec_syncPolicy_retry_backoff(input: c.JSONValue) { const obj = c.checkObj(input); return { duration: c.readOpt(obj["duration"], c.checkStr), factor: c.readOpt(obj["factor"], c.checkNum), maxDuration: c.readOpt(obj["maxDuration"], c.checkStr), }} -export function toApplication_status_operationState_operation_info(input: c.JSONValue) { +function toApplication_status_operationState_operation_info(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), value: c.checkStr(obj["value"]), }} -export function toApplication_status_operationState_operation_initiatedBy(input: c.JSONValue) { +function toApplication_status_operationState_operation_initiatedBy(input: c.JSONValue) { const obj = c.checkObj(input); return { automated: c.readOpt(obj["automated"], c.checkBool), username: c.readOpt(obj["username"], c.checkStr), }} -export function toApplication_status_operationState_operation_retry(input: c.JSONValue) { +function toApplication_status_operationState_operation_retry(input: c.JSONValue) { const obj = c.checkObj(input); return { backoff: c.readOpt(obj["backoff"], toApplication_status_operationState_operation_retry_backoff), limit: c.readOpt(obj["limit"], c.checkNum), }} -export function toApplication_status_operationState_operation_sync(input: c.JSONValue) { +function toApplication_status_operationState_operation_sync(input: c.JSONValue) { const obj = c.checkObj(input); return { dryRun: c.readOpt(obj["dryRun"], c.checkBool), @@ -783,13 +783,13 @@ export function toApplication_status_operationState_operation_sync(input: c.JSON syncOptions: c.readOpt(obj["syncOptions"], x => c.readList(x, c.checkStr)), syncStrategy: c.readOpt(obj["syncStrategy"], toApplication_status_operationState_operation_sync_syncStrategy), }} -export function toApplication_status_operationState_syncResult_managedNamespaceMetadata(input: c.JSONValue) { +function toApplication_status_operationState_syncResult_managedNamespaceMetadata(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), }} -export function toApplication_status_operationState_syncResult_resources(input: c.JSONValue) { +function toApplication_status_operationState_syncResult_resources(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.checkStr(obj["group"]), @@ -803,14 +803,14 @@ export function toApplication_status_operationState_syncResult_resources(input: syncPhase: c.readOpt(obj["syncPhase"], c.checkStr), version: c.checkStr(obj["version"]), }} -export function toApplication_status_sync_comparedTo_destination(input: c.JSONValue) { +function toApplication_status_sync_comparedTo_destination(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), server: c.readOpt(obj["server"], c.checkStr), }} -export function toApplication_status_sync_comparedTo_ignoreDifferences(input: c.JSONValue) { +function toApplication_status_sync_comparedTo_ignoreDifferences(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -821,14 +821,14 @@ export function toApplication_status_sync_comparedTo_ignoreDifferences(input: c. name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), }} -export function toApplication_status_operationState_operation_retry_backoff(input: c.JSONValue) { +function toApplication_status_operationState_operation_retry_backoff(input: c.JSONValue) { const obj = c.checkObj(input); return { duration: c.readOpt(obj["duration"], c.checkStr), factor: c.readOpt(obj["factor"], c.checkNum), maxDuration: c.readOpt(obj["maxDuration"], c.checkStr), }} -export function toApplication_status_operationState_operation_sync_resources(input: c.JSONValue) { +function toApplication_status_operationState_operation_sync_resources(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -836,18 +836,18 @@ export function toApplication_status_operationState_operation_sync_resources(inp name: c.checkStr(obj["name"]), namespace: c.readOpt(obj["namespace"], c.checkStr), }} -export function toApplication_status_operationState_operation_sync_syncStrategy(input: c.JSONValue) { +function toApplication_status_operationState_operation_sync_syncStrategy(input: c.JSONValue) { const obj = c.checkObj(input); return { apply: c.readOpt(obj["apply"], toApplication_status_operationState_operation_sync_syncStrategy_apply), hook: c.readOpt(obj["hook"], toApplication_status_operationState_operation_sync_syncStrategy_hook), }} -export function toApplication_status_operationState_operation_sync_syncStrategy_apply(input: c.JSONValue) { +function toApplication_status_operationState_operation_sync_syncStrategy_apply(input: c.JSONValue) { const obj = c.checkObj(input); return { force: c.readOpt(obj["force"], c.checkBool), }} -export function toApplication_status_operationState_operation_sync_syncStrategy_hook(input: c.JSONValue) { +function toApplication_status_operationState_operation_sync_syncStrategy_hook(input: c.JSONValue) { const obj = c.checkObj(input); return { force: c.readOpt(obj["force"], c.checkBool), @@ -1145,7 +1145,7 @@ export function fromApplicationSetGenerator(input: ApplicationSetGenerator): c.J } : undefined, selector: input.selector != null ? MetaV1.fromLabelSelector(input.selector) : undefined, }} -export function toApplicationSetGenerator_clusterDecisionResource(input: c.JSONValue) { +function toApplicationSetGenerator_clusterDecisionResource(input: c.JSONValue) { const obj = c.checkObj(input); return { configMapRef: c.checkStr(obj["configMapRef"]), @@ -1155,14 +1155,14 @@ export function toApplicationSetGenerator_clusterDecisionResource(input: c.JSONV template: c.readOpt(obj["template"], toApplicationTemplate), values: c.readOpt(obj["values"], x => c.readMap(x, c.checkStr)), }} -export function toApplicationSetGenerator_clusters(input: c.JSONValue) { +function toApplicationSetGenerator_clusters(input: c.JSONValue) { const obj = c.checkObj(input); return { selector: c.readOpt(obj["selector"], MetaV1.toLabelSelector), template: c.readOpt(obj["template"], toApplicationTemplate), values: c.readOpt(obj["values"], x => c.readMap(x, c.checkStr)), }} -export function toApplicationSetGenerator_git(input: c.JSONValue) { +function toApplicationSetGenerator_git(input: c.JSONValue) { const obj = c.checkObj(input); return { directories: c.readOpt(obj["directories"], x => c.readList(x, toApplicationSetGenerator_git_directories)), @@ -1174,27 +1174,27 @@ export function toApplicationSetGenerator_git(input: c.JSONValue) { template: c.readOpt(obj["template"], toApplicationTemplate), values: c.readOpt(obj["values"], x => c.readMap(x, c.checkStr)), }} -export function toApplicationSetGenerator_list(input: c.JSONValue) { +function toApplicationSetGenerator_list(input: c.JSONValue) { const obj = c.checkObj(input); return { elements: c.readList(obj["elements"], c.identity), elementsYaml: c.readOpt(obj["elementsYaml"], c.checkStr), template: c.readOpt(obj["template"], toApplicationTemplate), }} -export function toApplicationSetGenerator_matrix(input: c.JSONValue) { +function toApplicationSetGenerator_matrix(input: c.JSONValue) { const obj = c.checkObj(input); return { generators: c.readList(obj["generators"], toApplicationSetGenerator), template: c.readOpt(obj["template"], toApplicationTemplate), }} -export function toApplicationSetGenerator_merge(input: c.JSONValue) { +function toApplicationSetGenerator_merge(input: c.JSONValue) { const obj = c.checkObj(input); return { generators: c.readList(obj["generators"], toApplicationSetGenerator), mergeKeys: c.readList(obj["mergeKeys"], c.checkStr), template: c.readOpt(obj["template"], toApplicationTemplate), }} -export function toApplicationSetGenerator_plugin(input: c.JSONValue) { +function toApplicationSetGenerator_plugin(input: c.JSONValue) { const obj = c.checkObj(input); return { configMapRef: toApplicationSetGenerator_plugin_configMapRef(obj["configMapRef"]), @@ -1203,7 +1203,7 @@ export function toApplicationSetGenerator_plugin(input: c.JSONValue) { template: c.readOpt(obj["template"], toApplicationTemplate), values: c.readOpt(obj["values"], x => c.readMap(x, c.checkStr)), }} -export function toApplicationSetGenerator_pullRequest(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest(input: c.JSONValue) { const obj = c.checkObj(input); return { azuredevops: c.readOpt(obj["azuredevops"], toApplicationSetGenerator_pullRequest_azuredevops), @@ -1216,7 +1216,7 @@ export function toApplicationSetGenerator_pullRequest(input: c.JSONValue) { requeueAfterSeconds: c.readOpt(obj["requeueAfterSeconds"], c.checkNum), template: c.readOpt(obj["template"], toApplicationTemplate), }} -export function toApplicationSetGenerator_scmProvider(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider(input: c.JSONValue) { const obj = c.checkObj(input); return { awsCodeCommit: c.readOpt(obj["awsCodeCommit"], toApplicationSetGenerator_scmProvider_awsCodeCommit), @@ -1232,28 +1232,28 @@ export function toApplicationSetGenerator_scmProvider(input: c.JSONValue) { template: c.readOpt(obj["template"], toApplicationTemplate), values: c.readOpt(obj["values"], x => c.readMap(x, c.checkStr)), }} -export function toApplicationSetGenerator_git_directories(input: c.JSONValue) { +function toApplicationSetGenerator_git_directories(input: c.JSONValue) { const obj = c.checkObj(input); return { exclude: c.readOpt(obj["exclude"], c.checkBool), path: c.checkStr(obj["path"]), }} -export function toApplicationSetGenerator_git_files(input: c.JSONValue) { +function toApplicationSetGenerator_git_files(input: c.JSONValue) { const obj = c.checkObj(input); return { path: c.checkStr(obj["path"]), }} -export function toApplicationSetGenerator_plugin_configMapRef(input: c.JSONValue) { +function toApplicationSetGenerator_plugin_configMapRef(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), }} -export function toApplicationSetGenerator_plugin_input(input: c.JSONValue) { +function toApplicationSetGenerator_plugin_input(input: c.JSONValue) { const obj = c.checkObj(input); return { parameters: c.readOpt(obj["parameters"], x => c.readMap(x, c.identity)), }} -export function toApplicationSetGenerator_pullRequest_azuredevops(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_azuredevops(input: c.JSONValue) { const obj = c.checkObj(input); return { api: c.readOpt(obj["api"], c.checkStr), @@ -1263,7 +1263,7 @@ export function toApplicationSetGenerator_pullRequest_azuredevops(input: c.JSONV repo: c.checkStr(obj["repo"]), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_pullRequest_azuredevops_tokenRef), }} -export function toApplicationSetGenerator_pullRequest_bitbucket(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucket(input: c.JSONValue) { const obj = c.checkObj(input); return { api: c.readOpt(obj["api"], c.checkStr), @@ -1272,7 +1272,7 @@ export function toApplicationSetGenerator_pullRequest_bitbucket(input: c.JSONVal owner: c.checkStr(obj["owner"]), repo: c.checkStr(obj["repo"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucketServer(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucketServer(input: c.JSONValue) { const obj = c.checkObj(input); return { api: c.checkStr(obj["api"]), @@ -1280,13 +1280,13 @@ export function toApplicationSetGenerator_pullRequest_bitbucketServer(input: c.J project: c.checkStr(obj["project"]), repo: c.checkStr(obj["repo"]), }} -export function toApplicationSetGenerator_pullRequest_filters(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_filters(input: c.JSONValue) { const obj = c.checkObj(input); return { branchMatch: c.readOpt(obj["branchMatch"], c.checkStr), targetBranchMatch: c.readOpt(obj["targetBranchMatch"], c.checkStr), }} -export function toApplicationSetGenerator_pullRequest_gitea(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_gitea(input: c.JSONValue) { const obj = c.checkObj(input); return { api: c.checkStr(obj["api"]), @@ -1295,7 +1295,7 @@ export function toApplicationSetGenerator_pullRequest_gitea(input: c.JSONValue) repo: c.checkStr(obj["repo"]), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_pullRequest_gitea_tokenRef), }} -export function toApplicationSetGenerator_pullRequest_github(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_github(input: c.JSONValue) { const obj = c.checkObj(input); return { api: c.readOpt(obj["api"], c.checkStr), @@ -1305,7 +1305,7 @@ export function toApplicationSetGenerator_pullRequest_github(input: c.JSONValue) repo: c.checkStr(obj["repo"]), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_pullRequest_github_tokenRef), }} -export function toApplicationSetGenerator_pullRequest_gitlab(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_gitlab(input: c.JSONValue) { const obj = c.checkObj(input); return { api: c.readOpt(obj["api"], c.checkStr), @@ -1315,7 +1315,7 @@ export function toApplicationSetGenerator_pullRequest_gitlab(input: c.JSONValue) pullRequestState: c.readOpt(obj["pullRequestState"], c.checkStr), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_pullRequest_gitlab_tokenRef), }} -export function toApplicationSetGenerator_scmProvider_awsCodeCommit(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_awsCodeCommit(input: c.JSONValue) { const obj = c.checkObj(input); return { allBranches: c.readOpt(obj["allBranches"], c.checkBool), @@ -1323,7 +1323,7 @@ export function toApplicationSetGenerator_scmProvider_awsCodeCommit(input: c.JSO role: c.readOpt(obj["role"], c.checkStr), tagFilters: c.readOpt(obj["tagFilters"], x => c.readList(x, toApplicationSetGenerator_scmProvider_awsCodeCommit_tagFilters)), }} -export function toApplicationSetGenerator_scmProvider_azureDevOps(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_azureDevOps(input: c.JSONValue) { const obj = c.checkObj(input); return { accessTokenRef: toApplicationSetGenerator_scmProvider_azureDevOps_accessTokenRef(obj["accessTokenRef"]), @@ -1332,7 +1332,7 @@ export function toApplicationSetGenerator_scmProvider_azureDevOps(input: c.JSONV organization: c.checkStr(obj["organization"]), teamProject: c.checkStr(obj["teamProject"]), }} -export function toApplicationSetGenerator_scmProvider_bitbucket(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_bitbucket(input: c.JSONValue) { const obj = c.checkObj(input); return { allBranches: c.readOpt(obj["allBranches"], c.checkBool), @@ -1340,7 +1340,7 @@ export function toApplicationSetGenerator_scmProvider_bitbucket(input: c.JSONVal owner: c.checkStr(obj["owner"]), user: c.checkStr(obj["user"]), }} -export function toApplicationSetGenerator_scmProvider_bitbucketServer(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_bitbucketServer(input: c.JSONValue) { const obj = c.checkObj(input); return { allBranches: c.readOpt(obj["allBranches"], c.checkBool), @@ -1348,7 +1348,7 @@ export function toApplicationSetGenerator_scmProvider_bitbucketServer(input: c.J basicAuth: c.readOpt(obj["basicAuth"], toApplicationSetGenerator_scmProvider_bitbucketServer_basicAuth), project: c.checkStr(obj["project"]), }} -export function toApplicationSetGenerator_scmProvider_filters(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_filters(input: c.JSONValue) { const obj = c.checkObj(input); return { branchMatch: c.readOpt(obj["branchMatch"], c.checkStr), @@ -1357,7 +1357,7 @@ export function toApplicationSetGenerator_scmProvider_filters(input: c.JSONValue pathsExist: c.readOpt(obj["pathsExist"], x => c.readList(x, c.checkStr)), repositoryMatch: c.readOpt(obj["repositoryMatch"], c.checkStr), }} -export function toApplicationSetGenerator_scmProvider_gitea(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_gitea(input: c.JSONValue) { const obj = c.checkObj(input); return { allBranches: c.readOpt(obj["allBranches"], c.checkBool), @@ -1366,7 +1366,7 @@ export function toApplicationSetGenerator_scmProvider_gitea(input: c.JSONValue) owner: c.checkStr(obj["owner"]), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_scmProvider_gitea_tokenRef), }} -export function toApplicationSetGenerator_scmProvider_github(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_github(input: c.JSONValue) { const obj = c.checkObj(input); return { allBranches: c.readOpt(obj["allBranches"], c.checkBool), @@ -1375,7 +1375,7 @@ export function toApplicationSetGenerator_scmProvider_github(input: c.JSONValue) organization: c.checkStr(obj["organization"]), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_scmProvider_github_tokenRef), }} -export function toApplicationSetGenerator_scmProvider_gitlab(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_gitlab(input: c.JSONValue) { const obj = c.checkObj(input); return { allBranches: c.readOpt(obj["allBranches"], c.checkBool), @@ -1385,108 +1385,108 @@ export function toApplicationSetGenerator_scmProvider_gitlab(input: c.JSONValue) insecure: c.readOpt(obj["insecure"], c.checkBool), tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_scmProvider_gitlab_tokenRef), }} -export function toApplicationSetGenerator_pullRequest_azuredevops_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_azuredevops_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucket_basicAuth(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucket_basicAuth(input: c.JSONValue) { const obj = c.checkObj(input); return { passwordRef: toApplicationSetGenerator_pullRequest_bitbucket_basicAuth_passwordRef(obj["passwordRef"]), username: c.checkStr(obj["username"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucket_bearerToken(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucket_bearerToken(input: c.JSONValue) { const obj = c.checkObj(input); return { tokenRef: toApplicationSetGenerator_pullRequest_bitbucket_bearerToken_tokenRef(obj["tokenRef"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucketServer_basicAuth(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucketServer_basicAuth(input: c.JSONValue) { const obj = c.checkObj(input); return { passwordRef: toApplicationSetGenerator_pullRequest_bitbucketServer_basicAuth_passwordRef(obj["passwordRef"]), username: c.checkStr(obj["username"]), }} -export function toApplicationSetGenerator_pullRequest_gitea_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_gitea_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_pullRequest_github_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_github_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_pullRequest_gitlab_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_gitlab_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_scmProvider_awsCodeCommit_tagFilters(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_awsCodeCommit_tagFilters(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), value: c.readOpt(obj["value"], c.checkStr), }} -export function toApplicationSetGenerator_scmProvider_azureDevOps_accessTokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_azureDevOps_accessTokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_scmProvider_bitbucket_appPasswordRef(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_bitbucket_appPasswordRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_scmProvider_bitbucketServer_basicAuth(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_bitbucketServer_basicAuth(input: c.JSONValue) { const obj = c.checkObj(input); return { passwordRef: toApplicationSetGenerator_scmProvider_bitbucketServer_basicAuth_passwordRef(obj["passwordRef"]), username: c.checkStr(obj["username"]), }} -export function toApplicationSetGenerator_scmProvider_gitea_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_gitea_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_scmProvider_github_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_github_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_scmProvider_gitlab_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_gitlab_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucket_basicAuth_passwordRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucket_basicAuth_passwordRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucket_bearerToken_tokenRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucket_bearerToken_tokenRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_pullRequest_bitbucketServer_basicAuth_passwordRef(input: c.JSONValue) { +function toApplicationSetGenerator_pullRequest_bitbucketServer_basicAuth_passwordRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), secretName: c.checkStr(obj["secretName"]), }} -export function toApplicationSetGenerator_scmProvider_bitbucketServer_basicAuth_passwordRef(input: c.JSONValue) { +function toApplicationSetGenerator_scmProvider_bitbucketServer_basicAuth_passwordRef(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.checkStr(obj["key"]), @@ -1561,7 +1561,7 @@ export function fromApplicationTemplate(input: ApplicationTemplate): c.JSONValue sources: input.spec.sources?.map(fromApplicationSource), } : undefined, }} -export function toApplicationTemplate_metadata(input: c.JSONValue) { +function toApplicationTemplate_metadata(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), @@ -1570,7 +1570,7 @@ export function toApplicationTemplate_metadata(input: c.JSONValue) { name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), }} -export function toApplicationTemplate_spec(input: c.JSONValue) { +function toApplicationTemplate_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { destination: toApplicationTemplate_spec_destination(obj["destination"]), @@ -1582,14 +1582,14 @@ export function toApplicationTemplate_spec(input: c.JSONValue) { sources: c.readOpt(obj["sources"], x => c.readList(x, toApplicationSource)), syncPolicy: c.readOpt(obj["syncPolicy"], toApplicationTemplate_spec_syncPolicy), }} -export function toApplicationTemplate_spec_destination(input: c.JSONValue) { +function toApplicationTemplate_spec_destination(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), server: c.readOpt(obj["server"], c.checkStr), }} -export function toApplicationTemplate_spec_ignoreDifferences(input: c.JSONValue) { +function toApplicationTemplate_spec_ignoreDifferences(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -1600,13 +1600,13 @@ export function toApplicationTemplate_spec_ignoreDifferences(input: c.JSONValue) name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), }} -export function toApplicationTemplate_spec_info(input: c.JSONValue) { +function toApplicationTemplate_spec_info(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), value: c.checkStr(obj["value"]), }} -export function toApplicationTemplate_spec_syncPolicy(input: c.JSONValue) { +function toApplicationTemplate_spec_syncPolicy(input: c.JSONValue) { const obj = c.checkObj(input); return { automated: c.readOpt(obj["automated"], toApplicationTemplate_spec_syncPolicy_automated), @@ -1614,26 +1614,26 @@ export function toApplicationTemplate_spec_syncPolicy(input: c.JSONValue) { retry: c.readOpt(obj["retry"], toApplicationTemplate_spec_syncPolicy_retry), syncOptions: c.readOpt(obj["syncOptions"], x => c.readList(x, c.checkStr)), }} -export function toApplicationTemplate_spec_syncPolicy_automated(input: c.JSONValue) { +function toApplicationTemplate_spec_syncPolicy_automated(input: c.JSONValue) { const obj = c.checkObj(input); return { allowEmpty: c.readOpt(obj["allowEmpty"], c.checkBool), prune: c.readOpt(obj["prune"], c.checkBool), selfHeal: c.readOpt(obj["selfHeal"], c.checkBool), }} -export function toApplicationTemplate_spec_syncPolicy_managedNamespaceMetadata(input: c.JSONValue) { +function toApplicationTemplate_spec_syncPolicy_managedNamespaceMetadata(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), }} -export function toApplicationTemplate_spec_syncPolicy_retry(input: c.JSONValue) { +function toApplicationTemplate_spec_syncPolicy_retry(input: c.JSONValue) { const obj = c.checkObj(input); return { backoff: c.readOpt(obj["backoff"], toApplicationTemplate_spec_syncPolicy_retry_backoff), limit: c.readOpt(obj["limit"], c.checkNum), }} -export function toApplicationTemplate_spec_syncPolicy_retry_backoff(input: c.JSONValue) { +function toApplicationTemplate_spec_syncPolicy_retry_backoff(input: c.JSONValue) { const obj = c.checkObj(input); return { duration: c.readOpt(obj["duration"], c.checkStr), @@ -1719,7 +1719,7 @@ export function fromApplicationSet(input: ApplicationSet): c.JSONValue { })), } : undefined, }} -export function toApplicationSet_spec(input: c.JSONValue) { +function toApplicationSet_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { applyNestedSelectors: c.readOpt(obj["applyNestedSelectors"], c.checkBool), @@ -1731,30 +1731,30 @@ export function toApplicationSet_spec(input: c.JSONValue) { syncPolicy: c.readOpt(obj["syncPolicy"], toApplicationSet_spec_syncPolicy), template: toApplicationTemplate(obj["template"]), }} -export function toApplicationSet_status(input: c.JSONValue) { +function toApplicationSet_status(input: c.JSONValue) { const obj = c.checkObj(input); return { applicationStatus: c.readOpt(obj["applicationStatus"], x => c.readList(x, toApplicationSet_status_applicationStatus)), conditions: c.readOpt(obj["conditions"], x => c.readList(x, toApplicationSet_status_conditions)), }} -export function toApplicationSet_spec_preservedFields(input: c.JSONValue) { +function toApplicationSet_spec_preservedFields(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readList(x, c.checkStr)), }} -export function toApplicationSet_spec_strategy(input: c.JSONValue) { +function toApplicationSet_spec_strategy(input: c.JSONValue) { const obj = c.checkObj(input); return { rollingSync: c.readOpt(obj["rollingSync"], toApplicationSet_spec_strategy_rollingSync), type: c.readOpt(obj["type"], c.checkStr), }} -export function toApplicationSet_spec_syncPolicy(input: c.JSONValue) { +function toApplicationSet_spec_syncPolicy(input: c.JSONValue) { const obj = c.checkObj(input); return { applicationsSync: c.readOpt(obj["applicationsSync"], (x => c.readEnum<"create-only" | "create-update" | "create-delete" | "sync" | c.UnexpectedEnumValue>(x))), preserveResourcesOnDeletion: c.readOpt(obj["preserveResourcesOnDeletion"], c.checkBool), }} -export function toApplicationSet_status_applicationStatus(input: c.JSONValue) { +function toApplicationSet_status_applicationStatus(input: c.JSONValue) { const obj = c.checkObj(input); return { application: c.checkStr(obj["application"]), @@ -1763,7 +1763,7 @@ export function toApplicationSet_status_applicationStatus(input: c.JSONValue) { status: c.checkStr(obj["status"]), step: c.checkStr(obj["step"]), }} -export function toApplicationSet_status_conditions(input: c.JSONValue) { +function toApplicationSet_status_conditions(input: c.JSONValue) { const obj = c.checkObj(input); return { lastTransitionTime: c.readOpt(obj["lastTransitionTime"], c.toTime), @@ -1772,18 +1772,18 @@ export function toApplicationSet_status_conditions(input: c.JSONValue) { status: c.checkStr(obj["status"]), type: c.checkStr(obj["type"]), }} -export function toApplicationSet_spec_strategy_rollingSync(input: c.JSONValue) { +function toApplicationSet_spec_strategy_rollingSync(input: c.JSONValue) { const obj = c.checkObj(input); return { steps: c.readOpt(obj["steps"], x => c.readList(x, toApplicationSet_spec_strategy_rollingSync_steps)), }} -export function toApplicationSet_spec_strategy_rollingSync_steps(input: c.JSONValue) { +function toApplicationSet_spec_strategy_rollingSync_steps(input: c.JSONValue) { const obj = c.checkObj(input); return { matchExpressions: c.readOpt(obj["matchExpressions"], x => c.readList(x, toApplicationSet_spec_strategy_rollingSync_steps_matchExpressions)), maxUpdate: c.readOpt(obj["maxUpdate"], c.toIntOrString), }} -export function toApplicationSet_spec_strategy_rollingSync_steps_matchExpressions(input: c.JSONValue) { +function toApplicationSet_spec_strategy_rollingSync_steps_matchExpressions(input: c.JSONValue) { const obj = c.checkObj(input); return { key: c.readOpt(obj["key"], c.checkStr), @@ -1891,7 +1891,7 @@ export function fromAppProject(input: AppProject): c.JSONValue { ...input, metadata: input.metadata != null ? MetaV1.fromObjectMeta(input.metadata) : undefined, }} -export function toAppProject_spec(input: c.JSONValue) { +function toAppProject_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { clusterResourceBlacklist: c.readOpt(obj["clusterResourceBlacklist"], x => c.readList(x, toAppProject_spec_clusterResourceBlacklist)), @@ -1908,49 +1908,49 @@ export function toAppProject_spec(input: c.JSONValue) { sourceRepos: c.readOpt(obj["sourceRepos"], x => c.readList(x, c.checkStr)), syncWindows: c.readOpt(obj["syncWindows"], x => c.readList(x, toAppProject_spec_syncWindows)), }} -export function toAppProject_status(input: c.JSONValue) { +function toAppProject_status(input: c.JSONValue) { const obj = c.checkObj(input); return { jwtTokensByRole: c.readOpt(obj["jwtTokensByRole"], x => c.readMap(x, toAppProject_status_jwtTokensByRole)), }} -export function toAppProject_spec_clusterResourceBlacklist(input: c.JSONValue) { +function toAppProject_spec_clusterResourceBlacklist(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.checkStr(obj["group"]), kind: c.checkStr(obj["kind"]), }} -export function toAppProject_spec_clusterResourceWhitelist(input: c.JSONValue) { +function toAppProject_spec_clusterResourceWhitelist(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.checkStr(obj["group"]), kind: c.checkStr(obj["kind"]), }} -export function toAppProject_spec_destinations(input: c.JSONValue) { +function toAppProject_spec_destinations(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), namespace: c.readOpt(obj["namespace"], c.checkStr), server: c.readOpt(obj["server"], c.checkStr), }} -export function toAppProject_spec_namespaceResourceBlacklist(input: c.JSONValue) { +function toAppProject_spec_namespaceResourceBlacklist(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.checkStr(obj["group"]), kind: c.checkStr(obj["kind"]), }} -export function toAppProject_spec_namespaceResourceWhitelist(input: c.JSONValue) { +function toAppProject_spec_namespaceResourceWhitelist(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.checkStr(obj["group"]), kind: c.checkStr(obj["kind"]), }} -export function toAppProject_spec_orphanedResources(input: c.JSONValue) { +function toAppProject_spec_orphanedResources(input: c.JSONValue) { const obj = c.checkObj(input); return { ignore: c.readOpt(obj["ignore"], x => c.readList(x, toAppProject_spec_orphanedResources_ignore)), warn: c.readOpt(obj["warn"], c.checkBool), }} -export function toAppProject_spec_roles(input: c.JSONValue) { +function toAppProject_spec_roles(input: c.JSONValue) { const obj = c.checkObj(input); return { description: c.readOpt(obj["description"], c.checkStr), @@ -1959,12 +1959,12 @@ export function toAppProject_spec_roles(input: c.JSONValue) { name: c.checkStr(obj["name"]), policies: c.readOpt(obj["policies"], x => c.readList(x, c.checkStr)), }} -export function toAppProject_spec_signatureKeys(input: c.JSONValue) { +function toAppProject_spec_signatureKeys(input: c.JSONValue) { const obj = c.checkObj(input); return { keyID: c.checkStr(obj["keyID"]), }} -export function toAppProject_spec_syncWindows(input: c.JSONValue) { +function toAppProject_spec_syncWindows(input: c.JSONValue) { const obj = c.checkObj(input); return { applications: c.readOpt(obj["applications"], x => c.readList(x, c.checkStr)), @@ -1976,26 +1976,26 @@ export function toAppProject_spec_syncWindows(input: c.JSONValue) { schedule: c.readOpt(obj["schedule"], c.checkStr), timeZone: c.readOpt(obj["timeZone"], c.checkStr), }} -export function toAppProject_status_jwtTokensByRole(input: c.JSONValue) { +function toAppProject_status_jwtTokensByRole(input: c.JSONValue) { const obj = c.checkObj(input); return { items: c.readOpt(obj["items"], x => c.readList(x, toAppProject_status_jwtTokensByRole_items)), }} -export function toAppProject_spec_orphanedResources_ignore(input: c.JSONValue) { +function toAppProject_spec_orphanedResources_ignore(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), kind: c.readOpt(obj["kind"], c.checkStr), name: c.readOpt(obj["name"], c.checkStr), }} -export function toAppProject_spec_roles_jwtTokens(input: c.JSONValue) { +function toAppProject_spec_roles_jwtTokens(input: c.JSONValue) { const obj = c.checkObj(input); return { exp: c.readOpt(obj["exp"], c.checkNum), iat: c.checkNum(obj["iat"]), id: c.readOpt(obj["id"], c.checkStr), }} -export function toAppProject_status_jwtTokensByRole_items(input: c.JSONValue) { +function toAppProject_status_jwtTokensByRole_items(input: c.JSONValue) { const obj = c.checkObj(input); return { exp: c.readOpt(obj["exp"], c.checkNum), diff --git a/lib/builtin/admissionregistration.k8s.io@v1/mod.ts b/lib/builtin/admissionregistration.k8s.io@v1/mod.ts index b1e795e..00d2e2d 100644 --- a/lib/builtin/admissionregistration.k8s.io@v1/mod.ts +++ b/lib/builtin/admissionregistration.k8s.io@v1/mod.ts @@ -13,7 +13,9 @@ export class AdmissionregistrationV1Api { this.#client = client; } - async getMutatingWebhookConfigurationList(opts: operations.GetListOpts = {}) { + async getMutatingWebhookConfigurationList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}mutatingwebhookconfigurations`, @@ -24,7 +26,9 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfigurationList(resp); } - async watchMutatingWebhookConfigurationList(opts: operations.WatchListOpts = {}) { + async watchMutatingWebhookConfigurationList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}mutatingwebhookconfigurations`, @@ -36,7 +40,10 @@ export class AdmissionregistrationV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AdmissionregistrationV1.toMutatingWebhookConfiguration, MetaV1.toStatus)); } - async createMutatingWebhookConfiguration(body: AdmissionregistrationV1.MutatingWebhookConfiguration, opts: operations.PutOpts = {}) { + async createMutatingWebhookConfiguration( + body: AdmissionregistrationV1.MutatingWebhookConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}mutatingwebhookconfigurations`, @@ -48,7 +55,9 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfiguration(resp); } - async deleteMutatingWebhookConfigurationList(opts: operations.DeleteListOpts = {}) { + async deleteMutatingWebhookConfigurationList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}mutatingwebhookconfigurations`, @@ -59,7 +68,10 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfigurationList(resp); } - async getMutatingWebhookConfiguration(name: string, opts: operations.NoOpts = {}) { + async getMutatingWebhookConfiguration( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}mutatingwebhookconfigurations/${name}`, @@ -69,7 +81,10 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfiguration(resp); } - async deleteMutatingWebhookConfiguration(name: string, opts: operations.DeleteOpts = {}) { + async deleteMutatingWebhookConfiguration( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}mutatingwebhookconfigurations/${name}`, @@ -81,7 +96,11 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfiguration(resp); } - async replaceMutatingWebhookConfiguration(name: string, body: AdmissionregistrationV1.MutatingWebhookConfiguration, opts: operations.PutOpts = {}) { + async replaceMutatingWebhookConfiguration( + name: string, + body: AdmissionregistrationV1.MutatingWebhookConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}mutatingwebhookconfigurations/${name}`, @@ -93,7 +112,12 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfiguration(resp); } - async patchMutatingWebhookConfiguration(name: string, type: c.PatchType, body: AdmissionregistrationV1.MutatingWebhookConfiguration | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchMutatingWebhookConfiguration( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1.MutatingWebhookConfiguration | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}mutatingwebhookconfigurations/${name}`, @@ -106,7 +130,9 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toMutatingWebhookConfiguration(resp); } - async getValidatingWebhookConfigurationList(opts: operations.GetListOpts = {}) { + async getValidatingWebhookConfigurationList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingwebhookconfigurations`, @@ -117,7 +143,9 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toValidatingWebhookConfigurationList(resp); } - async watchValidatingWebhookConfigurationList(opts: operations.WatchListOpts = {}) { + async watchValidatingWebhookConfigurationList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingwebhookconfigurations`, @@ -129,7 +157,10 @@ export class AdmissionregistrationV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AdmissionregistrationV1.toValidatingWebhookConfiguration, MetaV1.toStatus)); } - async createValidatingWebhookConfiguration(body: AdmissionregistrationV1.ValidatingWebhookConfiguration, opts: operations.PutOpts = {}) { + async createValidatingWebhookConfiguration( + body: AdmissionregistrationV1.ValidatingWebhookConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}validatingwebhookconfigurations`, @@ -141,7 +172,9 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toValidatingWebhookConfiguration(resp); } - async deleteValidatingWebhookConfigurationList(opts: operations.DeleteListOpts = {}) { + async deleteValidatingWebhookConfigurationList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingwebhookconfigurations`, @@ -152,7 +185,10 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toValidatingWebhookConfigurationList(resp); } - async getValidatingWebhookConfiguration(name: string, opts: operations.NoOpts = {}) { + async getValidatingWebhookConfiguration( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingwebhookconfigurations/${name}`, @@ -162,7 +198,10 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toValidatingWebhookConfiguration(resp); } - async deleteValidatingWebhookConfiguration(name: string, opts: operations.DeleteOpts = {}) { + async deleteValidatingWebhookConfiguration( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingwebhookconfigurations/${name}`, @@ -174,7 +213,11 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toValidatingWebhookConfiguration(resp); } - async replaceValidatingWebhookConfiguration(name: string, body: AdmissionregistrationV1.ValidatingWebhookConfiguration, opts: operations.PutOpts = {}) { + async replaceValidatingWebhookConfiguration( + name: string, + body: AdmissionregistrationV1.ValidatingWebhookConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingwebhookconfigurations/${name}`, @@ -186,7 +229,12 @@ export class AdmissionregistrationV1Api { return AdmissionregistrationV1.toValidatingWebhookConfiguration(resp); } - async patchValidatingWebhookConfiguration(name: string, type: c.PatchType, body: AdmissionregistrationV1.ValidatingWebhookConfiguration | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingWebhookConfiguration( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1.ValidatingWebhookConfiguration | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingwebhookconfigurations/${name}`, diff --git a/lib/builtin/admissionregistration.k8s.io@v1alpha1/mod.ts b/lib/builtin/admissionregistration.k8s.io@v1alpha1/mod.ts index ecaf061..68d8974 100644 --- a/lib/builtin/admissionregistration.k8s.io@v1alpha1/mod.ts +++ b/lib/builtin/admissionregistration.k8s.io@v1alpha1/mod.ts @@ -13,7 +13,9 @@ export class AdmissionregistrationV1alpha1Api { this.#client = client; } - async getValidatingAdmissionPolicyList(opts: operations.GetListOpts = {}) { + async getValidatingAdmissionPolicyList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies`, @@ -24,7 +26,9 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyList(resp); } - async watchValidatingAdmissionPolicyList(opts: operations.WatchListOpts = {}) { + async watchValidatingAdmissionPolicyList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies`, @@ -36,7 +40,10 @@ export class AdmissionregistrationV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy, MetaV1.toStatus)); } - async createValidatingAdmissionPolicy(body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy, opts: operations.PutOpts = {}) { + async createValidatingAdmissionPolicy( + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}validatingadmissionpolicies`, @@ -48,7 +55,9 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async deleteValidatingAdmissionPolicyList(opts: operations.DeleteListOpts = {}) { + async deleteValidatingAdmissionPolicyList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicies`, @@ -59,7 +68,10 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyList(resp); } - async getValidatingAdmissionPolicy(name: string, opts: operations.NoOpts = {}) { + async getValidatingAdmissionPolicy( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -69,7 +81,10 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async deleteValidatingAdmissionPolicy(name: string, opts: operations.DeleteOpts = {}) { + async deleteValidatingAdmissionPolicy( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -81,7 +96,11 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async replaceValidatingAdmissionPolicy(name: string, body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy, opts: operations.PutOpts = {}) { + async replaceValidatingAdmissionPolicy( + name: string, + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -93,7 +112,12 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async patchValidatingAdmissionPolicy(name: string, type: c.PatchType, body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingAdmissionPolicy( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -106,7 +130,10 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async getValidatingAdmissionPolicyStatus(name: string, opts: operations.NoOpts = {}) { + async getValidatingAdmissionPolicyStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies/${name}/status`, @@ -116,7 +143,11 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async replaceValidatingAdmissionPolicyStatus(name: string, body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy, opts: operations.PutOpts = {}) { + async replaceValidatingAdmissionPolicyStatus( + name: string, + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingadmissionpolicies/${name}/status`, @@ -128,7 +159,12 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async patchValidatingAdmissionPolicyStatus(name: string, type: c.PatchType, body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingAdmissionPolicyStatus( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicy | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingadmissionpolicies/${name}/status`, @@ -141,7 +177,9 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicy(resp); } - async getValidatingAdmissionPolicyBindingList(opts: operations.GetListOpts = {}) { + async getValidatingAdmissionPolicyBindingList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicybindings`, @@ -152,7 +190,9 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBindingList(resp); } - async watchValidatingAdmissionPolicyBindingList(opts: operations.WatchListOpts = {}) { + async watchValidatingAdmissionPolicyBindingList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicybindings`, @@ -164,7 +204,10 @@ export class AdmissionregistrationV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBinding, MetaV1.toStatus)); } - async createValidatingAdmissionPolicyBinding(body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicyBinding, opts: operations.PutOpts = {}) { + async createValidatingAdmissionPolicyBinding( + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicyBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}validatingadmissionpolicybindings`, @@ -176,7 +219,9 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBinding(resp); } - async deleteValidatingAdmissionPolicyBindingList(opts: operations.DeleteListOpts = {}) { + async deleteValidatingAdmissionPolicyBindingList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicybindings`, @@ -187,7 +232,10 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBindingList(resp); } - async getValidatingAdmissionPolicyBinding(name: string, opts: operations.NoOpts = {}) { + async getValidatingAdmissionPolicyBinding( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicybindings/${name}`, @@ -197,7 +245,10 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBinding(resp); } - async deleteValidatingAdmissionPolicyBinding(name: string, opts: operations.DeleteOpts = {}) { + async deleteValidatingAdmissionPolicyBinding( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicybindings/${name}`, @@ -209,7 +260,11 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBinding(resp); } - async replaceValidatingAdmissionPolicyBinding(name: string, body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicyBinding, opts: operations.PutOpts = {}) { + async replaceValidatingAdmissionPolicyBinding( + name: string, + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicyBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingadmissionpolicybindings/${name}`, @@ -221,7 +276,12 @@ export class AdmissionregistrationV1alpha1Api { return AdmissionregistrationV1alpha1.toValidatingAdmissionPolicyBinding(resp); } - async patchValidatingAdmissionPolicyBinding(name: string, type: c.PatchType, body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicyBinding | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingAdmissionPolicyBinding( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1alpha1.ValidatingAdmissionPolicyBinding | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingadmissionpolicybindings/${name}`, diff --git a/lib/builtin/admissionregistration.k8s.io@v1beta1/mod.ts b/lib/builtin/admissionregistration.k8s.io@v1beta1/mod.ts index 57e9766..50fd2b9 100644 --- a/lib/builtin/admissionregistration.k8s.io@v1beta1/mod.ts +++ b/lib/builtin/admissionregistration.k8s.io@v1beta1/mod.ts @@ -13,7 +13,9 @@ export class AdmissionregistrationV1beta1Api { this.#client = client; } - async getValidatingAdmissionPolicyList(opts: operations.GetListOpts = {}) { + async getValidatingAdmissionPolicyList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies`, @@ -24,7 +26,9 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyList(resp); } - async watchValidatingAdmissionPolicyList(opts: operations.WatchListOpts = {}) { + async watchValidatingAdmissionPolicyList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies`, @@ -36,7 +40,10 @@ export class AdmissionregistrationV1beta1Api { return resp.pipeThrough(new c.WatchEventTransformer(AdmissionregistrationV1beta1.toValidatingAdmissionPolicy, MetaV1.toStatus)); } - async createValidatingAdmissionPolicy(body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy, opts: operations.PutOpts = {}) { + async createValidatingAdmissionPolicy( + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}validatingadmissionpolicies`, @@ -48,7 +55,9 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async deleteValidatingAdmissionPolicyList(opts: operations.DeleteListOpts = {}) { + async deleteValidatingAdmissionPolicyList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicies`, @@ -59,7 +68,10 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyList(resp); } - async getValidatingAdmissionPolicy(name: string, opts: operations.NoOpts = {}) { + async getValidatingAdmissionPolicy( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -69,7 +81,10 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async deleteValidatingAdmissionPolicy(name: string, opts: operations.DeleteOpts = {}) { + async deleteValidatingAdmissionPolicy( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -81,7 +96,11 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async replaceValidatingAdmissionPolicy(name: string, body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy, opts: operations.PutOpts = {}) { + async replaceValidatingAdmissionPolicy( + name: string, + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -93,7 +112,12 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async patchValidatingAdmissionPolicy(name: string, type: c.PatchType, body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingAdmissionPolicy( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingadmissionpolicies/${name}`, @@ -106,7 +130,10 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async getValidatingAdmissionPolicyStatus(name: string, opts: operations.NoOpts = {}) { + async getValidatingAdmissionPolicyStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicies/${name}/status`, @@ -116,7 +143,11 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async replaceValidatingAdmissionPolicyStatus(name: string, body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy, opts: operations.PutOpts = {}) { + async replaceValidatingAdmissionPolicyStatus( + name: string, + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingadmissionpolicies/${name}/status`, @@ -128,7 +159,12 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async patchValidatingAdmissionPolicyStatus(name: string, type: c.PatchType, body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingAdmissionPolicyStatus( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicy | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingadmissionpolicies/${name}/status`, @@ -141,7 +177,9 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicy(resp); } - async getValidatingAdmissionPolicyBindingList(opts: operations.GetListOpts = {}) { + async getValidatingAdmissionPolicyBindingList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicybindings`, @@ -152,7 +190,9 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBindingList(resp); } - async watchValidatingAdmissionPolicyBindingList(opts: operations.WatchListOpts = {}) { + async watchValidatingAdmissionPolicyBindingList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicybindings`, @@ -164,7 +204,10 @@ export class AdmissionregistrationV1beta1Api { return resp.pipeThrough(new c.WatchEventTransformer(AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBinding, MetaV1.toStatus)); } - async createValidatingAdmissionPolicyBinding(body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicyBinding, opts: operations.PutOpts = {}) { + async createValidatingAdmissionPolicyBinding( + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicyBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}validatingadmissionpolicybindings`, @@ -176,7 +219,9 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBinding(resp); } - async deleteValidatingAdmissionPolicyBindingList(opts: operations.DeleteListOpts = {}) { + async deleteValidatingAdmissionPolicyBindingList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicybindings`, @@ -187,7 +232,10 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBindingList(resp); } - async getValidatingAdmissionPolicyBinding(name: string, opts: operations.NoOpts = {}) { + async getValidatingAdmissionPolicyBinding( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}validatingadmissionpolicybindings/${name}`, @@ -197,7 +245,10 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBinding(resp); } - async deleteValidatingAdmissionPolicyBinding(name: string, opts: operations.DeleteOpts = {}) { + async deleteValidatingAdmissionPolicyBinding( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}validatingadmissionpolicybindings/${name}`, @@ -209,7 +260,11 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBinding(resp); } - async replaceValidatingAdmissionPolicyBinding(name: string, body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicyBinding, opts: operations.PutOpts = {}) { + async replaceValidatingAdmissionPolicyBinding( + name: string, + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicyBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}validatingadmissionpolicybindings/${name}`, @@ -221,7 +276,12 @@ export class AdmissionregistrationV1beta1Api { return AdmissionregistrationV1beta1.toValidatingAdmissionPolicyBinding(resp); } - async patchValidatingAdmissionPolicyBinding(name: string, type: c.PatchType, body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicyBinding | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchValidatingAdmissionPolicyBinding( + name: string, + type: c.PatchType, + body: AdmissionregistrationV1beta1.ValidatingAdmissionPolicyBinding | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}validatingadmissionpolicybindings/${name}`, diff --git a/lib/builtin/apiextensions.k8s.io@v1/mod.ts b/lib/builtin/apiextensions.k8s.io@v1/mod.ts index ffd6bc7..06da32c 100644 --- a/lib/builtin/apiextensions.k8s.io@v1/mod.ts +++ b/lib/builtin/apiextensions.k8s.io@v1/mod.ts @@ -13,7 +13,9 @@ export class ApiextensionsV1Api { this.#client = client; } - async getCustomResourceDefinitionList(opts: operations.GetListOpts = {}) { + async getCustomResourceDefinitionList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}customresourcedefinitions`, @@ -24,7 +26,9 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinitionList(resp); } - async watchCustomResourceDefinitionList(opts: operations.WatchListOpts = {}) { + async watchCustomResourceDefinitionList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}customresourcedefinitions`, @@ -36,7 +40,10 @@ export class ApiextensionsV1Api { return resp.pipeThrough(new c.WatchEventTransformer(ApiextensionsV1.toCustomResourceDefinition, MetaV1.toStatus)); } - async createCustomResourceDefinition(body: ApiextensionsV1.CustomResourceDefinition, opts: operations.PutOpts = {}) { + async createCustomResourceDefinition( + body: ApiextensionsV1.CustomResourceDefinition, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}customresourcedefinitions`, @@ -48,7 +55,9 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async deleteCustomResourceDefinitionList(opts: operations.DeleteListOpts = {}) { + async deleteCustomResourceDefinitionList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}customresourcedefinitions`, @@ -59,7 +68,10 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinitionList(resp); } - async getCustomResourceDefinition(name: string, opts: operations.NoOpts = {}) { + async getCustomResourceDefinition( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}customresourcedefinitions/${name}`, @@ -69,7 +81,10 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async deleteCustomResourceDefinition(name: string, opts: operations.DeleteOpts = {}) { + async deleteCustomResourceDefinition( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}customresourcedefinitions/${name}`, @@ -81,7 +96,11 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async replaceCustomResourceDefinition(name: string, body: ApiextensionsV1.CustomResourceDefinition, opts: operations.PutOpts = {}) { + async replaceCustomResourceDefinition( + name: string, + body: ApiextensionsV1.CustomResourceDefinition, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}customresourcedefinitions/${name}`, @@ -93,7 +112,12 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async patchCustomResourceDefinition(name: string, type: c.PatchType, body: ApiextensionsV1.CustomResourceDefinition | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCustomResourceDefinition( + name: string, + type: c.PatchType, + body: ApiextensionsV1.CustomResourceDefinition | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}customresourcedefinitions/${name}`, @@ -106,7 +130,10 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async getCustomResourceDefinitionStatus(name: string, opts: operations.NoOpts = {}) { + async getCustomResourceDefinitionStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}customresourcedefinitions/${name}/status`, @@ -116,7 +143,11 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async replaceCustomResourceDefinitionStatus(name: string, body: ApiextensionsV1.CustomResourceDefinition, opts: operations.PutOpts = {}) { + async replaceCustomResourceDefinitionStatus( + name: string, + body: ApiextensionsV1.CustomResourceDefinition, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}customresourcedefinitions/${name}/status`, @@ -128,7 +159,12 @@ export class ApiextensionsV1Api { return ApiextensionsV1.toCustomResourceDefinition(resp); } - async patchCustomResourceDefinitionStatus(name: string, type: c.PatchType, body: ApiextensionsV1.CustomResourceDefinition | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCustomResourceDefinitionStatus( + name: string, + type: c.PatchType, + body: ApiextensionsV1.CustomResourceDefinition | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}customresourcedefinitions/${name}/status`, diff --git a/lib/builtin/apiregistration.k8s.io@v1/mod.ts b/lib/builtin/apiregistration.k8s.io@v1/mod.ts index 244e400..9da7e35 100644 --- a/lib/builtin/apiregistration.k8s.io@v1/mod.ts +++ b/lib/builtin/apiregistration.k8s.io@v1/mod.ts @@ -13,7 +13,9 @@ export class ApiregistrationV1Api { this.#client = client; } - async getAPIServiceList(opts: operations.GetListOpts = {}) { + async getAPIServiceList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}apiservices`, @@ -24,7 +26,9 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIServiceList(resp); } - async watchAPIServiceList(opts: operations.WatchListOpts = {}) { + async watchAPIServiceList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}apiservices`, @@ -36,7 +40,10 @@ export class ApiregistrationV1Api { return resp.pipeThrough(new c.WatchEventTransformer(ApiregistrationV1.toAPIService, MetaV1.toStatus)); } - async createAPIService(body: ApiregistrationV1.APIService, opts: operations.PutOpts = {}) { + async createAPIService( + body: ApiregistrationV1.APIService, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}apiservices`, @@ -48,7 +55,9 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async deleteAPIServiceList(opts: operations.DeleteListOpts = {}) { + async deleteAPIServiceList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}apiservices`, @@ -59,7 +68,10 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIServiceList(resp); } - async getAPIService(name: string, opts: operations.NoOpts = {}) { + async getAPIService( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}apiservices/${name}`, @@ -69,7 +81,10 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async deleteAPIService(name: string, opts: operations.DeleteOpts = {}) { + async deleteAPIService( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}apiservices/${name}`, @@ -81,7 +96,11 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async replaceAPIService(name: string, body: ApiregistrationV1.APIService, opts: operations.PutOpts = {}) { + async replaceAPIService( + name: string, + body: ApiregistrationV1.APIService, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}apiservices/${name}`, @@ -93,7 +112,12 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async patchAPIService(name: string, type: c.PatchType, body: ApiregistrationV1.APIService | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchAPIService( + name: string, + type: c.PatchType, + body: ApiregistrationV1.APIService | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}apiservices/${name}`, @@ -106,7 +130,10 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async getAPIServiceStatus(name: string, opts: operations.NoOpts = {}) { + async getAPIServiceStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}apiservices/${name}/status`, @@ -116,7 +143,11 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async replaceAPIServiceStatus(name: string, body: ApiregistrationV1.APIService, opts: operations.PutOpts = {}) { + async replaceAPIServiceStatus( + name: string, + body: ApiregistrationV1.APIService, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}apiservices/${name}/status`, @@ -128,7 +159,12 @@ export class ApiregistrationV1Api { return ApiregistrationV1.toAPIService(resp); } - async patchAPIServiceStatus(name: string, type: c.PatchType, body: ApiregistrationV1.APIService | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchAPIServiceStatus( + name: string, + type: c.PatchType, + body: ApiregistrationV1.APIService | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}apiservices/${name}/status`, diff --git a/lib/builtin/apps@v1/mod.ts b/lib/builtin/apps@v1/mod.ts index 210c866..ff0298b 100644 --- a/lib/builtin/apps@v1/mod.ts +++ b/lib/builtin/apps@v1/mod.ts @@ -14,15 +14,17 @@ export class AppsV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): AppsV1NamespacedApi { return new AppsV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): AppsV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new AppsV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getControllerRevisionListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getControllerRevisionListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}controllerrevisions`, @@ -33,7 +35,9 @@ export class AppsV1Api { return AppsV1.toControllerRevisionList(resp); } - async watchControllerRevisionListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchControllerRevisionListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}controllerrevisions`, @@ -45,7 +49,9 @@ export class AppsV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toControllerRevision, MetaV1.toStatus)); } - async getDaemonSetListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getDaemonSetListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}daemonsets`, @@ -56,7 +62,9 @@ export class AppsV1Api { return AppsV1.toDaemonSetList(resp); } - async watchDaemonSetListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchDaemonSetListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}daemonsets`, @@ -68,7 +76,9 @@ export class AppsV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toDaemonSet, MetaV1.toStatus)); } - async getDeploymentListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getDeploymentListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments`, @@ -79,7 +89,9 @@ export class AppsV1Api { return AppsV1.toDeploymentList(resp); } - async watchDeploymentListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchDeploymentListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments`, @@ -91,7 +103,9 @@ export class AppsV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toDeployment, MetaV1.toStatus)); } - async getReplicaSetListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getReplicaSetListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets`, @@ -102,7 +116,9 @@ export class AppsV1Api { return AppsV1.toReplicaSetList(resp); } - async watchReplicaSetListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchReplicaSetListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets`, @@ -114,7 +130,9 @@ export class AppsV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toReplicaSet, MetaV1.toStatus)); } - async getStatefulSetListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getStatefulSetListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets`, @@ -125,7 +143,9 @@ export class AppsV1Api { return AppsV1.toStatefulSetList(resp); } - async watchStatefulSetListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchStatefulSetListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets`, @@ -147,7 +167,9 @@ export class AppsV1NamespacedApi { this.#root = `/apis/apps/v1/namespaces/${namespace}/`; } - async getControllerRevisionList(opts: operations.GetListOpts = {}) { + async getControllerRevisionList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}controllerrevisions`, @@ -158,7 +180,9 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevisionList(resp); } - async watchControllerRevisionList(opts: operations.WatchListOpts = {}) { + async watchControllerRevisionList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}controllerrevisions`, @@ -170,7 +194,10 @@ export class AppsV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toControllerRevision, MetaV1.toStatus)); } - async createControllerRevision(body: AppsV1.ControllerRevision, opts: operations.PutOpts = {}) { + async createControllerRevision( + body: AppsV1.ControllerRevision, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}controllerrevisions`, @@ -182,7 +209,9 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevision(resp); } - async deleteControllerRevisionList(opts: operations.DeleteListOpts = {}) { + async deleteControllerRevisionList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}controllerrevisions`, @@ -193,7 +222,10 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevisionList(resp); } - async getControllerRevision(name: string, opts: operations.NoOpts = {}) { + async getControllerRevision( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}controllerrevisions/${name}`, @@ -203,7 +235,10 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevision(resp); } - async deleteControllerRevision(name: string, opts: operations.DeleteOpts = {}) { + async deleteControllerRevision( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}controllerrevisions/${name}`, @@ -215,7 +250,11 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevision(resp); } - async replaceControllerRevision(name: string, body: AppsV1.ControllerRevision, opts: operations.PutOpts = {}) { + async replaceControllerRevision( + name: string, + body: AppsV1.ControllerRevision, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}controllerrevisions/${name}`, @@ -227,7 +266,12 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevision(resp); } - async patchControllerRevision(name: string, type: c.PatchType, body: AppsV1.ControllerRevision | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchControllerRevision( + name: string, + type: c.PatchType, + body: AppsV1.ControllerRevision | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}controllerrevisions/${name}`, @@ -240,7 +284,9 @@ export class AppsV1NamespacedApi { return AppsV1.toControllerRevision(resp); } - async getDaemonSetList(opts: operations.GetListOpts = {}) { + async getDaemonSetList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}daemonsets`, @@ -251,7 +297,9 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSetList(resp); } - async watchDaemonSetList(opts: operations.WatchListOpts = {}) { + async watchDaemonSetList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}daemonsets`, @@ -263,7 +311,10 @@ export class AppsV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toDaemonSet, MetaV1.toStatus)); } - async createDaemonSet(body: AppsV1.DaemonSet, opts: operations.PutOpts = {}) { + async createDaemonSet( + body: AppsV1.DaemonSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}daemonsets`, @@ -275,7 +326,9 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async deleteDaemonSetList(opts: operations.DeleteListOpts = {}) { + async deleteDaemonSetList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}daemonsets`, @@ -286,7 +339,10 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSetList(resp); } - async getDaemonSet(name: string, opts: operations.NoOpts = {}) { + async getDaemonSet( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}daemonsets/${name}`, @@ -296,7 +352,10 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async deleteDaemonSet(name: string, opts: operations.DeleteOpts = {}) { + async deleteDaemonSet( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}daemonsets/${name}`, @@ -308,7 +367,11 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async replaceDaemonSet(name: string, body: AppsV1.DaemonSet, opts: operations.PutOpts = {}) { + async replaceDaemonSet( + name: string, + body: AppsV1.DaemonSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}daemonsets/${name}`, @@ -320,7 +383,12 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async patchDaemonSet(name: string, type: c.PatchType, body: AppsV1.DaemonSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDaemonSet( + name: string, + type: c.PatchType, + body: AppsV1.DaemonSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}daemonsets/${name}`, @@ -333,7 +401,10 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async getDaemonSetStatus(name: string, opts: operations.NoOpts = {}) { + async getDaemonSetStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}daemonsets/${name}/status`, @@ -343,7 +414,11 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async replaceDaemonSetStatus(name: string, body: AppsV1.DaemonSet, opts: operations.PutOpts = {}) { + async replaceDaemonSetStatus( + name: string, + body: AppsV1.DaemonSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}daemonsets/${name}/status`, @@ -355,7 +430,12 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async patchDaemonSetStatus(name: string, type: c.PatchType, body: AppsV1.DaemonSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDaemonSetStatus( + name: string, + type: c.PatchType, + body: AppsV1.DaemonSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}daemonsets/${name}/status`, @@ -368,7 +448,9 @@ export class AppsV1NamespacedApi { return AppsV1.toDaemonSet(resp); } - async getDeploymentList(opts: operations.GetListOpts = {}) { + async getDeploymentList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments`, @@ -379,7 +461,9 @@ export class AppsV1NamespacedApi { return AppsV1.toDeploymentList(resp); } - async watchDeploymentList(opts: operations.WatchListOpts = {}) { + async watchDeploymentList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments`, @@ -391,7 +475,10 @@ export class AppsV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toDeployment, MetaV1.toStatus)); } - async createDeployment(body: AppsV1.Deployment, opts: operations.PutOpts = {}) { + async createDeployment( + body: AppsV1.Deployment, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}deployments`, @@ -403,7 +490,9 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async deleteDeploymentList(opts: operations.DeleteListOpts = {}) { + async deleteDeploymentList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}deployments`, @@ -414,7 +503,10 @@ export class AppsV1NamespacedApi { return AppsV1.toDeploymentList(resp); } - async getDeployment(name: string, opts: operations.NoOpts = {}) { + async getDeployment( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments/${name}`, @@ -424,7 +516,10 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async deleteDeployment(name: string, opts: operations.DeleteOpts = {}) { + async deleteDeployment( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}deployments/${name}`, @@ -436,7 +531,11 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async replaceDeployment(name: string, body: AppsV1.Deployment, opts: operations.PutOpts = {}) { + async replaceDeployment( + name: string, + body: AppsV1.Deployment, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}deployments/${name}`, @@ -448,7 +547,12 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async patchDeployment(name: string, type: c.PatchType, body: AppsV1.Deployment | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDeployment( + name: string, + type: c.PatchType, + body: AppsV1.Deployment | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}deployments/${name}`, @@ -461,7 +565,10 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async getDeploymentScale(name: string, opts: operations.NoOpts = {}) { + async getDeploymentScale( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments/${name}/scale`, @@ -471,7 +578,11 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async replaceDeploymentScale(name: string, body: AutoscalingV1.Scale, opts: operations.PutOpts = {}) { + async replaceDeploymentScale( + name: string, + body: AutoscalingV1.Scale, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}deployments/${name}/scale`, @@ -483,7 +594,12 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async patchDeploymentScale(name: string, type: c.PatchType, body: AutoscalingV1.Scale | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDeploymentScale( + name: string, + type: c.PatchType, + body: AutoscalingV1.Scale | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}deployments/${name}/scale`, @@ -496,7 +612,10 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async getDeploymentStatus(name: string, opts: operations.NoOpts = {}) { + async getDeploymentStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}deployments/${name}/status`, @@ -506,7 +625,11 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async replaceDeploymentStatus(name: string, body: AppsV1.Deployment, opts: operations.PutOpts = {}) { + async replaceDeploymentStatus( + name: string, + body: AppsV1.Deployment, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}deployments/${name}/status`, @@ -518,7 +641,12 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async patchDeploymentStatus(name: string, type: c.PatchType, body: AppsV1.Deployment | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDeploymentStatus( + name: string, + type: c.PatchType, + body: AppsV1.Deployment | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}deployments/${name}/status`, @@ -531,7 +659,9 @@ export class AppsV1NamespacedApi { return AppsV1.toDeployment(resp); } - async getReplicaSetList(opts: operations.GetListOpts = {}) { + async getReplicaSetList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets`, @@ -542,7 +672,9 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSetList(resp); } - async watchReplicaSetList(opts: operations.WatchListOpts = {}) { + async watchReplicaSetList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets`, @@ -554,7 +686,10 @@ export class AppsV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toReplicaSet, MetaV1.toStatus)); } - async createReplicaSet(body: AppsV1.ReplicaSet, opts: operations.PutOpts = {}) { + async createReplicaSet( + body: AppsV1.ReplicaSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}replicasets`, @@ -566,7 +701,9 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async deleteReplicaSetList(opts: operations.DeleteListOpts = {}) { + async deleteReplicaSetList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}replicasets`, @@ -577,7 +714,10 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSetList(resp); } - async getReplicaSet(name: string, opts: operations.NoOpts = {}) { + async getReplicaSet( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets/${name}`, @@ -587,7 +727,10 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async deleteReplicaSet(name: string, opts: operations.DeleteOpts = {}) { + async deleteReplicaSet( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}replicasets/${name}`, @@ -599,7 +742,11 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async replaceReplicaSet(name: string, body: AppsV1.ReplicaSet, opts: operations.PutOpts = {}) { + async replaceReplicaSet( + name: string, + body: AppsV1.ReplicaSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}replicasets/${name}`, @@ -611,7 +758,12 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async patchReplicaSet(name: string, type: c.PatchType, body: AppsV1.ReplicaSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchReplicaSet( + name: string, + type: c.PatchType, + body: AppsV1.ReplicaSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}replicasets/${name}`, @@ -624,7 +776,10 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async getReplicaSetScale(name: string, opts: operations.NoOpts = {}) { + async getReplicaSetScale( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets/${name}/scale`, @@ -634,7 +789,11 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async replaceReplicaSetScale(name: string, body: AutoscalingV1.Scale, opts: operations.PutOpts = {}) { + async replaceReplicaSetScale( + name: string, + body: AutoscalingV1.Scale, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}replicasets/${name}/scale`, @@ -646,7 +805,12 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async patchReplicaSetScale(name: string, type: c.PatchType, body: AutoscalingV1.Scale | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchReplicaSetScale( + name: string, + type: c.PatchType, + body: AutoscalingV1.Scale | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}replicasets/${name}/scale`, @@ -659,7 +823,10 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async getReplicaSetStatus(name: string, opts: operations.NoOpts = {}) { + async getReplicaSetStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicasets/${name}/status`, @@ -669,7 +836,11 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async replaceReplicaSetStatus(name: string, body: AppsV1.ReplicaSet, opts: operations.PutOpts = {}) { + async replaceReplicaSetStatus( + name: string, + body: AppsV1.ReplicaSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}replicasets/${name}/status`, @@ -681,7 +852,12 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async patchReplicaSetStatus(name: string, type: c.PatchType, body: AppsV1.ReplicaSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchReplicaSetStatus( + name: string, + type: c.PatchType, + body: AppsV1.ReplicaSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}replicasets/${name}/status`, @@ -694,7 +870,9 @@ export class AppsV1NamespacedApi { return AppsV1.toReplicaSet(resp); } - async getStatefulSetList(opts: operations.GetListOpts = {}) { + async getStatefulSetList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets`, @@ -705,7 +883,9 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSetList(resp); } - async watchStatefulSetList(opts: operations.WatchListOpts = {}) { + async watchStatefulSetList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets`, @@ -717,7 +897,10 @@ export class AppsV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AppsV1.toStatefulSet, MetaV1.toStatus)); } - async createStatefulSet(body: AppsV1.StatefulSet, opts: operations.PutOpts = {}) { + async createStatefulSet( + body: AppsV1.StatefulSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}statefulsets`, @@ -729,7 +912,9 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async deleteStatefulSetList(opts: operations.DeleteListOpts = {}) { + async deleteStatefulSetList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}statefulsets`, @@ -740,7 +925,10 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSetList(resp); } - async getStatefulSet(name: string, opts: operations.NoOpts = {}) { + async getStatefulSet( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets/${name}`, @@ -750,7 +938,10 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async deleteStatefulSet(name: string, opts: operations.DeleteOpts = {}) { + async deleteStatefulSet( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}statefulsets/${name}`, @@ -762,7 +953,11 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async replaceStatefulSet(name: string, body: AppsV1.StatefulSet, opts: operations.PutOpts = {}) { + async replaceStatefulSet( + name: string, + body: AppsV1.StatefulSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}statefulsets/${name}`, @@ -774,7 +969,12 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async patchStatefulSet(name: string, type: c.PatchType, body: AppsV1.StatefulSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchStatefulSet( + name: string, + type: c.PatchType, + body: AppsV1.StatefulSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}statefulsets/${name}`, @@ -787,7 +987,10 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async getStatefulSetScale(name: string, opts: operations.NoOpts = {}) { + async getStatefulSetScale( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets/${name}/scale`, @@ -797,7 +1000,11 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async replaceStatefulSetScale(name: string, body: AutoscalingV1.Scale, opts: operations.PutOpts = {}) { + async replaceStatefulSetScale( + name: string, + body: AutoscalingV1.Scale, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}statefulsets/${name}/scale`, @@ -809,7 +1016,12 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async patchStatefulSetScale(name: string, type: c.PatchType, body: AutoscalingV1.Scale | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchStatefulSetScale( + name: string, + type: c.PatchType, + body: AutoscalingV1.Scale | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}statefulsets/${name}/scale`, @@ -822,7 +1034,10 @@ export class AppsV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async getStatefulSetStatus(name: string, opts: operations.NoOpts = {}) { + async getStatefulSetStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}statefulsets/${name}/status`, @@ -832,7 +1047,11 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async replaceStatefulSetStatus(name: string, body: AppsV1.StatefulSet, opts: operations.PutOpts = {}) { + async replaceStatefulSetStatus( + name: string, + body: AppsV1.StatefulSet, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}statefulsets/${name}/status`, @@ -844,7 +1063,12 @@ export class AppsV1NamespacedApi { return AppsV1.toStatefulSet(resp); } - async patchStatefulSetStatus(name: string, type: c.PatchType, body: AppsV1.StatefulSet | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchStatefulSetStatus( + name: string, + type: c.PatchType, + body: AppsV1.StatefulSet | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}statefulsets/${name}/status`, diff --git a/lib/builtin/authentication.k8s.io@v1/mod.ts b/lib/builtin/authentication.k8s.io@v1/mod.ts index 412b76c..d4b5f81 100644 --- a/lib/builtin/authentication.k8s.io@v1/mod.ts +++ b/lib/builtin/authentication.k8s.io@v1/mod.ts @@ -13,7 +13,10 @@ export class AuthenticationV1Api { this.#client = client; } - async createSelfSubjectReview(body: AuthenticationV1.SelfSubjectReview, opts: operations.PutOpts = {}) { + async createSelfSubjectReview( + body: AuthenticationV1.SelfSubjectReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}selfsubjectreviews`, @@ -25,7 +28,10 @@ export class AuthenticationV1Api { return AuthenticationV1.toSelfSubjectReview(resp); } - async createTokenReview(body: AuthenticationV1.TokenReview, opts: operations.PutOpts = {}) { + async createTokenReview( + body: AuthenticationV1.TokenReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}tokenreviews`, diff --git a/lib/builtin/authentication.k8s.io@v1alpha1/mod.ts b/lib/builtin/authentication.k8s.io@v1alpha1/mod.ts index 295432f..b6b67fb 100644 --- a/lib/builtin/authentication.k8s.io@v1alpha1/mod.ts +++ b/lib/builtin/authentication.k8s.io@v1alpha1/mod.ts @@ -13,7 +13,10 @@ export class AuthenticationV1alpha1Api { this.#client = client; } - async createSelfSubjectReview(body: AuthenticationV1alpha1.SelfSubjectReview, opts: operations.PutOpts = {}) { + async createSelfSubjectReview( + body: AuthenticationV1alpha1.SelfSubjectReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}selfsubjectreviews`, diff --git a/lib/builtin/authentication.k8s.io@v1beta1/mod.ts b/lib/builtin/authentication.k8s.io@v1beta1/mod.ts index 85c298b..75231a6 100644 --- a/lib/builtin/authentication.k8s.io@v1beta1/mod.ts +++ b/lib/builtin/authentication.k8s.io@v1beta1/mod.ts @@ -13,7 +13,10 @@ export class AuthenticationV1beta1Api { this.#client = client; } - async createSelfSubjectReview(body: AuthenticationV1beta1.SelfSubjectReview, opts: operations.PutOpts = {}) { + async createSelfSubjectReview( + body: AuthenticationV1beta1.SelfSubjectReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}selfsubjectreviews`, diff --git a/lib/builtin/authorization.k8s.io@v1/mod.ts b/lib/builtin/authorization.k8s.io@v1/mod.ts index 7947ac0..626e0bf 100644 --- a/lib/builtin/authorization.k8s.io@v1/mod.ts +++ b/lib/builtin/authorization.k8s.io@v1/mod.ts @@ -13,15 +13,18 @@ export class AuthorizationV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): AuthorizationV1NamespacedApi { return new AuthorizationV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): AuthorizationV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new AuthorizationV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async createSelfSubjectAccessReview(body: AuthorizationV1.SelfSubjectAccessReview, opts: operations.PutOpts = {}) { + async createSelfSubjectAccessReview( + body: AuthorizationV1.SelfSubjectAccessReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}selfsubjectaccessreviews`, @@ -33,7 +36,10 @@ export class AuthorizationV1Api { return AuthorizationV1.toSelfSubjectAccessReview(resp); } - async createSelfSubjectRulesReview(body: AuthorizationV1.SelfSubjectRulesReview, opts: operations.PutOpts = {}) { + async createSelfSubjectRulesReview( + body: AuthorizationV1.SelfSubjectRulesReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}selfsubjectrulesreviews`, @@ -45,7 +51,10 @@ export class AuthorizationV1Api { return AuthorizationV1.toSelfSubjectRulesReview(resp); } - async createSubjectAccessReview(body: AuthorizationV1.SubjectAccessReview, opts: operations.PutOpts = {}) { + async createSubjectAccessReview( + body: AuthorizationV1.SubjectAccessReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}subjectaccessreviews`, @@ -67,7 +76,10 @@ export class AuthorizationV1NamespacedApi { this.#root = `/apis/authorization.k8s.io/v1/namespaces/${namespace}/`; } - async createLocalSubjectAccessReview(body: AuthorizationV1.LocalSubjectAccessReview, opts: operations.PutOpts = {}) { + async createLocalSubjectAccessReview( + body: AuthorizationV1.LocalSubjectAccessReview, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}localsubjectaccessreviews`, diff --git a/lib/builtin/autoscaling@v1/mod.ts b/lib/builtin/autoscaling@v1/mod.ts index b874868..9e7aa34 100644 --- a/lib/builtin/autoscaling@v1/mod.ts +++ b/lib/builtin/autoscaling@v1/mod.ts @@ -13,15 +13,17 @@ export class AutoscalingV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): AutoscalingV1NamespacedApi { return new AutoscalingV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): AutoscalingV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new AutoscalingV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getHorizontalPodAutoscalerListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getHorizontalPodAutoscalerListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -32,7 +34,9 @@ export class AutoscalingV1Api { return AutoscalingV1.toHorizontalPodAutoscalerList(resp); } - async watchHorizontalPodAutoscalerListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchHorizontalPodAutoscalerListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -54,7 +58,9 @@ export class AutoscalingV1NamespacedApi { this.#root = `/apis/autoscaling/v1/namespaces/${namespace}/`; } - async getHorizontalPodAutoscalerList(opts: operations.GetListOpts = {}) { + async getHorizontalPodAutoscalerList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -65,7 +71,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscalerList(resp); } - async watchHorizontalPodAutoscalerList(opts: operations.WatchListOpts = {}) { + async watchHorizontalPodAutoscalerList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -77,7 +85,10 @@ export class AutoscalingV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AutoscalingV1.toHorizontalPodAutoscaler, MetaV1.toStatus)); } - async createHorizontalPodAutoscaler(body: AutoscalingV1.HorizontalPodAutoscaler, opts: operations.PutOpts = {}) { + async createHorizontalPodAutoscaler( + body: AutoscalingV1.HorizontalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}horizontalpodautoscalers`, @@ -89,7 +100,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async deleteHorizontalPodAutoscalerList(opts: operations.DeleteListOpts = {}) { + async deleteHorizontalPodAutoscalerList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}horizontalpodautoscalers`, @@ -100,7 +113,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscalerList(resp); } - async getHorizontalPodAutoscaler(name: string, opts: operations.NoOpts = {}) { + async getHorizontalPodAutoscaler( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -110,7 +126,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async deleteHorizontalPodAutoscaler(name: string, opts: operations.DeleteOpts = {}) { + async deleteHorizontalPodAutoscaler( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -122,7 +141,11 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async replaceHorizontalPodAutoscaler(name: string, body: AutoscalingV1.HorizontalPodAutoscaler, opts: operations.PutOpts = {}) { + async replaceHorizontalPodAutoscaler( + name: string, + body: AutoscalingV1.HorizontalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -134,7 +157,12 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async patchHorizontalPodAutoscaler(name: string, type: c.PatchType, body: AutoscalingV1.HorizontalPodAutoscaler | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchHorizontalPodAutoscaler( + name: string, + type: c.PatchType, + body: AutoscalingV1.HorizontalPodAutoscaler | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -147,7 +175,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async getHorizontalPodAutoscalerStatus(name: string, opts: operations.NoOpts = {}) { + async getHorizontalPodAutoscalerStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers/${name}/status`, @@ -157,7 +188,11 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async replaceHorizontalPodAutoscalerStatus(name: string, body: AutoscalingV1.HorizontalPodAutoscaler, opts: operations.PutOpts = {}) { + async replaceHorizontalPodAutoscalerStatus( + name: string, + body: AutoscalingV1.HorizontalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}horizontalpodautoscalers/${name}/status`, @@ -169,7 +204,12 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toHorizontalPodAutoscaler(resp); } - async patchHorizontalPodAutoscalerStatus(name: string, type: c.PatchType, body: AutoscalingV1.HorizontalPodAutoscaler | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchHorizontalPodAutoscalerStatus( + name: string, + type: c.PatchType, + body: AutoscalingV1.HorizontalPodAutoscaler | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}horizontalpodautoscalers/${name}/status`, diff --git a/lib/builtin/autoscaling@v2/mod.ts b/lib/builtin/autoscaling@v2/mod.ts index 4de1677..a0006c8 100644 --- a/lib/builtin/autoscaling@v2/mod.ts +++ b/lib/builtin/autoscaling@v2/mod.ts @@ -13,15 +13,17 @@ export class AutoscalingV2Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): AutoscalingV2NamespacedApi { return new AutoscalingV2NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): AutoscalingV2NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new AutoscalingV2NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getHorizontalPodAutoscalerListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getHorizontalPodAutoscalerListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -32,7 +34,9 @@ export class AutoscalingV2Api { return AutoscalingV2.toHorizontalPodAutoscalerList(resp); } - async watchHorizontalPodAutoscalerListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchHorizontalPodAutoscalerListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -54,7 +58,9 @@ export class AutoscalingV2NamespacedApi { this.#root = `/apis/autoscaling/v2/namespaces/${namespace}/`; } - async getHorizontalPodAutoscalerList(opts: operations.GetListOpts = {}) { + async getHorizontalPodAutoscalerList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -65,7 +71,9 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscalerList(resp); } - async watchHorizontalPodAutoscalerList(opts: operations.WatchListOpts = {}) { + async watchHorizontalPodAutoscalerList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers`, @@ -77,7 +85,10 @@ export class AutoscalingV2NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AutoscalingV2.toHorizontalPodAutoscaler, MetaV1.toStatus)); } - async createHorizontalPodAutoscaler(body: AutoscalingV2.HorizontalPodAutoscaler, opts: operations.PutOpts = {}) { + async createHorizontalPodAutoscaler( + body: AutoscalingV2.HorizontalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}horizontalpodautoscalers`, @@ -89,7 +100,9 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async deleteHorizontalPodAutoscalerList(opts: operations.DeleteListOpts = {}) { + async deleteHorizontalPodAutoscalerList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}horizontalpodautoscalers`, @@ -100,7 +113,10 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscalerList(resp); } - async getHorizontalPodAutoscaler(name: string, opts: operations.NoOpts = {}) { + async getHorizontalPodAutoscaler( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -110,7 +126,10 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async deleteHorizontalPodAutoscaler(name: string, opts: operations.DeleteOpts = {}) { + async deleteHorizontalPodAutoscaler( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -122,7 +141,11 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async replaceHorizontalPodAutoscaler(name: string, body: AutoscalingV2.HorizontalPodAutoscaler, opts: operations.PutOpts = {}) { + async replaceHorizontalPodAutoscaler( + name: string, + body: AutoscalingV2.HorizontalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -134,7 +157,12 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async patchHorizontalPodAutoscaler(name: string, type: c.PatchType, body: AutoscalingV2.HorizontalPodAutoscaler | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchHorizontalPodAutoscaler( + name: string, + type: c.PatchType, + body: AutoscalingV2.HorizontalPodAutoscaler | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}horizontalpodautoscalers/${name}`, @@ -147,7 +175,10 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async getHorizontalPodAutoscalerStatus(name: string, opts: operations.NoOpts = {}) { + async getHorizontalPodAutoscalerStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}horizontalpodautoscalers/${name}/status`, @@ -157,7 +188,11 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async replaceHorizontalPodAutoscalerStatus(name: string, body: AutoscalingV2.HorizontalPodAutoscaler, opts: operations.PutOpts = {}) { + async replaceHorizontalPodAutoscalerStatus( + name: string, + body: AutoscalingV2.HorizontalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}horizontalpodautoscalers/${name}/status`, @@ -169,7 +204,12 @@ export class AutoscalingV2NamespacedApi { return AutoscalingV2.toHorizontalPodAutoscaler(resp); } - async patchHorizontalPodAutoscalerStatus(name: string, type: c.PatchType, body: AutoscalingV2.HorizontalPodAutoscaler | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchHorizontalPodAutoscalerStatus( + name: string, + type: c.PatchType, + body: AutoscalingV2.HorizontalPodAutoscaler | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}horizontalpodautoscalers/${name}/status`, diff --git a/lib/builtin/batch@v1/mod.ts b/lib/builtin/batch@v1/mod.ts index 7100cea..e1e3c66 100644 --- a/lib/builtin/batch@v1/mod.ts +++ b/lib/builtin/batch@v1/mod.ts @@ -13,15 +13,17 @@ export class BatchV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): BatchV1NamespacedApi { return new BatchV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): BatchV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new BatchV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getCronJobListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getCronJobListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}cronjobs`, @@ -32,7 +34,9 @@ export class BatchV1Api { return BatchV1.toCronJobList(resp); } - async watchCronJobListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchCronJobListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}cronjobs`, @@ -44,7 +48,9 @@ export class BatchV1Api { return resp.pipeThrough(new c.WatchEventTransformer(BatchV1.toCronJob, MetaV1.toStatus)); } - async getJobListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getJobListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}jobs`, @@ -55,7 +61,9 @@ export class BatchV1Api { return BatchV1.toJobList(resp); } - async watchJobListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchJobListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}jobs`, @@ -77,7 +85,9 @@ export class BatchV1NamespacedApi { this.#root = `/apis/batch/v1/namespaces/${namespace}/`; } - async getCronJobList(opts: operations.GetListOpts = {}) { + async getCronJobList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}cronjobs`, @@ -88,7 +98,9 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJobList(resp); } - async watchCronJobList(opts: operations.WatchListOpts = {}) { + async watchCronJobList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}cronjobs`, @@ -100,7 +112,10 @@ export class BatchV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(BatchV1.toCronJob, MetaV1.toStatus)); } - async createCronJob(body: BatchV1.CronJob, opts: operations.PutOpts = {}) { + async createCronJob( + body: BatchV1.CronJob, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}cronjobs`, @@ -112,7 +127,9 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async deleteCronJobList(opts: operations.DeleteListOpts = {}) { + async deleteCronJobList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}cronjobs`, @@ -123,7 +140,10 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJobList(resp); } - async getCronJob(name: string, opts: operations.NoOpts = {}) { + async getCronJob( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}cronjobs/${name}`, @@ -133,7 +153,10 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async deleteCronJob(name: string, opts: operations.DeleteOpts = {}) { + async deleteCronJob( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}cronjobs/${name}`, @@ -145,7 +168,11 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async replaceCronJob(name: string, body: BatchV1.CronJob, opts: operations.PutOpts = {}) { + async replaceCronJob( + name: string, + body: BatchV1.CronJob, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}cronjobs/${name}`, @@ -157,7 +184,12 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async patchCronJob(name: string, type: c.PatchType, body: BatchV1.CronJob | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCronJob( + name: string, + type: c.PatchType, + body: BatchV1.CronJob | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}cronjobs/${name}`, @@ -170,7 +202,10 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async getCronJobStatus(name: string, opts: operations.NoOpts = {}) { + async getCronJobStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}cronjobs/${name}/status`, @@ -180,7 +215,11 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async replaceCronJobStatus(name: string, body: BatchV1.CronJob, opts: operations.PutOpts = {}) { + async replaceCronJobStatus( + name: string, + body: BatchV1.CronJob, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}cronjobs/${name}/status`, @@ -192,7 +231,12 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async patchCronJobStatus(name: string, type: c.PatchType, body: BatchV1.CronJob | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCronJobStatus( + name: string, + type: c.PatchType, + body: BatchV1.CronJob | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}cronjobs/${name}/status`, @@ -205,7 +249,9 @@ export class BatchV1NamespacedApi { return BatchV1.toCronJob(resp); } - async getJobList(opts: operations.GetListOpts = {}) { + async getJobList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}jobs`, @@ -216,7 +262,9 @@ export class BatchV1NamespacedApi { return BatchV1.toJobList(resp); } - async watchJobList(opts: operations.WatchListOpts = {}) { + async watchJobList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}jobs`, @@ -228,7 +276,10 @@ export class BatchV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(BatchV1.toJob, MetaV1.toStatus)); } - async createJob(body: BatchV1.Job, opts: operations.PutOpts = {}) { + async createJob( + body: BatchV1.Job, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}jobs`, @@ -240,7 +291,9 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async deleteJobList(opts: operations.DeleteListOpts = {}) { + async deleteJobList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}jobs`, @@ -251,7 +304,10 @@ export class BatchV1NamespacedApi { return BatchV1.toJobList(resp); } - async getJob(name: string, opts: operations.NoOpts = {}) { + async getJob( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}jobs/${name}`, @@ -261,7 +317,10 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async deleteJob(name: string, opts: operations.DeleteOpts = {}) { + async deleteJob( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}jobs/${name}`, @@ -273,7 +332,11 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async replaceJob(name: string, body: BatchV1.Job, opts: operations.PutOpts = {}) { + async replaceJob( + name: string, + body: BatchV1.Job, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}jobs/${name}`, @@ -285,7 +348,12 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async patchJob(name: string, type: c.PatchType, body: BatchV1.Job | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchJob( + name: string, + type: c.PatchType, + body: BatchV1.Job | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}jobs/${name}`, @@ -298,7 +366,10 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async getJobStatus(name: string, opts: operations.NoOpts = {}) { + async getJobStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}jobs/${name}/status`, @@ -308,7 +379,11 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async replaceJobStatus(name: string, body: BatchV1.Job, opts: operations.PutOpts = {}) { + async replaceJobStatus( + name: string, + body: BatchV1.Job, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}jobs/${name}/status`, @@ -320,7 +395,12 @@ export class BatchV1NamespacedApi { return BatchV1.toJob(resp); } - async patchJobStatus(name: string, type: c.PatchType, body: BatchV1.Job | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchJobStatus( + name: string, + type: c.PatchType, + body: BatchV1.Job | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}jobs/${name}/status`, diff --git a/lib/builtin/certificates.k8s.io@v1/mod.ts b/lib/builtin/certificates.k8s.io@v1/mod.ts index d4be769..f258007 100644 --- a/lib/builtin/certificates.k8s.io@v1/mod.ts +++ b/lib/builtin/certificates.k8s.io@v1/mod.ts @@ -13,7 +13,9 @@ export class CertificatesV1Api { this.#client = client; } - async getCertificateSigningRequestList(opts: operations.GetListOpts = {}) { + async getCertificateSigningRequestList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificatesigningrequests`, @@ -24,7 +26,9 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequestList(resp); } - async watchCertificateSigningRequestList(opts: operations.WatchListOpts = {}) { + async watchCertificateSigningRequestList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificatesigningrequests`, @@ -36,7 +40,10 @@ export class CertificatesV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CertificatesV1.toCertificateSigningRequest, MetaV1.toStatus)); } - async createCertificateSigningRequest(body: CertificatesV1.CertificateSigningRequest, opts: operations.PutOpts = {}) { + async createCertificateSigningRequest( + body: CertificatesV1.CertificateSigningRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}certificatesigningrequests`, @@ -48,7 +55,9 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async deleteCertificateSigningRequestList(opts: operations.DeleteListOpts = {}) { + async deleteCertificateSigningRequestList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}certificatesigningrequests`, @@ -59,7 +68,10 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequestList(resp); } - async getCertificateSigningRequest(name: string, opts: operations.NoOpts = {}) { + async getCertificateSigningRequest( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificatesigningrequests/${name}`, @@ -69,7 +81,10 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async deleteCertificateSigningRequest(name: string, opts: operations.DeleteOpts = {}) { + async deleteCertificateSigningRequest( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}certificatesigningrequests/${name}`, @@ -81,7 +96,11 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async replaceCertificateSigningRequest(name: string, body: CertificatesV1.CertificateSigningRequest, opts: operations.PutOpts = {}) { + async replaceCertificateSigningRequest( + name: string, + body: CertificatesV1.CertificateSigningRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificatesigningrequests/${name}`, @@ -93,7 +112,12 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async patchCertificateSigningRequest(name: string, type: c.PatchType, body: CertificatesV1.CertificateSigningRequest | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificateSigningRequest( + name: string, + type: c.PatchType, + body: CertificatesV1.CertificateSigningRequest | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificatesigningrequests/${name}`, @@ -106,7 +130,10 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async getCertificateSigningRequestApproval(name: string, opts: operations.NoOpts = {}) { + async getCertificateSigningRequestApproval( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificatesigningrequests/${name}/approval`, @@ -116,7 +143,11 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async replaceCertificateSigningRequestApproval(name: string, body: CertificatesV1.CertificateSigningRequest, opts: operations.PutOpts = {}) { + async replaceCertificateSigningRequestApproval( + name: string, + body: CertificatesV1.CertificateSigningRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificatesigningrequests/${name}/approval`, @@ -128,7 +159,12 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async patchCertificateSigningRequestApproval(name: string, type: c.PatchType, body: CertificatesV1.CertificateSigningRequest | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificateSigningRequestApproval( + name: string, + type: c.PatchType, + body: CertificatesV1.CertificateSigningRequest | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificatesigningrequests/${name}/approval`, @@ -141,7 +177,10 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async getCertificateSigningRequestStatus(name: string, opts: operations.NoOpts = {}) { + async getCertificateSigningRequestStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificatesigningrequests/${name}/status`, @@ -151,7 +190,11 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async replaceCertificateSigningRequestStatus(name: string, body: CertificatesV1.CertificateSigningRequest, opts: operations.PutOpts = {}) { + async replaceCertificateSigningRequestStatus( + name: string, + body: CertificatesV1.CertificateSigningRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificatesigningrequests/${name}/status`, @@ -163,7 +206,12 @@ export class CertificatesV1Api { return CertificatesV1.toCertificateSigningRequest(resp); } - async patchCertificateSigningRequestStatus(name: string, type: c.PatchType, body: CertificatesV1.CertificateSigningRequest | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificateSigningRequestStatus( + name: string, + type: c.PatchType, + body: CertificatesV1.CertificateSigningRequest | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificatesigningrequests/${name}/status`, diff --git a/lib/builtin/certificates.k8s.io@v1alpha1/mod.ts b/lib/builtin/certificates.k8s.io@v1alpha1/mod.ts index 696943d..c56746c 100644 --- a/lib/builtin/certificates.k8s.io@v1alpha1/mod.ts +++ b/lib/builtin/certificates.k8s.io@v1alpha1/mod.ts @@ -13,7 +13,9 @@ export class CertificatesV1alpha1Api { this.#client = client; } - async getClusterTrustBundleList(opts: operations.GetListOpts = {}) { + async getClusterTrustBundleList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clustertrustbundles`, @@ -24,7 +26,9 @@ export class CertificatesV1alpha1Api { return CertificatesV1alpha1.toClusterTrustBundleList(resp); } - async watchClusterTrustBundleList(opts: operations.WatchListOpts = {}) { + async watchClusterTrustBundleList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clustertrustbundles`, @@ -36,7 +40,10 @@ export class CertificatesV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(CertificatesV1alpha1.toClusterTrustBundle, MetaV1.toStatus)); } - async createClusterTrustBundle(body: CertificatesV1alpha1.ClusterTrustBundle, opts: operations.PutOpts = {}) { + async createClusterTrustBundle( + body: CertificatesV1alpha1.ClusterTrustBundle, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}clustertrustbundles`, @@ -48,7 +55,9 @@ export class CertificatesV1alpha1Api { return CertificatesV1alpha1.toClusterTrustBundle(resp); } - async deleteClusterTrustBundleList(opts: operations.DeleteListOpts = {}) { + async deleteClusterTrustBundleList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clustertrustbundles`, @@ -59,7 +68,10 @@ export class CertificatesV1alpha1Api { return CertificatesV1alpha1.toClusterTrustBundleList(resp); } - async getClusterTrustBundle(name: string, opts: operations.NoOpts = {}) { + async getClusterTrustBundle( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clustertrustbundles/${name}`, @@ -69,7 +81,10 @@ export class CertificatesV1alpha1Api { return CertificatesV1alpha1.toClusterTrustBundle(resp); } - async deleteClusterTrustBundle(name: string, opts: operations.DeleteOpts = {}) { + async deleteClusterTrustBundle( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clustertrustbundles/${name}`, @@ -81,7 +96,11 @@ export class CertificatesV1alpha1Api { return CertificatesV1alpha1.toClusterTrustBundle(resp); } - async replaceClusterTrustBundle(name: string, body: CertificatesV1alpha1.ClusterTrustBundle, opts: operations.PutOpts = {}) { + async replaceClusterTrustBundle( + name: string, + body: CertificatesV1alpha1.ClusterTrustBundle, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}clustertrustbundles/${name}`, @@ -93,7 +112,12 @@ export class CertificatesV1alpha1Api { return CertificatesV1alpha1.toClusterTrustBundle(resp); } - async patchClusterTrustBundle(name: string, type: c.PatchType, body: CertificatesV1alpha1.ClusterTrustBundle | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchClusterTrustBundle( + name: string, + type: c.PatchType, + body: CertificatesV1alpha1.ClusterTrustBundle | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}clustertrustbundles/${name}`, diff --git a/lib/builtin/coordination.k8s.io@v1/mod.ts b/lib/builtin/coordination.k8s.io@v1/mod.ts index 42c7559..a1b3307 100644 --- a/lib/builtin/coordination.k8s.io@v1/mod.ts +++ b/lib/builtin/coordination.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class CoordinationV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): CoordinationV1NamespacedApi { return new CoordinationV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): CoordinationV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new CoordinationV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getLeaseListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getLeaseListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}leases`, @@ -32,7 +34,9 @@ export class CoordinationV1Api { return CoordinationV1.toLeaseList(resp); } - async watchLeaseListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchLeaseListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}leases`, @@ -54,7 +58,9 @@ export class CoordinationV1NamespacedApi { this.#root = `/apis/coordination.k8s.io/v1/namespaces/${namespace}/`; } - async getLeaseList(opts: operations.GetListOpts = {}) { + async getLeaseList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}leases`, @@ -65,7 +71,9 @@ export class CoordinationV1NamespacedApi { return CoordinationV1.toLeaseList(resp); } - async watchLeaseList(opts: operations.WatchListOpts = {}) { + async watchLeaseList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}leases`, @@ -77,7 +85,10 @@ export class CoordinationV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoordinationV1.toLease, MetaV1.toStatus)); } - async createLease(body: CoordinationV1.Lease, opts: operations.PutOpts = {}) { + async createLease( + body: CoordinationV1.Lease, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}leases`, @@ -89,7 +100,9 @@ export class CoordinationV1NamespacedApi { return CoordinationV1.toLease(resp); } - async deleteLeaseList(opts: operations.DeleteListOpts = {}) { + async deleteLeaseList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}leases`, @@ -100,7 +113,10 @@ export class CoordinationV1NamespacedApi { return CoordinationV1.toLeaseList(resp); } - async getLease(name: string, opts: operations.NoOpts = {}) { + async getLease( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}leases/${name}`, @@ -110,7 +126,10 @@ export class CoordinationV1NamespacedApi { return CoordinationV1.toLease(resp); } - async deleteLease(name: string, opts: operations.DeleteOpts = {}) { + async deleteLease( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}leases/${name}`, @@ -122,7 +141,11 @@ export class CoordinationV1NamespacedApi { return CoordinationV1.toLease(resp); } - async replaceLease(name: string, body: CoordinationV1.Lease, opts: operations.PutOpts = {}) { + async replaceLease( + name: string, + body: CoordinationV1.Lease, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}leases/${name}`, @@ -134,7 +157,12 @@ export class CoordinationV1NamespacedApi { return CoordinationV1.toLease(resp); } - async patchLease(name: string, type: c.PatchType, body: CoordinationV1.Lease | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchLease( + name: string, + type: c.PatchType, + body: CoordinationV1.Lease | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}leases/${name}`, diff --git a/lib/builtin/core@v1/mod.ts b/lib/builtin/core@v1/mod.ts index 2a4560c..747ee66 100644 --- a/lib/builtin/core@v1/mod.ts +++ b/lib/builtin/core@v1/mod.ts @@ -17,15 +17,17 @@ export class CoreV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): CoreV1NamespacedApi { return new CoreV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): CoreV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new CoreV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getComponentStatusList(opts: operations.GetListOpts = {}) { + async getComponentStatusList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}componentstatuses`, @@ -36,7 +38,10 @@ export class CoreV1Api { return CoreV1.toComponentStatusList(resp); } - async getComponentStatus(name: string, opts: operations.NoOpts = {}) { + async getComponentStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}componentstatuses/${name}`, @@ -46,7 +51,9 @@ export class CoreV1Api { return CoreV1.toComponentStatus(resp); } - async getConfigMapListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getConfigMapListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}configmaps`, @@ -57,7 +64,9 @@ export class CoreV1Api { return CoreV1.toConfigMapList(resp); } - async watchConfigMapListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchConfigMapListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}configmaps`, @@ -69,7 +78,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toConfigMap, MetaV1.toStatus)); } - async getEndpointsListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getEndpointsListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpoints`, @@ -80,7 +91,9 @@ export class CoreV1Api { return CoreV1.toEndpointsList(resp); } - async watchEndpointsListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchEndpointsListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpoints`, @@ -92,7 +105,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toEndpoints, MetaV1.toStatus)); } - async getEventListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getEventListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -103,7 +118,9 @@ export class CoreV1Api { return CoreV1.toEventList(resp); } - async watchEventListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchEventListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -115,7 +132,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toEvent, MetaV1.toStatus)); } - async getLimitRangeListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getLimitRangeListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}limitranges`, @@ -126,7 +145,9 @@ export class CoreV1Api { return CoreV1.toLimitRangeList(resp); } - async watchLimitRangeListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchLimitRangeListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}limitranges`, @@ -138,7 +159,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toLimitRange, MetaV1.toStatus)); } - async getNamespaceList(opts: operations.GetListOpts = {}) { + async getNamespaceList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}namespaces`, @@ -149,7 +172,9 @@ export class CoreV1Api { return CoreV1.toNamespaceList(resp); } - async watchNamespaceList(opts: operations.WatchListOpts = {}) { + async watchNamespaceList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}namespaces`, @@ -161,7 +186,10 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toNamespace, MetaV1.toStatus)); } - async createNamespace(body: CoreV1.Namespace, opts: operations.PutOpts = {}) { + async createNamespace( + body: CoreV1.Namespace, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}namespaces`, @@ -173,7 +201,10 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async getNamespace(name: string, opts: operations.NoOpts = {}) { + async getNamespace( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}namespaces/${name}`, @@ -183,7 +214,10 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async deleteNamespace(name: string, opts: operations.DeleteOpts = {}) { + async deleteNamespace( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}namespaces/${name}`, @@ -195,7 +229,11 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async replaceNamespace(name: string, body: CoreV1.Namespace, opts: operations.PutOpts = {}) { + async replaceNamespace( + name: string, + body: CoreV1.Namespace, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}namespaces/${name}`, @@ -207,7 +245,12 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async patchNamespace(name: string, type: c.PatchType, body: CoreV1.Namespace | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchNamespace( + name: string, + type: c.PatchType, + body: CoreV1.Namespace | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}namespaces/${name}`, @@ -220,7 +263,11 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async replaceNamespaceFinalize(name: string, body: CoreV1.Namespace, opts: operations.PutOpts = {}) { + async replaceNamespaceFinalize( + name: string, + body: CoreV1.Namespace, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}namespaces/${name}/finalize`, @@ -232,7 +279,10 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async getNamespaceStatus(name: string, opts: operations.NoOpts = {}) { + async getNamespaceStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}namespaces/${name}/status`, @@ -242,7 +292,11 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async replaceNamespaceStatus(name: string, body: CoreV1.Namespace, opts: operations.PutOpts = {}) { + async replaceNamespaceStatus( + name: string, + body: CoreV1.Namespace, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}namespaces/${name}/status`, @@ -254,7 +308,12 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async patchNamespaceStatus(name: string, type: c.PatchType, body: CoreV1.Namespace | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchNamespaceStatus( + name: string, + type: c.PatchType, + body: CoreV1.Namespace | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}namespaces/${name}/status`, @@ -267,7 +326,9 @@ export class CoreV1Api { return CoreV1.toNamespace(resp); } - async getNodeList(opts: operations.GetListOpts = {}) { + async getNodeList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}nodes`, @@ -278,7 +339,9 @@ export class CoreV1Api { return CoreV1.toNodeList(resp); } - async watchNodeList(opts: operations.WatchListOpts = {}) { + async watchNodeList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}nodes`, @@ -290,7 +353,10 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toNode, MetaV1.toStatus)); } - async createNode(body: CoreV1.Node, opts: operations.PutOpts = {}) { + async createNode( + body: CoreV1.Node, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}nodes`, @@ -302,7 +368,9 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async deleteNodeList(opts: operations.DeleteListOpts = {}) { + async deleteNodeList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}nodes`, @@ -313,7 +381,10 @@ export class CoreV1Api { return CoreV1.toNodeList(resp); } - async getNode(name: string, opts: operations.NoOpts = {}) { + async getNode( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}nodes/${name}`, @@ -323,7 +394,10 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async deleteNode(name: string, opts: operations.DeleteOpts = {}) { + async deleteNode( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}nodes/${name}`, @@ -335,7 +409,11 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async replaceNode(name: string, body: CoreV1.Node, opts: operations.PutOpts = {}) { + async replaceNode( + name: string, + body: CoreV1.Node, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}nodes/${name}`, @@ -347,7 +425,12 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async patchNode(name: string, type: c.PatchType, body: CoreV1.Node | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchNode( + name: string, + type: c.PatchType, + body: CoreV1.Node | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}nodes/${name}`, @@ -360,18 +443,36 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - proxyNodeRequest(nodeName: string, opts: c.ProxyOptions & {expectStream: true; expectJson: true}): Promise>; - proxyNodeRequest(nodeName: string, opts: c.ProxyOptions & {expectStream: true}): Promise>; - proxyNodeRequest(nodeName: string, opts: c.ProxyOptions & {expectJson: true}): Promise; - proxyNodeRequest(nodeName: string, opts: c.ProxyOptions): Promise; - async proxyNodeRequest(nodeName: string, opts: c.ProxyOptions): Promise { + proxyNodeRequest( + nodeName: string, + opts: c.ProxyOptions & {expectStream: true; expectJson: true}, + ): Promise>; + proxyNodeRequest( + nodeName: string, + opts: c.ProxyOptions & {expectStream: true}, + ): Promise>; + proxyNodeRequest( + nodeName: string, + opts: c.ProxyOptions & {expectJson: true}, + ): Promise; + proxyNodeRequest( + nodeName: string, + opts: c.ProxyOptions, + ): Promise; + async proxyNodeRequest( + nodeName: string, + opts: c.ProxyOptions, + ): Promise { if (opts.path && !opts.path.startsWith('/')) throw new Error("Proxy path cannot be relative"); const name = (opts.port != null) ? `${nodeName}:${opts.port}` : nodeName; const path = `${this.#root}nodes/${name}/proxy${opts.path || ''}`; return await this.#client.performRequest({ ...opts, path }); } - async getNodeStatus(name: string, opts: operations.NoOpts = {}) { + async getNodeStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}nodes/${name}/status`, @@ -381,7 +482,11 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async replaceNodeStatus(name: string, body: CoreV1.Node, opts: operations.PutOpts = {}) { + async replaceNodeStatus( + name: string, + body: CoreV1.Node, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}nodes/${name}/status`, @@ -393,7 +498,12 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async patchNodeStatus(name: string, type: c.PatchType, body: CoreV1.Node | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchNodeStatus( + name: string, + type: c.PatchType, + body: CoreV1.Node | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}nodes/${name}/status`, @@ -406,7 +516,9 @@ export class CoreV1Api { return CoreV1.toNode(resp); } - async getPersistentVolumeClaimListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getPersistentVolumeClaimListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumeclaims`, @@ -417,7 +529,9 @@ export class CoreV1Api { return CoreV1.toPersistentVolumeClaimList(resp); } - async watchPersistentVolumeClaimListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchPersistentVolumeClaimListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumeclaims`, @@ -429,7 +543,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPersistentVolumeClaim, MetaV1.toStatus)); } - async getPersistentVolumeList(opts: operations.GetListOpts = {}) { + async getPersistentVolumeList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumes`, @@ -440,7 +556,9 @@ export class CoreV1Api { return CoreV1.toPersistentVolumeList(resp); } - async watchPersistentVolumeList(opts: operations.WatchListOpts = {}) { + async watchPersistentVolumeList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumes`, @@ -452,7 +570,10 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPersistentVolume, MetaV1.toStatus)); } - async createPersistentVolume(body: CoreV1.PersistentVolume, opts: operations.PutOpts = {}) { + async createPersistentVolume( + body: CoreV1.PersistentVolume, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}persistentvolumes`, @@ -464,7 +585,9 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async deletePersistentVolumeList(opts: operations.DeleteListOpts = {}) { + async deletePersistentVolumeList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}persistentvolumes`, @@ -475,7 +598,10 @@ export class CoreV1Api { return CoreV1.toPersistentVolumeList(resp); } - async getPersistentVolume(name: string, opts: operations.NoOpts = {}) { + async getPersistentVolume( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumes/${name}`, @@ -485,7 +611,10 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async deletePersistentVolume(name: string, opts: operations.DeleteOpts = {}) { + async deletePersistentVolume( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}persistentvolumes/${name}`, @@ -497,7 +626,11 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async replacePersistentVolume(name: string, body: CoreV1.PersistentVolume, opts: operations.PutOpts = {}) { + async replacePersistentVolume( + name: string, + body: CoreV1.PersistentVolume, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}persistentvolumes/${name}`, @@ -509,7 +642,12 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async patchPersistentVolume(name: string, type: c.PatchType, body: CoreV1.PersistentVolume | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPersistentVolume( + name: string, + type: c.PatchType, + body: CoreV1.PersistentVolume | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}persistentvolumes/${name}`, @@ -522,7 +660,10 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async getPersistentVolumeStatus(name: string, opts: operations.NoOpts = {}) { + async getPersistentVolumeStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumes/${name}/status`, @@ -532,7 +673,11 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async replacePersistentVolumeStatus(name: string, body: CoreV1.PersistentVolume, opts: operations.PutOpts = {}) { + async replacePersistentVolumeStatus( + name: string, + body: CoreV1.PersistentVolume, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}persistentvolumes/${name}/status`, @@ -544,7 +689,12 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async patchPersistentVolumeStatus(name: string, type: c.PatchType, body: CoreV1.PersistentVolume | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPersistentVolumeStatus( + name: string, + type: c.PatchType, + body: CoreV1.PersistentVolume | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}persistentvolumes/${name}/status`, @@ -557,7 +707,9 @@ export class CoreV1Api { return CoreV1.toPersistentVolume(resp); } - async getPodListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getPodListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods`, @@ -568,7 +720,9 @@ export class CoreV1Api { return CoreV1.toPodList(resp); } - async watchPodListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchPodListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods`, @@ -580,7 +734,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPod, MetaV1.toStatus)); } - async getPodTemplateListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getPodTemplateListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podtemplates`, @@ -591,7 +747,9 @@ export class CoreV1Api { return CoreV1.toPodTemplateList(resp); } - async watchPodTemplateListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchPodTemplateListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podtemplates`, @@ -603,7 +761,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPodTemplate, MetaV1.toStatus)); } - async getReplicationControllerListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getReplicationControllerListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers`, @@ -614,7 +774,9 @@ export class CoreV1Api { return CoreV1.toReplicationControllerList(resp); } - async watchReplicationControllerListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchReplicationControllerListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers`, @@ -626,7 +788,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toReplicationController, MetaV1.toStatus)); } - async getResourceQuotaListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getResourceQuotaListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourcequotas`, @@ -637,7 +801,9 @@ export class CoreV1Api { return CoreV1.toResourceQuotaList(resp); } - async watchResourceQuotaListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchResourceQuotaListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourcequotas`, @@ -649,7 +815,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toResourceQuota, MetaV1.toStatus)); } - async getSecretListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getSecretListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}secrets`, @@ -660,7 +828,9 @@ export class CoreV1Api { return CoreV1.toSecretList(resp); } - async watchSecretListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchSecretListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}secrets`, @@ -672,7 +842,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toSecret, MetaV1.toStatus)); } - async getServiceAccountListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getServiceAccountListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}serviceaccounts`, @@ -683,7 +855,9 @@ export class CoreV1Api { return CoreV1.toServiceAccountList(resp); } - async watchServiceAccountListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchServiceAccountListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}serviceaccounts`, @@ -695,7 +869,9 @@ export class CoreV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toServiceAccount, MetaV1.toStatus)); } - async getServiceListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getServiceListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}services`, @@ -706,7 +882,9 @@ export class CoreV1Api { return CoreV1.toServiceList(resp); } - async watchServiceListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchServiceListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}services`, @@ -728,7 +906,10 @@ export class CoreV1NamespacedApi { this.#root = `/api/v1/namespaces/${namespace}/`; } - async createBinding(body: CoreV1.Binding, opts: operations.PutOpts = {}) { + async createBinding( + body: CoreV1.Binding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}bindings`, @@ -740,7 +921,9 @@ export class CoreV1NamespacedApi { return CoreV1.toBinding(resp); } - async getConfigMapList(opts: operations.GetListOpts = {}) { + async getConfigMapList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}configmaps`, @@ -751,7 +934,9 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMapList(resp); } - async watchConfigMapList(opts: operations.WatchListOpts = {}) { + async watchConfigMapList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}configmaps`, @@ -763,7 +948,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toConfigMap, MetaV1.toStatus)); } - async createConfigMap(body: CoreV1.ConfigMap, opts: operations.PutOpts = {}) { + async createConfigMap( + body: CoreV1.ConfigMap, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}configmaps`, @@ -775,7 +963,9 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMap(resp); } - async deleteConfigMapList(opts: operations.DeleteListOpts = {}) { + async deleteConfigMapList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}configmaps`, @@ -786,7 +976,10 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMapList(resp); } - async getConfigMap(name: string, opts: operations.NoOpts = {}) { + async getConfigMap( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}configmaps/${name}`, @@ -796,7 +989,10 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMap(resp); } - async deleteConfigMap(name: string, opts: operations.DeleteOpts = {}) { + async deleteConfigMap( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}configmaps/${name}`, @@ -808,7 +1004,11 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMap(resp); } - async replaceConfigMap(name: string, body: CoreV1.ConfigMap, opts: operations.PutOpts = {}) { + async replaceConfigMap( + name: string, + body: CoreV1.ConfigMap, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}configmaps/${name}`, @@ -820,7 +1020,12 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMap(resp); } - async patchConfigMap(name: string, type: c.PatchType, body: CoreV1.ConfigMap | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchConfigMap( + name: string, + type: c.PatchType, + body: CoreV1.ConfigMap | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}configmaps/${name}`, @@ -833,7 +1038,9 @@ export class CoreV1NamespacedApi { return CoreV1.toConfigMap(resp); } - async getEndpointsList(opts: operations.GetListOpts = {}) { + async getEndpointsList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpoints`, @@ -844,7 +1051,9 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpointsList(resp); } - async watchEndpointsList(opts: operations.WatchListOpts = {}) { + async watchEndpointsList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpoints`, @@ -856,7 +1065,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toEndpoints, MetaV1.toStatus)); } - async createEndpoints(body: CoreV1.Endpoints, opts: operations.PutOpts = {}) { + async createEndpoints( + body: CoreV1.Endpoints, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}endpoints`, @@ -868,7 +1080,9 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpoints(resp); } - async deleteEndpointsList(opts: operations.DeleteListOpts = {}) { + async deleteEndpointsList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}endpoints`, @@ -879,7 +1093,10 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpointsList(resp); } - async getEndpoints(name: string, opts: operations.NoOpts = {}) { + async getEndpoints( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpoints/${name}`, @@ -889,7 +1106,10 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpoints(resp); } - async deleteEndpoints(name: string, opts: operations.DeleteOpts = {}) { + async deleteEndpoints( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}endpoints/${name}`, @@ -901,7 +1121,11 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpoints(resp); } - async replaceEndpoints(name: string, body: CoreV1.Endpoints, opts: operations.PutOpts = {}) { + async replaceEndpoints( + name: string, + body: CoreV1.Endpoints, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}endpoints/${name}`, @@ -913,7 +1137,12 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpoints(resp); } - async patchEndpoints(name: string, type: c.PatchType, body: CoreV1.Endpoints | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchEndpoints( + name: string, + type: c.PatchType, + body: CoreV1.Endpoints | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}endpoints/${name}`, @@ -926,7 +1155,9 @@ export class CoreV1NamespacedApi { return CoreV1.toEndpoints(resp); } - async getEventList(opts: operations.GetListOpts = {}) { + async getEventList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -937,7 +1168,9 @@ export class CoreV1NamespacedApi { return CoreV1.toEventList(resp); } - async watchEventList(opts: operations.WatchListOpts = {}) { + async watchEventList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -949,7 +1182,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toEvent, MetaV1.toStatus)); } - async createEvent(body: CoreV1.Event, opts: operations.PutOpts = {}) { + async createEvent( + body: CoreV1.Event, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}events`, @@ -961,7 +1197,9 @@ export class CoreV1NamespacedApi { return CoreV1.toEvent(resp); } - async deleteEventList(opts: operations.DeleteListOpts = {}) { + async deleteEventList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}events`, @@ -972,7 +1210,10 @@ export class CoreV1NamespacedApi { return CoreV1.toEventList(resp); } - async getEvent(name: string, opts: operations.NoOpts = {}) { + async getEvent( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events/${name}`, @@ -982,7 +1223,10 @@ export class CoreV1NamespacedApi { return CoreV1.toEvent(resp); } - async deleteEvent(name: string, opts: operations.DeleteOpts = {}) { + async deleteEvent( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}events/${name}`, @@ -994,7 +1238,11 @@ export class CoreV1NamespacedApi { return CoreV1.toEvent(resp); } - async replaceEvent(name: string, body: CoreV1.Event, opts: operations.PutOpts = {}) { + async replaceEvent( + name: string, + body: CoreV1.Event, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}events/${name}`, @@ -1006,7 +1254,12 @@ export class CoreV1NamespacedApi { return CoreV1.toEvent(resp); } - async patchEvent(name: string, type: c.PatchType, body: CoreV1.Event | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchEvent( + name: string, + type: c.PatchType, + body: CoreV1.Event | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}events/${name}`, @@ -1019,7 +1272,9 @@ export class CoreV1NamespacedApi { return CoreV1.toEvent(resp); } - async getLimitRangeList(opts: operations.GetListOpts = {}) { + async getLimitRangeList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}limitranges`, @@ -1030,7 +1285,9 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRangeList(resp); } - async watchLimitRangeList(opts: operations.WatchListOpts = {}) { + async watchLimitRangeList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}limitranges`, @@ -1042,7 +1299,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toLimitRange, MetaV1.toStatus)); } - async createLimitRange(body: CoreV1.LimitRange, opts: operations.PutOpts = {}) { + async createLimitRange( + body: CoreV1.LimitRange, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}limitranges`, @@ -1054,7 +1314,9 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRange(resp); } - async deleteLimitRangeList(opts: operations.DeleteListOpts = {}) { + async deleteLimitRangeList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}limitranges`, @@ -1065,7 +1327,10 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRangeList(resp); } - async getLimitRange(name: string, opts: operations.NoOpts = {}) { + async getLimitRange( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}limitranges/${name}`, @@ -1075,7 +1340,10 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRange(resp); } - async deleteLimitRange(name: string, opts: operations.DeleteOpts = {}) { + async deleteLimitRange( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}limitranges/${name}`, @@ -1087,7 +1355,11 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRange(resp); } - async replaceLimitRange(name: string, body: CoreV1.LimitRange, opts: operations.PutOpts = {}) { + async replaceLimitRange( + name: string, + body: CoreV1.LimitRange, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}limitranges/${name}`, @@ -1099,7 +1371,12 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRange(resp); } - async patchLimitRange(name: string, type: c.PatchType, body: CoreV1.LimitRange | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchLimitRange( + name: string, + type: c.PatchType, + body: CoreV1.LimitRange | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}limitranges/${name}`, @@ -1112,7 +1389,9 @@ export class CoreV1NamespacedApi { return CoreV1.toLimitRange(resp); } - async getPersistentVolumeClaimList(opts: operations.GetListOpts = {}) { + async getPersistentVolumeClaimList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumeclaims`, @@ -1123,7 +1402,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaimList(resp); } - async watchPersistentVolumeClaimList(opts: operations.WatchListOpts = {}) { + async watchPersistentVolumeClaimList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumeclaims`, @@ -1135,7 +1416,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPersistentVolumeClaim, MetaV1.toStatus)); } - async createPersistentVolumeClaim(body: CoreV1.PersistentVolumeClaim, opts: operations.PutOpts = {}) { + async createPersistentVolumeClaim( + body: CoreV1.PersistentVolumeClaim, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}persistentvolumeclaims`, @@ -1147,7 +1431,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async deletePersistentVolumeClaimList(opts: operations.DeleteListOpts = {}) { + async deletePersistentVolumeClaimList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}persistentvolumeclaims`, @@ -1158,7 +1444,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaimList(resp); } - async getPersistentVolumeClaim(name: string, opts: operations.NoOpts = {}) { + async getPersistentVolumeClaim( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumeclaims/${name}`, @@ -1168,7 +1457,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async deletePersistentVolumeClaim(name: string, opts: operations.DeleteOpts = {}) { + async deletePersistentVolumeClaim( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}persistentvolumeclaims/${name}`, @@ -1180,7 +1472,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async replacePersistentVolumeClaim(name: string, body: CoreV1.PersistentVolumeClaim, opts: operations.PutOpts = {}) { + async replacePersistentVolumeClaim( + name: string, + body: CoreV1.PersistentVolumeClaim, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}persistentvolumeclaims/${name}`, @@ -1192,7 +1488,12 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async patchPersistentVolumeClaim(name: string, type: c.PatchType, body: CoreV1.PersistentVolumeClaim | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPersistentVolumeClaim( + name: string, + type: c.PatchType, + body: CoreV1.PersistentVolumeClaim | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}persistentvolumeclaims/${name}`, @@ -1205,7 +1506,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async getPersistentVolumeClaimStatus(name: string, opts: operations.NoOpts = {}) { + async getPersistentVolumeClaimStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}persistentvolumeclaims/${name}/status`, @@ -1215,7 +1519,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async replacePersistentVolumeClaimStatus(name: string, body: CoreV1.PersistentVolumeClaim, opts: operations.PutOpts = {}) { + async replacePersistentVolumeClaimStatus( + name: string, + body: CoreV1.PersistentVolumeClaim, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}persistentvolumeclaims/${name}/status`, @@ -1227,7 +1535,12 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async patchPersistentVolumeClaimStatus(name: string, type: c.PatchType, body: CoreV1.PersistentVolumeClaim | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPersistentVolumeClaimStatus( + name: string, + type: c.PatchType, + body: CoreV1.PersistentVolumeClaim | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}persistentvolumeclaims/${name}/status`, @@ -1240,7 +1553,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPersistentVolumeClaim(resp); } - async getPodList(opts: operations.GetListOpts = {}) { + async getPodList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods`, @@ -1251,7 +1566,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPodList(resp); } - async watchPodList(opts: operations.WatchListOpts = {}) { + async watchPodList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods`, @@ -1263,7 +1580,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPod, MetaV1.toStatus)); } - async createPod(body: CoreV1.Pod, opts: operations.PutOpts = {}) { + async createPod( + body: CoreV1.Pod, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}pods`, @@ -1275,7 +1595,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async deletePodList(opts: operations.DeleteListOpts = {}) { + async deletePodList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}pods`, @@ -1286,7 +1608,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPodList(resp); } - async getPod(name: string, opts: operations.NoOpts = {}) { + async getPod( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods/${name}`, @@ -1296,7 +1621,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async deletePod(name: string, opts: operations.DeleteOpts = {}) { + async deletePod( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}pods/${name}`, @@ -1308,7 +1636,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async replacePod(name: string, body: CoreV1.Pod, opts: operations.PutOpts = {}) { + async replacePod( + name: string, + body: CoreV1.Pod, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}pods/${name}`, @@ -1320,7 +1652,12 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async patchPod(name: string, type: c.PatchType, body: CoreV1.Pod | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPod( + name: string, + type: c.PatchType, + body: CoreV1.Pod | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}pods/${name}`, @@ -1333,14 +1670,17 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async tunnelPodAttach(name: string, opts: { - container?: string; - stderr?: boolean; - stdin?: boolean; - stdout: boolean; - tty?: boolean; - abortSignal?: AbortSignal; - }) { + async tunnelPodAttach( + name: string, + opts: { + container?: string; + stderr?: boolean; + stdin?: boolean; + stdout: boolean; + tty?: boolean; + abortSignal?: AbortSignal; + }, + ): Promise { const query = new URLSearchParams; if (opts["container"] != null) query.append("container", opts["container"]); if (opts["stderr"] != null) query.append("stderr", opts["stderr"] ? '1' : '0'); @@ -1360,7 +1700,11 @@ export class CoreV1NamespacedApi { return tunnel; } - async createPodBinding(name: string, body: CoreV1.Binding, opts: operations.PutOpts = {}) { + async createPodBinding( + name: string, + body: CoreV1.Binding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}pods/${name}/binding`, @@ -1372,7 +1716,10 @@ export class CoreV1NamespacedApi { return CoreV1.toBinding(resp); } - async getPodEphemeralcontainers(name: string, opts: operations.NoOpts = {}) { + async getPodEphemeralcontainers( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods/${name}/ephemeralcontainers`, @@ -1382,7 +1729,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async replacePodEphemeralcontainers(name: string, body: CoreV1.Pod, opts: operations.PutOpts = {}) { + async replacePodEphemeralcontainers( + name: string, + body: CoreV1.Pod, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}pods/${name}/ephemeralcontainers`, @@ -1394,7 +1745,12 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async patchPodEphemeralcontainers(name: string, type: c.PatchType, body: CoreV1.Pod | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodEphemeralcontainers( + name: string, + type: c.PatchType, + body: CoreV1.Pod | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}pods/${name}/ephemeralcontainers`, @@ -1407,7 +1763,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async createPodEviction(name: string, body: PolicyV1.Eviction, opts: operations.PutOpts = {}) { + async createPodEviction( + name: string, + body: PolicyV1.Eviction, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}pods/${name}/eviction`, @@ -1419,15 +1779,18 @@ export class CoreV1NamespacedApi { return PolicyV1.toEviction(resp); } - async tunnelPodExec(name: string, opts: { - command: Array; - container?: string; - stderr?: boolean; - stdin?: boolean; - stdout: boolean; - tty?: boolean; - abortSignal?: AbortSignal; - }) { + async tunnelPodExec( + name: string, + opts: { + command: Array; + container?: string; + stderr?: boolean; + stdin?: boolean; + stdout: boolean; + tty?: boolean; + abortSignal?: AbortSignal; + }, + ): Promise { const query = new URLSearchParams; for (const item of opts["command"]) query.append("command", item); if (opts["container"] != null) query.append("container", opts["container"]); @@ -1448,17 +1811,20 @@ export class CoreV1NamespacedApi { return tunnel; } - async streamPodLog(name: string, opts: { - container?: string; - follow?: boolean; - insecureSkipTLSVerifyBackend?: boolean; - limitBytes?: number; - previous?: boolean; - sinceSeconds?: number; - tailLines?: number; - timestamps?: boolean; - abortSignal?: AbortSignal; - } = {}) { + async streamPodLog( + name: string, + opts: { + container?: string; + follow?: boolean; + insecureSkipTLSVerifyBackend?: boolean; + limitBytes?: number; + previous?: boolean; + sinceSeconds?: number; + tailLines?: number; + timestamps?: boolean; + abortSignal?: AbortSignal; + } = {}, + ): Promise> { const query = new URLSearchParams; if (opts["container"] != null) query.append("container", opts["container"]); if (opts["follow"] != null) query.append("follow", opts["follow"] ? '1' : '0'); @@ -1478,16 +1844,19 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new TextDecoderStream('utf-8')); } - async getPodLog(name: string, opts: { - container?: string; - insecureSkipTLSVerifyBackend?: boolean; - limitBytes?: number; - previous?: boolean; - sinceSeconds?: number; - tailLines?: number; - timestamps?: boolean; - abortSignal?: AbortSignal; - } = {}) { + async getPodLog( + name: string, + opts: { + container?: string; + insecureSkipTLSVerifyBackend?: boolean; + limitBytes?: number; + previous?: boolean; + sinceSeconds?: number; + tailLines?: number; + timestamps?: boolean; + abortSignal?: AbortSignal; + } = {}, + ): Promise { const query = new URLSearchParams; if (opts["container"] != null) query.append("container", opts["container"]); if (opts["insecureSkipTLSVerifyBackend"] != null) query.append("insecureSkipTLSVerifyBackend", opts["insecureSkipTLSVerifyBackend"] ? '1' : '0'); @@ -1505,10 +1874,13 @@ export class CoreV1NamespacedApi { return new TextDecoder('utf-8').decode(resp); } - async tunnelPodPortforward(name: string, opts: { - ports?: Array; - abortSignal?: AbortSignal; - } = {}) { + async tunnelPodPortforward( + name: string, + opts: { + ports?: Array; + abortSignal?: AbortSignal; + } = {}, + ): Promise { const query = new URLSearchParams; for (const item of opts["ports"] ?? []) query.append("ports", String(item)); const resp = await this.#client.performRequest({ @@ -1524,18 +1896,36 @@ export class CoreV1NamespacedApi { return tunnel; } - proxyPodRequest(podName: string, opts: c.ProxyOptions & {expectStream: true; expectJson: true}): Promise>; - proxyPodRequest(podName: string, opts: c.ProxyOptions & {expectStream: true}): Promise>; - proxyPodRequest(podName: string, opts: c.ProxyOptions & {expectJson: true}): Promise; - proxyPodRequest(podName: string, opts: c.ProxyOptions): Promise; - async proxyPodRequest(podName: string, opts: c.ProxyOptions): Promise { + proxyPodRequest( + podName: string, + opts: c.ProxyOptions & {expectStream: true; expectJson: true}, + ): Promise>; + proxyPodRequest( + podName: string, + opts: c.ProxyOptions & {expectStream: true}, + ): Promise>; + proxyPodRequest( + podName: string, + opts: c.ProxyOptions & {expectJson: true}, + ): Promise; + proxyPodRequest( + podName: string, + opts: c.ProxyOptions, + ): Promise; + async proxyPodRequest( + podName: string, + opts: c.ProxyOptions, + ): Promise { if (opts.path && !opts.path.startsWith('/')) throw new Error("Proxy path cannot be relative"); const name = (opts.port != null) ? `${podName}:${opts.port}` : podName; const path = `${this.#root}pods/${name}/proxy${opts.path || ''}`; return await this.#client.performRequest({ ...opts, path }); } - async getPodStatus(name: string, opts: operations.NoOpts = {}) { + async getPodStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}pods/${name}/status`, @@ -1545,7 +1935,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async replacePodStatus(name: string, body: CoreV1.Pod, opts: operations.PutOpts = {}) { + async replacePodStatus( + name: string, + body: CoreV1.Pod, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}pods/${name}/status`, @@ -1557,7 +1951,12 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async patchPodStatus(name: string, type: c.PatchType, body: CoreV1.Pod | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodStatus( + name: string, + type: c.PatchType, + body: CoreV1.Pod | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}pods/${name}/status`, @@ -1570,7 +1969,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPod(resp); } - async getPodTemplateList(opts: operations.GetListOpts = {}) { + async getPodTemplateList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podtemplates`, @@ -1581,7 +1982,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplateList(resp); } - async watchPodTemplateList(opts: operations.WatchListOpts = {}) { + async watchPodTemplateList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podtemplates`, @@ -1593,7 +1996,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toPodTemplate, MetaV1.toStatus)); } - async createPodTemplate(body: CoreV1.PodTemplate, opts: operations.PutOpts = {}) { + async createPodTemplate( + body: CoreV1.PodTemplate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}podtemplates`, @@ -1605,7 +2011,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplate(resp); } - async deletePodTemplateList(opts: operations.DeleteListOpts = {}) { + async deletePodTemplateList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}podtemplates`, @@ -1616,7 +2024,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplateList(resp); } - async getPodTemplate(name: string, opts: operations.NoOpts = {}) { + async getPodTemplate( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podtemplates/${name}`, @@ -1626,7 +2037,10 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplate(resp); } - async deletePodTemplate(name: string, opts: operations.DeleteOpts = {}) { + async deletePodTemplate( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}podtemplates/${name}`, @@ -1638,7 +2052,11 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplate(resp); } - async replacePodTemplate(name: string, body: CoreV1.PodTemplate, opts: operations.PutOpts = {}) { + async replacePodTemplate( + name: string, + body: CoreV1.PodTemplate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}podtemplates/${name}`, @@ -1650,7 +2068,12 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplate(resp); } - async patchPodTemplate(name: string, type: c.PatchType, body: CoreV1.PodTemplate | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodTemplate( + name: string, + type: c.PatchType, + body: CoreV1.PodTemplate | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}podtemplates/${name}`, @@ -1663,7 +2086,9 @@ export class CoreV1NamespacedApi { return CoreV1.toPodTemplate(resp); } - async getReplicationControllerList(opts: operations.GetListOpts = {}) { + async getReplicationControllerList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers`, @@ -1674,7 +2099,9 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationControllerList(resp); } - async watchReplicationControllerList(opts: operations.WatchListOpts = {}) { + async watchReplicationControllerList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers`, @@ -1686,7 +2113,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toReplicationController, MetaV1.toStatus)); } - async createReplicationController(body: CoreV1.ReplicationController, opts: operations.PutOpts = {}) { + async createReplicationController( + body: CoreV1.ReplicationController, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}replicationcontrollers`, @@ -1698,7 +2128,9 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async deleteReplicationControllerList(opts: operations.DeleteListOpts = {}) { + async deleteReplicationControllerList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}replicationcontrollers`, @@ -1709,7 +2141,10 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationControllerList(resp); } - async getReplicationController(name: string, opts: operations.NoOpts = {}) { + async getReplicationController( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers/${name}`, @@ -1719,7 +2154,10 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async deleteReplicationController(name: string, opts: operations.DeleteOpts = {}) { + async deleteReplicationController( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}replicationcontrollers/${name}`, @@ -1731,7 +2169,11 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async replaceReplicationController(name: string, body: CoreV1.ReplicationController, opts: operations.PutOpts = {}) { + async replaceReplicationController( + name: string, + body: CoreV1.ReplicationController, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}replicationcontrollers/${name}`, @@ -1743,7 +2185,12 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async patchReplicationController(name: string, type: c.PatchType, body: CoreV1.ReplicationController | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchReplicationController( + name: string, + type: c.PatchType, + body: CoreV1.ReplicationController | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}replicationcontrollers/${name}`, @@ -1756,7 +2203,10 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async getReplicationControllerScale(name: string, opts: operations.NoOpts = {}) { + async getReplicationControllerScale( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers/${name}/scale`, @@ -1766,7 +2216,11 @@ export class CoreV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async replaceReplicationControllerScale(name: string, body: AutoscalingV1.Scale, opts: operations.PutOpts = {}) { + async replaceReplicationControllerScale( + name: string, + body: AutoscalingV1.Scale, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}replicationcontrollers/${name}/scale`, @@ -1778,7 +2232,12 @@ export class CoreV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async patchReplicationControllerScale(name: string, type: c.PatchType, body: AutoscalingV1.Scale | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchReplicationControllerScale( + name: string, + type: c.PatchType, + body: AutoscalingV1.Scale | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}replicationcontrollers/${name}/scale`, @@ -1791,7 +2250,10 @@ export class CoreV1NamespacedApi { return AutoscalingV1.toScale(resp); } - async getReplicationControllerStatus(name: string, opts: operations.NoOpts = {}) { + async getReplicationControllerStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}replicationcontrollers/${name}/status`, @@ -1801,7 +2263,11 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async replaceReplicationControllerStatus(name: string, body: CoreV1.ReplicationController, opts: operations.PutOpts = {}) { + async replaceReplicationControllerStatus( + name: string, + body: CoreV1.ReplicationController, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}replicationcontrollers/${name}/status`, @@ -1813,7 +2279,12 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async patchReplicationControllerStatus(name: string, type: c.PatchType, body: CoreV1.ReplicationController | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchReplicationControllerStatus( + name: string, + type: c.PatchType, + body: CoreV1.ReplicationController | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}replicationcontrollers/${name}/status`, @@ -1826,7 +2297,9 @@ export class CoreV1NamespacedApi { return CoreV1.toReplicationController(resp); } - async getResourceQuotaList(opts: operations.GetListOpts = {}) { + async getResourceQuotaList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourcequotas`, @@ -1837,7 +2310,9 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuotaList(resp); } - async watchResourceQuotaList(opts: operations.WatchListOpts = {}) { + async watchResourceQuotaList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourcequotas`, @@ -1849,7 +2324,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toResourceQuota, MetaV1.toStatus)); } - async createResourceQuota(body: CoreV1.ResourceQuota, opts: operations.PutOpts = {}) { + async createResourceQuota( + body: CoreV1.ResourceQuota, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}resourcequotas`, @@ -1861,7 +2339,9 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async deleteResourceQuotaList(opts: operations.DeleteListOpts = {}) { + async deleteResourceQuotaList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourcequotas`, @@ -1872,7 +2352,10 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuotaList(resp); } - async getResourceQuota(name: string, opts: operations.NoOpts = {}) { + async getResourceQuota( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourcequotas/${name}`, @@ -1882,7 +2365,10 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async deleteResourceQuota(name: string, opts: operations.DeleteOpts = {}) { + async deleteResourceQuota( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourcequotas/${name}`, @@ -1894,7 +2380,11 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async replaceResourceQuota(name: string, body: CoreV1.ResourceQuota, opts: operations.PutOpts = {}) { + async replaceResourceQuota( + name: string, + body: CoreV1.ResourceQuota, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}resourcequotas/${name}`, @@ -1906,7 +2396,12 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async patchResourceQuota(name: string, type: c.PatchType, body: CoreV1.ResourceQuota | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchResourceQuota( + name: string, + type: c.PatchType, + body: CoreV1.ResourceQuota | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}resourcequotas/${name}`, @@ -1919,7 +2414,10 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async getResourceQuotaStatus(name: string, opts: operations.NoOpts = {}) { + async getResourceQuotaStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourcequotas/${name}/status`, @@ -1929,7 +2427,11 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async replaceResourceQuotaStatus(name: string, body: CoreV1.ResourceQuota, opts: operations.PutOpts = {}) { + async replaceResourceQuotaStatus( + name: string, + body: CoreV1.ResourceQuota, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}resourcequotas/${name}/status`, @@ -1941,7 +2443,12 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async patchResourceQuotaStatus(name: string, type: c.PatchType, body: CoreV1.ResourceQuota | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchResourceQuotaStatus( + name: string, + type: c.PatchType, + body: CoreV1.ResourceQuota | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}resourcequotas/${name}/status`, @@ -1954,7 +2461,9 @@ export class CoreV1NamespacedApi { return CoreV1.toResourceQuota(resp); } - async getSecretList(opts: operations.GetListOpts = {}) { + async getSecretList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}secrets`, @@ -1965,7 +2474,9 @@ export class CoreV1NamespacedApi { return CoreV1.toSecretList(resp); } - async watchSecretList(opts: operations.WatchListOpts = {}) { + async watchSecretList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}secrets`, @@ -1977,7 +2488,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toSecret, MetaV1.toStatus)); } - async createSecret(body: CoreV1.Secret, opts: operations.PutOpts = {}) { + async createSecret( + body: CoreV1.Secret, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}secrets`, @@ -1989,7 +2503,9 @@ export class CoreV1NamespacedApi { return CoreV1.toSecret(resp); } - async deleteSecretList(opts: operations.DeleteListOpts = {}) { + async deleteSecretList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}secrets`, @@ -2000,7 +2516,10 @@ export class CoreV1NamespacedApi { return CoreV1.toSecretList(resp); } - async getSecret(name: string, opts: operations.NoOpts = {}) { + async getSecret( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}secrets/${name}`, @@ -2010,7 +2529,10 @@ export class CoreV1NamespacedApi { return CoreV1.toSecret(resp); } - async deleteSecret(name: string, opts: operations.DeleteOpts = {}) { + async deleteSecret( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}secrets/${name}`, @@ -2022,7 +2544,11 @@ export class CoreV1NamespacedApi { return CoreV1.toSecret(resp); } - async replaceSecret(name: string, body: CoreV1.Secret, opts: operations.PutOpts = {}) { + async replaceSecret( + name: string, + body: CoreV1.Secret, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}secrets/${name}`, @@ -2034,7 +2560,12 @@ export class CoreV1NamespacedApi { return CoreV1.toSecret(resp); } - async patchSecret(name: string, type: c.PatchType, body: CoreV1.Secret | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchSecret( + name: string, + type: c.PatchType, + body: CoreV1.Secret | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}secrets/${name}`, @@ -2047,7 +2578,9 @@ export class CoreV1NamespacedApi { return CoreV1.toSecret(resp); } - async getServiceAccountList(opts: operations.GetListOpts = {}) { + async getServiceAccountList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}serviceaccounts`, @@ -2058,7 +2591,9 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccountList(resp); } - async watchServiceAccountList(opts: operations.WatchListOpts = {}) { + async watchServiceAccountList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}serviceaccounts`, @@ -2070,7 +2605,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toServiceAccount, MetaV1.toStatus)); } - async createServiceAccount(body: CoreV1.ServiceAccount, opts: operations.PutOpts = {}) { + async createServiceAccount( + body: CoreV1.ServiceAccount, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}serviceaccounts`, @@ -2082,7 +2620,9 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccount(resp); } - async deleteServiceAccountList(opts: operations.DeleteListOpts = {}) { + async deleteServiceAccountList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}serviceaccounts`, @@ -2093,7 +2633,10 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccountList(resp); } - async getServiceAccount(name: string, opts: operations.NoOpts = {}) { + async getServiceAccount( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}serviceaccounts/${name}`, @@ -2103,7 +2646,10 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccount(resp); } - async deleteServiceAccount(name: string, opts: operations.DeleteOpts = {}) { + async deleteServiceAccount( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}serviceaccounts/${name}`, @@ -2115,7 +2661,11 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccount(resp); } - async replaceServiceAccount(name: string, body: CoreV1.ServiceAccount, opts: operations.PutOpts = {}) { + async replaceServiceAccount( + name: string, + body: CoreV1.ServiceAccount, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}serviceaccounts/${name}`, @@ -2127,7 +2677,12 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccount(resp); } - async patchServiceAccount(name: string, type: c.PatchType, body: CoreV1.ServiceAccount | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchServiceAccount( + name: string, + type: c.PatchType, + body: CoreV1.ServiceAccount | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}serviceaccounts/${name}`, @@ -2140,7 +2695,11 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceAccount(resp); } - async createServiceAccountToken(name: string, body: AuthenticationV1.TokenRequest, opts: operations.PutOpts = {}) { + async createServiceAccountToken( + name: string, + body: AuthenticationV1.TokenRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}serviceaccounts/${name}/token`, @@ -2152,7 +2711,9 @@ export class CoreV1NamespacedApi { return AuthenticationV1.toTokenRequest(resp); } - async getServiceList(opts: operations.GetListOpts = {}) { + async getServiceList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}services`, @@ -2163,7 +2724,9 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceList(resp); } - async watchServiceList(opts: operations.WatchListOpts = {}) { + async watchServiceList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}services`, @@ -2175,7 +2738,10 @@ export class CoreV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CoreV1.toService, MetaV1.toStatus)); } - async createService(body: CoreV1.Service, opts: operations.PutOpts = {}) { + async createService( + body: CoreV1.Service, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}services`, @@ -2187,7 +2753,9 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - async deleteServiceList(opts: operations.DeleteListOpts = {}) { + async deleteServiceList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}services`, @@ -2198,7 +2766,10 @@ export class CoreV1NamespacedApi { return CoreV1.toServiceList(resp); } - async getService(name: string, opts: operations.NoOpts = {}) { + async getService( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}services/${name}`, @@ -2208,7 +2779,10 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - async deleteService(name: string, opts: operations.DeleteOpts = {}) { + async deleteService( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}services/${name}`, @@ -2220,7 +2794,11 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - async replaceService(name: string, body: CoreV1.Service, opts: operations.PutOpts = {}) { + async replaceService( + name: string, + body: CoreV1.Service, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}services/${name}`, @@ -2232,7 +2810,12 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - async patchService(name: string, type: c.PatchType, body: CoreV1.Service | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchService( + name: string, + type: c.PatchType, + body: CoreV1.Service | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}services/${name}`, @@ -2245,18 +2828,36 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - proxyServiceRequest(serviceName: string, opts: c.ProxyOptions & {expectStream: true; expectJson: true}): Promise>; - proxyServiceRequest(serviceName: string, opts: c.ProxyOptions & {expectStream: true}): Promise>; - proxyServiceRequest(serviceName: string, opts: c.ProxyOptions & {expectJson: true}): Promise; - proxyServiceRequest(serviceName: string, opts: c.ProxyOptions): Promise; - async proxyServiceRequest(serviceName: string, opts: c.ProxyOptions): Promise { + proxyServiceRequest( + serviceName: string, + opts: c.ProxyOptions & {expectStream: true; expectJson: true}, + ): Promise>; + proxyServiceRequest( + serviceName: string, + opts: c.ProxyOptions & {expectStream: true}, + ): Promise>; + proxyServiceRequest( + serviceName: string, + opts: c.ProxyOptions & {expectJson: true}, + ): Promise; + proxyServiceRequest( + serviceName: string, + opts: c.ProxyOptions, + ): Promise; + async proxyServiceRequest( + serviceName: string, + opts: c.ProxyOptions, + ): Promise { if (opts.path && !opts.path.startsWith('/')) throw new Error("Proxy path cannot be relative"); const name = (opts.port != null) ? `${serviceName}:${opts.port}` : serviceName; const path = `${this.#root}services/${name}/proxy${opts.path || ''}`; return await this.#client.performRequest({ ...opts, path }); } - async getServiceStatus(name: string, opts: operations.NoOpts = {}) { + async getServiceStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}services/${name}/status`, @@ -2266,7 +2867,11 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - async replaceServiceStatus(name: string, body: CoreV1.Service, opts: operations.PutOpts = {}) { + async replaceServiceStatus( + name: string, + body: CoreV1.Service, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}services/${name}/status`, @@ -2278,7 +2883,12 @@ export class CoreV1NamespacedApi { return CoreV1.toService(resp); } - async patchServiceStatus(name: string, type: c.PatchType, body: CoreV1.Service | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchServiceStatus( + name: string, + type: c.PatchType, + body: CoreV1.Service | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}services/${name}/status`, diff --git a/lib/builtin/discovery.k8s.io@v1/mod.ts b/lib/builtin/discovery.k8s.io@v1/mod.ts index db89b96..9551cd1 100644 --- a/lib/builtin/discovery.k8s.io@v1/mod.ts +++ b/lib/builtin/discovery.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class DiscoveryV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): DiscoveryV1NamespacedApi { return new DiscoveryV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): DiscoveryV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new DiscoveryV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getEndpointSliceListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getEndpointSliceListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpointslices`, @@ -32,7 +34,9 @@ export class DiscoveryV1Api { return DiscoveryV1.toEndpointSliceList(resp); } - async watchEndpointSliceListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchEndpointSliceListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpointslices`, @@ -54,7 +58,9 @@ export class DiscoveryV1NamespacedApi { this.#root = `/apis/discovery.k8s.io/v1/namespaces/${namespace}/`; } - async getEndpointSliceList(opts: operations.GetListOpts = {}) { + async getEndpointSliceList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpointslices`, @@ -65,7 +71,9 @@ export class DiscoveryV1NamespacedApi { return DiscoveryV1.toEndpointSliceList(resp); } - async watchEndpointSliceList(opts: operations.WatchListOpts = {}) { + async watchEndpointSliceList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpointslices`, @@ -77,7 +85,10 @@ export class DiscoveryV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(DiscoveryV1.toEndpointSlice, MetaV1.toStatus)); } - async createEndpointSlice(body: DiscoveryV1.EndpointSlice, opts: operations.PutOpts = {}) { + async createEndpointSlice( + body: DiscoveryV1.EndpointSlice, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}endpointslices`, @@ -89,7 +100,9 @@ export class DiscoveryV1NamespacedApi { return DiscoveryV1.toEndpointSlice(resp); } - async deleteEndpointSliceList(opts: operations.DeleteListOpts = {}) { + async deleteEndpointSliceList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}endpointslices`, @@ -100,7 +113,10 @@ export class DiscoveryV1NamespacedApi { return DiscoveryV1.toEndpointSliceList(resp); } - async getEndpointSlice(name: string, opts: operations.NoOpts = {}) { + async getEndpointSlice( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}endpointslices/${name}`, @@ -110,7 +126,10 @@ export class DiscoveryV1NamespacedApi { return DiscoveryV1.toEndpointSlice(resp); } - async deleteEndpointSlice(name: string, opts: operations.DeleteOpts = {}) { + async deleteEndpointSlice( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}endpointslices/${name}`, @@ -122,7 +141,11 @@ export class DiscoveryV1NamespacedApi { return DiscoveryV1.toEndpointSlice(resp); } - async replaceEndpointSlice(name: string, body: DiscoveryV1.EndpointSlice, opts: operations.PutOpts = {}) { + async replaceEndpointSlice( + name: string, + body: DiscoveryV1.EndpointSlice, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}endpointslices/${name}`, @@ -134,7 +157,12 @@ export class DiscoveryV1NamespacedApi { return DiscoveryV1.toEndpointSlice(resp); } - async patchEndpointSlice(name: string, type: c.PatchType, body: DiscoveryV1.EndpointSlice | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchEndpointSlice( + name: string, + type: c.PatchType, + body: DiscoveryV1.EndpointSlice | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}endpointslices/${name}`, diff --git a/lib/builtin/events.k8s.io@v1/mod.ts b/lib/builtin/events.k8s.io@v1/mod.ts index 5188195..384a681 100644 --- a/lib/builtin/events.k8s.io@v1/mod.ts +++ b/lib/builtin/events.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class EventsV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): EventsV1NamespacedApi { return new EventsV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): EventsV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new EventsV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getEventListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getEventListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -32,7 +34,9 @@ export class EventsV1Api { return EventsV1.toEventList(resp); } - async watchEventListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchEventListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -54,7 +58,9 @@ export class EventsV1NamespacedApi { this.#root = `/apis/events.k8s.io/v1/namespaces/${namespace}/`; } - async getEventList(opts: operations.GetListOpts = {}) { + async getEventList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -65,7 +71,9 @@ export class EventsV1NamespacedApi { return EventsV1.toEventList(resp); } - async watchEventList(opts: operations.WatchListOpts = {}) { + async watchEventList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events`, @@ -77,7 +85,10 @@ export class EventsV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(EventsV1.toEvent, MetaV1.toStatus)); } - async createEvent(body: EventsV1.Event, opts: operations.PutOpts = {}) { + async createEvent( + body: EventsV1.Event, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}events`, @@ -89,7 +100,9 @@ export class EventsV1NamespacedApi { return EventsV1.toEvent(resp); } - async deleteEventList(opts: operations.DeleteListOpts = {}) { + async deleteEventList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}events`, @@ -100,7 +113,10 @@ export class EventsV1NamespacedApi { return EventsV1.toEventList(resp); } - async getEvent(name: string, opts: operations.NoOpts = {}) { + async getEvent( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}events/${name}`, @@ -110,7 +126,10 @@ export class EventsV1NamespacedApi { return EventsV1.toEvent(resp); } - async deleteEvent(name: string, opts: operations.DeleteOpts = {}) { + async deleteEvent( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}events/${name}`, @@ -122,7 +141,11 @@ export class EventsV1NamespacedApi { return EventsV1.toEvent(resp); } - async replaceEvent(name: string, body: EventsV1.Event, opts: operations.PutOpts = {}) { + async replaceEvent( + name: string, + body: EventsV1.Event, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}events/${name}`, @@ -134,7 +157,12 @@ export class EventsV1NamespacedApi { return EventsV1.toEvent(resp); } - async patchEvent(name: string, type: c.PatchType, body: EventsV1.Event | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchEvent( + name: string, + type: c.PatchType, + body: EventsV1.Event | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}events/${name}`, diff --git a/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta2/mod.ts b/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta2/mod.ts index f9dbca8..94e7c0c 100644 --- a/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta2/mod.ts +++ b/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta2/mod.ts @@ -13,7 +13,9 @@ export class FlowcontrolApiserverV1beta2Api { this.#client = client; } - async getFlowSchemaList(opts: operations.GetListOpts = {}) { + async getFlowSchemaList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas`, @@ -24,7 +26,9 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchemaList(resp); } - async watchFlowSchemaList(opts: operations.WatchListOpts = {}) { + async watchFlowSchemaList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas`, @@ -36,7 +40,10 @@ export class FlowcontrolApiserverV1beta2Api { return resp.pipeThrough(new c.WatchEventTransformer(FlowcontrolApiserverV1beta2.toFlowSchema, MetaV1.toStatus)); } - async createFlowSchema(body: FlowcontrolApiserverV1beta2.FlowSchema, opts: operations.PutOpts = {}) { + async createFlowSchema( + body: FlowcontrolApiserverV1beta2.FlowSchema, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}flowschemas`, @@ -48,7 +55,9 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async deleteFlowSchemaList(opts: operations.DeleteListOpts = {}) { + async deleteFlowSchemaList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}flowschemas`, @@ -59,7 +68,10 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchemaList(resp); } - async getFlowSchema(name: string, opts: operations.NoOpts = {}) { + async getFlowSchema( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas/${name}`, @@ -69,7 +81,10 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async deleteFlowSchema(name: string, opts: operations.DeleteOpts = {}) { + async deleteFlowSchema( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}flowschemas/${name}`, @@ -81,7 +96,11 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async replaceFlowSchema(name: string, body: FlowcontrolApiserverV1beta2.FlowSchema, opts: operations.PutOpts = {}) { + async replaceFlowSchema( + name: string, + body: FlowcontrolApiserverV1beta2.FlowSchema, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}flowschemas/${name}`, @@ -93,7 +112,12 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async patchFlowSchema(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta2.FlowSchema | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchFlowSchema( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta2.FlowSchema | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}flowschemas/${name}`, @@ -106,7 +130,10 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async getFlowSchemaStatus(name: string, opts: operations.NoOpts = {}) { + async getFlowSchemaStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas/${name}/status`, @@ -116,7 +143,11 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async replaceFlowSchemaStatus(name: string, body: FlowcontrolApiserverV1beta2.FlowSchema, opts: operations.PutOpts = {}) { + async replaceFlowSchemaStatus( + name: string, + body: FlowcontrolApiserverV1beta2.FlowSchema, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}flowschemas/${name}/status`, @@ -128,7 +159,12 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async patchFlowSchemaStatus(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta2.FlowSchema | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchFlowSchemaStatus( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta2.FlowSchema | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}flowschemas/${name}/status`, @@ -141,7 +177,9 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toFlowSchema(resp); } - async getPriorityLevelConfigurationList(opts: operations.GetListOpts = {}) { + async getPriorityLevelConfigurationList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations`, @@ -152,7 +190,9 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfigurationList(resp); } - async watchPriorityLevelConfigurationList(opts: operations.WatchListOpts = {}) { + async watchPriorityLevelConfigurationList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations`, @@ -164,7 +204,10 @@ export class FlowcontrolApiserverV1beta2Api { return resp.pipeThrough(new c.WatchEventTransformer(FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration, MetaV1.toStatus)); } - async createPriorityLevelConfiguration(body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration, opts: operations.PutOpts = {}) { + async createPriorityLevelConfiguration( + body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}prioritylevelconfigurations`, @@ -176,7 +219,9 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async deletePriorityLevelConfigurationList(opts: operations.DeleteListOpts = {}) { + async deletePriorityLevelConfigurationList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}prioritylevelconfigurations`, @@ -187,7 +232,10 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfigurationList(resp); } - async getPriorityLevelConfiguration(name: string, opts: operations.NoOpts = {}) { + async getPriorityLevelConfiguration( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -197,7 +245,10 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async deletePriorityLevelConfiguration(name: string, opts: operations.DeleteOpts = {}) { + async deletePriorityLevelConfiguration( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -209,7 +260,11 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async replacePriorityLevelConfiguration(name: string, body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration, opts: operations.PutOpts = {}) { + async replacePriorityLevelConfiguration( + name: string, + body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -221,7 +276,12 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async patchPriorityLevelConfiguration(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPriorityLevelConfiguration( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -234,7 +294,10 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async getPriorityLevelConfigurationStatus(name: string, opts: operations.NoOpts = {}) { + async getPriorityLevelConfigurationStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations/${name}/status`, @@ -244,7 +307,11 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async replacePriorityLevelConfigurationStatus(name: string, body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration, opts: operations.PutOpts = {}) { + async replacePriorityLevelConfigurationStatus( + name: string, + body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}prioritylevelconfigurations/${name}/status`, @@ -256,7 +323,12 @@ export class FlowcontrolApiserverV1beta2Api { return FlowcontrolApiserverV1beta2.toPriorityLevelConfiguration(resp); } - async patchPriorityLevelConfigurationStatus(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPriorityLevelConfigurationStatus( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta2.PriorityLevelConfiguration | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}prioritylevelconfigurations/${name}/status`, diff --git a/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta3/mod.ts b/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta3/mod.ts index cf0628e..9ce95e2 100644 --- a/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta3/mod.ts +++ b/lib/builtin/flowcontrol.apiserver.k8s.io@v1beta3/mod.ts @@ -13,7 +13,9 @@ export class FlowcontrolApiserverV1beta3Api { this.#client = client; } - async getFlowSchemaList(opts: operations.GetListOpts = {}) { + async getFlowSchemaList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas`, @@ -24,7 +26,9 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchemaList(resp); } - async watchFlowSchemaList(opts: operations.WatchListOpts = {}) { + async watchFlowSchemaList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas`, @@ -36,7 +40,10 @@ export class FlowcontrolApiserverV1beta3Api { return resp.pipeThrough(new c.WatchEventTransformer(FlowcontrolApiserverV1beta3.toFlowSchema, MetaV1.toStatus)); } - async createFlowSchema(body: FlowcontrolApiserverV1beta3.FlowSchema, opts: operations.PutOpts = {}) { + async createFlowSchema( + body: FlowcontrolApiserverV1beta3.FlowSchema, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}flowschemas`, @@ -48,7 +55,9 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async deleteFlowSchemaList(opts: operations.DeleteListOpts = {}) { + async deleteFlowSchemaList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}flowschemas`, @@ -59,7 +68,10 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchemaList(resp); } - async getFlowSchema(name: string, opts: operations.NoOpts = {}) { + async getFlowSchema( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas/${name}`, @@ -69,7 +81,10 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async deleteFlowSchema(name: string, opts: operations.DeleteOpts = {}) { + async deleteFlowSchema( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}flowschemas/${name}`, @@ -81,7 +96,11 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async replaceFlowSchema(name: string, body: FlowcontrolApiserverV1beta3.FlowSchema, opts: operations.PutOpts = {}) { + async replaceFlowSchema( + name: string, + body: FlowcontrolApiserverV1beta3.FlowSchema, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}flowschemas/${name}`, @@ -93,7 +112,12 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async patchFlowSchema(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta3.FlowSchema | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchFlowSchema( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta3.FlowSchema | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}flowschemas/${name}`, @@ -106,7 +130,10 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async getFlowSchemaStatus(name: string, opts: operations.NoOpts = {}) { + async getFlowSchemaStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}flowschemas/${name}/status`, @@ -116,7 +143,11 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async replaceFlowSchemaStatus(name: string, body: FlowcontrolApiserverV1beta3.FlowSchema, opts: operations.PutOpts = {}) { + async replaceFlowSchemaStatus( + name: string, + body: FlowcontrolApiserverV1beta3.FlowSchema, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}flowschemas/${name}/status`, @@ -128,7 +159,12 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async patchFlowSchemaStatus(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta3.FlowSchema | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchFlowSchemaStatus( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta3.FlowSchema | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}flowschemas/${name}/status`, @@ -141,7 +177,9 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toFlowSchema(resp); } - async getPriorityLevelConfigurationList(opts: operations.GetListOpts = {}) { + async getPriorityLevelConfigurationList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations`, @@ -152,7 +190,9 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfigurationList(resp); } - async watchPriorityLevelConfigurationList(opts: operations.WatchListOpts = {}) { + async watchPriorityLevelConfigurationList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations`, @@ -164,7 +204,10 @@ export class FlowcontrolApiserverV1beta3Api { return resp.pipeThrough(new c.WatchEventTransformer(FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration, MetaV1.toStatus)); } - async createPriorityLevelConfiguration(body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration, opts: operations.PutOpts = {}) { + async createPriorityLevelConfiguration( + body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}prioritylevelconfigurations`, @@ -176,7 +219,9 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async deletePriorityLevelConfigurationList(opts: operations.DeleteListOpts = {}) { + async deletePriorityLevelConfigurationList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}prioritylevelconfigurations`, @@ -187,7 +232,10 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfigurationList(resp); } - async getPriorityLevelConfiguration(name: string, opts: operations.NoOpts = {}) { + async getPriorityLevelConfiguration( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -197,7 +245,10 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async deletePriorityLevelConfiguration(name: string, opts: operations.DeleteOpts = {}) { + async deletePriorityLevelConfiguration( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -209,7 +260,11 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async replacePriorityLevelConfiguration(name: string, body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration, opts: operations.PutOpts = {}) { + async replacePriorityLevelConfiguration( + name: string, + body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -221,7 +276,12 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async patchPriorityLevelConfiguration(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPriorityLevelConfiguration( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}prioritylevelconfigurations/${name}`, @@ -234,7 +294,10 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async getPriorityLevelConfigurationStatus(name: string, opts: operations.NoOpts = {}) { + async getPriorityLevelConfigurationStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}prioritylevelconfigurations/${name}/status`, @@ -244,7 +307,11 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async replacePriorityLevelConfigurationStatus(name: string, body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration, opts: operations.PutOpts = {}) { + async replacePriorityLevelConfigurationStatus( + name: string, + body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}prioritylevelconfigurations/${name}/status`, @@ -256,7 +323,12 @@ export class FlowcontrolApiserverV1beta3Api { return FlowcontrolApiserverV1beta3.toPriorityLevelConfiguration(resp); } - async patchPriorityLevelConfigurationStatus(name: string, type: c.PatchType, body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPriorityLevelConfigurationStatus( + name: string, + type: c.PatchType, + body: FlowcontrolApiserverV1beta3.PriorityLevelConfiguration | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}prioritylevelconfigurations/${name}/status`, diff --git a/lib/builtin/internal.apiserver.k8s.io@v1alpha1/mod.ts b/lib/builtin/internal.apiserver.k8s.io@v1alpha1/mod.ts index 3441819..cbe16f2 100644 --- a/lib/builtin/internal.apiserver.k8s.io@v1alpha1/mod.ts +++ b/lib/builtin/internal.apiserver.k8s.io@v1alpha1/mod.ts @@ -13,7 +13,9 @@ export class InternalApiserverV1alpha1Api { this.#client = client; } - async getStorageVersionList(opts: operations.GetListOpts = {}) { + async getStorageVersionList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageversions`, @@ -24,7 +26,9 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersionList(resp); } - async watchStorageVersionList(opts: operations.WatchListOpts = {}) { + async watchStorageVersionList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageversions`, @@ -36,7 +40,10 @@ export class InternalApiserverV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(InternalApiserverV1alpha1.toStorageVersion, MetaV1.toStatus)); } - async createStorageVersion(body: InternalApiserverV1alpha1.StorageVersion, opts: operations.PutOpts = {}) { + async createStorageVersion( + body: InternalApiserverV1alpha1.StorageVersion, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}storageversions`, @@ -48,7 +55,9 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async deleteStorageVersionList(opts: operations.DeleteListOpts = {}) { + async deleteStorageVersionList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}storageversions`, @@ -59,7 +68,10 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersionList(resp); } - async getStorageVersion(name: string, opts: operations.NoOpts = {}) { + async getStorageVersion( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageversions/${name}`, @@ -69,7 +81,10 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async deleteStorageVersion(name: string, opts: operations.DeleteOpts = {}) { + async deleteStorageVersion( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}storageversions/${name}`, @@ -81,7 +96,11 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async replaceStorageVersion(name: string, body: InternalApiserverV1alpha1.StorageVersion, opts: operations.PutOpts = {}) { + async replaceStorageVersion( + name: string, + body: InternalApiserverV1alpha1.StorageVersion, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}storageversions/${name}`, @@ -93,7 +112,12 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async patchStorageVersion(name: string, type: c.PatchType, body: InternalApiserverV1alpha1.StorageVersion | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchStorageVersion( + name: string, + type: c.PatchType, + body: InternalApiserverV1alpha1.StorageVersion | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}storageversions/${name}`, @@ -106,7 +130,10 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async getStorageVersionStatus(name: string, opts: operations.NoOpts = {}) { + async getStorageVersionStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageversions/${name}/status`, @@ -116,7 +143,11 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async replaceStorageVersionStatus(name: string, body: InternalApiserverV1alpha1.StorageVersion, opts: operations.PutOpts = {}) { + async replaceStorageVersionStatus( + name: string, + body: InternalApiserverV1alpha1.StorageVersion, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}storageversions/${name}/status`, @@ -128,7 +159,12 @@ export class InternalApiserverV1alpha1Api { return InternalApiserverV1alpha1.toStorageVersion(resp); } - async patchStorageVersionStatus(name: string, type: c.PatchType, body: InternalApiserverV1alpha1.StorageVersion | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchStorageVersionStatus( + name: string, + type: c.PatchType, + body: InternalApiserverV1alpha1.StorageVersion | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}storageversions/${name}/status`, diff --git a/lib/builtin/networking.k8s.io@v1/mod.ts b/lib/builtin/networking.k8s.io@v1/mod.ts index dfb62ba..1940bbf 100644 --- a/lib/builtin/networking.k8s.io@v1/mod.ts +++ b/lib/builtin/networking.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class NetworkingV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): NetworkingV1NamespacedApi { return new NetworkingV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): NetworkingV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new NetworkingV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getIngressClassList(opts: operations.GetListOpts = {}) { + async getIngressClassList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingressclasses`, @@ -32,7 +34,9 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClassList(resp); } - async watchIngressClassList(opts: operations.WatchListOpts = {}) { + async watchIngressClassList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingressclasses`, @@ -44,7 +48,10 @@ export class NetworkingV1Api { return resp.pipeThrough(new c.WatchEventTransformer(NetworkingV1.toIngressClass, MetaV1.toStatus)); } - async createIngressClass(body: NetworkingV1.IngressClass, opts: operations.PutOpts = {}) { + async createIngressClass( + body: NetworkingV1.IngressClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}ingressclasses`, @@ -56,7 +63,9 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClass(resp); } - async deleteIngressClassList(opts: operations.DeleteListOpts = {}) { + async deleteIngressClassList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}ingressclasses`, @@ -67,7 +76,10 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClassList(resp); } - async getIngressClass(name: string, opts: operations.NoOpts = {}) { + async getIngressClass( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingressclasses/${name}`, @@ -77,7 +89,10 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClass(resp); } - async deleteIngressClass(name: string, opts: operations.DeleteOpts = {}) { + async deleteIngressClass( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}ingressclasses/${name}`, @@ -89,7 +104,11 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClass(resp); } - async replaceIngressClass(name: string, body: NetworkingV1.IngressClass, opts: operations.PutOpts = {}) { + async replaceIngressClass( + name: string, + body: NetworkingV1.IngressClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}ingressclasses/${name}`, @@ -101,7 +120,12 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClass(resp); } - async patchIngressClass(name: string, type: c.PatchType, body: NetworkingV1.IngressClass | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchIngressClass( + name: string, + type: c.PatchType, + body: NetworkingV1.IngressClass | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}ingressclasses/${name}`, @@ -114,7 +138,9 @@ export class NetworkingV1Api { return NetworkingV1.toIngressClass(resp); } - async getIngressListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getIngressListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingresses`, @@ -125,7 +151,9 @@ export class NetworkingV1Api { return NetworkingV1.toIngressList(resp); } - async watchIngressListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchIngressListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingresses`, @@ -137,7 +165,9 @@ export class NetworkingV1Api { return resp.pipeThrough(new c.WatchEventTransformer(NetworkingV1.toIngress, MetaV1.toStatus)); } - async getNetworkPolicyListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getNetworkPolicyListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}networkpolicies`, @@ -148,7 +178,9 @@ export class NetworkingV1Api { return NetworkingV1.toNetworkPolicyList(resp); } - async watchNetworkPolicyListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchNetworkPolicyListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}networkpolicies`, @@ -170,7 +202,9 @@ export class NetworkingV1NamespacedApi { this.#root = `/apis/networking.k8s.io/v1/namespaces/${namespace}/`; } - async getIngressList(opts: operations.GetListOpts = {}) { + async getIngressList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingresses`, @@ -181,7 +215,9 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngressList(resp); } - async watchIngressList(opts: operations.WatchListOpts = {}) { + async watchIngressList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingresses`, @@ -193,7 +229,10 @@ export class NetworkingV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(NetworkingV1.toIngress, MetaV1.toStatus)); } - async createIngress(body: NetworkingV1.Ingress, opts: operations.PutOpts = {}) { + async createIngress( + body: NetworkingV1.Ingress, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}ingresses`, @@ -205,7 +244,9 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async deleteIngressList(opts: operations.DeleteListOpts = {}) { + async deleteIngressList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}ingresses`, @@ -216,7 +257,10 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngressList(resp); } - async getIngress(name: string, opts: operations.NoOpts = {}) { + async getIngress( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingresses/${name}`, @@ -226,7 +270,10 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async deleteIngress(name: string, opts: operations.DeleteOpts = {}) { + async deleteIngress( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}ingresses/${name}`, @@ -238,7 +285,11 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async replaceIngress(name: string, body: NetworkingV1.Ingress, opts: operations.PutOpts = {}) { + async replaceIngress( + name: string, + body: NetworkingV1.Ingress, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}ingresses/${name}`, @@ -250,7 +301,12 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async patchIngress(name: string, type: c.PatchType, body: NetworkingV1.Ingress | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchIngress( + name: string, + type: c.PatchType, + body: NetworkingV1.Ingress | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}ingresses/${name}`, @@ -263,7 +319,10 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async getIngressStatus(name: string, opts: operations.NoOpts = {}) { + async getIngressStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ingresses/${name}/status`, @@ -273,7 +332,11 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async replaceIngressStatus(name: string, body: NetworkingV1.Ingress, opts: operations.PutOpts = {}) { + async replaceIngressStatus( + name: string, + body: NetworkingV1.Ingress, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}ingresses/${name}/status`, @@ -285,7 +348,12 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async patchIngressStatus(name: string, type: c.PatchType, body: NetworkingV1.Ingress | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchIngressStatus( + name: string, + type: c.PatchType, + body: NetworkingV1.Ingress | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}ingresses/${name}/status`, @@ -298,7 +366,9 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toIngress(resp); } - async getNetworkPolicyList(opts: operations.GetListOpts = {}) { + async getNetworkPolicyList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}networkpolicies`, @@ -309,7 +379,9 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toNetworkPolicyList(resp); } - async watchNetworkPolicyList(opts: operations.WatchListOpts = {}) { + async watchNetworkPolicyList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}networkpolicies`, @@ -321,7 +393,10 @@ export class NetworkingV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(NetworkingV1.toNetworkPolicy, MetaV1.toStatus)); } - async createNetworkPolicy(body: NetworkingV1.NetworkPolicy, opts: operations.PutOpts = {}) { + async createNetworkPolicy( + body: NetworkingV1.NetworkPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}networkpolicies`, @@ -333,7 +408,9 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toNetworkPolicy(resp); } - async deleteNetworkPolicyList(opts: operations.DeleteListOpts = {}) { + async deleteNetworkPolicyList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}networkpolicies`, @@ -344,7 +421,10 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toNetworkPolicyList(resp); } - async getNetworkPolicy(name: string, opts: operations.NoOpts = {}) { + async getNetworkPolicy( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}networkpolicies/${name}`, @@ -354,7 +434,10 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toNetworkPolicy(resp); } - async deleteNetworkPolicy(name: string, opts: operations.DeleteOpts = {}) { + async deleteNetworkPolicy( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}networkpolicies/${name}`, @@ -366,7 +449,11 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toNetworkPolicy(resp); } - async replaceNetworkPolicy(name: string, body: NetworkingV1.NetworkPolicy, opts: operations.PutOpts = {}) { + async replaceNetworkPolicy( + name: string, + body: NetworkingV1.NetworkPolicy, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}networkpolicies/${name}`, @@ -378,7 +465,12 @@ export class NetworkingV1NamespacedApi { return NetworkingV1.toNetworkPolicy(resp); } - async patchNetworkPolicy(name: string, type: c.PatchType, body: NetworkingV1.NetworkPolicy | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchNetworkPolicy( + name: string, + type: c.PatchType, + body: NetworkingV1.NetworkPolicy | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}networkpolicies/${name}`, diff --git a/lib/builtin/networking.k8s.io@v1alpha1/mod.ts b/lib/builtin/networking.k8s.io@v1alpha1/mod.ts index 74301d7..945842d 100644 --- a/lib/builtin/networking.k8s.io@v1alpha1/mod.ts +++ b/lib/builtin/networking.k8s.io@v1alpha1/mod.ts @@ -13,7 +13,9 @@ export class NetworkingV1alpha1Api { this.#client = client; } - async getClusterCIDRList(opts: operations.GetListOpts = {}) { + async getClusterCIDRList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clustercidrs`, @@ -24,7 +26,9 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDRList(resp); } - async watchClusterCIDRList(opts: operations.WatchListOpts = {}) { + async watchClusterCIDRList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clustercidrs`, @@ -36,7 +40,10 @@ export class NetworkingV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(NetworkingV1alpha1.toClusterCIDR, MetaV1.toStatus)); } - async createClusterCIDR(body: NetworkingV1alpha1.ClusterCIDR, opts: operations.PutOpts = {}) { + async createClusterCIDR( + body: NetworkingV1alpha1.ClusterCIDR, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}clustercidrs`, @@ -48,7 +55,9 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDR(resp); } - async deleteClusterCIDRList(opts: operations.DeleteListOpts = {}) { + async deleteClusterCIDRList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clustercidrs`, @@ -59,7 +68,10 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDRList(resp); } - async getClusterCIDR(name: string, opts: operations.NoOpts = {}) { + async getClusterCIDR( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clustercidrs/${name}`, @@ -69,7 +81,10 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDR(resp); } - async deleteClusterCIDR(name: string, opts: operations.DeleteOpts = {}) { + async deleteClusterCIDR( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clustercidrs/${name}`, @@ -81,7 +96,11 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDR(resp); } - async replaceClusterCIDR(name: string, body: NetworkingV1alpha1.ClusterCIDR, opts: operations.PutOpts = {}) { + async replaceClusterCIDR( + name: string, + body: NetworkingV1alpha1.ClusterCIDR, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}clustercidrs/${name}`, @@ -93,7 +112,12 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDR(resp); } - async patchClusterCIDR(name: string, type: c.PatchType, body: NetworkingV1alpha1.ClusterCIDR | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchClusterCIDR( + name: string, + type: c.PatchType, + body: NetworkingV1alpha1.ClusterCIDR | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}clustercidrs/${name}`, @@ -106,7 +130,9 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toClusterCIDR(resp); } - async getIPAddressList(opts: operations.GetListOpts = {}) { + async getIPAddressList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ipaddresses`, @@ -117,7 +143,9 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toIPAddressList(resp); } - async watchIPAddressList(opts: operations.WatchListOpts = {}) { + async watchIPAddressList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ipaddresses`, @@ -129,7 +157,10 @@ export class NetworkingV1alpha1Api { return resp.pipeThrough(new c.WatchEventTransformer(NetworkingV1alpha1.toIPAddress, MetaV1.toStatus)); } - async createIPAddress(body: NetworkingV1alpha1.IPAddress, opts: operations.PutOpts = {}) { + async createIPAddress( + body: NetworkingV1alpha1.IPAddress, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}ipaddresses`, @@ -141,7 +172,9 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toIPAddress(resp); } - async deleteIPAddressList(opts: operations.DeleteListOpts = {}) { + async deleteIPAddressList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}ipaddresses`, @@ -152,7 +185,10 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toIPAddressList(resp); } - async getIPAddress(name: string, opts: operations.NoOpts = {}) { + async getIPAddress( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}ipaddresses/${name}`, @@ -162,7 +198,10 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toIPAddress(resp); } - async deleteIPAddress(name: string, opts: operations.DeleteOpts = {}) { + async deleteIPAddress( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}ipaddresses/${name}`, @@ -174,7 +213,11 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toIPAddress(resp); } - async replaceIPAddress(name: string, body: NetworkingV1alpha1.IPAddress, opts: operations.PutOpts = {}) { + async replaceIPAddress( + name: string, + body: NetworkingV1alpha1.IPAddress, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}ipaddresses/${name}`, @@ -186,7 +229,12 @@ export class NetworkingV1alpha1Api { return NetworkingV1alpha1.toIPAddress(resp); } - async patchIPAddress(name: string, type: c.PatchType, body: NetworkingV1alpha1.IPAddress | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchIPAddress( + name: string, + type: c.PatchType, + body: NetworkingV1alpha1.IPAddress | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}ipaddresses/${name}`, diff --git a/lib/builtin/node.k8s.io@v1/mod.ts b/lib/builtin/node.k8s.io@v1/mod.ts index 46b8b0e..f9be1ed 100644 --- a/lib/builtin/node.k8s.io@v1/mod.ts +++ b/lib/builtin/node.k8s.io@v1/mod.ts @@ -13,7 +13,9 @@ export class NodeV1Api { this.#client = client; } - async getRuntimeClassList(opts: operations.GetListOpts = {}) { + async getRuntimeClassList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}runtimeclasses`, @@ -24,7 +26,9 @@ export class NodeV1Api { return NodeV1.toRuntimeClassList(resp); } - async watchRuntimeClassList(opts: operations.WatchListOpts = {}) { + async watchRuntimeClassList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}runtimeclasses`, @@ -36,7 +40,10 @@ export class NodeV1Api { return resp.pipeThrough(new c.WatchEventTransformer(NodeV1.toRuntimeClass, MetaV1.toStatus)); } - async createRuntimeClass(body: NodeV1.RuntimeClass, opts: operations.PutOpts = {}) { + async createRuntimeClass( + body: NodeV1.RuntimeClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}runtimeclasses`, @@ -48,7 +55,9 @@ export class NodeV1Api { return NodeV1.toRuntimeClass(resp); } - async deleteRuntimeClassList(opts: operations.DeleteListOpts = {}) { + async deleteRuntimeClassList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}runtimeclasses`, @@ -59,7 +68,10 @@ export class NodeV1Api { return NodeV1.toRuntimeClassList(resp); } - async getRuntimeClass(name: string, opts: operations.NoOpts = {}) { + async getRuntimeClass( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}runtimeclasses/${name}`, @@ -69,7 +81,10 @@ export class NodeV1Api { return NodeV1.toRuntimeClass(resp); } - async deleteRuntimeClass(name: string, opts: operations.DeleteOpts = {}) { + async deleteRuntimeClass( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}runtimeclasses/${name}`, @@ -81,7 +96,11 @@ export class NodeV1Api { return NodeV1.toRuntimeClass(resp); } - async replaceRuntimeClass(name: string, body: NodeV1.RuntimeClass, opts: operations.PutOpts = {}) { + async replaceRuntimeClass( + name: string, + body: NodeV1.RuntimeClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}runtimeclasses/${name}`, @@ -93,7 +112,12 @@ export class NodeV1Api { return NodeV1.toRuntimeClass(resp); } - async patchRuntimeClass(name: string, type: c.PatchType, body: NodeV1.RuntimeClass | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchRuntimeClass( + name: string, + type: c.PatchType, + body: NodeV1.RuntimeClass | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}runtimeclasses/${name}`, diff --git a/lib/builtin/policy@v1/mod.ts b/lib/builtin/policy@v1/mod.ts index a7e0650..b1bead6 100644 --- a/lib/builtin/policy@v1/mod.ts +++ b/lib/builtin/policy@v1/mod.ts @@ -13,15 +13,17 @@ export class PolicyV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): PolicyV1NamespacedApi { return new PolicyV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): PolicyV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new PolicyV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getPodDisruptionBudgetListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getPodDisruptionBudgetListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}poddisruptionbudgets`, @@ -32,7 +34,9 @@ export class PolicyV1Api { return PolicyV1.toPodDisruptionBudgetList(resp); } - async watchPodDisruptionBudgetListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchPodDisruptionBudgetListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}poddisruptionbudgets`, @@ -54,7 +58,9 @@ export class PolicyV1NamespacedApi { this.#root = `/apis/policy/v1/namespaces/${namespace}/`; } - async getPodDisruptionBudgetList(opts: operations.GetListOpts = {}) { + async getPodDisruptionBudgetList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}poddisruptionbudgets`, @@ -65,7 +71,9 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudgetList(resp); } - async watchPodDisruptionBudgetList(opts: operations.WatchListOpts = {}) { + async watchPodDisruptionBudgetList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}poddisruptionbudgets`, @@ -77,7 +85,10 @@ export class PolicyV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(PolicyV1.toPodDisruptionBudget, MetaV1.toStatus)); } - async createPodDisruptionBudget(body: PolicyV1.PodDisruptionBudget, opts: operations.PutOpts = {}) { + async createPodDisruptionBudget( + body: PolicyV1.PodDisruptionBudget, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}poddisruptionbudgets`, @@ -89,7 +100,9 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async deletePodDisruptionBudgetList(opts: operations.DeleteListOpts = {}) { + async deletePodDisruptionBudgetList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}poddisruptionbudgets`, @@ -100,7 +113,10 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudgetList(resp); } - async getPodDisruptionBudget(name: string, opts: operations.NoOpts = {}) { + async getPodDisruptionBudget( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}poddisruptionbudgets/${name}`, @@ -110,7 +126,10 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async deletePodDisruptionBudget(name: string, opts: operations.DeleteOpts = {}) { + async deletePodDisruptionBudget( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}poddisruptionbudgets/${name}`, @@ -122,7 +141,11 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async replacePodDisruptionBudget(name: string, body: PolicyV1.PodDisruptionBudget, opts: operations.PutOpts = {}) { + async replacePodDisruptionBudget( + name: string, + body: PolicyV1.PodDisruptionBudget, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}poddisruptionbudgets/${name}`, @@ -134,7 +157,12 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async patchPodDisruptionBudget(name: string, type: c.PatchType, body: PolicyV1.PodDisruptionBudget | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodDisruptionBudget( + name: string, + type: c.PatchType, + body: PolicyV1.PodDisruptionBudget | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}poddisruptionbudgets/${name}`, @@ -147,7 +175,10 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async getPodDisruptionBudgetStatus(name: string, opts: operations.NoOpts = {}) { + async getPodDisruptionBudgetStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}poddisruptionbudgets/${name}/status`, @@ -157,7 +188,11 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async replacePodDisruptionBudgetStatus(name: string, body: PolicyV1.PodDisruptionBudget, opts: operations.PutOpts = {}) { + async replacePodDisruptionBudgetStatus( + name: string, + body: PolicyV1.PodDisruptionBudget, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}poddisruptionbudgets/${name}/status`, @@ -169,7 +204,12 @@ export class PolicyV1NamespacedApi { return PolicyV1.toPodDisruptionBudget(resp); } - async patchPodDisruptionBudgetStatus(name: string, type: c.PatchType, body: PolicyV1.PodDisruptionBudget | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodDisruptionBudgetStatus( + name: string, + type: c.PatchType, + body: PolicyV1.PodDisruptionBudget | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}poddisruptionbudgets/${name}/status`, diff --git a/lib/builtin/rbac.authorization.k8s.io@v1/mod.ts b/lib/builtin/rbac.authorization.k8s.io@v1/mod.ts index 2f7a638..7a091f0 100644 --- a/lib/builtin/rbac.authorization.k8s.io@v1/mod.ts +++ b/lib/builtin/rbac.authorization.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class RbacAuthorizationV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): RbacAuthorizationV1NamespacedApi { return new RbacAuthorizationV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): RbacAuthorizationV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new RbacAuthorizationV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getClusterRoleBindingList(opts: operations.GetListOpts = {}) { + async getClusterRoleBindingList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterrolebindings`, @@ -32,7 +34,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBindingList(resp); } - async watchClusterRoleBindingList(opts: operations.WatchListOpts = {}) { + async watchClusterRoleBindingList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterrolebindings`, @@ -44,7 +48,10 @@ export class RbacAuthorizationV1Api { return resp.pipeThrough(new c.WatchEventTransformer(RbacAuthorizationV1.toClusterRoleBinding, MetaV1.toStatus)); } - async createClusterRoleBinding(body: RbacAuthorizationV1.ClusterRoleBinding, opts: operations.PutOpts = {}) { + async createClusterRoleBinding( + body: RbacAuthorizationV1.ClusterRoleBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}clusterrolebindings`, @@ -56,7 +63,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBinding(resp); } - async deleteClusterRoleBindingList(opts: operations.DeleteListOpts = {}) { + async deleteClusterRoleBindingList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clusterrolebindings`, @@ -67,7 +76,10 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBindingList(resp); } - async getClusterRoleBinding(name: string, opts: operations.NoOpts = {}) { + async getClusterRoleBinding( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterrolebindings/${name}`, @@ -77,7 +89,10 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBinding(resp); } - async deleteClusterRoleBinding(name: string, opts: operations.DeleteOpts = {}) { + async deleteClusterRoleBinding( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clusterrolebindings/${name}`, @@ -89,7 +104,11 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBinding(resp); } - async replaceClusterRoleBinding(name: string, body: RbacAuthorizationV1.ClusterRoleBinding, opts: operations.PutOpts = {}) { + async replaceClusterRoleBinding( + name: string, + body: RbacAuthorizationV1.ClusterRoleBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}clusterrolebindings/${name}`, @@ -101,7 +120,12 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBinding(resp); } - async patchClusterRoleBinding(name: string, type: c.PatchType, body: RbacAuthorizationV1.ClusterRoleBinding | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchClusterRoleBinding( + name: string, + type: c.PatchType, + body: RbacAuthorizationV1.ClusterRoleBinding | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}clusterrolebindings/${name}`, @@ -114,7 +138,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleBinding(resp); } - async getClusterRoleList(opts: operations.GetListOpts = {}) { + async getClusterRoleList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterroles`, @@ -125,7 +151,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleList(resp); } - async watchClusterRoleList(opts: operations.WatchListOpts = {}) { + async watchClusterRoleList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterroles`, @@ -137,7 +165,10 @@ export class RbacAuthorizationV1Api { return resp.pipeThrough(new c.WatchEventTransformer(RbacAuthorizationV1.toClusterRole, MetaV1.toStatus)); } - async createClusterRole(body: RbacAuthorizationV1.ClusterRole, opts: operations.PutOpts = {}) { + async createClusterRole( + body: RbacAuthorizationV1.ClusterRole, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}clusterroles`, @@ -149,7 +180,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRole(resp); } - async deleteClusterRoleList(opts: operations.DeleteListOpts = {}) { + async deleteClusterRoleList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clusterroles`, @@ -160,7 +193,10 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRoleList(resp); } - async getClusterRole(name: string, opts: operations.NoOpts = {}) { + async getClusterRole( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterroles/${name}`, @@ -170,7 +206,10 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRole(resp); } - async deleteClusterRole(name: string, opts: operations.DeleteOpts = {}) { + async deleteClusterRole( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clusterroles/${name}`, @@ -182,7 +221,11 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRole(resp); } - async replaceClusterRole(name: string, body: RbacAuthorizationV1.ClusterRole, opts: operations.PutOpts = {}) { + async replaceClusterRole( + name: string, + body: RbacAuthorizationV1.ClusterRole, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}clusterroles/${name}`, @@ -194,7 +237,12 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRole(resp); } - async patchClusterRole(name: string, type: c.PatchType, body: RbacAuthorizationV1.ClusterRole | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchClusterRole( + name: string, + type: c.PatchType, + body: RbacAuthorizationV1.ClusterRole | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}clusterroles/${name}`, @@ -207,7 +255,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toClusterRole(resp); } - async getRoleBindingListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getRoleBindingListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}rolebindings`, @@ -218,7 +268,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toRoleBindingList(resp); } - async watchRoleBindingListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchRoleBindingListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}rolebindings`, @@ -230,7 +282,9 @@ export class RbacAuthorizationV1Api { return resp.pipeThrough(new c.WatchEventTransformer(RbacAuthorizationV1.toRoleBinding, MetaV1.toStatus)); } - async getRoleListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getRoleListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}roles`, @@ -241,7 +295,9 @@ export class RbacAuthorizationV1Api { return RbacAuthorizationV1.toRoleList(resp); } - async watchRoleListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchRoleListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}roles`, @@ -263,7 +319,9 @@ export class RbacAuthorizationV1NamespacedApi { this.#root = `/apis/rbac.authorization.k8s.io/v1/namespaces/${namespace}/`; } - async getRoleBindingList(opts: operations.GetListOpts = {}) { + async getRoleBindingList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}rolebindings`, @@ -274,7 +332,9 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBindingList(resp); } - async watchRoleBindingList(opts: operations.WatchListOpts = {}) { + async watchRoleBindingList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}rolebindings`, @@ -286,7 +346,10 @@ export class RbacAuthorizationV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(RbacAuthorizationV1.toRoleBinding, MetaV1.toStatus)); } - async createRoleBinding(body: RbacAuthorizationV1.RoleBinding, opts: operations.PutOpts = {}) { + async createRoleBinding( + body: RbacAuthorizationV1.RoleBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}rolebindings`, @@ -298,7 +361,9 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBinding(resp); } - async deleteRoleBindingList(opts: operations.DeleteListOpts = {}) { + async deleteRoleBindingList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}rolebindings`, @@ -309,7 +374,10 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBindingList(resp); } - async getRoleBinding(name: string, opts: operations.NoOpts = {}) { + async getRoleBinding( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}rolebindings/${name}`, @@ -319,7 +387,10 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBinding(resp); } - async deleteRoleBinding(name: string, opts: operations.DeleteOpts = {}) { + async deleteRoleBinding( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}rolebindings/${name}`, @@ -331,7 +402,11 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBinding(resp); } - async replaceRoleBinding(name: string, body: RbacAuthorizationV1.RoleBinding, opts: operations.PutOpts = {}) { + async replaceRoleBinding( + name: string, + body: RbacAuthorizationV1.RoleBinding, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}rolebindings/${name}`, @@ -343,7 +418,12 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBinding(resp); } - async patchRoleBinding(name: string, type: c.PatchType, body: RbacAuthorizationV1.RoleBinding | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchRoleBinding( + name: string, + type: c.PatchType, + body: RbacAuthorizationV1.RoleBinding | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}rolebindings/${name}`, @@ -356,7 +436,9 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleBinding(resp); } - async getRoleList(opts: operations.GetListOpts = {}) { + async getRoleList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}roles`, @@ -367,7 +449,9 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleList(resp); } - async watchRoleList(opts: operations.WatchListOpts = {}) { + async watchRoleList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}roles`, @@ -379,7 +463,10 @@ export class RbacAuthorizationV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(RbacAuthorizationV1.toRole, MetaV1.toStatus)); } - async createRole(body: RbacAuthorizationV1.Role, opts: operations.PutOpts = {}) { + async createRole( + body: RbacAuthorizationV1.Role, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}roles`, @@ -391,7 +478,9 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRole(resp); } - async deleteRoleList(opts: operations.DeleteListOpts = {}) { + async deleteRoleList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}roles`, @@ -402,7 +491,10 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRoleList(resp); } - async getRole(name: string, opts: operations.NoOpts = {}) { + async getRole( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}roles/${name}`, @@ -412,7 +504,10 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRole(resp); } - async deleteRole(name: string, opts: operations.DeleteOpts = {}) { + async deleteRole( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}roles/${name}`, @@ -424,7 +519,11 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRole(resp); } - async replaceRole(name: string, body: RbacAuthorizationV1.Role, opts: operations.PutOpts = {}) { + async replaceRole( + name: string, + body: RbacAuthorizationV1.Role, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}roles/${name}`, @@ -436,7 +535,12 @@ export class RbacAuthorizationV1NamespacedApi { return RbacAuthorizationV1.toRole(resp); } - async patchRole(name: string, type: c.PatchType, body: RbacAuthorizationV1.Role | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchRole( + name: string, + type: c.PatchType, + body: RbacAuthorizationV1.Role | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}roles/${name}`, diff --git a/lib/builtin/resource.k8s.io@v1alpha2/mod.ts b/lib/builtin/resource.k8s.io@v1alpha2/mod.ts index ef9d37c..911d38c 100644 --- a/lib/builtin/resource.k8s.io@v1alpha2/mod.ts +++ b/lib/builtin/resource.k8s.io@v1alpha2/mod.ts @@ -13,15 +13,17 @@ export class ResourceV1alpha2Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): ResourceV1alpha2NamespacedApi { return new ResourceV1alpha2NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): ResourceV1alpha2NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new ResourceV1alpha2NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getPodSchedulingContextListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getPodSchedulingContextListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podschedulingcontexts`, @@ -32,7 +34,9 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toPodSchedulingContextList(resp); } - async watchPodSchedulingContextListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchPodSchedulingContextListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podschedulingcontexts`, @@ -44,7 +48,9 @@ export class ResourceV1alpha2Api { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toPodSchedulingContext, MetaV1.toStatus)); } - async getResourceClaimListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getResourceClaimListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaims`, @@ -55,7 +61,9 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClaimList(resp); } - async watchResourceClaimListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchResourceClaimListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaims`, @@ -67,7 +75,9 @@ export class ResourceV1alpha2Api { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toResourceClaim, MetaV1.toStatus)); } - async getResourceClaimTemplateListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getResourceClaimTemplateListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaimtemplates`, @@ -78,7 +88,9 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClaimTemplateList(resp); } - async watchResourceClaimTemplateListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchResourceClaimTemplateListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaimtemplates`, @@ -90,7 +102,9 @@ export class ResourceV1alpha2Api { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toResourceClaimTemplate, MetaV1.toStatus)); } - async getResourceClassList(opts: operations.GetListOpts = {}) { + async getResourceClassList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclasses`, @@ -101,7 +115,9 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClassList(resp); } - async watchResourceClassList(opts: operations.WatchListOpts = {}) { + async watchResourceClassList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclasses`, @@ -113,7 +129,10 @@ export class ResourceV1alpha2Api { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toResourceClass, MetaV1.toStatus)); } - async createResourceClass(body: ResourceV1alpha2.ResourceClass, opts: operations.PutOpts = {}) { + async createResourceClass( + body: ResourceV1alpha2.ResourceClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}resourceclasses`, @@ -125,7 +144,9 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClass(resp); } - async deleteResourceClassList(opts: operations.DeleteListOpts = {}) { + async deleteResourceClassList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourceclasses`, @@ -136,7 +157,10 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClassList(resp); } - async getResourceClass(name: string, opts: operations.NoOpts = {}) { + async getResourceClass( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclasses/${name}`, @@ -146,7 +170,10 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClass(resp); } - async deleteResourceClass(name: string, opts: operations.DeleteOpts = {}) { + async deleteResourceClass( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourceclasses/${name}`, @@ -158,7 +185,11 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClass(resp); } - async replaceResourceClass(name: string, body: ResourceV1alpha2.ResourceClass, opts: operations.PutOpts = {}) { + async replaceResourceClass( + name: string, + body: ResourceV1alpha2.ResourceClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}resourceclasses/${name}`, @@ -170,7 +201,12 @@ export class ResourceV1alpha2Api { return ResourceV1alpha2.toResourceClass(resp); } - async patchResourceClass(name: string, type: c.PatchType, body: ResourceV1alpha2.ResourceClass | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchResourceClass( + name: string, + type: c.PatchType, + body: ResourceV1alpha2.ResourceClass | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}resourceclasses/${name}`, @@ -193,7 +229,9 @@ export class ResourceV1alpha2NamespacedApi { this.#root = `/apis/resource.k8s.io/v1alpha2/namespaces/${namespace}/`; } - async getPodSchedulingContextList(opts: operations.GetListOpts = {}) { + async getPodSchedulingContextList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podschedulingcontexts`, @@ -204,7 +242,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContextList(resp); } - async watchPodSchedulingContextList(opts: operations.WatchListOpts = {}) { + async watchPodSchedulingContextList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podschedulingcontexts`, @@ -216,7 +256,10 @@ export class ResourceV1alpha2NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toPodSchedulingContext, MetaV1.toStatus)); } - async createPodSchedulingContext(body: ResourceV1alpha2.PodSchedulingContext, opts: operations.PutOpts = {}) { + async createPodSchedulingContext( + body: ResourceV1alpha2.PodSchedulingContext, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}podschedulingcontexts`, @@ -228,7 +271,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async deletePodSchedulingContextList(opts: operations.DeleteListOpts = {}) { + async deletePodSchedulingContextList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}podschedulingcontexts`, @@ -239,7 +284,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContextList(resp); } - async getPodSchedulingContext(name: string, opts: operations.NoOpts = {}) { + async getPodSchedulingContext( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podschedulingcontexts/${name}`, @@ -249,7 +297,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async deletePodSchedulingContext(name: string, opts: operations.DeleteOpts = {}) { + async deletePodSchedulingContext( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}podschedulingcontexts/${name}`, @@ -261,7 +312,11 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async replacePodSchedulingContext(name: string, body: ResourceV1alpha2.PodSchedulingContext, opts: operations.PutOpts = {}) { + async replacePodSchedulingContext( + name: string, + body: ResourceV1alpha2.PodSchedulingContext, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}podschedulingcontexts/${name}`, @@ -273,7 +328,12 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async patchPodSchedulingContext(name: string, type: c.PatchType, body: ResourceV1alpha2.PodSchedulingContext | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodSchedulingContext( + name: string, + type: c.PatchType, + body: ResourceV1alpha2.PodSchedulingContext | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}podschedulingcontexts/${name}`, @@ -286,7 +346,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async getPodSchedulingContextStatus(name: string, opts: operations.NoOpts = {}) { + async getPodSchedulingContextStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}podschedulingcontexts/${name}/status`, @@ -296,7 +359,11 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async replacePodSchedulingContextStatus(name: string, body: ResourceV1alpha2.PodSchedulingContext, opts: operations.PutOpts = {}) { + async replacePodSchedulingContextStatus( + name: string, + body: ResourceV1alpha2.PodSchedulingContext, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}podschedulingcontexts/${name}/status`, @@ -308,7 +375,12 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async patchPodSchedulingContextStatus(name: string, type: c.PatchType, body: ResourceV1alpha2.PodSchedulingContext | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPodSchedulingContextStatus( + name: string, + type: c.PatchType, + body: ResourceV1alpha2.PodSchedulingContext | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}podschedulingcontexts/${name}/status`, @@ -321,7 +393,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toPodSchedulingContext(resp); } - async getResourceClaimList(opts: operations.GetListOpts = {}) { + async getResourceClaimList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaims`, @@ -332,7 +406,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimList(resp); } - async watchResourceClaimList(opts: operations.WatchListOpts = {}) { + async watchResourceClaimList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaims`, @@ -344,7 +420,10 @@ export class ResourceV1alpha2NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toResourceClaim, MetaV1.toStatus)); } - async createResourceClaim(body: ResourceV1alpha2.ResourceClaim, opts: operations.PutOpts = {}) { + async createResourceClaim( + body: ResourceV1alpha2.ResourceClaim, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}resourceclaims`, @@ -356,7 +435,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async deleteResourceClaimList(opts: operations.DeleteListOpts = {}) { + async deleteResourceClaimList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourceclaims`, @@ -367,7 +448,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimList(resp); } - async getResourceClaim(name: string, opts: operations.NoOpts = {}) { + async getResourceClaim( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaims/${name}`, @@ -377,7 +461,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async deleteResourceClaim(name: string, opts: operations.DeleteOpts = {}) { + async deleteResourceClaim( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourceclaims/${name}`, @@ -389,7 +476,11 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async replaceResourceClaim(name: string, body: ResourceV1alpha2.ResourceClaim, opts: operations.PutOpts = {}) { + async replaceResourceClaim( + name: string, + body: ResourceV1alpha2.ResourceClaim, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}resourceclaims/${name}`, @@ -401,7 +492,12 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async patchResourceClaim(name: string, type: c.PatchType, body: ResourceV1alpha2.ResourceClaim | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchResourceClaim( + name: string, + type: c.PatchType, + body: ResourceV1alpha2.ResourceClaim | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}resourceclaims/${name}`, @@ -414,7 +510,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async getResourceClaimStatus(name: string, opts: operations.NoOpts = {}) { + async getResourceClaimStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaims/${name}/status`, @@ -424,7 +523,11 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async replaceResourceClaimStatus(name: string, body: ResourceV1alpha2.ResourceClaim, opts: operations.PutOpts = {}) { + async replaceResourceClaimStatus( + name: string, + body: ResourceV1alpha2.ResourceClaim, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}resourceclaims/${name}/status`, @@ -436,7 +539,12 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async patchResourceClaimStatus(name: string, type: c.PatchType, body: ResourceV1alpha2.ResourceClaim | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchResourceClaimStatus( + name: string, + type: c.PatchType, + body: ResourceV1alpha2.ResourceClaim | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}resourceclaims/${name}/status`, @@ -449,7 +557,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaim(resp); } - async getResourceClaimTemplateList(opts: operations.GetListOpts = {}) { + async getResourceClaimTemplateList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaimtemplates`, @@ -460,7 +570,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimTemplateList(resp); } - async watchResourceClaimTemplateList(opts: operations.WatchListOpts = {}) { + async watchResourceClaimTemplateList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaimtemplates`, @@ -472,7 +584,10 @@ export class ResourceV1alpha2NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ResourceV1alpha2.toResourceClaimTemplate, MetaV1.toStatus)); } - async createResourceClaimTemplate(body: ResourceV1alpha2.ResourceClaimTemplate, opts: operations.PutOpts = {}) { + async createResourceClaimTemplate( + body: ResourceV1alpha2.ResourceClaimTemplate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}resourceclaimtemplates`, @@ -484,7 +599,9 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimTemplate(resp); } - async deleteResourceClaimTemplateList(opts: operations.DeleteListOpts = {}) { + async deleteResourceClaimTemplateList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourceclaimtemplates`, @@ -495,7 +612,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimTemplateList(resp); } - async getResourceClaimTemplate(name: string, opts: operations.NoOpts = {}) { + async getResourceClaimTemplate( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}resourceclaimtemplates/${name}`, @@ -505,7 +625,10 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimTemplate(resp); } - async deleteResourceClaimTemplate(name: string, opts: operations.DeleteOpts = {}) { + async deleteResourceClaimTemplate( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}resourceclaimtemplates/${name}`, @@ -517,7 +640,11 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimTemplate(resp); } - async replaceResourceClaimTemplate(name: string, body: ResourceV1alpha2.ResourceClaimTemplate, opts: operations.PutOpts = {}) { + async replaceResourceClaimTemplate( + name: string, + body: ResourceV1alpha2.ResourceClaimTemplate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}resourceclaimtemplates/${name}`, @@ -529,7 +656,12 @@ export class ResourceV1alpha2NamespacedApi { return ResourceV1alpha2.toResourceClaimTemplate(resp); } - async patchResourceClaimTemplate(name: string, type: c.PatchType, body: ResourceV1alpha2.ResourceClaimTemplate | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchResourceClaimTemplate( + name: string, + type: c.PatchType, + body: ResourceV1alpha2.ResourceClaimTemplate | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}resourceclaimtemplates/${name}`, diff --git a/lib/builtin/scheduling.k8s.io@v1/mod.ts b/lib/builtin/scheduling.k8s.io@v1/mod.ts index ef925cd..5d68bee 100644 --- a/lib/builtin/scheduling.k8s.io@v1/mod.ts +++ b/lib/builtin/scheduling.k8s.io@v1/mod.ts @@ -13,7 +13,9 @@ export class SchedulingV1Api { this.#client = client; } - async getPriorityClassList(opts: operations.GetListOpts = {}) { + async getPriorityClassList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}priorityclasses`, @@ -24,7 +26,9 @@ export class SchedulingV1Api { return SchedulingV1.toPriorityClassList(resp); } - async watchPriorityClassList(opts: operations.WatchListOpts = {}) { + async watchPriorityClassList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}priorityclasses`, @@ -36,7 +40,10 @@ export class SchedulingV1Api { return resp.pipeThrough(new c.WatchEventTransformer(SchedulingV1.toPriorityClass, MetaV1.toStatus)); } - async createPriorityClass(body: SchedulingV1.PriorityClass, opts: operations.PutOpts = {}) { + async createPriorityClass( + body: SchedulingV1.PriorityClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}priorityclasses`, @@ -48,7 +55,9 @@ export class SchedulingV1Api { return SchedulingV1.toPriorityClass(resp); } - async deletePriorityClassList(opts: operations.DeleteListOpts = {}) { + async deletePriorityClassList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}priorityclasses`, @@ -59,7 +68,10 @@ export class SchedulingV1Api { return SchedulingV1.toPriorityClassList(resp); } - async getPriorityClass(name: string, opts: operations.NoOpts = {}) { + async getPriorityClass( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}priorityclasses/${name}`, @@ -69,7 +81,10 @@ export class SchedulingV1Api { return SchedulingV1.toPriorityClass(resp); } - async deletePriorityClass(name: string, opts: operations.DeleteOpts = {}) { + async deletePriorityClass( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}priorityclasses/${name}`, @@ -81,7 +96,11 @@ export class SchedulingV1Api { return SchedulingV1.toPriorityClass(resp); } - async replacePriorityClass(name: string, body: SchedulingV1.PriorityClass, opts: operations.PutOpts = {}) { + async replacePriorityClass( + name: string, + body: SchedulingV1.PriorityClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}priorityclasses/${name}`, @@ -93,7 +112,12 @@ export class SchedulingV1Api { return SchedulingV1.toPriorityClass(resp); } - async patchPriorityClass(name: string, type: c.PatchType, body: SchedulingV1.PriorityClass | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchPriorityClass( + name: string, + type: c.PatchType, + body: SchedulingV1.PriorityClass | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}priorityclasses/${name}`, diff --git a/lib/builtin/storage.k8s.io@v1/mod.ts b/lib/builtin/storage.k8s.io@v1/mod.ts index 8239abe..40fee83 100644 --- a/lib/builtin/storage.k8s.io@v1/mod.ts +++ b/lib/builtin/storage.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class StorageV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): StorageV1NamespacedApi { return new StorageV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): StorageV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new StorageV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getCSIDriverList(opts: operations.GetListOpts = {}) { + async getCSIDriverList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csidrivers`, @@ -32,7 +34,9 @@ export class StorageV1Api { return StorageV1.toCSIDriverList(resp); } - async watchCSIDriverList(opts: operations.WatchListOpts = {}) { + async watchCSIDriverList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csidrivers`, @@ -44,7 +48,10 @@ export class StorageV1Api { return resp.pipeThrough(new c.WatchEventTransformer(StorageV1.toCSIDriver, MetaV1.toStatus)); } - async createCSIDriver(body: StorageV1.CSIDriver, opts: operations.PutOpts = {}) { + async createCSIDriver( + body: StorageV1.CSIDriver, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}csidrivers`, @@ -56,7 +63,9 @@ export class StorageV1Api { return StorageV1.toCSIDriver(resp); } - async deleteCSIDriverList(opts: operations.DeleteListOpts = {}) { + async deleteCSIDriverList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}csidrivers`, @@ -67,7 +76,10 @@ export class StorageV1Api { return StorageV1.toCSIDriverList(resp); } - async getCSIDriver(name: string, opts: operations.NoOpts = {}) { + async getCSIDriver( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csidrivers/${name}`, @@ -77,7 +89,10 @@ export class StorageV1Api { return StorageV1.toCSIDriver(resp); } - async deleteCSIDriver(name: string, opts: operations.DeleteOpts = {}) { + async deleteCSIDriver( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}csidrivers/${name}`, @@ -89,7 +104,11 @@ export class StorageV1Api { return StorageV1.toCSIDriver(resp); } - async replaceCSIDriver(name: string, body: StorageV1.CSIDriver, opts: operations.PutOpts = {}) { + async replaceCSIDriver( + name: string, + body: StorageV1.CSIDriver, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}csidrivers/${name}`, @@ -101,7 +120,12 @@ export class StorageV1Api { return StorageV1.toCSIDriver(resp); } - async patchCSIDriver(name: string, type: c.PatchType, body: StorageV1.CSIDriver | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCSIDriver( + name: string, + type: c.PatchType, + body: StorageV1.CSIDriver | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}csidrivers/${name}`, @@ -114,7 +138,9 @@ export class StorageV1Api { return StorageV1.toCSIDriver(resp); } - async getCSINodeList(opts: operations.GetListOpts = {}) { + async getCSINodeList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csinodes`, @@ -125,7 +151,9 @@ export class StorageV1Api { return StorageV1.toCSINodeList(resp); } - async watchCSINodeList(opts: operations.WatchListOpts = {}) { + async watchCSINodeList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csinodes`, @@ -137,7 +165,10 @@ export class StorageV1Api { return resp.pipeThrough(new c.WatchEventTransformer(StorageV1.toCSINode, MetaV1.toStatus)); } - async createCSINode(body: StorageV1.CSINode, opts: operations.PutOpts = {}) { + async createCSINode( + body: StorageV1.CSINode, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}csinodes`, @@ -149,7 +180,9 @@ export class StorageV1Api { return StorageV1.toCSINode(resp); } - async deleteCSINodeList(opts: operations.DeleteListOpts = {}) { + async deleteCSINodeList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}csinodes`, @@ -160,7 +193,10 @@ export class StorageV1Api { return StorageV1.toCSINodeList(resp); } - async getCSINode(name: string, opts: operations.NoOpts = {}) { + async getCSINode( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csinodes/${name}`, @@ -170,7 +206,10 @@ export class StorageV1Api { return StorageV1.toCSINode(resp); } - async deleteCSINode(name: string, opts: operations.DeleteOpts = {}) { + async deleteCSINode( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}csinodes/${name}`, @@ -182,7 +221,11 @@ export class StorageV1Api { return StorageV1.toCSINode(resp); } - async replaceCSINode(name: string, body: StorageV1.CSINode, opts: operations.PutOpts = {}) { + async replaceCSINode( + name: string, + body: StorageV1.CSINode, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}csinodes/${name}`, @@ -194,7 +237,12 @@ export class StorageV1Api { return StorageV1.toCSINode(resp); } - async patchCSINode(name: string, type: c.PatchType, body: StorageV1.CSINode | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCSINode( + name: string, + type: c.PatchType, + body: StorageV1.CSINode | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}csinodes/${name}`, @@ -207,7 +255,9 @@ export class StorageV1Api { return StorageV1.toCSINode(resp); } - async getCSIStorageCapacityListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getCSIStorageCapacityListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csistoragecapacities`, @@ -218,7 +268,9 @@ export class StorageV1Api { return StorageV1.toCSIStorageCapacityList(resp); } - async watchCSIStorageCapacityListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchCSIStorageCapacityListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csistoragecapacities`, @@ -230,7 +282,9 @@ export class StorageV1Api { return resp.pipeThrough(new c.WatchEventTransformer(StorageV1.toCSIStorageCapacity, MetaV1.toStatus)); } - async getStorageClassList(opts: operations.GetListOpts = {}) { + async getStorageClassList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageclasses`, @@ -241,7 +295,9 @@ export class StorageV1Api { return StorageV1.toStorageClassList(resp); } - async watchStorageClassList(opts: operations.WatchListOpts = {}) { + async watchStorageClassList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageclasses`, @@ -253,7 +309,10 @@ export class StorageV1Api { return resp.pipeThrough(new c.WatchEventTransformer(StorageV1.toStorageClass, MetaV1.toStatus)); } - async createStorageClass(body: StorageV1.StorageClass, opts: operations.PutOpts = {}) { + async createStorageClass( + body: StorageV1.StorageClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}storageclasses`, @@ -265,7 +324,9 @@ export class StorageV1Api { return StorageV1.toStorageClass(resp); } - async deleteStorageClassList(opts: operations.DeleteListOpts = {}) { + async deleteStorageClassList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}storageclasses`, @@ -276,7 +337,10 @@ export class StorageV1Api { return StorageV1.toStorageClassList(resp); } - async getStorageClass(name: string, opts: operations.NoOpts = {}) { + async getStorageClass( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}storageclasses/${name}`, @@ -286,7 +350,10 @@ export class StorageV1Api { return StorageV1.toStorageClass(resp); } - async deleteStorageClass(name: string, opts: operations.DeleteOpts = {}) { + async deleteStorageClass( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}storageclasses/${name}`, @@ -298,7 +365,11 @@ export class StorageV1Api { return StorageV1.toStorageClass(resp); } - async replaceStorageClass(name: string, body: StorageV1.StorageClass, opts: operations.PutOpts = {}) { + async replaceStorageClass( + name: string, + body: StorageV1.StorageClass, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}storageclasses/${name}`, @@ -310,7 +381,12 @@ export class StorageV1Api { return StorageV1.toStorageClass(resp); } - async patchStorageClass(name: string, type: c.PatchType, body: StorageV1.StorageClass | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchStorageClass( + name: string, + type: c.PatchType, + body: StorageV1.StorageClass | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}storageclasses/${name}`, @@ -323,7 +399,9 @@ export class StorageV1Api { return StorageV1.toStorageClass(resp); } - async getVolumeAttachmentList(opts: operations.GetListOpts = {}) { + async getVolumeAttachmentList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}volumeattachments`, @@ -334,7 +412,9 @@ export class StorageV1Api { return StorageV1.toVolumeAttachmentList(resp); } - async watchVolumeAttachmentList(opts: operations.WatchListOpts = {}) { + async watchVolumeAttachmentList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}volumeattachments`, @@ -346,7 +426,10 @@ export class StorageV1Api { return resp.pipeThrough(new c.WatchEventTransformer(StorageV1.toVolumeAttachment, MetaV1.toStatus)); } - async createVolumeAttachment(body: StorageV1.VolumeAttachment, opts: operations.PutOpts = {}) { + async createVolumeAttachment( + body: StorageV1.VolumeAttachment, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}volumeattachments`, @@ -358,7 +441,9 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async deleteVolumeAttachmentList(opts: operations.DeleteListOpts = {}) { + async deleteVolumeAttachmentList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}volumeattachments`, @@ -369,7 +454,10 @@ export class StorageV1Api { return StorageV1.toVolumeAttachmentList(resp); } - async getVolumeAttachment(name: string, opts: operations.NoOpts = {}) { + async getVolumeAttachment( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}volumeattachments/${name}`, @@ -379,7 +467,10 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async deleteVolumeAttachment(name: string, opts: operations.DeleteOpts = {}) { + async deleteVolumeAttachment( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}volumeattachments/${name}`, @@ -391,7 +482,11 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async replaceVolumeAttachment(name: string, body: StorageV1.VolumeAttachment, opts: operations.PutOpts = {}) { + async replaceVolumeAttachment( + name: string, + body: StorageV1.VolumeAttachment, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}volumeattachments/${name}`, @@ -403,7 +498,12 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async patchVolumeAttachment(name: string, type: c.PatchType, body: StorageV1.VolumeAttachment | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchVolumeAttachment( + name: string, + type: c.PatchType, + body: StorageV1.VolumeAttachment | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}volumeattachments/${name}`, @@ -416,7 +516,10 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async getVolumeAttachmentStatus(name: string, opts: operations.NoOpts = {}) { + async getVolumeAttachmentStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}volumeattachments/${name}/status`, @@ -426,7 +529,11 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async replaceVolumeAttachmentStatus(name: string, body: StorageV1.VolumeAttachment, opts: operations.PutOpts = {}) { + async replaceVolumeAttachmentStatus( + name: string, + body: StorageV1.VolumeAttachment, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}volumeattachments/${name}/status`, @@ -438,7 +545,12 @@ export class StorageV1Api { return StorageV1.toVolumeAttachment(resp); } - async patchVolumeAttachmentStatus(name: string, type: c.PatchType, body: StorageV1.VolumeAttachment | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchVolumeAttachmentStatus( + name: string, + type: c.PatchType, + body: StorageV1.VolumeAttachment | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}volumeattachments/${name}/status`, @@ -461,7 +573,9 @@ export class StorageV1NamespacedApi { this.#root = `/apis/storage.k8s.io/v1/namespaces/${namespace}/`; } - async getCSIStorageCapacityList(opts: operations.GetListOpts = {}) { + async getCSIStorageCapacityList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csistoragecapacities`, @@ -472,7 +586,9 @@ export class StorageV1NamespacedApi { return StorageV1.toCSIStorageCapacityList(resp); } - async watchCSIStorageCapacityList(opts: operations.WatchListOpts = {}) { + async watchCSIStorageCapacityList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csistoragecapacities`, @@ -484,7 +600,10 @@ export class StorageV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(StorageV1.toCSIStorageCapacity, MetaV1.toStatus)); } - async createCSIStorageCapacity(body: StorageV1.CSIStorageCapacity, opts: operations.PutOpts = {}) { + async createCSIStorageCapacity( + body: StorageV1.CSIStorageCapacity, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}csistoragecapacities`, @@ -496,7 +615,9 @@ export class StorageV1NamespacedApi { return StorageV1.toCSIStorageCapacity(resp); } - async deleteCSIStorageCapacityList(opts: operations.DeleteListOpts = {}) { + async deleteCSIStorageCapacityList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}csistoragecapacities`, @@ -507,7 +628,10 @@ export class StorageV1NamespacedApi { return StorageV1.toCSIStorageCapacityList(resp); } - async getCSIStorageCapacity(name: string, opts: operations.NoOpts = {}) { + async getCSIStorageCapacity( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}csistoragecapacities/${name}`, @@ -517,7 +641,10 @@ export class StorageV1NamespacedApi { return StorageV1.toCSIStorageCapacity(resp); } - async deleteCSIStorageCapacity(name: string, opts: operations.DeleteOpts = {}) { + async deleteCSIStorageCapacity( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}csistoragecapacities/${name}`, @@ -529,7 +656,11 @@ export class StorageV1NamespacedApi { return StorageV1.toCSIStorageCapacity(resp); } - async replaceCSIStorageCapacity(name: string, body: StorageV1.CSIStorageCapacity, opts: operations.PutOpts = {}) { + async replaceCSIStorageCapacity( + name: string, + body: StorageV1.CSIStorageCapacity, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}csistoragecapacities/${name}`, @@ -541,7 +672,12 @@ export class StorageV1NamespacedApi { return StorageV1.toCSIStorageCapacity(resp); } - async patchCSIStorageCapacity(name: string, type: c.PatchType, body: StorageV1.CSIStorageCapacity | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCSIStorageCapacity( + name: string, + type: c.PatchType, + body: StorageV1.CSIStorageCapacity | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}csistoragecapacities/${name}`, diff --git a/lib/cert-manager/acme.cert-manager.io@v1/mod.ts b/lib/cert-manager/acme.cert-manager.io@v1/mod.ts index 39a6600..5d81cda 100644 --- a/lib/cert-manager/acme.cert-manager.io@v1/mod.ts +++ b/lib/cert-manager/acme.cert-manager.io@v1/mod.ts @@ -13,15 +13,17 @@ export class AcmeCertManagerIoV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): AcmeCertManagerIoV1NamespacedApi { return new AcmeCertManagerIoV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): AcmeCertManagerIoV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new AcmeCertManagerIoV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getChallengeListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getChallengeListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}challenges`, @@ -32,7 +34,9 @@ export class AcmeCertManagerIoV1Api { return AcmeCertManagerIoV1.toChallengeList(resp); } - async watchChallengeListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchChallengeListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}challenges`, @@ -44,7 +48,9 @@ export class AcmeCertManagerIoV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AcmeCertManagerIoV1.toChallenge, MetaV1.toStatus)); } - async getOrderListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getOrderListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}orders`, @@ -55,7 +61,9 @@ export class AcmeCertManagerIoV1Api { return AcmeCertManagerIoV1.toOrderList(resp); } - async watchOrderListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchOrderListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}orders`, @@ -77,7 +85,9 @@ export class AcmeCertManagerIoV1NamespacedApi { this.#root = `/apis/acme.cert-manager.io/v1/namespaces/${namespace}/`; } - async getChallengeList(opts: operations.GetListOpts = {}) { + async getChallengeList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}challenges`, @@ -88,7 +98,9 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallengeList(resp); } - async watchChallengeList(opts: operations.WatchListOpts = {}) { + async watchChallengeList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}challenges`, @@ -100,7 +112,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AcmeCertManagerIoV1.toChallenge, MetaV1.toStatus)); } - async createChallenge(body: AcmeCertManagerIoV1.Challenge, opts: operations.PutOpts = {}) { + async createChallenge( + body: AcmeCertManagerIoV1.Challenge, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}challenges`, @@ -112,7 +127,9 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async deleteChallengeList(opts: operations.DeleteListOpts = {}) { + async deleteChallengeList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}challenges`, @@ -123,7 +140,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallengeList(resp); } - async getChallenge(name: string, opts: operations.NoOpts = {}) { + async getChallenge( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}challenges/${name}`, @@ -133,7 +153,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async deleteChallenge(name: string, opts: operations.DeleteOpts = {}) { + async deleteChallenge( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}challenges/${name}`, @@ -145,7 +168,11 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async replaceChallenge(name: string, body: AcmeCertManagerIoV1.Challenge, opts: operations.PutOpts = {}) { + async replaceChallenge( + name: string, + body: AcmeCertManagerIoV1.Challenge, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}challenges/${name}`, @@ -157,7 +184,12 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async patchChallenge(name: string, type: c.PatchType, body: AcmeCertManagerIoV1.Challenge | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchChallenge( + name: string, + type: c.PatchType, + body: AcmeCertManagerIoV1.Challenge | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}challenges/${name}`, @@ -170,7 +202,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async getChallengeStatus(name: string, opts: operations.NoOpts = {}) { + async getChallengeStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}challenges/${name}/status`, @@ -180,7 +215,11 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async replaceChallengeStatus(name: string, body: AcmeCertManagerIoV1.Challenge, opts: operations.PutOpts = {}) { + async replaceChallengeStatus( + name: string, + body: AcmeCertManagerIoV1.Challenge, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}challenges/${name}/status`, @@ -192,7 +231,12 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async patchChallengeStatus(name: string, type: c.PatchType, body: AcmeCertManagerIoV1.Challenge | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchChallengeStatus( + name: string, + type: c.PatchType, + body: AcmeCertManagerIoV1.Challenge | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}challenges/${name}/status`, @@ -205,7 +249,9 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toChallenge(resp); } - async getOrderList(opts: operations.GetListOpts = {}) { + async getOrderList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}orders`, @@ -216,7 +262,9 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrderList(resp); } - async watchOrderList(opts: operations.WatchListOpts = {}) { + async watchOrderList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}orders`, @@ -228,7 +276,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AcmeCertManagerIoV1.toOrder, MetaV1.toStatus)); } - async createOrder(body: AcmeCertManagerIoV1.Order, opts: operations.PutOpts = {}) { + async createOrder( + body: AcmeCertManagerIoV1.Order, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}orders`, @@ -240,7 +291,9 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async deleteOrderList(opts: operations.DeleteListOpts = {}) { + async deleteOrderList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}orders`, @@ -251,7 +304,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrderList(resp); } - async getOrder(name: string, opts: operations.NoOpts = {}) { + async getOrder( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}orders/${name}`, @@ -261,7 +317,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async deleteOrder(name: string, opts: operations.DeleteOpts = {}) { + async deleteOrder( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}orders/${name}`, @@ -273,7 +332,11 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async replaceOrder(name: string, body: AcmeCertManagerIoV1.Order, opts: operations.PutOpts = {}) { + async replaceOrder( + name: string, + body: AcmeCertManagerIoV1.Order, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}orders/${name}`, @@ -285,7 +348,12 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async patchOrder(name: string, type: c.PatchType, body: AcmeCertManagerIoV1.Order | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchOrder( + name: string, + type: c.PatchType, + body: AcmeCertManagerIoV1.Order | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}orders/${name}`, @@ -298,7 +366,10 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async getOrderStatus(name: string, opts: operations.NoOpts = {}) { + async getOrderStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}orders/${name}/status`, @@ -308,7 +379,11 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async replaceOrderStatus(name: string, body: AcmeCertManagerIoV1.Order, opts: operations.PutOpts = {}) { + async replaceOrderStatus( + name: string, + body: AcmeCertManagerIoV1.Order, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}orders/${name}/status`, @@ -320,7 +395,12 @@ export class AcmeCertManagerIoV1NamespacedApi { return AcmeCertManagerIoV1.toOrder(resp); } - async patchOrderStatus(name: string, type: c.PatchType, body: AcmeCertManagerIoV1.Order | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchOrderStatus( + name: string, + type: c.PatchType, + body: AcmeCertManagerIoV1.Order | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}orders/${name}/status`, diff --git a/lib/cert-manager/acme.cert-manager.io@v1/structs.ts b/lib/cert-manager/acme.cert-manager.io@v1/structs.ts index b21b121..fef6a92 100644 --- a/lib/cert-manager/acme.cert-manager.io@v1/structs.ts +++ b/lib/cert-manager/acme.cert-manager.io@v1/structs.ts @@ -53,7 +53,7 @@ export function fromChallenge(input: Challenge): c.JSONValue { solver: input.spec.solver != null ? CertManagerIoV1.fromSolverSpec(input.spec.solver) : undefined, } : undefined, }} -export function toChallenge_spec(input: c.JSONValue) { +function toChallenge_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { authorizationURL: c.checkStr(obj["authorizationURL"]), @@ -66,7 +66,7 @@ export function toChallenge_spec(input: c.JSONValue) { url: c.checkStr(obj["url"]), wildcard: c.readOpt(obj["wildcard"], c.checkBool), }} -export function toChallenge_status(input: c.JSONValue) { +function toChallenge_status(input: c.JSONValue) { const obj = c.checkObj(input); return { presented: c.readOpt(obj["presented"], c.checkBool), @@ -74,7 +74,7 @@ export function toChallenge_status(input: c.JSONValue) { reason: c.readOpt(obj["reason"], c.checkStr), state: c.readOpt(obj["state"], (x => c.readEnum<"valid" | "ready" | "pending" | "processing" | "invalid" | "expired" | "errored" | c.UnexpectedEnumValue>(x))), }} -export function toChallenge_spec_issuerRef(input: c.JSONValue) { +function toChallenge_spec_issuerRef(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -149,7 +149,7 @@ export function fromOrder(input: Order): c.JSONValue { failureTime: input.status.failureTime != null ? c.fromTime(input.status.failureTime) : undefined, } : undefined, }} -export function toOrder_spec(input: c.JSONValue) { +function toOrder_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { commonName: c.readOpt(obj["commonName"], c.checkStr), @@ -159,7 +159,7 @@ export function toOrder_spec(input: c.JSONValue) { issuerRef: toOrder_spec_issuerRef(obj["issuerRef"]), request: c.checkStr(obj["request"]), }} -export function toOrder_status(input: c.JSONValue) { +function toOrder_status(input: c.JSONValue) { const obj = c.checkObj(input); return { authorizations: c.readOpt(obj["authorizations"], x => c.readList(x, toOrder_status_authorizations)), @@ -170,14 +170,14 @@ export function toOrder_status(input: c.JSONValue) { state: c.readOpt(obj["state"], (x => c.readEnum<"valid" | "ready" | "pending" | "processing" | "invalid" | "expired" | "errored" | c.UnexpectedEnumValue>(x))), url: c.readOpt(obj["url"], c.checkStr), }} -export function toOrder_spec_issuerRef(input: c.JSONValue) { +function toOrder_spec_issuerRef(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), kind: c.readOpt(obj["kind"], c.checkStr), name: c.checkStr(obj["name"]), }} -export function toOrder_status_authorizations(input: c.JSONValue) { +function toOrder_status_authorizations(input: c.JSONValue) { const obj = c.checkObj(input); return { challenges: c.readOpt(obj["challenges"], x => c.readList(x, toOrder_status_authorizations_challenges)), @@ -186,7 +186,7 @@ export function toOrder_status_authorizations(input: c.JSONValue) { url: c.checkStr(obj["url"]), wildcard: c.readOpt(obj["wildcard"], c.checkBool), }} -export function toOrder_status_authorizations_challenges(input: c.JSONValue) { +function toOrder_status_authorizations_challenges(input: c.JSONValue) { const obj = c.checkObj(input); return { token: c.checkStr(obj["token"]), diff --git a/lib/cert-manager/cert-manager.io@v1/mod.ts b/lib/cert-manager/cert-manager.io@v1/mod.ts index c67e600..6bd76f7 100644 --- a/lib/cert-manager/cert-manager.io@v1/mod.ts +++ b/lib/cert-manager/cert-manager.io@v1/mod.ts @@ -13,15 +13,17 @@ export class CertManagerIoV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): CertManagerIoV1NamespacedApi { return new CertManagerIoV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): CertManagerIoV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new CertManagerIoV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getCertificateRequestListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getCertificateRequestListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificaterequests`, @@ -32,7 +34,9 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toCertificateRequestList(resp); } - async watchCertificateRequestListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchCertificateRequestListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificaterequests`, @@ -44,7 +48,9 @@ export class CertManagerIoV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CertManagerIoV1.toCertificateRequest, MetaV1.toStatus)); } - async getCertificateListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getCertificateListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificates`, @@ -55,7 +61,9 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toCertificateList(resp); } - async watchCertificateListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchCertificateListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificates`, @@ -67,7 +75,9 @@ export class CertManagerIoV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CertManagerIoV1.toCertificate, MetaV1.toStatus)); } - async getClusterIssuerList(opts: operations.GetListOpts = {}) { + async getClusterIssuerList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterissuers`, @@ -78,7 +88,9 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuerList(resp); } - async watchClusterIssuerList(opts: operations.WatchListOpts = {}) { + async watchClusterIssuerList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterissuers`, @@ -90,7 +102,10 @@ export class CertManagerIoV1Api { return resp.pipeThrough(new c.WatchEventTransformer(CertManagerIoV1.toClusterIssuer, MetaV1.toStatus)); } - async createClusterIssuer(body: CertManagerIoV1.ClusterIssuer, opts: operations.PutOpts = {}) { + async createClusterIssuer( + body: CertManagerIoV1.ClusterIssuer, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}clusterissuers`, @@ -102,7 +117,9 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async deleteClusterIssuerList(opts: operations.DeleteListOpts = {}) { + async deleteClusterIssuerList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clusterissuers`, @@ -113,7 +130,10 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuerList(resp); } - async getClusterIssuer(name: string, opts: operations.NoOpts = {}) { + async getClusterIssuer( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterissuers/${name}`, @@ -123,7 +143,10 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async deleteClusterIssuer(name: string, opts: operations.DeleteOpts = {}) { + async deleteClusterIssuer( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}clusterissuers/${name}`, @@ -135,7 +158,11 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async replaceClusterIssuer(name: string, body: CertManagerIoV1.ClusterIssuer, opts: operations.PutOpts = {}) { + async replaceClusterIssuer( + name: string, + body: CertManagerIoV1.ClusterIssuer, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}clusterissuers/${name}`, @@ -147,7 +174,12 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async patchClusterIssuer(name: string, type: c.PatchType, body: CertManagerIoV1.ClusterIssuer | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchClusterIssuer( + name: string, + type: c.PatchType, + body: CertManagerIoV1.ClusterIssuer | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}clusterissuers/${name}`, @@ -160,7 +192,10 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async getClusterIssuerStatus(name: string, opts: operations.NoOpts = {}) { + async getClusterIssuerStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}clusterissuers/${name}/status`, @@ -170,7 +205,11 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async replaceClusterIssuerStatus(name: string, body: CertManagerIoV1.ClusterIssuer, opts: operations.PutOpts = {}) { + async replaceClusterIssuerStatus( + name: string, + body: CertManagerIoV1.ClusterIssuer, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}clusterissuers/${name}/status`, @@ -182,7 +221,12 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async patchClusterIssuerStatus(name: string, type: c.PatchType, body: CertManagerIoV1.ClusterIssuer | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchClusterIssuerStatus( + name: string, + type: c.PatchType, + body: CertManagerIoV1.ClusterIssuer | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}clusterissuers/${name}/status`, @@ -195,7 +239,9 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toClusterIssuer(resp); } - async getIssuerListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getIssuerListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}issuers`, @@ -206,7 +252,9 @@ export class CertManagerIoV1Api { return CertManagerIoV1.toIssuerList(resp); } - async watchIssuerListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchIssuerListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}issuers`, @@ -228,7 +276,9 @@ export class CertManagerIoV1NamespacedApi { this.#root = `/apis/cert-manager.io/v1/namespaces/${namespace}/`; } - async getCertificateRequestList(opts: operations.GetListOpts = {}) { + async getCertificateRequestList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificaterequests`, @@ -239,7 +289,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequestList(resp); } - async watchCertificateRequestList(opts: operations.WatchListOpts = {}) { + async watchCertificateRequestList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificaterequests`, @@ -251,7 +303,10 @@ export class CertManagerIoV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CertManagerIoV1.toCertificateRequest, MetaV1.toStatus)); } - async createCertificateRequest(body: CertManagerIoV1.CertificateRequest, opts: operations.PutOpts = {}) { + async createCertificateRequest( + body: CertManagerIoV1.CertificateRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}certificaterequests`, @@ -263,7 +318,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async deleteCertificateRequestList(opts: operations.DeleteListOpts = {}) { + async deleteCertificateRequestList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}certificaterequests`, @@ -274,7 +331,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequestList(resp); } - async getCertificateRequest(name: string, opts: operations.NoOpts = {}) { + async getCertificateRequest( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificaterequests/${name}`, @@ -284,7 +344,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async deleteCertificateRequest(name: string, opts: operations.DeleteOpts = {}) { + async deleteCertificateRequest( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}certificaterequests/${name}`, @@ -296,7 +359,11 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async replaceCertificateRequest(name: string, body: CertManagerIoV1.CertificateRequest, opts: operations.PutOpts = {}) { + async replaceCertificateRequest( + name: string, + body: CertManagerIoV1.CertificateRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificaterequests/${name}`, @@ -308,7 +375,12 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async patchCertificateRequest(name: string, type: c.PatchType, body: CertManagerIoV1.CertificateRequest | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificateRequest( + name: string, + type: c.PatchType, + body: CertManagerIoV1.CertificateRequest | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificaterequests/${name}`, @@ -321,7 +393,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async getCertificateRequestStatus(name: string, opts: operations.NoOpts = {}) { + async getCertificateRequestStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificaterequests/${name}/status`, @@ -331,7 +406,11 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async replaceCertificateRequestStatus(name: string, body: CertManagerIoV1.CertificateRequest, opts: operations.PutOpts = {}) { + async replaceCertificateRequestStatus( + name: string, + body: CertManagerIoV1.CertificateRequest, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificaterequests/${name}/status`, @@ -343,7 +422,12 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async patchCertificateRequestStatus(name: string, type: c.PatchType, body: CertManagerIoV1.CertificateRequest | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificateRequestStatus( + name: string, + type: c.PatchType, + body: CertManagerIoV1.CertificateRequest | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificaterequests/${name}/status`, @@ -356,7 +440,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateRequest(resp); } - async getCertificateList(opts: operations.GetListOpts = {}) { + async getCertificateList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificates`, @@ -367,7 +453,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateList(resp); } - async watchCertificateList(opts: operations.WatchListOpts = {}) { + async watchCertificateList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificates`, @@ -379,7 +467,10 @@ export class CertManagerIoV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CertManagerIoV1.toCertificate, MetaV1.toStatus)); } - async createCertificate(body: CertManagerIoV1.Certificate, opts: operations.PutOpts = {}) { + async createCertificate( + body: CertManagerIoV1.Certificate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}certificates`, @@ -391,7 +482,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async deleteCertificateList(opts: operations.DeleteListOpts = {}) { + async deleteCertificateList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}certificates`, @@ -402,7 +495,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificateList(resp); } - async getCertificate(name: string, opts: operations.NoOpts = {}) { + async getCertificate( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificates/${name}`, @@ -412,7 +508,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async deleteCertificate(name: string, opts: operations.DeleteOpts = {}) { + async deleteCertificate( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}certificates/${name}`, @@ -424,7 +523,11 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async replaceCertificate(name: string, body: CertManagerIoV1.Certificate, opts: operations.PutOpts = {}) { + async replaceCertificate( + name: string, + body: CertManagerIoV1.Certificate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificates/${name}`, @@ -436,7 +539,12 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async patchCertificate(name: string, type: c.PatchType, body: CertManagerIoV1.Certificate | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificate( + name: string, + type: c.PatchType, + body: CertManagerIoV1.Certificate | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificates/${name}`, @@ -449,7 +557,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async getCertificateStatus(name: string, opts: operations.NoOpts = {}) { + async getCertificateStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}certificates/${name}/status`, @@ -459,7 +570,11 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async replaceCertificateStatus(name: string, body: CertManagerIoV1.Certificate, opts: operations.PutOpts = {}) { + async replaceCertificateStatus( + name: string, + body: CertManagerIoV1.Certificate, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}certificates/${name}/status`, @@ -471,7 +586,12 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async patchCertificateStatus(name: string, type: c.PatchType, body: CertManagerIoV1.Certificate | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchCertificateStatus( + name: string, + type: c.PatchType, + body: CertManagerIoV1.Certificate | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}certificates/${name}/status`, @@ -484,7 +604,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toCertificate(resp); } - async getIssuerList(opts: operations.GetListOpts = {}) { + async getIssuerList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}issuers`, @@ -495,7 +617,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuerList(resp); } - async watchIssuerList(opts: operations.WatchListOpts = {}) { + async watchIssuerList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}issuers`, @@ -507,7 +631,10 @@ export class CertManagerIoV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(CertManagerIoV1.toIssuer, MetaV1.toStatus)); } - async createIssuer(body: CertManagerIoV1.Issuer, opts: operations.PutOpts = {}) { + async createIssuer( + body: CertManagerIoV1.Issuer, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}issuers`, @@ -519,7 +646,9 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async deleteIssuerList(opts: operations.DeleteListOpts = {}) { + async deleteIssuerList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}issuers`, @@ -530,7 +659,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuerList(resp); } - async getIssuer(name: string, opts: operations.NoOpts = {}) { + async getIssuer( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}issuers/${name}`, @@ -540,7 +672,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async deleteIssuer(name: string, opts: operations.DeleteOpts = {}) { + async deleteIssuer( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}issuers/${name}`, @@ -552,7 +687,11 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async replaceIssuer(name: string, body: CertManagerIoV1.Issuer, opts: operations.PutOpts = {}) { + async replaceIssuer( + name: string, + body: CertManagerIoV1.Issuer, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}issuers/${name}`, @@ -564,7 +703,12 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async patchIssuer(name: string, type: c.PatchType, body: CertManagerIoV1.Issuer | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchIssuer( + name: string, + type: c.PatchType, + body: CertManagerIoV1.Issuer | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}issuers/${name}`, @@ -577,7 +721,10 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async getIssuerStatus(name: string, opts: operations.NoOpts = {}) { + async getIssuerStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}issuers/${name}/status`, @@ -587,7 +734,11 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async replaceIssuerStatus(name: string, body: CertManagerIoV1.Issuer, opts: operations.PutOpts = {}) { + async replaceIssuerStatus( + name: string, + body: CertManagerIoV1.Issuer, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}issuers/${name}/status`, @@ -599,7 +750,12 @@ export class CertManagerIoV1NamespacedApi { return CertManagerIoV1.toIssuer(resp); } - async patchIssuerStatus(name: string, type: c.PatchType, body: CertManagerIoV1.Issuer | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchIssuerStatus( + name: string, + type: c.PatchType, + body: CertManagerIoV1.Issuer | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}issuers/${name}/status`, diff --git a/lib/cert-manager/cert-manager.io@v1/structs.ts b/lib/cert-manager/cert-manager.io@v1/structs.ts index 6a1ae67..4cee0f8 100644 --- a/lib/cert-manager/cert-manager.io@v1/structs.ts +++ b/lib/cert-manager/cert-manager.io@v1/structs.ts @@ -65,7 +65,7 @@ export function fromCertificateRequest(input: CertificateRequest): c.JSONValue { failureTime: input.status.failureTime != null ? c.fromTime(input.status.failureTime) : undefined, } : undefined, }} -export function toCertificateRequest_spec(input: c.JSONValue) { +function toCertificateRequest_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { duration: c.readOpt(obj["duration"], c.checkStr), @@ -78,7 +78,7 @@ export function toCertificateRequest_spec(input: c.JSONValue) { usages: c.readOpt(obj["usages"], x => c.readList(x, (x => c.readEnum<"signing" | "digital signature" | "content commitment" | "key encipherment" | "key agreement" | "data encipherment" | "cert sign" | "crl sign" | "encipher only" | "decipher only" | "any" | "server auth" | "client auth" | "code signing" | "email protection" | "s/mime" | "ipsec end system" | "ipsec tunnel" | "ipsec user" | "timestamping" | "ocsp signing" | "microsoft sgc" | "netscape sgc" | c.UnexpectedEnumValue>(x)))), username: c.readOpt(obj["username"], c.checkStr), }} -export function toCertificateRequest_status(input: c.JSONValue) { +function toCertificateRequest_status(input: c.JSONValue) { const obj = c.checkObj(input); return { ca: c.readOpt(obj["ca"], c.checkStr), @@ -86,14 +86,14 @@ export function toCertificateRequest_status(input: c.JSONValue) { conditions: c.readOpt(obj["conditions"], x => c.readList(x, toCertificateRequest_status_conditions)), failureTime: c.readOpt(obj["failureTime"], c.toTime), }} -export function toCertificateRequest_spec_issuerRef(input: c.JSONValue) { +function toCertificateRequest_spec_issuerRef(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), kind: c.readOpt(obj["kind"], c.checkStr), name: c.checkStr(obj["name"]), }} -export function toCertificateRequest_status_conditions(input: c.JSONValue) { +function toCertificateRequest_status_conditions(input: c.JSONValue) { const obj = c.checkObj(input); return { lastTransitionTime: c.readOpt(obj["lastTransitionTime"], c.toTime), @@ -247,7 +247,7 @@ export function fromCertificate(input: Certificate): c.JSONValue { renewalTime: input.status.renewalTime != null ? c.fromTime(input.status.renewalTime) : undefined, } : undefined, }} -export function toCertificate_spec(input: c.JSONValue) { +function toCertificate_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { additionalOutputFormats: c.readOpt(obj["additionalOutputFormats"], x => c.readList(x, toCertificate_spec_additionalOutputFormats)), @@ -270,7 +270,7 @@ export function toCertificate_spec(input: c.JSONValue) { uris: c.readOpt(obj["uris"], x => c.readList(x, c.checkStr)), usages: c.readOpt(obj["usages"], x => c.readList(x, (x => c.readEnum<"signing" | "digital signature" | "content commitment" | "key encipherment" | "key agreement" | "data encipherment" | "cert sign" | "crl sign" | "encipher only" | "decipher only" | "any" | "server auth" | "client auth" | "code signing" | "email protection" | "s/mime" | "ipsec end system" | "ipsec tunnel" | "ipsec user" | "timestamping" | "ocsp signing" | "microsoft sgc" | "netscape sgc" | c.UnexpectedEnumValue>(x)))), }} -export function toCertificate_status(input: c.JSONValue) { +function toCertificate_status(input: c.JSONValue) { const obj = c.checkObj(input); return { conditions: c.readOpt(obj["conditions"], x => c.readList(x, toCertificate_status_conditions)), @@ -282,25 +282,25 @@ export function toCertificate_status(input: c.JSONValue) { renewalTime: c.readOpt(obj["renewalTime"], c.toTime), revision: c.readOpt(obj["revision"], c.checkNum), }} -export function toCertificate_spec_additionalOutputFormats(input: c.JSONValue) { +function toCertificate_spec_additionalOutputFormats(input: c.JSONValue) { const obj = c.checkObj(input); return { type: (x => c.readEnum<"DER" | "CombinedPEM" | c.UnexpectedEnumValue>(x))(obj["type"]), }} -export function toCertificate_spec_issuerRef(input: c.JSONValue) { +function toCertificate_spec_issuerRef(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), kind: c.readOpt(obj["kind"], c.checkStr), name: c.checkStr(obj["name"]), }} -export function toCertificate_spec_keystores(input: c.JSONValue) { +function toCertificate_spec_keystores(input: c.JSONValue) { const obj = c.checkObj(input); return { jks: c.readOpt(obj["jks"], toCertificate_spec_keystores_jks), pkcs12: c.readOpt(obj["pkcs12"], toCertificate_spec_keystores_pkcs12), }} -export function toCertificate_spec_privateKey(input: c.JSONValue) { +function toCertificate_spec_privateKey(input: c.JSONValue) { const obj = c.checkObj(input); return { algorithm: c.readOpt(obj["algorithm"], (x => c.readEnum<"RSA" | "ECDSA" | "Ed25519" | c.UnexpectedEnumValue>(x))), @@ -308,13 +308,13 @@ export function toCertificate_spec_privateKey(input: c.JSONValue) { rotationPolicy: c.readOpt(obj["rotationPolicy"], (x => c.readEnum<"Never" | "Always" | c.UnexpectedEnumValue>(x))), size: c.readOpt(obj["size"], c.checkNum), }} -export function toCertificate_spec_secretTemplate(input: c.JSONValue) { +function toCertificate_spec_secretTemplate(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), }} -export function toCertificate_spec_subject(input: c.JSONValue) { +function toCertificate_spec_subject(input: c.JSONValue) { const obj = c.checkObj(input); return { countries: c.readOpt(obj["countries"], x => c.readList(x, c.checkStr)), @@ -326,7 +326,7 @@ export function toCertificate_spec_subject(input: c.JSONValue) { serialNumber: c.readOpt(obj["serialNumber"], c.checkStr), streetAddresses: c.readOpt(obj["streetAddresses"], x => c.readList(x, c.checkStr)), }} -export function toCertificate_status_conditions(input: c.JSONValue) { +function toCertificate_status_conditions(input: c.JSONValue) { const obj = c.checkObj(input); return { lastTransitionTime: c.readOpt(obj["lastTransitionTime"], c.toTime), @@ -336,13 +336,13 @@ export function toCertificate_status_conditions(input: c.JSONValue) { status: (x => c.readEnum<"True" | "False" | "Unknown" | c.UnexpectedEnumValue>(x))(obj["status"]), type: c.checkStr(obj["type"]), }} -export function toCertificate_spec_keystores_jks(input: c.JSONValue) { +function toCertificate_spec_keystores_jks(input: c.JSONValue) { const obj = c.checkObj(input); return { create: c.checkBool(obj["create"]), passwordSecretRef: toSecretRef(obj["passwordSecretRef"]), }} -export function toCertificate_spec_keystores_pkcs12(input: c.JSONValue) { +function toCertificate_spec_keystores_pkcs12(input: c.JSONValue) { const obj = c.checkObj(input); return { create: c.checkBool(obj["create"]), @@ -470,7 +470,7 @@ export function fromIssuerSpec(input: IssuerSpec): c.JSONValue { } : undefined, } : undefined, }} -export function toIssuerSpec_acme(input: c.JSONValue) { +function toIssuerSpec_acme(input: c.JSONValue) { const obj = c.checkObj(input); return { caBundle: c.readOpt(obj["caBundle"], c.checkStr), @@ -484,19 +484,19 @@ export function toIssuerSpec_acme(input: c.JSONValue) { skipTLSVerify: c.readOpt(obj["skipTLSVerify"], c.checkBool), solvers: c.readOpt(obj["solvers"], x => c.readList(x, toSolverSpec)), }} -export function toIssuerSpec_ca(input: c.JSONValue) { +function toIssuerSpec_ca(input: c.JSONValue) { const obj = c.checkObj(input); return { crlDistributionPoints: c.readOpt(obj["crlDistributionPoints"], x => c.readList(x, c.checkStr)), ocspServers: c.readOpt(obj["ocspServers"], x => c.readList(x, c.checkStr)), secretName: c.checkStr(obj["secretName"]), }} -export function toIssuerSpec_selfSigned(input: c.JSONValue) { +function toIssuerSpec_selfSigned(input: c.JSONValue) { const obj = c.checkObj(input); return { crlDistributionPoints: c.readOpt(obj["crlDistributionPoints"], x => c.readList(x, c.checkStr)), }} -export function toIssuerSpec_vault(input: c.JSONValue) { +function toIssuerSpec_vault(input: c.JSONValue) { const obj = c.checkObj(input); return { auth: toIssuerSpec_vault_auth(obj["auth"]), @@ -506,48 +506,48 @@ export function toIssuerSpec_vault(input: c.JSONValue) { path: c.checkStr(obj["path"]), server: c.checkStr(obj["server"]), }} -export function toIssuerSpec_venafi(input: c.JSONValue) { +function toIssuerSpec_venafi(input: c.JSONValue) { const obj = c.checkObj(input); return { cloud: c.readOpt(obj["cloud"], toIssuerSpec_venafi_cloud), tpp: c.readOpt(obj["tpp"], toIssuerSpec_venafi_tpp), zone: c.checkStr(obj["zone"]), }} -export function toIssuerSpec_acme_externalAccountBinding(input: c.JSONValue) { +function toIssuerSpec_acme_externalAccountBinding(input: c.JSONValue) { const obj = c.checkObj(input); return { keyAlgorithm: c.readOpt(obj["keyAlgorithm"], (x => c.readEnum<"HS256" | "HS384" | "HS512" | c.UnexpectedEnumValue>(x))), keyID: c.checkStr(obj["keyID"]), keySecretRef: toSecretRef(obj["keySecretRef"]), }} -export function toIssuerSpec_vault_auth(input: c.JSONValue) { +function toIssuerSpec_vault_auth(input: c.JSONValue) { const obj = c.checkObj(input); return { appRole: c.readOpt(obj["appRole"], toIssuerSpec_vault_auth_appRole), kubernetes: c.readOpt(obj["kubernetes"], toIssuerSpec_vault_auth_kubernetes), tokenSecretRef: c.readOpt(obj["tokenSecretRef"], toSecretRef), }} -export function toIssuerSpec_venafi_cloud(input: c.JSONValue) { +function toIssuerSpec_venafi_cloud(input: c.JSONValue) { const obj = c.checkObj(input); return { apiTokenSecretRef: toSecretRef(obj["apiTokenSecretRef"]), url: c.readOpt(obj["url"], c.checkStr), }} -export function toIssuerSpec_venafi_tpp(input: c.JSONValue) { +function toIssuerSpec_venafi_tpp(input: c.JSONValue) { const obj = c.checkObj(input); return { caBundle: c.readOpt(obj["caBundle"], c.checkStr), credentialsRef: toIssuerSpec_venafi_tpp_credentialsRef(obj["credentialsRef"]), url: c.checkStr(obj["url"]), }} -export function toIssuerSpec_vault_auth_appRole(input: c.JSONValue) { +function toIssuerSpec_vault_auth_appRole(input: c.JSONValue) { const obj = c.checkObj(input); return { path: c.checkStr(obj["path"]), roleId: c.checkStr(obj["roleId"]), secretRef: toSecretRef(obj["secretRef"]), }} -export function toIssuerSpec_vault_auth_kubernetes(input: c.JSONValue) { +function toIssuerSpec_vault_auth_kubernetes(input: c.JSONValue) { const obj = c.checkObj(input); return { mountPath: c.readOpt(obj["mountPath"], c.checkStr), @@ -555,12 +555,12 @@ export function toIssuerSpec_vault_auth_kubernetes(input: c.JSONValue) { secretRef: c.readOpt(obj["secretRef"], toSecretRef), serviceAccountRef: c.readOpt(obj["serviceAccountRef"], toIssuerSpec_vault_auth_kubernetes_serviceAccountRef), }} -export function toIssuerSpec_venafi_tpp_credentialsRef(input: c.JSONValue) { +function toIssuerSpec_venafi_tpp_credentialsRef(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), }} -export function toIssuerSpec_vault_auth_kubernetes_serviceAccountRef(input: c.JSONValue) { +function toIssuerSpec_vault_auth_kubernetes_serviceAccountRef(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), @@ -743,7 +743,7 @@ export function fromSolverSpec(input: SolverSpec): c.JSONValue { } : undefined, } : undefined, }} -export function toSolverSpec_dns01(input: c.JSONValue) { +function toSolverSpec_dns01(input: c.JSONValue) { const obj = c.checkObj(input); return { acmeDNS: c.readOpt(obj["acmeDNS"], toSolverSpec_dns01_acmeDNS), @@ -757,26 +757,26 @@ export function toSolverSpec_dns01(input: c.JSONValue) { route53: c.readOpt(obj["route53"], toSolverSpec_dns01_route53), webhook: c.readOpt(obj["webhook"], toSolverSpec_dns01_webhook), }} -export function toSolverSpec_http01(input: c.JSONValue) { +function toSolverSpec_http01(input: c.JSONValue) { const obj = c.checkObj(input); return { gatewayHTTPRoute: c.readOpt(obj["gatewayHTTPRoute"], toSolverSpec_http01_gatewayHTTPRoute), ingress: c.readOpt(obj["ingress"], toSolverSpec_http01_ingress), }} -export function toSolverSpec_selector(input: c.JSONValue) { +function toSolverSpec_selector(input: c.JSONValue) { const obj = c.checkObj(input); return { dnsNames: c.readOpt(obj["dnsNames"], x => c.readList(x, c.checkStr)), dnsZones: c.readOpt(obj["dnsZones"], x => c.readList(x, c.checkStr)), matchLabels: c.readOpt(obj["matchLabels"], x => c.readMap(x, c.checkStr)), }} -export function toSolverSpec_dns01_acmeDNS(input: c.JSONValue) { +function toSolverSpec_dns01_acmeDNS(input: c.JSONValue) { const obj = c.checkObj(input); return { accountSecretRef: toSecretRef(obj["accountSecretRef"]), host: c.checkStr(obj["host"]), }} -export function toSolverSpec_dns01_akamai(input: c.JSONValue) { +function toSolverSpec_dns01_akamai(input: c.JSONValue) { const obj = c.checkObj(input); return { accessTokenSecretRef: toSecretRef(obj["accessTokenSecretRef"]), @@ -784,7 +784,7 @@ export function toSolverSpec_dns01_akamai(input: c.JSONValue) { clientTokenSecretRef: toSecretRef(obj["clientTokenSecretRef"]), serviceConsumerDomain: c.checkStr(obj["serviceConsumerDomain"]), }} -export function toSolverSpec_dns01_azureDNS(input: c.JSONValue) { +function toSolverSpec_dns01_azureDNS(input: c.JSONValue) { const obj = c.checkObj(input); return { clientID: c.readOpt(obj["clientID"], c.checkStr), @@ -796,26 +796,26 @@ export function toSolverSpec_dns01_azureDNS(input: c.JSONValue) { subscriptionID: c.checkStr(obj["subscriptionID"]), tenantID: c.readOpt(obj["tenantID"], c.checkStr), }} -export function toSolverSpec_dns01_cloudDNS(input: c.JSONValue) { +function toSolverSpec_dns01_cloudDNS(input: c.JSONValue) { const obj = c.checkObj(input); return { hostedZoneName: c.readOpt(obj["hostedZoneName"], c.checkStr), project: c.checkStr(obj["project"]), serviceAccountSecretRef: c.readOpt(obj["serviceAccountSecretRef"], toSecretRef), }} -export function toSolverSpec_dns01_cloudflare(input: c.JSONValue) { +function toSolverSpec_dns01_cloudflare(input: c.JSONValue) { const obj = c.checkObj(input); return { apiKeySecretRef: c.readOpt(obj["apiKeySecretRef"], toSecretRef), apiTokenSecretRef: c.readOpt(obj["apiTokenSecretRef"], toSecretRef), email: c.readOpt(obj["email"], c.checkStr), }} -export function toSolverSpec_dns01_digitalocean(input: c.JSONValue) { +function toSolverSpec_dns01_digitalocean(input: c.JSONValue) { const obj = c.checkObj(input); return { tokenSecretRef: toSecretRef(obj["tokenSecretRef"]), }} -export function toSolverSpec_dns01_rfc2136(input: c.JSONValue) { +function toSolverSpec_dns01_rfc2136(input: c.JSONValue) { const obj = c.checkObj(input); return { nameserver: c.checkStr(obj["nameserver"]), @@ -823,7 +823,7 @@ export function toSolverSpec_dns01_rfc2136(input: c.JSONValue) { tsigKeyName: c.readOpt(obj["tsigKeyName"], c.checkStr), tsigSecretSecretRef: c.readOpt(obj["tsigSecretSecretRef"], toSecretRef), }} -export function toSolverSpec_dns01_route53(input: c.JSONValue) { +function toSolverSpec_dns01_route53(input: c.JSONValue) { const obj = c.checkObj(input); return { accessKeyID: c.readOpt(obj["accessKeyID"], c.checkStr), @@ -833,21 +833,21 @@ export function toSolverSpec_dns01_route53(input: c.JSONValue) { role: c.readOpt(obj["role"], c.checkStr), secretAccessKeySecretRef: c.readOpt(obj["secretAccessKeySecretRef"], toSecretRef), }} -export function toSolverSpec_dns01_webhook(input: c.JSONValue) { +function toSolverSpec_dns01_webhook(input: c.JSONValue) { const obj = c.checkObj(input); return { config: c.readOpt(obj["config"], c.identity), groupName: c.checkStr(obj["groupName"]), solverName: c.checkStr(obj["solverName"]), }} -export function toSolverSpec_http01_gatewayHTTPRoute(input: c.JSONValue) { +function toSolverSpec_http01_gatewayHTTPRoute(input: c.JSONValue) { const obj = c.checkObj(input); return { labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), parentRefs: c.readOpt(obj["parentRefs"], x => c.readList(x, toSolverSpec_http01_gatewayHTTPRoute_parentRefs)), serviceType: c.readOpt(obj["serviceType"], c.checkStr), }} -export function toSolverSpec_http01_ingress(input: c.JSONValue) { +function toSolverSpec_http01_ingress(input: c.JSONValue) { const obj = c.checkObj(input); return { class: c.readOpt(obj["class"], c.checkStr), @@ -857,13 +857,13 @@ export function toSolverSpec_http01_ingress(input: c.JSONValue) { podTemplate: c.readOpt(obj["podTemplate"], toSolverSpec_http01_ingress_podTemplate), serviceType: c.readOpt(obj["serviceType"], c.checkStr), }} -export function toSolverSpec_dns01_azureDNS_managedIdentity(input: c.JSONValue) { +function toSolverSpec_dns01_azureDNS_managedIdentity(input: c.JSONValue) { const obj = c.checkObj(input); return { clientID: c.readOpt(obj["clientID"], c.checkStr), resourceID: c.readOpt(obj["resourceID"], c.checkStr), }} -export function toSolverSpec_http01_gatewayHTTPRoute_parentRefs(input: c.JSONValue) { +function toSolverSpec_http01_gatewayHTTPRoute_parentRefs(input: c.JSONValue) { const obj = c.checkObj(input); return { group: c.readOpt(obj["group"], c.checkStr), @@ -873,30 +873,30 @@ export function toSolverSpec_http01_gatewayHTTPRoute_parentRefs(input: c.JSONVal port: c.readOpt(obj["port"], c.checkNum), sectionName: c.readOpt(obj["sectionName"], c.checkStr), }} -export function toSolverSpec_http01_ingress_ingressTemplate(input: c.JSONValue) { +function toSolverSpec_http01_ingress_ingressTemplate(input: c.JSONValue) { const obj = c.checkObj(input); return { metadata: c.readOpt(obj["metadata"], toSolverSpec_http01_ingress_ingressTemplate_metadata), }} -export function toSolverSpec_http01_ingress_podTemplate(input: c.JSONValue) { +function toSolverSpec_http01_ingress_podTemplate(input: c.JSONValue) { const obj = c.checkObj(input); return { metadata: c.readOpt(obj["metadata"], toSolverSpec_http01_ingress_podTemplate_metadata), spec: c.readOpt(obj["spec"], toSolverSpec_http01_ingress_podTemplate_spec), }} -export function toSolverSpec_http01_ingress_ingressTemplate_metadata(input: c.JSONValue) { +function toSolverSpec_http01_ingress_ingressTemplate_metadata(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), }} -export function toSolverSpec_http01_ingress_podTemplate_metadata(input: c.JSONValue) { +function toSolverSpec_http01_ingress_podTemplate_metadata(input: c.JSONValue) { const obj = c.checkObj(input); return { annotations: c.readOpt(obj["annotations"], x => c.readMap(x, c.checkStr)), labels: c.readOpt(obj["labels"], x => c.readMap(x, c.checkStr)), }} -export function toSolverSpec_http01_ingress_podTemplate_spec(input: c.JSONValue) { +function toSolverSpec_http01_ingress_podTemplate_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { affinity: c.readOpt(obj["affinity"], CoreV1.toAffinity), @@ -906,12 +906,12 @@ export function toSolverSpec_http01_ingress_podTemplate_spec(input: c.JSONValue) serviceAccountName: c.readOpt(obj["serviceAccountName"], c.checkStr), tolerations: c.readOpt(obj["tolerations"], x => c.readList(x, toSolverSpec_http01_ingress_podTemplate_spec_tolerations)), }} -export function toSolverSpec_http01_ingress_podTemplate_spec_imagePullSecrets(input: c.JSONValue) { +function toSolverSpec_http01_ingress_podTemplate_spec_imagePullSecrets(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), }} -export function toSolverSpec_http01_ingress_podTemplate_spec_tolerations(input: c.JSONValue) { +function toSolverSpec_http01_ingress_podTemplate_spec_tolerations(input: c.JSONValue) { const obj = c.checkObj(input); return { effect: c.readOpt(obj["effect"], c.checkStr), @@ -951,14 +951,14 @@ export function fromIssuerStatus(input: IssuerStatus): c.JSONValue { lastTransitionTime: x.lastTransitionTime != null ? c.fromTime(x.lastTransitionTime) : undefined, })), }} -export function toIssuerStatus_acme(input: c.JSONValue) { +function toIssuerStatus_acme(input: c.JSONValue) { const obj = c.checkObj(input); return { lastPrivateKeyHash: c.readOpt(obj["lastPrivateKeyHash"], c.checkStr), lastRegisteredEmail: c.readOpt(obj["lastRegisteredEmail"], c.checkStr), uri: c.readOpt(obj["uri"], c.checkStr), }} -export function toIssuerStatus_conditions(input: c.JSONValue) { +function toIssuerStatus_conditions(input: c.JSONValue) { const obj = c.checkObj(input); return { lastTransitionTime: c.readOpt(obj["lastTransitionTime"], c.toTime), diff --git a/lib/client.ts b/lib/client.ts deleted file mode 100644 index b14cd5d..0000000 --- a/lib/client.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file is just the entire matching kubernetes_client version. -// kubernetes_apis itself only depends on specific files, -// so this is provided an optional utility (as opposed to deps.ts) - -export * from "https://deno.land/x/kubernetes_client@v0.7.0/mod.ts"; -export * as tunnelBeta from "https://deno.land/x/kubernetes_client@v0.7.0/tunnel-beta/via-websocket.ts"; diff --git a/lib/common.ts b/lib/common.ts index d62a639..a27e704 100644 --- a/lib/common.ts +++ b/lib/common.ts @@ -2,17 +2,24 @@ // All the generated code uses this centralized API contract, // while users are free to pass in a different compatible client to actually call -import { toStatus } from './builtin/meta@v1/structs.ts'; +import { toStatus, type Status } from "./builtin/meta@v1/structs.ts"; import { ApiKind, - JSONObject, JSONValue, + JSONObject, + JSONValue, RequestOptions, -} from "https://deno.land/x/kubernetes_client@v0.7.0/lib/contract.ts"; - -export * from "https://deno.land/x/kubernetes_client@v0.7.0/lib/contract.ts"; + type WatchEvent +} from "./deps.ts"; export { - WatchEventTransformer -} from "https://deno.land/x/kubernetes_client@v0.7.0/lib/stream-transformers.ts"; + type ApiKind, + type JSONValue, + type RestClient, + WatchEventTransformer, + type WatchEvent, +} from "./deps.ts"; + +// Shorthand for generated type signatures +export type WatchEventStream = ReadableStream>; // Helpers used to validate/transform structures from or for the wire // And some other stuff :) @@ -25,7 +32,10 @@ export function assertOrAddApiVersionAndKind< >(input: JSONObject | { apiVersion?: JSONValue; kind?: JSONValue; -}, expectedVersion: T, expectedKind: U, required = false) { +}, expectedVersion: T, expectedKind: U, required = false): { + apiVersion: T; + kind: U; +} { const output = { apiVersion: expectedVersion, kind: expectedKind }; // If nothing is given, we might return the expected data @@ -58,14 +68,14 @@ export function assertOrAddApiVersionAndKind< `Expected ${expected}, but was given ${given}. ${libBug}`); } -export function isStatusKind(input: JSONValue) { +export function isStatusKind(input: JSONValue): boolean { if (!input || typeof input !== 'object') return false; const res = input as ApiKind; return res.apiVersion === 'v1' && res.kind === 'Status'; } -export function identity(input: JSONValue) { +export function identity(input: JSONValue): JSONValue { return input; } @@ -234,7 +244,7 @@ export function toIntOrString(input: JSONValue): string | number { // apply-patch is an up-and-coming feature "Server-Side Apply" and not enabled by default yet. export type PatchType = 'strategic-merge' | 'json-merge' | 'json-patch' | 'apply-patch'; -export function getPatchContentType(type: PatchType) { +export function getPatchContentType(type: PatchType): string { switch (type) { case 'strategic-merge': return 'application/strategic-merge-patch+json'; case 'json-merge': return 'application/merge-patch+json'; diff --git a/lib/deps.ts b/lib/deps.ts new file mode 100644 index 0000000..70ac350 --- /dev/null +++ b/lib/deps.ts @@ -0,0 +1,11 @@ +// This file is just the entire matching kubernetes_client version. +// kubernetes_apis itself only depends on specific files, +// so this is provided an optional utility + +export * from "https://deno.land/x/kubernetes_client@v0.7.3/mod.ts"; +export * as tunnelBeta from "https://deno.land/x/kubernetes_client@v0.7.3/tunnel-beta/via-websocket.ts"; + +export * from "https://deno.land/x/kubernetes_client@v0.7.3/lib/contract.ts"; +export { + WatchEventTransformer, +} from "https://deno.land/x/kubernetes_client@v0.7.3/lib/stream-transformers.ts"; diff --git a/lib/deps_jsr.ts b/lib/deps_jsr.ts new file mode 100644 index 0000000..0af8212 --- /dev/null +++ b/lib/deps_jsr.ts @@ -0,0 +1,5 @@ +// This file is just the entire matching kubernetes_client version. +// kubernetes_apis itself only depends on specific files, +// so this is provided an optional utility + +export * from "jsr:@cloudydeno/kubernetes-client@0.7.3"; diff --git a/lib/examples/argocd.ts b/lib/examples/argocd.ts index f8af34d..e5cd9a8 100755 --- a/lib/examples/argocd.ts +++ b/lib/examples/argocd.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { autoDetectClient, readAllItems } from '../client.ts'; +import { autoDetectClient, readAllItems } from '../deps.ts'; import { ArgoprojIoV1alpha1NamespacedApi } from "../argo-cd/argoproj.io@v1alpha1/mod.ts"; const restClient = await autoDetectClient(); diff --git a/lib/examples/demo.ts b/lib/examples/demo.ts index ba56058..e5ea39d 100755 --- a/lib/examples/demo.ts +++ b/lib/examples/demo.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { autoDetectClient, readAllItems } from '../client.ts'; +import { autoDetectClient, readAllItems } from '../deps.ts'; import { AppsV1Api } from "../builtin/apps@v1/mod.ts"; import { CoreV1Api } from "../builtin/core@v1/mod.ts"; diff --git a/lib/examples/follow-logs.ts b/lib/examples/follow-logs.ts index 5861ada..d3e23f7 100755 --- a/lib/examples/follow-logs.ts +++ b/lib/examples/follow-logs.ts @@ -3,7 +3,7 @@ // Breaks up a text stream into lines import { TextLineStream } from "https://deno.land/std@0.177.0/streams/text_line_stream.ts"; -import { autoDetectClient } from '../client.ts'; +import { autoDetectClient } from '../deps.ts'; import { CoreV1Api } from '../builtin/core@v1/mod.ts'; const restClient = await autoDetectClient(); diff --git a/lib/examples/list-crds.ts b/lib/examples/list-crds.ts index b024aa5..24ccef2 100755 --- a/lib/examples/list-crds.ts +++ b/lib/examples/list-crds.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { autoDetectClient, readAllItems } from '../client.ts'; +import { autoDetectClient, readAllItems } from '../deps.ts'; import { ApiextensionsV1Api } from "../builtin/apiextensions.k8s.io@v1/mod.ts"; const restClient = await autoDetectClient(); diff --git a/lib/examples/pod-exec-output.ts b/lib/examples/pod-exec-output.ts index 192462d..52b93ef 100755 --- a/lib/examples/pod-exec-output.ts +++ b/lib/examples/pod-exec-output.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --unstable -import { tunnelBeta, makeClientProviderChain } from '../client.ts'; +import { tunnelBeta, makeClientProviderChain } from '../deps.ts'; import { CoreV1Api } from '../builtin/core@v1/mod.ts'; // Set up an experimental client which can use Websockets diff --git a/lib/examples/pod-exec-tty.ts b/lib/examples/pod-exec-tty.ts index dcee3f9..f6c2128 100755 --- a/lib/examples/pod-exec-tty.ts +++ b/lib/examples/pod-exec-tty.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --unstable --allow-env --allow-read --allow-net -import { tunnelBeta, makeClientProviderChain } from '../client.ts'; +import { tunnelBeta, makeClientProviderChain } from '../deps.ts'; import { CoreV1Api } from '../builtin/core@v1/mod.ts'; // Set up an experimental client which can use Websockets diff --git a/lib/examples/pod-portforward.ts b/lib/examples/pod-portforward.ts index 91763ab..d4bb9fb 100755 --- a/lib/examples/pod-portforward.ts +++ b/lib/examples/pod-portforward.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --unstable -import { tunnelBeta, makeClientProviderChain } from '../client.ts'; +import { tunnelBeta, makeClientProviderChain } from '../deps.ts'; import { CoreV1Api } from '../builtin/core@v1/mod.ts'; // Set up an experimental client which can use Websockets diff --git a/lib/examples/run-job-evented.ts b/lib/examples/run-job-evented.ts index 0c1d5bf..2dd16e5 100755 --- a/lib/examples/run-job-evented.ts +++ b/lib/examples/run-job-evented.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { Reflector, autoDetectClient } from "../client.ts"; +import { Reflector, autoDetectClient } from "../deps.ts"; import { CoreV1Api } from "../builtin/core@v1/mod.ts"; import { BatchV1Api } from "../builtin/batch@v1/mod.ts"; import { TextLineStream } from "https://deno.land/std@0.177.0/streams/text_line_stream.ts"; diff --git a/lib/examples/run-job.ts b/lib/examples/run-job.ts index 31aa8fb..07521d5 100755 --- a/lib/examples/run-job.ts +++ b/lib/examples/run-job.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { autoDetectClient } from "../client.ts"; +import { autoDetectClient } from "../deps.ts"; import { CoreV1Api } from "../builtin/core@v1/mod.ts"; import { BatchV1Api } from "../builtin/batch@v1/mod.ts"; diff --git a/lib/examples/top-nodes.ts b/lib/examples/top-nodes.ts index 4916538..b3b4378 100755 --- a/lib/examples/top-nodes.ts +++ b/lib/examples/top-nodes.ts @@ -23,7 +23,7 @@ * - pods: 18 */ -import { autoDetectClient } from "../client.ts"; +import { autoDetectClient } from "../deps.ts"; import { CoreV1Api } from "../builtin/core@v1/mod.ts"; const restClient = await autoDetectClient(); diff --git a/lib/examples/watch-ingress.ts b/lib/examples/watch-ingress.ts index 762df16..1842b04 100755 --- a/lib/examples/watch-ingress.ts +++ b/lib/examples/watch-ingress.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { autoDetectClient, Reflector } from "../client.ts"; +import { autoDetectClient, Reflector } from "../deps.ts"; import { NetworkingV1Api } from "../builtin/networking.k8s.io@v1/mod.ts"; const restClient = await autoDetectClient(); diff --git a/lib/examples/watch-nodes.ts b/lib/examples/watch-nodes.ts index 7b0a0e6..0d02e05 100755 --- a/lib/examples/watch-nodes.ts +++ b/lib/examples/watch-nodes.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --allow-run --unstable -import { autoDetectClient, Reflector } from "../client.ts"; +import { autoDetectClient, Reflector } from "../deps.ts"; // import { CoreV1Api } from "../builtin/core@v1/mod.ts"; import { CoordinationV1Api } from "../builtin/coordination.k8s.io@v1/mod.ts"; diff --git a/lib/external-dns/externaldns.k8s.io@v1alpha1/mod.ts b/lib/external-dns/externaldns.k8s.io@v1alpha1/mod.ts index dbeae2e..8539168 100644 --- a/lib/external-dns/externaldns.k8s.io@v1alpha1/mod.ts +++ b/lib/external-dns/externaldns.k8s.io@v1alpha1/mod.ts @@ -13,15 +13,17 @@ export class ExternaldnsV1alpha1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): ExternaldnsV1alpha1NamespacedApi { return new ExternaldnsV1alpha1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): ExternaldnsV1alpha1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new ExternaldnsV1alpha1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getDNSEndpointListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getDNSEndpointListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}dnsendpoints`, @@ -32,7 +34,9 @@ export class ExternaldnsV1alpha1Api { return ExternaldnsV1alpha1.toDNSEndpointList(resp); } - async watchDNSEndpointListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchDNSEndpointListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}dnsendpoints`, @@ -54,7 +58,9 @@ export class ExternaldnsV1alpha1NamespacedApi { this.#root = `/apis/externaldns.k8s.io/v1alpha1/namespaces/${namespace}/`; } - async getDNSEndpointList(opts: operations.GetListOpts = {}) { + async getDNSEndpointList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}dnsendpoints`, @@ -65,7 +71,9 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpointList(resp); } - async watchDNSEndpointList(opts: operations.WatchListOpts = {}) { + async watchDNSEndpointList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}dnsendpoints`, @@ -77,7 +85,10 @@ export class ExternaldnsV1alpha1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(ExternaldnsV1alpha1.toDNSEndpoint, MetaV1.toStatus)); } - async createDNSEndpoint(body: ExternaldnsV1alpha1.DNSEndpoint, opts: operations.PutOpts = {}) { + async createDNSEndpoint( + body: ExternaldnsV1alpha1.DNSEndpoint, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}dnsendpoints`, @@ -89,7 +100,9 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async deleteDNSEndpointList(opts: operations.DeleteListOpts = {}) { + async deleteDNSEndpointList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}dnsendpoints`, @@ -100,7 +113,10 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpointList(resp); } - async getDNSEndpoint(name: string, opts: operations.NoOpts = {}) { + async getDNSEndpoint( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}dnsendpoints/${name}`, @@ -110,7 +126,10 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async deleteDNSEndpoint(name: string, opts: operations.DeleteOpts = {}) { + async deleteDNSEndpoint( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}dnsendpoints/${name}`, @@ -122,7 +141,11 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async replaceDNSEndpoint(name: string, body: ExternaldnsV1alpha1.DNSEndpoint, opts: operations.PutOpts = {}) { + async replaceDNSEndpoint( + name: string, + body: ExternaldnsV1alpha1.DNSEndpoint, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}dnsendpoints/${name}`, @@ -134,7 +157,12 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async patchDNSEndpoint(name: string, type: c.PatchType, body: ExternaldnsV1alpha1.DNSEndpoint | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDNSEndpoint( + name: string, + type: c.PatchType, + body: ExternaldnsV1alpha1.DNSEndpoint | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}dnsendpoints/${name}`, @@ -147,7 +175,10 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async getDNSEndpointStatus(name: string, opts: operations.NoOpts = {}) { + async getDNSEndpointStatus( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}dnsendpoints/${name}/status`, @@ -157,7 +188,11 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async replaceDNSEndpointStatus(name: string, body: ExternaldnsV1alpha1.DNSEndpoint, opts: operations.PutOpts = {}) { + async replaceDNSEndpointStatus( + name: string, + body: ExternaldnsV1alpha1.DNSEndpoint, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}dnsendpoints/${name}/status`, @@ -169,7 +204,12 @@ export class ExternaldnsV1alpha1NamespacedApi { return ExternaldnsV1alpha1.toDNSEndpoint(resp); } - async patchDNSEndpointStatus(name: string, type: c.PatchType, body: ExternaldnsV1alpha1.DNSEndpoint | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchDNSEndpointStatus( + name: string, + type: c.PatchType, + body: ExternaldnsV1alpha1.DNSEndpoint | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}dnsendpoints/${name}/status`, diff --git a/lib/external-dns/externaldns.k8s.io@v1alpha1/structs.ts b/lib/external-dns/externaldns.k8s.io@v1alpha1/structs.ts index ee3051e..ed016ca 100644 --- a/lib/external-dns/externaldns.k8s.io@v1alpha1/structs.ts +++ b/lib/external-dns/externaldns.k8s.io@v1alpha1/structs.ts @@ -43,17 +43,17 @@ export function fromDNSEndpoint(input: DNSEndpoint): c.JSONValue { ...input, metadata: input.metadata != null ? MetaV1.fromObjectMeta(input.metadata) : undefined, }} -export function toDNSEndpoint_spec(input: c.JSONValue) { +function toDNSEndpoint_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { endpoints: c.readOpt(obj["endpoints"], x => c.readList(x, toDNSEndpoint_spec_endpoints)), }} -export function toDNSEndpoint_status(input: c.JSONValue) { +function toDNSEndpoint_status(input: c.JSONValue) { const obj = c.checkObj(input); return { observedGeneration: c.readOpt(obj["observedGeneration"], c.checkNum), }} -export function toDNSEndpoint_spec_endpoints(input: c.JSONValue) { +function toDNSEndpoint_spec_endpoints(input: c.JSONValue) { const obj = c.checkObj(input); return { dnsName: c.readOpt(obj["dnsName"], c.checkStr), @@ -64,7 +64,7 @@ export function toDNSEndpoint_spec_endpoints(input: c.JSONValue) { setIdentifier: c.readOpt(obj["setIdentifier"], c.checkStr), targets: c.readOpt(obj["targets"], x => c.readList(x, c.checkStr)), }} -export function toDNSEndpoint_spec_endpoints_providerSpecific(input: c.JSONValue) { +function toDNSEndpoint_spec_endpoints_providerSpecific(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.readOpt(obj["name"], c.checkStr), diff --git a/lib/jsr.json b/lib/jsr.json new file mode 100644 index 0000000..7feb660 --- /dev/null +++ b/lib/jsr.json @@ -0,0 +1,58 @@ +{ + "name": "@cloudydeno/kubernetes-apis", + "version": "0.5.1", + "exports": { + + "./admissionregistration.k8s.io/v1": "./builtin/admissionregistration.k8s.io@v1/mod.ts", + "./admissionregistration.k8s.io/v1alpha1": "./builtin/admissionregistration.k8s.io@v1alpha1/mod.ts", + "./admissionregistration.k8s.io/v1beta1": "./builtin/admissionregistration.k8s.io@v1beta1/mod.ts", + "./apiextensions.k8s.io/v1": "./builtin/apiextensions.k8s.io@v1/mod.ts", + "./apiregistration.k8s.io/v1": "./builtin/apiregistration.k8s.io@v1/mod.ts", + "./apps/v1": "./builtin/apps@v1/mod.ts", + "./authentication.k8s.io/v1": "./builtin/authentication.k8s.io@v1/mod.ts", + "./authentication.k8s.io/v1alpha1": "./builtin/authentication.k8s.io@v1alpha1/mod.ts", + "./authentication.k8s.io/v1beta1": "./builtin/authentication.k8s.io@v1beta1/mod.ts", + "./authorization.k8s.io/v1": "./builtin/authorization.k8s.io@v1/mod.ts", + "./autoscaling/v1": "./builtin/autoscaling@v1/mod.ts", + "./autoscaling/v2": "./builtin/autoscaling@v2/mod.ts", + "./batch/v1": "./builtin/batch@v1/mod.ts", + "./certificates.k8s.io/v1": "./builtin/certificates.k8s.io@v1/mod.ts", + "./certificates.k8s.io/v1alpha1": "./builtin/certificates.k8s.io@v1alpha1/mod.ts", + "./coordination.k8s.io/v1": "./builtin/coordination.k8s.io@v1/mod.ts", + "./core/v1": "./builtin/core@v1/mod.ts", + "./discovery.k8s.io/v1": "./builtin/discovery.k8s.io@v1/mod.ts", + "./events.k8s.io/v1": "./builtin/events.k8s.io@v1/mod.ts", + "./flowcontrol.apiserver.k8s.io/v1beta2": "./builtin/flowcontrol.apiserver.k8s.io@v1beta2/mod.ts", + "./flowcontrol.apiserver.k8s.io/v1beta3": "./builtin/flowcontrol.apiserver.k8s.io@v1beta3/mod.ts", + "./internal.apiserver.k8s.io/v1alpha1": "./builtin/internal.apiserver.k8s.io@v1alpha1/mod.ts", + "./meta/v1": "./builtin/meta@v1/structs.ts", + "./networking.k8s.io/v1": "./builtin/networking.k8s.io@v1/mod.ts", + "./networking.k8s.io/v1alpha1": "./builtin/networking.k8s.io@v1alpha1/mod.ts", + "./node.k8s.io/v1": "./builtin/node.k8s.io@v1/mod.ts", + "./policy/v1": "./builtin/policy@v1/mod.ts", + "./rbac.authorization.k8s.io/v1": "./builtin/rbac.authorization.k8s.io@v1/mod.ts", + "./resource.k8s.io/v1alpha2": "./builtin/resource.k8s.io@v1alpha2/mod.ts", + "./scheduling.k8s.io/v1": "./builtin/scheduling.k8s.io@v1/mod.ts", + "./storage.k8s.io/v1": "./builtin/storage.k8s.io@v1/mod.ts", + + "./argoproj.io/v1alpha1": "./argo-cd/argoproj.io@v1alpha1/mod.ts", + + "./acme.cert-manager.io/v1": "./cert-manager/acme.cert-manager.io@v1/mod.ts", + "./cert-manager.io/v1": "./cert-manager/cert-manager.io@v1/mod.ts", + + "./externaldns.k8s.io/v1alpha1": "./external-dns/externaldns.k8s.io@v1alpha1/mod.ts", + + "./autoscaling.k8s.io/v1": "./vpa/autoscaling.k8s.io@v1/mod.ts", + + "./common.ts": "./common.ts", + "./deps.ts": "./deps.ts", + "./operations.ts": "./operations.ts", + "./tunnels.ts": "./tunnels.ts" + }, + "publish": { + "exclude": [ + "examples", + "deps_https.ts" + ] + } +} diff --git a/lib/tunnels.ts b/lib/tunnels.ts index 4efa7ca..4250dce 100644 --- a/lib/tunnels.ts +++ b/lib/tunnels.ts @@ -1,4 +1,4 @@ -import type { KubernetesTunnel } from "./common.ts"; +import type { KubernetesTunnel } from "./deps.ts"; export type TerminalSize = { columns: number; @@ -93,26 +93,26 @@ export class StdioTunnel { // Take a cue from Deno.Command which presents the streams unconditionally // but throws if they are used when not configured - get stdin() { + get stdin(): WritableStream { if (!this.#stdin) throw new TypeError("stdin was not requested"); return this.#stdin; } - get stdout() { + get stdout(): ReadableStream { if (!this.#stdout) throw new TypeError("stdout was not requested"); return this.#stdout; } - get stderr() { + get stderr(): ReadableStream { if (!this.#stderr) throw new TypeError("stderr was not requested"); return this.#stderr; } /** If tty was requested, an outbound stream for dynamically changing the TTY dimensions */ - get ttyResizeStream() { + get ttyResizeStream(): WritableStream { if (!this.#resize) throw new TypeError("tty was not requested"); return this.#resize; } /** Shorthand for injecting Ctrl-C and others when running an interactive TTY */ - async ttyWriteSignal(signal: 'INTR' | 'QUIT' | 'SUSP') { + async ttyWriteSignal(signal: 'INTR' | 'QUIT' | 'SUSP'): Promise { if (!this.#stdinWriter) throw new TypeError("tty and stdin were not requested together, cannot write signals"); switch (signal) { // via https://man7.org/linux/man-pages/man3/termios.3.html @@ -124,7 +124,7 @@ export class StdioTunnel { } /** Shorthand for writing to the tty resize stream, especially useful for setting an initial size */ - async ttySetSize(size: TerminalSize) { + async ttySetSize(size: TerminalSize): Promise { const sizeWriter = this.ttyResizeStream.getWriter(); await sizeWriter.write(size); sizeWriter.releaseLock(); @@ -132,7 +132,10 @@ export class StdioTunnel { // Based on https://github.com/denoland/deno/blob/ca9ba87d9956e3f940e0116866e19461f008390b/runtime/js/40_process.js#L282C1-L319C1 /** Buffers all data for stdout and/or stderr and returns the buffers when the remote command exits. */ - async output() { + async output(): Promise { if (this.#stdout?.locked) { throw new TypeError( "Can't collect output because stdout is locked", @@ -164,7 +167,7 @@ export class StdioTunnel { } /** Immediately disconnects the network tunnel, likely dropping any in-flight data. */ - kill() { + kill(): void { this.tunnel.stop(); } } @@ -228,11 +231,15 @@ export class PortforwardTunnel { private nextRequestId = 0; private remainingPorts = new Array; - get ready() { + get ready(): Promise { return this.tunnel.ready(); } - async connectToPort(port: number) { + async connectToPort(port: number): Promise<{ + result: Promise; + readable: ReadableStream; + writable: WritableStream; + }> { let dataIdx: number | undefined = undefined; let errorIdx: number | undefined = undefined; @@ -283,7 +290,7 @@ export class PortforwardTunnel { servePortforward(opts: Deno.ListenOptions & { targetPort: number; - }) { + }): Deno.Listener { const listener = Deno.listen(opts); (async () => { for await (const downstream of listener) { @@ -302,13 +309,13 @@ export class PortforwardTunnel { return listener; } - disconnect() { + disconnect(): void { this.tunnel.stop(); } } class DropPrefix extends TransformStream { - constructor(expectedPort: number) { + constructor(_expectedPort: number) { let remaining = 2; super({ transform(chunk, ctlr) { diff --git a/lib/vpa/autoscaling.k8s.io@v1/mod.ts b/lib/vpa/autoscaling.k8s.io@v1/mod.ts index d58802d..1cf1459 100644 --- a/lib/vpa/autoscaling.k8s.io@v1/mod.ts +++ b/lib/vpa/autoscaling.k8s.io@v1/mod.ts @@ -13,15 +13,17 @@ export class AutoscalingV1Api { this.#client = client; } - namespace(name: string) { + namespace(name: string): AutoscalingV1NamespacedApi { return new AutoscalingV1NamespacedApi(this.#client, name); } - myNamespace() { + myNamespace(): AutoscalingV1NamespacedApi { if (!this.#client.defaultNamespace) throw new Error("No current namespace is set"); return new AutoscalingV1NamespacedApi(this.#client, this.#client.defaultNamespace); } - async getVerticalPodAutoscalerCheckpointListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getVerticalPodAutoscalerCheckpointListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalercheckpoints`, @@ -32,7 +34,9 @@ export class AutoscalingV1Api { return AutoscalingV1.toVerticalPodAutoscalerCheckpointList(resp); } - async watchVerticalPodAutoscalerCheckpointListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchVerticalPodAutoscalerCheckpointListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalercheckpoints`, @@ -44,7 +48,9 @@ export class AutoscalingV1Api { return resp.pipeThrough(new c.WatchEventTransformer(AutoscalingV1.toVerticalPodAutoscalerCheckpoint, MetaV1.toStatus)); } - async getVerticalPodAutoscalerListForAllNamespaces(opts: operations.GetListOpts = {}) { + async getVerticalPodAutoscalerListForAllNamespaces( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalers`, @@ -55,7 +61,9 @@ export class AutoscalingV1Api { return AutoscalingV1.toVerticalPodAutoscalerList(resp); } - async watchVerticalPodAutoscalerListForAllNamespaces(opts: operations.WatchListOpts = {}) { + async watchVerticalPodAutoscalerListForAllNamespaces( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalers`, @@ -77,7 +85,9 @@ export class AutoscalingV1NamespacedApi { this.#root = `/apis/autoscaling.k8s.io/v1/namespaces/${namespace}/`; } - async getVerticalPodAutoscalerCheckpointList(opts: operations.GetListOpts = {}) { + async getVerticalPodAutoscalerCheckpointList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalercheckpoints`, @@ -88,7 +98,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpointList(resp); } - async watchVerticalPodAutoscalerCheckpointList(opts: operations.WatchListOpts = {}) { + async watchVerticalPodAutoscalerCheckpointList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalercheckpoints`, @@ -100,7 +112,10 @@ export class AutoscalingV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AutoscalingV1.toVerticalPodAutoscalerCheckpoint, MetaV1.toStatus)); } - async createVerticalPodAutoscalerCheckpoint(body: AutoscalingV1.VerticalPodAutoscalerCheckpoint, opts: operations.PutOpts = {}) { + async createVerticalPodAutoscalerCheckpoint( + body: AutoscalingV1.VerticalPodAutoscalerCheckpoint, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}verticalpodautoscalercheckpoints`, @@ -112,7 +127,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpoint(resp); } - async deleteVerticalPodAutoscalerCheckpointList(opts: operations.DeleteListOpts = {}) { + async deleteVerticalPodAutoscalerCheckpointList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}verticalpodautoscalercheckpoints`, @@ -123,7 +140,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpointList(resp); } - async getVerticalPodAutoscalerCheckpoint(name: string, opts: operations.NoOpts = {}) { + async getVerticalPodAutoscalerCheckpoint( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalercheckpoints/${name}`, @@ -133,7 +153,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpoint(resp); } - async deleteVerticalPodAutoscalerCheckpoint(name: string, opts: operations.DeleteOpts = {}) { + async deleteVerticalPodAutoscalerCheckpoint( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}verticalpodautoscalercheckpoints/${name}`, @@ -145,7 +168,11 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpoint(resp); } - async replaceVerticalPodAutoscalerCheckpoint(name: string, body: AutoscalingV1.VerticalPodAutoscalerCheckpoint, opts: operations.PutOpts = {}) { + async replaceVerticalPodAutoscalerCheckpoint( + name: string, + body: AutoscalingV1.VerticalPodAutoscalerCheckpoint, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}verticalpodautoscalercheckpoints/${name}`, @@ -157,7 +184,12 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpoint(resp); } - async patchVerticalPodAutoscalerCheckpoint(name: string, type: c.PatchType, body: AutoscalingV1.VerticalPodAutoscalerCheckpoint | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchVerticalPodAutoscalerCheckpoint( + name: string, + type: c.PatchType, + body: AutoscalingV1.VerticalPodAutoscalerCheckpoint | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}verticalpodautoscalercheckpoints/${name}`, @@ -170,7 +202,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerCheckpoint(resp); } - async getVerticalPodAutoscalerList(opts: operations.GetListOpts = {}) { + async getVerticalPodAutoscalerList( + opts: operations.GetListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalers`, @@ -181,7 +215,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerList(resp); } - async watchVerticalPodAutoscalerList(opts: operations.WatchListOpts = {}) { + async watchVerticalPodAutoscalerList( + opts: operations.WatchListOpts = {}, + ): Promise> { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalers`, @@ -193,7 +229,10 @@ export class AutoscalingV1NamespacedApi { return resp.pipeThrough(new c.WatchEventTransformer(AutoscalingV1.toVerticalPodAutoscaler, MetaV1.toStatus)); } - async createVerticalPodAutoscaler(body: AutoscalingV1.VerticalPodAutoscaler, opts: operations.PutOpts = {}) { + async createVerticalPodAutoscaler( + body: AutoscalingV1.VerticalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "POST", path: `${this.#root}verticalpodautoscalers`, @@ -205,7 +244,9 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscaler(resp); } - async deleteVerticalPodAutoscalerList(opts: operations.DeleteListOpts = {}) { + async deleteVerticalPodAutoscalerList( + opts: operations.DeleteListOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}verticalpodautoscalers`, @@ -216,7 +257,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscalerList(resp); } - async getVerticalPodAutoscaler(name: string, opts: operations.NoOpts = {}) { + async getVerticalPodAutoscaler( + name: string, + opts: operations.NoOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "GET", path: `${this.#root}verticalpodautoscalers/${name}`, @@ -226,7 +270,10 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscaler(resp); } - async deleteVerticalPodAutoscaler(name: string, opts: operations.DeleteOpts = {}) { + async deleteVerticalPodAutoscaler( + name: string, + opts: operations.DeleteOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "DELETE", path: `${this.#root}verticalpodautoscalers/${name}`, @@ -238,7 +285,11 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscaler(resp); } - async replaceVerticalPodAutoscaler(name: string, body: AutoscalingV1.VerticalPodAutoscaler, opts: operations.PutOpts = {}) { + async replaceVerticalPodAutoscaler( + name: string, + body: AutoscalingV1.VerticalPodAutoscaler, + opts: operations.PutOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PUT", path: `${this.#root}verticalpodautoscalers/${name}`, @@ -250,7 +301,12 @@ export class AutoscalingV1NamespacedApi { return AutoscalingV1.toVerticalPodAutoscaler(resp); } - async patchVerticalPodAutoscaler(name: string, type: c.PatchType, body: AutoscalingV1.VerticalPodAutoscaler | c.JsonPatch, opts: operations.PatchOpts = {}) { + async patchVerticalPodAutoscaler( + name: string, + type: c.PatchType, + body: AutoscalingV1.VerticalPodAutoscaler | c.JsonPatch, + opts: operations.PatchOpts = {}, + ): Promise { const resp = await this.#client.performRequest({ method: "PATCH", path: `${this.#root}verticalpodautoscalers/${name}`, diff --git a/lib/vpa/autoscaling.k8s.io@v1/structs.ts b/lib/vpa/autoscaling.k8s.io@v1/structs.ts index e7b8915..c5bce3e 100644 --- a/lib/vpa/autoscaling.k8s.io@v1/structs.ts +++ b/lib/vpa/autoscaling.k8s.io@v1/structs.ts @@ -62,13 +62,13 @@ export function fromVerticalPodAutoscalerCheckpoint(input: VerticalPodAutoscaler } : undefined, } : undefined, }} -export function toVerticalPodAutoscalerCheckpoint_spec(input: c.JSONValue) { +function toVerticalPodAutoscalerCheckpoint_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { containerName: c.readOpt(obj["containerName"], c.checkStr), vpaObjectName: c.readOpt(obj["vpaObjectName"], c.checkStr), }} -export function toVerticalPodAutoscalerCheckpoint_status(input: c.JSONValue) { +function toVerticalPodAutoscalerCheckpoint_status(input: c.JSONValue) { const obj = c.checkObj(input); return { cpuHistogram: c.readOpt(obj["cpuHistogram"], toVerticalPodAutoscalerCheckpoint_status_cpuHistogram), @@ -79,14 +79,14 @@ export function toVerticalPodAutoscalerCheckpoint_status(input: c.JSONValue) { totalSamplesCount: c.readOpt(obj["totalSamplesCount"], c.checkNum), version: c.readOpt(obj["version"], c.checkStr), }} -export function toVerticalPodAutoscalerCheckpoint_status_cpuHistogram(input: c.JSONValue) { +function toVerticalPodAutoscalerCheckpoint_status_cpuHistogram(input: c.JSONValue) { const obj = c.checkObj(input); return { bucketWeights: c.readOpt(obj["bucketWeights"], c.identity), referenceTimestamp: c.readOpt(obj["referenceTimestamp"], c.toTime), totalWeight: c.readOpt(obj["totalWeight"], c.checkNum), }} -export function toVerticalPodAutoscalerCheckpoint_status_memoryHistogram(input: c.JSONValue) { +function toVerticalPodAutoscalerCheckpoint_status_memoryHistogram(input: c.JSONValue) { const obj = c.checkObj(input); return { bucketWeights: c.readOpt(obj["bucketWeights"], c.identity), @@ -175,7 +175,7 @@ export function fromVerticalPodAutoscaler(input: VerticalPodAutoscaler): c.JSONV })), } : undefined, }} -export function toVerticalPodAutoscaler_spec(input: c.JSONValue) { +function toVerticalPodAutoscaler_spec(input: c.JSONValue) { const obj = c.checkObj(input); return { recommenders: c.readOpt(obj["recommenders"], x => c.readList(x, toVerticalPodAutoscaler_spec_recommenders)), @@ -183,36 +183,36 @@ export function toVerticalPodAutoscaler_spec(input: c.JSONValue) { targetRef: toVerticalPodAutoscaler_spec_targetRef(obj["targetRef"]), updatePolicy: c.readOpt(obj["updatePolicy"], toVerticalPodAutoscaler_spec_updatePolicy), }} -export function toVerticalPodAutoscaler_status(input: c.JSONValue) { +function toVerticalPodAutoscaler_status(input: c.JSONValue) { const obj = c.checkObj(input); return { conditions: c.readOpt(obj["conditions"], x => c.readList(x, toVerticalPodAutoscaler_status_conditions)), recommendation: c.readOpt(obj["recommendation"], toVerticalPodAutoscaler_status_recommendation), }} -export function toVerticalPodAutoscaler_spec_recommenders(input: c.JSONValue) { +function toVerticalPodAutoscaler_spec_recommenders(input: c.JSONValue) { const obj = c.checkObj(input); return { name: c.checkStr(obj["name"]), }} -export function toVerticalPodAutoscaler_spec_resourcePolicy(input: c.JSONValue) { +function toVerticalPodAutoscaler_spec_resourcePolicy(input: c.JSONValue) { const obj = c.checkObj(input); return { containerPolicies: c.readOpt(obj["containerPolicies"], x => c.readList(x, toVerticalPodAutoscaler_spec_resourcePolicy_containerPolicies)), }} -export function toVerticalPodAutoscaler_spec_targetRef(input: c.JSONValue) { +function toVerticalPodAutoscaler_spec_targetRef(input: c.JSONValue) { const obj = c.checkObj(input); return { apiVersion: c.readOpt(obj["apiVersion"], c.checkStr), kind: c.checkStr(obj["kind"]), name: c.checkStr(obj["name"]), }} -export function toVerticalPodAutoscaler_spec_updatePolicy(input: c.JSONValue) { +function toVerticalPodAutoscaler_spec_updatePolicy(input: c.JSONValue) { const obj = c.checkObj(input); return { minReplicas: c.readOpt(obj["minReplicas"], c.checkNum), updateMode: c.readOpt(obj["updateMode"], (x => c.readEnum<"Off" | "Initial" | "Recreate" | "Auto" | c.UnexpectedEnumValue>(x))), }} -export function toVerticalPodAutoscaler_status_conditions(input: c.JSONValue) { +function toVerticalPodAutoscaler_status_conditions(input: c.JSONValue) { const obj = c.checkObj(input); return { lastTransitionTime: c.readOpt(obj["lastTransitionTime"], c.toTime), @@ -221,12 +221,12 @@ export function toVerticalPodAutoscaler_status_conditions(input: c.JSONValue) { status: c.checkStr(obj["status"]), type: c.checkStr(obj["type"]), }} -export function toVerticalPodAutoscaler_status_recommendation(input: c.JSONValue) { +function toVerticalPodAutoscaler_status_recommendation(input: c.JSONValue) { const obj = c.checkObj(input); return { containerRecommendations: c.readOpt(obj["containerRecommendations"], x => c.readList(x, toVerticalPodAutoscaler_status_recommendation_containerRecommendations)), }} -export function toVerticalPodAutoscaler_spec_resourcePolicy_containerPolicies(input: c.JSONValue) { +function toVerticalPodAutoscaler_spec_resourcePolicy_containerPolicies(input: c.JSONValue) { const obj = c.checkObj(input); return { containerName: c.readOpt(obj["containerName"], c.checkStr), @@ -236,7 +236,7 @@ export function toVerticalPodAutoscaler_spec_resourcePolicy_containerPolicies(in minAllowed: c.readOpt(obj["minAllowed"], x => c.readMap(x, c.toIntOrString)), mode: c.readOpt(obj["mode"], (x => c.readEnum<"Auto" | "Off" | c.UnexpectedEnumValue>(x))), }} -export function toVerticalPodAutoscaler_status_recommendation_containerRecommendations(input: c.JSONValue) { +function toVerticalPodAutoscaler_status_recommendation_containerRecommendations(input: c.JSONValue) { const obj = c.checkObj(input); return { containerName: c.readOpt(obj["containerName"], c.checkStr), diff --git a/with-jsr-deps.sh b/with-jsr-deps.sh new file mode 100755 index 0000000..ee2ec6a --- /dev/null +++ b/with-jsr-deps.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env sh +set -ux + +mv deps.ts deps_https.ts +mv deps_jsr.ts deps.ts +undo () { + ARG=$? + mv deps.ts deps_jsr.ts + mv deps_https.ts deps.ts + exit $ARG +} +trap undo EXIT + +"$@"