Compare commits

..

97 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
430dcbba07 🚀New lib version v0.13.0 [CI SKIP] 2023-02-02 12:00:17 +00:00
f9aa86b553 🚀New lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2023-02-02 09:47:35 +00:00
068c27f3ff Bump
All checks were successful
continuous-integration/drone Build is passing
2023-02-02 10:45:41 +01:00
6b08195b1f Merge branch 'main' of git.odit.services:lfk/lfk-client-node 2023-02-02 10:45:19 +01:00
f6c5885090 [CI SKIP] 2023-02-02 10:45:13 +01:00
1b65c64dfa 🚀New lib version v0.11.1 [CI SKIP]
Some checks failed
continuous-integration/drone Build is failing
2021-04-22 18:27:34 +00:00
76a08a9c34 🚀New lib version v0.11.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-04-14 17:08:11 +00:00
1a378fcea9 🚀New lib version v0.10.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-04-03 16:30:05 +00:00
0d8d8f1af4 🚀New lib version v0.9.2 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-29 16:50:00 +00:00
093b572c63 🚀New lib version v0.9.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-29 16:17:56 +00:00
a3c8ac843e 🚀New lib version v0.9.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-26 20:41:19 +00:00
11f76ba2b5 🚀New lib version v0.8.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-26 16:40:14 +00:00
75f1949a4b 🚀New lib version v0.7.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-26 15:58:55 +00:00
4937a12c11 🚀New lib version v0.7.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-23 17:55:01 +00:00
8fd732356e 🚀New lib version v0.6.4 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-19 16:46:01 +00:00
971998f954 🚀New lib version v0.6.3 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-03-18 16:01:27 +00:00
f1e5179fc1 Added pipeline type
All checks were successful
continuous-integration/drone Build is passing
2021-03-18 16:56:49 +01:00
8923bb28d0 Updated ci with new kubernetes secrets 🚀🚀🚀
Some checks failed
continuous-integration/drone Build was killed
ref odit/org#12
2021-03-12 20:01:31 +01:00
c11b709e0b 🚀New lib version v0.5.0 [CI SKIP] 2021-03-04 16:27:59 +00:00
dbbd5b27da 🚀New lib version v0.4.6 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-02-26 18:33:55 +00:00
46be0ad3f1 🚀New lib version v0.4.5 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-02-09 18:28:47 +00:00
28b463ca0a 🚀New lib version v0.4.4 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-02-09 16:50:51 +00:00
f3dc4a4aa0 🚀New lib version v0.4.3 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-02-07 12:46:57 +00:00
c903573961 🚀New lib version v0.4.2 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-02-02 15:05:18 +00:00
815ff7ef42 🚀New lib version v0.4.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-30 16:02:40 +00:00
8000129da7 🚀New lib version v0.4.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-30 15:30:27 +00:00
fc01350288 🚀New lib version v0.3.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-27 16:50:17 +00:00
d4d6b713e2 🚀New lib version v0.3.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-24 18:01:44 +00:00
232cc74190 🚀New lib version v0.2.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-21 17:35:38 +00:00
b62a240ca6 🚀New lib version v0.2.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-20 17:08:44 +00:00
e329836a06 🚀New lib version v0.1.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-16 20:37:14 +00:00
3e9d3e4120 🚀New lib version v0.1.0 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-15 19:40:46 +00:00
79606e3f43 🚀New lib version v0.0.12 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-13 19:36:32 +00:00
7c7d0c195e Updated the new version commit message
All checks were successful
continuous-integration/drone Build is passing
2021-01-10 18:23:56 +01:00
bdb046f969 new lib version [CI SKIP] 2021-01-10 17:19:49 +00:00
21e8396e8e new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-08 20:18:30 +00:00
7ad8cae4d2 new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-08 19:56:49 +00:00
f6c6013368 new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-03 18:16:14 +00:00
46e9ee2a1b new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2021-01-03 17:33:57 +00:00
75fa469974 new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2020-12-30 18:01:28 +00:00
f56906e640 new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2020-12-29 13:42:51 +00:00
ec3df312be new lib version [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing
2020-12-29 13:35:32 +00:00
b7a815076f Added custom trigger
All checks were successful
continuous-integration/drone Build is passing
2020-12-29 14:30:25 +01:00
e7e446f103 Formatting 2020-12-29 14:29:15 +01:00
08a105b11c Added type declaration reference to package.json 2020-12-23 16:52:43 +01:00
dd8370986b Added build status to readme 2020-12-22 15:49:25 +01:00
302d0edc6e Switched pipeline over to build only on tags and from main 2020-12-22 15:45:47 +01:00
6106288a5b Updated git repo
Some checks failed
continuous-integration/drone/push Build was killed
2020-12-22 15:42:37 +01:00
a3e2a27ba9 Version bump
Some checks failed
continuous-integration/drone/push Build is failing
2020-12-22 15:36:38 +01:00
52ac2efc67 new lib version [CI SKIP] 2020-12-22 14:30:44 +00:00
284f3303c3 Updated ci git repo
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-22 15:29:23 +01:00
543379d7e4 Changes for the node/js split 2020-12-22 15:22:57 +01:00
5420f8ce37 removed author name + version bump
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:51:29 +01:00
823fb926a5 new lib version [CI SKIP] 2020-12-13 18:49:21 +00:00
55cdf79f9c Added declaration compiling
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:48:02 +01:00
563a2241e4 Fix w/ version bump
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:44:52 +01:00
5990beb211 Added fetch types
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:37:10 +01:00
73b3cdbece Implemented reccomented setings
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:33:40 +01:00
64462aa728 Changed the commit user
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:29:10 +01:00
6dd83aab19 new lib version [CI SKIP] 2020-12-13 18:26:22 +00:00
e1b745952f Added missing build lib
All checks were successful
continuous-integration/drone/push Build is passing
2020-12-13 19:25:03 +01:00
5c9809a522 Fixed typo
Some checks failed
continuous-integration/drone/push Build is failing
2020-12-13 19:22:34 +01:00
3a20998ed9 Manual branch overwrite
Some checks failed
continuous-integration/drone/push Build is failing
2020-12-13 19:21:19 +01:00
aa7fe1aeb6 new build pipeline (dry-run)
Some checks failed
continuous-integration/drone/push Build is failing
2020-12-13 19:17:46 +01:00
e40f174241 Added a new build pipeline 2020-12-13 19:17:10 +01:00
251bf1034c Added tsconfig for later building of this project 2020-12-13 19:06:13 +01:00
37e6059187 Updated ignores 2020-12-13 19:05:37 +01:00
494d2f83f2 Removed useless script 2020-12-13 13:15:34 +01:00
426d591bf6 Added node_modules to the gitignore 2020-12-13 13:14:56 +01:00
1e767336bd yeete useless modules folder 2020-12-13 13:14:26 +01:00
5647873ef4 Switched back to non-overwrite 2020-12-13 13:12:10 +01:00
32b92aa76d new lib version [CI SKIP] 2020-12-13 12:05:55 +00:00
405 changed files with 5779 additions and 82 deletions

View File

@@ -1,63 +1,64 @@
---
kind: pipeline
name: build:tag
steps:
- name: checkout backend
image: alpine/git
commands:
- git clone https://git.odit.services/lfk/backend backend
- cd backend
- git checkout feature/31-lib_generation
- name: run lib build
image: node:alpine
commands:
- cd backend
- yarn
- yarn lib
- cd ..
# - npm --no-git-tag-version version ${SOURCE_TAG}
- name: prepare_commit
image: alpine
commands:
- rm -rf ./dist ./openapi.json
- mv ./backend/lib/dist ./dist
- mv ./backend/lib/openapi.json ./openapi.json
- rm -rf ./backend
- name: push to repo
image: appleboy/drone-git-push
settings:
branch: main
commit: true
commit_message: new lib version [CI SKIP]
remote: git@git.odit.services:lfk/lib.git
ssh_key:
from_secret: GITLAB_SSHKEY
- name: npm
image: plugins/npm
settings:
token:
from_secret: NPM_TOKEN
email: info@odit.services
trigger:
event:
include:
- push
# ---
# kind: pipeline
# name: release:onpush
# steps:
# - name: npm
# image: plugins/npm
# settings:
# token:
# from_secret: NPM_TOKEN
# email: info@odit.services
# trigger:
# event:
# include:
# - push
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: secret
name: npm_token
get:
path: niggl-npm-key
name: npmkey
---
kind: pipeline
type: kubernetes
name: build:tag
steps:
- name: checkout backend
image: alpine/git
commands:
- git clone https://git.odit.services/lfk/backend backend
- cd backend
- git checkout dev
- name: run openapi export
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- cd backend
- yarn
- yarn openapi:export
- mv ./openapi.json ../openapi.json
- cd ..
- rm -rf backend
- name: run lib build
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- yarn
- yarn build
- npm --no-git-tag-version version ${SOURCE_TAG}
- name: push to repo
image: appleboy/drone-git-push
settings:
branch: main
commit: true
commit_message: 🚀New lib version ${SOURCE_TAG} [CI SKIP]
author_email: bot@odit.services
remote: git@git.odit.services:lfk/lfk-client-node.git
ssh_key:
from_secret: git_ssh
- name: npm
image: plugins/npm
settings:
token:
from_secret: npm_token
email: info@odit.services
trigger:
event:
exclude:
- push
include:
- custom

6
.gitignore vendored
View File

@@ -8,4 +8,8 @@
# Local History for Visual Studio Code
.history/
node_modules
lib
package-lock.json
yarn.lock
pnpm-lock.yaml

View File

@@ -3,4 +3,6 @@ node_modules
.vscode
*.lock
.drone.yml
.gitignore
.gitignore
lib
package-lock.json

View File

@@ -1,4 +1,7 @@
# ODIT.Services - LfK-Client
# ODIT.Services - LfK-Client (Node Version)
[![Build Status](https://ci.odit.services/api/badges/lfk/lfk-client-node/status.svg?ref=refs/heads/main)](https://ci.odit.services/lfk/lfk-client-node)
The official library for the LfK [backend server](https://git.odit.services/lfk/backend).
Automagicly™ generated by [openapi-typescript-codegen](https://www.npmjs.com/package/openapi-typescript-codegen)
@@ -9,7 +12,7 @@ Get's automagicly™ build by drone for every new backend release.
Basic example: Get all tracks
```typescript
import {OpenAPI, TrackService} from "@odit/lfk-client";
import {OpenAPI, TrackService} from "@odit/lfk-client-node";
OpenAPI.BASE = "https://localhost:4010";
console.log(await TrackService.trackControllerGetAll());
```
@@ -18,9 +21,9 @@ console.log(await TrackService.trackControllerGetAll());
Via yarn/npm:
```bash
yarn add @odit/lfk-client
yarn add @odit/lfk-client-node
# Or
npm i @odit/lfk-client
npm i @odit/lfk-client-node
```
Or just copy the folder `dist` to your prefered lib folder and import everything you need from `dist/index.ts`.

8
dist/core/ApiError.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { ApiResult } from './ApiResult';
export declare class ApiError extends Error {
readonly url: string;
readonly status: number;
readonly statusText: string;
readonly body: any;
constructor(response: ApiResult, message: string);
}

13
dist/core/ApiError.js vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiError = void 0;
class ApiError extends Error {
constructor(response, message) {
super(message);
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
}
}
exports.ApiError = ApiError;

11
dist/core/ApiRequestOptions.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
export type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly path: string;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
};

2
dist/core/ApiRequestOptions.js vendored Normal file
View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

7
dist/core/ApiResult.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export type ApiResult = {
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
};

2
dist/core/ApiResult.js vendored Normal file
View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

13
dist/core/OpenAPI.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
type Resolver<T> = () => Promise<T>;
type Headers = Record<string, string>;
type Config = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
TOKEN?: string | Resolver<string>;
USERNAME?: string | Resolver<string>;
PASSWORD?: string | Resolver<string>;
HEADERS?: Headers | Resolver<Headers>;
};
export declare const OpenAPI: Config;
export {};

12
dist/core/OpenAPI.js vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpenAPI = void 0;
exports.OpenAPI = {
BASE: '',
VERSION: '1.1.3',
WITH_CREDENTIALS: false,
TOKEN: undefined,
USERNAME: undefined,
PASSWORD: undefined,
HEADERS: undefined,
};

9
dist/core/request.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';
/**
* Request using node-fetch client
* @param options The request options from the the service
* @returns ApiResult
* @throws ApiError
*/
export declare function request(options: ApiRequestOptions): Promise<ApiResult>;

215
dist/core/request.js vendored Normal file
View File

@@ -0,0 +1,215 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = 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];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.request = void 0;
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
const form_data_1 = __importDefault(require("form-data"));
const node_fetch_1 = __importStar(require("node-fetch"));
const util_1 = require("util");
const ApiError_1 = require("./ApiError");
const OpenAPI_1 = require("./OpenAPI");
function isDefined(value) {
return value !== undefined && value !== null;
}
function isString(value) {
return typeof value === 'string';
}
function isStringWithValue(value) {
return isString(value) && value !== '';
}
function isBinary(value) {
const isBuffer = Buffer.isBuffer(value);
const isArrayBuffer = util_1.types.isArrayBuffer(value);
const isArrayBufferView = util_1.types.isArrayBufferView(value);
return isBuffer || isArrayBuffer || isArrayBufferView;
}
function getQueryString(params) {
const qs = [];
Object.keys(params).forEach(key => {
const value = params[key];
if (isDefined(value)) {
if (Array.isArray(value)) {
value.forEach(value => {
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
});
}
else {
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
}
}
});
if (qs.length > 0) {
return `?${qs.join('&')}`;
}
return '';
}
function getUrl(options) {
const path = options.path.replace(/[:]/g, '_');
const url = `${OpenAPI_1.OpenAPI.BASE}${path}`;
if (options.query) {
return `${url}${getQueryString(options.query)}`;
}
return url;
}
function getFormData(params) {
const formData = new form_data_1.default();
Object.keys(params).forEach(key => {
const value = params[key];
if (isDefined(value)) {
formData.append(key, value);
}
});
return formData;
}
async function resolve(resolver) {
if (typeof resolver === 'function') {
return resolver();
}
return resolver;
}
async function getHeaders(options) {
const headers = new node_fetch_1.Headers({
Accept: 'application/json',
...OpenAPI_1.OpenAPI.HEADERS,
...options.headers,
});
const token = await resolve(OpenAPI_1.OpenAPI.TOKEN);
const username = await resolve(OpenAPI_1.OpenAPI.USERNAME);
const password = await resolve(OpenAPI_1.OpenAPI.PASSWORD);
if (isStringWithValue(token)) {
headers.append('Authorization', `Bearer ${token}`);
}
if (isStringWithValue(username) && isStringWithValue(password)) {
const credentials = Buffer.from(`${username}:${password}`).toString('base64');
headers.append('Authorization', `Basic ${credentials}`);
}
if (options.body) {
if (isBinary(options.body)) {
headers.append('Content-Type', 'application/octet-stream');
}
else if (isString(options.body)) {
headers.append('Content-Type', 'text/plain');
}
else {
headers.append('Content-Type', 'application/json');
}
}
return headers;
}
function getRequestBody(options) {
if (options.formData) {
return getFormData(options.formData);
}
if (options.body) {
if (isString(options.body) || isBinary(options.body)) {
return options.body;
}
else {
return JSON.stringify(options.body);
}
}
return undefined;
}
async function sendRequest(options, url) {
const request = {
method: options.method,
headers: await getHeaders(options),
body: getRequestBody(options),
};
return await (0, node_fetch_1.default)(url, request);
}
function getResponseHeader(response, responseHeader) {
if (responseHeader) {
const content = response.headers.get(responseHeader);
if (isString(content)) {
return content;
}
}
return null;
}
async function getResponseBody(response) {
try {
const contentType = response.headers.get('Content-Type');
if (contentType) {
const isJSON = contentType.toLowerCase().startsWith('application/json');
if (isJSON) {
return await response.json();
}
else {
return await response.text();
}
}
}
catch (error) {
console.error(error);
}
return null;
}
function catchErrors(options, result) {
const errors = {
400: 'Bad Request',
401: 'Unauthorized',
403: 'Forbidden',
404: 'Not Found',
500: 'Internal Server Error',
502: 'Bad Gateway',
503: 'Service Unavailable',
...options.errors,
};
const error = errors[result.status];
if (error) {
throw new ApiError_1.ApiError(result, error);
}
if (!result.ok) {
throw new ApiError_1.ApiError(result, 'Generic Error');
}
}
/**
* Request using node-fetch client
* @param options The request options from the the service
* @returns ApiResult
* @throws ApiError
*/
async function request(options) {
const url = getUrl(options);
const response = await sendRequest(options, url);
const responseBody = await getResponseBody(response);
const responseHeader = getResponseHeader(response, options.responseHeader);
const result = {
url,
ok: response.ok,
status: response.status,
statusText: response.statusText,
body: responseHeader || responseBody,
};
catchErrors(options, result);
return result;
}
exports.request = request;

195
dist/index.d.ts vendored Normal file
View File

@@ -0,0 +1,195 @@
export { ApiError } from './core/ApiError';
export { OpenAPI } from './core/OpenAPI';
export type { Address } from './models/Address';
export type { AddressCityEmptyError } from './models/AddressCityEmptyError';
export type { AddressCountryEmptyError } from './models/AddressCountryEmptyError';
export type { AddressFirstLineEmptyError } from './models/AddressFirstLineEmptyError';
export type { AddressPostalCodeEmptyError } from './models/AddressPostalCodeEmptyError';
export type { AddressPostalCodeInvalidError } from './models/AddressPostalCodeInvalidError';
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 { CreateGroupContact } from './models/CreateGroupContact';
export type { CreateParticipant } from './models/CreateParticipant';
export { CreatePermission } from './models/CreatePermission';
export type { CreateResetToken } from './models/CreateResetToken';
export type { CreateRunner } from './models/CreateRunner';
export type { CreateRunnerCard } from './models/CreateRunnerCard';
export type { CreateRunnerGroup } from './models/CreateRunnerGroup';
export type { CreateRunnerOrganization } from './models/CreateRunnerOrganization';
export type { CreateRunnerTeam } from './models/CreateRunnerTeam';
export type { CreateScan } from './models/CreateScan';
export type { CreateScanStation } from './models/CreateScanStation';
export type { CreateSelfServiceCitizenRunner } from './models/CreateSelfServiceCitizenRunner';
export type { CreateSelfServiceRunner } from './models/CreateSelfServiceRunner';
export type { CreateStatsClient } from './models/CreateStatsClient';
export type { CreateTrack } from './models/CreateTrack';
export type { CreateTrackScan } from './models/CreateTrackScan';
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 { GroupContactIdsNotMatchingError } from './models/GroupContactIdsNotMatchingError';
export type { GroupContactNotFoundError } from './models/GroupContactNotFoundError';
export type { GroupNameNeededError } from './models/GroupNameNeededError';
export type { HandleLogout } from './models/HandleLogout';
export type { IllegalJWTError } from './models/IllegalJWTError';
export type { ImportRunner } from './models/ImportRunner';
export type { InvalidCredentialsError } from './models/InvalidCredentialsError';
export type { JwtNotProvidedError } from './models/JwtNotProvidedError';
export type { JwtUser } from './models/JwtUser';
export type { Logout } from './models/Logout';
export type { MailSendingError } from './models/MailSendingError';
export type { NoPermissionError } from './models/NoPermissionError';
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 { PasswordTooShortError } from './models/PasswordTooShortError';
export { Permission } from './models/Permission';
export type { PermissionIdsNotMatchingError } from './models/PermissionIdsNotMatchingError';
export type { PermissionNeedsPrincipalError } from './models/PermissionNeedsPrincipalError';
export type { PermissionNotFoundError } from './models/PermissionNotFoundError';
export type { Principal } from './models/Principal';
export type { PrincipalNotFoundError } from './models/PrincipalNotFoundError';
export type { PrincipalWrongTypeError } from './models/PrincipalWrongTypeError';
export type { RefreshAuth } from './models/RefreshAuth';
export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountInvalidError';
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 { ResponseGroupContact } from './models/ResponseGroupContact';
export type { ResponseParticipant } from './models/ResponseParticipant';
export { ResponsePermission } from './models/ResponsePermission';
export type { ResponsePrincipal } from './models/ResponsePrincipal';
export type { ResponseRunner } from './models/ResponseRunner';
export type { ResponseRunnerCard } from './models/ResponseRunnerCard';
export type { ResponseRunnerGroup } from './models/ResponseRunnerGroup';
export type { ResponseRunnerOrganization } from './models/ResponseRunnerOrganization';
export type { ResponseRunnerTeam } from './models/ResponseRunnerTeam';
export type { ResponseScan } from './models/ResponseScan';
export type { ResponseScanStation } from './models/ResponseScanStation';
export type { ResponseSelfServiceDonation } from './models/ResponseSelfServiceDonation';
export type { ResponseSelfServiceDonor } from './models/ResponseSelfServiceDonor';
export type { ResponseSelfServiceOrganisation } from './models/ResponseSelfServiceOrganisation';
export type { ResponseSelfServiceRunner } from './models/ResponseSelfServiceRunner';
export type { ResponseSelfServiceScan } from './models/ResponseSelfServiceScan';
export type { ResponseSelfServiceTeam } from './models/ResponseSelfServiceTeam';
export type { ResponseStats } from './models/ResponseStats';
export type { ResponseStatsClient } from './models/ResponseStatsClient';
export type { ResponseStatsOrgnisation } from './models/ResponseStatsOrgnisation';
export type { ResponseStatsRunner } from './models/ResponseStatsRunner';
export type { ResponseStatsTeam } from './models/ResponseStatsTeam';
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 { ResponseUserGroupPermissions } from './models/ResponseUserGroupPermissions';
export type { ResponseUserPermissions } from './models/ResponseUserPermissions';
export type { Runner } from './models/Runner';
export type { RunnerCard } from './models/RunnerCard';
export type { RunnerCardHasScansError } from './models/RunnerCardHasScansError';
export type { RunnerCardIdOutOfRangeError } from './models/RunnerCardIdOutOfRangeError';
export type { RunnerCardIdsNotMatchingError } from './models/RunnerCardIdsNotMatchingError';
export type { RunnerCardNotFoundError } from './models/RunnerCardNotFoundError';
export type { RunnerEmailNeededError } from './models/RunnerEmailNeededError';
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 { RunnerOrganization } from './models/RunnerOrganization';
export type { RunnerOrganizationHasRunnersError } from './models/RunnerOrganizationHasRunnersError';
export type { RunnerOrganizationHasTeamsError } from './models/RunnerOrganizationHasTeamsError';
export type { RunnerOrganizationIdsNotMatchingError } from './models/RunnerOrganizationIdsNotMatchingError';
export type { RunnerOrganizationNotFoundError } from './models/RunnerOrganizationNotFoundError';
export type { RunnerOrganizationWrongTypeError } from './models/RunnerOrganizationWrongTypeError';
export type { RunnerSelfserviceTimeoutError } from './models/RunnerSelfserviceTimeoutError';
export type { RunnerTeam } from './models/RunnerTeam';
export type { RunnerTeamHasRunnersError } from './models/RunnerTeamHasRunnersError';
export type { RunnerTeamIdsNotMatchingError } from './models/RunnerTeamIdsNotMatchingError';
export type { RunnerTeamNeedsParentError } from './models/RunnerTeamNeedsParentError';
export type { RunnerTeamNotFoundError } from './models/RunnerTeamNotFoundError';
export type { Scan } from './models/Scan';
export type { ScanIdsNotMatchingError } from './models/ScanIdsNotMatchingError';
export type { ScanNotFoundError } from './models/ScanNotFoundError';
export type { ScanStation } from './models/ScanStation';
export type { ScanStationHasScansError } from './models/ScanStationHasScansError';
export type { ScanStationIdsNotMatchingError } from './models/ScanStationIdsNotMatchingError';
export type { ScanStationNotFoundError } from './models/ScanStationNotFoundError';
export type { StatsClient } from './models/StatsClient';
export type { StatsClientIdsNotMatchingError } from './models/StatsClientIdsNotMatchingError';
export type { StatsClientNotFoundError } from './models/StatsClientNotFoundError';
export type { Track } from './models/Track';
export type { TrackHasScanStationsError } from './models/TrackHasScanStationsError';
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 { UpdateGroupContact } from './models/UpdateGroupContact';
export type { UpdatePermission } from './models/UpdatePermission';
export type { UpdateRunner } from './models/UpdateRunner';
export type { UpdateRunnerCard } from './models/UpdateRunnerCard';
export type { UpdateRunnerOrganization } from './models/UpdateRunnerOrganization';
export type { UpdateRunnerTeam } from './models/UpdateRunnerTeam';
export type { UpdateScan } from './models/UpdateScan';
export type { UpdateScanStation } from './models/UpdateScanStation';
export type { UpdateTrack } from './models/UpdateTrack';
export type { UpdateTrackScan } from './models/UpdateTrackScan';
export type { UpdateUser } from './models/UpdateUser';
export type { UpdateUserGroup } from './models/UpdateUserGroup';
export type { User } from './models/User';
export { UserAction } from './models/UserAction';
export type { UserDeletionNotConfirmedError } from './models/UserDeletionNotConfirmedError';
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 { GroupContactService } from './services/GroupContactService';
export { ImportService } from './services/ImportService';
export { MeService } from './services/MeService';
export { PermissionService } from './services/PermissionService';
export { RunnerCardService } from './services/RunnerCardService';
export { RunnerOrganizationService } from './services/RunnerOrganizationService';
export { RunnerSelfService } from './services/RunnerSelfService';
export { RunnerService } from './services/RunnerService';
export { RunnerTeamService } from './services/RunnerTeamService';
export { ScanService } from './services/ScanService';
export { ScanStationService } from './services/ScanStationService';
export { StatsClientService } from './services/StatsClientService';
export { StatsService } from './services/StatsService';
export { StatusService } from './services/StatusService';
export { TrackService } from './services/TrackService';
export { UserGroupService } from './services/UserGroupService';
export { UserService } from './services/UserService';

58
dist/index.js vendored Normal file
View File

@@ -0,0 +1,58 @@
"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.RunnerSelfService = exports.RunnerOrganizationService = exports.RunnerCardService = exports.PermissionService = exports.MeService = exports.ImportService = exports.GroupContactService = 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 */
var ApiError_1 = require("./core/ApiError");
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } });
var OpenAPI_1 = require("./core/OpenAPI");
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
var CreatePermission_1 = require("./models/CreatePermission");
Object.defineProperty(exports, "CreatePermission", { enumerable: true, get: function () { return CreatePermission_1.CreatePermission; } });
var Permission_1 = require("./models/Permission");
Object.defineProperty(exports, "Permission", { enumerable: true, get: function () { return Permission_1.Permission; } });
var ResponsePermission_1 = require("./models/ResponsePermission");
Object.defineProperty(exports, "ResponsePermission", { enumerable: true, get: function () { return ResponsePermission_1.ResponsePermission; } });
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 GroupContactService_1 = require("./services/GroupContactService");
Object.defineProperty(exports, "GroupContactService", { enumerable: true, get: function () { return GroupContactService_1.GroupContactService; } });
var ImportService_1 = require("./services/ImportService");
Object.defineProperty(exports, "ImportService", { enumerable: true, get: function () { return ImportService_1.ImportService; } });
var MeService_1 = require("./services/MeService");
Object.defineProperty(exports, "MeService", { enumerable: true, get: function () { return MeService_1.MeService; } });
var PermissionService_1 = require("./services/PermissionService");
Object.defineProperty(exports, "PermissionService", { enumerable: true, get: function () { return PermissionService_1.PermissionService; } });
var RunnerCardService_1 = require("./services/RunnerCardService");
Object.defineProperty(exports, "RunnerCardService", { enumerable: true, get: function () { return RunnerCardService_1.RunnerCardService; } });
var RunnerOrganizationService_1 = require("./services/RunnerOrganizationService");
Object.defineProperty(exports, "RunnerOrganizationService", { enumerable: true, get: function () { return RunnerOrganizationService_1.RunnerOrganizationService; } });
var RunnerSelfService_1 = require("./services/RunnerSelfService");
Object.defineProperty(exports, "RunnerSelfService", { enumerable: true, get: function () { return RunnerSelfService_1.RunnerSelfService; } });
var RunnerService_1 = require("./services/RunnerService");
Object.defineProperty(exports, "RunnerService", { enumerable: true, get: function () { return RunnerService_1.RunnerService; } });
var RunnerTeamService_1 = require("./services/RunnerTeamService");
Object.defineProperty(exports, "RunnerTeamService", { enumerable: true, get: function () { return RunnerTeamService_1.RunnerTeamService; } });
var ScanService_1 = require("./services/ScanService");
Object.defineProperty(exports, "ScanService", { enumerable: true, get: function () { return ScanService_1.ScanService; } });
var ScanStationService_1 = require("./services/ScanStationService");
Object.defineProperty(exports, "ScanStationService", { enumerable: true, get: function () { return ScanStationService_1.ScanStationService; } });
var StatsClientService_1 = require("./services/StatsClientService");
Object.defineProperty(exports, "StatsClientService", { enumerable: true, get: function () { return StatsClientService_1.StatsClientService; } });
var StatsService_1 = require("./services/StatsService");
Object.defineProperty(exports, "StatsService", { enumerable: true, get: function () { return StatsService_1.StatsService; } });
var StatusService_1 = require("./services/StatusService");
Object.defineProperty(exports, "StatusService", { enumerable: true, get: function () { return StatusService_1.StatusService; } });
var TrackService_1 = require("./services/TrackService");
Object.defineProperty(exports, "TrackService", { enumerable: true, get: function () { return TrackService_1.TrackService; } });
var UserGroupService_1 = require("./services/UserGroupService");
Object.defineProperty(exports, "UserGroupService", { enumerable: true, get: function () { return UserGroupService_1.UserGroupService; } });
var UserService_1 = require("./services/UserService");
Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return UserService_1.UserService; } });

7
dist/models/Address.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export type Address = {
address1: string;
address2: string;
postalcode: string;
city: string;
country: string;
};

5
dist/models/Address.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 type AddressCityEmptyError = {
name: string;
message: string;
};

5
dist/models/AddressCityEmptyError.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 type AddressCountryEmptyError = {
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 type AddressFirstLineEmptyError = {
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 type AddressPostalCodeEmptyError = {
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 type AddressPostalCodeInvalidError = {
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 });

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

@@ -0,0 +1,5 @@
export type CreateAuth = {
username?: string;
email?: string;
password: string;
};

5
dist/models/CreateAuth.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,6 @@
export type CreateDistanceDonation = {
runner: number;
amountPerDistance: number;
donor: number;
paidAmount?: 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 });

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

@@ -0,0 +1,4 @@
export type CreateDonation = {
donor: number;
paidAmount?: 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 });

9
dist/models/CreateDonor.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
export type CreateDonor = {
receiptNeeded?: boolean;
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
email?: string;
address?: any;
};

5
dist/models/CreateDonor.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/CreateFixedDonation.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export type CreateFixedDonation = {
amount: number;
donor: number;
paidAmount?: 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 });

9
dist/models/CreateGroupContact.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
export type CreateGroupContact = {
firstname: string;
middlename?: string;
lastname: string;
address?: any;
phone?: string;
email?: string;
groups?: any;
};

5
dist/models/CreateGroupContact.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 });

8
dist/models/CreateParticipant.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
export type CreateParticipant = {
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
email?: string;
address?: any;
};

5
dist/models/CreateParticipant.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 });

31
dist/models/CreatePermission.d.ts vendored Normal file
View File

@@ -0,0 +1,31 @@
export type CreatePermission = {
principal: number;
target: CreatePermission.target;
action: CreatePermission.action;
};
export declare namespace CreatePermission {
enum target {
RUNNER = "RUNNER",
ORGANIZATION = "ORGANIZATION",
TEAM = "TEAM",
TRACK = "TRACK",
USER = "USER",
USERGROUP = "USERGROUP",
PERMISSION = "PERMISSION",
STATSCLIENT = "STATSCLIENT",
DONOR = "DONOR",
SCAN = "SCAN",
STATION = "STATION",
CARD = "CARD",
DONATION = "DONATION",
CONTACT = "CONTACT",
MAIL = "MAIL"
}
enum action {
GET = "GET",
CREATE = "CREATE",
UPDATE = "UPDATE",
DELETE = "DELETE",
IMPORT = "IMPORT"
}
}

35
dist/models/CreatePermission.js vendored Normal file
View File

@@ -0,0 +1,35 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreatePermission = void 0;
var CreatePermission;
(function (CreatePermission) {
let target;
(function (target) {
target["RUNNER"] = "RUNNER";
target["ORGANIZATION"] = "ORGANIZATION";
target["TEAM"] = "TEAM";
target["TRACK"] = "TRACK";
target["USER"] = "USER";
target["USERGROUP"] = "USERGROUP";
target["PERMISSION"] = "PERMISSION";
target["STATSCLIENT"] = "STATSCLIENT";
target["DONOR"] = "DONOR";
target["SCAN"] = "SCAN";
target["STATION"] = "STATION";
target["CARD"] = "CARD";
target["DONATION"] = "DONATION";
target["CONTACT"] = "CONTACT";
target["MAIL"] = "MAIL";
})(target = CreatePermission.target || (CreatePermission.target = {}));
let action;
(function (action) {
action["GET"] = "GET";
action["CREATE"] = "CREATE";
action["UPDATE"] = "UPDATE";
action["DELETE"] = "DELETE";
action["IMPORT"] = "IMPORT";
})(action = CreatePermission.action || (CreatePermission.action = {}));
})(CreatePermission = exports.CreatePermission || (exports.CreatePermission = {}));

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

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

5
dist/models/CreateResetToken.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 });

9
dist/models/CreateRunner.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
export type CreateRunner = {
group: number;
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
email?: string;
address?: any;
};

5
dist/models/CreateRunner.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/CreateRunnerCard.d.ts vendored Normal file
View File

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

5
dist/models/CreateRunnerCard.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/CreateRunnerGroup.d.ts vendored Normal file
View File

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

5
dist/models/CreateRunnerGroup.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,6 @@
export type CreateRunnerOrganization = {
address?: any;
registrationEnabled?: boolean;
name: string;
contact?: 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/CreateRunnerTeam.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export type CreateRunnerTeam = {
parentGroup: number;
name: string;
contact?: number;
};

5
dist/models/CreateRunnerTeam.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/CreateScan.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export type CreateScan = {
runner: number;
valid?: boolean;
distance: number;
};

5
dist/models/CreateScan.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/CreateScanStation.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export type CreateScanStation = {
description?: string;
track: number;
enabled?: boolean;
};

5
dist/models/CreateScanStation.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,8 @@
export type CreateSelfServiceCitizenRunner = {
email?: string;
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
address?: 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,9 @@
export type CreateSelfServiceRunner = {
team?: number;
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
email?: string;
address?: any;
};

View File

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

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

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

5
dist/models/CreateStatsClient.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/CreateTrack.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export type CreateTrack = {
name: string;
distance: number;
minimumLapTime?: number;
};

5
dist/models/CreateTrack.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/CreateTrackScan.d.ts vendored Normal file
View File

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

5
dist/models/CreateTrackScan.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 });

12
dist/models/CreateUser.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
export type CreateUser = {
firstname: string;
middlename?: string;
lastname: string;
username?: string;
email: string;
phone?: string;
password: string;
enabled?: boolean;
groups?: any;
profilePic?: string;
};

5
dist/models/CreateUser.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/CreateUserGroup.d.ts vendored Normal file
View File

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

5
dist/models/CreateUserGroup.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 });

7
dist/models/DistanceDonation.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export type DistanceDonation = {
runner: string;
amountPerDistance: number;
id: number;
donor: string;
paidAmount: number;
};

5
dist/models/DistanceDonation.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/Donation.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export type Donation = {
id: number;
donor: string;
paidAmount: number;
};

5
dist/models/Donation.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 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 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 });

11
dist/models/Donor.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
export type Donor = {
receiptNeeded: boolean;
donationAmount: number;
paidDonationAmount: number;
id: number;
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
email?: string;
};

5
dist/models/Donor.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 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 });

View File

@@ -0,0 +1,4 @@
export type DonorIdsNotMatchingError = {
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 });

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

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

5
dist/models/DonorNotFoundError.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 type DonorReceiptAddressNeededError = {
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 });

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

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

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 });

8
dist/models/GroupContact.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
export type GroupContact = {
id: number;
firstname: string;
middlename?: string;
lastname: string;
phone?: string;
email?: string;
};

5
dist/models/GroupContact.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 type GroupContactIdsNotMatchingError = {
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 type GroupContactNotFoundError = {
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 });

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