Merge branch 'main' of git.odit.services:lfk/lfk-client-node

This commit is contained in:
Nicolai Ort 2023-02-02 16:14:45 +01:00
commit 1a29eaa3db
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
200 changed files with 301 additions and 297 deletions

View File

@ -1,4 +1,4 @@
export declare type ApiRequestOptions = {
export type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly path: string;
readonly cookies?: Record<string, any>;

View File

@ -1,4 +1,4 @@
export declare type ApiResult = {
export type ApiResult = {
readonly url: string;
readonly ok: boolean;
readonly status: number;

View File

@ -1,6 +1,6 @@
declare type Resolver<T> = () => Promise<T>;
declare type Headers = Record<string, string>;
declare type Config = {
type Resolver<T> = () => Promise<T>;
type Headers = Record<string, string>;
type Config = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;

View File

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

View File

@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@ -139,7 +143,7 @@ async function sendRequest(options, url) {
headers: await getHeaders(options),
body: getRequestBody(options),
};
return await node_fetch_1.default(url, request);
return await (0, node_fetch_1.default)(url, request);
}
function getResponseHeader(response, responseHeader) {
if (responseHeader) {

View File

@ -1,4 +1,4 @@
export declare type Address = {
export type Address = {
address1: string;
address2: string;
postalcode: string;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type CreateAuth = {
export type CreateAuth = {
username?: string;
email?: string;
password: string;

View File

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

View File

@ -1,4 +1,4 @@
export declare type CreateDonation = {
export type CreateDonation = {
donor: number;
paidAmount?: number;
};

View File

@ -1,4 +1,4 @@
export declare type CreateDonor = {
export type CreateDonor = {
receiptNeeded?: boolean;
firstname: string;
middlename?: string;

View File

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

View File

@ -1,4 +1,4 @@
export declare type CreateGroupContact = {
export type CreateGroupContact = {
firstname: string;
middlename?: string;
lastname: string;

View File

@ -1,4 +1,4 @@
export declare type CreateParticipant = {
export type CreateParticipant = {
firstname: string;
middlename?: string;
lastname: string;

View File

@ -1,4 +1,4 @@
export declare type CreatePermission = {
export type CreatePermission = {
principal: number;
target: CreatePermission.target;
action: CreatePermission.action;

View File

@ -1,3 +1,3 @@
export declare type CreateResetToken = {
export type CreateResetToken = {
email: string;
};

View File

@ -1,4 +1,4 @@
export declare type CreateRunner = {
export type CreateRunner = {
group: number;
firstname: string;
middlename?: string;

View File

@ -1,4 +1,4 @@
export declare type CreateRunnerCard = {
export type CreateRunnerCard = {
runner?: number;
enabled: boolean;
};

View File

@ -1,4 +1,4 @@
export declare type CreateRunnerGroup = {
export type CreateRunnerGroup = {
name: string;
contact?: number;
};

View File

@ -1,4 +1,4 @@
export declare type CreateRunnerOrganization = {
export type CreateRunnerOrganization = {
address?: any;
registrationEnabled?: boolean;
name: string;

View File

@ -1,4 +1,4 @@
export declare type CreateRunnerTeam = {
export type CreateRunnerTeam = {
parentGroup: number;
name: string;
contact?: number;

View File

@ -1,4 +1,4 @@
export declare type CreateScan = {
export type CreateScan = {
runner: number;
valid?: boolean;
distance: number;

View File

@ -1,4 +1,4 @@
export declare type CreateScanStation = {
export type CreateScanStation = {
description?: string;
track: number;
enabled?: boolean;

View File

@ -1,4 +1,4 @@
export declare type CreateSelfServiceCitizenRunner = {
export type CreateSelfServiceCitizenRunner = {
email?: string;
firstname: string;
middlename?: string;

View File

@ -1,4 +1,4 @@
export declare type CreateSelfServiceRunner = {
export type CreateSelfServiceRunner = {
team?: number;
firstname: string;
middlename?: string;

View File

@ -1,3 +1,3 @@
export declare type CreateStatsClient = {
export type CreateStatsClient = {
description?: string;
};

View File

@ -1,4 +1,4 @@
export declare type CreateTrack = {
export type CreateTrack = {
name: string;
distance: number;
minimumLapTime?: number;

View File

@ -1,4 +1,4 @@
export declare type CreateTrackScan = {
export type CreateTrackScan = {
card: number;
station?: number;
};

View File

@ -1,4 +1,4 @@
export declare type CreateUser = {
export type CreateUser = {
firstname: string;
middlename?: string;
lastname: string;

View File

@ -1,4 +1,4 @@
export declare type CreateUserGroup = {
export type CreateUserGroup = {
name: string;
description?: string;
};

View File

@ -1,4 +1,4 @@
export declare type DistanceDonation = {
export type DistanceDonation = {
runner: string;
amountPerDistance: number;
id: number;

View File

@ -1,4 +1,4 @@
export declare type Donation = {
export type Donation = {
id: number;
donor: string;
paidAmount: number;

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type Donor = {
export type Donor = {
receiptNeeded: boolean;
donationAmount: number;
paidDonationAmount: number;

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type FixedDonation = {
export type FixedDonation = {
_amount: number;
amount: number;
id: number;

View File

@ -1,4 +1,4 @@
export declare type GroupContact = {
export type GroupContact = {
id: number;
firstname: string;
middlename?: string;

View File

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

View File

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

View File

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

View File

@ -1,3 +1,3 @@
export declare type HandleLogout = {
export type HandleLogout = {
token?: string;
};

View File

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

View File

@ -1,4 +1,4 @@
export declare type ImportRunner = {
export type ImportRunner = {
firstname: string;
middlename?: string;
lastname: string;

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type JwtUser = {
export type JwtUser = {
id: number;
uuid: string;
email?: string;

View File

@ -1,3 +1,3 @@
export declare type Logout = {
export type Logout = {
timestamp: string;
};

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type Participant = {
export type Participant = {
id: number;
firstname: string;
middlename?: string;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type Permission = {
export type Permission = {
id: number;
target: Permission.target;
action: Permission.action;

View File

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

View File

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

View File

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

View File

@ -1,3 +1,3 @@
export declare type Principal = {
export type Principal = {
id: number;
};

View File

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

View File

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

View File

@ -1,3 +1,3 @@
export declare type RefreshAuth = {
export type RefreshAuth = {
token?: string;
};

View File

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

View File

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

View File

@ -1,4 +1,4 @@
export declare type ResetPassword = {
export type ResetPassword = {
resetToken?: string;
password: string;
};

View File

@ -1,4 +1,4 @@
export declare type ResponseAuth = {
export type ResponseAuth = {
access_token: string;
refresh_token: string;
access_token_expires_at: number;

View File

@ -1,4 +1,4 @@
export declare type ResponseDistanceDonation = {
export type ResponseDistanceDonation = {
runner: any;
amountPerDistance: number;
id: number;

View File

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

View File

@ -1,4 +1,4 @@
export declare type ResponseDonor = {
export type ResponseDonor = {
receiptNeeded: boolean;
donationAmount: number;
paidDonationAmount: number;

View File

@ -1,3 +1,3 @@
export declare type ResponseEmpty = {
export type ResponseEmpty = {
response: string;
};

View File

@ -1,4 +1,4 @@
export declare type ResponseGroupContact = {
export type ResponseGroupContact = {
id: number;
firstname: string;
middlename: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseParticipant = {
export type ResponseParticipant = {
id: number;
firstname: string;
middlename: string;

View File

@ -1,4 +1,4 @@
export declare type ResponsePermission = {
export type ResponsePermission = {
id: number;
principal: any;
target: ResponsePermission.target;

View File

@ -1,3 +1,3 @@
export declare type ResponsePrincipal = {
export type ResponsePrincipal = {
id: number;
};

View File

@ -1,4 +1,4 @@
export declare type ResponseRunner = {
export type ResponseRunner = {
distance: number;
group: any;
id: number;

View File

@ -1,4 +1,4 @@
export declare type ResponseRunnerCard = {
export type ResponseRunnerCard = {
id: number;
runner: any;
code: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseRunnerGroup = {
export type ResponseRunnerGroup = {
id: number;
name: string;
contact?: any;

View File

@ -1,4 +1,4 @@
export declare type ResponseRunnerOrganization = {
export type ResponseRunnerOrganization = {
address?: any;
teams: Array<any>;
registrationKey?: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseRunnerTeam = {
export type ResponseRunnerTeam = {
parentGroup: any;
id: number;
name: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseScan = {
export type ResponseScan = {
id: number;
runner: string;
valid: boolean;

View File

@ -1,4 +1,4 @@
export declare type ResponseScanStation = {
export type ResponseScanStation = {
id: number;
description?: string;
key?: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseSelfServiceDonation = {
export type ResponseSelfServiceDonation = {
donor: string;
amount: number;
amountPerDistance: number;

View File

@ -1,4 +1,4 @@
export declare type ResponseSelfServiceDonor = {
export type ResponseSelfServiceDonor = {
id: number;
firstname: string;
middlename: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseSelfServiceOrganisation = {
export type ResponseSelfServiceOrganisation = {
name: string;
teams: Array<any>;
};

View File

@ -1,4 +1,4 @@
export declare type ResponseSelfServiceRunner = {
export type ResponseSelfServiceRunner = {
distance: number;
donationAmount: number;
group: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseSelfServiceScan = {
export type ResponseSelfServiceScan = {
id: number;
valid: boolean;
distance: number;

View File

@ -1,4 +1,4 @@
export declare type ResponseSelfServiceTeam = {
export type ResponseSelfServiceTeam = {
name: string;
id: number;
};

View File

@ -1,4 +1,4 @@
export declare type ResponseStats = {
export type ResponseStats = {
total_runners: number;
total_teams: number;
total_orgs: number;

View File

@ -1,4 +1,4 @@
export declare type ResponseStatsClient = {
export type ResponseStatsClient = {
id: number;
description?: string;
key?: string;

View File

@ -1,4 +1,4 @@
export declare type ResponseStatsOrgnisation = {
export type ResponseStatsOrgnisation = {
id: number;
name: string;
distance: number;

View File

@ -1,4 +1,4 @@
export declare type ResponseStatsRunner = {
export type ResponseStatsRunner = {
id: number;
firstname: string;
middlename: string;

Some files were not shown because too many files have changed in this diff Show More