mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
fis: updates to remove Terraform Provider reserved word collisions
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
432
sdk/ts/src/apis/AnnotationsApi.ts
Normal file
432
sdk/ts/src/apis/AnnotationsApi.ts
Normal file
@@ -0,0 +1,432 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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,
|
||||
DtoCreateAnnotationRequestToJSON,
|
||||
DtoUpdateAnnotationRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateAnnotationRequest {
|
||||
dtoCreateAnnotationRequest: 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;
|
||||
dtoUpdateAnnotationRequest: 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["dtoCreateAnnotationRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateAnnotationRequest",
|
||||
'Required parameter "dtoCreateAnnotationRequest" 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["dtoCreateAnnotationRequest"],
|
||||
),
|
||||
},
|
||||
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<void>> {
|
||||
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,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the annotation.
|
||||
* Delete annotation (org scoped)
|
||||
*/
|
||||
async deleteAnnotation(
|
||||
requestParameters: DeleteAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteAnnotationRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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["dtoUpdateAnnotationRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateAnnotationRequest",
|
||||
'Required parameter "dtoUpdateAnnotationRequest" 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["dtoUpdateAnnotationRequest"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
357
sdk/ts/src/apis/ArcherAdminApi.ts
Normal file
357
sdk/ts/src/apis/ArcherAdminApi.ts
Normal file
@@ -0,0 +1,357 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoEnqueueRequest, DtoJob, DtoPageJob, DtoQueueInfo,} from "../models/index";
|
||||
import {DtoEnqueueRequestToJSON, DtoJobFromJSON, DtoPageJobFromJSON, DtoQueueInfoFromJSON,} from "../models/index";
|
||||
|
||||
export interface AdminCancelArcherJobRequest {
|
||||
id: string;
|
||||
body?: object;
|
||||
}
|
||||
|
||||
export interface AdminEnqueueArcherJobRequest {
|
||||
dtoEnqueueRequest: DtoEnqueueRequest;
|
||||
}
|
||||
|
||||
export interface AdminListArcherJobsRequest {
|
||||
status?: AdminListArcherJobsStatusEnum;
|
||||
queue?: string;
|
||||
q?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface AdminRetryArcherJobRequest {
|
||||
id: string;
|
||||
body?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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 = {};
|
||||
|
||||
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/{id}/cancel`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
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),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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["dtoEnqueueRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoEnqueueRequest",
|
||||
'Required parameter "dtoEnqueueRequest" 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: DtoEnqueueRequestToJSON(requestParameters["dtoEnqueueRequest"]),
|
||||
},
|
||||
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 = {};
|
||||
|
||||
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/{id}/retry`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
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),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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];
|
||||
283
sdk/ts/src/apis/AuthApi.ts
Normal file
283
sdk/ts/src/apis/AuthApi.ts
Normal file
@@ -0,0 +1,283 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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,
|
||||
DtoJWKSFromJSON,
|
||||
DtoLogoutRequestToJSON,
|
||||
DtoRefreshRequestToJSON,
|
||||
DtoTokenPairFromJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface AuthCallbackRequest {
|
||||
provider: string;
|
||||
}
|
||||
|
||||
export interface AuthStartRequest {
|
||||
provider: string;
|
||||
}
|
||||
|
||||
export interface LogoutRequest {
|
||||
dtoLogoutRequest: DtoLogoutRequest;
|
||||
}
|
||||
|
||||
export interface RefreshRequest {
|
||||
dtoRefreshRequest: 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["dtoLogoutRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoLogoutRequest",
|
||||
'Required parameter "dtoLogoutRequest" 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["dtoLogoutRequest"]),
|
||||
},
|
||||
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["dtoRefreshRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoRefreshRequest",
|
||||
'Required parameter "dtoRefreshRequest" 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["dtoRefreshRequest"]),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
1652
sdk/ts/src/apis/ClustersApi.ts
Normal file
1652
sdk/ts/src/apis/ClustersApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
504
sdk/ts/src/apis/CredentialsApi.ts
Normal file
504
sdk/ts/src/apis/CredentialsApi.ts
Normal file
@@ -0,0 +1,504 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoCreateCredentialRequest, DtoCredentialOut, DtoUpdateCredentialRequest,} from "../models/index";
|
||||
import {
|
||||
DtoCreateCredentialRequestToJSON,
|
||||
DtoCredentialOutFromJSON,
|
||||
DtoUpdateCredentialRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateCredentialRequest {
|
||||
dtoCreateCredentialRequest: DtoCreateCredentialRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteCredentialRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetCredentialRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListCredentialsRequest {
|
||||
xOrgID?: string;
|
||||
credentialProvider?: string;
|
||||
kind?: string;
|
||||
scopeKind?: string;
|
||||
}
|
||||
|
||||
export interface RevealCredentialRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
body?: object;
|
||||
}
|
||||
|
||||
export interface UpdateCredentialRequest {
|
||||
id: string;
|
||||
dtoUpdateCredentialRequest: DtoUpdateCredentialRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class CredentialsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Create a credential (encrypts secret)
|
||||
*/
|
||||
async createCredentialRaw(
|
||||
requestParameters: CreateCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoCredentialOut>> {
|
||||
if (requestParameters["dtoCreateCredentialRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateCredentialRequest",
|
||||
'Required parameter "dtoCreateCredentialRequest" was null or undefined when calling createCredential().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/credentials`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateCredentialRequestToJSON(
|
||||
requestParameters["dtoCreateCredentialRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoCredentialOutFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a credential (encrypts secret)
|
||||
*/
|
||||
async createCredential(
|
||||
requestParameters: CreateCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoCredentialOut> {
|
||||
const response = await this.createCredentialRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete credential
|
||||
*/
|
||||
async deleteCredentialRaw(
|
||||
requestParameters: DeleteCredentialRequest,
|
||||
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 deleteCredential().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/credentials/{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 credential
|
||||
*/
|
||||
async deleteCredential(
|
||||
requestParameters: DeleteCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteCredentialRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get credential by ID (metadata only)
|
||||
*/
|
||||
async getCredentialRaw(
|
||||
requestParameters: GetCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoCredentialOut>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getCredential().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/credentials/{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) =>
|
||||
DtoCredentialOutFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get credential by ID (metadata only)
|
||||
*/
|
||||
async getCredential(
|
||||
requestParameters: GetCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoCredentialOut> {
|
||||
const response = await this.getCredentialRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns credential metadata for the current org. Secrets are never returned.
|
||||
* List credentials (metadata only)
|
||||
*/
|
||||
async listCredentialsRaw(
|
||||
requestParameters: ListCredentialsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoCredentialOut>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["credentialProvider"] != null) {
|
||||
queryParameters["credential_provider"] =
|
||||
requestParameters["credentialProvider"];
|
||||
}
|
||||
|
||||
if (requestParameters["kind"] != null) {
|
||||
queryParameters["kind"] = requestParameters["kind"];
|
||||
}
|
||||
|
||||
if (requestParameters["scopeKind"] != null) {
|
||||
queryParameters["scope_kind"] = requestParameters["scopeKind"];
|
||||
}
|
||||
|
||||
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 = `/credentials`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoCredentialOutFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns credential metadata for the current org. Secrets are never returned.
|
||||
* List credentials (metadata only)
|
||||
*/
|
||||
async listCredentials(
|
||||
requestParameters: ListCredentialsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoCredentialOut>> {
|
||||
const response = await this.listCredentialsRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reveal decrypted secret (one-time read)
|
||||
*/
|
||||
async revealCredentialRaw(
|
||||
requestParameters: RevealCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<{ [key: string]: any }>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling revealCredential().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/credentials/{id}/reveal`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters["body"] as any,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reveal decrypted secret (one-time read)
|
||||
*/
|
||||
async revealCredential(
|
||||
requestParameters: RevealCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<{ [key: string]: any }> {
|
||||
const response = await this.revealCredentialRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update credential metadata and/or rotate secret
|
||||
*/
|
||||
async updateCredentialRaw(
|
||||
requestParameters: UpdateCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoCredentialOut>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateCredential().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["dtoUpdateCredentialRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateCredentialRequest",
|
||||
'Required parameter "dtoUpdateCredentialRequest" was null or undefined when calling updateCredential().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/credentials/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateCredentialRequestToJSON(
|
||||
requestParameters["dtoUpdateCredentialRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoCredentialOutFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update credential metadata and/or rotate secret
|
||||
*/
|
||||
async updateCredential(
|
||||
requestParameters: UpdateCredentialRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoCredentialOut> {
|
||||
const response = await this.updateCredentialRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
778
sdk/ts/src/apis/DNSApi.ts
Normal file
778
sdk/ts/src/apis/DNSApi.ts
Normal file
@@ -0,0 +1,778 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {
|
||||
DtoCreateDomainRequest,
|
||||
DtoCreateRecordSetRequest,
|
||||
DtoDomainResponse,
|
||||
DtoRecordSetResponse,
|
||||
DtoUpdateDomainRequest,
|
||||
DtoUpdateRecordSetRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateDomainRequestToJSON,
|
||||
DtoCreateRecordSetRequestToJSON,
|
||||
DtoDomainResponseFromJSON,
|
||||
DtoRecordSetResponseFromJSON,
|
||||
DtoUpdateDomainRequestToJSON,
|
||||
DtoUpdateRecordSetRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateDomainRequest {
|
||||
dtoCreateDomainRequest: DtoCreateDomainRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface CreateRecordSetRequest {
|
||||
domainId: string;
|
||||
dtoCreateRecordSetRequest: DtoCreateRecordSetRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteDomainRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteRecordSetRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetDomainRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListDomainsRequest {
|
||||
xOrgID?: string;
|
||||
domainName?: string;
|
||||
status?: string;
|
||||
q?: string;
|
||||
}
|
||||
|
||||
export interface ListRecordSetsRequest {
|
||||
domainId: string;
|
||||
xOrgID?: string;
|
||||
name?: string;
|
||||
type?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface UpdateDomainRequest {
|
||||
id: string;
|
||||
dtoUpdateDomainRequest: DtoUpdateDomainRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface UpdateRecordSetRequest {
|
||||
id: string;
|
||||
dtoUpdateRecordSetRequest: DtoUpdateRecordSetRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class DNSApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Creates a domain bound to a Route 53 scoped credential. Archer will backfill ZoneID if omitted.
|
||||
* Create a domain (org scoped)
|
||||
*/
|
||||
async createDomainRaw(
|
||||
requestParameters: CreateDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoDomainResponse>> {
|
||||
if (requestParameters["dtoCreateDomainRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateDomainRequest",
|
||||
'Required parameter "dtoCreateDomainRequest" was null or undefined when calling createDomain().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/domains`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateDomainRequestToJSON(
|
||||
requestParameters["dtoCreateDomainRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoDomainResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a domain bound to a Route 53 scoped credential. Archer will backfill ZoneID if omitted.
|
||||
* Create a domain (org scoped)
|
||||
*/
|
||||
async createDomain(
|
||||
requestParameters: CreateDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoDomainResponse> {
|
||||
const response = await this.createDomainRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a record set (pending; Archer will UPSERT to Route 53)
|
||||
*/
|
||||
async createRecordSetRaw(
|
||||
requestParameters: CreateRecordSetRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoRecordSetResponse>> {
|
||||
if (requestParameters["domainId"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"domainId",
|
||||
'Required parameter "domainId" was null or undefined when calling createRecordSet().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["dtoCreateRecordSetRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateRecordSetRequest",
|
||||
'Required parameter "dtoCreateRecordSetRequest" was null or undefined when calling createRecordSet().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/domains/{domain_id}/records`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"domain_id"}}`,
|
||||
encodeURIComponent(String(requestParameters["domainId"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateRecordSetRequestToJSON(
|
||||
requestParameters["dtoCreateRecordSetRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoRecordSetResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a record set (pending; Archer will UPSERT to Route 53)
|
||||
*/
|
||||
async createRecordSet(
|
||||
requestParameters: CreateRecordSetRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoRecordSetResponse> {
|
||||
const response = await this.createRecordSetRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a domain
|
||||
*/
|
||||
async deleteDomainRaw(
|
||||
requestParameters: DeleteDomainRequest,
|
||||
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 deleteDomain().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/domains/{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 domain
|
||||
*/
|
||||
async deleteDomain(
|
||||
requestParameters: DeleteDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteDomainRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a record set (API removes row; worker can optionally handle external deletion policy)
|
||||
*/
|
||||
async deleteRecordSetRaw(
|
||||
requestParameters: DeleteRecordSetRequest,
|
||||
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 deleteRecordSet().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/records/{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 record set (API removes row; worker can optionally handle external deletion policy)
|
||||
*/
|
||||
async deleteRecordSet(
|
||||
requestParameters: DeleteRecordSetRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteRecordSetRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a domain (org scoped)
|
||||
*/
|
||||
async getDomainRaw(
|
||||
requestParameters: GetDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoDomainResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getDomain().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/domains/{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) =>
|
||||
DtoDomainResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a domain (org scoped)
|
||||
*/
|
||||
async getDomain(
|
||||
requestParameters: GetDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoDomainResponse> {
|
||||
const response = await this.getDomainRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns domains for X-Org-ID. Filters: `domain_name`, `status`, `q` (contains).
|
||||
* List domains (org scoped)
|
||||
*/
|
||||
async listDomainsRaw(
|
||||
requestParameters: ListDomainsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoDomainResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["domainName"] != null) {
|
||||
queryParameters["domain_name"] = requestParameters["domainName"];
|
||||
}
|
||||
|
||||
if (requestParameters["status"] != null) {
|
||||
queryParameters["status"] = requestParameters["status"];
|
||||
}
|
||||
|
||||
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 = `/dns/domains`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoDomainResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns domains for X-Org-ID. Filters: `domain_name`, `status`, `q` (contains).
|
||||
* List domains (org scoped)
|
||||
*/
|
||||
async listDomains(
|
||||
requestParameters: ListDomainsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoDomainResponse>> {
|
||||
const response = await this.listDomainsRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters: `name`, `type`, `status`.
|
||||
* List record sets for a domain
|
||||
*/
|
||||
async listRecordSetsRaw(
|
||||
requestParameters: ListRecordSetsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoRecordSetResponse>>> {
|
||||
if (requestParameters["domainId"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"domainId",
|
||||
'Required parameter "domainId" was null or undefined when calling listRecordSets().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["name"] != null) {
|
||||
queryParameters["name"] = requestParameters["name"];
|
||||
}
|
||||
|
||||
if (requestParameters["type"] != null) {
|
||||
queryParameters["type"] = requestParameters["type"];
|
||||
}
|
||||
|
||||
if (requestParameters["status"] != null) {
|
||||
queryParameters["status"] = requestParameters["status"];
|
||||
}
|
||||
|
||||
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 = `/dns/domains/{domain_id}/records`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"domain_id"}}`,
|
||||
encodeURIComponent(String(requestParameters["domainId"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoRecordSetResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters: `name`, `type`, `status`.
|
||||
* List record sets for a domain
|
||||
*/
|
||||
async listRecordSets(
|
||||
requestParameters: ListRecordSetsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoRecordSetResponse>> {
|
||||
const response = await this.listRecordSetsRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a domain (org scoped)
|
||||
*/
|
||||
async updateDomainRaw(
|
||||
requestParameters: UpdateDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoDomainResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateDomain().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["dtoUpdateDomainRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateDomainRequest",
|
||||
'Required parameter "dtoUpdateDomainRequest" was null or undefined when calling updateDomain().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/domains/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateDomainRequestToJSON(
|
||||
requestParameters["dtoUpdateDomainRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoDomainResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a domain (org scoped)
|
||||
*/
|
||||
async updateDomain(
|
||||
requestParameters: UpdateDomainRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoDomainResponse> {
|
||||
const response = await this.updateDomainRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a record set (flips to pending for reconciliation)
|
||||
*/
|
||||
async updateRecordSetRaw(
|
||||
requestParameters: UpdateRecordSetRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoRecordSetResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateRecordSet().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["dtoUpdateRecordSetRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateRecordSetRequest",
|
||||
'Required parameter "dtoUpdateRecordSetRequest" was null or undefined when calling updateRecordSet().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/dns/records/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateRecordSetRequestToJSON(
|
||||
requestParameters["dtoUpdateRecordSetRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoRecordSetResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a record set (flips to pending for reconciliation)
|
||||
*/
|
||||
async updateRecordSet(
|
||||
requestParameters: UpdateRecordSetRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoRecordSetResponse> {
|
||||
const response = await this.updateRecordSetRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
61
sdk/ts/src/apis/HealthApi.ts
Normal file
61
sdk/ts/src/apis/HealthApi.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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,} 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();
|
||||
}
|
||||
}
|
||||
422
sdk/ts/src/apis/LabelsApi.ts
Normal file
422
sdk/ts/src/apis/LabelsApi.ts
Normal file
@@ -0,0 +1,422 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoCreateLabelRequestToJSON, DtoLabelResponseFromJSON, DtoUpdateLabelRequestToJSON,} from "../models/index";
|
||||
|
||||
export interface CreateLabelRequest {
|
||||
dtoCreateLabelRequest: 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;
|
||||
dtoUpdateLabelRequest: 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["dtoCreateLabelRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateLabelRequest",
|
||||
'Required parameter "dtoCreateLabelRequest" 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["dtoCreateLabelRequest"],
|
||||
),
|
||||
},
|
||||
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<void>> {
|
||||
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,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the label.
|
||||
* Delete label (org scoped)
|
||||
*/
|
||||
async deleteLabel(
|
||||
requestParameters: DeleteLabelRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteLabelRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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["dtoUpdateLabelRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateLabelRequest",
|
||||
'Required parameter "dtoUpdateLabelRequest" 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["dtoUpdateLabelRequest"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
415
sdk/ts/src/apis/LoadBalancersApi.ts
Normal file
415
sdk/ts/src/apis/LoadBalancersApi.ts
Normal file
@@ -0,0 +1,415 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {
|
||||
DtoCreateLoadBalancerRequest,
|
||||
DtoLoadBalancerResponse,
|
||||
DtoUpdateLoadBalancerRequest,
|
||||
} from "../models/index";
|
||||
import {
|
||||
DtoCreateLoadBalancerRequestToJSON,
|
||||
DtoLoadBalancerResponseFromJSON,
|
||||
DtoUpdateLoadBalancerRequestToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface CreateLoadBalancerRequest {
|
||||
dtoCreateLoadBalancerRequest: DtoCreateLoadBalancerRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteLoadBalancerRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetLoadBalancersRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface ListLoadBalancersRequest {
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface UpdateLoadBalancerRequest {
|
||||
id: string;
|
||||
dtoUpdateLoadBalancerRequest: DtoUpdateLoadBalancerRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class LoadBalancersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Create a load balancer
|
||||
*/
|
||||
async createLoadBalancerRaw(
|
||||
requestParameters: CreateLoadBalancerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoLoadBalancerResponse>> {
|
||||
if (requestParameters["dtoCreateLoadBalancerRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateLoadBalancerRequest",
|
||||
'Required parameter "dtoCreateLoadBalancerRequest" was null or undefined when calling createLoadBalancer().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/load-balancers`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateLoadBalancerRequestToJSON(
|
||||
requestParameters["dtoCreateLoadBalancerRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoLoadBalancerResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a load balancer
|
||||
*/
|
||||
async createLoadBalancer(
|
||||
requestParameters: CreateLoadBalancerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoLoadBalancerResponse> {
|
||||
const response = await this.createLoadBalancerRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a load balancer
|
||||
*/
|
||||
async deleteLoadBalancerRaw(
|
||||
requestParameters: DeleteLoadBalancerRequest,
|
||||
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 deleteLoadBalancer().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/load-balancers/{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 load balancer
|
||||
*/
|
||||
async deleteLoadBalancer(
|
||||
requestParameters: DeleteLoadBalancerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteLoadBalancerRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns load balancer for the organization in X-Org-ID.
|
||||
* Get a load balancer (org scoped)
|
||||
*/
|
||||
async getLoadBalancersRaw(
|
||||
requestParameters: GetLoadBalancersRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoLoadBalancerResponse>>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getLoadBalancers().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/load-balancers/{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) =>
|
||||
jsonValue.map(DtoLoadBalancerResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns load balancer for the organization in X-Org-ID.
|
||||
* Get a load balancer (org scoped)
|
||||
*/
|
||||
async getLoadBalancers(
|
||||
requestParameters: GetLoadBalancersRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoLoadBalancerResponse>> {
|
||||
const response = await this.getLoadBalancersRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns load balancers for the organization in X-Org-ID.
|
||||
* List load balancers (org scoped)
|
||||
*/
|
||||
async listLoadBalancersRaw(
|
||||
requestParameters: ListLoadBalancersRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoLoadBalancerResponse>>> {
|
||||
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 = `/load-balancers`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoLoadBalancerResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns load balancers for the organization in X-Org-ID.
|
||||
* List load balancers (org scoped)
|
||||
*/
|
||||
async listLoadBalancers(
|
||||
requestParameters: ListLoadBalancersRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoLoadBalancerResponse>> {
|
||||
const response = await this.listLoadBalancersRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a load balancer (org scoped)
|
||||
*/
|
||||
async updateLoadBalancerRaw(
|
||||
requestParameters: UpdateLoadBalancerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoLoadBalancerResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling updateLoadBalancer().',
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters["dtoUpdateLoadBalancerRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateLoadBalancerRequest",
|
||||
'Required parameter "dtoUpdateLoadBalancerRequest" was null or undefined when calling updateLoadBalancer().',
|
||||
);
|
||||
}
|
||||
|
||||
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 = `/load-balancers/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "PATCH",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateLoadBalancerRequestToJSON(
|
||||
requestParameters["dtoUpdateLoadBalancerRequest"],
|
||||
),
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoLoadBalancerResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a load balancer (org scoped)
|
||||
*/
|
||||
async updateLoadBalancer(
|
||||
requestParameters: UpdateLoadBalancerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoLoadBalancerResponse> {
|
||||
const response = await this.updateLoadBalancerRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
195
sdk/ts/src/apis/MeAPIKeysApi.ts
Normal file
195
sdk/ts/src/apis/MeAPIKeysApi.ts
Normal file
@@ -0,0 +1,195 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {HandlersCreateUserKeyRequestToJSON, HandlersUserAPIKeyOutFromJSON,} from "../models/index";
|
||||
|
||||
export interface CreateUserAPIKeyRequest {
|
||||
handlersCreateUserKeyRequest: 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["handlersCreateUserKeyRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"handlersCreateUserKeyRequest",
|
||||
'Required parameter "handlersCreateUserKeyRequest" 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["handlersCreateUserKeyRequest"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
134
sdk/ts/src/apis/MeApi.ts
Normal file
134
sdk/ts/src/apis/MeApi.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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, HandlersUpdateMeRequestToJSON, ModelsUserFromJSON,} from "../models/index";
|
||||
|
||||
export interface UpdateMeRequest {
|
||||
handlersUpdateMeRequest: 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["handlersUpdateMeRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"handlersUpdateMeRequest",
|
||||
'Required parameter "handlersUpdateMeRequest" 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["handlersUpdateMeRequest"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
61
sdk/ts/src/apis/MetaApi.ts
Normal file
61
sdk/ts/src/apis/MetaApi.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {HandlersVersionResponse} from "../models/index";
|
||||
import {HandlersVersionResponseFromJSON,} from "../models/index";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class MetaApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Returns build/runtime metadata for the running service.
|
||||
* Service version information
|
||||
*/
|
||||
async versionOperationIdRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersVersionResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
let urlPath = `/version`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersVersionResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns build/runtime metadata for the running service.
|
||||
* Service version information
|
||||
*/
|
||||
async versionOperationId(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersVersionResponse> {
|
||||
const response = await this.versionOperationIdRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
1482
sdk/ts/src/apis/NodePoolsApi.ts
Normal file
1482
sdk/ts/src/apis/NodePoolsApi.ts
Normal file
File diff suppressed because it is too large
Load Diff
739
sdk/ts/src/apis/OrgsApi.ts
Normal file
739
sdk/ts/src/apis/OrgsApi.ts
Normal file
@@ -0,0 +1,739 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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,
|
||||
} from "../models/index";
|
||||
import {
|
||||
HandlersMemberOutFromJSON,
|
||||
HandlersMemberUpsertReqToJSON,
|
||||
HandlersOrgCreateReqToJSON,
|
||||
HandlersOrgKeyCreateReqToJSON,
|
||||
HandlersOrgKeyCreateRespFromJSON,
|
||||
HandlersOrgUpdateReqToJSON,
|
||||
ModelsAPIKeyFromJSON,
|
||||
ModelsOrganizationFromJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface AddOrUpdateMemberRequest {
|
||||
id: string;
|
||||
handlersMemberUpsertReq: HandlersMemberUpsertReq;
|
||||
}
|
||||
|
||||
export interface CreateOrgRequest {
|
||||
handlersOrgCreateReq: HandlersOrgCreateReq;
|
||||
}
|
||||
|
||||
export interface CreateOrgKeyRequest {
|
||||
id: string;
|
||||
handlersOrgKeyCreateReq: 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;
|
||||
handlersOrgUpdateReq: 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["handlersMemberUpsertReq"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"handlersMemberUpsertReq",
|
||||
'Required parameter "handlersMemberUpsertReq" 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["handlersMemberUpsertReq"],
|
||||
),
|
||||
},
|
||||
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["handlersOrgCreateReq"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"handlersOrgCreateReq",
|
||||
'Required parameter "handlersOrgCreateReq" 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["handlersOrgCreateReq"],
|
||||
),
|
||||
},
|
||||
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["handlersOrgKeyCreateReq"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"handlersOrgKeyCreateReq",
|
||||
'Required parameter "handlersOrgKeyCreateReq" 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["handlersOrgKeyCreateReq"],
|
||||
),
|
||||
},
|
||||
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["handlersOrgUpdateReq"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"handlersOrgUpdateReq",
|
||||
'Required parameter "handlersOrgUpdateReq" 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["handlersOrgUpdateReq"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
503
sdk/ts/src/apis/ServersApi.ts
Normal file
503
sdk/ts/src/apis/ServersApi.ts
Normal file
@@ -0,0 +1,503 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoCreateServerRequestToJSON, DtoServerResponseFromJSON, DtoUpdateServerRequestToJSON,} from "../models/index";
|
||||
|
||||
export interface CreateServerRequest {
|
||||
dtoCreateServerRequest: 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 ResetServerHostKeyRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
body?: object;
|
||||
}
|
||||
|
||||
export interface UpdateServerRequest {
|
||||
id: string;
|
||||
dtoUpdateServerRequest: 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["dtoCreateServerRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateServerRequest",
|
||||
'Required parameter "dtoCreateServerRequest" 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["dtoCreateServerRequest"],
|
||||
),
|
||||
},
|
||||
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<void>> {
|
||||
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,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the server.
|
||||
* Delete server (org scoped)
|
||||
*/
|
||||
async deleteServer(
|
||||
requestParameters: DeleteServerRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteServerRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the stored SSH host key for this server. The next SSH connection will re-learn the host key (trust-on-first-use).
|
||||
* Reset SSH host key (org scoped)
|
||||
*/
|
||||
async resetServerHostKeyRaw(
|
||||
requestParameters: ResetServerHostKeyRequest,
|
||||
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 resetServerHostKey().',
|
||||
);
|
||||
}
|
||||
|
||||
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}/reset-hostkey`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
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) =>
|
||||
DtoServerResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the stored SSH host key for this server. The next SSH connection will re-learn the host key (trust-on-first-use).
|
||||
* Reset SSH host key (org scoped)
|
||||
*/
|
||||
async resetServerHostKey(
|
||||
requestParameters: ResetServerHostKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoServerResponse> {
|
||||
const response = await this.resetServerHostKeyRaw(
|
||||
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["dtoUpdateServerRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateServerRequest",
|
||||
'Required parameter "dtoUpdateServerRequest" 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["dtoUpdateServerRequest"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
434
sdk/ts/src/apis/SshApi.ts
Normal file
434
sdk/ts/src/apis/SshApi.ts
Normal file
@@ -0,0 +1,434 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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, GetSSHKey200Response,} from "../models/index";
|
||||
import {DtoCreateSSHRequestToJSON, DtoSshResponseFromJSON, GetSSHKey200ResponseFromJSON,} from "../models/index";
|
||||
|
||||
export interface CreateSSHKeyRequest {
|
||||
dtoCreateSSHRequest: 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["dtoCreateSSHRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateSSHRequest",
|
||||
'Required parameter "dtoCreateSSHRequest" 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["dtoCreateSSHRequest"],
|
||||
),
|
||||
},
|
||||
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<void>> {
|
||||
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,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes a keypair.
|
||||
* Delete ssh keypair (org scoped)
|
||||
*/
|
||||
async deleteSSHKey(
|
||||
requestParameters: DeleteSSHKeyRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteSSHKeyRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<GetSSHKey200Response>> {
|
||||
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) =>
|
||||
GetSSHKey200ResponseFromJSON(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<GetSSHKey200Response> {
|
||||
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];
|
||||
420
sdk/ts/src/apis/TaintsApi.ts
Normal file
420
sdk/ts/src/apis/TaintsApi.ts
Normal file
@@ -0,0 +1,420 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoCreateTaintRequestToJSON, DtoTaintResponseFromJSON, DtoUpdateTaintRequestToJSON,} from "../models/index";
|
||||
|
||||
export interface CreateTaintRequest {
|
||||
dtoCreateTaintRequest: 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;
|
||||
dtoUpdateTaintRequest: 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["dtoCreateTaintRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoCreateTaintRequest",
|
||||
'Required parameter "dtoCreateTaintRequest" 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["dtoCreateTaintRequest"],
|
||||
),
|
||||
},
|
||||
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<void>> {
|
||||
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,
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the taint.
|
||||
* Delete taint (org scoped)
|
||||
*/
|
||||
async deleteTaint(
|
||||
requestParameters: DeleteTaintRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<void> {
|
||||
await this.deleteTaintRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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["dtoUpdateTaintRequest"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"dtoUpdateTaintRequest",
|
||||
'Required parameter "dtoUpdateTaintRequest" 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["dtoUpdateTaintRequest"],
|
||||
),
|
||||
},
|
||||
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();
|
||||
}
|
||||
}
|
||||
19
sdk/ts/src/apis/index.ts
Normal file
19
sdk/ts/src/apis/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from "./AnnotationsApi";
|
||||
export * from "./ArcherAdminApi";
|
||||
export * from "./AuthApi";
|
||||
export * from "./ClustersApi";
|
||||
export * from "./CredentialsApi";
|
||||
export * from "./DNSApi";
|
||||
export * from "./HealthApi";
|
||||
export * from "./LabelsApi";
|
||||
export * from "./LoadBalancersApi";
|
||||
export * from "./MeApi";
|
||||
export * from "./MeAPIKeysApi";
|
||||
export * from "./MetaApi";
|
||||
export * from "./NodePoolsApi";
|
||||
export * from "./OrgsApi";
|
||||
export * from "./ServersApi";
|
||||
export * from "./SshApi";
|
||||
export * from "./TaintsApi";
|
||||
5
sdk/ts/src/index.ts
Normal file
5
sdk/ts/src/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from "./runtime";
|
||||
export * from "./apis/index";
|
||||
export * from "./models/index";
|
||||
112
sdk/ts/src/models/DtoAnnotationResponse.ts
Normal file
112
sdk/ts/src/models/DtoAnnotationResponse.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
74
sdk/ts/src/models/DtoAttachAnnotationsRequest.ts
Normal file
74
sdk/ts/src/models/DtoAttachAnnotationsRequest.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
73
sdk/ts/src/models/DtoAttachBastionRequest.ts
Normal file
73
sdk/ts/src/models/DtoAttachBastionRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoAttachBastionRequest
|
||||
*/
|
||||
export interface DtoAttachBastionRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAttachBastionRequest
|
||||
*/
|
||||
server_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachBastionRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachBastionRequest(
|
||||
value: object,
|
||||
): value is DtoAttachBastionRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachBastionRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachBastionRequest {
|
||||
return DtoAttachBastionRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachBastionRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachBastionRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
server_id: json["server_id"] == null ? undefined : json["server_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachBastionRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachBastionRequest {
|
||||
return DtoAttachBastionRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachBastionRequestToJSONTyped(
|
||||
value?: DtoAttachBastionRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
server_id: value["server_id"],
|
||||
};
|
||||
}
|
||||
73
sdk/ts/src/models/DtoAttachCaptainDomainRequest.ts
Normal file
73
sdk/ts/src/models/DtoAttachCaptainDomainRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoAttachCaptainDomainRequest
|
||||
*/
|
||||
export interface DtoAttachCaptainDomainRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAttachCaptainDomainRequest
|
||||
*/
|
||||
domain_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachCaptainDomainRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachCaptainDomainRequest(
|
||||
value: object,
|
||||
): value is DtoAttachCaptainDomainRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachCaptainDomainRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachCaptainDomainRequest {
|
||||
return DtoAttachCaptainDomainRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachCaptainDomainRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachCaptainDomainRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
domain_id: json["domain_id"] == null ? undefined : json["domain_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachCaptainDomainRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachCaptainDomainRequest {
|
||||
return DtoAttachCaptainDomainRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachCaptainDomainRequestToJSONTyped(
|
||||
value?: DtoAttachCaptainDomainRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
domain_id: value["domain_id"],
|
||||
};
|
||||
}
|
||||
73
sdk/ts/src/models/DtoAttachLabelsRequest.ts
Normal file
73
sdk/ts/src/models/DtoAttachLabelsRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
74
sdk/ts/src/models/DtoAttachLoadBalancerRequest.ts
Normal file
74
sdk/ts/src/models/DtoAttachLoadBalancerRequest.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoAttachLoadBalancerRequest
|
||||
*/
|
||||
export interface DtoAttachLoadBalancerRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAttachLoadBalancerRequest
|
||||
*/
|
||||
load_balancer_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachLoadBalancerRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachLoadBalancerRequest(
|
||||
value: object,
|
||||
): value is DtoAttachLoadBalancerRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachLoadBalancerRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachLoadBalancerRequest {
|
||||
return DtoAttachLoadBalancerRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachLoadBalancerRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachLoadBalancerRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
load_balancer_id:
|
||||
json["load_balancer_id"] == null ? undefined : json["load_balancer_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachLoadBalancerRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachLoadBalancerRequest {
|
||||
return DtoAttachLoadBalancerRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachLoadBalancerRequestToJSONTyped(
|
||||
value?: DtoAttachLoadBalancerRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
load_balancer_id: value["load_balancer_id"],
|
||||
};
|
||||
}
|
||||
74
sdk/ts/src/models/DtoAttachNodePoolRequest.ts
Normal file
74
sdk/ts/src/models/DtoAttachNodePoolRequest.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoAttachNodePoolRequest
|
||||
*/
|
||||
export interface DtoAttachNodePoolRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAttachNodePoolRequest
|
||||
*/
|
||||
node_pool_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachNodePoolRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachNodePoolRequest(
|
||||
value: object,
|
||||
): value is DtoAttachNodePoolRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachNodePoolRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachNodePoolRequest {
|
||||
return DtoAttachNodePoolRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachNodePoolRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachNodePoolRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
node_pool_id:
|
||||
json["node_pool_id"] == null ? undefined : json["node_pool_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachNodePoolRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachNodePoolRequest {
|
||||
return DtoAttachNodePoolRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachNodePoolRequestToJSONTyped(
|
||||
value?: DtoAttachNodePoolRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
node_pool_id: value["node_pool_id"],
|
||||
};
|
||||
}
|
||||
74
sdk/ts/src/models/DtoAttachRecordSetRequest.ts
Normal file
74
sdk/ts/src/models/DtoAttachRecordSetRequest.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoAttachRecordSetRequest
|
||||
*/
|
||||
export interface DtoAttachRecordSetRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAttachRecordSetRequest
|
||||
*/
|
||||
record_set_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAttachRecordSetRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoAttachRecordSetRequest(
|
||||
value: object,
|
||||
): value is DtoAttachRecordSetRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAttachRecordSetRequestFromJSON(
|
||||
json: any,
|
||||
): DtoAttachRecordSetRequest {
|
||||
return DtoAttachRecordSetRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachRecordSetRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAttachRecordSetRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
record_set_id:
|
||||
json["record_set_id"] == null ? undefined : json["record_set_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAttachRecordSetRequestToJSON(
|
||||
json: any,
|
||||
): DtoAttachRecordSetRequest {
|
||||
return DtoAttachRecordSetRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAttachRecordSetRequestToJSONTyped(
|
||||
value?: DtoAttachRecordSetRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
record_set_id: value["record_set_id"],
|
||||
};
|
||||
}
|
||||
73
sdk/ts/src/models/DtoAttachServersRequest.ts
Normal file
73
sdk/ts/src/models/DtoAttachServersRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
73
sdk/ts/src/models/DtoAttachTaintsRequest.ts
Normal file
73
sdk/ts/src/models/DtoAttachTaintsRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
69
sdk/ts/src/models/DtoAuthStartResponse.ts
Normal file
69
sdk/ts/src/models/DtoAuthStartResponse.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
241
sdk/ts/src/models/DtoClusterResponse.ts
Normal file
241
sdk/ts/src/models/DtoClusterResponse.ts
Normal file
@@ -0,0 +1,241 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoDomainResponse} from "./DtoDomainResponse";
|
||||
import {DtoDomainResponseFromJSON, DtoDomainResponseToJSON,} from "./DtoDomainResponse";
|
||||
import type {DtoLoadBalancerResponse} from "./DtoLoadBalancerResponse";
|
||||
import {DtoLoadBalancerResponseFromJSON, DtoLoadBalancerResponseToJSON,} from "./DtoLoadBalancerResponse";
|
||||
import type {DtoNodePoolResponse} from "./DtoNodePoolResponse";
|
||||
import {DtoNodePoolResponseFromJSON, DtoNodePoolResponseToJSON,} from "./DtoNodePoolResponse";
|
||||
import type {DtoServerResponse} from "./DtoServerResponse";
|
||||
import {DtoServerResponseFromJSON, DtoServerResponseToJSON,} from "./DtoServerResponse";
|
||||
import type {DtoRecordSetResponse} from "./DtoRecordSetResponse";
|
||||
import {DtoRecordSetResponseFromJSON, DtoRecordSetResponseToJSON,} from "./DtoRecordSetResponse";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoClusterResponse
|
||||
*/
|
||||
export interface DtoClusterResponse {
|
||||
/**
|
||||
*
|
||||
* @type {DtoLoadBalancerResponse}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
apps_load_balancer?: DtoLoadBalancerResponse;
|
||||
/**
|
||||
*
|
||||
* @type {DtoServerResponse}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
bastion_server?: DtoServerResponse;
|
||||
/**
|
||||
*
|
||||
* @type {DtoDomainResponse}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
captain_domain?: DtoDomainResponse;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
certificate_key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
cluster_provider?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
control_plane_fqdn?: string;
|
||||
/**
|
||||
*
|
||||
* @type {DtoRecordSetResponse}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
control_plane_record_set?: DtoRecordSetResponse;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {DtoLoadBalancerResponse}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
glueops_load_balancer?: DtoLoadBalancerResponse;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
last_error?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoNodePoolResponse>}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
node_pools?: Array<DtoNodePoolResponse>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
random_token?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoClusterResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoClusterResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoClusterResponse(
|
||||
value: object,
|
||||
): value is DtoClusterResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoClusterResponseFromJSON(json: any): DtoClusterResponse {
|
||||
return DtoClusterResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoClusterResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoClusterResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
apps_load_balancer:
|
||||
json["apps_load_balancer"] == null
|
||||
? undefined
|
||||
: DtoLoadBalancerResponseFromJSON(json["apps_load_balancer"]),
|
||||
bastion_server:
|
||||
json["bastion_server"] == null
|
||||
? undefined
|
||||
: DtoServerResponseFromJSON(json["bastion_server"]),
|
||||
captain_domain:
|
||||
json["captain_domain"] == null
|
||||
? undefined
|
||||
: DtoDomainResponseFromJSON(json["captain_domain"]),
|
||||
certificate_key:
|
||||
json["certificate_key"] == null ? undefined : json["certificate_key"],
|
||||
cluster_provider:
|
||||
json["cluster_provider"] == null ? undefined : json["cluster_provider"],
|
||||
control_plane_fqdn:
|
||||
json["control_plane_fqdn"] == null
|
||||
? undefined
|
||||
: json["control_plane_fqdn"],
|
||||
control_plane_record_set:
|
||||
json["control_plane_record_set"] == null
|
||||
? undefined
|
||||
: DtoRecordSetResponseFromJSON(json["control_plane_record_set"]),
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
glueops_load_balancer:
|
||||
json["glueops_load_balancer"] == null
|
||||
? undefined
|
||||
: DtoLoadBalancerResponseFromJSON(json["glueops_load_balancer"]),
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
last_error: json["last_error"] == null ? undefined : json["last_error"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
node_pools:
|
||||
json["node_pools"] == null
|
||||
? undefined
|
||||
: (json["node_pools"] as Array<any>).map(DtoNodePoolResponseFromJSON),
|
||||
random_token:
|
||||
json["random_token"] == null ? undefined : json["random_token"],
|
||||
region: json["region"] == null ? undefined : json["region"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoClusterResponseToJSON(json: any): DtoClusterResponse {
|
||||
return DtoClusterResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoClusterResponseToJSONTyped(
|
||||
value?: DtoClusterResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
apps_load_balancer: DtoLoadBalancerResponseToJSON(
|
||||
value["apps_load_balancer"],
|
||||
),
|
||||
bastion_server: DtoServerResponseToJSON(value["bastion_server"]),
|
||||
captain_domain: DtoDomainResponseToJSON(value["captain_domain"]),
|
||||
certificate_key: value["certificate_key"],
|
||||
cluster_provider: value["cluster_provider"],
|
||||
control_plane_fqdn: value["control_plane_fqdn"],
|
||||
control_plane_record_set: DtoRecordSetResponseToJSON(
|
||||
value["control_plane_record_set"],
|
||||
),
|
||||
created_at: value["created_at"],
|
||||
glueops_load_balancer: DtoLoadBalancerResponseToJSON(
|
||||
value["glueops_load_balancer"],
|
||||
),
|
||||
id: value["id"],
|
||||
last_error: value["last_error"],
|
||||
name: value["name"],
|
||||
node_pools:
|
||||
value["node_pools"] == null
|
||||
? undefined
|
||||
: (value["node_pools"] as Array<any>).map(DtoNodePoolResponseToJSON),
|
||||
random_token: value["random_token"],
|
||||
region: value["region"],
|
||||
status: value["status"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
81
sdk/ts/src/models/DtoCreateAnnotationRequest.ts
Normal file
81
sdk/ts/src/models/DtoCreateAnnotationRequest.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
90
sdk/ts/src/models/DtoCreateClusterRequest.ts
Normal file
90
sdk/ts/src/models/DtoCreateClusterRequest.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoCreateClusterRequest
|
||||
*/
|
||||
export interface DtoCreateClusterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateClusterRequest
|
||||
*/
|
||||
cluster_provider?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateClusterRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateClusterRequest
|
||||
*/
|
||||
region?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateClusterRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateClusterRequest(
|
||||
value: object,
|
||||
): value is DtoCreateClusterRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateClusterRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateClusterRequest {
|
||||
return DtoCreateClusterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateClusterRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateClusterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
cluster_provider:
|
||||
json["cluster_provider"] == null ? undefined : json["cluster_provider"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
region: json["region"] == null ? undefined : json["region"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateClusterRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateClusterRequest {
|
||||
return DtoCreateClusterRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateClusterRequestToJSONTyped(
|
||||
value?: DtoCreateClusterRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
cluster_provider: value["cluster_provider"],
|
||||
name: value["name"],
|
||||
region: value["region"],
|
||||
};
|
||||
}
|
||||
183
sdk/ts/src/models/DtoCreateCredentialRequest.ts
Normal file
183
sdk/ts/src/models/DtoCreateCredentialRequest.ts
Normal file
@@ -0,0 +1,183 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoCreateCredentialRequest
|
||||
*/
|
||||
export interface DtoCreateCredentialRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
account_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
credential_provider: DtoCreateCredentialRequestCredentialProviderEnum;
|
||||
/**
|
||||
* aws_access_key, api_token, basic_auth, oauth2
|
||||
* @type {string}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
kind: string;
|
||||
/**
|
||||
* human label
|
||||
* @type {string}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
* secret schema version
|
||||
* @type {number}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
schema_version: number;
|
||||
/**
|
||||
* {"service":"route53"} or {"arn":"..."}
|
||||
* @type {object}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
scope: object;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
scope_kind: DtoCreateCredentialRequestScopeKindEnum;
|
||||
/**
|
||||
* scope schema version
|
||||
* @type {number}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
scope_version: number;
|
||||
/**
|
||||
* encrypted later
|
||||
* @type {object}
|
||||
* @memberof DtoCreateCredentialRequest
|
||||
*/
|
||||
secret: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateCredentialRequestCredentialProviderEnum = {
|
||||
aws: "aws",
|
||||
cloudflare: "cloudflare",
|
||||
hetzner: "hetzner",
|
||||
digitalocean: "digitalocean",
|
||||
generic: "generic",
|
||||
} as const;
|
||||
export type DtoCreateCredentialRequestCredentialProviderEnum =
|
||||
(typeof DtoCreateCredentialRequestCredentialProviderEnum)[keyof typeof DtoCreateCredentialRequestCredentialProviderEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateCredentialRequestScopeKindEnum = {
|
||||
credential_provider: "credential_provider",
|
||||
service: "service",
|
||||
resource: "resource",
|
||||
} as const;
|
||||
export type DtoCreateCredentialRequestScopeKindEnum =
|
||||
(typeof DtoCreateCredentialRequestScopeKindEnum)[keyof typeof DtoCreateCredentialRequestScopeKindEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateCredentialRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateCredentialRequest(
|
||||
value: object,
|
||||
): value is DtoCreateCredentialRequest {
|
||||
if (
|
||||
!("credential_provider" in value) ||
|
||||
value["credential_provider"] === undefined
|
||||
)
|
||||
return false;
|
||||
if (!("kind" in value) || value["kind"] === undefined) return false;
|
||||
if (!("schema_version" in value) || value["schema_version"] === undefined)
|
||||
return false;
|
||||
if (!("scope" in value) || value["scope"] === undefined) return false;
|
||||
if (!("scope_kind" in value) || value["scope_kind"] === undefined)
|
||||
return false;
|
||||
if (!("scope_version" in value) || value["scope_version"] === undefined)
|
||||
return false;
|
||||
if (!("secret" in value) || value["secret"] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateCredentialRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateCredentialRequest {
|
||||
return DtoCreateCredentialRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateCredentialRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateCredentialRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
account_id: json["account_id"] == null ? undefined : json["account_id"],
|
||||
credential_provider: json["credential_provider"],
|
||||
kind: json["kind"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
region: json["region"] == null ? undefined : json["region"],
|
||||
schema_version: json["schema_version"],
|
||||
scope: json["scope"],
|
||||
scope_kind: json["scope_kind"],
|
||||
scope_version: json["scope_version"],
|
||||
secret: json["secret"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateCredentialRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateCredentialRequest {
|
||||
return DtoCreateCredentialRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateCredentialRequestToJSONTyped(
|
||||
value?: DtoCreateCredentialRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
account_id: value["account_id"],
|
||||
credential_provider: value["credential_provider"],
|
||||
kind: value["kind"],
|
||||
name: value["name"],
|
||||
region: value["region"],
|
||||
schema_version: value["schema_version"],
|
||||
scope: value["scope"],
|
||||
scope_kind: value["scope_kind"],
|
||||
scope_version: value["scope_version"],
|
||||
secret: value["secret"],
|
||||
};
|
||||
}
|
||||
93
sdk/ts/src/models/DtoCreateDomainRequest.ts
Normal file
93
sdk/ts/src/models/DtoCreateDomainRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoCreateDomainRequest
|
||||
*/
|
||||
export interface DtoCreateDomainRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateDomainRequest
|
||||
*/
|
||||
credential_id: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateDomainRequest
|
||||
*/
|
||||
domain_name: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateDomainRequest
|
||||
*/
|
||||
zone_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateDomainRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateDomainRequest(
|
||||
value: object,
|
||||
): value is DtoCreateDomainRequest {
|
||||
if (!("credential_id" in value) || value["credential_id"] === undefined)
|
||||
return false;
|
||||
if (!("domain_name" in value) || value["domain_name"] === undefined)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateDomainRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateDomainRequest {
|
||||
return DtoCreateDomainRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateDomainRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateDomainRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
credential_id: json["credential_id"],
|
||||
domain_name: json["domain_name"],
|
||||
zone_id: json["zone_id"] == null ? undefined : json["zone_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateDomainRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateDomainRequest {
|
||||
return DtoCreateDomainRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateDomainRequestToJSONTyped(
|
||||
value?: DtoCreateDomainRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
credential_id: value["credential_id"],
|
||||
domain_name: value["domain_name"],
|
||||
zone_id: value["zone_id"],
|
||||
};
|
||||
}
|
||||
79
sdk/ts/src/models/DtoCreateLabelRequest.ts
Normal file
79
sdk/ts/src/models/DtoCreateLabelRequest.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
111
sdk/ts/src/models/DtoCreateLoadBalancerRequest.ts
Normal file
111
sdk/ts/src/models/DtoCreateLoadBalancerRequest.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoCreateLoadBalancerRequest
|
||||
*/
|
||||
export interface DtoCreateLoadBalancerRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateLoadBalancerRequest
|
||||
*/
|
||||
kind?: DtoCreateLoadBalancerRequestKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateLoadBalancerRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateLoadBalancerRequest
|
||||
*/
|
||||
private_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateLoadBalancerRequest
|
||||
*/
|
||||
public_ip_address?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoCreateLoadBalancerRequestKindEnum = {
|
||||
glueops: "glueops",
|
||||
public: "public",
|
||||
} as const;
|
||||
export type DtoCreateLoadBalancerRequestKindEnum =
|
||||
(typeof DtoCreateLoadBalancerRequestKindEnum)[keyof typeof DtoCreateLoadBalancerRequestKindEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateLoadBalancerRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateLoadBalancerRequest(
|
||||
value: object,
|
||||
): value is DtoCreateLoadBalancerRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateLoadBalancerRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateLoadBalancerRequest {
|
||||
return DtoCreateLoadBalancerRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateLoadBalancerRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateLoadBalancerRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
kind: json["kind"] == null ? undefined : json["kind"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
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"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateLoadBalancerRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateLoadBalancerRequest {
|
||||
return DtoCreateLoadBalancerRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateLoadBalancerRequestToJSONTyped(
|
||||
value?: DtoCreateLoadBalancerRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
kind: value["kind"],
|
||||
name: value["name"],
|
||||
private_ip_address: value["private_ip_address"],
|
||||
public_ip_address: value["public_ip_address"],
|
||||
};
|
||||
}
|
||||
91
sdk/ts/src/models/DtoCreateNodePoolRequest.ts
Normal file
91
sdk/ts/src/models/DtoCreateNodePoolRequest.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
100
sdk/ts/src/models/DtoCreateRecordSetRequest.ts
Normal file
100
sdk/ts/src/models/DtoCreateRecordSetRequest.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoCreateRecordSetRequest
|
||||
*/
|
||||
export interface DtoCreateRecordSetRequest {
|
||||
/**
|
||||
* Name relative to domain ("endpoint") OR FQDN ("endpoint.example.com").
|
||||
* Server normalizes to relative.
|
||||
* @type {string}
|
||||
* @memberof DtoCreateRecordSetRequest
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoCreateRecordSetRequest
|
||||
*/
|
||||
ttl?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateRecordSetRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoCreateRecordSetRequest
|
||||
*/
|
||||
values?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateRecordSetRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateRecordSetRequest(
|
||||
value: object,
|
||||
): value is DtoCreateRecordSetRequest {
|
||||
if (!("name" in value) || value["name"] === undefined) return false;
|
||||
if (!("type" in value) || value["type"] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateRecordSetRequestFromJSON(
|
||||
json: any,
|
||||
): DtoCreateRecordSetRequest {
|
||||
return DtoCreateRecordSetRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateRecordSetRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCreateRecordSetRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
name: json["name"],
|
||||
ttl: json["ttl"] == null ? undefined : json["ttl"],
|
||||
type: json["type"],
|
||||
values: json["values"] == null ? undefined : json["values"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateRecordSetRequestToJSON(
|
||||
json: any,
|
||||
): DtoCreateRecordSetRequest {
|
||||
return DtoCreateRecordSetRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateRecordSetRequestToJSONTyped(
|
||||
value?: DtoCreateRecordSetRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
name: value["name"],
|
||||
ttl: value["ttl"],
|
||||
type: value["type"],
|
||||
values: value["values"],
|
||||
};
|
||||
}
|
||||
93
sdk/ts/src/models/DtoCreateSSHRequest.ts
Normal file
93
sdk/ts/src/models/DtoCreateSSHRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
148
sdk/ts/src/models/DtoCreateServerRequest.ts
Normal file
148
sdk/ts/src/models/DtoCreateServerRequest.ts
Normal file
@@ -0,0 +1,148 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
87
sdk/ts/src/models/DtoCreateTaintRequest.ts
Normal file
87
sdk/ts/src/models/DtoCreateTaintRequest.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
162
sdk/ts/src/models/DtoCredentialOut.ts
Normal file
162
sdk/ts/src/models/DtoCredentialOut.ts
Normal file
@@ -0,0 +1,162 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoCredentialOut
|
||||
*/
|
||||
export interface DtoCredentialOut {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
account_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
credential_provider?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
kind?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
schema_version?: number;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
scope?: object;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
scope_kind?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
scope_version?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCredentialOut
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCredentialOut interface.
|
||||
*/
|
||||
export function instanceOfDtoCredentialOut(
|
||||
value: object,
|
||||
): value is DtoCredentialOut {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCredentialOutFromJSON(json: any): DtoCredentialOut {
|
||||
return DtoCredentialOutFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCredentialOutFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoCredentialOut {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
account_id: json["account_id"] == null ? undefined : json["account_id"],
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
credential_provider:
|
||||
json["credential_provider"] == null
|
||||
? undefined
|
||||
: json["credential_provider"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
kind: json["kind"] == null ? undefined : json["kind"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
region: json["region"] == null ? undefined : json["region"],
|
||||
schema_version:
|
||||
json["schema_version"] == null ? undefined : json["schema_version"],
|
||||
scope: json["scope"] == null ? undefined : json["scope"],
|
||||
scope_kind: json["scope_kind"] == null ? undefined : json["scope_kind"],
|
||||
scope_version:
|
||||
json["scope_version"] == null ? undefined : json["scope_version"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCredentialOutToJSON(json: any): DtoCredentialOut {
|
||||
return DtoCredentialOutToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCredentialOutToJSONTyped(
|
||||
value?: DtoCredentialOut | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
account_id: value["account_id"],
|
||||
created_at: value["created_at"],
|
||||
credential_provider: value["credential_provider"],
|
||||
id: value["id"],
|
||||
kind: value["kind"],
|
||||
name: value["name"],
|
||||
region: value["region"],
|
||||
schema_version: value["schema_version"],
|
||||
scope: value["scope"],
|
||||
scope_kind: value["scope_kind"],
|
||||
scope_version: value["scope_version"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
135
sdk/ts/src/models/DtoDomainResponse.ts
Normal file
135
sdk/ts/src/models/DtoDomainResponse.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoDomainResponse
|
||||
*/
|
||||
export interface DtoDomainResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
credential_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
domain_name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
last_error?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoDomainResponse
|
||||
*/
|
||||
zone_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoDomainResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoDomainResponse(
|
||||
value: object,
|
||||
): value is DtoDomainResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoDomainResponseFromJSON(json: any): DtoDomainResponse {
|
||||
return DtoDomainResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoDomainResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoDomainResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
credential_id:
|
||||
json["credential_id"] == null ? undefined : json["credential_id"],
|
||||
domain_name: json["domain_name"] == null ? undefined : json["domain_name"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
last_error: json["last_error"] == null ? undefined : json["last_error"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
zone_id: json["zone_id"] == null ? undefined : json["zone_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoDomainResponseToJSON(json: any): DtoDomainResponse {
|
||||
return DtoDomainResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoDomainResponseToJSONTyped(
|
||||
value?: DtoDomainResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
credential_id: value["credential_id"],
|
||||
domain_name: value["domain_name"],
|
||||
id: value["id"],
|
||||
last_error: value["last_error"],
|
||||
organization_id: value["organization_id"],
|
||||
status: value["status"],
|
||||
updated_at: value["updated_at"],
|
||||
zone_id: value["zone_id"],
|
||||
};
|
||||
}
|
||||
93
sdk/ts/src/models/DtoEnqueueRequest.ts
Normal file
93
sdk/ts/src/models/DtoEnqueueRequest.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoEnqueueRequest
|
||||
*/
|
||||
export interface DtoEnqueueRequest {
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof DtoEnqueueRequest
|
||||
*/
|
||||
payload?: object;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoEnqueueRequest
|
||||
*/
|
||||
queue?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoEnqueueRequest
|
||||
*/
|
||||
run_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoEnqueueRequest
|
||||
*/
|
||||
type?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoEnqueueRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoEnqueueRequest(
|
||||
value: object,
|
||||
): value is DtoEnqueueRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoEnqueueRequestFromJSON(json: any): DtoEnqueueRequest {
|
||||
return DtoEnqueueRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoEnqueueRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoEnqueueRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
payload: json["payload"] == null ? undefined : json["payload"],
|
||||
queue: json["queue"] == null ? undefined : json["queue"],
|
||||
run_at: json["run_at"] == null ? undefined : json["run_at"],
|
||||
type: json["type"] == null ? undefined : json["type"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoEnqueueRequestToJSON(json: any): DtoEnqueueRequest {
|
||||
return DtoEnqueueRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoEnqueueRequestToJSONTyped(
|
||||
value?: DtoEnqueueRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
payload: value["payload"],
|
||||
queue: value["queue"],
|
||||
run_at: value["run_at"],
|
||||
type: value["type"],
|
||||
};
|
||||
}
|
||||
115
sdk/ts/src/models/DtoJWK.ts
Normal file
115
sdk/ts/src/models/DtoJWK.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
76
sdk/ts/src/models/DtoJWKS.ts
Normal file
76
sdk/ts/src/models/DtoJWKS.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoJWK} from "./DtoJWK";
|
||||
import {DtoJWKFromJSON, DtoJWKToJSON,} 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),
|
||||
};
|
||||
}
|
||||
152
sdk/ts/src/models/DtoJob.ts
Normal file
152
sdk/ts/src/models/DtoJob.ts
Normal file
@@ -0,0 +1,152 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoJobStatus} from "./DtoJobStatus";
|
||||
import {DtoJobStatusFromJSON, DtoJobStatusToJSON,} 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 {any}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
payload?: any | null;
|
||||
/**
|
||||
*
|
||||
* @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"],
|
||||
};
|
||||
}
|
||||
55
sdk/ts/src/models/DtoJobStatus.ts
Normal file
55
sdk/ts/src/models/DtoJobStatus.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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|running|succeeded|failed|canceled|retrying|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;
|
||||
}
|
||||
110
sdk/ts/src/models/DtoLabelResponse.ts
Normal file
110
sdk/ts/src/models/DtoLabelResponse.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
134
sdk/ts/src/models/DtoLoadBalancerResponse.ts
Normal file
134
sdk/ts/src/models/DtoLoadBalancerResponse.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoLoadBalancerResponse
|
||||
*/
|
||||
export interface DtoLoadBalancerResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
kind?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
private_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
public_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoLoadBalancerResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoLoadBalancerResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoLoadBalancerResponse(
|
||||
value: object,
|
||||
): value is DtoLoadBalancerResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoLoadBalancerResponseFromJSON(
|
||||
json: any,
|
||||
): DtoLoadBalancerResponse {
|
||||
return DtoLoadBalancerResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoLoadBalancerResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoLoadBalancerResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
kind: json["kind"] == null ? undefined : json["kind"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
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"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoLoadBalancerResponseToJSON(
|
||||
json: any,
|
||||
): DtoLoadBalancerResponse {
|
||||
return DtoLoadBalancerResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoLoadBalancerResponseToJSONTyped(
|
||||
value?: DtoLoadBalancerResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
id: value["id"],
|
||||
kind: value["kind"],
|
||||
name: value["name"],
|
||||
organization_id: value["organization_id"],
|
||||
private_ip_address: value["private_ip_address"],
|
||||
public_ip_address: value["public_ip_address"],
|
||||
updated_at: value["updated_at"],
|
||||
};
|
||||
}
|
||||
70
sdk/ts/src/models/DtoLogoutRequest.ts
Normal file
70
sdk/ts/src/models/DtoLogoutRequest.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
187
sdk/ts/src/models/DtoNodePoolResponse.ts
Normal file
187
sdk/ts/src/models/DtoNodePoolResponse.ts
Normal file
@@ -0,0 +1,187 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
100
sdk/ts/src/models/DtoPageJob.ts
Normal file
100
sdk/ts/src/models/DtoPageJob.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoJob} from "./DtoJob";
|
||||
import {DtoJobFromJSON, DtoJobToJSON,} 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"],
|
||||
};
|
||||
}
|
||||
99
sdk/ts/src/models/DtoQueueInfo.ts
Normal file
99
sdk/ts/src/models/DtoQueueInfo.ts
Normal file
@@ -0,0 +1,99 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
157
sdk/ts/src/models/DtoRecordSetResponse.ts
Normal file
157
sdk/ts/src/models/DtoRecordSetResponse.ts
Normal file
@@ -0,0 +1,157 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoRecordSetResponse
|
||||
*/
|
||||
export interface DtoRecordSetResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
domain_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
fingerprint?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
last_error?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
owner?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
ttl?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
* []string JSON
|
||||
* @type {object}
|
||||
* @memberof DtoRecordSetResponse
|
||||
*/
|
||||
values?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoRecordSetResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoRecordSetResponse(
|
||||
value: object,
|
||||
): value is DtoRecordSetResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoRecordSetResponseFromJSON(json: any): DtoRecordSetResponse {
|
||||
return DtoRecordSetResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoRecordSetResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoRecordSetResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
domain_id: json["domain_id"] == null ? undefined : json["domain_id"],
|
||||
fingerprint: json["fingerprint"] == null ? undefined : json["fingerprint"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
last_error: json["last_error"] == null ? undefined : json["last_error"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
owner: json["owner"] == null ? undefined : json["owner"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
ttl: json["ttl"] == null ? undefined : json["ttl"],
|
||||
type: json["type"] == null ? undefined : json["type"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
values: json["values"] == null ? undefined : json["values"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoRecordSetResponseToJSON(json: any): DtoRecordSetResponse {
|
||||
return DtoRecordSetResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoRecordSetResponseToJSONTyped(
|
||||
value?: DtoRecordSetResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
domain_id: value["domain_id"],
|
||||
fingerprint: value["fingerprint"],
|
||||
id: value["id"],
|
||||
last_error: value["last_error"],
|
||||
name: value["name"],
|
||||
owner: value["owner"],
|
||||
status: value["status"],
|
||||
ttl: value["ttl"],
|
||||
type: value["type"],
|
||||
updated_at: value["updated_at"],
|
||||
values: value["values"],
|
||||
};
|
||||
}
|
||||
70
sdk/ts/src/models/DtoRefreshRequest.ts
Normal file
70
sdk/ts/src/models/DtoRefreshRequest.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
177
sdk/ts/src/models/DtoServerResponse.ts
Normal file
177
sdk/ts/src/models/DtoServerResponse.ts
Normal file
@@ -0,0 +1,177 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
73
sdk/ts/src/models/DtoSetKubeconfigRequest.ts
Normal file
73
sdk/ts/src/models/DtoSetKubeconfigRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoSetKubeconfigRequest
|
||||
*/
|
||||
export interface DtoSetKubeconfigRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoSetKubeconfigRequest
|
||||
*/
|
||||
kubeconfig?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoSetKubeconfigRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoSetKubeconfigRequest(
|
||||
value: object,
|
||||
): value is DtoSetKubeconfigRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoSetKubeconfigRequestFromJSON(
|
||||
json: any,
|
||||
): DtoSetKubeconfigRequest {
|
||||
return DtoSetKubeconfigRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoSetKubeconfigRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoSetKubeconfigRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
kubeconfig: json["kubeconfig"] == null ? undefined : json["kubeconfig"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoSetKubeconfigRequestToJSON(
|
||||
json: any,
|
||||
): DtoSetKubeconfigRequest {
|
||||
return DtoSetKubeconfigRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoSetKubeconfigRequestToJSONTyped(
|
||||
value?: DtoSetKubeconfigRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
kubeconfig: value["kubeconfig"],
|
||||
};
|
||||
}
|
||||
118
sdk/ts/src/models/DtoSshResponse.ts
Normal file
118
sdk/ts/src/models/DtoSshResponse.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
126
sdk/ts/src/models/DtoSshRevealResponse.ts
Normal file
126
sdk/ts/src/models/DtoSshRevealResponse.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
118
sdk/ts/src/models/DtoTaintResponse.ts
Normal file
118
sdk/ts/src/models/DtoTaintResponse.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
93
sdk/ts/src/models/DtoTokenPair.ts
Normal file
93
sdk/ts/src/models/DtoTokenPair.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
81
sdk/ts/src/models/DtoUpdateAnnotationRequest.ts
Normal file
81
sdk/ts/src/models/DtoUpdateAnnotationRequest.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
90
sdk/ts/src/models/DtoUpdateClusterRequest.ts
Normal file
90
sdk/ts/src/models/DtoUpdateClusterRequest.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoUpdateClusterRequest
|
||||
*/
|
||||
export interface DtoUpdateClusterRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateClusterRequest
|
||||
*/
|
||||
cluster_provider?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateClusterRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateClusterRequest
|
||||
*/
|
||||
region?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateClusterRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateClusterRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateClusterRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateClusterRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateClusterRequest {
|
||||
return DtoUpdateClusterRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateClusterRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateClusterRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
cluster_provider:
|
||||
json["cluster_provider"] == null ? undefined : json["cluster_provider"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
region: json["region"] == null ? undefined : json["region"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateClusterRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateClusterRequest {
|
||||
return DtoUpdateClusterRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateClusterRequestToJSONTyped(
|
||||
value?: DtoUpdateClusterRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
cluster_provider: value["cluster_provider"],
|
||||
name: value["name"],
|
||||
region: value["region"],
|
||||
};
|
||||
}
|
||||
122
sdk/ts/src/models/DtoUpdateCredentialRequest.ts
Normal file
122
sdk/ts/src/models/DtoUpdateCredentialRequest.ts
Normal file
@@ -0,0 +1,122 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoUpdateCredentialRequest
|
||||
*/
|
||||
export interface DtoUpdateCredentialRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
account_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
scope?: object;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
scope_kind?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
scope_version?: number;
|
||||
/**
|
||||
* set if rotating
|
||||
* @type {object}
|
||||
* @memberof DtoUpdateCredentialRequest
|
||||
*/
|
||||
secret?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateCredentialRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateCredentialRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateCredentialRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateCredentialRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateCredentialRequest {
|
||||
return DtoUpdateCredentialRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateCredentialRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateCredentialRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
account_id: json["account_id"] == null ? undefined : json["account_id"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
region: json["region"] == null ? undefined : json["region"],
|
||||
scope: json["scope"] == null ? undefined : json["scope"],
|
||||
scope_kind: json["scope_kind"] == null ? undefined : json["scope_kind"],
|
||||
scope_version:
|
||||
json["scope_version"] == null ? undefined : json["scope_version"],
|
||||
secret: json["secret"] == null ? undefined : json["secret"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateCredentialRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateCredentialRequest {
|
||||
return DtoUpdateCredentialRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateCredentialRequestToJSONTyped(
|
||||
value?: DtoUpdateCredentialRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
account_id: value["account_id"],
|
||||
name: value["name"],
|
||||
region: value["region"],
|
||||
scope: value["scope"],
|
||||
scope_kind: value["scope_kind"],
|
||||
scope_version: value["scope_version"],
|
||||
secret: value["secret"],
|
||||
};
|
||||
}
|
||||
110
sdk/ts/src/models/DtoUpdateDomainRequest.ts
Normal file
110
sdk/ts/src/models/DtoUpdateDomainRequest.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoUpdateDomainRequest
|
||||
*/
|
||||
export interface DtoUpdateDomainRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateDomainRequest
|
||||
*/
|
||||
credential_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateDomainRequest
|
||||
*/
|
||||
domain_name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateDomainRequest
|
||||
*/
|
||||
status?: DtoUpdateDomainRequestStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateDomainRequest
|
||||
*/
|
||||
zone_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateDomainRequestStatusEnum = {
|
||||
pending: "pending",
|
||||
provisioning: "provisioning",
|
||||
ready: "ready",
|
||||
failed: "failed",
|
||||
} as const;
|
||||
export type DtoUpdateDomainRequestStatusEnum =
|
||||
(typeof DtoUpdateDomainRequestStatusEnum)[keyof typeof DtoUpdateDomainRequestStatusEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateDomainRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateDomainRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateDomainRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateDomainRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateDomainRequest {
|
||||
return DtoUpdateDomainRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateDomainRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateDomainRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
credential_id:
|
||||
json["credential_id"] == null ? undefined : json["credential_id"],
|
||||
domain_name: json["domain_name"] == null ? undefined : json["domain_name"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
zone_id: json["zone_id"] == null ? undefined : json["zone_id"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateDomainRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateDomainRequest {
|
||||
return DtoUpdateDomainRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateDomainRequestToJSONTyped(
|
||||
value?: DtoUpdateDomainRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
credential_id: value["credential_id"],
|
||||
domain_name: value["domain_name"],
|
||||
status: value["status"],
|
||||
zone_id: value["zone_id"],
|
||||
};
|
||||
}
|
||||
79
sdk/ts/src/models/DtoUpdateLabelRequest.ts
Normal file
79
sdk/ts/src/models/DtoUpdateLabelRequest.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
111
sdk/ts/src/models/DtoUpdateLoadBalancerRequest.ts
Normal file
111
sdk/ts/src/models/DtoUpdateLoadBalancerRequest.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoUpdateLoadBalancerRequest
|
||||
*/
|
||||
export interface DtoUpdateLoadBalancerRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateLoadBalancerRequest
|
||||
*/
|
||||
kind?: DtoUpdateLoadBalancerRequestKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateLoadBalancerRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateLoadBalancerRequest
|
||||
*/
|
||||
private_ip_address?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateLoadBalancerRequest
|
||||
*/
|
||||
public_ip_address?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateLoadBalancerRequestKindEnum = {
|
||||
glueops: "glueops",
|
||||
public: "public",
|
||||
} as const;
|
||||
export type DtoUpdateLoadBalancerRequestKindEnum =
|
||||
(typeof DtoUpdateLoadBalancerRequestKindEnum)[keyof typeof DtoUpdateLoadBalancerRequestKindEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateLoadBalancerRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateLoadBalancerRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateLoadBalancerRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateLoadBalancerRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateLoadBalancerRequest {
|
||||
return DtoUpdateLoadBalancerRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateLoadBalancerRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateLoadBalancerRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
kind: json["kind"] == null ? undefined : json["kind"],
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
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"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateLoadBalancerRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateLoadBalancerRequest {
|
||||
return DtoUpdateLoadBalancerRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateLoadBalancerRequestToJSONTyped(
|
||||
value?: DtoUpdateLoadBalancerRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
kind: value["kind"],
|
||||
name: value["name"],
|
||||
private_ip_address: value["private_ip_address"],
|
||||
public_ip_address: value["public_ip_address"],
|
||||
};
|
||||
}
|
||||
91
sdk/ts/src/models/DtoUpdateNodePoolRequest.ts
Normal file
91
sdk/ts/src/models/DtoUpdateNodePoolRequest.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
117
sdk/ts/src/models/DtoUpdateRecordSetRequest.ts
Normal file
117
sdk/ts/src/models/DtoUpdateRecordSetRequest.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 DtoUpdateRecordSetRequest
|
||||
*/
|
||||
export interface DtoUpdateRecordSetRequest {
|
||||
/**
|
||||
* Any change flips status back to pending (worker will UPSERT)
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateRecordSetRequest
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateRecordSetRequest
|
||||
*/
|
||||
status?: DtoUpdateRecordSetRequestStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DtoUpdateRecordSetRequest
|
||||
*/
|
||||
ttl?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateRecordSetRequest
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof DtoUpdateRecordSetRequest
|
||||
*/
|
||||
values?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const DtoUpdateRecordSetRequestStatusEnum = {
|
||||
pending: "pending",
|
||||
provisioning: "provisioning",
|
||||
ready: "ready",
|
||||
failed: "failed",
|
||||
} as const;
|
||||
export type DtoUpdateRecordSetRequestStatusEnum =
|
||||
(typeof DtoUpdateRecordSetRequestStatusEnum)[keyof typeof DtoUpdateRecordSetRequestStatusEnum];
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateRecordSetRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateRecordSetRequest(
|
||||
value: object,
|
||||
): value is DtoUpdateRecordSetRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateRecordSetRequestFromJSON(
|
||||
json: any,
|
||||
): DtoUpdateRecordSetRequest {
|
||||
return DtoUpdateRecordSetRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateRecordSetRequestFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoUpdateRecordSetRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
name: json["name"] == null ? undefined : json["name"],
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
ttl: json["ttl"] == null ? undefined : json["ttl"],
|
||||
type: json["type"] == null ? undefined : json["type"],
|
||||
values: json["values"] == null ? undefined : json["values"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateRecordSetRequestToJSON(
|
||||
json: any,
|
||||
): DtoUpdateRecordSetRequest {
|
||||
return DtoUpdateRecordSetRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateRecordSetRequestToJSONTyped(
|
||||
value?: DtoUpdateRecordSetRequest | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
name: value["name"],
|
||||
status: value["status"],
|
||||
ttl: value["ttl"],
|
||||
type: value["type"],
|
||||
values: value["values"],
|
||||
};
|
||||
}
|
||||
148
sdk/ts/src/models/DtoUpdateServerRequest.ts
Normal file
148
sdk/ts/src/models/DtoUpdateServerRequest.ts
Normal file
@@ -0,0 +1,148 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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"],
|
||||
};
|
||||
}
|
||||
87
sdk/ts/src/models/DtoUpdateTaintRequest.ts
Normal file
87
sdk/ts/src/models/DtoUpdateTaintRequest.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
75
sdk/ts/src/models/GetSSHKey200Response.ts
Normal file
75
sdk/ts/src/models/GetSSHKey200Response.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {DtoSshResponse} from "./DtoSshResponse";
|
||||
import {DtoSshResponseFromJSONTyped, DtoSshResponseToJSON, instanceOfDtoSshResponse,} from "./DtoSshResponse";
|
||||
import type {DtoSshRevealResponse} from "./DtoSshRevealResponse";
|
||||
import {
|
||||
DtoSshRevealResponseFromJSONTyped,
|
||||
DtoSshRevealResponseToJSON,
|
||||
instanceOfDtoSshRevealResponse,
|
||||
} from "./DtoSshRevealResponse";
|
||||
|
||||
/**
|
||||
* @type GetSSHKey200Response
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export type GetSSHKey200Response = DtoSshResponse | DtoSshRevealResponse;
|
||||
|
||||
export function GetSSHKey200ResponseFromJSON(json: any): GetSSHKey200Response {
|
||||
return GetSSHKey200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function GetSSHKey200ResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): GetSSHKey200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
if (typeof json !== "object") {
|
||||
return json;
|
||||
}
|
||||
if (instanceOfDtoSshResponse(json)) {
|
||||
return DtoSshResponseFromJSONTyped(json, true);
|
||||
}
|
||||
if (instanceOfDtoSshRevealResponse(json)) {
|
||||
return DtoSshRevealResponseFromJSONTyped(json, true);
|
||||
}
|
||||
return {} as any;
|
||||
}
|
||||
|
||||
export function GetSSHKey200ResponseToJSON(json: any): any {
|
||||
return GetSSHKey200ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function GetSSHKey200ResponseToJSONTyped(
|
||||
value?: GetSSHKey200Response | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
if (typeof value !== "object") {
|
||||
return value;
|
||||
}
|
||||
if (instanceOfDtoSshResponse(value)) {
|
||||
return DtoSshResponseToJSON(value as DtoSshResponse);
|
||||
}
|
||||
if (instanceOfDtoSshRevealResponse(value)) {
|
||||
return DtoSshRevealResponseToJSON(value as DtoSshRevealResponse);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
82
sdk/ts/src/models/HandlersCreateUserKeyRequest.ts
Normal file
82
sdk/ts/src/models/HandlersCreateUserKeyRequest.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
69
sdk/ts/src/models/HandlersHealthStatus.ts
Normal file
69
sdk/ts/src/models/HandlersHealthStatus.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
168
sdk/ts/src/models/HandlersMeResponse.ts
Normal file
168
sdk/ts/src/models/HandlersMeResponse.ts
Normal file
@@ -0,0 +1,168 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {ModelsUserEmail} from "./ModelsUserEmail";
|
||||
import {ModelsUserEmailFromJSON, ModelsUserEmailToJSON,} from "./ModelsUserEmail";
|
||||
import type {ModelsOrganization} from "./ModelsOrganization";
|
||||
import {ModelsOrganizationFromJSON, ModelsOrganizationToJSON,} 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(),
|
||||
};
|
||||
}
|
||||
85
sdk/ts/src/models/HandlersMemberOut.ts
Normal file
85
sdk/ts/src/models/HandlersMemberOut.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
81
sdk/ts/src/models/HandlersMemberUpsertReq.ts
Normal file
81
sdk/ts/src/models/HandlersMemberUpsertReq.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
77
sdk/ts/src/models/HandlersOrgCreateReq.ts
Normal file
77
sdk/ts/src/models/HandlersOrgCreateReq.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
82
sdk/ts/src/models/HandlersOrgKeyCreateReq.ts
Normal file
82
sdk/ts/src/models/HandlersOrgKeyCreateReq.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
121
sdk/ts/src/models/HandlersOrgKeyCreateResp.ts
Normal file
121
sdk/ts/src/models/HandlersOrgKeyCreateResp.ts
Normal file
@@ -0,0 +1,121 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
77
sdk/ts/src/models/HandlersOrgUpdateReq.ts
Normal file
77
sdk/ts/src/models/HandlersOrgUpdateReq.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
74
sdk/ts/src/models/HandlersUpdateMeRequest.ts
Normal file
74
sdk/ts/src/models/HandlersUpdateMeRequest.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
120
sdk/ts/src/models/HandlersUserAPIKeyOut.ts
Normal file
120
sdk/ts/src/models/HandlersUserAPIKeyOut.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
153
sdk/ts/src/models/HandlersVersionResponse.ts
Normal file
153
sdk/ts/src/models/HandlersVersionResponse.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 HandlersVersionResponse
|
||||
*/
|
||||
export interface HandlersVersionResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
built?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
builtBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
commit?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
commitTime?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
go?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
goArch?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
goOS?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
modified?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
revision?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
vcs?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersVersionResponse
|
||||
*/
|
||||
version?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersVersionResponse interface.
|
||||
*/
|
||||
export function instanceOfHandlersVersionResponse(
|
||||
value: object,
|
||||
): value is HandlersVersionResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersVersionResponseFromJSON(
|
||||
json: any,
|
||||
): HandlersVersionResponse {
|
||||
return HandlersVersionResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersVersionResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersVersionResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
built: json["built"] == null ? undefined : json["built"],
|
||||
builtBy: json["builtBy"] == null ? undefined : json["builtBy"],
|
||||
commit: json["commit"] == null ? undefined : json["commit"],
|
||||
commitTime: json["commitTime"] == null ? undefined : json["commitTime"],
|
||||
go: json["go"] == null ? undefined : json["go"],
|
||||
goArch: json["goArch"] == null ? undefined : json["goArch"],
|
||||
goOS: json["goOS"] == null ? undefined : json["goOS"],
|
||||
modified: json["modified"] == null ? undefined : json["modified"],
|
||||
revision: json["revision"] == null ? undefined : json["revision"],
|
||||
vcs: json["vcs"] == null ? undefined : json["vcs"],
|
||||
version: json["version"] == null ? undefined : json["version"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersVersionResponseToJSON(
|
||||
json: any,
|
||||
): HandlersVersionResponse {
|
||||
return HandlersVersionResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersVersionResponseToJSONTyped(
|
||||
value?: HandlersVersionResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
built: value["built"],
|
||||
builtBy: value["builtBy"],
|
||||
commit: value["commit"],
|
||||
commitTime: value["commitTime"],
|
||||
go: value["go"],
|
||||
goArch: value["goArch"],
|
||||
goOS: value["goOS"],
|
||||
modified: value["modified"],
|
||||
revision: value["revision"],
|
||||
vcs: value["vcs"],
|
||||
version: value["version"],
|
||||
};
|
||||
}
|
||||
163
sdk/ts/src/models/ModelsAPIKey.ts
Normal file
163
sdk/ts/src/models/ModelsAPIKey.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
109
sdk/ts/src/models/ModelsOrganization.ts
Normal file
109
sdk/ts/src/models/ModelsOrganization.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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(),
|
||||
};
|
||||
}
|
||||
133
sdk/ts/src/models/ModelsUser.ts
Normal file
133
sdk/ts/src/models/ModelsUser.ts
Normal file
@@ -0,0 +1,133 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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(),
|
||||
};
|
||||
}
|
||||
136
sdk/ts/src/models/ModelsUserEmail.ts
Normal file
136
sdk/ts/src/models/ModelsUserEmail.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 {ModelsUser} from "./ModelsUser";
|
||||
import {ModelsUserFromJSON, ModelsUserToJSON,} 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"],
|
||||
};
|
||||
}
|
||||
79
sdk/ts/src/models/UtilsErrorResponse.ts
Normal file
79
sdk/ts/src/models/UtilsErrorResponse.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 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"],
|
||||
};
|
||||
}
|
||||
74
sdk/ts/src/models/index.ts
Normal file
74
sdk/ts/src/models/index.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from "./DtoAnnotationResponse";
|
||||
export * from "./DtoAttachAnnotationsRequest";
|
||||
export * from "./DtoAttachBastionRequest";
|
||||
export * from "./DtoAttachCaptainDomainRequest";
|
||||
export * from "./DtoAttachLabelsRequest";
|
||||
export * from "./DtoAttachLoadBalancerRequest";
|
||||
export * from "./DtoAttachNodePoolRequest";
|
||||
export * from "./DtoAttachRecordSetRequest";
|
||||
export * from "./DtoAttachServersRequest";
|
||||
export * from "./DtoAttachTaintsRequest";
|
||||
export * from "./DtoAuthStartResponse";
|
||||
export * from "./DtoClusterResponse";
|
||||
export * from "./DtoCreateAnnotationRequest";
|
||||
export * from "./DtoCreateClusterRequest";
|
||||
export * from "./DtoCreateCredentialRequest";
|
||||
export * from "./DtoCreateDomainRequest";
|
||||
export * from "./DtoCreateLabelRequest";
|
||||
export * from "./DtoCreateLoadBalancerRequest";
|
||||
export * from "./DtoCreateNodePoolRequest";
|
||||
export * from "./DtoCreateRecordSetRequest";
|
||||
export * from "./DtoCreateSSHRequest";
|
||||
export * from "./DtoCreateServerRequest";
|
||||
export * from "./DtoCreateTaintRequest";
|
||||
export * from "./DtoCredentialOut";
|
||||
export * from "./DtoDomainResponse";
|
||||
export * from "./DtoEnqueueRequest";
|
||||
export * from "./DtoJWK";
|
||||
export * from "./DtoJWKS";
|
||||
export * from "./DtoJob";
|
||||
export * from "./DtoJobStatus";
|
||||
export * from "./DtoLabelResponse";
|
||||
export * from "./DtoLoadBalancerResponse";
|
||||
export * from "./DtoLogoutRequest";
|
||||
export * from "./DtoNodePoolResponse";
|
||||
export * from "./DtoPageJob";
|
||||
export * from "./DtoQueueInfo";
|
||||
export * from "./DtoRecordSetResponse";
|
||||
export * from "./DtoRefreshRequest";
|
||||
export * from "./DtoServerResponse";
|
||||
export * from "./DtoSetKubeconfigRequest";
|
||||
export * from "./DtoSshResponse";
|
||||
export * from "./DtoSshRevealResponse";
|
||||
export * from "./DtoTaintResponse";
|
||||
export * from "./DtoTokenPair";
|
||||
export * from "./DtoUpdateAnnotationRequest";
|
||||
export * from "./DtoUpdateClusterRequest";
|
||||
export * from "./DtoUpdateCredentialRequest";
|
||||
export * from "./DtoUpdateDomainRequest";
|
||||
export * from "./DtoUpdateLabelRequest";
|
||||
export * from "./DtoUpdateLoadBalancerRequest";
|
||||
export * from "./DtoUpdateNodePoolRequest";
|
||||
export * from "./DtoUpdateRecordSetRequest";
|
||||
export * from "./DtoUpdateServerRequest";
|
||||
export * from "./DtoUpdateTaintRequest";
|
||||
export * from "./GetSSHKey200Response";
|
||||
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 "./HandlersVersionResponse";
|
||||
export * from "./ModelsAPIKey";
|
||||
export * from "./ModelsOrganization";
|
||||
export * from "./ModelsUser";
|
||||
export * from "./ModelsUserEmail";
|
||||
export * from "./UtilsErrorResponse";
|
||||
533
sdk/ts/src/runtime.ts
Normal file
533
sdk/ts/src/runtime.ts
Normal file
@@ -0,0 +1,533 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: dev
|
||||
*
|
||||
*
|
||||
* 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 = "https://autoglue.glueopshosted.com/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