🚀New lib version v0.10.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2021-04-03 16:30:05 +00:00
parent 0d8d8f1af4
commit 1a378fcea9
9 changed files with 35 additions and 10 deletions

View File

@@ -41,27 +41,30 @@ export declare class RunnerSelfService {
* Request new token
* Use this endpoint to reuqest a new selfservice token/link to be sent to your mail address (rate limited to one mail every 24hrs).
* @param mail
* @param locale
* @returns any Successful response
* @throws ApiError
*/
static runnerSelfServiceControllerRequestNewToken(mail?: string): Promise<any>;
static runnerSelfServiceControllerRequestNewToken(mail?: string, locale?: string): Promise<any>;
/**
* 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 locale
* @param requestBody CreateSelfServiceCitizenRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static runnerSelfServiceControllerRegisterRunner(requestBody?: CreateSelfServiceCitizenRunner): Promise<ResponseSelfServiceRunner>;
static runnerSelfServiceControllerRegisterRunner(locale?: string, requestBody?: CreateSelfServiceCitizenRunner): Promise<ResponseSelfServiceRunner>;
/**
* 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 locale
* @param requestBody CreateSelfServiceRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static runnerSelfServiceControllerRegisterOrganizationRunner(token: string, requestBody?: CreateSelfServiceRunner): Promise<ResponseSelfServiceRunner>;
static runnerSelfServiceControllerRegisterOrganizationRunner(token: string, locale?: string, requestBody?: CreateSelfServiceRunner): Promise<ResponseSelfServiceRunner>;
/**
* Get selfservice org
* Get the basic info and teams for a org.

View File

@@ -66,15 +66,17 @@ class RunnerSelfService {
* Request new token
* Use this endpoint to reuqest a new selfservice token/link to be sent to your mail address (rate limited to one mail every 24hrs).
* @param mail
* @param locale
* @returns any Successful response
* @throws ApiError
*/
static async runnerSelfServiceControllerRequestNewToken(mail) {
static async runnerSelfServiceControllerRequestNewToken(mail, locale) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/forgot`,
query: {
'mail': mail,
'locale': locale,
},
});
return result.body;
@@ -82,14 +84,18 @@ class RunnerSelfService {
/**
* 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 locale
* @param requestBody CreateSelfServiceCitizenRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static async runnerSelfServiceControllerRegisterRunner(requestBody) {
static async runnerSelfServiceControllerRegisterRunner(locale, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/register`,
query: {
'locale': locale,
},
body: requestBody,
});
return result.body;
@@ -98,14 +104,18 @@ class RunnerSelfService {
* 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 locale
* @param requestBody CreateSelfServiceRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static async runnerSelfServiceControllerRegisterOrganizationRunner(token, requestBody) {
static async runnerSelfServiceControllerRegisterOrganizationRunner(token, locale, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/register/${token}`,
query: {
'locale': locale,
},
body: requestBody,
});
return result.body;