This repository has been archived on 2023-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
lfk-client-node/dist/services/RunnerService.ts

106 lines
2.9 KiB
TypeScript

/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CreateRunner } from '../models/CreateRunner';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunner } from '../models/ResponseRunner';
import type { RunnerGroupNeededError } from '../models/RunnerGroupNeededError';
import type { RunnerGroupNotFoundError } from '../models/RunnerGroupNotFoundError';
import type { UpdateRunner } from '../models/UpdateRunner';
import { request as __request } from '../core/request';
export class RunnerService {
/**
* Get all
* Lists all runners.
* @result ResponseRunner
* @throws ApiError
*/
public static async runnerControllerGetAll(): Promise<Array<ResponseRunner>> {
const result = await __request({
method: 'GET',
path: `/api/runners`,
});
return result.body;
}
/**
* Post
* Create a new runner object (id will be generated automagicly).
* @param requestBody CreateRunner
* @result any
* @throws ApiError
*/
public static async runnerControllerPost(
requestBody?: CreateRunner,
): Promise<(ResponseRunner | RunnerGroupNeededError | RunnerGroupNotFoundError)> {
const result = await __request({
method: 'POST',
path: `/api/runners`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a runner of a specified id (if it exists)
* @param id
* @result ResponseRunner
* @throws ApiError
*/
public static async runnerControllerGetOne(
id: number,
): Promise<ResponseRunner> {
const result = await __request({
method: 'GET',
path: `/api/runners/${id}`,
});
return result.body;
}
/**
* Put
* Update a runner object (id can't be changed).
* @param id
* @param requestBody UpdateRunner
* @result ResponseRunner
* @throws ApiError
*/
public static async runnerControllerPut(
id: number,
requestBody?: UpdateRunner,
): Promise<ResponseRunner> {
const result = await __request({
method: 'PUT',
path: `/api/runners/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runner (if it exists).
* @param id
* @param force
* @result ResponseRunner
* @result ResponseEmpty
* @throws ApiError
*/
public static async runnerControllerRemove(
id: number,
force?: boolean,
): Promise<ResponseRunner | ResponseEmpty> {
const result = await __request({
method: 'DELETE',
path: `/api/runners/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}