Compare commits

..

25 Commits

Author SHA1 Message Date
e94f3c1373 🚀New lib version v1.1.3 [CI SKIP] 2023-05-10 11:39:59 +00:00
45f00bdbf7 🚀New lib version v1.1.2 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-05-10 11:18:26 +00:00
be4be6e075 🚀New lib version v1.1.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-19 16:12:35 +00:00
c48d550075 🚀New lib version v1.1.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-19 13:50:01 +00:00
19c85c5502 🚀New lib version v1.0.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-18 18:11:40 +00:00
f48e6bcfc3 🚀New lib version v1.0.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-18 18:05:50 +00:00
c079b1751f 🚀New lib version v0.15.4 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 20:53:55 +00:00
160639118c 🚀New lib version v0.15.3 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 20:37:52 +00:00
88c480fb6e 🚀New lib version v0.15.2 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 19:18:43 +00:00
ddb2915c56 🚀New lib version v0.15.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 19:13:34 +00:00
a1f80f81aa 🚀New lib version v0.15.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 18:53:16 +00:00
5081f51a23 🚀New lib version v0.14.6 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 16:22:50 +00:00
5311fdc589 🚀New lib version v0.14.5 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 16:17:52 +00:00
7086fdccc3 🚀New lib version v0.14.4 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-04-15 16:12:47 +00:00
b07be97e5b 🚀New lib version v0.14.3 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-03-18 21:16:55 +00:00
0139a6dd82 🚀New lib version v0.14.2 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-03-18 20:57:09 +00:00
0a22058c3a 🚀New lib version v0.14.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-03-18 20:48:31 +00:00
97215e410d 🚀New lib version v0.14.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-03-15 13:46:35 +00:00
0437417e5e 🚀New lib version v0.13.3 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-02-15 13:57:51 +00:00
52d454af8a 🚀New lib version v0.13.2 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-02-03 15:14:12 +00:00
b958a03162 🚀New lib version v0.13.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-02-02 15:19:00 +00:00
1fb61ca6f8 updated lib
All checks were successful
continuous-integration/drone Build is passing
2023-02-02 16:15:30 +01:00
e7fb20ce69 ignore pnpm lock 2023-02-02 16:15:24 +01:00
1a29eaa3db Merge branch 'main' of git.odit.services:lfk/lfk-client-node 2023-02-02 16:14:45 +01:00
ee73d279ee removed unused glob 2023-02-02 16:14:40 +01:00
38 changed files with 154 additions and 35 deletions

3
.gitignore vendored
View File

@@ -11,4 +11,5 @@
node_modules
lib
package-lock.json
yarn.lock
yarn.lock
pnpm-lock.yaml

View File

@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.OpenAPI = void 0;
exports.OpenAPI = {
BASE: '',
VERSION: '0.13.0',
VERSION: '1.1.3',
WITH_CREDENTIALS: false,
TOKEN: undefined,
USERNAME: undefined,

View File

@@ -2,4 +2,5 @@ export type ResponseRunnerGroup = {
id: number;
name: string;
contact?: any;
total_distance?: number;
};

View File

@@ -6,4 +6,5 @@ export type ResponseRunnerOrganization = {
id: number;
name: string;
contact?: any;
total_distance?: number;
};

View File

@@ -3,4 +3,5 @@ export type ResponseRunnerTeam = {
id: number;
name: string;
contact?: any;
total_distance?: number;
};

View File

@@ -6,5 +6,8 @@ export type ResponseStats = {
total_scans: number;
total_distance: number;
total_donation: number;
total_donations: number;
total_donors: number;
average_distance: number;
average_donation: number;
};

View File

@@ -9,10 +9,12 @@ export declare class DonationService {
/**
* Get all
* Lists all donations (fixed or distance based) from all donors. <br> This includes the donations's runner's distance ran(if distance donation).
* @param page
* @param pageSize
* @returns any
* @throws ApiError
*/
static donationControllerGetAll(): Promise<(Array<ResponseDonation> | Array<ResponseDistanceDonation>)>;
static donationControllerGetAll(page?: number, pageSize?: number): Promise<(Array<ResponseDonation> | Array<ResponseDistanceDonation>)>;
/**
* Get one
* Lists all information about the donation whose id got provided. This includes the donation's runner's distance ran (if distance donation).

View File

@@ -6,13 +6,19 @@ class DonationService {
/**
* Get all
* Lists all donations (fixed or distance based) from all donors. <br> This includes the donations's runner's distance ran(if distance donation).
* @param page
* @param pageSize
* @returns any
* @throws ApiError
*/
static async donationControllerGetAll() {
static async donationControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/donations`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -6,10 +6,12 @@ export declare class DonorService {
/**
* Get all
* Lists all donor. <br> This includes the donor's current donation amount.
* @param page
* @param pageSize
* @returns ResponseDonor
* @throws ApiError
*/
static donorControllerGetAll(): Promise<Array<ResponseDonor>>;
static donorControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseDonor>>;
/**
* Post
* Create a new donor.

View File

@@ -6,13 +6,19 @@ class DonorService {
/**
* Get all
* Lists all donor. <br> This includes the donor's current donation amount.
* @param page
* @param pageSize
* @returns ResponseDonor
* @throws ApiError
*/
static async donorControllerGetAll() {
static async donorControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/donors`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -6,10 +6,12 @@ export declare class GroupContactService {
/**
* Get all
* Lists all contacts. <br> This includes the contact's associated groups.
* @param page
* @param pageSize
* @returns ResponseGroupContact
* @throws ApiError
*/
static groupContactControllerGetAll(): Promise<Array<ResponseGroupContact>>;
static groupContactControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseGroupContact>>;
/**
* Post
* Create a new contact.

View File

@@ -6,13 +6,19 @@ class GroupContactService {
/**
* Get all
* Lists all contacts. <br> This includes the contact's associated groups.
* @param page
* @param pageSize
* @returns ResponseGroupContact
* @throws ApiError
*/
static async groupContactControllerGetAll() {
static async groupContactControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/contacts`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -7,10 +7,12 @@ export declare class PermissionService {
/**
* Get all
* Lists all permissions for all users and groups.
* @param page
* @param pageSize
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerGetAll(): Promise<Array<ResponsePermission>>;
static permissionControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponsePermission>>;
/**
* Post
* Create a new permission for a existing principal(user/group). <br> If a permission with this target, action and prinicpal already exists that permission will be returned instead of creating a new one.

View File

@@ -6,13 +6,19 @@ class PermissionService {
/**
* Get all
* Lists all permissions for all users and groups.
* @param page
* @param pageSize
* @returns ResponsePermission
* @throws ApiError
*/
static async permissionControllerGetAll() {
static async permissionControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/permissions`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -6,10 +6,12 @@ export declare class RunnerCardService {
/**
* Get all
* Lists all card.
* @param page
* @param pageSize
* @returns ResponseRunnerCard
* @throws ApiError
*/
static runnerCardControllerGetAll(): Promise<Array<ResponseRunnerCard>>;
static runnerCardControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunnerCard>>;
/**
* Post
* Create a new card. <br> You can provide a associated runner by id but you don't have to.

View File

@@ -6,13 +6,19 @@ class RunnerCardService {
/**
* Get all
* Lists all card.
* @param page
* @param pageSize
* @returns ResponseRunnerCard
* @throws ApiError
*/
static async runnerCardControllerGetAll() {
static async runnerCardControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/cards`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -7,10 +7,12 @@ export declare class RunnerOrganizationService {
/**
* Get all
* Lists all organizations. <br> This includes their address, contact and teams (if existing/associated).
* @param page
* @param pageSize
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static runnerOrganizationControllerGetAll(): Promise<Array<ResponseRunnerOrganization>>;
static runnerOrganizationControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunnerOrganization>>;
/**
* Post
* Create a new organsisation.

View File

@@ -6,13 +6,19 @@ class RunnerOrganizationService {
/**
* Get all
* Lists all organizations. <br> This includes their address, contact and teams (if existing/associated).
* @param page
* @param pageSize
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static async runnerOrganizationControllerGetAll() {
static async runnerOrganizationControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/organizations`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -39,7 +39,7 @@ export declare class RunnerSelfService {
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).
* Use this endpoint to reuqest a new selfservice magic-login-link to be sent to your mail address (rate limited to one mail every 15mins).
* @param mail
* @param locale
* @returns any Successful response

View File

@@ -64,7 +64,7 @@ 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).
* Use this endpoint to reuqest a new selfservice magic-login-link to be sent to your mail address (rate limited to one mail every 15mins).
* @param mail
* @param locale
* @returns any Successful response

View File

@@ -10,10 +10,12 @@ export declare class RunnerService {
/**
* Get all
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* @param page
* @param pageSize
* @returns ResponseRunner
* @throws ApiError
*/
static runnerControllerGetAll(): Promise<Array<ResponseRunner>>;
static runnerControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunner>>;
/**
* Post
* Create a new runner. <br> Please remeber to provide the runner's group's id.

View File

@@ -6,13 +6,19 @@ class RunnerService {
/**
* Get all
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* @param page
* @param pageSize
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetAll() {
static async runnerControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/runners`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -7,10 +7,12 @@ export declare class RunnerTeamService {
/**
* Get all
* Lists all teams. <br> This includes their parent organization and contact (if existing/associated).
* @param page
* @param pageSize
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetAll(): Promise<Array<ResponseRunnerTeam>>;
static runnerTeamControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunnerTeam>>;
/**
* Post
* Create a new organsisation. <br> Please remember to provide it's parent group's id.

View File

@@ -6,13 +6,19 @@ class RunnerTeamService {
/**
* Get all
* Lists all teams. <br> This includes their parent organization and contact (if existing/associated).
* @param page
* @param pageSize
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetAll() {
static async runnerTeamControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/teams`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -9,10 +9,12 @@ export declare class ScanService {
/**
* Get all
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
* @param page
* @param pageSize
* @returns any
* @throws ApiError
*/
static scanControllerGetAll(): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>;
static scanControllerGetAll(page?: number, pageSize?: number): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>;
/**
* Post
* Create a new scan (not track scan - use /scans/trackscans instead). <br> Please rmemember to provide the scan's runner's id and distance.

View File

@@ -6,13 +6,19 @@ class ScanService {
/**
* Get all
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
* @param page
* @param pageSize
* @returns any
* @throws ApiError
*/
static async scanControllerGetAll() {
static async scanControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/scans`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -6,10 +6,12 @@ export declare class ScanStationService {
/**
* Get all
* Lists all stations. <br> This includes their associated tracks.
* @param page
* @param pageSize
* @returns ResponseScanStation
* @throws ApiError
*/
static scanStationControllerGetAll(): Promise<Array<ResponseScanStation>>;
static scanStationControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseScanStation>>;
/**
* Post
* Create a new station. <br> Please remeber to provide the station's track's id. <br> Please also remember that the station key is only visibe on creation.

View File

@@ -6,13 +6,19 @@ class ScanStationService {
/**
* Get all
* Lists all stations. <br> This includes their associated tracks.
* @param page
* @param pageSize
* @returns ResponseScanStation
* @throws ApiError
*/
static async scanStationControllerGetAll() {
static async scanStationControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/stations`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -5,10 +5,12 @@ export declare class StatsClientService {
/**
* Get all
* Lists all stats clients. Please remember that the key can only be viewed on creation.
* @param page
* @param pageSize
* @returns ResponseStatsClient
* @throws ApiError
*/
static statsClientControllerGetAll(): Promise<Array<ResponseStatsClient>>;
static statsClientControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseStatsClient>>;
/**
* Post
* Create a new stats client. <br> Please remember that the client's key will be generated automaticly and that it can only be viewed on creation.

View File

@@ -6,13 +6,19 @@ class StatsClientService {
/**
* Get all
* Lists all stats clients. Please remember that the key can only be viewed on creation.
* @param page
* @param pageSize
* @returns ResponseStatsClient
* @throws ApiError
*/
static async statsClientControllerGetAll() {
static async statsClientControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/statsclients`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -6,10 +6,12 @@ export declare class TrackService {
/**
* Get all
* Lists all tracks.
* @param page
* @param pageSize
* @returns ResponseTrack
* @throws ApiError
*/
static trackControllerGetAll(): Promise<Array<ResponseTrack>>;
static trackControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseTrack>>;
/**
* Post
* Create a new track. <br> Please remember that the track's distance must be greater than 0.

View File

@@ -6,13 +6,19 @@ class TrackService {
/**
* Get all
* Lists all tracks.
* @param page
* @param pageSize
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerGetAll() {
static async trackControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/tracks`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -9,10 +9,12 @@ export declare class UserGroupService {
/**
* Get all
* Lists all groups. <br> The information provided might change while the project continues to evolve.
* @param page
* @param pageSize
* @returns ResponseUserGroup
* @throws ApiError
*/
static userGroupControllerGetAll(): Promise<Array<ResponseUserGroup>>;
static userGroupControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseUserGroup>>;
/**
* Post
* Create a new group. <br> If you want to grant permissions to the group you have to create them seperately by posting to /api/permissions after creating the group.

View File

@@ -6,13 +6,19 @@ class UserGroupService {
/**
* Get all
* Lists all groups. <br> The information provided might change while the project continues to evolve.
* @param page
* @param pageSize
* @returns ResponseUserGroup
* @throws ApiError
*/
static async userGroupControllerGetAll() {
static async userGroupControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/usergroups`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

View File

@@ -6,10 +6,12 @@ export declare class UserService {
/**
* Get all
* Lists all users. <br> This includes their groups and permissions granted to them.
* @param page
* @param pageSize
* @returns ResponseUser
* @throws ApiError
*/
static userControllerGetAll(): Promise<Array<ResponseUser>>;
static userControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseUser>>;
/**
* Post
* Create a new user. <br> If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user.

View File

@@ -6,13 +6,19 @@ class UserService {
/**
* Get all
* Lists all users. <br> This includes their groups and permissions granted to them.
* @param page
* @param pageSize
* @returns ResponseUser
* @throws ApiError
*/
static async userControllerGetAll() {
static async userControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/users`,
query: {
'page': page,
'page_size': pageSize,
},
});
return result.body;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
{
"name": "@odit/lfk-client-node",
"description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for NodeJS applications.",
"version": "0.13.0",
"version": "1.1.3",
"license": "CC-BY-NC-SA-4.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -16,7 +16,7 @@
],
"author": "ODIT.Services",
"files": [
"**/dist",
"dist",
"package.json",
"README.md"
],