🚀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:
31
dist/services/RunnerSelfService.js
vendored
31
dist/services/RunnerSelfService.js
vendored
@@ -17,5 +17,36 @@ class RunnerSelfService {
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Register runner
|
||||
* Create a new selfservice runner in the citizen org. <br> This endpoint shoud be used to allow "everyday citizen" to register themselves. <br> You have to provide a mail address, b/c the future we'll implement email verification.
|
||||
* @param requestBody CreateSelfServiceCitizenRunner
|
||||
* @returns ResponseSelfServiceRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerSelfServiceControllerRegisterRunner(requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'POST',
|
||||
path: `/api/runners/register`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Register organization runner
|
||||
* Create a new selfservice runner in a provided org. <br> The orgs get provided and authorized via api tokens that can be optained via the /organizations endpoint.
|
||||
* @param token
|
||||
* @param requestBody CreateSelfServiceRunner
|
||||
* @returns ResponseSelfServiceRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async runnerSelfServiceControllerRegisterOrganizationRunner(token, requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'POST',
|
||||
path: `/api/runners/register/${token}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
}
|
||||
exports.RunnerSelfService = RunnerSelfService;
|
||||
|
||||
Reference in New Issue
Block a user