mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
feat: adding background jobs ui page and apis - requires user is_admin to be set to true
This commit is contained in:
@@ -3,23 +3,30 @@
|
||||
.openapi-generator-ignore
|
||||
README.md
|
||||
docs/AnnotationsApi.md
|
||||
docs/ArcherAdminApi.md
|
||||
docs/AuthApi.md
|
||||
docs/DtoAnnotationResponse.md
|
||||
docs/DtoAuthStartResponse.md
|
||||
docs/DtoCreateAnnotationRequest.md
|
||||
docs/DtoCreateLabelRequest.md
|
||||
docs/DtoCreateSSHRequest.md
|
||||
docs/DtoCreateServerRequest.md
|
||||
docs/DtoCreateTaintRequest.md
|
||||
docs/DtoJWK.md
|
||||
docs/DtoJWKS.md
|
||||
docs/DtoJob.md
|
||||
docs/DtoJobStatus.md
|
||||
docs/DtoLabelResponse.md
|
||||
docs/DtoLogoutRequest.md
|
||||
docs/DtoPageJob.md
|
||||
docs/DtoQueueInfo.md
|
||||
docs/DtoRefreshRequest.md
|
||||
docs/DtoServerResponse.md
|
||||
docs/DtoSshResponse.md
|
||||
docs/DtoSshRevealResponse.md
|
||||
docs/DtoTaintResponse.md
|
||||
docs/DtoTokenPair.md
|
||||
docs/DtoUpdateAnnotationRequest.md
|
||||
docs/DtoUpdateLabelRequest.md
|
||||
docs/DtoUpdateServerRequest.md
|
||||
docs/DtoUpdateTaintRequest.md
|
||||
@@ -49,6 +56,7 @@ docs/TaintsApi.md
|
||||
docs/UtilsErrorResponse.md
|
||||
package.json
|
||||
src/apis/AnnotationsApi.ts
|
||||
src/apis/ArcherAdminApi.ts
|
||||
src/apis/AuthApi.ts
|
||||
src/apis/HealthApi.ts
|
||||
src/apis/LabelsApi.ts
|
||||
@@ -62,20 +70,26 @@ src/apis/index.ts
|
||||
src/index.ts
|
||||
src/models/DtoAnnotationResponse.ts
|
||||
src/models/DtoAuthStartResponse.ts
|
||||
src/models/DtoCreateAnnotationRequest.ts
|
||||
src/models/DtoCreateLabelRequest.ts
|
||||
src/models/DtoCreateSSHRequest.ts
|
||||
src/models/DtoCreateServerRequest.ts
|
||||
src/models/DtoCreateTaintRequest.ts
|
||||
src/models/DtoJWK.ts
|
||||
src/models/DtoJWKS.ts
|
||||
src/models/DtoJob.ts
|
||||
src/models/DtoJobStatus.ts
|
||||
src/models/DtoLabelResponse.ts
|
||||
src/models/DtoLogoutRequest.ts
|
||||
src/models/DtoPageJob.ts
|
||||
src/models/DtoQueueInfo.ts
|
||||
src/models/DtoRefreshRequest.ts
|
||||
src/models/DtoServerResponse.ts
|
||||
src/models/DtoSshResponse.ts
|
||||
src/models/DtoSshRevealResponse.ts
|
||||
src/models/DtoTaintResponse.ts
|
||||
src/models/DtoTokenPair.ts
|
||||
src/models/DtoUpdateAnnotationRequest.ts
|
||||
src/models/DtoUpdateLabelRequest.ts
|
||||
src/models/DtoUpdateServerRequest.ts
|
||||
src/models/DtoUpdateTaintRequest.ts
|
||||
|
||||
@@ -16,16 +16,31 @@
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
DtoAnnotationResponse,
|
||||
DtoCreateAnnotationRequest,
|
||||
DtoUpdateAnnotationRequest,
|
||||
} from '../models/index';
|
||||
import {
|
||||
DtoAnnotationResponseFromJSON,
|
||||
DtoAnnotationResponseToJSON,
|
||||
DtoCreateAnnotationRequestFromJSON,
|
||||
DtoCreateAnnotationRequestToJSON,
|
||||
DtoUpdateAnnotationRequestFromJSON,
|
||||
DtoUpdateAnnotationRequestToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface CreateAnnotationRequest {
|
||||
body: DtoCreateAnnotationRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface DeleteAnnotationRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
export interface GetAnnotationRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
include?: string;
|
||||
}
|
||||
|
||||
export interface ListAnnotationsRequest {
|
||||
@@ -35,11 +50,133 @@ export interface ListAnnotationsRequest {
|
||||
q?: string;
|
||||
}
|
||||
|
||||
export interface UpdateAnnotationRequest {
|
||||
id: string;
|
||||
body: DtoUpdateAnnotationRequest;
|
||||
xOrgID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AnnotationsApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates an annotation.
|
||||
* Create annotation (org scoped)
|
||||
*/
|
||||
async createAnnotationRaw(requestParameters: CreateAnnotationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DtoAnnotationResponse>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling createAnnotation().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (requestParameters['xOrgID'] != null) {
|
||||
headerParameters['X-Org-ID'] = String(requestParameters['xOrgID']);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] = await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] = await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/annotations`;
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoCreateAnnotationRequestToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DtoAnnotationResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an annotation.
|
||||
* Create annotation (org scoped)
|
||||
*/
|
||||
async createAnnotation(requestParameters: CreateAnnotationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DtoAnnotationResponse> {
|
||||
const response = await this.createAnnotationRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the annotation.
|
||||
* Delete annotation (org scoped)
|
||||
*/
|
||||
async deleteAnnotationRaw(requestParameters: DeleteAnnotationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling deleteAnnotation().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters['xOrgID'] != null) {
|
||||
headerParameters['X-Org-ID'] = String(requestParameters['xOrgID']);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] = await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] = await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/annotations/{id}`;
|
||||
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
if (this.isJsonMime(response.headers.get('content-type'))) {
|
||||
return new runtime.JSONApiResponse<string>(response);
|
||||
} else {
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Permanently deletes the annotation.
|
||||
* Delete annotation (org scoped)
|
||||
*/
|
||||
async deleteAnnotation(requestParameters: DeleteAnnotationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
||||
const response = await this.deleteAnnotationRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one annotation. Add `include=node_pools` to include node pools.
|
||||
* Get annotation by ID (org scoped)
|
||||
@@ -54,10 +191,6 @@ export class AnnotationsApi extends runtime.BaseAPI {
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['include'] != null) {
|
||||
queryParameters['include'] = requestParameters['include'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters['xOrgID'] != null) {
|
||||
@@ -158,4 +291,69 @@ export class AnnotationsApi extends runtime.BaseAPI {
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update annotation fields.
|
||||
* Update annotation (org scoped)
|
||||
*/
|
||||
async updateAnnotationRaw(requestParameters: UpdateAnnotationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DtoAnnotationResponse>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling updateAnnotation().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling updateAnnotation().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (requestParameters['xOrgID'] != null) {
|
||||
headerParameters['X-Org-ID'] = String(requestParameters['xOrgID']);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] = await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] = await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/annotations/{id}`;
|
||||
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: DtoUpdateAnnotationRequestToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DtoAnnotationResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially update annotation fields.
|
||||
* Update annotation (org scoped)
|
||||
*/
|
||||
async updateAnnotation(requestParameters: UpdateAnnotationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DtoAnnotationResponse> {
|
||||
const response = await this.updateAnnotationRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
291
ui/src/sdk/apis/ArcherAdminApi.ts
Normal file
291
ui/src/sdk/apis/ArcherAdminApi.ts
Normal file
@@ -0,0 +1,291 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
DtoJob,
|
||||
DtoPageJob,
|
||||
DtoQueueInfo,
|
||||
} from '../models/index';
|
||||
import {
|
||||
DtoJobFromJSON,
|
||||
DtoJobToJSON,
|
||||
DtoPageJobFromJSON,
|
||||
DtoPageJobToJSON,
|
||||
DtoQueueInfoFromJSON,
|
||||
DtoQueueInfoToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AdminCancelArcherJobRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AdminEnqueueArcherJobRequest {
|
||||
body: object;
|
||||
}
|
||||
|
||||
export interface AdminListArcherJobsRequest {
|
||||
status?: AdminListArcherJobsStatusEnum;
|
||||
queue?: string;
|
||||
q?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface AdminRetryArcherJobRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ArcherAdminApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Set job status to canceled if cancellable. For running jobs, this only affects future picks; wire to Archer if you need active kill.
|
||||
* Cancel an Archer job (admin)
|
||||
*/
|
||||
async adminCancelArcherJobRaw(requestParameters: AdminCancelArcherJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DtoJob>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling adminCancelArcherJob().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/admin/archer/jobs/{id}/cancel`;
|
||||
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DtoJobFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set job status to canceled if cancellable. For running jobs, this only affects future picks; wire to Archer if you need active kill.
|
||||
* Cancel an Archer job (admin)
|
||||
*/
|
||||
async adminCancelArcherJob(requestParameters: AdminCancelArcherJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DtoJob> {
|
||||
const response = await this.adminCancelArcherJobRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a job immediately or schedule it for the future via `run_at`.
|
||||
* Enqueue a new Archer job (admin)
|
||||
*/
|
||||
async adminEnqueueArcherJobRaw(requestParameters: AdminEnqueueArcherJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DtoJob>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling adminEnqueueArcherJob().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/admin/archer/jobs`;
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters['body'] as any,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DtoJobFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a job immediately or schedule it for the future via `run_at`.
|
||||
* Enqueue a new Archer job (admin)
|
||||
*/
|
||||
async adminEnqueueArcherJob(requestParameters: AdminEnqueueArcherJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DtoJob> {
|
||||
const response = await this.adminEnqueueArcherJobRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Paginated background jobs with optional filters. Search `q` may match id, type, error, payload (implementation-dependent).
|
||||
* List Archer jobs (admin)
|
||||
*/
|
||||
async adminListArcherJobsRaw(requestParameters: AdminListArcherJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DtoPageJob>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['status'] != null) {
|
||||
queryParameters['status'] = requestParameters['status'];
|
||||
}
|
||||
|
||||
if (requestParameters['queue'] != null) {
|
||||
queryParameters['queue'] = requestParameters['queue'];
|
||||
}
|
||||
|
||||
if (requestParameters['q'] != null) {
|
||||
queryParameters['q'] = requestParameters['q'];
|
||||
}
|
||||
|
||||
if (requestParameters['page'] != null) {
|
||||
queryParameters['page'] = requestParameters['page'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/admin/archer/jobs`;
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DtoPageJobFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Paginated background jobs with optional filters. Search `q` may match id, type, error, payload (implementation-dependent).
|
||||
* List Archer jobs (admin)
|
||||
*/
|
||||
async adminListArcherJobs(requestParameters: AdminListArcherJobsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DtoPageJob> {
|
||||
const response = await this.adminListArcherJobsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Summary metrics per queue (pending, running, failed, scheduled).
|
||||
* List Archer queues (admin)
|
||||
*/
|
||||
async adminListArcherQueuesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DtoQueueInfo>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/admin/archer/queues`;
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DtoQueueInfoFromJSON));
|
||||
}
|
||||
|
||||
/**
|
||||
* Summary metrics per queue (pending, running, failed, scheduled).
|
||||
* List Archer queues (admin)
|
||||
*/
|
||||
async adminListArcherQueues(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DtoQueueInfo>> {
|
||||
const response = await this.adminListArcherQueuesRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the job retriable (DB flip). Swap this for an Archer admin call if you expose one.
|
||||
* Retry a failed/canceled Archer job (admin)
|
||||
*/
|
||||
async adminRetryArcherJobRaw(requestParameters: AdminRetryArcherJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DtoJob>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling adminRetryArcherJob().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
|
||||
let urlPath = `/admin/archer/jobs/{id}/retry`;
|
||||
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DtoJobFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the job retriable (DB flip). Swap this for an Archer admin call if you expose one.
|
||||
* Retry a failed/canceled Archer job (admin)
|
||||
*/
|
||||
async adminRetryArcherJob(requestParameters: AdminRetryArcherJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DtoJob> {
|
||||
const response = await this.adminRetryArcherJobRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const AdminListArcherJobsStatusEnum = {
|
||||
queued: 'queued',
|
||||
running: 'running',
|
||||
succeeded: 'succeeded',
|
||||
failed: 'failed',
|
||||
canceled: 'canceled',
|
||||
retrying: 'retrying',
|
||||
scheduled: 'scheduled'
|
||||
} as const;
|
||||
export type AdminListArcherJobsStatusEnum = typeof AdminListArcherJobsStatusEnum[keyof typeof AdminListArcherJobsStatusEnum];
|
||||
@@ -1,6 +1,7 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './AnnotationsApi';
|
||||
export * from './ArcherAdminApi';
|
||||
export * from './AuthApi';
|
||||
export * from './HealthApi';
|
||||
export * from './LabelsApi';
|
||||
|
||||
@@ -4,14 +4,181 @@ All URIs are relative to *http://localhost:8080/api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**createAnnotation**](AnnotationsApi.md#createannotation) | **POST** /annotations | Create annotation (org scoped) |
|
||||
| [**deleteAnnotation**](AnnotationsApi.md#deleteannotation) | **DELETE** /annotations/{id} | Delete annotation (org scoped) |
|
||||
| [**getAnnotation**](AnnotationsApi.md#getannotation) | **GET** /annotations/{id} | Get annotation by ID (org scoped) |
|
||||
| [**listAnnotations**](AnnotationsApi.md#listannotations) | **GET** /annotations | List annotations (org scoped) |
|
||||
| [**updateAnnotation**](AnnotationsApi.md#updateannotation) | **PATCH** /annotations/{id} | Update annotation (org scoped) |
|
||||
|
||||
|
||||
|
||||
## createAnnotation
|
||||
|
||||
> DtoAnnotationResponse createAnnotation(body, xOrgID)
|
||||
|
||||
Create annotation (org scoped)
|
||||
|
||||
Creates an annotation.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
AnnotationsApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { CreateAnnotationRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: OrgKeyAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
// To configure API key authorization: OrgSecretAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new AnnotationsApi(config);
|
||||
|
||||
const body = {
|
||||
// DtoCreateAnnotationRequest | Annotation payload
|
||||
body: ...,
|
||||
// string | Organization UUID (optional)
|
||||
xOrgID: xOrgID_example,
|
||||
} satisfies CreateAnnotationRequest;
|
||||
|
||||
try {
|
||||
const data = await api.createAnnotation(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | [DtoCreateAnnotationRequest](DtoCreateAnnotationRequest.md) | Annotation payload | |
|
||||
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoAnnotationResponse**](DtoAnnotationResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **201** | Created | - |
|
||||
| **400** | invalid json / missing fields | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | organization required | - |
|
||||
| **500** | create failed | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## deleteAnnotation
|
||||
|
||||
> string deleteAnnotation(id, xOrgID)
|
||||
|
||||
Delete annotation (org scoped)
|
||||
|
||||
Permanently deletes the annotation.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
AnnotationsApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { DeleteAnnotationRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: OrgKeyAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
// To configure API key authorization: OrgSecretAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new AnnotationsApi(config);
|
||||
|
||||
const body = {
|
||||
// string | Annotation ID (UUID)
|
||||
id: id_example,
|
||||
// string | Organization UUID (optional)
|
||||
xOrgID: xOrgID_example,
|
||||
} satisfies DeleteAnnotationRequest;
|
||||
|
||||
try {
|
||||
const data = await api.deleteAnnotation(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **id** | `string` | Annotation ID (UUID) | [Defaults to `undefined`] |
|
||||
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
|
||||
|
||||
### Return type
|
||||
|
||||
**string**
|
||||
|
||||
### Authorization
|
||||
|
||||
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **204** | No Content | - |
|
||||
| **400** | invalid id | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | organization required | - |
|
||||
| **500** | delete failed | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## getAnnotation
|
||||
|
||||
> DtoAnnotationResponse getAnnotation(id, xOrgID, include)
|
||||
> DtoAnnotationResponse getAnnotation(id, xOrgID)
|
||||
|
||||
Get annotation by ID (org scoped)
|
||||
|
||||
@@ -43,8 +210,6 @@ async function example() {
|
||||
id: id_example,
|
||||
// string | Organization UUID (optional)
|
||||
xOrgID: xOrgID_example,
|
||||
// string | Optional: node_pools (optional)
|
||||
include: include_example,
|
||||
} satisfies GetAnnotationRequest;
|
||||
|
||||
try {
|
||||
@@ -66,7 +231,6 @@ example().catch(console.error);
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **id** | `string` | Annotation ID (UUID) | [Defaults to `undefined`] |
|
||||
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
|
||||
| **include** | `string` | Optional: node_pools | [Optional] [Defaults to `undefined`] |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -181,3 +345,89 @@ example().catch(console.error);
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## updateAnnotation
|
||||
|
||||
> DtoAnnotationResponse updateAnnotation(id, body, xOrgID)
|
||||
|
||||
Update annotation (org scoped)
|
||||
|
||||
Partially update annotation fields.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
AnnotationsApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { UpdateAnnotationRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: OrgKeyAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
// To configure API key authorization: OrgSecretAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new AnnotationsApi(config);
|
||||
|
||||
const body = {
|
||||
// string | Annotation ID (UUID)
|
||||
id: id_example,
|
||||
// DtoUpdateAnnotationRequest | Fields to update
|
||||
body: ...,
|
||||
// string | Organization UUID (optional)
|
||||
xOrgID: xOrgID_example,
|
||||
} satisfies UpdateAnnotationRequest;
|
||||
|
||||
try {
|
||||
const data = await api.updateAnnotation(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **id** | `string` | Annotation ID (UUID) | [Defaults to `undefined`] |
|
||||
| **body** | [DtoUpdateAnnotationRequest](DtoUpdateAnnotationRequest.md) | Fields to update | |
|
||||
| **xOrgID** | `string` | Organization UUID | [Optional] [Defaults to `undefined`] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoAnnotationResponse**](DtoAnnotationResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[OrgKeyAuth](../README.md#OrgKeyAuth), [OrgSecretAuth](../README.md#OrgSecretAuth), [BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
| **400** | invalid id / invalid json | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | organization required | - |
|
||||
| **404** | not found | - |
|
||||
| **500** | update failed | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
390
ui/src/sdk/docs/ArcherAdminApi.md
Normal file
390
ui/src/sdk/docs/ArcherAdminApi.md
Normal file
@@ -0,0 +1,390 @@
|
||||
# ArcherAdminApi
|
||||
|
||||
All URIs are relative to *http://localhost:8080/api/v1*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**adminCancelArcherJob**](ArcherAdminApi.md#admincancelarcherjob) | **POST** /admin/archer/jobs/{id}/cancel | Cancel an Archer job (admin) |
|
||||
| [**adminEnqueueArcherJob**](ArcherAdminApi.md#adminenqueuearcherjob) | **POST** /admin/archer/jobs | Enqueue a new Archer job (admin) |
|
||||
| [**adminListArcherJobs**](ArcherAdminApi.md#adminlistarcherjobs) | **GET** /admin/archer/jobs | List Archer jobs (admin) |
|
||||
| [**adminListArcherQueues**](ArcherAdminApi.md#adminlistarcherqueues) | **GET** /admin/archer/queues | List Archer queues (admin) |
|
||||
| [**adminRetryArcherJob**](ArcherAdminApi.md#adminretryarcherjob) | **POST** /admin/archer/jobs/{id}/retry | Retry a failed/canceled Archer job (admin) |
|
||||
|
||||
|
||||
|
||||
## adminCancelArcherJob
|
||||
|
||||
> DtoJob adminCancelArcherJob(id)
|
||||
|
||||
Cancel an Archer job (admin)
|
||||
|
||||
Set job status to canceled if cancellable. For running jobs, this only affects future picks; wire to Archer if you need active kill.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
ArcherAdminApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { AdminCancelArcherJobRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new ArcherAdminApi(config);
|
||||
|
||||
const body = {
|
||||
// string | Job ID
|
||||
id: id_example,
|
||||
} satisfies AdminCancelArcherJobRequest;
|
||||
|
||||
try {
|
||||
const data = await api.adminCancelArcherJob(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **id** | `string` | Job ID | [Defaults to `undefined`] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoJob**](DtoJob.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
| **400** | invalid job or not cancellable | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | forbidden | - |
|
||||
| **404** | not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## adminEnqueueArcherJob
|
||||
|
||||
> DtoJob adminEnqueueArcherJob(body)
|
||||
|
||||
Enqueue a new Archer job (admin)
|
||||
|
||||
Create a job immediately or schedule it for the future via `run_at`.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
ArcherAdminApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { AdminEnqueueArcherJobRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new ArcherAdminApi(config);
|
||||
|
||||
const body = {
|
||||
// object | Job parameters
|
||||
body: Object,
|
||||
} satisfies AdminEnqueueArcherJobRequest;
|
||||
|
||||
try {
|
||||
const data = await api.adminEnqueueArcherJob(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **body** | `object` | Job parameters | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoJob**](DtoJob.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
| **400** | invalid json or missing fields | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | forbidden | - |
|
||||
| **500** | internal error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## adminListArcherJobs
|
||||
|
||||
> DtoPageJob adminListArcherJobs(status, queue, q, page, pageSize)
|
||||
|
||||
List Archer jobs (admin)
|
||||
|
||||
Paginated background jobs with optional filters. Search `q` may match id, type, error, payload (implementation-dependent).
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
ArcherAdminApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { AdminListArcherJobsRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new ArcherAdminApi(config);
|
||||
|
||||
const body = {
|
||||
// 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' | 'retrying' | 'scheduled' | Filter by status (optional)
|
||||
status: status_example,
|
||||
// string | Filter by queue name / worker name (optional)
|
||||
queue: queue_example,
|
||||
// string | Free-text search (optional)
|
||||
q: q_example,
|
||||
// number | Page number (optional)
|
||||
page: 56,
|
||||
// number | Items per page (optional)
|
||||
pageSize: 56,
|
||||
} satisfies AdminListArcherJobsRequest;
|
||||
|
||||
try {
|
||||
const data = await api.adminListArcherJobs(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **status** | `queued`, `running`, `succeeded`, `failed`, `canceled`, `retrying`, `scheduled` | Filter by status | [Optional] [Defaults to `undefined`] [Enum: queued, running, succeeded, failed, canceled, retrying, scheduled] |
|
||||
| **queue** | `string` | Filter by queue name / worker name | [Optional] [Defaults to `undefined`] |
|
||||
| **q** | `string` | Free-text search | [Optional] [Defaults to `undefined`] |
|
||||
| **page** | `number` | Page number | [Optional] [Defaults to `1`] |
|
||||
| **pageSize** | `number` | Items per page | [Optional] [Defaults to `25`] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoPageJob**](DtoPageJob.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | forbidden | - |
|
||||
| **500** | internal error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## adminListArcherQueues
|
||||
|
||||
> Array<DtoQueueInfo> adminListArcherQueues()
|
||||
|
||||
List Archer queues (admin)
|
||||
|
||||
Summary metrics per queue (pending, running, failed, scheduled).
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
ArcherAdminApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { AdminListArcherQueuesRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new ArcherAdminApi(config);
|
||||
|
||||
try {
|
||||
const data = await api.adminListArcherQueues();
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**Array<DtoQueueInfo>**](DtoQueueInfo.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | forbidden | - |
|
||||
| **500** | internal error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
## adminRetryArcherJob
|
||||
|
||||
> DtoJob adminRetryArcherJob(id)
|
||||
|
||||
Retry a failed/canceled Archer job (admin)
|
||||
|
||||
Marks the job retriable (DB flip). Swap this for an Archer admin call if you expose one.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
Configuration,
|
||||
ArcherAdminApi,
|
||||
} from '@glueops/autoglue-sdk-go';
|
||||
import type { AdminRetryArcherJobRequest } from '@glueops/autoglue-sdk-go';
|
||||
|
||||
async function example() {
|
||||
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
|
||||
const config = new Configuration({
|
||||
// To configure API key authorization: BearerAuth
|
||||
apiKey: "YOUR API KEY",
|
||||
});
|
||||
const api = new ArcherAdminApi(config);
|
||||
|
||||
const body = {
|
||||
// string | Job ID
|
||||
id: id_example,
|
||||
} satisfies AdminRetryArcherJobRequest;
|
||||
|
||||
try {
|
||||
const data = await api.adminRetryArcherJob(body);
|
||||
console.log(data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the test
|
||||
example().catch(console.error);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **id** | `string` | Job ID | [Defaults to `undefined`] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**DtoJob**](DtoJob.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `application/json`
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
| **400** | invalid job or not eligible | - |
|
||||
| **401** | Unauthorized | - |
|
||||
| **403** | forbidden | - |
|
||||
| **404** | not found | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
36
ui/src/sdk/docs/DtoCreateAnnotationRequest.md
Normal file
36
ui/src/sdk/docs/DtoCreateAnnotationRequest.md
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
# DtoCreateAnnotationRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`key` | string
|
||||
`value` | string
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoCreateAnnotationRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"key": null,
|
||||
"value": null,
|
||||
} satisfies DtoCreateAnnotationRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoCreateAnnotationRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
54
ui/src/sdk/docs/DtoJob.md
Normal file
54
ui/src/sdk/docs/DtoJob.md
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
# DtoJob
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`attempts` | number
|
||||
`created_at` | string
|
||||
`id` | string
|
||||
`last_error` | string
|
||||
`max_attempts` | number
|
||||
`payload` | object
|
||||
`queue` | string
|
||||
`run_at` | string
|
||||
`status` | [DtoJobStatus](DtoJobStatus.md)
|
||||
`type` | string
|
||||
`updated_at` | string
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoJob } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"attempts": null,
|
||||
"created_at": null,
|
||||
"id": null,
|
||||
"last_error": null,
|
||||
"max_attempts": null,
|
||||
"payload": null,
|
||||
"queue": null,
|
||||
"run_at": null,
|
||||
"status": null,
|
||||
"type": null,
|
||||
"updated_at": null,
|
||||
} satisfies DtoJob
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoJob
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
32
ui/src/sdk/docs/DtoJobStatus.md
Normal file
32
ui/src/sdk/docs/DtoJobStatus.md
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
# DtoJobStatus
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoJobStatus } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
} satisfies DtoJobStatus
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoJobStatus
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
40
ui/src/sdk/docs/DtoPageJob.md
Normal file
40
ui/src/sdk/docs/DtoPageJob.md
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
# DtoPageJob
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`items` | [Array<DtoJob>](DtoJob.md)
|
||||
`page` | number
|
||||
`page_size` | number
|
||||
`total` | number
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoPageJob } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"items": null,
|
||||
"page": null,
|
||||
"page_size": null,
|
||||
"total": null,
|
||||
} satisfies DtoPageJob
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoPageJob
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
42
ui/src/sdk/docs/DtoQueueInfo.md
Normal file
42
ui/src/sdk/docs/DtoQueueInfo.md
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
# DtoQueueInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`failed` | number
|
||||
`name` | string
|
||||
`pending` | number
|
||||
`running` | number
|
||||
`scheduled` | number
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoQueueInfo } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"failed": null,
|
||||
"name": null,
|
||||
"pending": null,
|
||||
"running": null,
|
||||
"scheduled": null,
|
||||
} satisfies DtoQueueInfo
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoQueueInfo
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
36
ui/src/sdk/docs/DtoUpdateAnnotationRequest.md
Normal file
36
ui/src/sdk/docs/DtoUpdateAnnotationRequest.md
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
# DtoUpdateAnnotationRequest
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type
|
||||
------------ | -------------
|
||||
`key` | string
|
||||
`value` | string
|
||||
|
||||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DtoUpdateAnnotationRequest } from '@glueops/autoglue-sdk-go'
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"key": null,
|
||||
"value": null,
|
||||
} satisfies DtoUpdateAnnotationRequest
|
||||
|
||||
console.log(example)
|
||||
|
||||
// Convert the instance to a JSON string
|
||||
const exampleJSON: string = JSON.stringify(example)
|
||||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DtoUpdateAnnotationRequest
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ Name | Type
|
||||
`display_name` | string
|
||||
`emails` | [Array<ModelsUserEmail>](ModelsUserEmail.md)
|
||||
`id` | string
|
||||
`is_admin` | boolean
|
||||
`is_disabled` | boolean
|
||||
`organizations` | [Array<ModelsOrganization>](ModelsOrganization.md)
|
||||
`primary_email` | string
|
||||
@@ -28,6 +29,7 @@ const example = {
|
||||
"display_name": null,
|
||||
"emails": null,
|
||||
"id": null,
|
||||
"is_admin": null,
|
||||
"is_disabled": null,
|
||||
"organizations": null,
|
||||
"primary_email": null,
|
||||
|
||||
@@ -10,6 +10,7 @@ Name | Type
|
||||
`created_at` | Date
|
||||
`display_name` | string
|
||||
`id` | string
|
||||
`is_admin` | boolean
|
||||
`is_disabled` | boolean
|
||||
`primary_email` | string
|
||||
`updated_at` | Date
|
||||
@@ -25,6 +26,7 @@ const example = {
|
||||
"created_at": null,
|
||||
"display_name": null,
|
||||
"id": null,
|
||||
"is_admin": null,
|
||||
"is_disabled": null,
|
||||
"primary_email": null,
|
||||
"updated_at": null,
|
||||
|
||||
73
ui/src/sdk/models/DtoCreateAnnotationRequest.ts
Normal file
73
ui/src/sdk/models/DtoCreateAnnotationRequest.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: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoCreateAnnotationRequest
|
||||
*/
|
||||
export interface DtoCreateAnnotationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateAnnotationRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoCreateAnnotationRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoCreateAnnotationRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoCreateAnnotationRequest(value: object): value is DtoCreateAnnotationRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestFromJSON(json: any): DtoCreateAnnotationRequest {
|
||||
return DtoCreateAnnotationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoCreateAnnotationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'key': json['key'] == null ? undefined : json['key'],
|
||||
'value': json['value'] == null ? undefined : json['value'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestToJSON(json: any): DtoCreateAnnotationRequest {
|
||||
return DtoCreateAnnotationRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoCreateAnnotationRequestToJSONTyped(value?: DtoCreateAnnotationRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'key': value['key'],
|
||||
'value': value['value'],
|
||||
};
|
||||
}
|
||||
|
||||
156
ui/src/sdk/models/DtoJob.ts
Normal file
156
ui/src/sdk/models/DtoJob.ts
Normal file
@@ -0,0 +1,156 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DtoJobStatus } from './DtoJobStatus';
|
||||
import {
|
||||
DtoJobStatusFromJSON,
|
||||
DtoJobStatusFromJSONTyped,
|
||||
DtoJobStatusToJSON,
|
||||
DtoJobStatusToJSONTyped,
|
||||
} from './DtoJobStatus';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoJob
|
||||
*/
|
||||
export interface DtoJob {
|
||||
/**
|
||||
* example: 0
|
||||
* @type {number}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
attempts?: number;
|
||||
/**
|
||||
* example: 2025-11-04T09:30:00Z
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
* example: 01HF7SZK8Z8WG1M3J7S2Z8M2N6
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* example: dial tcp: i/o timeout
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
last_error?: string;
|
||||
/**
|
||||
* example: 3
|
||||
* @type {number}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
max_attempts?: number;
|
||||
/**
|
||||
* arbitrary JSON payload
|
||||
* @type {object}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
payload?: object;
|
||||
/**
|
||||
* example: default
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
queue?: string;
|
||||
/**
|
||||
* example: 2025-11-05T08:00:00Z
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
run_at?: string;
|
||||
/**
|
||||
* enum: queued,running,succeeded,failed,canceled,retrying,scheduled
|
||||
* example: queued
|
||||
* @type {DtoJobStatus}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
status?: DtoJobStatus;
|
||||
/**
|
||||
* example: email.send
|
||||
* @type {string}
|
||||
* @memberof DtoJob
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* example: 2025-11-04T09:31:00Z
|
||||
* @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'],
|
||||
};
|
||||
}
|
||||
|
||||
58
ui/src/sdk/models/DtoJobStatus.ts
Normal file
58
ui/src/sdk/models/DtoJobStatus.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const DtoJobStatus = {
|
||||
StatusQueued: 'queued',
|
||||
StatusRunning: 'running',
|
||||
StatusSucceeded: 'succeeded',
|
||||
StatusFailed: 'failed',
|
||||
StatusCanceled: 'canceled',
|
||||
StatusRetrying: 'retrying',
|
||||
StatusScheduled: 'scheduled'
|
||||
} as const;
|
||||
export type DtoJobStatus = typeof DtoJobStatus[keyof typeof DtoJobStatus];
|
||||
|
||||
|
||||
export function instanceOfDtoJobStatus(value: any): boolean {
|
||||
for (const key in DtoJobStatus) {
|
||||
if (Object.prototype.hasOwnProperty.call(DtoJobStatus, key)) {
|
||||
if (DtoJobStatus[key as keyof typeof DtoJobStatus] === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function DtoJobStatusFromJSON(json: any): DtoJobStatus {
|
||||
return DtoJobStatusFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoJobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoJobStatus {
|
||||
return json as DtoJobStatus;
|
||||
}
|
||||
|
||||
export function DtoJobStatusToJSON(value?: DtoJobStatus | null): any {
|
||||
return value as any;
|
||||
}
|
||||
|
||||
export function DtoJobStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): DtoJobStatus {
|
||||
return value as DtoJobStatus;
|
||||
}
|
||||
|
||||
97
ui/src/sdk/models/DtoPageJob.ts
Normal file
97
ui/src/sdk/models/DtoPageJob.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DtoJob } from './DtoJob';
|
||||
import {
|
||||
DtoJobFromJSON,
|
||||
DtoJobFromJSONTyped,
|
||||
DtoJobToJSON,
|
||||
DtoJobToJSONTyped,
|
||||
} from './DtoJob';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoPageJob
|
||||
*/
|
||||
export interface DtoPageJob {
|
||||
/**
|
||||
*
|
||||
* @type {Array<DtoJob>}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
items?: Array<DtoJob>;
|
||||
/**
|
||||
* example: 1
|
||||
* @type {number}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* example: 25
|
||||
* @type {number}
|
||||
* @memberof DtoPageJob
|
||||
*/
|
||||
page_size?: number;
|
||||
/**
|
||||
* example: 120
|
||||
* @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'],
|
||||
};
|
||||
}
|
||||
|
||||
97
ui/src/sdk/models/DtoQueueInfo.ts
Normal file
97
ui/src/sdk/models/DtoQueueInfo.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoQueueInfo
|
||||
*/
|
||||
export interface DtoQueueInfo {
|
||||
/**
|
||||
* example: 5
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
failed?: number;
|
||||
/**
|
||||
* example: default
|
||||
* @type {string}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* example: 42
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
pending?: number;
|
||||
/**
|
||||
* example: 3
|
||||
* @type {number}
|
||||
* @memberof DtoQueueInfo
|
||||
*/
|
||||
running?: number;
|
||||
/**
|
||||
* example: 7
|
||||
* @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'],
|
||||
};
|
||||
}
|
||||
|
||||
73
ui/src/sdk/models/DtoUpdateAnnotationRequest.ts
Normal file
73
ui/src/sdk/models/DtoUpdateAnnotationRequest.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: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoUpdateAnnotationRequest
|
||||
*/
|
||||
export interface DtoUpdateAnnotationRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateAnnotationRequest
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoUpdateAnnotationRequest
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoUpdateAnnotationRequest interface.
|
||||
*/
|
||||
export function instanceOfDtoUpdateAnnotationRequest(value: object): value is DtoUpdateAnnotationRequest {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestFromJSON(json: any): DtoUpdateAnnotationRequest {
|
||||
return DtoUpdateAnnotationRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DtoUpdateAnnotationRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'key': json['key'] == null ? undefined : json['key'],
|
||||
'value': json['value'] == null ? undefined : json['value'],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestToJSON(json: any): DtoUpdateAnnotationRequest {
|
||||
return DtoUpdateAnnotationRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoUpdateAnnotationRequestToJSONTyped(value?: DtoUpdateAnnotationRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'key': value['key'],
|
||||
'value': value['value'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -64,6 +64,12 @@ export interface HandlersMeResponse {
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof HandlersMeResponse
|
||||
*/
|
||||
is_admin?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
@@ -112,6 +118,7 @@ export function HandlersMeResponseFromJSONTyped(json: any, ignoreDiscriminator:
|
||||
'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'],
|
||||
@@ -135,6 +142,7 @@ export function HandlersMeResponseToJSONTyped(value?: HandlersMeResponse | null,
|
||||
'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'],
|
||||
|
||||
@@ -43,6 +43,12 @@ export interface ModelsUser {
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ModelsUser
|
||||
*/
|
||||
is_admin?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
@@ -84,6 +90,7 @@ export function ModelsUserFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
'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'])),
|
||||
@@ -105,6 +112,7 @@ export function ModelsUserToJSONTyped(value?: ModelsUser | null, ignoreDiscrimin
|
||||
'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(),
|
||||
|
||||
@@ -2,20 +2,26 @@
|
||||
/* eslint-disable */
|
||||
export * from './DtoAnnotationResponse';
|
||||
export * from './DtoAuthStartResponse';
|
||||
export * from './DtoCreateAnnotationRequest';
|
||||
export * from './DtoCreateLabelRequest';
|
||||
export * from './DtoCreateSSHRequest';
|
||||
export * from './DtoCreateServerRequest';
|
||||
export * from './DtoCreateTaintRequest';
|
||||
export * from './DtoJWK';
|
||||
export * from './DtoJWKS';
|
||||
export * from './DtoJob';
|
||||
export * from './DtoJobStatus';
|
||||
export * from './DtoLabelResponse';
|
||||
export * from './DtoLogoutRequest';
|
||||
export * from './DtoPageJob';
|
||||
export * from './DtoQueueInfo';
|
||||
export * from './DtoRefreshRequest';
|
||||
export * from './DtoServerResponse';
|
||||
export * from './DtoSshResponse';
|
||||
export * from './DtoSshRevealResponse';
|
||||
export * from './DtoTaintResponse';
|
||||
export * from './DtoTokenPair';
|
||||
export * from './DtoUpdateAnnotationRequest';
|
||||
export * from './DtoUpdateLabelRequest';
|
||||
export * from './DtoUpdateServerRequest';
|
||||
export * from './DtoUpdateTaintRequest';
|
||||
|
||||
Reference in New Issue
Block a user