feat: complete node pool api, sdk and ui

Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
allanice001
2025-11-08 10:22:45 +00:00
parent c478a8d10f
commit 334df457ce
130 changed files with 19675 additions and 187 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,7 @@ export * from "./HealthApi";
export * from "./LabelsApi";
export * from "./MeApi";
export * from "./MeAPIKeysApi";
export * from "./NodePoolsApi";
export * from "./OrgsApi";
export * from "./ServersApi";
export * from "./SshApi";

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachAnnotationsRequest
*/
export interface DtoAttachAnnotationsRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachAnnotationsRequest
*/
annotation_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachAnnotationsRequest interface.
*/
export function instanceOfDtoAttachAnnotationsRequest(
value: object,
): value is DtoAttachAnnotationsRequest {
return true;
}
export function DtoAttachAnnotationsRequestFromJSON(
json: any,
): DtoAttachAnnotationsRequest {
return DtoAttachAnnotationsRequestFromJSONTyped(json, false);
}
export function DtoAttachAnnotationsRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachAnnotationsRequest {
if (json == null) {
return json;
}
return {
annotation_ids:
json["annotation_ids"] == null ? undefined : json["annotation_ids"],
};
}
export function DtoAttachAnnotationsRequestToJSON(
json: any,
): DtoAttachAnnotationsRequest {
return DtoAttachAnnotationsRequestToJSONTyped(json, false);
}
export function DtoAttachAnnotationsRequestToJSONTyped(
value?: DtoAttachAnnotationsRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
annotation_ids: value["annotation_ids"],
};
}

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachLabelsRequest
*/
export interface DtoAttachLabelsRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachLabelsRequest
*/
label_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachLabelsRequest interface.
*/
export function instanceOfDtoAttachLabelsRequest(
value: object,
): value is DtoAttachLabelsRequest {
return true;
}
export function DtoAttachLabelsRequestFromJSON(
json: any,
): DtoAttachLabelsRequest {
return DtoAttachLabelsRequestFromJSONTyped(json, false);
}
export function DtoAttachLabelsRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachLabelsRequest {
if (json == null) {
return json;
}
return {
label_ids: json["label_ids"] == null ? undefined : json["label_ids"],
};
}
export function DtoAttachLabelsRequestToJSON(
json: any,
): DtoAttachLabelsRequest {
return DtoAttachLabelsRequestToJSONTyped(json, false);
}
export function DtoAttachLabelsRequestToJSONTyped(
value?: DtoAttachLabelsRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
label_ids: value["label_ids"],
};
}

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachServersRequest
*/
export interface DtoAttachServersRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachServersRequest
*/
server_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachServersRequest interface.
*/
export function instanceOfDtoAttachServersRequest(
value: object,
): value is DtoAttachServersRequest {
return true;
}
export function DtoAttachServersRequestFromJSON(
json: any,
): DtoAttachServersRequest {
return DtoAttachServersRequestFromJSONTyped(json, false);
}
export function DtoAttachServersRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachServersRequest {
if (json == null) {
return json;
}
return {
server_ids: json["server_ids"] == null ? undefined : json["server_ids"],
};
}
export function DtoAttachServersRequestToJSON(
json: any,
): DtoAttachServersRequest {
return DtoAttachServersRequestToJSONTyped(json, false);
}
export function DtoAttachServersRequestToJSONTyped(
value?: DtoAttachServersRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
server_ids: value["server_ids"],
};
}

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachTaintsRequest
*/
export interface DtoAttachTaintsRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachTaintsRequest
*/
taint_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachTaintsRequest interface.
*/
export function instanceOfDtoAttachTaintsRequest(
value: object,
): value is DtoAttachTaintsRequest {
return true;
}
export function DtoAttachTaintsRequestFromJSON(
json: any,
): DtoAttachTaintsRequest {
return DtoAttachTaintsRequestFromJSONTyped(json, false);
}
export function DtoAttachTaintsRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachTaintsRequest {
if (json == null) {
return json;
}
return {
taint_ids: json["taint_ids"] == null ? undefined : json["taint_ids"],
};
}
export function DtoAttachTaintsRequestToJSON(
json: any,
): DtoAttachTaintsRequest {
return DtoAttachTaintsRequestToJSONTyped(json, false);
}
export function DtoAttachTaintsRequestToJSONTyped(
value?: DtoAttachTaintsRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
taint_ids: value["taint_ids"],
};
}

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoCreateNodePoolRequest
*/
export interface DtoCreateNodePoolRequest {
/**
*
* @type {string}
* @memberof DtoCreateNodePoolRequest
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoCreateNodePoolRequest
*/
role?: DtoCreateNodePoolRequestRoleEnum;
}
/**
* @export
*/
export const DtoCreateNodePoolRequestRoleEnum = {
master: "master",
worker: "worker",
} as const;
export type DtoCreateNodePoolRequestRoleEnum =
(typeof DtoCreateNodePoolRequestRoleEnum)[keyof typeof DtoCreateNodePoolRequestRoleEnum];
/**
* Check if a given object implements the DtoCreateNodePoolRequest interface.
*/
export function instanceOfDtoCreateNodePoolRequest(
value: object,
): value is DtoCreateNodePoolRequest {
return true;
}
export function DtoCreateNodePoolRequestFromJSON(
json: any,
): DtoCreateNodePoolRequest {
return DtoCreateNodePoolRequestFromJSONTyped(json, false);
}
export function DtoCreateNodePoolRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoCreateNodePoolRequest {
if (json == null) {
return json;
}
return {
name: json["name"] == null ? undefined : json["name"],
role: json["role"] == null ? undefined : json["role"],
};
}
export function DtoCreateNodePoolRequestToJSON(
json: any,
): DtoCreateNodePoolRequest {
return DtoCreateNodePoolRequestToJSONTyped(json, false);
}
export function DtoCreateNodePoolRequestToJSONTyped(
value?: DtoCreateNodePoolRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
name: value["name"],
role: value["role"],
};
}

View File

@@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
@@ -42,7 +41,7 @@ export interface DtoCreateServerRequest {
* @type {string}
* @memberof DtoCreateServerRequest
*/
role?: string;
role?: DtoCreateServerRequestRoleEnum;
/**
*
* @type {string}
@@ -60,9 +59,32 @@ export interface DtoCreateServerRequest {
* @type {string}
* @memberof DtoCreateServerRequest
*/
status?: string;
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.
*/

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type {DtoTaintResponse} from "./DtoTaintResponse";
import {DtoTaintResponseFromJSON, DtoTaintResponseToJSON,} from "./DtoTaintResponse";
import type {DtoLabelResponse} from "./DtoLabelResponse";
import {DtoLabelResponseFromJSON, DtoLabelResponseToJSON,} from "./DtoLabelResponse";
import type {DtoServerResponse} from "./DtoServerResponse";
import {DtoServerResponseFromJSON, DtoServerResponseToJSON,} from "./DtoServerResponse";
import type {DtoAnnotationResponse} from "./DtoAnnotationResponse";
import {DtoAnnotationResponseFromJSON, DtoAnnotationResponseToJSON,} from "./DtoAnnotationResponse";
/**
*
* @export
* @interface DtoNodePoolResponse
*/
export interface DtoNodePoolResponse {
/**
*
* @type {Array<DtoAnnotationResponse>}
* @memberof DtoNodePoolResponse
*/
annotations?: Array<DtoAnnotationResponse>;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
created_at?: string;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
id?: string;
/**
*
* @type {Array<DtoLabelResponse>}
* @memberof DtoNodePoolResponse
*/
labels?: Array<DtoLabelResponse>;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
organization_id?: string;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
role?: DtoNodePoolResponseRoleEnum;
/**
*
* @type {Array<DtoServerResponse>}
* @memberof DtoNodePoolResponse
*/
servers?: Array<DtoServerResponse>;
/**
*
* @type {Array<DtoTaintResponse>}
* @memberof DtoNodePoolResponse
*/
taints?: Array<DtoTaintResponse>;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
updated_at?: string;
}
/**
* @export
*/
export const DtoNodePoolResponseRoleEnum = {
master: "master",
worker: "worker",
} as const;
export type DtoNodePoolResponseRoleEnum =
(typeof DtoNodePoolResponseRoleEnum)[keyof typeof DtoNodePoolResponseRoleEnum];
/**
* Check if a given object implements the DtoNodePoolResponse interface.
*/
export function instanceOfDtoNodePoolResponse(
value: object,
): value is DtoNodePoolResponse {
return true;
}
export function DtoNodePoolResponseFromJSON(json: any): DtoNodePoolResponse {
return DtoNodePoolResponseFromJSONTyped(json, false);
}
export function DtoNodePoolResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoNodePoolResponse {
if (json == null) {
return json;
}
return {
annotations:
json["annotations"] == null
? undefined
: (json["annotations"] as Array<any>).map(
DtoAnnotationResponseFromJSON,
),
created_at: json["created_at"] == null ? undefined : json["created_at"],
id: json["id"] == null ? undefined : json["id"],
labels:
json["labels"] == null
? undefined
: (json["labels"] as Array<any>).map(DtoLabelResponseFromJSON),
name: json["name"] == null ? undefined : json["name"],
organization_id:
json["organization_id"] == null ? undefined : json["organization_id"],
role: json["role"] == null ? undefined : json["role"],
servers:
json["servers"] == null
? undefined
: (json["servers"] as Array<any>).map(DtoServerResponseFromJSON),
taints:
json["taints"] == null
? undefined
: (json["taints"] as Array<any>).map(DtoTaintResponseFromJSON),
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
};
}
export function DtoNodePoolResponseToJSON(json: any): DtoNodePoolResponse {
return DtoNodePoolResponseToJSONTyped(json, false);
}
export function DtoNodePoolResponseToJSONTyped(
value?: DtoNodePoolResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
annotations:
value["annotations"] == null
? undefined
: (value["annotations"] as Array<any>).map(DtoAnnotationResponseToJSON),
created_at: value["created_at"],
id: value["id"],
labels:
value["labels"] == null
? undefined
: (value["labels"] as Array<any>).map(DtoLabelResponseToJSON),
name: value["name"],
organization_id: value["organization_id"],
role: value["role"],
servers:
value["servers"] == null
? undefined
: (value["servers"] as Array<any>).map(DtoServerResponseToJSON),
taints:
value["taints"] == null
? undefined
: (value["taints"] as Array<any>).map(DtoTaintResponseToJSON),
updated_at: value["updated_at"],
};
}

View File

@@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
@@ -60,7 +59,7 @@ export interface DtoServerResponse {
* @type {string}
* @memberof DtoServerResponse
*/
role?: string;
role?: DtoServerResponseRoleEnum;
/**
*
* @type {string}
@@ -78,7 +77,7 @@ export interface DtoServerResponse {
* @type {string}
* @memberof DtoServerResponse
*/
status?: string;
status?: DtoServerResponseStatusEnum;
/**
*
* @type {string}
@@ -87,6 +86,29 @@ export interface 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.
*/

View 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: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoUpdateNodePoolRequest
*/
export interface DtoUpdateNodePoolRequest {
/**
*
* @type {string}
* @memberof DtoUpdateNodePoolRequest
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoUpdateNodePoolRequest
*/
role?: DtoUpdateNodePoolRequestRoleEnum;
}
/**
* @export
*/
export const DtoUpdateNodePoolRequestRoleEnum = {
master: "master",
worker: "worker",
} as const;
export type DtoUpdateNodePoolRequestRoleEnum =
(typeof DtoUpdateNodePoolRequestRoleEnum)[keyof typeof DtoUpdateNodePoolRequestRoleEnum];
/**
* Check if a given object implements the DtoUpdateNodePoolRequest interface.
*/
export function instanceOfDtoUpdateNodePoolRequest(
value: object,
): value is DtoUpdateNodePoolRequest {
return true;
}
export function DtoUpdateNodePoolRequestFromJSON(
json: any,
): DtoUpdateNodePoolRequest {
return DtoUpdateNodePoolRequestFromJSONTyped(json, false);
}
export function DtoUpdateNodePoolRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoUpdateNodePoolRequest {
if (json == null) {
return json;
}
return {
name: json["name"] == null ? undefined : json["name"],
role: json["role"] == null ? undefined : json["role"],
};
}
export function DtoUpdateNodePoolRequestToJSON(
json: any,
): DtoUpdateNodePoolRequest {
return DtoUpdateNodePoolRequestToJSONTyped(json, false);
}
export function DtoUpdateNodePoolRequestToJSONTyped(
value?: DtoUpdateNodePoolRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
name: value["name"],
role: value["role"],
};
}

View File

@@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
@@ -42,7 +41,7 @@ export interface DtoUpdateServerRequest {
* @type {string}
* @memberof DtoUpdateServerRequest
*/
role?: string;
role?: DtoUpdateServerRequestRoleEnum;
/**
*
* @type {string}
@@ -60,9 +59,32 @@ export interface DtoUpdateServerRequest {
* @type {string}
* @memberof DtoUpdateServerRequest
*/
status?: string;
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.
*/

View File

@@ -1,9 +1,14 @@
/* tslint:disable */
/* eslint-disable */
export * from "./DtoAnnotationResponse";
export * from "./DtoAttachAnnotationsRequest";
export * from "./DtoAttachLabelsRequest";
export * from "./DtoAttachServersRequest";
export * from "./DtoAttachTaintsRequest";
export * from "./DtoAuthStartResponse";
export * from "./DtoCreateAnnotationRequest";
export * from "./DtoCreateLabelRequest";
export * from "./DtoCreateNodePoolRequest";
export * from "./DtoCreateSSHRequest";
export * from "./DtoCreateServerRequest";
export * from "./DtoCreateTaintRequest";
@@ -13,6 +18,7 @@ export * from "./DtoJob";
export * from "./DtoJobStatus";
export * from "./DtoLabelResponse";
export * from "./DtoLogoutRequest";
export * from "./DtoNodePoolResponse";
export * from "./DtoPageJob";
export * from "./DtoQueueInfo";
export * from "./DtoRefreshRequest";
@@ -23,6 +29,7 @@ export * from "./DtoTaintResponse";
export * from "./DtoTokenPair";
export * from "./DtoUpdateAnnotationRequest";
export * from "./DtoUpdateLabelRequest";
export * from "./DtoUpdateNodePoolRequest";
export * from "./DtoUpdateServerRequest";
export * from "./DtoUpdateTaintRequest";
export * from "./HandlersCreateUserKeyRequest";

View File

@@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
export const BASE_PATH = "http://localhost:8080/api/v1".replace(/\/+$/, "");
export const BASE_PATH = "/api/v1".replace(/\/+$/, "");
export interface ConfigurationParameters {
basePath?: string; // override base path