Merge branch 'main' of git.odit.services:lfk/lfk-client-js into main
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:
commit
98e32555cf
2
dist/core/OpenAPI.js
vendored
2
dist/core/OpenAPI.js
vendored
@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
exports.OpenAPI = void 0;
|
exports.OpenAPI = void 0;
|
||||||
exports.OpenAPI = {
|
exports.OpenAPI = {
|
||||||
BASE: '',
|
BASE: '',
|
||||||
VERSION: '0.5.0',
|
VERSION: '0.10.1',
|
||||||
WITH_CREDENTIALS: false,
|
WITH_CREDENTIALS: false,
|
||||||
TOKEN: undefined,
|
TOKEN: undefined,
|
||||||
USERNAME: undefined,
|
USERNAME: undefined,
|
||||||
|
6
dist/index.d.ts
vendored
6
dist/index.d.ts
vendored
@ -53,7 +53,11 @@ export type { Logout } from './models/Logout';
|
|||||||
export type { MailSendingError } from './models/MailSendingError';
|
export type { MailSendingError } from './models/MailSendingError';
|
||||||
export type { NoPermissionError } from './models/NoPermissionError';
|
export type { NoPermissionError } from './models/NoPermissionError';
|
||||||
export type { Participant } from './models/Participant';
|
export type { Participant } from './models/Participant';
|
||||||
|
export type { PasswordMustContainLowercaseLetterError } from './models/PasswordMustContainLowercaseLetterError';
|
||||||
|
export type { PasswordMustContainNumberError } from './models/PasswordMustContainNumberError';
|
||||||
|
export type { PasswordMustContainUppercaseLetterError } from './models/PasswordMustContainUppercaseLetterError';
|
||||||
export type { PasswordNeededError } from './models/PasswordNeededError';
|
export type { PasswordNeededError } from './models/PasswordNeededError';
|
||||||
|
export type { PasswordTooShortError } from './models/PasswordTooShortError';
|
||||||
export { Permission } from './models/Permission';
|
export { Permission } from './models/Permission';
|
||||||
export type { PermissionIdsNotMatchingError } from './models/PermissionIdsNotMatchingError';
|
export type { PermissionIdsNotMatchingError } from './models/PermissionIdsNotMatchingError';
|
||||||
export type { PermissionNeedsPrincipalError } from './models/PermissionNeedsPrincipalError';
|
export type { PermissionNeedsPrincipalError } from './models/PermissionNeedsPrincipalError';
|
||||||
@ -82,6 +86,7 @@ export type { ResponseRunnerTeam } from './models/ResponseRunnerTeam';
|
|||||||
export type { ResponseScan } from './models/ResponseScan';
|
export type { ResponseScan } from './models/ResponseScan';
|
||||||
export type { ResponseScanStation } from './models/ResponseScanStation';
|
export type { ResponseScanStation } from './models/ResponseScanStation';
|
||||||
export type { ResponseSelfServiceDonation } from './models/ResponseSelfServiceDonation';
|
export type { ResponseSelfServiceDonation } from './models/ResponseSelfServiceDonation';
|
||||||
|
export type { ResponseSelfServiceDonor } from './models/ResponseSelfServiceDonor';
|
||||||
export type { ResponseSelfServiceOrganisation } from './models/ResponseSelfServiceOrganisation';
|
export type { ResponseSelfServiceOrganisation } from './models/ResponseSelfServiceOrganisation';
|
||||||
export type { ResponseSelfServiceRunner } from './models/ResponseSelfServiceRunner';
|
export type { ResponseSelfServiceRunner } from './models/ResponseSelfServiceRunner';
|
||||||
export type { ResponseSelfServiceScan } from './models/ResponseSelfServiceScan';
|
export type { ResponseSelfServiceScan } from './models/ResponseSelfServiceScan';
|
||||||
@ -116,6 +121,7 @@ export type { RunnerOrganizationHasTeamsError } from './models/RunnerOrganizatio
|
|||||||
export type { RunnerOrganizationIdsNotMatchingError } from './models/RunnerOrganizationIdsNotMatchingError';
|
export type { RunnerOrganizationIdsNotMatchingError } from './models/RunnerOrganizationIdsNotMatchingError';
|
||||||
export type { RunnerOrganizationNotFoundError } from './models/RunnerOrganizationNotFoundError';
|
export type { RunnerOrganizationNotFoundError } from './models/RunnerOrganizationNotFoundError';
|
||||||
export type { RunnerOrganizationWrongTypeError } from './models/RunnerOrganizationWrongTypeError';
|
export type { RunnerOrganizationWrongTypeError } from './models/RunnerOrganizationWrongTypeError';
|
||||||
|
export type { RunnerSelfserviceTimeoutError } from './models/RunnerSelfserviceTimeoutError';
|
||||||
export type { RunnerTeam } from './models/RunnerTeam';
|
export type { RunnerTeam } from './models/RunnerTeam';
|
||||||
export type { RunnerTeamHasRunnersError } from './models/RunnerTeamHasRunnersError';
|
export type { RunnerTeamHasRunnersError } from './models/RunnerTeamHasRunnersError';
|
||||||
export type { RunnerTeamIdsNotMatchingError } from './models/RunnerTeamIdsNotMatchingError';
|
export type { RunnerTeamIdsNotMatchingError } from './models/RunnerTeamIdsNotMatchingError';
|
||||||
|
2
dist/models/CreateTrackScan.d.ts
vendored
2
dist/models/CreateTrackScan.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
export declare type CreateTrackScan = {
|
export declare type CreateTrackScan = {
|
||||||
card: number;
|
card: number;
|
||||||
station: number;
|
station?: number;
|
||||||
};
|
};
|
||||||
|
4
dist/models/PasswordMustContainLowercaseLetterError.d.ts
vendored
Normal file
4
dist/models/PasswordMustContainLowercaseLetterError.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare type PasswordMustContainLowercaseLetterError = {
|
||||||
|
name: string;
|
||||||
|
message: string;
|
||||||
|
};
|
5
dist/models/PasswordMustContainLowercaseLetterError.js
vendored
Normal file
5
dist/models/PasswordMustContainLowercaseLetterError.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
dist/models/PasswordMustContainNumberError.d.ts
vendored
Normal file
4
dist/models/PasswordMustContainNumberError.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare type PasswordMustContainNumberError = {
|
||||||
|
name: string;
|
||||||
|
message: string;
|
||||||
|
};
|
5
dist/models/PasswordMustContainNumberError.js
vendored
Normal file
5
dist/models/PasswordMustContainNumberError.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
dist/models/PasswordMustContainUppercaseLetterError.d.ts
vendored
Normal file
4
dist/models/PasswordMustContainUppercaseLetterError.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare type PasswordMustContainUppercaseLetterError = {
|
||||||
|
name: string;
|
||||||
|
message: string;
|
||||||
|
};
|
5
dist/models/PasswordMustContainUppercaseLetterError.js
vendored
Normal file
5
dist/models/PasswordMustContainUppercaseLetterError.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
dist/models/PasswordTooShortError.d.ts
vendored
Normal file
4
dist/models/PasswordTooShortError.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare type PasswordTooShortError = {
|
||||||
|
name: string;
|
||||||
|
message: string;
|
||||||
|
};
|
5
dist/models/PasswordTooShortError.js
vendored
Normal file
5
dist/models/PasswordTooShortError.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
dist/models/ResponseSelfServiceDonor.d.ts
vendored
Normal file
6
dist/models/ResponseSelfServiceDonor.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export declare type ResponseSelfServiceDonor = {
|
||||||
|
id: number;
|
||||||
|
firstname: string;
|
||||||
|
middlename: string;
|
||||||
|
lastname: string;
|
||||||
|
};
|
5
dist/models/ResponseSelfServiceDonor.js
vendored
Normal file
5
dist/models/ResponseSelfServiceDonor.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2
dist/models/ResponseSelfServiceRunner.d.ts
vendored
2
dist/models/ResponseSelfServiceRunner.d.ts
vendored
@ -2,7 +2,7 @@ export declare type ResponseSelfServiceRunner = {
|
|||||||
distance: number;
|
distance: number;
|
||||||
donationAmount: number;
|
donationAmount: number;
|
||||||
group: string;
|
group: string;
|
||||||
donations: string;
|
distanceDonations: string;
|
||||||
token?: string;
|
token?: string;
|
||||||
id: number;
|
id: number;
|
||||||
firstname: string;
|
firstname: string;
|
||||||
|
1
dist/models/Runner.d.ts
vendored
1
dist/models/Runner.d.ts
vendored
@ -1,5 +1,6 @@
|
|||||||
export declare type Runner = {
|
export declare type Runner = {
|
||||||
group: string;
|
group: string;
|
||||||
|
resetRequestedTimestamp?: string;
|
||||||
distance: number;
|
distance: number;
|
||||||
distanceDonationAmount: number;
|
distanceDonationAmount: number;
|
||||||
id: number;
|
id: number;
|
||||||
|
4
dist/models/RunnerSelfserviceTimeoutError.d.ts
vendored
Normal file
4
dist/models/RunnerSelfserviceTimeoutError.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare type RunnerSelfserviceTimeoutError = {
|
||||||
|
name: string;
|
||||||
|
message: string;
|
||||||
|
};
|
5
dist/models/RunnerSelfserviceTimeoutError.js
vendored
Normal file
5
dist/models/RunnerSelfserviceTimeoutError.js
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2
dist/models/UpdateTrackScan.d.ts
vendored
2
dist/models/UpdateTrackScan.d.ts
vendored
@ -2,5 +2,5 @@ export declare type UpdateTrackScan = {
|
|||||||
id: number;
|
id: number;
|
||||||
runner: number;
|
runner: number;
|
||||||
valid?: boolean;
|
valid?: boolean;
|
||||||
station: number;
|
track: number;
|
||||||
};
|
};
|
||||||
|
15
dist/services/MeService.d.ts
vendored
15
dist/services/MeService.d.ts
vendored
@ -3,12 +3,12 @@ import type { ResponseUserPermissions } from '../models/ResponseUserPermissions'
|
|||||||
import type { UpdateUser } from '../models/UpdateUser';
|
import type { UpdateUser } from '../models/UpdateUser';
|
||||||
export declare class MeService {
|
export declare class MeService {
|
||||||
/**
|
/**
|
||||||
* Get permissions
|
* Get
|
||||||
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
|
* Lists all information about yourself.
|
||||||
* @returns ResponseUserPermissions
|
* @returns ResponseUser
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static meControllerGetPermissions(): Promise<ResponseUserPermissions>;
|
static meControllerGet(): Promise<ResponseUser>;
|
||||||
/**
|
/**
|
||||||
* Put
|
* Put
|
||||||
* Update the yourself. <br> You can't edit your own permissions or group memberships here - Please use the /api/users/:id enpoint instead. <br> Please remember that ids can't be changed.
|
* Update the yourself. <br> You can't edit your own permissions or group memberships here - Please use the /api/users/:id enpoint instead. <br> Please remember that ids can't be changed.
|
||||||
@ -25,4 +25,11 @@ export declare class MeService {
|
|||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static meControllerRemove(force?: boolean): Promise<ResponseUser>;
|
static meControllerRemove(force?: boolean): Promise<ResponseUser>;
|
||||||
|
/**
|
||||||
|
* Get permissions
|
||||||
|
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
|
||||||
|
* @returns ResponseUserPermissions
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static meControllerGetPermissions(): Promise<ResponseUserPermissions>;
|
||||||
}
|
}
|
||||||
|
21
dist/services/MeService.js
vendored
21
dist/services/MeService.js
vendored
@ -4,12 +4,12 @@ exports.MeService = void 0;
|
|||||||
const request_1 = require("../core/request");
|
const request_1 = require("../core/request");
|
||||||
class MeService {
|
class MeService {
|
||||||
/**
|
/**
|
||||||
* Get permissions
|
* Get
|
||||||
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
|
* Lists all information about yourself.
|
||||||
* @returns ResponseUserPermissions
|
* @returns ResponseUser
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static async meControllerGetPermissions() {
|
static async meControllerGet() {
|
||||||
const result = await request_1.request({
|
const result = await request_1.request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/users/me/`,
|
path: `/api/users/me/`,
|
||||||
@ -48,5 +48,18 @@ class MeService {
|
|||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Get permissions
|
||||||
|
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
|
||||||
|
* @returns ResponseUserPermissions
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static async meControllerGetPermissions() {
|
||||||
|
const result = await request_1.request({
|
||||||
|
method: 'GET',
|
||||||
|
path: `/api/users/me/permissions`,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.MeService = MeService;
|
exports.MeService = MeService;
|
||||||
|
9
dist/services/RunnerCardService.d.ts
vendored
9
dist/services/RunnerCardService.d.ts
vendored
@ -45,4 +45,13 @@ export declare class RunnerCardService {
|
|||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static runnerCardControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerCard | ResponseEmpty>;
|
static runnerCardControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerCard | ResponseEmpty>;
|
||||||
|
/**
|
||||||
|
* Post blanco bulk
|
||||||
|
* Create blank cards in bulk. <br> Just provide the count as a query param and wait for the 200 response. <br> You can provide the 'returnCards' query param if you want to receive the RESPONSERUNNERCARD objects in the response.
|
||||||
|
* @param count
|
||||||
|
* @param returnCards
|
||||||
|
* @returns ResponseEmpty
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static runnerCardControllerPostBlancoBulk(count?: number, returnCards?: boolean): Promise<ResponseEmpty>;
|
||||||
}
|
}
|
||||||
|
19
dist/services/RunnerCardService.js
vendored
19
dist/services/RunnerCardService.js
vendored
@ -80,5 +80,24 @@ class RunnerCardService {
|
|||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Post blanco bulk
|
||||||
|
* Create blank cards in bulk. <br> Just provide the count as a query param and wait for the 200 response. <br> You can provide the 'returnCards' query param if you want to receive the RESPONSERUNNERCARD objects in the response.
|
||||||
|
* @param count
|
||||||
|
* @param returnCards
|
||||||
|
* @returns ResponseEmpty
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static async runnerCardControllerPostBlancoBulk(count, returnCards) {
|
||||||
|
const result = await request_1.request({
|
||||||
|
method: 'POST',
|
||||||
|
path: `/api/cards/bulk`,
|
||||||
|
query: {
|
||||||
|
'count': count,
|
||||||
|
'returnCards': returnCards,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.RunnerCardService = RunnerCardService;
|
exports.RunnerCardService = RunnerCardService;
|
||||||
|
34
dist/services/RunnerSelfService.d.ts
vendored
34
dist/services/RunnerSelfService.d.ts
vendored
@ -1,17 +1,27 @@
|
|||||||
import type { CreateSelfServiceCitizenRunner } from '../models/CreateSelfServiceCitizenRunner';
|
import type { CreateSelfServiceCitizenRunner } from '../models/CreateSelfServiceCitizenRunner';
|
||||||
import type { CreateSelfServiceRunner } from '../models/CreateSelfServiceRunner';
|
import type { CreateSelfServiceRunner } from '../models/CreateSelfServiceRunner';
|
||||||
|
import type { ResponseScanStation } from '../models/ResponseScanStation';
|
||||||
import type { ResponseSelfServiceOrganisation } from '../models/ResponseSelfServiceOrganisation';
|
import type { ResponseSelfServiceOrganisation } from '../models/ResponseSelfServiceOrganisation';
|
||||||
import type { ResponseSelfServiceRunner } from '../models/ResponseSelfServiceRunner';
|
import type { ResponseSelfServiceRunner } from '../models/ResponseSelfServiceRunner';
|
||||||
import type { ResponseSelfServiceScan } from '../models/ResponseSelfServiceScan';
|
import type { ResponseSelfServiceScan } from '../models/ResponseSelfServiceScan';
|
||||||
export declare class RunnerSelfService {
|
export declare class RunnerSelfService {
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* Lists all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please contact support.
|
* Lists all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please use the forgot endpoint.
|
||||||
* @param jwt
|
* @param jwt
|
||||||
* @returns ResponseSelfServiceRunner
|
* @returns ResponseSelfServiceRunner
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static runnerSelfServiceControllerGet(jwt: string): Promise<ResponseSelfServiceRunner>;
|
static runnerSelfServiceControllerGet(jwt: string): Promise<ResponseSelfServiceRunner>;
|
||||||
|
/**
|
||||||
|
* Remove
|
||||||
|
* Deletes all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please use the forgot endpoint.
|
||||||
|
* @param jwt
|
||||||
|
* @param force
|
||||||
|
* @returns ResponseSelfServiceRunner
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static runnerSelfServiceControllerRemove(jwt: string, force?: boolean): Promise<ResponseSelfServiceRunner>;
|
||||||
/**
|
/**
|
||||||
* Get scans
|
* Get scans
|
||||||
* Lists all your (runner) scans. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please contact support.
|
* Lists all your (runner) scans. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please contact support.
|
||||||
@ -20,23 +30,41 @@ export declare class RunnerSelfService {
|
|||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static runnerSelfServiceControllerGetScans(jwt: string): Promise<Array<ResponseSelfServiceScan>>;
|
static runnerSelfServiceControllerGetScans(jwt: string): Promise<Array<ResponseSelfServiceScan>>;
|
||||||
|
/**
|
||||||
|
* Get station me
|
||||||
|
* Lists basic information about the station whose token got provided. <br> This includes it's associated track.
|
||||||
|
* @returns ResponseScanStation
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static runnerSelfServiceControllerGetStationMe(): Promise<ResponseScanStation>;
|
||||||
|
/**
|
||||||
|
* 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, locale?: string): Promise<any>;
|
||||||
/**
|
/**
|
||||||
* Register runner
|
* 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.
|
* 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
|
* @param requestBody CreateSelfServiceCitizenRunner
|
||||||
* @returns ResponseSelfServiceRunner
|
* @returns ResponseSelfServiceRunner
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static runnerSelfServiceControllerRegisterRunner(requestBody?: CreateSelfServiceCitizenRunner): Promise<ResponseSelfServiceRunner>;
|
static runnerSelfServiceControllerRegisterRunner(locale?: string, requestBody?: CreateSelfServiceCitizenRunner): Promise<ResponseSelfServiceRunner>;
|
||||||
/**
|
/**
|
||||||
* Register organization runner
|
* 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.
|
* 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 token
|
||||||
|
* @param locale
|
||||||
* @param requestBody CreateSelfServiceRunner
|
* @param requestBody CreateSelfServiceRunner
|
||||||
* @returns ResponseSelfServiceRunner
|
* @returns ResponseSelfServiceRunner
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static runnerSelfServiceControllerRegisterOrganizationRunner(token: string, requestBody?: CreateSelfServiceRunner): Promise<ResponseSelfServiceRunner>;
|
static runnerSelfServiceControllerRegisterOrganizationRunner(token: string, locale?: string, requestBody?: CreateSelfServiceRunner): Promise<ResponseSelfServiceRunner>;
|
||||||
/**
|
/**
|
||||||
* Get selfservice org
|
* Get selfservice org
|
||||||
* Get the basic info and teams for a org.
|
* Get the basic info and teams for a org.
|
||||||
|
64
dist/services/RunnerSelfService.js
vendored
64
dist/services/RunnerSelfService.js
vendored
@ -5,7 +5,7 @@ const request_1 = require("../core/request");
|
|||||||
class RunnerSelfService {
|
class RunnerSelfService {
|
||||||
/**
|
/**
|
||||||
* Get
|
* Get
|
||||||
* Lists all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please contact support.
|
* Lists all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please use the forgot endpoint.
|
||||||
* @param jwt
|
* @param jwt
|
||||||
* @returns ResponseSelfServiceRunner
|
* @returns ResponseSelfServiceRunner
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
@ -17,6 +17,24 @@ class RunnerSelfService {
|
|||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Remove
|
||||||
|
* Deletes all information about yourself. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please use the forgot endpoint.
|
||||||
|
* @param jwt
|
||||||
|
* @param force
|
||||||
|
* @returns ResponseSelfServiceRunner
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static async runnerSelfServiceControllerRemove(jwt, force) {
|
||||||
|
const result = await request_1.request({
|
||||||
|
method: 'DELETE',
|
||||||
|
path: `/api/runners/me/${jwt}`,
|
||||||
|
query: {
|
||||||
|
'force': force,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Get scans
|
* Get scans
|
||||||
* Lists all your (runner) scans. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please contact support.
|
* Lists all your (runner) scans. <br> Please provide your runner jwt(that code we gave you during registration) for auth. <br> If you lost your jwt/personalized link please contact support.
|
||||||
@ -31,17 +49,53 @@ class RunnerSelfService {
|
|||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Get station me
|
||||||
|
* Lists basic information about the station whose token got provided. <br> This includes it's associated track.
|
||||||
|
* @returns ResponseScanStation
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
static async runnerSelfServiceControllerGetStationMe() {
|
||||||
|
const result = await request_1.request({
|
||||||
|
method: 'GET',
|
||||||
|
path: `/api/stations/me`,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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, locale) {
|
||||||
|
const result = await request_1.request({
|
||||||
|
method: 'POST',
|
||||||
|
path: `/api/runners/forgot`,
|
||||||
|
query: {
|
||||||
|
'mail': mail,
|
||||||
|
'locale': locale,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Register runner
|
* 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.
|
* 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
|
* @param requestBody CreateSelfServiceCitizenRunner
|
||||||
* @returns ResponseSelfServiceRunner
|
* @returns ResponseSelfServiceRunner
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static async runnerSelfServiceControllerRegisterRunner(requestBody) {
|
static async runnerSelfServiceControllerRegisterRunner(locale, requestBody) {
|
||||||
const result = await request_1.request({
|
const result = await request_1.request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/runners/register`,
|
path: `/api/runners/register`,
|
||||||
|
query: {
|
||||||
|
'locale': locale,
|
||||||
|
},
|
||||||
body: requestBody,
|
body: requestBody,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
@ -50,14 +104,18 @@ class RunnerSelfService {
|
|||||||
* Register organization runner
|
* 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.
|
* 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 token
|
||||||
|
* @param locale
|
||||||
* @param requestBody CreateSelfServiceRunner
|
* @param requestBody CreateSelfServiceRunner
|
||||||
* @returns ResponseSelfServiceRunner
|
* @returns ResponseSelfServiceRunner
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
static async runnerSelfServiceControllerRegisterOrganizationRunner(token, requestBody) {
|
static async runnerSelfServiceControllerRegisterOrganizationRunner(token, locale, requestBody) {
|
||||||
const result = await request_1.request({
|
const result = await request_1.request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/runners/register/${token}`,
|
path: `/api/runners/register/${token}`,
|
||||||
|
query: {
|
||||||
|
'locale': locale,
|
||||||
|
},
|
||||||
body: requestBody,
|
body: requestBody,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-client-js",
|
"name": "@odit/lfk-client-js",
|
||||||
"description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for native JS applications.",
|
"description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for native JS applications.",
|
||||||
"version": "0.5.0",
|
"version": "0.10.1",
|
||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user