🚀New lib version v0.3.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
84
dist/services/RunnerOrganizationService.js
vendored
Normal file
84
dist/services/RunnerOrganizationService.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RunnerOrganizationService = void 0;
|
||||
const request_1 = require("../core/request");
|
||||
class RunnerOrganizationService {
|
||||
/**
|
||||
* Get all
|
||||
* Lists all organizations. <br> This includes their address, contact and teams (if existing/associated).
|
||||
* @returns ResponseRunnerOrganization
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerOrganizationControllerGetAll() {
|
||||
const result = await request_1.request({
|
||||
method: 'GET',
|
||||
path: `/api/organizations`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post
|
||||
* Create a new organsisation.
|
||||
* @param requestBody CreateRunnerOrganization
|
||||
* @returns ResponseRunnerOrganization
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerOrganizationControllerPost(requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'POST',
|
||||
path: `/api/organizations`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Get one
|
||||
* Lists all information about the organization whose id got provided.
|
||||
* @param id
|
||||
* @returns ResponseRunnerOrganization
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerOrganizationControllerGetOne(id) {
|
||||
const result = await request_1.request({
|
||||
method: 'GET',
|
||||
path: `/api/organizations/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Put
|
||||
* Update the organization whose id you provided. <br> Please remember that ids can't be changed.
|
||||
* @param id
|
||||
* @param requestBody UpdateRunnerOrganization
|
||||
* @returns ResponseRunnerOrganization
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerOrganizationControllerPut(id, requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'PUT',
|
||||
path: `/api/organizations/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Remove
|
||||
* Delete the organsisation whose id you provided. <br> If the organization still has runners and/or teams associated this will fail. <br> To delete the organization with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact. <br> If no organization with this id exists it will just return 204(no content).
|
||||
* @param id
|
||||
* @param force
|
||||
* @returns ResponseRunnerOrganization
|
||||
* @returns ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerOrganizationControllerRemove(id, force) {
|
||||
const result = await request_1.request({
|
||||
method: 'DELETE',
|
||||
path: `/api/organizations/${id}`,
|
||||
query: {
|
||||
'force': force,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
}
|
||||
exports.RunnerOrganizationService = RunnerOrganizationService;
|
||||
Reference in New Issue
Block a user