mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
fix: exclude terraform
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
@@ -1,443 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoAnnotationResponse,
|
||||
DtoCreateAnnotationRequest,
|
||||
DtoUpdateAnnotationRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoAnnotationResponseFromJSON,
|
||||
DtoAnnotationResponseToJSON,
|
||||
DtoCreateAnnotationRequestFromJSON,
|
||||
DtoCreateAnnotationRequestToJSON,
|
||||
DtoUpdateAnnotationRequestFromJSON,
|
||||
DtoUpdateAnnotationRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateAnnotationRequest {
|
||||
body: DtoCreateAnnotationRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteAnnotationRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetAnnotationRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListAnnotationsRequest {
|
||||
xOrgID?: string;
|
||||
key?: string;
|
||||
value?: string;
|
||||
q?: string;
|
||||
}
|
||||
|
||||
export interface UpdateAnnotationRequest {
|
||||
id: string;
|
||||
body: DtoUpdateAnnotationRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AnnotationsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Creates an annotation.
|
||||
* Create annotation (org scoped)
|
||||
*/
|
||||
async createAnnotationRaw(
|
||||
requestParameters: CreateAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoAnnotationResponse>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createAnnotation().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateAnnotationRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoAnnotationResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an annotation.
|
||||
* Create annotation (org scoped)
|
||||
*/
|
||||
async createAnnotation(
|
||||
requestParameters: CreateAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoAnnotationResponse> {
|
||||
const response = await this.createAnnotationRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the annotation.
|
||||
* Delete annotation (org scoped)
|
||||
*/
|
||||
async deleteAnnotationRaw(
|
||||
requestParameters: DeleteAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteAnnotation().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the annotation.
|
||||
* Delete annotation (org scoped)
|
||||
*/
|
||||
async deleteAnnotation(
|
||||
requestParameters: DeleteAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.deleteAnnotationRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one annotation. Add `include=node_pools` to include node pools.
|
||||
* Get annotation by ID (org scoped)
|
||||
*/
|
||||
async getAnnotationRaw(
|
||||
requestParameters: GetAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoAnnotationResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getAnnotation().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoAnnotationResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one annotation. Add `include=node_pools` to include node pools.
|
||||
* Get annotation by ID (org scoped)
|
||||
*/
|
||||
async getAnnotation(
|
||||
requestParameters: GetAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoAnnotationResponse> {
|
||||
const response = await this.getAnnotationRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns annotations for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
|
||||
* List annotations (org scoped)
|
||||
*/
|
||||
async listAnnotationsRaw(
|
||||
requestParameters: ListAnnotationsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoAnnotationResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["key"] != null) {
|
||||
queryParameters["key"] = requestParameters["key"];
|
||||
}
|
||||
|
||||
if (requestParameters["value"] != null) {
|
||||
queryParameters["value"] = requestParameters["value"];
|
||||
}
|
||||
|
||||
if (requestParameters["q"] != null) {
|
||||
queryParameters["q"] = requestParameters["q"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoAnnotationResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns annotations for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
|
||||
* List annotations (org scoped)
|
||||
*/
|
||||
async listAnnotations(
|
||||
requestParameters: ListAnnotationsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoAnnotationResponse>> {
|
||||
const response = await this.listAnnotationsRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update annotation fields.
|
||||
* Update annotation (org scoped)
|
||||
*/
|
||||
async updateAnnotationRaw(
|
||||
requestParameters: UpdateAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoAnnotationResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateAnnotation().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateAnnotation().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateAnnotationRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoAnnotationResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update annotation fields.
|
||||
* Update annotation (org scoped)
|
||||
*/
|
||||
async updateAnnotation(
|
||||
requestParameters: UpdateAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoAnnotationResponse> {
|
||||
const response = await this.updateAnnotationRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type { DtoJob, DtoPageJob, DtoQueueInfo } from "../models/index";
|
||||
import {
|
||||
DtoJobFromJSON,
|
||||
DtoJobToJSON,
|
||||
DtoPageJobFromJSON,
|
||||
DtoPageJobToJSON,
|
||||
DtoQueueInfoFromJSON,
|
||||
DtoQueueInfoToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface AdminCancelArcherJobRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AdminEnqueueArcherJobRequest {
|
||||
body: object;
|
||||
}
|
||||
|
||||
export interface AdminListArcherJobsRequest {
|
||||
status?: AdminListArcherJobsStatusEnum;
|
||||
queue?: string;
|
||||
q?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface AdminRetryArcherJobRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ArcherAdminApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Set job status to canceled if cancellable. For running jobs, this only affects future picks; wire to Archer if you need active kill.
|
||||
* Cancel an Archer job (admin)
|
||||
*/
|
||||
async adminCancelArcherJobRaw(
|
||||
requestParameters: AdminCancelArcherJobRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoJob>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling adminCancelArcherJob().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/admin/archer/jobs/{id}/cancel`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoJobFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set job status to canceled if cancellable. For running jobs, this only affects future picks; wire to Archer if you need active kill.
|
||||
* Cancel an Archer job (admin)
|
||||
*/
|
||||
async adminCancelArcherJob(
|
||||
requestParameters: AdminCancelArcherJobRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoJob> {
|
||||
const response = await this.adminCancelArcherJobRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a job immediately or schedule it for the future via `run_at`.
|
||||
* Enqueue a new Archer job (admin)
|
||||
*/
|
||||
async adminEnqueueArcherJobRaw(
|
||||
requestParameters: AdminEnqueueArcherJobRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoJob>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling adminEnqueueArcherJob().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/admin/archer/jobs`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters["body"] as any,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoJobFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a job immediately or schedule it for the future via `run_at`.
|
||||
* Enqueue a new Archer job (admin)
|
||||
*/
|
||||
async adminEnqueueArcherJob(
|
||||
requestParameters: AdminEnqueueArcherJobRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoJob> {
|
||||
const response = await this.adminEnqueueArcherJobRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Paginated background jobs with optional filters. Search `q` may match id, type, error, payload (implementation-dependent).
|
||||
* List Archer jobs (admin)
|
||||
*/
|
||||
async adminListArcherJobsRaw(
|
||||
requestParameters: AdminListArcherJobsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoPageJob>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["status"] != null) {
|
||||
queryParameters["status"] = requestParameters["status"];
|
||||
}
|
||||
|
||||
if (requestParameters["queue"] != null) {
|
||||
queryParameters["queue"] = requestParameters["queue"];
|
||||
}
|
||||
|
||||
if (requestParameters["q"] != null) {
|
||||
queryParameters["q"] = requestParameters["q"];
|
||||
}
|
||||
|
||||
if (requestParameters["page"] != null) {
|
||||
queryParameters["page"] = requestParameters["page"];
|
||||
}
|
||||
|
||||
if (requestParameters["pageSize"] != null) {
|
||||
queryParameters["page_size"] = requestParameters["pageSize"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/admin/archer/jobs`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoPageJobFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Paginated background jobs with optional filters. Search `q` may match id, type, error, payload (implementation-dependent).
|
||||
* List Archer jobs (admin)
|
||||
*/
|
||||
async adminListArcherJobs(
|
||||
requestParameters: AdminListArcherJobsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoPageJob> {
|
||||
const response = await this.adminListArcherJobsRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Summary metrics per queue (pending, running, failed, scheduled).
|
||||
* List Archer queues (admin)
|
||||
*/
|
||||
async adminListArcherQueuesRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoQueueInfo>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/admin/archer/queues`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoQueueInfoFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Summary metrics per queue (pending, running, failed, scheduled).
|
||||
* List Archer queues (admin)
|
||||
*/
|
||||
async adminListArcherQueues(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoQueueInfo>> {
|
||||
const response = await this.adminListArcherQueuesRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the job retriable (DB flip). Swap this for an Archer admin call if you expose one.
|
||||
* Retry a failed/canceled Archer job (admin)
|
||||
*/
|
||||
async adminRetryArcherJobRaw(
|
||||
requestParameters: AdminRetryArcherJobRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoJob>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling adminRetryArcherJob().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/admin/archer/jobs/{id}/retry`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoJobFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the job retriable (DB flip). Swap this for an Archer admin call if you expose one.
|
||||
* Retry a failed/canceled Archer job (admin)
|
||||
*/
|
||||
async adminRetryArcherJob(
|
||||
requestParameters: AdminRetryArcherJobRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoJob> {
|
||||
const response = await this.adminRetryArcherJobRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const AdminListArcherJobsStatusEnum = {
|
||||
queued: "queued",
|
||||
running: "running",
|
||||
succeeded: "succeeded",
|
||||
failed: "failed",
|
||||
canceled: "canceled",
|
||||
retrying: "retrying",
|
||||
scheduled: "scheduled",
|
||||
} as const;
|
||||
export type AdminListArcherJobsStatusEnum =
|
||||
(typeof AdminListArcherJobsStatusEnum)[keyof typeof AdminListArcherJobsStatusEnum];
|
||||
@@ -1,294 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoAuthStartResponse,
|
||||
DtoJWKS,
|
||||
DtoLogoutRequest,
|
||||
DtoRefreshRequest,
|
||||
DtoTokenPair,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoAuthStartResponseFromJSON,
|
||||
DtoAuthStartResponseToJSON,
|
||||
DtoJWKSFromJSON,
|
||||
DtoJWKSToJSON,
|
||||
DtoLogoutRequestFromJSON,
|
||||
DtoLogoutRequestToJSON,
|
||||
DtoRefreshRequestFromJSON,
|
||||
DtoRefreshRequestToJSON,
|
||||
DtoTokenPairFromJSON,
|
||||
DtoTokenPairToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface AuthCallbackRequest {
|
||||
provider: string;
|
||||
}
|
||||
|
||||
export interface AuthStartRequest {
|
||||
provider: string;
|
||||
}
|
||||
|
||||
export interface LogoutRequest {
|
||||
body: DtoLogoutRequest;
|
||||
}
|
||||
|
||||
export interface RefreshRequest {
|
||||
body: DtoRefreshRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AuthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Handle social login callback
|
||||
*/
|
||||
async authCallbackRaw(
|
||||
requestParameters: AuthCallbackRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTokenPair>> {
|
||||
if (requestParameters["provider"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"provider",
|
||||
'Required parameter "provider" was null or undefined when calling authCallback().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
let urlPath = `/auth/{provider}/callback`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"provider"}}`,
|
||||
encodeURIComponent(String(requestParameters["provider"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTokenPairFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle social login callback
|
||||
*/
|
||||
async authCallback(
|
||||
requestParameters: AuthCallbackRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTokenPair> {
|
||||
const response = await this.authCallbackRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns provider authorization URL for the frontend to redirect
|
||||
* Begin social login
|
||||
*/
|
||||
async authStartRaw(
|
||||
requestParameters: AuthStartRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoAuthStartResponse>> {
|
||||
if (requestParameters["provider"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"provider",
|
||||
'Required parameter "provider" was null or undefined when calling authStart().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
let urlPath = `/auth/{provider}/start`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"provider"}}`,
|
||||
encodeURIComponent(String(requestParameters["provider"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoAuthStartResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns provider authorization URL for the frontend to redirect
|
||||
* Begin social login
|
||||
*/
|
||||
async authStart(
|
||||
requestParameters: AuthStartRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoAuthStartResponse> {
|
||||
const response = await this.authStartRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the JSON Web Key Set for token verification
|
||||
* Get JWKS
|
||||
*/
|
||||
async getJWKSRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoJWKS>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
let urlPath = `/.well-known/jwks.json`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoJWKSFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the JSON Web Key Set for token verification
|
||||
* Get JWKS
|
||||
*/
|
||||
async getJWKS(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoJWKS> {
|
||||
const response = await this.getJWKSRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Revoke refresh token family (logout everywhere)
|
||||
*/
|
||||
async logoutRaw(
|
||||
requestParameters: LogoutRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling logout().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
let urlPath = `/auth/logout`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoLogoutRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Revoke refresh token family (logout everywhere)
|
||||
*/
|
||||
async logout(
|
||||
requestParameters: LogoutRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.logoutRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate refresh token
|
||||
*/
|
||||
async refreshRaw(
|
||||
requestParameters: RefreshRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTokenPair>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling refresh().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
let urlPath = `/auth/refresh`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoRefreshRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTokenPairFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate refresh token
|
||||
*/
|
||||
async refresh(
|
||||
requestParameters: RefreshRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTokenPair> {
|
||||
const response = await this.refreshRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type { HandlersHealthStatus } from "../models/index";
|
||||
import {
|
||||
HandlersHealthStatusFromJSON,
|
||||
HandlersHealthStatusToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class HealthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Returns 200 OK when the service is up
|
||||
* Basic health check
|
||||
*/
|
||||
async healthCheckOperationIdRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersHealthStatus>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
let urlPath = `/healthz`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersHealthStatusFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns 200 OK when the service is up
|
||||
* Basic health check
|
||||
*/
|
||||
async healthCheckOperationId(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersHealthStatus> {
|
||||
const response = await this.healthCheckOperationIdRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,437 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoCreateLabelRequest,
|
||||
DtoLabelResponse,
|
||||
DtoUpdateLabelRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateLabelRequestFromJSON,
|
||||
DtoCreateLabelRequestToJSON,
|
||||
DtoLabelResponseFromJSON,
|
||||
DtoLabelResponseToJSON,
|
||||
DtoUpdateLabelRequestFromJSON,
|
||||
DtoUpdateLabelRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateLabelRequest {
|
||||
body: DtoCreateLabelRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteLabelRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetLabelRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListLabelsRequest {
|
||||
xOrgID?: string;
|
||||
key?: string;
|
||||
value?: string;
|
||||
q?: string;
|
||||
}
|
||||
|
||||
export interface UpdateLabelRequest {
|
||||
id: string;
|
||||
body: DtoUpdateLabelRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class LabelsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Creates a label.
|
||||
* Create label (org scoped)
|
||||
*/
|
||||
async createLabelRaw(
|
||||
requestParameters: CreateLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoLabelResponse>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createLabel().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/labels`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateLabelRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoLabelResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a label.
|
||||
* Create label (org scoped)
|
||||
*/
|
||||
async createLabel(
|
||||
requestParameters: CreateLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoLabelResponse> {
|
||||
const response = await this.createLabelRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the label.
|
||||
* Delete label (org scoped)
|
||||
*/
|
||||
async deleteLabelRaw(
|
||||
requestParameters: DeleteLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteLabel().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/labels/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the label.
|
||||
* Delete label (org scoped)
|
||||
*/
|
||||
async deleteLabel(
|
||||
requestParameters: DeleteLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.deleteLabelRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one label.
|
||||
* Get label by ID (org scoped)
|
||||
*/
|
||||
async getLabelRaw(
|
||||
requestParameters: GetLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoLabelResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getLabel().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/labels/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoLabelResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one label.
|
||||
* Get label by ID (org scoped)
|
||||
*/
|
||||
async getLabel(
|
||||
requestParameters: GetLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoLabelResponse> {
|
||||
const response = await this.getLabelRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns node labels for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node groups.
|
||||
* List node labels (org scoped)
|
||||
*/
|
||||
async listLabelsRaw(
|
||||
requestParameters: ListLabelsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoLabelResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["key"] != null) {
|
||||
queryParameters["key"] = requestParameters["key"];
|
||||
}
|
||||
|
||||
if (requestParameters["value"] != null) {
|
||||
queryParameters["value"] = requestParameters["value"];
|
||||
}
|
||||
|
||||
if (requestParameters["q"] != null) {
|
||||
queryParameters["q"] = requestParameters["q"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/labels`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoLabelResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns node labels for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node groups.
|
||||
* List node labels (org scoped)
|
||||
*/
|
||||
async listLabels(
|
||||
requestParameters: ListLabelsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoLabelResponse>> {
|
||||
const response = await this.listLabelsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update label fields.
|
||||
* Update label (org scoped)
|
||||
*/
|
||||
async updateLabelRaw(
|
||||
requestParameters: UpdateLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoLabelResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateLabel().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateLabel().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/labels/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateLabelRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoLabelResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update label fields.
|
||||
* Update label (org scoped)
|
||||
*/
|
||||
async updateLabel(
|
||||
requestParameters: UpdateLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoLabelResponse> {
|
||||
const response = await this.updateLabelRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
HandlersCreateUserKeyRequest,
|
||||
HandlersUserAPIKeyOut,
|
||||
} from "../models/index";
|
||||
import {
|
||||
HandlersCreateUserKeyRequestFromJSON,
|
||||
HandlersCreateUserKeyRequestToJSON,
|
||||
HandlersUserAPIKeyOutFromJSON,
|
||||
HandlersUserAPIKeyOutToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateUserAPIKeyRequest {
|
||||
body: HandlersCreateUserKeyRequest;
|
||||
}
|
||||
|
||||
export interface DeleteUserAPIKeyRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class MeAPIKeysApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Returns the plaintext key once. Store it securely on the client side.
|
||||
* Create a new user API key
|
||||
*/
|
||||
async createUserAPIKeyRaw(
|
||||
requestParameters: CreateUserAPIKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersUserAPIKeyOut>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createUserAPIKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-API-KEY"] =
|
||||
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/me/api-keys`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: HandlersCreateUserKeyRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersUserAPIKeyOutFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the plaintext key once. Store it securely on the client side.
|
||||
* Create a new user API key
|
||||
*/
|
||||
async createUserAPIKey(
|
||||
requestParameters: CreateUserAPIKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersUserAPIKeyOut> {
|
||||
const response = await this.createUserAPIKeyRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a user API key
|
||||
*/
|
||||
async deleteUserAPIKeyRaw(
|
||||
requestParameters: DeleteUserAPIKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteUserAPIKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/me/api-keys/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a user API key
|
||||
*/
|
||||
async deleteUserAPIKey(
|
||||
requestParameters: DeleteUserAPIKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteUserAPIKeyRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* List my API keys
|
||||
*/
|
||||
async listUserAPIKeysRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<HandlersUserAPIKeyOut>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-API-KEY"] =
|
||||
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/me/api-keys`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(HandlersUserAPIKeyOutFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* List my API keys
|
||||
*/
|
||||
async listUserAPIKeys(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<HandlersUserAPIKeyOut>> {
|
||||
const response = await this.listUserAPIKeysRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
HandlersMeResponse,
|
||||
HandlersUpdateMeRequest,
|
||||
ModelsUser,
|
||||
} from "../models/index";
|
||||
import {
|
||||
HandlersMeResponseFromJSON,
|
||||
HandlersMeResponseToJSON,
|
||||
HandlersUpdateMeRequestFromJSON,
|
||||
HandlersUpdateMeRequestToJSON,
|
||||
ModelsUserFromJSON,
|
||||
ModelsUserToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface UpdateMeRequest {
|
||||
body: HandlersUpdateMeRequest;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class MeApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Get current user profile
|
||||
*/
|
||||
async getMeRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersMeResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-API-KEY"] =
|
||||
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/me`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersMeResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current user profile
|
||||
*/
|
||||
async getMe(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersMeResponse> {
|
||||
const response = await this.getMeRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update current user profile
|
||||
*/
|
||||
async updateMeRaw(
|
||||
requestParameters: UpdateMeRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<ModelsUser>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateMe().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-API-KEY"] =
|
||||
await this.configuration.apiKey("X-API-KEY"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/me`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: HandlersUpdateMeRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
ModelsUserFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update current user profile
|
||||
*/
|
||||
async updateMe(
|
||||
requestParameters: UpdateMeRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<ModelsUser> {
|
||||
const response = await this.updateMeRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,742 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
HandlersMemberOut,
|
||||
HandlersMemberUpsertReq,
|
||||
HandlersOrgCreateReq,
|
||||
HandlersOrgKeyCreateReq,
|
||||
HandlersOrgKeyCreateResp,
|
||||
HandlersOrgUpdateReq,
|
||||
ModelsAPIKey,
|
||||
ModelsOrganization,
|
||||
UtilsErrorResponse,
|
||||
} from "../models/index";
|
||||
import {
|
||||
HandlersMemberOutFromJSON,
|
||||
HandlersMemberOutToJSON,
|
||||
HandlersMemberUpsertReqFromJSON,
|
||||
HandlersMemberUpsertReqToJSON,
|
||||
HandlersOrgCreateReqFromJSON,
|
||||
HandlersOrgCreateReqToJSON,
|
||||
HandlersOrgKeyCreateReqFromJSON,
|
||||
HandlersOrgKeyCreateReqToJSON,
|
||||
HandlersOrgKeyCreateRespFromJSON,
|
||||
HandlersOrgKeyCreateRespToJSON,
|
||||
HandlersOrgUpdateReqFromJSON,
|
||||
HandlersOrgUpdateReqToJSON,
|
||||
ModelsAPIKeyFromJSON,
|
||||
ModelsAPIKeyToJSON,
|
||||
ModelsOrganizationFromJSON,
|
||||
ModelsOrganizationToJSON,
|
||||
UtilsErrorResponseFromJSON,
|
||||
UtilsErrorResponseToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface AddOrUpdateMemberRequest {
|
||||
id: string;
|
||||
body: HandlersMemberUpsertReq;
|
||||
}
|
||||
|
||||
export interface CreateOrgRequest {
|
||||
body: HandlersOrgCreateReq;
|
||||
}
|
||||
|
||||
export interface CreateOrgKeyRequest {
|
||||
id: string;
|
||||
body: HandlersOrgKeyCreateReq;
|
||||
}
|
||||
|
||||
export interface DeleteOrgRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface DeleteOrgKeyRequest {
|
||||
id: string;
|
||||
keyId: string;
|
||||
}
|
||||
|
||||
export interface GetOrgRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ListMembersRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ListOrgKeysRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface RemoveMemberRequest {
|
||||
id: string;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface UpdateOrgRequest {
|
||||
id: string;
|
||||
body: HandlersOrgUpdateReq;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class OrgsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Add or update a member (owner/admin)
|
||||
*/
|
||||
async addOrUpdateMemberRaw(
|
||||
requestParameters: AddOrUpdateMemberRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersMemberOut>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling addOrUpdateMember().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling addOrUpdateMember().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}/members`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: HandlersMemberUpsertReqToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersMemberOutFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add or update a member (owner/admin)
|
||||
*/
|
||||
async addOrUpdateMember(
|
||||
requestParameters: AddOrUpdateMemberRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersMemberOut> {
|
||||
const response = await this.addOrUpdateMemberRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create organization
|
||||
*/
|
||||
async createOrgRaw(
|
||||
requestParameters: CreateOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<ModelsOrganization>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createOrg().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: HandlersOrgCreateReqToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
ModelsOrganizationFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create organization
|
||||
*/
|
||||
async createOrg(
|
||||
requestParameters: CreateOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<ModelsOrganization> {
|
||||
const response = await this.createOrgRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create org key/secret pair (owner/admin)
|
||||
*/
|
||||
async createOrgKeyRaw(
|
||||
requestParameters: CreateOrgKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersOrgKeyCreateResp>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling createOrgKey().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createOrgKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}/api-keys`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: HandlersOrgKeyCreateReqToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersOrgKeyCreateRespFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create org key/secret pair (owner/admin)
|
||||
*/
|
||||
async createOrgKey(
|
||||
requestParameters: CreateOrgKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersOrgKeyCreateResp> {
|
||||
const response = await this.createOrgKeyRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete organization (owner)
|
||||
*/
|
||||
async deleteOrgRaw(
|
||||
requestParameters: DeleteOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteOrg().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete organization (owner)
|
||||
*/
|
||||
async deleteOrg(
|
||||
requestParameters: DeleteOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteOrgRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete org key (owner/admin)
|
||||
*/
|
||||
async deleteOrgKeyRaw(
|
||||
requestParameters: DeleteOrgKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteOrgKey().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["keyId"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"keyId",
|
||||
'Required parameter "keyId" was null or undefined when calling deleteOrgKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}/api-keys/{key_id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
urlPath = urlPath.replace(
|
||||
`{${"key_id"}}`,
|
||||
encodeURIComponent(String(requestParameters["keyId"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete org key (owner/admin)
|
||||
*/
|
||||
async deleteOrgKey(
|
||||
requestParameters: DeleteOrgKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteOrgKeyRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get organization
|
||||
*/
|
||||
async getOrgRaw(
|
||||
requestParameters: GetOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<ModelsOrganization>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getOrg().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
ModelsOrganizationFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get organization
|
||||
*/
|
||||
async getOrg(
|
||||
requestParameters: GetOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<ModelsOrganization> {
|
||||
const response = await this.getOrgRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List members in org
|
||||
*/
|
||||
async listMembersRaw(
|
||||
requestParameters: ListMembersRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<HandlersMemberOut>>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling listMembers().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}/members`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(HandlersMemberOutFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* List members in org
|
||||
*/
|
||||
async listMembers(
|
||||
requestParameters: ListMembersRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<HandlersMemberOut>> {
|
||||
const response = await this.listMembersRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List organizations I belong to
|
||||
*/
|
||||
async listMyOrgsRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<ModelsOrganization>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(ModelsOrganizationFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* List organizations I belong to
|
||||
*/
|
||||
async listMyOrgs(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<ModelsOrganization>> {
|
||||
const response = await this.listMyOrgsRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List org-scoped API keys (no secrets)
|
||||
*/
|
||||
async listOrgKeysRaw(
|
||||
requestParameters: ListOrgKeysRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<ModelsAPIKey>>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling listOrgKeys().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}/api-keys`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(ModelsAPIKeyFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* List org-scoped API keys (no secrets)
|
||||
*/
|
||||
async listOrgKeys(
|
||||
requestParameters: ListOrgKeysRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<ModelsAPIKey>> {
|
||||
const response = await this.listOrgKeysRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a member (owner/admin)
|
||||
*/
|
||||
async removeMemberRaw(
|
||||
requestParameters: RemoveMemberRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling removeMember().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["userId"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"userId",
|
||||
'Required parameter "userId" was null or undefined when calling removeMember().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}/members/{user_id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
urlPath = urlPath.replace(
|
||||
`{${"user_id"}}`,
|
||||
encodeURIComponent(String(requestParameters["userId"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a member (owner/admin)
|
||||
*/
|
||||
async removeMember(
|
||||
requestParameters: RemoveMemberRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.removeMemberRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update organization (owner/admin)
|
||||
*/
|
||||
async updateOrgRaw(
|
||||
requestParameters: UpdateOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<ModelsOrganization>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateOrg().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateOrg().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/orgs/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: HandlersOrgUpdateReqToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
ModelsOrganizationFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update organization (owner/admin)
|
||||
*/
|
||||
async updateOrg(
|
||||
requestParameters: UpdateOrgRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<ModelsOrganization> {
|
||||
const response = await this.updateOrgRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,435 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoCreateServerRequest,
|
||||
DtoServerResponse,
|
||||
DtoUpdateServerRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateServerRequestFromJSON,
|
||||
DtoCreateServerRequestToJSON,
|
||||
DtoServerResponseFromJSON,
|
||||
DtoServerResponseToJSON,
|
||||
DtoUpdateServerRequestFromJSON,
|
||||
DtoUpdateServerRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateServerRequest {
|
||||
body: DtoCreateServerRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteServerRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetServerRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListServersRequest {
|
||||
xOrgID?: string;
|
||||
status?: string;
|
||||
role?: string;
|
||||
}
|
||||
|
||||
export interface UpdateServerRequest {
|
||||
id: string;
|
||||
body: DtoUpdateServerRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ServersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Creates a server bound to the org in X-Org-ID. Validates that ssh_key_id belongs to the org.
|
||||
* Create server (org scoped)
|
||||
*/
|
||||
async createServerRaw(
|
||||
requestParameters: CreateServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoServerResponse>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createServer().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/servers`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateServerRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoServerResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a server bound to the org in X-Org-ID. Validates that ssh_key_id belongs to the org.
|
||||
* Create server (org scoped)
|
||||
*/
|
||||
async createServer(
|
||||
requestParameters: CreateServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoServerResponse> {
|
||||
const response = await this.createServerRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the server.
|
||||
* Delete server (org scoped)
|
||||
*/
|
||||
async deleteServerRaw(
|
||||
requestParameters: DeleteServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteServer().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/servers/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the server.
|
||||
* Delete server (org scoped)
|
||||
*/
|
||||
async deleteServer(
|
||||
requestParameters: DeleteServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.deleteServerRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one server in the given organization.
|
||||
* Get server by ID (org scoped)
|
||||
*/
|
||||
async getServerRaw(
|
||||
requestParameters: GetServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoServerResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getServer().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/servers/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoServerResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one server in the given organization.
|
||||
* Get server by ID (org scoped)
|
||||
*/
|
||||
async getServer(
|
||||
requestParameters: GetServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoServerResponse> {
|
||||
const response = await this.getServerRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns servers for the organization in X-Org-ID. Optional filters: status, role.
|
||||
* List servers (org scoped)
|
||||
*/
|
||||
async listServersRaw(
|
||||
requestParameters: ListServersRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoServerResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["status"] != null) {
|
||||
queryParameters["status"] = requestParameters["status"];
|
||||
}
|
||||
|
||||
if (requestParameters["role"] != null) {
|
||||
queryParameters["role"] = requestParameters["role"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/servers`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoServerResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns servers for the organization in X-Org-ID. Optional filters: status, role.
|
||||
* List servers (org scoped)
|
||||
*/
|
||||
async listServers(
|
||||
requestParameters: ListServersRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoServerResponse>> {
|
||||
const response = await this.listServersRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update fields; changing ssh_key_id validates ownership.
|
||||
* Update server (org scoped)
|
||||
*/
|
||||
async updateServerRaw(
|
||||
requestParameters: UpdateServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoServerResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateServer().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateServer().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/servers/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateServerRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoServerResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update fields; changing ssh_key_id validates ownership.
|
||||
* Update server (org scoped)
|
||||
*/
|
||||
async updateServer(
|
||||
requestParameters: UpdateServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoServerResponse> {
|
||||
const response = await this.updateServerRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,451 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoCreateSSHRequest,
|
||||
DtoSshResponse,
|
||||
DtoSshRevealResponse,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateSSHRequestFromJSON,
|
||||
DtoCreateSSHRequestToJSON,
|
||||
DtoSshResponseFromJSON,
|
||||
DtoSshResponseToJSON,
|
||||
DtoSshRevealResponseFromJSON,
|
||||
DtoSshRevealResponseToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateSSHKeyRequest {
|
||||
body: DtoCreateSSHRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteSSHKeyRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DownloadSSHKeyRequest {
|
||||
xOrgID: string;
|
||||
id: string;
|
||||
part: DownloadSSHKeyPartEnum;
|
||||
}
|
||||
|
||||
export interface GetSSHKeyRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
reveal?: boolean;
|
||||
}
|
||||
|
||||
export interface ListPublicSshKeysRequest {
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class SshApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Generates an RSA or ED25519 keypair, saves it, and returns metadata. For RSA you may set bits (2048/3072/4096). Default is 4096. ED25519 ignores bits.
|
||||
* Create ssh keypair (org scoped)
|
||||
*/
|
||||
async createSSHKeyRaw(
|
||||
requestParameters: CreateSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoSshResponse>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createSSHKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/ssh`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateSSHRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoSshResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates an RSA or ED25519 keypair, saves it, and returns metadata. For RSA you may set bits (2048/3072/4096). Default is 4096. ED25519 ignores bits.
|
||||
* Create ssh keypair (org scoped)
|
||||
*/
|
||||
async createSSHKey(
|
||||
requestParameters: CreateSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoSshResponse> {
|
||||
const response = await this.createSSHKeyRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes a keypair.
|
||||
* Delete ssh keypair (org scoped)
|
||||
*/
|
||||
async deleteSSHKeyRaw(
|
||||
requestParameters: DeleteSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteSSHKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/ssh/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes a keypair.
|
||||
* Delete ssh keypair (org scoped)
|
||||
*/
|
||||
async deleteSSHKey(
|
||||
requestParameters: DeleteSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.deleteSSHKeyRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Download `part=public|private|both` of the keypair. `both` returns a zip file.
|
||||
* Download ssh key files by ID (org scoped)
|
||||
*/
|
||||
async downloadSSHKeyRaw(
|
||||
requestParameters: DownloadSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["xOrgID"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"xOrgID",
|
||||
'Required parameter "xOrgID" was null or undefined when calling downloadSSHKey().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling downloadSSHKey().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["part"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"part",
|
||||
'Required parameter "part" was null or undefined when calling downloadSSHKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["part"] != null) {
|
||||
queryParameters["part"] = requestParameters["part"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/ssh/{id}/download`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download `part=public|private|both` of the keypair. `both` returns a zip file.
|
||||
* Download ssh key files by ID (org scoped)
|
||||
*/
|
||||
async downloadSSHKey(
|
||||
requestParameters: DownloadSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.downloadSSHKeyRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns public key fields. Append `?reveal=true` to include the private key PEM.
|
||||
* Get ssh key by ID (org scoped)
|
||||
*/
|
||||
async getSSHKeyRaw(
|
||||
requestParameters: GetSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoSshRevealResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getSSHKey().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["reveal"] != null) {
|
||||
queryParameters["reveal"] = requestParameters["reveal"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/ssh/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoSshRevealResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns public key fields. Append `?reveal=true` to include the private key PEM.
|
||||
* Get ssh key by ID (org scoped)
|
||||
*/
|
||||
async getSSHKey(
|
||||
requestParameters: GetSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoSshRevealResponse> {
|
||||
const response = await this.getSSHKeyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ssh keys for the organization in X-Org-ID.
|
||||
* List ssh keys (org scoped)
|
||||
*/
|
||||
async listPublicSshKeysRaw(
|
||||
requestParameters: ListPublicSshKeysRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoSshResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/ssh`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoSshResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ssh keys for the organization in X-Org-ID.
|
||||
* List ssh keys (org scoped)
|
||||
*/
|
||||
async listPublicSshKeys(
|
||||
requestParameters: ListPublicSshKeysRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoSshResponse>> {
|
||||
const response = await this.listPublicSshKeysRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DownloadSSHKeyPartEnum = {
|
||||
public: "public",
|
||||
private: "private",
|
||||
both: "both",
|
||||
} as const;
|
||||
export type DownloadSSHKeyPartEnum =
|
||||
(typeof DownloadSSHKeyPartEnum)[keyof typeof DownloadSSHKeyPartEnum];
|
||||
@@ -1,435 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type {
|
||||
DtoCreateTaintRequest,
|
||||
DtoTaintResponse,
|
||||
DtoUpdateTaintRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateTaintRequestFromJSON,
|
||||
DtoCreateTaintRequestToJSON,
|
||||
DtoTaintResponseFromJSON,
|
||||
DtoTaintResponseToJSON,
|
||||
DtoUpdateTaintRequestFromJSON,
|
||||
DtoUpdateTaintRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateTaintRequest {
|
||||
body: DtoCreateTaintRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteTaintRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetTaintRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListTaintsRequest {
|
||||
xOrgID?: string;
|
||||
key?: string;
|
||||
value?: string;
|
||||
q?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTaintRequest {
|
||||
id: string;
|
||||
body: DtoUpdateTaintRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class TaintsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Creates a taint.
|
||||
* Create node taint (org scoped)
|
||||
*/
|
||||
async createTaintRaw(
|
||||
requestParameters: CreateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling createTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateTaintRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTaintResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a taint.
|
||||
* Create node taint (org scoped)
|
||||
*/
|
||||
async createTaint(
|
||||
requestParameters: CreateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTaintResponse> {
|
||||
const response = await this.createTaintRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the taint.
|
||||
* Delete taint (org scoped)
|
||||
*/
|
||||
async deleteTaintRaw(
|
||||
requestParameters: DeleteTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling deleteTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
if (this.isJsonMime(response.headers.get("content-type"))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the taint.
|
||||
* Delete taint (org scoped)
|
||||
*/
|
||||
async deleteTaint(
|
||||
requestParameters: DeleteTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<string> {
|
||||
const response = await this.deleteTaintRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get node taint by ID (org scoped)
|
||||
*/
|
||||
async getTaintRaw(
|
||||
requestParameters: GetTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTaintResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get node taint by ID (org scoped)
|
||||
*/
|
||||
async getTaint(
|
||||
requestParameters: GetTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTaintResponse> {
|
||||
const response = await this.getTaintRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns node taints for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
|
||||
* List node pool taints (org scoped)
|
||||
*/
|
||||
async listTaintsRaw(
|
||||
requestParameters: ListTaintsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoTaintResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["key"] != null) {
|
||||
queryParameters["key"] = requestParameters["key"];
|
||||
}
|
||||
|
||||
if (requestParameters["value"] != null) {
|
||||
queryParameters["value"] = requestParameters["value"];
|
||||
}
|
||||
|
||||
if (requestParameters["q"] != null) {
|
||||
queryParameters["q"] = requestParameters["q"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoTaintResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns node taints for the organization in X-Org-ID. Filters: `key`, `value`, and `q` (key contains). Add `include=node_pools` to include linked node pools.
|
||||
* List node pool taints (org scoped)
|
||||
*/
|
||||
async listTaints(
|
||||
requestParameters: ListTaintsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoTaintResponse>> {
|
||||
const response = await this.listTaintsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update taint fields.
|
||||
* Update node taint (org scoped)
|
||||
*/
|
||||
async updateTaintRaw(
|
||||
requestParameters: UpdateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoTaintResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["body"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"body",
|
||||
'Required parameter "body" was null or undefined when calling updateTaint().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters["Content-Type"] = "application/json";
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/taints/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateTaintRequestToJSON(requestParameters["body"]),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoTaintResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update taint fields.
|
||||
* Update node taint (org scoped)
|
||||
*/
|
||||
async updateTaint(
|
||||
requestParameters: UpdateTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoTaintResponse> {
|
||||
const response = await this.updateTaintRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from "./AnnotationsApi";
|
||||
export * from "./ArcherAdminApi";
|
||||
export * from "./AuthApi";
|
||||
export * from "./HealthApi";
|
||||
export * from "./LabelsApi";
|
||||
export * from "./MeApi";
|
||||
export * from "./MeAPIKeysApi";
|
||||
export * from "./NodePoolsApi";
|
||||
export * from "./OrgsApi";
|
||||
export * from "./ServersApi";
|
||||
export * from "./SshApi";
|
||||
export * from "./TaintsApi";
|
||||
@@ -1,5 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from "./runtime";
|
||||
export * from "./apis/index";
|
||||
export * from "./models/index";
|
||||
@@ -1,113 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAnnotationResponse
|
||||
*/
|
||||
export interface DtoAnnotationResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAnnotationResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoAnnotationResponse(
|
||||
value: object,
|
||||
): value is DtoAnnotationResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseFromJSON(
|
||||
json: any,
|
||||
): DtoAnnotationResponse {
|
||||
return DtoAnnotationResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAnnotationResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseToJSON(json: any): DtoAnnotationResponse {
|
||||
return DtoAnnotationResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseToJSONTyped(
|
||||
value?: DtoAnnotationResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
id: value["id"],
|
||||
key: value["key"],
|
||||
organization_id: value["organization_id"],
|
||||
updated_at: value["updated_at"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachAnnotationsRequest
|
||||
*/
|
||||
export interface DtoAttachAnnotationsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachAnnotationsRequest
|
||||
*/
|
||||
annotation_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachAnnotationsRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachAnnotationsRequest(
|
||||
value: object,
|
||||
): value is DtoAttachAnnotationsRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachAnnotationsRequest {
|
||||
return DtoAttachAnnotationsRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachAnnotationsRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
annotation_ids:
|
||||
json["annotation_ids"] == null ? undefined : json["annotation_ids"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachAnnotationsRequest {
|
||||
return DtoAttachAnnotationsRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachAnnotationsRequestToJSONTyped(
|
||||
value?: DtoAttachAnnotationsRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
annotation_ids: value["annotation_ids"],
|
||||
};
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachLabelsRequest
|
||||
*/
|
||||
export interface DtoAttachLabelsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachLabelsRequest
|
||||
*/
|
||||
label_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachLabelsRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachLabelsRequest(
|
||||
value: object,
|
||||
): value is DtoAttachLabelsRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachLabelsRequest {
|
||||
return DtoAttachLabelsRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachLabelsRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
label_ids: json["label_ids"] == null ? undefined : json["label_ids"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachLabelsRequest {
|
||||
return DtoAttachLabelsRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachLabelsRequestToJSONTyped(
|
||||
value?: DtoAttachLabelsRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
label_ids: value["label_ids"],
|
||||
};
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachServersRequest
|
||||
*/
|
||||
export interface DtoAttachServersRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachServersRequest
|
||||
*/
|
||||
server_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachServersRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachServersRequest(
|
||||
value: object,
|
||||
): value is DtoAttachServersRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachServersRequest {
|
||||
return DtoAttachServersRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachServersRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
server_ids: json["server_ids"] == null ? undefined : json["server_ids"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachServersRequest {
|
||||
return DtoAttachServersRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachServersRequestToJSONTyped(
|
||||
value?: DtoAttachServersRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
server_ids: value["server_ids"],
|
||||
};
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAttachTaintsRequest
|
||||
*/
|
||||
export interface DtoAttachTaintsRequest {
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoAttachTaintsRequest
|
||||
*/
|
||||
taint_ids?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachTaintsRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachTaintsRequest(
|
||||
value: object,
|
||||
): value is DtoAttachTaintsRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachTaintsRequest {
|
||||
return DtoAttachTaintsRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachTaintsRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
taint_ids: json["taint_ids"] == null ? undefined : json["taint_ids"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachTaintsRequest {
|
||||
return DtoAttachTaintsRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachTaintsRequestToJSONTyped(
|
||||
value?: DtoAttachTaintsRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
taint_ids: value["taint_ids"],
|
||||
};
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAuthStartResponse
|
||||
*/
|
||||
export interface DtoAuthStartResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAuthStartResponse
|
||||
*/
|
||||
auth_url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAuthStartResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoAuthStartResponse(
|
||||
value: object,
|
||||
): value is DtoAuthStartResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAuthStartResponseFromJSON(json: any): DtoAuthStartResponse {
|
||||
return DtoAuthStartResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAuthStartResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAuthStartResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
auth_url: json["auth_url"] == null ? undefined : json["auth_url"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAuthStartResponseToJSON(json: any): DtoAuthStartResponse {
|
||||
return DtoAuthStartResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAuthStartResponseToJSONTyped(
|
||||
value?: DtoAuthStartResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
auth_url: value["auth_url"],
|
||||
};
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateAnnotationRequest
|
||||
*/
|
||||
export interface DtoCreateAnnotationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateAnnotationRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateAnnotationRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateAnnotationRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateAnnotationRequest(
|
||||
value: object,
|
||||
): value is DtoCreateAnnotationRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateAnnotationRequest {
|
||||
return DtoCreateAnnotationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateAnnotationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateAnnotationRequest {
|
||||
return DtoCreateAnnotationRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestToJSONTyped(
|
||||
value?: DtoCreateAnnotationRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
key: value["key"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateLabelRequest
|
||||
*/
|
||||
export interface DtoCreateLabelRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateLabelRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateLabelRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateLabelRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateLabelRequest(
|
||||
value: object,
|
||||
): value is DtoCreateLabelRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateLabelRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateLabelRequest {
|
||||
return DtoCreateLabelRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateLabelRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateLabelRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateLabelRequestToJSON(json: any): DtoCreateLabelRequest {
|
||||
return DtoCreateLabelRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateLabelRequestToJSONTyped(
|
||||
value?: DtoCreateLabelRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
key: value["key"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateNodePoolRequest
|
||||
*/
|
||||
export interface DtoCreateNodePoolRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateNodePoolRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateNodePoolRequest
|
||||
*/
|
||||
role?: DtoCreateNodePoolRequestRoleEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateNodePoolRequestRoleEnum = {
|
||||
master: "master",
|
||||
worker: "worker",
|
||||
} as const;
|
||||
export type DtoCreateNodePoolRequestRoleEnum =
|
||||
(typeof DtoCreateNodePoolRequestRoleEnum)[keyof typeof DtoCreateNodePoolRequestRoleEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateNodePoolRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateNodePoolRequest(
|
||||
value: object,
|
||||
): value is DtoCreateNodePoolRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateNodePoolRequest {
|
||||
return DtoCreateNodePoolRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateNodePoolRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateNodePoolRequest {
|
||||
return DtoCreateNodePoolRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateNodePoolRequestToJSONTyped(
|
||||
value?: DtoCreateNodePoolRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
name: value["name"],
|
||||
role: value["role"],
|
||||
};
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateSSHRequest
|
||||
*/
|
||||
export interface DtoCreateSSHRequest {
|
||||
/**
|
||||
* Only for RSA
|
||||
* @type {number}
|
||||
* @memberof DtoCreateSSHRequest
|
||||
*/
|
||||
bits?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateSSHRequest
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateSSHRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* "rsa" (default) or "ed25519"
|
||||
* @type {string}
|
||||
* @memberof DtoCreateSSHRequest
|
||||
*/
|
||||
type?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateSSHRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateSSHRequest(
|
||||
value: object,
|
||||
): value is DtoCreateSSHRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateSSHRequestFromJSON(json: any): DtoCreateSSHRequest {
|
||||
return DtoCreateSSHRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateSSHRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateSSHRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
bits: json["bits"] == null ? undefined : json["bits"],
|
||||
comment: json["comment"] == null ? undefined : json["comment"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
type: json["type"] == null ? undefined : json["type"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateSSHRequestToJSON(json: any): DtoCreateSSHRequest {
|
||||
return DtoCreateSSHRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateSSHRequestToJSONTyped(
|
||||
value?: DtoCreateSSHRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
bits: value["bits"],
|
||||
comment: value["comment"],
|
||||
name: value["name"],
|
||||
type: value["type"],
|
||||
};
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateServerRequest
|
||||
*/
|
||||
export interface DtoCreateServerRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
private_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
public_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
role?: DtoCreateServerRequestRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
ssh_key_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
ssh_user?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateServerRequest
|
||||
*/
|
||||
status?: DtoCreateServerRequestStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateServerRequestRoleEnum = {
|
||||
master: "master",
|
||||
worker: "worker",
|
||||
bastion: "bastion",
|
||||
} as const;
|
||||
export type DtoCreateServerRequestRoleEnum =
|
||||
(typeof DtoCreateServerRequestRoleEnum)[keyof typeof DtoCreateServerRequestRoleEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateServerRequestStatusEnum = {
|
||||
pending: "pending",
|
||||
provisioning: "provisioning",
|
||||
ready: "ready",
|
||||
failed: "failed",
|
||||
} as const;
|
||||
export type DtoCreateServerRequestStatusEnum =
|
||||
(typeof DtoCreateServerRequestStatusEnum)[keyof typeof DtoCreateServerRequestStatusEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateServerRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateServerRequest(
|
||||
value: object,
|
||||
): value is DtoCreateServerRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateServerRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateServerRequest {
|
||||
return DtoCreateServerRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateServerRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateServerRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
hostname: json["hostname"] == null ? undefined : json["hostname"],
|
||||
private_ip_address:
|
||||
json["private_ip_address"] == null
|
||||
? undefined
|
||||
: json["private_ip_address"],
|
||||
public_ip_address:
|
||||
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
|
||||
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateServerRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateServerRequest {
|
||||
return DtoCreateServerRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateServerRequestToJSONTyped(
|
||||
value?: DtoCreateServerRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
hostname: value["hostname"],
|
||||
private_ip_address: value["private_ip_address"],
|
||||
public_ip_address: value["public_ip_address"],
|
||||
role: value["role"],
|
||||
ssh_key_id: value["ssh_key_id"],
|
||||
ssh_user: value["ssh_user"],
|
||||
status: value["status"],
|
||||
};
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateTaintRequest
|
||||
*/
|
||||
export interface DtoCreateTaintRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateTaintRequest
|
||||
*/
|
||||
effect?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateTaintRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateTaintRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateTaintRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateTaintRequest(
|
||||
value: object,
|
||||
): value is DtoCreateTaintRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateTaintRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateTaintRequest {
|
||||
return DtoCreateTaintRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateTaintRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateTaintRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
effect: json["effect"] == null ? undefined : json["effect"],
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateTaintRequestToJSON(json: any): DtoCreateTaintRequest {
|
||||
return DtoCreateTaintRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateTaintRequestToJSONTyped(
|
||||
value?: DtoCreateTaintRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
effect: value["effect"],
|
||||
key: value["key"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoJWK
|
||||
*/
|
||||
export interface DtoJWK {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
alg?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
e?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
kid?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
kty?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
n?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
use?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJWK
|
||||
*/
|
||||
x?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoJWK interface.
|
||||
*/
|
||||
export function instanceOfDtoJWK(value: object): value is DtoJWK {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoJWKFromJSON(json: any): DtoJWK {
|
||||
return DtoJWKFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJWKFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoJWK {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
alg: json["alg"] == null ? undefined : json["alg"],
|
||||
e: json["e"] == null ? undefined : json["e"],
|
||||
kid: json["kid"] == null ? undefined : json["kid"],
|
||||
kty: json["kty"] == null ? undefined : json["kty"],
|
||||
n: json["n"] == null ? undefined : json["n"],
|
||||
use: json["use"] == null ? undefined : json["use"],
|
||||
x: json["x"] == null ? undefined : json["x"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoJWKToJSON(json: any): DtoJWK {
|
||||
return DtoJWKToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJWKToJSONTyped(
|
||||
value?: DtoJWK | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
alg: value["alg"],
|
||||
e: value["e"],
|
||||
kid: value["kid"],
|
||||
kty: value["kty"],
|
||||
n: value["n"],
|
||||
use: value["use"],
|
||||
x: value["x"],
|
||||
};
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
import type { DtoJWK } from "./DtoJWK";
|
||||
import {
|
||||
DtoJWKFromJSON,
|
||||
DtoJWKFromJSONTyped,
|
||||
DtoJWKToJSON,
|
||||
DtoJWKToJSONTyped,
|
||||
} from "./DtoJWK";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoJWKS
|
||||
*/
|
||||
export interface DtoJWKS {
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoJWK>}
|
||||
* @memberof DtoJWKS
|
||||
*/
|
||||
keys?: Array<DtoJWK>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoJWKS interface.
|
||||
*/
|
||||
export function instanceOfDtoJWKS(value: object): value is DtoJWKS {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoJWKSFromJSON(json: any): DtoJWKS {
|
||||
return DtoJWKSFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJWKSFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoJWKS {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
keys:
|
||||
json["keys"] == null
|
||||
? undefined
|
||||
: (json["keys"] as Array<any>).map(DtoJWKFromJSON),
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoJWKSToJSON(json: any): DtoJWKS {
|
||||
return DtoJWKSToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJWKSToJSONTyped(
|
||||
value?: DtoJWKS | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
keys:
|
||||
value["keys"] == null
|
||||
? undefined
|
||||
: (value["keys"] as Array<any>).map(DtoJWKToJSON),
|
||||
};
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
import type { DtoJobStatus } from "./DtoJobStatus";
|
||||
import {
|
||||
DtoJobStatusFromJSON,
|
||||
DtoJobStatusFromJSONTyped,
|
||||
DtoJobStatusToJSON,
|
||||
DtoJobStatusToJSONTyped,
|
||||
} from "./DtoJobStatus";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoJob
|
||||
*/
|
||||
export interface DtoJob {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
attempts?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
last_error?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
max_attempts?: number;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
payload?: object;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
queue?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
run_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {DtoJobStatus}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
status?: DtoJobStatus;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoJob interface.
|
||||
*/
|
||||
export function instanceOfDtoJob(value: object): value is DtoJob {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoJobFromJSON(json: any): DtoJob {
|
||||
return DtoJobFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJobFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoJob {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
attempts: json["attempts"] == null ? undefined : json["attempts"],
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
last_error: json["last_error"] == null ? undefined : json["last_error"],
|
||||
max_attempts:
|
||||
json["max_attempts"] == null ? undefined : json["max_attempts"],
|
||||
payload: json["payload"] == null ? undefined : json["payload"],
|
||||
queue: json["queue"] == null ? undefined : json["queue"],
|
||||
run_at: json["run_at"] == null ? undefined : json["run_at"],
|
||||
status:
|
||||
json["status"] == null ? undefined : DtoJobStatusFromJSON(json["status"]),
|
||||
type: json["type"] == null ? undefined : json["type"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoJobToJSON(json: any): DtoJob {
|
||||
return DtoJobToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJobToJSONTyped(
|
||||
value?: DtoJob | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
attempts: value["attempts"],
|
||||
created_at: value["created_at"],
|
||||
id: value["id"],
|
||||
last_error: value["last_error"],
|
||||
max_attempts: value["max_attempts"],
|
||||
payload: value["payload"],
|
||||
queue: value["queue"],
|
||||
run_at: value["run_at"],
|
||||
status: DtoJobStatusToJSON(value["status"]),
|
||||
type: value["type"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const DtoJobStatus = {
|
||||
StatusQueued: "queued",
|
||||
StatusRunning: "running",
|
||||
StatusSucceeded: "succeeded",
|
||||
StatusFailed: "failed",
|
||||
StatusCanceled: "canceled",
|
||||
StatusRetrying: "retrying",
|
||||
StatusScheduled: "scheduled",
|
||||
} as const;
|
||||
export type DtoJobStatus = (typeof DtoJobStatus)[keyof typeof DtoJobStatus];
|
||||
|
||||
export function instanceOfDtoJobStatus(value: any): boolean {
|
||||
for (const key in DtoJobStatus) {
|
||||
if (Object.prototype.hasOwnProperty.call(DtoJobStatus, key)) {
|
||||
if (DtoJobStatus[key as keyof typeof DtoJobStatus] === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function DtoJobStatusFromJSON(json: any): DtoJobStatus {
|
||||
return DtoJobStatusFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJobStatusFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoJobStatus {
|
||||
return json as DtoJobStatus;
|
||||
}
|
||||
|
||||
export function DtoJobStatusToJSON(value?: DtoJobStatus | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
export function DtoJobStatusToJSONTyped(
|
||||
value: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoJobStatus {
|
||||
return value as DtoJobStatus;
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoLabelResponse
|
||||
*/
|
||||
export interface DtoLabelResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLabelResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLabelResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLabelResponse
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLabelResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLabelResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLabelResponse
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoLabelResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoLabelResponse(
|
||||
value: object,
|
||||
): value is DtoLabelResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoLabelResponseFromJSON(json: any): DtoLabelResponse {
|
||||
return DtoLabelResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoLabelResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoLabelResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoLabelResponseToJSON(json: any): DtoLabelResponse {
|
||||
return DtoLabelResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoLabelResponseToJSONTyped(
|
||||
value?: DtoLabelResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
id: value["id"],
|
||||
key: value["key"],
|
||||
organization_id: value["organization_id"],
|
||||
updated_at: value["updated_at"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoLogoutRequest
|
||||
*/
|
||||
export interface DtoLogoutRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLogoutRequest
|
||||
*/
|
||||
refresh_token?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoLogoutRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoLogoutRequest(
|
||||
value: object,
|
||||
): value is DtoLogoutRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoLogoutRequestFromJSON(json: any): DtoLogoutRequest {
|
||||
return DtoLogoutRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoLogoutRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoLogoutRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
refresh_token:
|
||||
json["refresh_token"] == null ? undefined : json["refresh_token"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoLogoutRequestToJSON(json: any): DtoLogoutRequest {
|
||||
return DtoLogoutRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoLogoutRequestToJSONTyped(
|
||||
value?: DtoLogoutRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
refresh_token: value["refresh_token"],
|
||||
};
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import type {DtoTaintResponse} from "./DtoTaintResponse";
|
||||
import {DtoTaintResponseFromJSON, DtoTaintResponseToJSON,} from "./DtoTaintResponse";
|
||||
import type {DtoLabelResponse} from "./DtoLabelResponse";
|
||||
import {DtoLabelResponseFromJSON, DtoLabelResponseToJSON,} from "./DtoLabelResponse";
|
||||
import type {DtoServerResponse} from "./DtoServerResponse";
|
||||
import {DtoServerResponseFromJSON, DtoServerResponseToJSON,} from "./DtoServerResponse";
|
||||
import type {DtoAnnotationResponse} from "./DtoAnnotationResponse";
|
||||
import {DtoAnnotationResponseFromJSON, DtoAnnotationResponseToJSON,} from "./DtoAnnotationResponse";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoNodePoolResponse
|
||||
*/
|
||||
export interface DtoNodePoolResponse {
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoAnnotationResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
annotations?: Array<DtoAnnotationResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoLabelResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
labels?: Array<DtoLabelResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
role?: DtoNodePoolResponseRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoServerResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
servers?: Array<DtoServerResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoTaintResponse>}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
taints?: Array<DtoTaintResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoNodePoolResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoNodePoolResponseRoleEnum = {
|
||||
master: "master",
|
||||
worker: "worker",
|
||||
} as const;
|
||||
export type DtoNodePoolResponseRoleEnum =
|
||||
(typeof DtoNodePoolResponseRoleEnum)[keyof typeof DtoNodePoolResponseRoleEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoNodePoolResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoNodePoolResponse(
|
||||
value: object,
|
||||
): value is DtoNodePoolResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseFromJSON(json: any): DtoNodePoolResponse {
|
||||
return DtoNodePoolResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoNodePoolResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
annotations:
|
||||
json["annotations"] == null
|
||||
? undefined
|
||||
: (json["annotations"] as Array<any>).map(
|
||||
DtoAnnotationResponseFromJSON,
|
||||
),
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
labels:
|
||||
json["labels"] == null
|
||||
? undefined
|
||||
: (json["labels"] as Array<any>).map(DtoLabelResponseFromJSON),
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
servers:
|
||||
json["servers"] == null
|
||||
? undefined
|
||||
: (json["servers"] as Array<any>).map(DtoServerResponseFromJSON),
|
||||
taints:
|
||||
json["taints"] == null
|
||||
? undefined
|
||||
: (json["taints"] as Array<any>).map(DtoTaintResponseFromJSON),
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseToJSON(json: any): DtoNodePoolResponse {
|
||||
return DtoNodePoolResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoNodePoolResponseToJSONTyped(
|
||||
value?: DtoNodePoolResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
annotations:
|
||||
value["annotations"] == null
|
||||
? undefined
|
||||
: (value["annotations"] as Array<any>).map(DtoAnnotationResponseToJSON),
|
||||
created_at: value["created_at"],
|
||||
id: value["id"],
|
||||
labels:
|
||||
value["labels"] == null
|
||||
? undefined
|
||||
: (value["labels"] as Array<any>).map(DtoLabelResponseToJSON),
|
||||
name: value["name"],
|
||||
organization_id: value["organization_id"],
|
||||
role: value["role"],
|
||||
servers:
|
||||
value["servers"] == null
|
||||
? undefined
|
||||
: (value["servers"] as Array<any>).map(DtoServerResponseToJSON),
|
||||
taints:
|
||||
value["taints"] == null
|
||||
? undefined
|
||||
: (value["taints"] as Array<any>).map(DtoTaintResponseToJSON),
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
import type { DtoJob } from "./DtoJob";
|
||||
import {
|
||||
DtoJobFromJSON,
|
||||
DtoJobFromJSONTyped,
|
||||
DtoJobToJSON,
|
||||
DtoJobToJSONTyped,
|
||||
} from "./DtoJob";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoPageJob
|
||||
*/
|
||||
export interface DtoPageJob {
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoJob>}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
items?: Array<DtoJob>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
page_size?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
total?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoPageJob interface.
|
||||
*/
|
||||
export function instanceOfDtoPageJob(value: object): value is DtoPageJob {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoPageJobFromJSON(json: any): DtoPageJob {
|
||||
return DtoPageJobFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoPageJobFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoPageJob {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
items:
|
||||
json["items"] == null
|
||||
? undefined
|
||||
: (json["items"] as Array<any>).map(DtoJobFromJSON),
|
||||
page: json["page"] == null ? undefined : json["page"],
|
||||
page_size: json["page_size"] == null ? undefined : json["page_size"],
|
||||
total: json["total"] == null ? undefined : json["total"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoPageJobToJSON(json: any): DtoPageJob {
|
||||
return DtoPageJobToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoPageJobToJSONTyped(
|
||||
value?: DtoPageJob | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
items:
|
||||
value["items"] == null
|
||||
? undefined
|
||||
: (value["items"] as Array<any>).map(DtoJobToJSON),
|
||||
page: value["page"],
|
||||
page_size: value["page_size"],
|
||||
total: value["total"],
|
||||
};
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoQueueInfo
|
||||
*/
|
||||
export interface DtoQueueInfo {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
failed?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
pending?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
running?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
scheduled?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoQueueInfo interface.
|
||||
*/
|
||||
export function instanceOfDtoQueueInfo(value: object): value is DtoQueueInfo {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoQueueInfoFromJSON(json: any): DtoQueueInfo {
|
||||
return DtoQueueInfoFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoQueueInfoFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoQueueInfo {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
failed: json["failed"] == null ? undefined : json["failed"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
pending: json["pending"] == null ? undefined : json["pending"],
|
||||
running: json["running"] == null ? undefined : json["running"],
|
||||
scheduled: json["scheduled"] == null ? undefined : json["scheduled"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoQueueInfoToJSON(json: any): DtoQueueInfo {
|
||||
return DtoQueueInfoToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoQueueInfoToJSONTyped(
|
||||
value?: DtoQueueInfo | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
failed: value["failed"],
|
||||
name: value["name"],
|
||||
pending: value["pending"],
|
||||
running: value["running"],
|
||||
scheduled: value["scheduled"],
|
||||
};
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoRefreshRequest
|
||||
*/
|
||||
export interface DtoRefreshRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRefreshRequest
|
||||
*/
|
||||
refresh_token?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoRefreshRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoRefreshRequest(
|
||||
value: object,
|
||||
): value is DtoRefreshRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoRefreshRequestFromJSON(json: any): DtoRefreshRequest {
|
||||
return DtoRefreshRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoRefreshRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoRefreshRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
refresh_token:
|
||||
json["refresh_token"] == null ? undefined : json["refresh_token"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoRefreshRequestToJSON(json: any): DtoRefreshRequest {
|
||||
return DtoRefreshRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoRefreshRequestToJSONTyped(
|
||||
value?: DtoRefreshRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
refresh_token: value["refresh_token"],
|
||||
};
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoServerResponse
|
||||
*/
|
||||
export interface DtoServerResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
private_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
public_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
role?: DtoServerResponseRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
ssh_key_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
ssh_user?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
status?: DtoServerResponseStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoServerResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoServerResponseRoleEnum = {
|
||||
master: "master",
|
||||
worker: "worker",
|
||||
bastion: "bastion",
|
||||
} as const;
|
||||
export type DtoServerResponseRoleEnum =
|
||||
(typeof DtoServerResponseRoleEnum)[keyof typeof DtoServerResponseRoleEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoServerResponseStatusEnum = {
|
||||
pending: "pending",
|
||||
provisioning: "provisioning",
|
||||
ready: "ready",
|
||||
failed: "failed",
|
||||
} as const;
|
||||
export type DtoServerResponseStatusEnum =
|
||||
(typeof DtoServerResponseStatusEnum)[keyof typeof DtoServerResponseStatusEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoServerResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoServerResponse(
|
||||
value: object,
|
||||
): value is DtoServerResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoServerResponseFromJSON(json: any): DtoServerResponse {
|
||||
return DtoServerResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoServerResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoServerResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
hostname: json["hostname"] == null ? undefined : json["hostname"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
private_ip_address:
|
||||
json["private_ip_address"] == null
|
||||
? undefined
|
||||
: json["private_ip_address"],
|
||||
public_ip_address:
|
||||
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
|
||||
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoServerResponseToJSON(json: any): DtoServerResponse {
|
||||
return DtoServerResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoServerResponseToJSONTyped(
|
||||
value?: DtoServerResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
hostname: value["hostname"],
|
||||
id: value["id"],
|
||||
organization_id: value["organization_id"],
|
||||
private_ip_address: value["private_ip_address"],
|
||||
public_ip_address: value["public_ip_address"],
|
||||
role: value["role"],
|
||||
ssh_key_id: value["ssh_key_id"],
|
||||
ssh_user: value["ssh_user"],
|
||||
status: value["status"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoSshResponse
|
||||
*/
|
||||
export interface DtoSshResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
fingerprint?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
public_key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoSshResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoSshResponse(
|
||||
value: object,
|
||||
): value is DtoSshResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoSshResponseFromJSON(json: any): DtoSshResponse {
|
||||
return DtoSshResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoSshResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoSshResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
fingerprint: json["fingerprint"] == null ? undefined : json["fingerprint"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
public_key: json["public_key"] == null ? undefined : json["public_key"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoSshResponseToJSON(json: any): DtoSshResponse {
|
||||
return DtoSshResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoSshResponseToJSONTyped(
|
||||
value?: DtoSshResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
fingerprint: value["fingerprint"],
|
||||
id: value["id"],
|
||||
name: value["name"],
|
||||
organization_id: value["organization_id"],
|
||||
public_key: value["public_key"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoSshRevealResponse
|
||||
*/
|
||||
export interface DtoSshRevealResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
fingerprint?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
private_key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
public_key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSshRevealResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoSshRevealResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoSshRevealResponse(
|
||||
value: object,
|
||||
): value is DtoSshRevealResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoSshRevealResponseFromJSON(json: any): DtoSshRevealResponse {
|
||||
return DtoSshRevealResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoSshRevealResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoSshRevealResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
fingerprint: json["fingerprint"] == null ? undefined : json["fingerprint"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
private_key: json["private_key"] == null ? undefined : json["private_key"],
|
||||
public_key: json["public_key"] == null ? undefined : json["public_key"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoSshRevealResponseToJSON(json: any): DtoSshRevealResponse {
|
||||
return DtoSshRevealResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoSshRevealResponseToJSONTyped(
|
||||
value?: DtoSshRevealResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
fingerprint: value["fingerprint"],
|
||||
id: value["id"],
|
||||
name: value["name"],
|
||||
organization_id: value["organization_id"],
|
||||
private_key: value["private_key"],
|
||||
public_key: value["public_key"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoTaintResponse
|
||||
*/
|
||||
export interface DtoTaintResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
effect?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTaintResponse
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoTaintResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoTaintResponse(
|
||||
value: object,
|
||||
): value is DtoTaintResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoTaintResponseFromJSON(json: any): DtoTaintResponse {
|
||||
return DtoTaintResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoTaintResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoTaintResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
effect: json["effect"] == null ? undefined : json["effect"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoTaintResponseToJSON(json: any): DtoTaintResponse {
|
||||
return DtoTaintResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoTaintResponseToJSONTyped(
|
||||
value?: DtoTaintResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
effect: value["effect"],
|
||||
id: value["id"],
|
||||
key: value["key"],
|
||||
organization_id: value["organization_id"],
|
||||
updated_at: value["updated_at"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoTokenPair
|
||||
*/
|
||||
export interface DtoTokenPair {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTokenPair
|
||||
*/
|
||||
access_token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoTokenPair
|
||||
*/
|
||||
expires_in?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTokenPair
|
||||
*/
|
||||
refresh_token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoTokenPair
|
||||
*/
|
||||
token_type?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoTokenPair interface.
|
||||
*/
|
||||
export function instanceOfDtoTokenPair(value: object): value is DtoTokenPair {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoTokenPairFromJSON(json: any): DtoTokenPair {
|
||||
return DtoTokenPairFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoTokenPairFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoTokenPair {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
access_token:
|
||||
json["access_token"] == null ? undefined : json["access_token"],
|
||||
expires_in: json["expires_in"] == null ? undefined : json["expires_in"],
|
||||
refresh_token:
|
||||
json["refresh_token"] == null ? undefined : json["refresh_token"],
|
||||
token_type: json["token_type"] == null ? undefined : json["token_type"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoTokenPairToJSON(json: any): DtoTokenPair {
|
||||
return DtoTokenPairToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoTokenPairToJSONTyped(
|
||||
value?: DtoTokenPair | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
access_token: value["access_token"],
|
||||
expires_in: value["expires_in"],
|
||||
refresh_token: value["refresh_token"],
|
||||
token_type: value["token_type"],
|
||||
};
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateAnnotationRequest
|
||||
*/
|
||||
export interface DtoUpdateAnnotationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateAnnotationRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateAnnotationRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateAnnotationRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateAnnotationRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateAnnotationRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateAnnotationRequest {
|
||||
return DtoUpdateAnnotationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateAnnotationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateAnnotationRequest {
|
||||
return DtoUpdateAnnotationRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestToJSONTyped(
|
||||
value?: DtoUpdateAnnotationRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
key: value["key"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateLabelRequest
|
||||
*/
|
||||
export interface DtoUpdateLabelRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateLabelRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateLabelRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateLabelRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateLabelRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateLabelRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateLabelRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateLabelRequest {
|
||||
return DtoUpdateLabelRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateLabelRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateLabelRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateLabelRequestToJSON(json: any): DtoUpdateLabelRequest {
|
||||
return DtoUpdateLabelRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateLabelRequestToJSONTyped(
|
||||
value?: DtoUpdateLabelRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
key: value["key"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateNodePoolRequest
|
||||
*/
|
||||
export interface DtoUpdateNodePoolRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateNodePoolRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateNodePoolRequest
|
||||
*/
|
||||
role?: DtoUpdateNodePoolRequestRoleEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateNodePoolRequestRoleEnum = {
|
||||
master: "master",
|
||||
worker: "worker",
|
||||
} as const;
|
||||
export type DtoUpdateNodePoolRequestRoleEnum =
|
||||
(typeof DtoUpdateNodePoolRequestRoleEnum)[keyof typeof DtoUpdateNodePoolRequestRoleEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateNodePoolRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateNodePoolRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateNodePoolRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateNodePoolRequest {
|
||||
return DtoUpdateNodePoolRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateNodePoolRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateNodePoolRequest {
|
||||
return DtoUpdateNodePoolRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateNodePoolRequestToJSONTyped(
|
||||
value?: DtoUpdateNodePoolRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
name: value["name"],
|
||||
role: value["role"],
|
||||
};
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateServerRequest
|
||||
*/
|
||||
export interface DtoUpdateServerRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
hostname?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
private_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
public_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
role?: DtoUpdateServerRequestRoleEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
ssh_key_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
ssh_user?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateServerRequest
|
||||
*/
|
||||
status?: DtoUpdateServerRequestStatusEnum;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateServerRequestRoleEnum = {
|
||||
master: "master",
|
||||
worker: "worker",
|
||||
bastion: "bastion",
|
||||
} as const;
|
||||
export type DtoUpdateServerRequestRoleEnum =
|
||||
(typeof DtoUpdateServerRequestRoleEnum)[keyof typeof DtoUpdateServerRequestRoleEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateServerRequestStatusEnum = {
|
||||
pending: "pending",
|
||||
provisioning: "provisioning",
|
||||
ready: "ready",
|
||||
failed: "failed",
|
||||
} as const;
|
||||
export type DtoUpdateServerRequestStatusEnum =
|
||||
(typeof DtoUpdateServerRequestStatusEnum)[keyof typeof DtoUpdateServerRequestStatusEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateServerRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateServerRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateServerRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateServerRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateServerRequest {
|
||||
return DtoUpdateServerRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateServerRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateServerRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
hostname: json["hostname"] == null ? undefined : json["hostname"],
|
||||
private_ip_address:
|
||||
json["private_ip_address"] == null
|
||||
? undefined
|
||||
: json["private_ip_address"],
|
||||
public_ip_address:
|
||||
json["public_ip_address"] == null ? undefined : json["public_ip_address"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
ssh_key_id: json["ssh_key_id"] == null ? undefined : json["ssh_key_id"],
|
||||
ssh_user: json["ssh_user"] == null ? undefined : json["ssh_user"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateServerRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateServerRequest {
|
||||
return DtoUpdateServerRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateServerRequestToJSONTyped(
|
||||
value?: DtoUpdateServerRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
hostname: value["hostname"],
|
||||
private_ip_address: value["private_ip_address"],
|
||||
public_ip_address: value["public_ip_address"],
|
||||
role: value["role"],
|
||||
ssh_key_id: value["ssh_key_id"],
|
||||
ssh_user: value["ssh_user"],
|
||||
status: value["status"],
|
||||
};
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateTaintRequest
|
||||
*/
|
||||
export interface DtoUpdateTaintRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateTaintRequest
|
||||
*/
|
||||
effect?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateTaintRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateTaintRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateTaintRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateTaintRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateTaintRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateTaintRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateTaintRequest {
|
||||
return DtoUpdateTaintRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateTaintRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateTaintRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
effect: json["effect"] == null ? undefined : json["effect"],
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateTaintRequestToJSON(json: any): DtoUpdateTaintRequest {
|
||||
return DtoUpdateTaintRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateTaintRequestToJSONTyped(
|
||||
value?: DtoUpdateTaintRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
effect: value["effect"],
|
||||
key: value["key"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersCreateUserKeyRequest
|
||||
*/
|
||||
export interface HandlersCreateUserKeyRequest {
|
||||
/**
|
||||
* optional TTL
|
||||
* @type {number}
|
||||
* @memberof HandlersCreateUserKeyRequest
|
||||
*/
|
||||
expires_in_hours?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersCreateUserKeyRequest
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersCreateUserKeyRequest interface.
|
||||
*/
|
||||
export function instanceOfHandlersCreateUserKeyRequest(
|
||||
value: object,
|
||||
): value is HandlersCreateUserKeyRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersCreateUserKeyRequestFromJSON(
|
||||
json: any,
|
||||
): HandlersCreateUserKeyRequest {
|
||||
return HandlersCreateUserKeyRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersCreateUserKeyRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersCreateUserKeyRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
expires_in_hours:
|
||||
json["expires_in_hours"] == null ? undefined : json["expires_in_hours"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersCreateUserKeyRequestToJSON(
|
||||
json: any,
|
||||
): HandlersCreateUserKeyRequest {
|
||||
return HandlersCreateUserKeyRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersCreateUserKeyRequestToJSONTyped(
|
||||
value?: HandlersCreateUserKeyRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
expires_in_hours: value["expires_in_hours"],
|
||||
name: value["name"],
|
||||
};
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersHealthStatus
|
||||
*/
|
||||
export interface HandlersHealthStatus {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersHealthStatus
|
||||
*/
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersHealthStatus interface.
|
||||
*/
|
||||
export function instanceOfHandlersHealthStatus(
|
||||
value: object,
|
||||
): value is HandlersHealthStatus {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusFromJSON(json: any): HandlersHealthStatus {
|
||||
return HandlersHealthStatusFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersHealthStatus {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusToJSON(json: any): HandlersHealthStatus {
|
||||
return HandlersHealthStatusToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusToJSONTyped(
|
||||
value?: HandlersHealthStatus | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
status: value["status"],
|
||||
};
|
||||
}
|
||||
@@ -1,179 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
import type { ModelsUserEmail } from "./ModelsUserEmail";
|
||||
import {
|
||||
ModelsUserEmailFromJSON,
|
||||
ModelsUserEmailFromJSONTyped,
|
||||
ModelsUserEmailToJSON,
|
||||
ModelsUserEmailToJSONTyped,
|
||||
} from "./ModelsUserEmail";
|
||||
import type { ModelsOrganization } from "./ModelsOrganization";
|
||||
import {
|
||||
ModelsOrganizationFromJSON,
|
||||
ModelsOrganizationFromJSONTyped,
|
||||
ModelsOrganizationToJSON,
|
||||
ModelsOrganizationToJSONTyped,
|
||||
} from "./ModelsOrganization";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersMeResponse
|
||||
*/
|
||||
export interface HandlersMeResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
avatar_url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
display_name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ModelsUserEmail>}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
emails?: Array<ModelsUserEmail>;
|
||||
/**
|
||||
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
||||
* @type {string}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
is_admin?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
is_disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Array<ModelsOrganization>}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
organizations?: Array<ModelsOrganization>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
primary_email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
updated_at?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersMeResponse interface.
|
||||
*/
|
||||
export function instanceOfHandlersMeResponse(
|
||||
value: object,
|
||||
): value is HandlersMeResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersMeResponseFromJSON(json: any): HandlersMeResponse {
|
||||
return HandlersMeResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersMeResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersMeResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
avatar_url: json["avatar_url"] == null ? undefined : json["avatar_url"],
|
||||
created_at:
|
||||
json["created_at"] == null ? undefined : new Date(json["created_at"]),
|
||||
display_name:
|
||||
json["display_name"] == null ? undefined : json["display_name"],
|
||||
emails:
|
||||
json["emails"] == null
|
||||
? undefined
|
||||
: (json["emails"] as Array<any>).map(ModelsUserEmailFromJSON),
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
is_admin: json["is_admin"] == null ? undefined : json["is_admin"],
|
||||
is_disabled: json["is_disabled"] == null ? undefined : json["is_disabled"],
|
||||
organizations:
|
||||
json["organizations"] == null
|
||||
? undefined
|
||||
: (json["organizations"] as Array<any>).map(ModelsOrganizationFromJSON),
|
||||
primary_email:
|
||||
json["primary_email"] == null ? undefined : json["primary_email"],
|
||||
updated_at:
|
||||
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersMeResponseToJSON(json: any): HandlersMeResponse {
|
||||
return HandlersMeResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersMeResponseToJSONTyped(
|
||||
value?: HandlersMeResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
avatar_url: value["avatar_url"],
|
||||
created_at:
|
||||
value["created_at"] == null
|
||||
? value["created_at"]
|
||||
: value["created_at"].toISOString(),
|
||||
display_name: value["display_name"],
|
||||
emails:
|
||||
value["emails"] == null
|
||||
? undefined
|
||||
: (value["emails"] as Array<any>).map(ModelsUserEmailToJSON),
|
||||
id: value["id"],
|
||||
is_admin: value["is_admin"],
|
||||
is_disabled: value["is_disabled"],
|
||||
organizations:
|
||||
value["organizations"] == null
|
||||
? undefined
|
||||
: (value["organizations"] as Array<any>).map(ModelsOrganizationToJSON),
|
||||
primary_email: value["primary_email"],
|
||||
updated_at:
|
||||
value["updated_at"] == null
|
||||
? value["updated_at"]
|
||||
: value["updated_at"].toISOString(),
|
||||
};
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersMemberOut
|
||||
*/
|
||||
export interface HandlersMemberOut {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMemberOut
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* owner/admin/member
|
||||
* @type {string}
|
||||
* @memberof HandlersMemberOut
|
||||
*/
|
||||
role?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMemberOut
|
||||
*/
|
||||
user_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersMemberOut interface.
|
||||
*/
|
||||
export function instanceOfHandlersMemberOut(
|
||||
value: object,
|
||||
): value is HandlersMemberOut {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersMemberOutFromJSON(json: any): HandlersMemberOut {
|
||||
return HandlersMemberOutFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersMemberOutFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersMemberOut {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
email: json["email"] == null ? undefined : json["email"],
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
user_id: json["user_id"] == null ? undefined : json["user_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersMemberOutToJSON(json: any): HandlersMemberOut {
|
||||
return HandlersMemberOutToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersMemberOutToJSONTyped(
|
||||
value?: HandlersMemberOut | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
email: value["email"],
|
||||
role: value["role"],
|
||||
user_id: value["user_id"],
|
||||
};
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersMemberUpsertReq
|
||||
*/
|
||||
export interface HandlersMemberUpsertReq {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMemberUpsertReq
|
||||
*/
|
||||
role?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersMemberUpsertReq
|
||||
*/
|
||||
user_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersMemberUpsertReq interface.
|
||||
*/
|
||||
export function instanceOfHandlersMemberUpsertReq(
|
||||
value: object,
|
||||
): value is HandlersMemberUpsertReq {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersMemberUpsertReqFromJSON(
|
||||
json: any,
|
||||
): HandlersMemberUpsertReq {
|
||||
return HandlersMemberUpsertReqFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersMemberUpsertReqFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersMemberUpsertReq {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
role: json["role"] == null ? undefined : json["role"],
|
||||
user_id: json["user_id"] == null ? undefined : json["user_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersMemberUpsertReqToJSON(
|
||||
json: any,
|
||||
): HandlersMemberUpsertReq {
|
||||
return HandlersMemberUpsertReqToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersMemberUpsertReqToJSONTyped(
|
||||
value?: HandlersMemberUpsertReq | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
role: value["role"],
|
||||
user_id: value["user_id"],
|
||||
};
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersOrgCreateReq
|
||||
*/
|
||||
export interface HandlersOrgCreateReq {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgCreateReq
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgCreateReq
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersOrgCreateReq interface.
|
||||
*/
|
||||
export function instanceOfHandlersOrgCreateReq(
|
||||
value: object,
|
||||
): value is HandlersOrgCreateReq {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersOrgCreateReqFromJSON(json: any): HandlersOrgCreateReq {
|
||||
return HandlersOrgCreateReqFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgCreateReqFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersOrgCreateReq {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
domain: json["domain"] == null ? undefined : json["domain"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersOrgCreateReqToJSON(json: any): HandlersOrgCreateReq {
|
||||
return HandlersOrgCreateReqToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgCreateReqToJSONTyped(
|
||||
value?: HandlersOrgCreateReq | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
domain: value["domain"],
|
||||
name: value["name"],
|
||||
};
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersOrgKeyCreateReq
|
||||
*/
|
||||
export interface HandlersOrgKeyCreateReq {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof HandlersOrgKeyCreateReq
|
||||
*/
|
||||
expires_in_hours?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateReq
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersOrgKeyCreateReq interface.
|
||||
*/
|
||||
export function instanceOfHandlersOrgKeyCreateReq(
|
||||
value: object,
|
||||
): value is HandlersOrgKeyCreateReq {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateReqFromJSON(
|
||||
json: any,
|
||||
): HandlersOrgKeyCreateReq {
|
||||
return HandlersOrgKeyCreateReqFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateReqFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersOrgKeyCreateReq {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
expires_in_hours:
|
||||
json["expires_in_hours"] == null ? undefined : json["expires_in_hours"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateReqToJSON(
|
||||
json: any,
|
||||
): HandlersOrgKeyCreateReq {
|
||||
return HandlersOrgKeyCreateReqToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateReqToJSONTyped(
|
||||
value?: HandlersOrgKeyCreateReq | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
expires_in_hours: value["expires_in_hours"],
|
||||
name: value["name"],
|
||||
};
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersOrgKeyCreateResp
|
||||
*/
|
||||
export interface HandlersOrgKeyCreateResp {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
expires_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* shown once:
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
org_key?: string;
|
||||
/**
|
||||
* shown once:
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
org_secret?: string;
|
||||
/**
|
||||
* "org"
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgKeyCreateResp
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersOrgKeyCreateResp interface.
|
||||
*/
|
||||
export function instanceOfHandlersOrgKeyCreateResp(
|
||||
value: object,
|
||||
): value is HandlersOrgKeyCreateResp {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateRespFromJSON(
|
||||
json: any,
|
||||
): HandlersOrgKeyCreateResp {
|
||||
return HandlersOrgKeyCreateRespFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateRespFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersOrgKeyCreateResp {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
expires_at: json["expires_at"] == null ? undefined : json["expires_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
org_key: json["org_key"] == null ? undefined : json["org_key"],
|
||||
org_secret: json["org_secret"] == null ? undefined : json["org_secret"],
|
||||
scope: json["scope"] == null ? undefined : json["scope"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateRespToJSON(
|
||||
json: any,
|
||||
): HandlersOrgKeyCreateResp {
|
||||
return HandlersOrgKeyCreateRespToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgKeyCreateRespToJSONTyped(
|
||||
value?: HandlersOrgKeyCreateResp | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
expires_at: value["expires_at"],
|
||||
id: value["id"],
|
||||
name: value["name"],
|
||||
org_key: value["org_key"],
|
||||
org_secret: value["org_secret"],
|
||||
scope: value["scope"],
|
||||
};
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersOrgUpdateReq
|
||||
*/
|
||||
export interface HandlersOrgUpdateReq {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgUpdateReq
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersOrgUpdateReq
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersOrgUpdateReq interface.
|
||||
*/
|
||||
export function instanceOfHandlersOrgUpdateReq(
|
||||
value: object,
|
||||
): value is HandlersOrgUpdateReq {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersOrgUpdateReqFromJSON(json: any): HandlersOrgUpdateReq {
|
||||
return HandlersOrgUpdateReqFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgUpdateReqFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersOrgUpdateReq {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
domain: json["domain"] == null ? undefined : json["domain"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersOrgUpdateReqToJSON(json: any): HandlersOrgUpdateReq {
|
||||
return HandlersOrgUpdateReqToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersOrgUpdateReqToJSONTyped(
|
||||
value?: HandlersOrgUpdateReq | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
domain: value["domain"],
|
||||
name: value["name"],
|
||||
};
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersUpdateMeRequest
|
||||
*/
|
||||
export interface HandlersUpdateMeRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersUpdateMeRequest
|
||||
*/
|
||||
display_name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersUpdateMeRequest interface.
|
||||
*/
|
||||
export function instanceOfHandlersUpdateMeRequest(
|
||||
value: object,
|
||||
): value is HandlersUpdateMeRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersUpdateMeRequestFromJSON(
|
||||
json: any,
|
||||
): HandlersUpdateMeRequest {
|
||||
return HandlersUpdateMeRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersUpdateMeRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersUpdateMeRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
display_name:
|
||||
json["display_name"] == null ? undefined : json["display_name"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersUpdateMeRequestToJSON(
|
||||
json: any,
|
||||
): HandlersUpdateMeRequest {
|
||||
return HandlersUpdateMeRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersUpdateMeRequestToJSONTyped(
|
||||
value?: HandlersUpdateMeRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
display_name: value["display_name"],
|
||||
};
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersUserAPIKeyOut
|
||||
*/
|
||||
export interface HandlersUserAPIKeyOut {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
expires_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
last_used_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Shown only on create:
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
plain?: string;
|
||||
/**
|
||||
* "user"
|
||||
* @type {string}
|
||||
* @memberof HandlersUserAPIKeyOut
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersUserAPIKeyOut interface.
|
||||
*/
|
||||
export function instanceOfHandlersUserAPIKeyOut(
|
||||
value: object,
|
||||
): value is HandlersUserAPIKeyOut {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersUserAPIKeyOutFromJSON(
|
||||
json: any,
|
||||
): HandlersUserAPIKeyOut {
|
||||
return HandlersUserAPIKeyOutFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersUserAPIKeyOutFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersUserAPIKeyOut {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
expires_at: json["expires_at"] == null ? undefined : json["expires_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
last_used_at:
|
||||
json["last_used_at"] == null ? undefined : json["last_used_at"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
plain: json["plain"] == null ? undefined : json["plain"],
|
||||
scope: json["scope"] == null ? undefined : json["scope"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersUserAPIKeyOutToJSON(json: any): HandlersUserAPIKeyOut {
|
||||
return HandlersUserAPIKeyOutToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersUserAPIKeyOutToJSONTyped(
|
||||
value?: HandlersUserAPIKeyOut | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
expires_at: value["expires_at"],
|
||||
id: value["id"],
|
||||
last_used_at: value["last_used_at"],
|
||||
name: value["name"],
|
||||
plain: value["plain"],
|
||||
scope: value["scope"],
|
||||
};
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ModelsAPIKey
|
||||
*/
|
||||
export interface ModelsAPIKey {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
expires_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
last_used_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
org_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
revoked?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
scope?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
updated_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsAPIKey
|
||||
*/
|
||||
user_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ModelsAPIKey interface.
|
||||
*/
|
||||
export function instanceOfModelsAPIKey(value: object): value is ModelsAPIKey {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ModelsAPIKeyFromJSON(json: any): ModelsAPIKey {
|
||||
return ModelsAPIKeyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsAPIKeyFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): ModelsAPIKey {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at:
|
||||
json["created_at"] == null ? undefined : new Date(json["created_at"]),
|
||||
expires_at:
|
||||
json["expires_at"] == null ? undefined : new Date(json["expires_at"]),
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
last_used_at:
|
||||
json["last_used_at"] == null ? undefined : new Date(json["last_used_at"]),
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
org_id: json["org_id"] == null ? undefined : json["org_id"],
|
||||
prefix: json["prefix"] == null ? undefined : json["prefix"],
|
||||
revoked: json["revoked"] == null ? undefined : json["revoked"],
|
||||
scope: json["scope"] == null ? undefined : json["scope"],
|
||||
updated_at:
|
||||
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
|
||||
user_id: json["user_id"] == null ? undefined : json["user_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function ModelsAPIKeyToJSON(json: any): ModelsAPIKey {
|
||||
return ModelsAPIKeyToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsAPIKeyToJSONTyped(
|
||||
value?: ModelsAPIKey | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at:
|
||||
value["created_at"] == null
|
||||
? value["created_at"]
|
||||
: value["created_at"].toISOString(),
|
||||
expires_at:
|
||||
value["expires_at"] == null
|
||||
? value["expires_at"]
|
||||
: value["expires_at"].toISOString(),
|
||||
id: value["id"],
|
||||
last_used_at:
|
||||
value["last_used_at"] == null
|
||||
? value["last_used_at"]
|
||||
: value["last_used_at"].toISOString(),
|
||||
name: value["name"],
|
||||
org_id: value["org_id"],
|
||||
prefix: value["prefix"],
|
||||
revoked: value["revoked"],
|
||||
scope: value["scope"],
|
||||
updated_at:
|
||||
value["updated_at"] == null
|
||||
? value["updated_at"]
|
||||
: value["updated_at"].toISOString(),
|
||||
user_id: value["user_id"],
|
||||
};
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ModelsOrganization
|
||||
*/
|
||||
export interface ModelsOrganization {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsOrganization
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsOrganization
|
||||
*/
|
||||
domain?: string;
|
||||
/**
|
||||
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
||||
* @type {string}
|
||||
* @memberof ModelsOrganization
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsOrganization
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsOrganization
|
||||
*/
|
||||
updated_at?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ModelsOrganization interface.
|
||||
*/
|
||||
export function instanceOfModelsOrganization(
|
||||
value: object,
|
||||
): value is ModelsOrganization {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ModelsOrganizationFromJSON(json: any): ModelsOrganization {
|
||||
return ModelsOrganizationFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsOrganizationFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): ModelsOrganization {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at:
|
||||
json["created_at"] == null ? undefined : new Date(json["created_at"]),
|
||||
domain: json["domain"] == null ? undefined : json["domain"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
updated_at:
|
||||
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
|
||||
};
|
||||
}
|
||||
|
||||
export function ModelsOrganizationToJSON(json: any): ModelsOrganization {
|
||||
return ModelsOrganizationToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsOrganizationToJSONTyped(
|
||||
value?: ModelsOrganization | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at:
|
||||
value["created_at"] == null
|
||||
? value["created_at"]
|
||||
: value["created_at"].toISOString(),
|
||||
domain: value["domain"],
|
||||
id: value["id"],
|
||||
name: value["name"],
|
||||
updated_at:
|
||||
value["updated_at"] == null
|
||||
? value["updated_at"]
|
||||
: value["updated_at"].toISOString(),
|
||||
};
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ModelsUser
|
||||
*/
|
||||
export interface ModelsUser {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
avatar_url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
display_name?: string;
|
||||
/**
|
||||
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
||||
* @type {string}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
is_admin?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
is_disabled?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
primary_email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
updated_at?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ModelsUser interface.
|
||||
*/
|
||||
export function instanceOfModelsUser(value: object): value is ModelsUser {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ModelsUserFromJSON(json: any): ModelsUser {
|
||||
return ModelsUserFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsUserFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): ModelsUser {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
avatar_url: json["avatar_url"] == null ? undefined : json["avatar_url"],
|
||||
created_at:
|
||||
json["created_at"] == null ? undefined : new Date(json["created_at"]),
|
||||
display_name:
|
||||
json["display_name"] == null ? undefined : json["display_name"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
is_admin: json["is_admin"] == null ? undefined : json["is_admin"],
|
||||
is_disabled: json["is_disabled"] == null ? undefined : json["is_disabled"],
|
||||
primary_email:
|
||||
json["primary_email"] == null ? undefined : json["primary_email"],
|
||||
updated_at:
|
||||
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
|
||||
};
|
||||
}
|
||||
|
||||
export function ModelsUserToJSON(json: any): ModelsUser {
|
||||
return ModelsUserToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsUserToJSONTyped(
|
||||
value?: ModelsUser | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
avatar_url: value["avatar_url"],
|
||||
created_at:
|
||||
value["created_at"] == null
|
||||
? value["created_at"]
|
||||
: value["created_at"].toISOString(),
|
||||
display_name: value["display_name"],
|
||||
id: value["id"],
|
||||
is_admin: value["is_admin"],
|
||||
is_disabled: value["is_disabled"],
|
||||
primary_email: value["primary_email"],
|
||||
updated_at:
|
||||
value["updated_at"] == null
|
||||
? value["updated_at"]
|
||||
: value["updated_at"].toISOString(),
|
||||
};
|
||||
}
|
||||
@@ -1,142 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
import type { ModelsUser } from "./ModelsUser";
|
||||
import {
|
||||
ModelsUserFromJSON,
|
||||
ModelsUserFromJSONTyped,
|
||||
ModelsUserToJSON,
|
||||
ModelsUserToJSONTyped,
|
||||
} from "./ModelsUser";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ModelsUserEmail
|
||||
*/
|
||||
export interface ModelsUserEmail {
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
||||
* @type {string}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
is_primary?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
is_verified?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
updated_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {ModelsUser}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
user?: ModelsUser;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelsUserEmail
|
||||
*/
|
||||
user_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ModelsUserEmail interface.
|
||||
*/
|
||||
export function instanceOfModelsUserEmail(
|
||||
value: object,
|
||||
): value is ModelsUserEmail {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ModelsUserEmailFromJSON(json: any): ModelsUserEmail {
|
||||
return ModelsUserEmailFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsUserEmailFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): ModelsUserEmail {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at:
|
||||
json["created_at"] == null ? undefined : new Date(json["created_at"]),
|
||||
email: json["email"] == null ? undefined : json["email"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
is_primary: json["is_primary"] == null ? undefined : json["is_primary"],
|
||||
is_verified: json["is_verified"] == null ? undefined : json["is_verified"],
|
||||
updated_at:
|
||||
json["updated_at"] == null ? undefined : new Date(json["updated_at"]),
|
||||
user: json["user"] == null ? undefined : ModelsUserFromJSON(json["user"]),
|
||||
user_id: json["user_id"] == null ? undefined : json["user_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function ModelsUserEmailToJSON(json: any): ModelsUserEmail {
|
||||
return ModelsUserEmailToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelsUserEmailToJSONTyped(
|
||||
value?: ModelsUserEmail | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at:
|
||||
value["created_at"] == null
|
||||
? value["created_at"]
|
||||
: value["created_at"].toISOString(),
|
||||
email: value["email"],
|
||||
id: value["id"],
|
||||
is_primary: value["is_primary"],
|
||||
is_verified: value["is_verified"],
|
||||
updated_at:
|
||||
value["updated_at"] == null
|
||||
? value["updated_at"]
|
||||
: value["updated_at"].toISOString(),
|
||||
user: ModelsUserToJSON(value["user"]),
|
||||
user_id: value["user_id"],
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface UtilsErrorResponse
|
||||
*/
|
||||
export interface UtilsErrorResponse {
|
||||
/**
|
||||
* A machine-readable error code, e.g. "validation_error"
|
||||
* example: validation_error
|
||||
* @type {string}
|
||||
* @memberof UtilsErrorResponse
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* Human-readable message
|
||||
* example: slug is required
|
||||
* @type {string}
|
||||
* @memberof UtilsErrorResponse
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the UtilsErrorResponse interface.
|
||||
*/
|
||||
export function instanceOfUtilsErrorResponse(
|
||||
value: object,
|
||||
): value is UtilsErrorResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function UtilsErrorResponseFromJSON(json: any): UtilsErrorResponse {
|
||||
return UtilsErrorResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function UtilsErrorResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): UtilsErrorResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
code: json["code"] == null ? undefined : json["code"],
|
||||
message: json["message"] == null ? undefined : json["message"],
|
||||
};
|
||||
}
|
||||
|
||||
export function UtilsErrorResponseToJSON(json: any): UtilsErrorResponse {
|
||||
return UtilsErrorResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function UtilsErrorResponseToJSONTyped(
|
||||
value?: UtilsErrorResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
code: value["code"],
|
||||
message: value["message"],
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from "./DtoAnnotationResponse";
|
||||
export * from "./DtoAttachAnnotationsRequest";
|
||||
export * from "./DtoAttachLabelsRequest";
|
||||
export * from "./DtoAttachServersRequest";
|
||||
export * from "./DtoAttachTaintsRequest";
|
||||
export * from "./DtoAuthStartResponse";
|
||||
export * from "./DtoCreateAnnotationRequest";
|
||||
export * from "./DtoCreateLabelRequest";
|
||||
export * from "./DtoCreateNodePoolRequest";
|
||||
export * from "./DtoCreateSSHRequest";
|
||||
export * from "./DtoCreateServerRequest";
|
||||
export * from "./DtoCreateTaintRequest";
|
||||
export * from "./DtoJWK";
|
||||
export * from "./DtoJWKS";
|
||||
export * from "./DtoJob";
|
||||
export * from "./DtoJobStatus";
|
||||
export * from "./DtoLabelResponse";
|
||||
export * from "./DtoLogoutRequest";
|
||||
export * from "./DtoNodePoolResponse";
|
||||
export * from "./DtoPageJob";
|
||||
export * from "./DtoQueueInfo";
|
||||
export * from "./DtoRefreshRequest";
|
||||
export * from "./DtoServerResponse";
|
||||
export * from "./DtoSshResponse";
|
||||
export * from "./DtoSshRevealResponse";
|
||||
export * from "./DtoTaintResponse";
|
||||
export * from "./DtoTokenPair";
|
||||
export * from "./DtoUpdateAnnotationRequest";
|
||||
export * from "./DtoUpdateLabelRequest";
|
||||
export * from "./DtoUpdateNodePoolRequest";
|
||||
export * from "./DtoUpdateServerRequest";
|
||||
export * from "./DtoUpdateTaintRequest";
|
||||
export * from "./HandlersCreateUserKeyRequest";
|
||||
export * from "./HandlersHealthStatus";
|
||||
export * from "./HandlersMeResponse";
|
||||
export * from "./HandlersMemberOut";
|
||||
export * from "./HandlersMemberUpsertReq";
|
||||
export * from "./HandlersOrgCreateReq";
|
||||
export * from "./HandlersOrgKeyCreateReq";
|
||||
export * from "./HandlersOrgKeyCreateResp";
|
||||
export * from "./HandlersOrgUpdateReq";
|
||||
export * from "./HandlersUpdateMeRequest";
|
||||
export * from "./HandlersUserAPIKeyOut";
|
||||
export * from "./ModelsAPIKey";
|
||||
export * from "./ModelsOrganization";
|
||||
export * from "./ModelsUser";
|
||||
export * from "./ModelsUserEmail";
|
||||
export * from "./UtilsErrorResponse";
|
||||
@@ -1,530 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export const BASE_PATH = "/api/v1".replace(/\/+$/, "");
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
basePath?: string; // override base path
|
||||
fetchApi?: FetchAPI; // override for fetch implementation
|
||||
middleware?: Middleware[]; // middleware to apply before/after fetch requests
|
||||
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
|
||||
username?: string; // parameter for basic security
|
||||
password?: string; // parameter for basic security
|
||||
apiKey?:
|
||||
| string
|
||||
| Promise<string>
|
||||
| ((name: string) => string | Promise<string>); // parameter for apiKey security
|
||||
accessToken?:
|
||||
| string
|
||||
| Promise<string>
|
||||
| ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
|
||||
headers?: HTTPHeaders; //header params we want to use on every request
|
||||
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
constructor(private configuration: ConfigurationParameters = {}) {}
|
||||
|
||||
set config(configuration: Configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
get basePath(): string {
|
||||
return this.configuration.basePath != null
|
||||
? this.configuration.basePath
|
||||
: BASE_PATH;
|
||||
}
|
||||
|
||||
get fetchApi(): FetchAPI | undefined {
|
||||
return this.configuration.fetchApi;
|
||||
}
|
||||
|
||||
get middleware(): Middleware[] {
|
||||
return this.configuration.middleware || [];
|
||||
}
|
||||
|
||||
get queryParamsStringify(): (params: HTTPQuery) => string {
|
||||
return this.configuration.queryParamsStringify || querystring;
|
||||
}
|
||||
|
||||
get username(): string | undefined {
|
||||
return this.configuration.username;
|
||||
}
|
||||
|
||||
get password(): string | undefined {
|
||||
return this.configuration.password;
|
||||
}
|
||||
|
||||
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
|
||||
const apiKey = this.configuration.apiKey;
|
||||
if (apiKey) {
|
||||
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get accessToken():
|
||||
| ((name?: string, scopes?: string[]) => string | Promise<string>)
|
||||
| undefined {
|
||||
const accessToken = this.configuration.accessToken;
|
||||
if (accessToken) {
|
||||
return typeof accessToken === "function"
|
||||
? accessToken
|
||||
: async () => accessToken;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get headers(): HTTPHeaders | undefined {
|
||||
return this.configuration.headers;
|
||||
}
|
||||
|
||||
get credentials(): RequestCredentials | undefined {
|
||||
return this.configuration.credentials;
|
||||
}
|
||||
}
|
||||
|
||||
export const DefaultConfig = new Configuration();
|
||||
|
||||
/**
|
||||
* This is the base class for all generated API classes.
|
||||
*/
|
||||
export class BaseAPI {
|
||||
private static readonly jsonRegex = new RegExp(
|
||||
"^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$",
|
||||
"i",
|
||||
);
|
||||
private middleware: Middleware[];
|
||||
|
||||
constructor(protected configuration = DefaultConfig) {
|
||||
this.middleware = configuration.middleware;
|
||||
}
|
||||
|
||||
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
|
||||
const next = this.clone<T>();
|
||||
next.middleware = next.middleware.concat(...middlewares);
|
||||
return next;
|
||||
}
|
||||
|
||||
withPreMiddleware<T extends BaseAPI>(
|
||||
this: T,
|
||||
...preMiddlewares: Array<Middleware["pre"]>
|
||||
) {
|
||||
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
||||
return this.withMiddleware<T>(...middlewares);
|
||||
}
|
||||
|
||||
withPostMiddleware<T extends BaseAPI>(
|
||||
this: T,
|
||||
...postMiddlewares: Array<Middleware["post"]>
|
||||
) {
|
||||
const middlewares = postMiddlewares.map((post) => ({ post }));
|
||||
return this.withMiddleware<T>(...middlewares);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
protected isJsonMime(mime: string | null | undefined): boolean {
|
||||
if (!mime) {
|
||||
return false;
|
||||
}
|
||||
return BaseAPI.jsonRegex.test(mime);
|
||||
}
|
||||
|
||||
protected async request(
|
||||
context: RequestOpts,
|
||||
initOverrides?: RequestInit | InitOverrideFunction,
|
||||
): Promise<Response> {
|
||||
const { url, init } = await this.createFetchParams(context, initOverrides);
|
||||
const response = await this.fetchApi(url, init);
|
||||
if (response && response.status >= 200 && response.status < 300) {
|
||||
return response;
|
||||
}
|
||||
throw new ResponseError(response, "Response returned an error code");
|
||||
}
|
||||
|
||||
private async createFetchParams(
|
||||
context: RequestOpts,
|
||||
initOverrides?: RequestInit | InitOverrideFunction,
|
||||
) {
|
||||
let url = this.configuration.basePath + context.path;
|
||||
if (
|
||||
context.query !== undefined &&
|
||||
Object.keys(context.query).length !== 0
|
||||
) {
|
||||
// only add the querystring to the URL if there are query parameters.
|
||||
// this is done to avoid urls ending with a "?" character which buggy webservers
|
||||
// do not handle correctly sometimes.
|
||||
url += "?" + this.configuration.queryParamsStringify(context.query);
|
||||
}
|
||||
|
||||
const headers = Object.assign(
|
||||
{},
|
||||
this.configuration.headers,
|
||||
context.headers,
|
||||
);
|
||||
Object.keys(headers).forEach((key) =>
|
||||
headers[key] === undefined ? delete headers[key] : {},
|
||||
);
|
||||
|
||||
const initOverrideFn =
|
||||
typeof initOverrides === "function"
|
||||
? initOverrides
|
||||
: async () => initOverrides;
|
||||
|
||||
const initParams = {
|
||||
method: context.method,
|
||||
headers,
|
||||
body: context.body,
|
||||
credentials: this.configuration.credentials,
|
||||
};
|
||||
|
||||
const overriddenInit: RequestInit = {
|
||||
...initParams,
|
||||
...(await initOverrideFn({
|
||||
init: initParams,
|
||||
context,
|
||||
})),
|
||||
};
|
||||
|
||||
let body: any;
|
||||
if (
|
||||
isFormData(overriddenInit.body) ||
|
||||
overriddenInit.body instanceof URLSearchParams ||
|
||||
isBlob(overriddenInit.body)
|
||||
) {
|
||||
body = overriddenInit.body;
|
||||
} else if (this.isJsonMime(headers["Content-Type"])) {
|
||||
body = JSON.stringify(overriddenInit.body);
|
||||
} else {
|
||||
body = overriddenInit.body;
|
||||
}
|
||||
|
||||
const init: RequestInit = {
|
||||
...overriddenInit,
|
||||
body,
|
||||
};
|
||||
|
||||
return { url, init };
|
||||
}
|
||||
|
||||
private fetchApi = async (url: string, init: RequestInit) => {
|
||||
let fetchParams = { url, init };
|
||||
for (const middleware of this.middleware) {
|
||||
if (middleware.pre) {
|
||||
fetchParams =
|
||||
(await middleware.pre({
|
||||
fetch: this.fetchApi,
|
||||
...fetchParams,
|
||||
})) || fetchParams;
|
||||
}
|
||||
}
|
||||
let response: Response | undefined = undefined;
|
||||
try {
|
||||
response = await (this.configuration.fetchApi || fetch)(
|
||||
fetchParams.url,
|
||||
fetchParams.init,
|
||||
);
|
||||
} catch (e) {
|
||||
for (const middleware of this.middleware) {
|
||||
if (middleware.onError) {
|
||||
response =
|
||||
(await middleware.onError({
|
||||
fetch: this.fetchApi,
|
||||
url: fetchParams.url,
|
||||
init: fetchParams.init,
|
||||
error: e,
|
||||
response: response ? response.clone() : undefined,
|
||||
})) || response;
|
||||
}
|
||||
}
|
||||
if (response === undefined) {
|
||||
if (e instanceof Error) {
|
||||
throw new FetchError(
|
||||
e,
|
||||
"The request failed and the interceptors did not return an alternative response",
|
||||
);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const middleware of this.middleware) {
|
||||
if (middleware.post) {
|
||||
response =
|
||||
(await middleware.post({
|
||||
fetch: this.fetchApi,
|
||||
url: fetchParams.url,
|
||||
init: fetchParams.init,
|
||||
response: response.clone(),
|
||||
})) || response;
|
||||
}
|
||||
}
|
||||
return response;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a shallow clone of `this` by constructing a new instance
|
||||
* and then shallow cloning data members.
|
||||
*/
|
||||
private clone<T extends BaseAPI>(this: T): T {
|
||||
const constructor = this.constructor as any;
|
||||
const next = new constructor(this.configuration);
|
||||
next.middleware = this.middleware.slice();
|
||||
return next;
|
||||
}
|
||||
}
|
||||
|
||||
function isBlob(value: any): value is Blob {
|
||||
return typeof Blob !== "undefined" && value instanceof Blob;
|
||||
}
|
||||
|
||||
function isFormData(value: any): value is FormData {
|
||||
return typeof FormData !== "undefined" && value instanceof FormData;
|
||||
}
|
||||
|
||||
export class ResponseError extends Error {
|
||||
override name: "ResponseError" = "ResponseError";
|
||||
constructor(
|
||||
public response: Response,
|
||||
msg?: string,
|
||||
) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
export class FetchError extends Error {
|
||||
override name: "FetchError" = "FetchError";
|
||||
constructor(
|
||||
public cause: Error,
|
||||
msg?: string,
|
||||
) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
export class RequiredError extends Error {
|
||||
override name: "RequiredError" = "RequiredError";
|
||||
constructor(
|
||||
public field: string,
|
||||
msg?: string,
|
||||
) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod =
|
||||
| "GET"
|
||||
| "POST"
|
||||
| "PUT"
|
||||
| "PATCH"
|
||||
| "DELETE"
|
||||
| "OPTIONS"
|
||||
| "HEAD";
|
||||
export type HTTPHeaders = { [key: string]: string };
|
||||
export type HTTPQuery = {
|
||||
[key: string]:
|
||||
| string
|
||||
| number
|
||||
| null
|
||||
| boolean
|
||||
| Array<string | number | null | boolean>
|
||||
| Set<string | number | null | boolean>
|
||||
| HTTPQuery;
|
||||
};
|
||||
export type HTTPBody = Json | FormData | URLSearchParams;
|
||||
export type HTTPRequestInit = {
|
||||
headers?: HTTPHeaders;
|
||||
method: HTTPMethod;
|
||||
credentials?: RequestCredentials;
|
||||
body?: HTTPBody;
|
||||
};
|
||||
export type ModelPropertyNaming =
|
||||
| "camelCase"
|
||||
| "snake_case"
|
||||
| "PascalCase"
|
||||
| "original";
|
||||
|
||||
export type InitOverrideFunction = (requestContext: {
|
||||
init: HTTPRequestInit;
|
||||
context: RequestOpts;
|
||||
}) => Promise<RequestInit>;
|
||||
|
||||
export interface FetchParams {
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
}
|
||||
|
||||
export interface RequestOpts {
|
||||
path: string;
|
||||
method: HTTPMethod;
|
||||
headers: HTTPHeaders;
|
||||
query?: HTTPQuery;
|
||||
body?: HTTPBody;
|
||||
}
|
||||
|
||||
export function querystring(params: HTTPQuery, prefix: string = ""): string {
|
||||
return Object.keys(params)
|
||||
.map((key) => querystringSingleKey(key, params[key], prefix))
|
||||
.filter((part) => part.length > 0)
|
||||
.join("&");
|
||||
}
|
||||
|
||||
function querystringSingleKey(
|
||||
key: string,
|
||||
value:
|
||||
| string
|
||||
| number
|
||||
| null
|
||||
| undefined
|
||||
| boolean
|
||||
| Array<string | number | null | boolean>
|
||||
| Set<string | number | null | boolean>
|
||||
| HTTPQuery,
|
||||
keyPrefix: string = "",
|
||||
): string {
|
||||
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
||||
if (value instanceof Array) {
|
||||
const multiValue = value
|
||||
.map((singleValue) => encodeURIComponent(String(singleValue)))
|
||||
.join(`&${encodeURIComponent(fullKey)}=`);
|
||||
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
||||
}
|
||||
if (value instanceof Set) {
|
||||
const valueAsArray = Array.from(value);
|
||||
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
||||
}
|
||||
if (value instanceof Date) {
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
||||
}
|
||||
if (value instanceof Object) {
|
||||
return querystring(value as HTTPQuery, fullKey);
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
const result: { [key: string]: any } = {};
|
||||
for (const key of Object.keys(data)) {
|
||||
result[key] = fn(data[key]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export function canConsumeForm(consumes: Consume[]): boolean {
|
||||
for (const consume of consumes) {
|
||||
if ("multipart/form-data" === consume.contentType) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export interface Consume {
|
||||
contentType: string;
|
||||
}
|
||||
|
||||
export interface RequestContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
}
|
||||
|
||||
export interface ResponseContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
response: Response;
|
||||
}
|
||||
|
||||
export interface ErrorContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
error: unknown;
|
||||
response?: Response;
|
||||
}
|
||||
|
||||
export interface Middleware {
|
||||
pre?(context: RequestContext): Promise<FetchParams | void>;
|
||||
post?(context: ResponseContext): Promise<Response | void>;
|
||||
onError?(context: ErrorContext): Promise<Response | void>;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
raw: Response;
|
||||
value(): Promise<T>;
|
||||
}
|
||||
|
||||
export interface ResponseTransformer<T> {
|
||||
(json: any): T;
|
||||
}
|
||||
|
||||
export class JSONApiResponse<T> {
|
||||
constructor(
|
||||
public raw: Response,
|
||||
private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue,
|
||||
) {}
|
||||
|
||||
async value(): Promise<T> {
|
||||
return this.transformer(await this.raw.json());
|
||||
}
|
||||
}
|
||||
|
||||
export class VoidApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<void> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export class BlobApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<Blob> {
|
||||
return await this.raw.blob();
|
||||
}
|
||||
}
|
||||
|
||||
export class TextApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<string> {
|
||||
return await this.raw.text();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user