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.js

85 lines
2.5 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunnerOrganisationService = void 0;
const request_1 = require("../core/request");
class RunnerOrganisationService {
/**
* Get all
* Lists all runnerOrganisations.
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/organisations`,
});
return result.body;
}
/**
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* @param requestBody CreateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPost(requestBody) {
const result = await request_1.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
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/organisations/${id}`,
});
return result.body;
}
/**
* Put
* Update a runnerOrganisation object (id can't be changed).
* @param id
* @param requestBody UpdateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/organisations/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runnerOrganisation (if it exists).
* @param id
* @param force
* @returns ResponseRunnerOrganisation
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerOrganisationControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/organisations/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.RunnerOrganisationService = RunnerOrganisationService;