feat: adding background jobs, Dockerfile

This commit is contained in:
allanice001
2025-11-04 18:16:45 +00:00
parent 19d5cf7aab
commit 91686c1ea4
26 changed files with 3025 additions and 0 deletions

View 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();
}
}

View 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();
}
}