UNPKG

@himenon/argo-rollouts-typescript-openapi

Version:

Implementation of TypeScript generated from argo-rollouts OpenAPI

151 lines (150 loc) 6.2 kB
// // Generated by @himenon/openapi-typescript-code-generator v0.17.0 // // OpenApi : 3.0.0 // // export class Client { constructor(apiClient, baseUrl) { this.apiClient = apiClient; this.baseUrl = baseUrl.replace(/\/$/, ""); } /** * operationId: RolloutService_GetNamespace * Request URI: /api/v1/namespace */ async RolloutService_GetNamespace(option) { const url = this.baseUrl + `/api/v1/namespace`; const headers = { Accept: "application/json" }; return this.apiClient.request("GET", url, headers, undefined, undefined, option); } /** * operationId: RolloutService_ListRolloutInfos * Request URI: /api/v1/rollouts/{namespace}/info */ async RolloutService_ListRolloutInfos(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/info`; const headers = { Accept: "application/json" }; return this.apiClient.request("GET", url, headers, undefined, undefined, option); } /** * operationId: RolloutService_WatchRolloutInfos * Request URI: /api/v1/rollouts/{namespace}/info/watch */ async RolloutService_WatchRolloutInfos(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/info/watch`; const headers = { Accept: "application/json" }; return this.apiClient.request("GET", url, headers, undefined, undefined, option); } /** * operationId: RolloutService_AbortRollout * Request URI: /api/v1/rollouts/{namespace}/{name}/abort */ async RolloutService_AbortRollout(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.name}/abort`; const headers = { "Content-Type": "application/json", Accept: "application/json" }; return this.apiClient.request("PUT", url, headers, params.requestBody, undefined, option); } /** * operationId: RolloutService_GetRolloutInfo * Request URI: /api/v1/rollouts/{namespace}/{name}/info */ async RolloutService_GetRolloutInfo(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.name}/info`; const headers = { Accept: "application/json" }; return this.apiClient.request("GET", url, headers, undefined, undefined, option); } /** * operationId: RolloutService_WatchRolloutInfo * Request URI: /api/v1/rollouts/{namespace}/{name}/info/watch */ async RolloutService_WatchRolloutInfo(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.name}/info/watch`; const headers = { Accept: "application/json" }; return this.apiClient.request("GET", url, headers, undefined, undefined, option); } /** * operationId: RolloutService_PromoteRollout * Request URI: /api/v1/rollouts/{namespace}/{name}/promote */ async RolloutService_PromoteRollout(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.name}/promote`; const headers = { "Content-Type": "application/json", Accept: "application/json" }; return this.apiClient.request("PUT", url, headers, params.requestBody, undefined, option); } /** * operationId: RolloutService_RestartRollout * Request URI: /api/v1/rollouts/{namespace}/{name}/restart */ async RolloutService_RestartRollout(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.name}/restart`; const headers = { "Content-Type": "application/json", Accept: "application/json" }; return this.apiClient.request("PUT", url, headers, params.requestBody, undefined, option); } /** * operationId: RolloutService_RetryRollout * Request URI: /api/v1/rollouts/{namespace}/{name}/retry */ async RolloutService_RetryRollout(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.name}/retry`; const headers = { "Content-Type": "application/json", Accept: "application/json" }; return this.apiClient.request("PUT", url, headers, params.requestBody, undefined, option); } /** * operationId: RolloutService_SetRolloutImage * Request URI: /api/v1/rollouts/{namespace}/{rollout}/set/{container}/{image}/{tag} */ async RolloutService_SetRolloutImage(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.rollout}/set/${params.parameter.container}/${params.parameter.image}/${params.parameter.tag}`; const headers = { "Content-Type": "application/json", Accept: "application/json" }; return this.apiClient.request("PUT", url, headers, params.requestBody, undefined, option); } /** * operationId: RolloutService_UndoRollout * Request URI: /api/v1/rollouts/{namespace}/{rollout}/undo/{revision} */ async RolloutService_UndoRollout(params, option) { const url = this.baseUrl + `/api/v1/rollouts/${params.parameter.namespace}/${params.parameter.rollout}/undo/${params.parameter.revision}`; const headers = { "Content-Type": "application/json", Accept: "application/json" }; return this.apiClient.request("PUT", url, headers, params.requestBody, undefined, option); } /** * operationId: RolloutService_Version * Request URI: /api/v1/version */ async RolloutService_Version(option) { const url = this.baseUrl + `/api/v1/version`; const headers = { Accept: "application/json" }; return this.apiClient.request("GET", url, headers, undefined, undefined, option); } }