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

This commit is contained in:
Nicolai Ort 2021-01-13 19:36:10 +00:00
parent 2f554700a7
commit f2b867cd04
55 changed files with 431 additions and 27 deletions

View File

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

17
dist/index.d.ts vendored
View File

@ -4,7 +4,10 @@ export type { Address } from './models/Address';
export type { AddressNotFoundError } from './models/AddressNotFoundError';
export type { AddressWrongTypeError } from './models/AddressWrongTypeError';
export type { CreateAuth } from './models/CreateAuth';
export type { CreateDistanceDonation } from './models/CreateDistanceDonation';
export type { CreateDonation } from './models/CreateDonation';
export type { CreateDonor } from './models/CreateDonor';
export type { CreateFixedDonation } from './models/CreateFixedDonation';
export type { CreateParticipant } from './models/CreateParticipant';
export { CreatePermission } from './models/CreatePermission';
export type { CreateResetToken } from './models/CreateResetToken';
@ -22,10 +25,14 @@ export type { CreateUser } from './models/CreateUser';
export type { CreateUserGroup } from './models/CreateUserGroup';
export type { DistanceDonation } from './models/DistanceDonation';
export type { Donation } from './models/Donation';
export type { DonationIdsNotMatchingError } from './models/DonationIdsNotMatchingError';
export type { DonationNotFoundError } from './models/DonationNotFoundError';
export type { Donor } from './models/Donor';
export type { DonorHasDonationsError } from './models/DonorHasDonationsError';
export type { DonorIdsNotMatchingError } from './models/DonorIdsNotMatchingError';
export type { DonorNotFoundError } from './models/DonorNotFoundError';
export type { DonorReceiptAddressNeededError } from './models/DonorReceiptAddressNeededError';
export type { FixedDonation } from './models/FixedDonation';
export type { GroupContact } from './models/GroupContact';
export type { GroupContactNotFoundError } from './models/GroupContactNotFoundError';
export type { GroupContactWrongTypeError } from './models/GroupContactWrongTypeError';
@ -52,6 +59,8 @@ export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountIn
export type { ResetAlreadyRequestedError } from './models/ResetAlreadyRequestedError';
export type { ResetPassword } from './models/ResetPassword';
export type { ResponseAuth } from './models/ResponseAuth';
export type { ResponseDistanceDonation } from './models/ResponseDistanceDonation';
export type { ResponseDonation } from './models/ResponseDonation';
export type { ResponseDonor } from './models/ResponseDonor';
export type { ResponseEmpty } from './models/ResponseEmpty';
export type { ResponseParticipant } from './models/ResponseParticipant';
@ -73,6 +82,7 @@ export type { ResponseTrack } from './models/ResponseTrack';
export type { ResponseTrackScan } from './models/ResponseTrackScan';
export type { ResponseUser } from './models/ResponseUser';
export type { ResponseUserGroup } from './models/ResponseUserGroup';
export type { ResponseUserPermissions } from './models/ResponseUserPermissions';
export type { Runner } from './models/Runner';
export type { RunnerCard } from './models/RunnerCard';
export type { RunnerCardHasScansError } from './models/RunnerCardHasScansError';
@ -82,6 +92,7 @@ export type { RunnerCardNotFoundError } from './models/RunnerCardNotFoundError';
export type { RunnerGroup } from './models/RunnerGroup';
export type { RunnerGroupNeededError } from './models/RunnerGroupNeededError';
export type { RunnerGroupNotFoundError } from './models/RunnerGroupNotFoundError';
export type { RunnerHasDistanceDonationsError } from './models/RunnerHasDistanceDonationsError';
export type { RunnerIdsNotMatchingError } from './models/RunnerIdsNotMatchingError';
export type { RunnerNotFoundError } from './models/RunnerNotFoundError';
export type { RunnerOrganisation } from './models/RunnerOrganisation';
@ -111,7 +122,10 @@ export type { TrackIdsNotMatchingError } from './models/TrackIdsNotMatchingError
export type { TrackLapTimeCantBeNegativeError } from './models/TrackLapTimeCantBeNegativeError';
export type { TrackNotFoundError } from './models/TrackNotFoundError';
export type { TrackScan } from './models/TrackScan';
export type { UpdateDistanceDonation } from './models/UpdateDistanceDonation';
export type { UpdateDonation } from './models/UpdateDonation';
export type { UpdateDonor } from './models/UpdateDonor';
export type { UpdateFixedDonation } from './models/UpdateFixedDonation';
export type { UpdatePermission } from './models/UpdatePermission';
export type { UpdateRunner } from './models/UpdateRunner';
export type { UpdateRunnerCard } from './models/UpdateRunnerCard';
@ -126,15 +140,18 @@ export type { UpdateUserGroup } from './models/UpdateUserGroup';
export type { User } from './models/User';
export { UserAction } from './models/UserAction';
export type { UserDisabledError } from './models/UserDisabledError';
export type { UserEmailNeededError } from './models/UserEmailNeededError';
export type { UserGroup } from './models/UserGroup';
export type { UserGroupIdsNotMatchingError } from './models/UserGroupIdsNotMatchingError';
export type { UserGroupNotFoundError } from './models/UserGroupNotFoundError';
export type { UserIdsNotMatchingError } from './models/UserIdsNotMatchingError';
export type { UsernameContainsIllegalCharacterError } from './models/UsernameContainsIllegalCharacterError';
export type { UsernameOrEmailNeededError } from './models/UsernameOrEmailNeededError';
export type { UserNonexistantOrRefreshtokenInvalidError } from './models/UserNonexistantOrRefreshtokenInvalidError';
export type { UserNotFoundError } from './models/UserNotFoundError';
export type { UserNotFoundOrRefreshTokenCountInvalidError } from './models/UserNotFoundOrRefreshTokenCountInvalidError';
export { AuthService } from './services/AuthService';
export { DonationService } from './services/DonationService';
export { DonorService } from './services/DonorService';
export { ImportService } from './services/ImportService';
export { PermissionService } from './services/PermissionService';

4
dist/index.js vendored
View File

@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserService = exports.UserGroupService = exports.TrackService = exports.StatusService = exports.StatsService = exports.StatsClientService = exports.ScanStationService = exports.ScanService = exports.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.RunnerCardService = exports.PermissionService = exports.ImportService = exports.DonorService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0;
exports.UserService = exports.UserGroupService = exports.TrackService = exports.StatusService = exports.StatsService = exports.StatsClientService = exports.ScanStationService = exports.ScanService = exports.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.RunnerCardService = exports.PermissionService = exports.ImportService = exports.DonorService = exports.DonationService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0;
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
@ -18,6 +18,8 @@ var UserAction_1 = require("./models/UserAction");
Object.defineProperty(exports, "UserAction", { enumerable: true, get: function () { return UserAction_1.UserAction; } });
var AuthService_1 = require("./services/AuthService");
Object.defineProperty(exports, "AuthService", { enumerable: true, get: function () { return AuthService_1.AuthService; } });
var DonationService_1 = require("./services/DonationService");
Object.defineProperty(exports, "DonationService", { enumerable: true, get: function () { return DonationService_1.DonationService; } });
var DonorService_1 = require("./services/DonorService");
Object.defineProperty(exports, "DonorService", { enumerable: true, get: function () { return DonorService_1.DonorService; } });
var ImportService_1 = require("./services/ImportService");

View File

@ -0,0 +1,5 @@
export declare type CreateDistanceDonation = {
runner: number;
amountPerDistance: number;
donor: number;
};

5
dist/models/CreateDistanceDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

3
dist/models/CreateDonation.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
export declare type CreateDonation = {
donor: number;
};

5
dist/models/CreateDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

4
dist/models/CreateFixedDonation.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export declare type CreateFixedDonation = {
amount: number;
donor: number;
};

5
dist/models/CreateFixedDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -16,7 +16,8 @@ export declare namespace CreatePermission {
DONOR = "DONOR",
SCAN = "SCAN",
STATION = "STATION",
CARD = "CARD"
CARD = "CARD",
DONATION = "DONATION"
}
enum action {
GET = "GET",

View File

@ -20,6 +20,7 @@ var CreatePermission;
target["SCAN"] = "SCAN";
target["STATION"] = "STATION";
target["CARD"] = "CARD";
target["DONATION"] = "DONATION";
})(target = CreatePermission.target || (CreatePermission.target = {}));
let action;
(function (action) {

View File

@ -3,7 +3,7 @@ export declare type CreateUser = {
middlename?: string;
lastname: string;
username?: string;
email?: string;
email: string;
phone?: string;
password: string;
enabled?: boolean;

View File

@ -0,0 +1,4 @@
export declare type DonationIdsNotMatchingError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,4 @@
export declare type DonationNotFoundError = {
name: string;
message: string;
};

5
dist/models/DonationNotFoundError.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -1,5 +1,6 @@
export declare type Donor = {
receiptNeeded: boolean;
donationAmount: number;
id: number;
firstname: string;
middlename?: string;

View File

@ -0,0 +1,4 @@
export declare type DonorHasDonationsError = {
name: string;
message: string;
};

5
dist/models/DonorHasDonationsError.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

6
dist/models/FixedDonation.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
export declare type FixedDonation = {
_amount: number;
amount: number;
id: number;
donor: string;
};

5
dist/models/FixedDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -16,7 +16,8 @@ export declare namespace Permission {
DONOR = "DONOR",
SCAN = "SCAN",
STATION = "STATION",
CARD = "CARD"
CARD = "CARD",
DONATION = "DONATION"
}
enum action {
GET = "GET",

View File

@ -20,6 +20,7 @@ var Permission;
target["SCAN"] = "SCAN";
target["STATION"] = "STATION";
target["CARD"] = "CARD";
target["DONATION"] = "DONATION";
})(target = Permission.target || (Permission.target = {}));
let action;
(function (action) {

View File

@ -0,0 +1,7 @@
export declare type ResponseDistanceDonation = {
runner: any;
amountPerDistance: number;
id: number;
donor: string;
amount: number;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

5
dist/models/ResponseDonation.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
export declare type ResponseDonation = {
id: number;
donor: string;
amount: number;
};

5
dist/models/ResponseDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -1,5 +1,6 @@
export declare type ResponseDonor = {
receiptNeeded: boolean;
donationAmount: number;
id: number;
firstname: string;
middlename: string;

View File

@ -17,7 +17,8 @@ export declare namespace ResponsePermission {
DONOR = "DONOR",
SCAN = "SCAN",
STATION = "STATION",
CARD = "CARD"
CARD = "CARD",
DONATION = "DONATION"
}
enum action {
GET = "GET",

View File

@ -20,6 +20,7 @@ var ResponsePermission;
target["SCAN"] = "SCAN";
target["STATION"] = "STATION";
target["CARD"] = "CARD";
target["DONATION"] = "DONATION";
})(target = ResponsePermission.target || (ResponsePermission.target = {}));
let action;
(function (action) {

View File

@ -0,0 +1,4 @@
export declare type ResponseUserPermissions = {
directlyGranted?: Array<any>;
inherited?: Array<any>;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,4 @@
export declare type RunnerHasDistanceDonationsError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,6 @@
export declare type UpdateDistanceDonation = {
runner: number;
amountPerDistance: number;
id: number;
donor: number;
};

5
dist/models/UpdateDistanceDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

4
dist/models/UpdateDonation.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export declare type UpdateDonation = {
id: number;
donor: number;
};

5
dist/models/UpdateDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

5
dist/models/UpdateFixedDonation.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
export declare type UpdateFixedDonation = {
amount: number;
id: number;
donor: number;
};

5
dist/models/UpdateFixedDonation.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -4,7 +4,7 @@ export declare type UpdateUser = {
middlename?: string;
lastname: string;
username?: string;
email?: string;
email: string;
phone?: string;
password?: string;
enabled: boolean;

4
dist/models/UserEmailNeededError.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export declare type UserEmailNeededError = {
name: string;
message: string;
};

5
dist/models/UserEmailNeededError.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,4 @@
export declare type UsernameContainsIllegalCharacterError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

68
dist/services/DonationService.d.ts vendored Normal file
View File

@ -0,0 +1,68 @@
import type { CreateDistanceDonation } from '../models/CreateDistanceDonation';
import type { CreateFixedDonation } from '../models/CreateFixedDonation';
import type { ResponseDistanceDonation } from '../models/ResponseDistanceDonation';
import type { ResponseDonation } from '../models/ResponseDonation';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { UpdateDistanceDonation } from '../models/UpdateDistanceDonation';
import type { UpdateFixedDonation } from '../models/UpdateFixedDonation';
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).
* @returns any
* @throws ApiError
*/
static donationControllerGetAll(): 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).
* @param id
* @returns any
* @throws ApiError
*/
static donationControllerGetOne(id: number): Promise<(ResponseDonation | ResponseDistanceDonation)>;
/**
* Remove
* Delete the donation whose id you provided. <br> If no donation with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns any
* @returns ResponseEmpty
* @throws ApiError
*/
static donationControllerRemove(id: number, force?: boolean): Promise<(ResponseDonation | ResponseDistanceDonation) | ResponseEmpty>;
/**
* Post fixed
* Create a fixed donation (not distance donation - use /donations/distance instead). <br> Please rmemember to provide the donation's donors's id and amount.
* @param requestBody CreateFixedDonation
* @returns ResponseDonation
* @throws ApiError
*/
static donationControllerPostFixed(requestBody?: CreateFixedDonation): Promise<ResponseDonation>;
/**
* Post distance
* Create a distance donation (not fixed donation - use /donations/fixed instead). <br> Please rmemember to provide the donation's donors's and runners ids and amount per distance (kilometer).
* @param requestBody CreateDistanceDonation
* @returns ResponseDistanceDonation
* @throws ApiError
*/
static donationControllerPostDistance(requestBody?: CreateDistanceDonation): Promise<ResponseDistanceDonation>;
/**
* Put fixed
* Update the fixed donation (not distance donation - use /donations/distance instead) whose id you provided. <br> Please remember that ids can't be changed and amounts must be positive.
* @param id
* @param requestBody UpdateFixedDonation
* @returns ResponseDonation
* @throws ApiError
*/
static donationControllerPutFixed(id: number, requestBody?: UpdateFixedDonation): Promise<ResponseDonation>;
/**
* Put distance
* Update the distance donation (not fixed donation - use /donations/fixed instead) whose id you provided. <br> Please remember that ids can't be changed and amountPerDistance must be positive.
* @param id
* @param requestBody UpdateDistanceDonation
* @returns ResponseDonation
* @throws ApiError
*/
static donationControllerPutDistance(id: number, requestBody?: UpdateDistanceDonation): Promise<ResponseDonation>;
}

115
dist/services/DonationService.js vendored Normal file
View File

@ -0,0 +1,115 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DonationService = void 0;
const request_1 = require("../core/request");
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).
* @returns any
* @throws ApiError
*/
static async donationControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/donations`,
});
return result.body;
}
/**
* Get one
* Lists all information about the donation whose id got provided. This includes the donation's runner's distance ran (if distance donation).
* @param id
* @returns any
* @throws ApiError
*/
static async donationControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/donations/${id}`,
});
return result.body;
}
/**
* Remove
* Delete the donation whose id you provided. <br> If no donation with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns any
* @returns ResponseEmpty
* @throws ApiError
*/
static async donationControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/donations/${id}`,
query: {
'force': force,
},
});
return result.body;
}
/**
* Post fixed
* Create a fixed donation (not distance donation - use /donations/distance instead). <br> Please rmemember to provide the donation's donors's id and amount.
* @param requestBody CreateFixedDonation
* @returns ResponseDonation
* @throws ApiError
*/
static async donationControllerPostFixed(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/donations/fixed`,
body: requestBody,
});
return result.body;
}
/**
* Post distance
* Create a distance donation (not fixed donation - use /donations/fixed instead). <br> Please rmemember to provide the donation's donors's and runners ids and amount per distance (kilometer).
* @param requestBody CreateDistanceDonation
* @returns ResponseDistanceDonation
* @throws ApiError
*/
static async donationControllerPostDistance(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/donations/distance`,
body: requestBody,
});
return result.body;
}
/**
* Put fixed
* Update the fixed donation (not distance donation - use /donations/distance instead) whose id you provided. <br> Please remember that ids can't be changed and amounts must be positive.
* @param id
* @param requestBody UpdateFixedDonation
* @returns ResponseDonation
* @throws ApiError
*/
static async donationControllerPutFixed(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/donations/fixed/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Put distance
* Update the distance donation (not fixed donation - use /donations/fixed instead) whose id you provided. <br> Please remember that ids can't be changed and amountPerDistance must be positive.
* @param id
* @param requestBody UpdateDistanceDonation
* @returns ResponseDonation
* @throws ApiError
*/
static async donationControllerPutDistance(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/donations/distance/${id}`,
body: requestBody,
});
return result.body;
}
}
exports.DonationService = DonationService;

View File

@ -5,14 +5,14 @@ import type { UpdateDonor } from '../models/UpdateDonor';
export declare class DonorService {
/**
* Get all
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* Lists all donor. <br> This includes the donor's current donation amount.
* @returns ResponseDonor
* @throws ApiError
*/
static donorControllerGetAll(): Promise<Array<ResponseDonor>>;
/**
* Post
* Create a new runner. <br> Please remeber to provide the runner's group's id.
* Create a new donor.
* @param requestBody CreateDonor
* @returns ResponseDonor
* @throws ApiError
@ -20,7 +20,7 @@ export declare class DonorService {
static donorControllerPost(requestBody?: CreateDonor): Promise<ResponseDonor>;
/**
* Get one
* Lists all information about the runner whose id got provided.
* Lists all information about the donor whose id got provided. <br> This includes the donor's current donation amount.
* @param id
* @returns ResponseDonor
* @throws ApiError
@ -28,7 +28,7 @@ export declare class DonorService {
static donorControllerGetOne(id: number): Promise<ResponseDonor>;
/**
* Put
* Update the runner whose id you provided. <br> Please remember that ids can't be changed.
* Update the donor whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateDonor
* @returns ResponseDonor
@ -37,7 +37,7 @@ export declare class DonorService {
static donorControllerPut(id: number, requestBody?: UpdateDonor): Promise<ResponseDonor>;
/**
* Remove
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content).
* Delete the donor whose id you provided. <br> If no donor with this id exists it will just return 204(no content). <br> If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations.
* @param id
* @param force
* @returns ResponseDonor

View File

@ -5,7 +5,7 @@ const request_1 = require("../core/request");
class DonorService {
/**
* Get all
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* Lists all donor. <br> This includes the donor's current donation amount.
* @returns ResponseDonor
* @throws ApiError
*/
@ -18,7 +18,7 @@ class DonorService {
}
/**
* Post
* Create a new runner. <br> Please remeber to provide the runner's group's id.
* Create a new donor.
* @param requestBody CreateDonor
* @returns ResponseDonor
* @throws ApiError
@ -33,7 +33,7 @@ class DonorService {
}
/**
* Get one
* Lists all information about the runner whose id got provided.
* Lists all information about the donor whose id got provided. <br> This includes the donor's current donation amount.
* @param id
* @returns ResponseDonor
* @throws ApiError
@ -47,7 +47,7 @@ class DonorService {
}
/**
* Put
* Update the runner whose id you provided. <br> Please remember that ids can't be changed.
* Update the donor whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateDonor
* @returns ResponseDonor
@ -63,7 +63,7 @@ class DonorService {
}
/**
* Remove
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content).
* Delete the donor whose id you provided. <br> If no donor with this id exists it will just return 204(no content). <br> If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations.
* @param id
* @param force
* @returns ResponseDonor

View File

@ -6,4 +6,11 @@ export declare class StatusService {
* @throws ApiError
*/
static statusControllerGet(): Promise<any>;
/**
* Get version
* A very basic endpoint that just returns the curent package version.
* @returns any Successful response
* @throws ApiError
*/
static statusControllerGetVersion(): Promise<any>;
}

View File

@ -19,5 +19,18 @@ class StatusService {
});
return result.body;
}
/**
* Get version
* A very basic endpoint that just returns the curent package version.
* @returns any Successful response
* @throws ApiError
*/
static async statusControllerGetVersion() {
const result = await request_1.request({
method: 'GET',
path: `/api/version`,
});
return result.body;
}
}
exports.StatusService = StatusService;

View File

@ -2,11 +2,10 @@ import type { CreateUser } from '../models/CreateUser';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseUser } from '../models/ResponseUser';
import type { UpdateUser } from '../models/UpdateUser';
import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError';
export declare class UserService {
/**
* Get all
* Lists all users. <br> This includes their groups and permissions directly granted to them (if existing/associated).
* Lists all users. <br> This includes their groups and permissions granted to them.
* @returns ResponseUser
* @throws ApiError
*/
@ -15,13 +14,13 @@ export declare class UserService {
* 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.
* @param requestBody CreateUser
* @returns any
* @returns ResponseUser
* @throws ApiError
*/
static userControllerPost(requestBody?: CreateUser): Promise<(ResponseUser | UserGroupNotFoundError)>;
static userControllerPost(requestBody?: CreateUser): Promise<ResponseUser>;
/**
* Get one
* Lists all information about the user whose id got provided. <br> Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups.
* Lists all information about the user whose id got provided. <br> Please remember that all permissions granted to the user will show up here.
* @param id
* @returns ResponseUser
* @throws ApiError
@ -46,4 +45,12 @@ export declare class UserService {
* @throws ApiError
*/
static userControllerRemove(id: number, force?: boolean): Promise<ResponseUser | ResponseEmpty>;
/**
* Get permissions
* Lists all permissions granted to the user sorted into directly granted and inherited as permission response objects.
* @param id
* @returns ResponseUser
* @throws ApiError
*/
static userControllerGetPermissions(id: number): Promise<ResponseUser>;
}

View File

@ -5,7 +5,7 @@ const request_1 = require("../core/request");
class UserService {
/**
* Get all
* Lists all users. <br> This includes their groups and permissions directly granted to them (if existing/associated).
* Lists all users. <br> This includes their groups and permissions granted to them.
* @returns ResponseUser
* @throws ApiError
*/
@ -20,7 +20,7 @@ class UserService {
* 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.
* @param requestBody CreateUser
* @returns any
* @returns ResponseUser
* @throws ApiError
*/
static async userControllerPost(requestBody) {
@ -33,7 +33,7 @@ class UserService {
}
/**
* Get one
* Lists all information about the user whose id got provided. <br> Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups.
* Lists all information about the user whose id got provided. <br> Please remember that all permissions granted to the user will show up here.
* @param id
* @returns ResponseUser
* @throws ApiError
@ -80,5 +80,19 @@ class UserService {
});
return result.body;
}
/**
* Get permissions
* Lists all permissions granted to the user sorted into directly granted and inherited as permission response objects.
* @param id
* @returns ResponseUser
* @throws ApiError
*/
static async userControllerGetPermissions(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/users/${id}/permissions`,
});
return result.body;
}
}
exports.UserService = UserService;

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "@odit/lfk-client-js",
"description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for native JS applications.",
"version": "0.0.11",
"version": "0.0.12",
"license": "CC-BY-NC-SA-4.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",