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

This commit is contained in:
Nicolai Ort 2023-04-18 18:05:41 +00:00
parent a014e77edf
commit f4905b8df6
31 changed files with 143 additions and 31 deletions

View File

@ -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.15.4', VERSION: '1.0.0',
WITH_CREDENTIALS: false, WITH_CREDENTIALS: false,
TOKEN: undefined, TOKEN: undefined,
USERNAME: undefined, USERNAME: undefined,

View File

@ -9,10 +9,12 @@ export declare class DonationService {
/** /**
* Get all * 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). * 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
* @result any * @result any
* @throws ApiError * @throws ApiError
*/ */
static donationControllerGetAll(): Promise<(Array<ResponseDonation> | Array<ResponseDistanceDonation>)>; static donationControllerGetAll(page?: number, pageSize?: number): Promise<(Array<ResponseDonation> | Array<ResponseDistanceDonation>)>;
/** /**
* Get one * Get one
* Lists all information about the donation whose id got provided. This includes the donation's runner's distance ran (if distance donation). * 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 * 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). * 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
* @result any * @result any
* @throws ApiError * @throws ApiError
*/ */
static async donationControllerGetAll() { static async donationControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/donations`, path: `/api/donations`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -7,10 +7,12 @@ export declare class PermissionService {
/** /**
* Get all * Get all
* Lists all permissions for all users and groups. * Lists all permissions for all users and groups.
* @param page
* @param pageSize
* @result ResponsePermission * @result ResponsePermission
* @throws ApiError * @throws ApiError
*/ */
static permissionControllerGetAll(): Promise<Array<ResponsePermission>>; static permissionControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponsePermission>>;
/** /**
* Post * 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. * 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 * Get all
* Lists all permissions for all users and groups. * Lists all permissions for all users and groups.
* @param page
* @param pageSize
* @result ResponsePermission * @result ResponsePermission
* @throws ApiError * @throws ApiError
*/ */
static async permissionControllerGetAll() { static async permissionControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/permissions`, path: `/api/permissions`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -6,10 +6,12 @@ export declare class RunnerCardService {
/** /**
* Get all * Get all
* Lists all card. * Lists all card.
* @param page
* @param pageSize
* @result ResponseRunnerCard * @result ResponseRunnerCard
* @throws ApiError * @throws ApiError
*/ */
static runnerCardControllerGetAll(): Promise<Array<ResponseRunnerCard>>; static runnerCardControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunnerCard>>;
/** /**
* Post * Post
* Create a new card. <br> You can provide a associated runner by id but you don't have to. * 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 * Get all
* Lists all card. * Lists all card.
* @param page
* @param pageSize
* @result ResponseRunnerCard * @result ResponseRunnerCard
* @throws ApiError * @throws ApiError
*/ */
static async runnerCardControllerGetAll() { static async runnerCardControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/cards`, path: `/api/cards`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

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

View File

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

View File

@ -10,10 +10,12 @@ export declare class RunnerService {
/** /**
* Get all * Get all
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran. * Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* @param page
* @param pageSize
* @result ResponseRunner * @result ResponseRunner
* @throws ApiError * @throws ApiError
*/ */
static runnerControllerGetAll(): Promise<Array<ResponseRunner>>; static runnerControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunner>>;
/** /**
* Post * Post
* Create a new runner. <br> Please remeber to provide the runner's group's id. * 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 * Get all
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran. * Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* @param page
* @param pageSize
* @result ResponseRunner * @result ResponseRunner
* @throws ApiError * @throws ApiError
*/ */
static async runnerControllerGetAll() { static async runnerControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/runners`, path: `/api/runners`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -7,10 +7,12 @@ export declare class RunnerTeamService {
/** /**
* Get all * Get all
* Lists all teams. <br> This includes their parent organization and contact (if existing/associated). * Lists all teams. <br> This includes their parent organization and contact (if existing/associated).
* @param page
* @param pageSize
* @result ResponseRunnerTeam * @result ResponseRunnerTeam
* @throws ApiError * @throws ApiError
*/ */
static runnerTeamControllerGetAll(): Promise<Array<ResponseRunnerTeam>>; static runnerTeamControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseRunnerTeam>>;
/** /**
* Post * Post
* Create a new organsisation. <br> Please remember to provide it's parent group's id. * 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 * Get all
* Lists all teams. <br> This includes their parent organization and contact (if existing/associated). * Lists all teams. <br> This includes their parent organization and contact (if existing/associated).
* @param page
* @param pageSize
* @result ResponseRunnerTeam * @result ResponseRunnerTeam
* @throws ApiError * @throws ApiError
*/ */
static async runnerTeamControllerGetAll() { static async runnerTeamControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/teams`, path: `/api/teams`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -9,10 +9,12 @@ export declare class ScanService {
/** /**
* Get all * Get all
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran. * Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
* @param page
* @param pageSize
* @result any * @result any
* @throws ApiError * @throws ApiError
*/ */
static scanControllerGetAll(): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>; static scanControllerGetAll(page?: number, pageSize?: number): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>;
/** /**
* Post * 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. * 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 * Get all
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran. * Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
* @param page
* @param pageSize
* @result any * @result any
* @throws ApiError * @throws ApiError
*/ */
static async scanControllerGetAll() { static async scanControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/scans`, path: `/api/scans`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -6,10 +6,12 @@ export declare class ScanStationService {
/** /**
* Get all * Get all
* Lists all stations. <br> This includes their associated tracks. * Lists all stations. <br> This includes their associated tracks.
* @param page
* @param pageSize
* @result ResponseScanStation * @result ResponseScanStation
* @throws ApiError * @throws ApiError
*/ */
static scanStationControllerGetAll(): Promise<Array<ResponseScanStation>>; static scanStationControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseScanStation>>;
/** /**
* Post * 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. * 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 * Get all
* Lists all stations. <br> This includes their associated tracks. * Lists all stations. <br> This includes their associated tracks.
* @param page
* @param pageSize
* @result ResponseScanStation * @result ResponseScanStation
* @throws ApiError * @throws ApiError
*/ */
static async scanStationControllerGetAll() { static async scanStationControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/stations`, path: `/api/stations`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -5,10 +5,12 @@ export declare class StatsClientService {
/** /**
* Get all * Get all
* Lists all stats clients. Please remember that the key can only be viewed on creation. * Lists all stats clients. Please remember that the key can only be viewed on creation.
* @param page
* @param pageSize
* @result ResponseStatsClient * @result ResponseStatsClient
* @throws ApiError * @throws ApiError
*/ */
static statsClientControllerGetAll(): Promise<Array<ResponseStatsClient>>; static statsClientControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseStatsClient>>;
/** /**
* Post * 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. * 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 * Get all
* Lists all stats clients. Please remember that the key can only be viewed on creation. * Lists all stats clients. Please remember that the key can only be viewed on creation.
* @param page
* @param pageSize
* @result ResponseStatsClient * @result ResponseStatsClient
* @throws ApiError * @throws ApiError
*/ */
static async statsClientControllerGetAll() { static async statsClientControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/statsclients`, path: `/api/statsclients`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -6,10 +6,12 @@ export declare class TrackService {
/** /**
* Get all * Get all
* Lists all tracks. * Lists all tracks.
* @param page
* @param pageSize
* @result ResponseTrack * @result ResponseTrack
* @throws ApiError * @throws ApiError
*/ */
static trackControllerGetAll(): Promise<Array<ResponseTrack>>; static trackControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseTrack>>;
/** /**
* Post * Post
* Create a new track. <br> Please remember that the track's distance must be greater than 0. * 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 * Get all
* Lists all tracks. * Lists all tracks.
* @param page
* @param pageSize
* @result ResponseTrack * @result ResponseTrack
* @throws ApiError * @throws ApiError
*/ */
static async trackControllerGetAll() { static async trackControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/tracks`, path: `/api/tracks`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -9,10 +9,12 @@ export declare class UserGroupService {
/** /**
* Get all * Get all
* Lists all groups. <br> The information provided might change while the project continues to evolve. * Lists all groups. <br> The information provided might change while the project continues to evolve.
* @param page
* @param pageSize
* @result ResponseUserGroup * @result ResponseUserGroup
* @throws ApiError * @throws ApiError
*/ */
static userGroupControllerGetAll(): Promise<Array<ResponseUserGroup>>; static userGroupControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseUserGroup>>;
/** /**
* Post * 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. * 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 * Get all
* Lists all groups. <br> The information provided might change while the project continues to evolve. * Lists all groups. <br> The information provided might change while the project continues to evolve.
* @param page
* @param pageSize
* @result ResponseUserGroup * @result ResponseUserGroup
* @throws ApiError * @throws ApiError
*/ */
static async userGroupControllerGetAll() { static async userGroupControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/usergroups`, path: `/api/usergroups`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

View File

@ -6,10 +6,12 @@ export declare class UserService {
/** /**
* Get all * Get all
* Lists all users. <br> This includes their groups and permissions granted to them. * Lists all users. <br> This includes their groups and permissions granted to them.
* @param page
* @param pageSize
* @result ResponseUser * @result ResponseUser
* @throws ApiError * @throws ApiError
*/ */
static userControllerGetAll(): Promise<Array<ResponseUser>>; static userControllerGetAll(page?: number, pageSize?: number): Promise<Array<ResponseUser>>;
/** /**
* Post * 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. * 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 * Get all
* Lists all users. <br> This includes their groups and permissions granted to them. * Lists all users. <br> This includes their groups and permissions granted to them.
* @param page
* @param pageSize
* @result ResponseUser * @result ResponseUser
* @throws ApiError * @throws ApiError
*/ */
static async userControllerGetAll() { static async userControllerGetAll(page, pageSize) {
const result = await (0, request_1.request)({ const result = await (0, request_1.request)({
method: 'GET', method: 'GET',
path: `/api/users`, path: `/api/users`,
query: {
'page': page,
'page_size': pageSize,
},
}); });
return result.body; return result.body;
} }

File diff suppressed because one or more lines are too long

View File

@ -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.15.4", "version": "1.0.0",
"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",