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/RunnerOrganisationService.ts

104 lines
3.0 KiB
TypeScript

/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CreateRunnerOrganisation } from '../models/CreateRunnerOrganisation';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunnerOrganisation } from '../models/ResponseRunnerOrganisation';
import type { RunnerOrganisation } from '../models/RunnerOrganisation';
import { request as __request } from '../core/request';
export class RunnerOrganisationService {
/**
* Get all
* Lists all runnerOrganisations.
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
public static async runnerOrganisationControllerGetAll(): Promise<Array<ResponseRunnerOrganisation>> {
const result = await __request({
method: 'GET',
path: `/api/organisations`,
});
return result.body;
}
/**
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* @param requestBody CreateRunnerOrganisation
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
public static async runnerOrganisationControllerPost(
requestBody?: CreateRunnerOrganisation,
): Promise<ResponseRunnerOrganisation> {
const result = await __request({
method: 'POST',
path: `/api/organisations`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a runnerOrganisation of a specified id (if it exists)
* @param id
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
public static async runnerOrganisationControllerGetOne(
id: number,
): Promise<ResponseRunnerOrganisation> {
const result = await __request({
method: 'GET',
path: `/api/organisations/${id}`,
});
return result.body;
}
/**
* Put
* Update a runnerOrganisation object (id can't be changed).
* @param id
* @param requestBody RunnerOrganisation
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
public static async runnerOrganisationControllerPut(
id: number,
requestBody?: RunnerOrganisation,
): Promise<ResponseRunnerOrganisation> {
const result = await __request({
method: 'PUT',
path: `/api/organisations/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runnerOrganisation (if it exists).
* @param id
* @param force
* @result ResponseRunnerOrganisation
* @result ResponseEmpty
* @throws ApiError
*/
public static async runnerOrganisationControllerRemove(
id: number,
force?: boolean,
): Promise<ResponseRunnerOrganisation | ResponseEmpty> {
const result = await __request({
method: 'DELETE',
path: `/api/organisations/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}