The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
/* tslint:disable */
/* eslint-disable */
/**
* BoxLite
* BoxLite AI platform API Docs
*
* The version of the OpenAPI document: 1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, type RequestArgs, BaseAPI, operationServerMap } from '../base';
// @ts-ignore
import type { AttachTicket } from '../models';
// @ts-ignore
import type { Box } from '../models';
// @ts-ignore
import type { CreateAttachTicket } from '../models';
// @ts-ignore
import type { PaginatedBoxes } from '../models';
// @ts-ignore
import type { UpdateBoxStateDto } from '../models';
/**
* BoxApi - axios parameter creator
*/
export const BoxApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary Get a one-time ticket for the attach WebSocket
* @param {string} boxIdOrName ID or name of the box
* @param {CreateAttachTicket} createAttachTicket
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAttachTicket: async (boxIdOrName: string, createAttachTicket: CreateAttachTicket, xBoxLiteOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'boxIdOrName' is not null or undefined
assertParamExists('createAttachTicket', 'boxIdOrName', boxIdOrName)
// verify required parameter 'createAttachTicket' is not null or undefined
assertParamExists('createAttachTicket', 'createAttachTicket', createAttachTicket)
const localVarPath = `/box/{boxIdOrName}/attach-tickets`
.replace('{boxIdOrName}', encodeURIComponent(String(boxIdOrName)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
localVarHeaderParameter['Content-Type'] = 'application/json';
localVarHeaderParameter['Accept'] = 'application/json';
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(createAttachTicket, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get box details
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {boolean} [verbose] Include verbose output
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBox: async (boxIdOrName: string, xBoxLiteOrganizationID?: string, verbose?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'boxIdOrName' is not null or undefined
assertParamExists('getBox', 'boxIdOrName', boxIdOrName)
const localVarPath = `/box/{boxIdOrName}`
.replace('{boxIdOrName}', encodeURIComponent(String(boxIdOrName)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
if (verbose !== undefined) {
localVarQueryParameter['verbose'] = verbose;
}
localVarHeaderParameter['Accept'] = 'application/json';
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get boxes for the authenticated runner
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {string} [states] Comma-separated list of box states to filter by
* @param {boolean} [skipReconcilingBoxes] Skip boxes where state differs from desired state
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBoxesForRunner: async (xBoxLiteOrganizationID?: string, states?: string, skipReconcilingBoxes?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/box/for-runner`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
if (states !== undefined) {
localVarQueryParameter['states'] = states;
}
if (skipReconcilingBoxes !== undefined) {
localVarQueryParameter['skipReconcilingBoxes'] = skipReconcilingBoxes;
}
localVarHeaderParameter['Accept'] = 'application/json';
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary List all boxes paginated
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {number} [page] Page number of the results
* @param {number} [limit] Number of results per page
* @param {string} [id] Filter by partial Box ID or name match
* @param {string} [name] Filter by partial name match
* @param {string} [labels] JSON encoded labels to filter by
* @param {boolean} [includeErroredDeleted] Include results with errored state and deleted desired state
* @param {Array<ListBoxesPaginatedStatesEnum>} [states] List of states to filter by
* @param {Array<string>} [regions] List of regions to filter by
* @param {number} [minCpu] Minimum CPU
* @param {number} [maxCpu] Maximum CPU
* @param {number} [minMemoryGiB] Minimum memory in GiB
* @param {number} [maxMemoryGiB] Maximum memory in GiB
* @param {number} [minDiskGiB] Minimum disk space in GiB
* @param {number} [maxDiskGiB] Maximum disk space in GiB
* @param {Date} [lastEventAfter] Include items with last event after this timestamp
* @param {Date} [lastEventBefore] Include items with last event before this timestamp
* @param {ListBoxesPaginatedSortEnum} [sort] Field to sort by
* @param {ListBoxesPaginatedOrderEnum} [order] Direction to sort by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBoxesPaginated: async (xBoxLiteOrganizationID?: string, page?: number, limit?: number, id?: string, name?: string, labels?: string, includeErroredDeleted?: boolean, states?: Array<ListBoxesPaginatedStatesEnum>, regions?: Array<string>, minCpu?: number, maxCpu?: number, minMemoryGiB?: number, maxMemoryGiB?: number, minDiskGiB?: number, maxDiskGiB?: number, lastEventAfter?: Date, lastEventBefore?: Date, sort?: ListBoxesPaginatedSortEnum, order?: ListBoxesPaginatedOrderEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/box/paginated`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (id !== undefined) {
localVarQueryParameter['id'] = id;
}
if (name !== undefined) {
localVarQueryParameter['name'] = name;
}
if (labels !== undefined) {
localVarQueryParameter['labels'] = labels;
}
if (includeErroredDeleted !== undefined) {
localVarQueryParameter['includeErroredDeleted'] = includeErroredDeleted;
}
if (states) {
localVarQueryParameter['states'] = states;
}
if (regions) {
localVarQueryParameter['regions'] = regions;
}
if (minCpu !== undefined) {
localVarQueryParameter['minCpu'] = minCpu;
}
if (maxCpu !== undefined) {
localVarQueryParameter['maxCpu'] = maxCpu;
}
if (minMemoryGiB !== undefined) {
localVarQueryParameter['minMemoryGiB'] = minMemoryGiB;
}
if (maxMemoryGiB !== undefined) {
localVarQueryParameter['maxMemoryGiB'] = maxMemoryGiB;
}
if (minDiskGiB !== undefined) {
localVarQueryParameter['minDiskGiB'] = minDiskGiB;
}
if (maxDiskGiB !== undefined) {
localVarQueryParameter['maxDiskGiB'] = maxDiskGiB;
}
if (lastEventAfter !== undefined) {
localVarQueryParameter['lastEventAfter'] = (lastEventAfter as any instanceof Date) ?
(lastEventAfter as any).toISOString() :
lastEventAfter;
}
if (lastEventBefore !== undefined) {
localVarQueryParameter['lastEventBefore'] = (lastEventBefore as any instanceof Date) ?
(lastEventBefore as any).toISOString() :
lastEventBefore;
}
if (sort !== undefined) {
localVarQueryParameter['sort'] = sort;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
localVarHeaderParameter['Accept'] = 'application/json';
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Recover box from error state
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
recoverBox: async (boxIdOrName: string, xBoxLiteOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'boxIdOrName' is not null or undefined
assertParamExists('recoverBox', 'boxIdOrName', boxIdOrName)
const localVarPath = `/box/{boxIdOrName}/recover`
.replace('{boxIdOrName}', encodeURIComponent(String(boxIdOrName)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
localVarHeaderParameter['Accept'] = 'application/json';
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Update box state
* @param {string} boxId ID of the box
* @param {UpdateBoxStateDto} updateBoxStateDto
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateBoxState: async (boxId: string, updateBoxStateDto: UpdateBoxStateDto, xBoxLiteOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'boxId' is not null or undefined
assertParamExists('updateBoxState', 'boxId', boxId)
// verify required parameter 'updateBoxStateDto' is not null or undefined
assertParamExists('updateBoxState', 'updateBoxStateDto', updateBoxStateDto)
const localVarPath = `/box/{boxId}/state`
.replace('{boxId}', encodeURIComponent(String(boxId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
localVarHeaderParameter['Content-Type'] = 'application/json';
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(updateBoxStateDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Update box last activity
* @param {string} boxId ID of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLastActivity: async (boxId: string, xBoxLiteOrganizationID?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'boxId' is not null or undefined
assertParamExists('updateLastActivity', 'boxId', boxId)
const localVarPath = `/box/{boxId}/last-activity`
.replace('{boxId}', encodeURIComponent(String(boxId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
// authentication oauth2 required
if (xBoxLiteOrganizationID != null) {
localVarHeaderParameter['X-BoxLite-Organization-ID'] = String(xBoxLiteOrganizationID);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* BoxApi - functional programming interface
*/
export const BoxApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = BoxApiAxiosParamCreator(configuration)
return {
/**
*
* @summary Get a one-time ticket for the attach WebSocket
* @param {string} boxIdOrName ID or name of the box
* @param {CreateAttachTicket} createAttachTicket
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAttachTicket(boxIdOrName: string, createAttachTicket: CreateAttachTicket, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AttachTicket>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createAttachTicket(boxIdOrName, createAttachTicket, xBoxLiteOrganizationID, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.createAttachTicket']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get box details
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {boolean} [verbose] Include verbose output
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getBox(boxIdOrName: string, xBoxLiteOrganizationID?: string, verbose?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Box>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getBox(boxIdOrName, xBoxLiteOrganizationID, verbose, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.getBox']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Get boxes for the authenticated runner
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {string} [states] Comma-separated list of box states to filter by
* @param {boolean} [skipReconcilingBoxes] Skip boxes where state differs from desired state
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getBoxesForRunner(xBoxLiteOrganizationID?: string, states?: string, skipReconcilingBoxes?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Box>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getBoxesForRunner(xBoxLiteOrganizationID, states, skipReconcilingBoxes, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.getBoxesForRunner']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary List all boxes paginated
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {number} [page] Page number of the results
* @param {number} [limit] Number of results per page
* @param {string} [id] Filter by partial Box ID or name match
* @param {string} [name] Filter by partial name match
* @param {string} [labels] JSON encoded labels to filter by
* @param {boolean} [includeErroredDeleted] Include results with errored state and deleted desired state
* @param {Array<ListBoxesPaginatedStatesEnum>} [states] List of states to filter by
* @param {Array<string>} [regions] List of regions to filter by
* @param {number} [minCpu] Minimum CPU
* @param {number} [maxCpu] Maximum CPU
* @param {number} [minMemoryGiB] Minimum memory in GiB
* @param {number} [maxMemoryGiB] Maximum memory in GiB
* @param {number} [minDiskGiB] Minimum disk space in GiB
* @param {number} [maxDiskGiB] Maximum disk space in GiB
* @param {Date} [lastEventAfter] Include items with last event after this timestamp
* @param {Date} [lastEventBefore] Include items with last event before this timestamp
* @param {ListBoxesPaginatedSortEnum} [sort] Field to sort by
* @param {ListBoxesPaginatedOrderEnum} [order] Direction to sort by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listBoxesPaginated(xBoxLiteOrganizationID?: string, page?: number, limit?: number, id?: string, name?: string, labels?: string, includeErroredDeleted?: boolean, states?: Array<ListBoxesPaginatedStatesEnum>, regions?: Array<string>, minCpu?: number, maxCpu?: number, minMemoryGiB?: number, maxMemoryGiB?: number, minDiskGiB?: number, maxDiskGiB?: number, lastEventAfter?: Date, lastEventBefore?: Date, sort?: ListBoxesPaginatedSortEnum, order?: ListBoxesPaginatedOrderEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedBoxes>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listBoxesPaginated(xBoxLiteOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.listBoxesPaginated']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Recover box from error state
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async recoverBox(boxIdOrName: string, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Box>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.recoverBox(boxIdOrName, xBoxLiteOrganizationID, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.recoverBox']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Update box state
* @param {string} boxId ID of the box
* @param {UpdateBoxStateDto} updateBoxStateDto
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateBoxState(boxId: string, updateBoxStateDto: UpdateBoxStateDto, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateBoxState(boxId, updateBoxStateDto, xBoxLiteOrganizationID, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.updateBoxState']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary Update box last activity
* @param {string} boxId ID of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateLastActivity(boxId: string, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateLastActivity(boxId, xBoxLiteOrganizationID, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['BoxApi.updateLastActivity']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* BoxApi - factory interface
*/
export const BoxApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = BoxApiFp(configuration)
return {
/**
*
* @summary Get a one-time ticket for the attach WebSocket
* @param {string} boxIdOrName ID or name of the box
* @param {CreateAttachTicket} createAttachTicket
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAttachTicket(boxIdOrName: string, createAttachTicket: CreateAttachTicket, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<AttachTicket> {
return localVarFp.createAttachTicket(boxIdOrName, createAttachTicket, xBoxLiteOrganizationID, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get box details
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {boolean} [verbose] Include verbose output
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBox(boxIdOrName: string, xBoxLiteOrganizationID?: string, verbose?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Box> {
return localVarFp.getBox(boxIdOrName, xBoxLiteOrganizationID, verbose, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get boxes for the authenticated runner
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {string} [states] Comma-separated list of box states to filter by
* @param {boolean} [skipReconcilingBoxes] Skip boxes where state differs from desired state
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBoxesForRunner(xBoxLiteOrganizationID?: string, states?: string, skipReconcilingBoxes?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Array<Box>> {
return localVarFp.getBoxesForRunner(xBoxLiteOrganizationID, states, skipReconcilingBoxes, options).then((request) => request(axios, basePath));
},
/**
*
* @summary List all boxes paginated
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {number} [page] Page number of the results
* @param {number} [limit] Number of results per page
* @param {string} [id] Filter by partial Box ID or name match
* @param {string} [name] Filter by partial name match
* @param {string} [labels] JSON encoded labels to filter by
* @param {boolean} [includeErroredDeleted] Include results with errored state and deleted desired state
* @param {Array<ListBoxesPaginatedStatesEnum>} [states] List of states to filter by
* @param {Array<string>} [regions] List of regions to filter by
* @param {number} [minCpu] Minimum CPU
* @param {number} [maxCpu] Maximum CPU
* @param {number} [minMemoryGiB] Minimum memory in GiB
* @param {number} [maxMemoryGiB] Maximum memory in GiB
* @param {number} [minDiskGiB] Minimum disk space in GiB
* @param {number} [maxDiskGiB] Maximum disk space in GiB
* @param {Date} [lastEventAfter] Include items with last event after this timestamp
* @param {Date} [lastEventBefore] Include items with last event before this timestamp
* @param {ListBoxesPaginatedSortEnum} [sort] Field to sort by
* @param {ListBoxesPaginatedOrderEnum} [order] Direction to sort by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBoxesPaginated(xBoxLiteOrganizationID?: string, page?: number, limit?: number, id?: string, name?: string, labels?: string, includeErroredDeleted?: boolean, states?: Array<ListBoxesPaginatedStatesEnum>, regions?: Array<string>, minCpu?: number, maxCpu?: number, minMemoryGiB?: number, maxMemoryGiB?: number, minDiskGiB?: number, maxDiskGiB?: number, lastEventAfter?: Date, lastEventBefore?: Date, sort?: ListBoxesPaginatedSortEnum, order?: ListBoxesPaginatedOrderEnum, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedBoxes> {
return localVarFp.listBoxesPaginated(xBoxLiteOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Recover box from error state
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
recoverBox(boxIdOrName: string, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<Box> {
return localVarFp.recoverBox(boxIdOrName, xBoxLiteOrganizationID, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Update box state
* @param {string} boxId ID of the box
* @param {UpdateBoxStateDto} updateBoxStateDto
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateBoxState(boxId: string, updateBoxStateDto: UpdateBoxStateDto, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp.updateBoxState(boxId, updateBoxStateDto, xBoxLiteOrganizationID, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Update box last activity
* @param {string} boxId ID of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLastActivity(boxId: string, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
return localVarFp.updateLastActivity(boxId, xBoxLiteOrganizationID, options).then((request) => request(axios, basePath));
},
};
};
/**
* BoxApi - object-oriented interface
*/
export class BoxApi extends BaseAPI {
/**
*
* @summary Get a one-time ticket for the attach WebSocket
* @param {string} boxIdOrName ID or name of the box
* @param {CreateAttachTicket} createAttachTicket
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public createAttachTicket(boxIdOrName: string, createAttachTicket: CreateAttachTicket, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).createAttachTicket(boxIdOrName, createAttachTicket, xBoxLiteOrganizationID, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get box details
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {boolean} [verbose] Include verbose output
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public getBox(boxIdOrName: string, xBoxLiteOrganizationID?: string, verbose?: boolean, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).getBox(boxIdOrName, xBoxLiteOrganizationID, verbose, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get boxes for the authenticated runner
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {string} [states] Comma-separated list of box states to filter by
* @param {boolean} [skipReconcilingBoxes] Skip boxes where state differs from desired state
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public getBoxesForRunner(xBoxLiteOrganizationID?: string, states?: string, skipReconcilingBoxes?: boolean, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).getBoxesForRunner(xBoxLiteOrganizationID, states, skipReconcilingBoxes, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary List all boxes paginated
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {number} [page] Page number of the results
* @param {number} [limit] Number of results per page
* @param {string} [id] Filter by partial Box ID or name match
* @param {string} [name] Filter by partial name match
* @param {string} [labels] JSON encoded labels to filter by
* @param {boolean} [includeErroredDeleted] Include results with errored state and deleted desired state
* @param {Array<ListBoxesPaginatedStatesEnum>} [states] List of states to filter by
* @param {Array<string>} [regions] List of regions to filter by
* @param {number} [minCpu] Minimum CPU
* @param {number} [maxCpu] Maximum CPU
* @param {number} [minMemoryGiB] Minimum memory in GiB
* @param {number} [maxMemoryGiB] Maximum memory in GiB
* @param {number} [minDiskGiB] Minimum disk space in GiB
* @param {number} [maxDiskGiB] Maximum disk space in GiB
* @param {Date} [lastEventAfter] Include items with last event after this timestamp
* @param {Date} [lastEventBefore] Include items with last event before this timestamp
* @param {ListBoxesPaginatedSortEnum} [sort] Field to sort by
* @param {ListBoxesPaginatedOrderEnum} [order] Direction to sort by
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public listBoxesPaginated(xBoxLiteOrganizationID?: string, page?: number, limit?: number, id?: string, name?: string, labels?: string, includeErroredDeleted?: boolean, states?: Array<ListBoxesPaginatedStatesEnum>, regions?: Array<string>, minCpu?: number, maxCpu?: number, minMemoryGiB?: number, maxMemoryGiB?: number, minDiskGiB?: number, maxDiskGiB?: number, lastEventAfter?: Date, lastEventBefore?: Date, sort?: ListBoxesPaginatedSortEnum, order?: ListBoxesPaginatedOrderEnum, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).listBoxesPaginated(xBoxLiteOrganizationID, page, limit, id, name, labels, includeErroredDeleted, states, regions, minCpu, maxCpu, minMemoryGiB, maxMemoryGiB, minDiskGiB, maxDiskGiB, lastEventAfter, lastEventBefore, sort, order, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Recover box from error state
* @param {string} boxIdOrName ID or name of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public recoverBox(boxIdOrName: string, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).recoverBox(boxIdOrName, xBoxLiteOrganizationID, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Update box state
* @param {string} boxId ID of the box
* @param {UpdateBoxStateDto} updateBoxStateDto
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public updateBoxState(boxId: string, updateBoxStateDto: UpdateBoxStateDto, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).updateBoxState(boxId, updateBoxStateDto, xBoxLiteOrganizationID, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Update box last activity
* @param {string} boxId ID of the box
* @param {string} [xBoxLiteOrganizationID] Use with JWT to specify the organization ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
public updateLastActivity(boxId: string, xBoxLiteOrganizationID?: string, options?: RawAxiosRequestConfig) {
return BoxApiFp(this.configuration).updateLastActivity(boxId, xBoxLiteOrganizationID, options).then((request) => request(this.axios, this.basePath));
}
}
export const ListBoxesPaginatedStatesEnum = {
CREATING: 'creating',
RESTORING: 'restoring',
DESTROYING: 'destroying',
STARTED: 'started',
STOPPED: 'stopped',
STARTING: 'starting',
STOPPING: 'stopping',
ERROR: 'error',
UNKNOWN: 'unknown',
ARCHIVED: 'archived',
ARCHIVING: 'archiving',
RESIZING: 'resizing',
UNKNOWN_DEFAULT_OPEN_API: '11184809',
} as const;
export type ListBoxesPaginatedStatesEnum = typeof ListBoxesPaginatedStatesEnum[keyof typeof ListBoxesPaginatedStatesEnum];
export const ListBoxesPaginatedSortEnum = {
ID: 'id',
NAME: 'name',
STATE: 'state',
REGION: 'region',
UPDATED_AT: 'updatedAt',
CREATED_AT: 'createdAt',
UNKNOWN_DEFAULT_OPEN_API: '11184809',
} as const;
export type ListBoxesPaginatedSortEnum = typeof ListBoxesPaginatedSortEnum[keyof typeof ListBoxesPaginatedSortEnum];
export const ListBoxesPaginatedOrderEnum = {
ASC: 'asc',
DESC: 'desc',
UNKNOWN_DEFAULT_OPEN_API: '11184809',
} as const;
export type ListBoxesPaginatedOrderEnum = typeof ListBoxesPaginatedOrderEnum[keyof typeof ListBoxesPaginatedOrderEnum];