mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
feat: adding background jobs, Dockerfile
This commit is contained in:
191
sdk/ts/src/apis/AnnotationsApi.ts
Normal file
191
sdk/ts/src/apis/AnnotationsApi.ts
Normal file
@@ -0,0 +1,191 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type { DtoAnnotationResponse } from "../models/index";
|
||||
import {
|
||||
DtoAnnotationResponseFromJSON,
|
||||
DtoAnnotationResponseToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
export interface GetAnnotationRequest {
|
||||
id: string;
|
||||
xOrgID?: string;
|
||||
include?: string;
|
||||
}
|
||||
|
||||
export interface ListAnnotationsRequest {
|
||||
xOrgID?: string;
|
||||
name?: string;
|
||||
value?: string;
|
||||
q?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AnnotationsApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Returns one annotation. Add `include=node_pools` to include node pools.
|
||||
* Get annotation by ID (org scoped)
|
||||
*/
|
||||
async getAnnotationRaw(
|
||||
requestParameters: GetAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<DtoAnnotationResponse>> {
|
||||
if (requestParameters["id"] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
'Required parameter "id" was null or undefined when calling getAnnotation().',
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["include"] != null) {
|
||||
queryParameters["include"] = requestParameters["include"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations/{id}`;
|
||||
urlPath = urlPath.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters["id"])),
|
||||
);
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
DtoAnnotationResponseFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one annotation. Add `include=node_pools` to include node pools.
|
||||
* Get annotation by ID (org scoped)
|
||||
*/
|
||||
async getAnnotation(
|
||||
requestParameters: GetAnnotationRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<DtoAnnotationResponse> {
|
||||
const response = await this.getAnnotationRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns annotations for the organization in X-Org-ID. Filters: `name`, `value`, and `q` (name contains). Add `include=node_pools` to include linked node pools.
|
||||
* List annotations (org scoped)
|
||||
*/
|
||||
async listAnnotationsRaw(
|
||||
requestParameters: ListAnnotationsRequest,
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<Array<DtoAnnotationResponse>>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters["name"] != null) {
|
||||
queryParameters["name"] = requestParameters["name"];
|
||||
}
|
||||
|
||||
if (requestParameters["value"] != null) {
|
||||
queryParameters["value"] = requestParameters["value"];
|
||||
}
|
||||
|
||||
if (requestParameters["q"] != null) {
|
||||
queryParameters["q"] = requestParameters["q"];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters["xOrgID"] != null) {
|
||||
headerParameters["X-Org-ID"] = String(requestParameters["xOrgID"]);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-KEY"] =
|
||||
await this.configuration.apiKey("X-ORG-KEY"); // OrgKeyAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["X-ORG-SECRET"] =
|
||||
await this.configuration.apiKey("X-ORG-SECRET"); // OrgSecretAuth authentication
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] =
|
||||
await this.configuration.apiKey("Authorization"); // BearerAuth authentication
|
||||
}
|
||||
|
||||
let urlPath = `/annotations`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
jsonValue.map(DtoAnnotationResponseFromJSON),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns annotations for the organization in X-Org-ID. Filters: `name`, `value`, and `q` (name contains). Add `include=node_pools` to include linked node pools.
|
||||
* List annotations (org scoped)
|
||||
*/
|
||||
async listAnnotations(
|
||||
requestParameters: ListAnnotationsRequest = {},
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<Array<DtoAnnotationResponse>> {
|
||||
const response = await this.listAnnotationsRaw(
|
||||
requestParameters,
|
||||
initOverrides,
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
64
sdk/ts/src/apis/HealthApi.ts
Normal file
64
sdk/ts/src/apis/HealthApi.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as runtime from "../runtime";
|
||||
import type { HandlersHealthStatus } from "../models/index";
|
||||
import {
|
||||
HandlersHealthStatusFromJSON,
|
||||
HandlersHealthStatusToJSON,
|
||||
} from "../models/index";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class HealthApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Returns 200 OK when the service is up
|
||||
* Basic health check
|
||||
*/
|
||||
async healthCheckOperationIdRaw(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<runtime.ApiResponse<HandlersHealthStatus>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
let urlPath = `/healthz`;
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: urlPath,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides,
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
HandlersHealthStatusFromJSON(jsonValue),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns 200 OK when the service is up
|
||||
* Basic health check
|
||||
*/
|
||||
async healthCheckOperationId(
|
||||
initOverrides?: RequestInit | runtime.InitOverrideFunction,
|
||||
): Promise<HandlersHealthStatus> {
|
||||
const response = await this.healthCheckOperationIdRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
113
sdk/ts/src/models/DtoAnnotationResponse.ts
Normal file
113
sdk/ts/src/models/DtoAnnotationResponse.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface DtoAnnotationResponse
|
||||
*/
|
||||
export interface DtoAnnotationResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
organization_id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DtoAnnotationResponse
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the DtoAnnotationResponse interface.
|
||||
*/
|
||||
export function instanceOfDtoAnnotationResponse(
|
||||
value: object,
|
||||
): value is DtoAnnotationResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseFromJSON(
|
||||
json: any,
|
||||
): DtoAnnotationResponse {
|
||||
return DtoAnnotationResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): DtoAnnotationResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
created_at: json["created_at"] == null ? undefined : json["created_at"],
|
||||
id: json["id"] == null ? undefined : json["id"],
|
||||
key: json["key"] == null ? undefined : json["key"],
|
||||
organization_id:
|
||||
json["organization_id"] == null ? undefined : json["organization_id"],
|
||||
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
|
||||
value: json["value"] == null ? undefined : json["value"],
|
||||
};
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseToJSON(json: any): DtoAnnotationResponse {
|
||||
return DtoAnnotationResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function DtoAnnotationResponseToJSONTyped(
|
||||
value?: DtoAnnotationResponse | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
created_at: value["created_at"],
|
||||
id: value["id"],
|
||||
key: value["key"],
|
||||
organization_id: value["organization_id"],
|
||||
updated_at: value["updated_at"],
|
||||
value: value["value"],
|
||||
};
|
||||
}
|
||||
70
sdk/ts/src/models/HandlersHealthStatus.ts
Normal file
70
sdk/ts/src/models/HandlersHealthStatus.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* AutoGlue API
|
||||
* API for managing K3s clusters across cloud providers
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface HandlersHealthStatus
|
||||
*/
|
||||
export interface HandlersHealthStatus {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof HandlersHealthStatus
|
||||
*/
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HandlersHealthStatus interface.
|
||||
*/
|
||||
export function instanceOfHandlersHealthStatus(
|
||||
value: object,
|
||||
): value is HandlersHealthStatus {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusFromJSON(json: any): HandlersHealthStatus {
|
||||
return HandlersHealthStatusFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): HandlersHealthStatus {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
status: json["status"] == null ? undefined : json["status"],
|
||||
};
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusToJSON(json: any): HandlersHealthStatus {
|
||||
return HandlersHealthStatusToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HandlersHealthStatusToJSONTyped(
|
||||
value?: HandlersHealthStatus | null,
|
||||
ignoreDiscriminator: boolean = false,
|
||||
): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
status: value["status"],
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user