commit 94d26fcafc13dd2fb96d0f9fa7e152546b72262e Author: Nicolai Ort Date: Tue Dec 22 15:17:25 2020 +0100 Initial commit for the js version diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..334dfd4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,47 @@ +--- +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 openapi export + image: node:alpine + commands: + - cd backend + - yarn + - yarn openapi:export + - mv ./openapi.json ../openapi.json + - cd .. + - rm -rf backend + - name: run lib build + image: node:alpine + 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 [CI SKIP] + author_email: bot@odit.services + 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 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ac3d60 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ +node_modules +lib +package-lock.json +yarn.lock \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..633c51e --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +node_modules +.DS_Store +.vscode +*.lock +.drone.yml +.gitignore +lib +package-lock.json \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fe27335 --- /dev/null +++ b/LICENSE @@ -0,0 +1,362 @@ +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Creative +Commons Corporation ("Creative Commons") is not a law firm and does not provide +legal services or legal advice. Distribution of Creative Commons public licenses +does not create a lawyer-client or other relationship. Creative Commons makes +its licenses and related information available on an "as-is" basis. Creative +Commons gives no warranties regarding its licenses, any material licensed +under their terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the fullest +extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees + +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, +approved by Creative Commons as essentially the equivalent of this Public +License. + +d. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +e. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +f. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +g. License Elements means the license attributes listed in the name of a Creative +Commons Public License. The License Elements of this Public License are Attribution, +NonCommercial, and ShareAlike. + +h. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +i. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +j. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +k. NonCommercial means not primarily intended for or directed towards commercial +advantage or monetary compensation. For purposes of this Public License, the +exchange of the Licensed Material for other material subject to Copyright +and Similar Rights by digital file-sharing or similar means is NonCommercial +provided there is no payment of monetary compensation in connection with the +exchange. + +l. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +m. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +n. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + +A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial +purposes only; and + +B. produce, reproduce, and Share Adapted Material for NonCommercial purposes +only. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. Additional offer from the Licensor – Adapted Material. Every recipient +of Adapted Material from You automatically receives an offer from the Licensor +to exercise the Licensed Rights in the Adapted Material under the conditions +of the Adapter's License You apply. + +C. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties, including when the Licensed Material is used other +than for NonCommercial purposes. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + + + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +b. ShareAlike.In addition to the conditions in Section 3(a), if You Share +Adapted Material You produce, the following conditions also apply. + +1. The Adapter's License You apply must be a Creative Commons license with +the same License Elements, this version or later, or a BY-NC-SA Compatible +License. + +2. You must include the text of, or the URI or hyperlink to, the Adapter's +License You apply. You may satisfy this condition in any reasonable manner +based on the medium, means, and context in which You Share Adapted Material. + +3. You may not offer or impose any additional or different terms or conditions +on, or apply any Effective Technological Measures to, Adapted Material that +restrict exercise of the rights granted under the Adapter's License You apply. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database for NonCommercial purposes only; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material, including for purposes of Section 3(b); and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +For the avoidance of doubt, this Section 6(b) does not affect any right the +Licensor may have to seek remedies for Your violations of this Public License. + +c. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/README.md b/README.md new file mode 100644 index 0000000..bf45c68 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# ODIT.Services - LfK-Client (JS Version) +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) + +## 🛠 Building +Get's automagicly™ build by drone for every new backend release. + +## Use + +Basic example: Get all tracks +```typescript +import {OpenAPI, TrackService} from "@odit/lfk-client"; +OpenAPI.BASE = "https://localhost:4010"; +console.log(await TrackService.trackControllerGetAll()); +``` + +### Install + +Via yarn/npm: +```bash +yarn add @odit/lfk-client-js +# Or +npm i @odit/lfk-client-js +``` + +Or just copy the folder `dist` to your prefered lib folder and import everything you need from `dist/index.ts`. \ No newline at end of file diff --git a/dist/core/ApiError.d.ts b/dist/core/ApiError.d.ts new file mode 100644 index 0000000..110e808 --- /dev/null +++ b/dist/core/ApiError.d.ts @@ -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); +} diff --git a/dist/core/ApiError.js b/dist/core/ApiError.js new file mode 100644 index 0000000..62d1e82 --- /dev/null +++ b/dist/core/ApiError.js @@ -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; diff --git a/dist/core/ApiRequestOptions.d.ts b/dist/core/ApiRequestOptions.d.ts new file mode 100644 index 0000000..1b56af2 --- /dev/null +++ b/dist/core/ApiRequestOptions.d.ts @@ -0,0 +1,11 @@ +export declare type ApiRequestOptions = { + readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; + readonly path: string; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly responseHeader?: string; + readonly errors?: Record; +}; diff --git a/dist/core/ApiRequestOptions.js b/dist/core/ApiRequestOptions.js new file mode 100644 index 0000000..ce03781 --- /dev/null +++ b/dist/core/ApiRequestOptions.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/core/ApiResult.d.ts b/dist/core/ApiResult.d.ts new file mode 100644 index 0000000..4074da8 --- /dev/null +++ b/dist/core/ApiResult.d.ts @@ -0,0 +1,7 @@ +export declare type ApiResult = { + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; +}; diff --git a/dist/core/ApiResult.js b/dist/core/ApiResult.js new file mode 100644 index 0000000..ce03781 --- /dev/null +++ b/dist/core/ApiResult.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/core/OpenAPI.d.ts b/dist/core/OpenAPI.d.ts new file mode 100644 index 0000000..e4b89c2 --- /dev/null +++ b/dist/core/OpenAPI.d.ts @@ -0,0 +1,13 @@ +declare type Resolver = () => Promise; +declare type Headers = Record; +declare type Config = { + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + TOKEN?: string | Resolver; + USERNAME?: string | Resolver; + PASSWORD?: string | Resolver; + HEADERS?: Headers | Resolver; +}; +export declare const OpenAPI: Config; +export {}; diff --git a/dist/core/OpenAPI.js b/dist/core/OpenAPI.js new file mode 100644 index 0000000..7f31296 --- /dev/null +++ b/dist/core/OpenAPI.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OpenAPI = void 0; +exports.OpenAPI = { + BASE: '', + VERSION: '1.0.0', + WITH_CREDENTIALS: false, + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, +}; diff --git a/dist/core/request.d.ts b/dist/core/request.d.ts new file mode 100644 index 0000000..fe44b78 --- /dev/null +++ b/dist/core/request.d.ts @@ -0,0 +1,9 @@ +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; +/** + * Request using fetch client + * @param options The request options from the the service + * @result ApiResult + * @throws ApiError + */ +export declare function request(options: ApiRequestOptions): Promise; diff --git a/dist/core/request.js b/dist/core/request.js new file mode 100644 index 0000000..f7366e3 --- /dev/null +++ b/dist/core/request.js @@ -0,0 +1,183 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.request = void 0; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +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 isBlob(value) { + return value instanceof Blob; +} +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 FormData(); + 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 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 = btoa(`${username}:${password}`); + headers.append('Authorization', `Basic ${credentials}`); + } + if (options.body) { + if (isBlob(options.body)) { + headers.append('Content-Type', options.body.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) || isBlob(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 fetch(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 fetch client + * @param options The request options from the the service + * @result 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; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..267e480 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,83 @@ +export { ApiError } from './core/ApiError'; +export { OpenAPI } from './core/OpenAPI'; +export type { Address } from './models/Address'; +export type { AddressNotFoundError } from './models/AddressNotFoundError'; +export type { AddressWrongTypeError } from './models/AddressWrongTypeError'; +export type { Auth } from './models/Auth'; +export type { CreateAuth } from './models/CreateAuth'; +export type { CreateParticipant } from './models/CreateParticipant'; +export type { CreateRunner } from './models/CreateRunner'; +export type { CreateRunnerGroup } from './models/CreateRunnerGroup'; +export type { CreateRunnerOrganisation } from './models/CreateRunnerOrganisation'; +export type { CreateRunnerTeam } from './models/CreateRunnerTeam'; +export type { CreateTrack } from './models/CreateTrack'; +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 { ExpiredJWTError } from './models/ExpiredJWTError'; +export type { GroupContact } from './models/GroupContact'; +export type { GroupContactNotFoundError } from './models/GroupContactNotFoundError'; +export type { GroupContactWrongTypeError } from './models/GroupContactWrongTypeError'; +export type { GroupNameNeededError } from './models/GroupNameNeededError'; +export type { HandleLogout } from './models/HandleLogout'; +export type { IllegalJWTError } from './models/IllegalJWTError'; +export type { InvalidCredentialsError } from './models/InvalidCredentialsError'; +export type { JwtNotProvidedError } from './models/JwtNotProvidedError'; +export type { Logout } from './models/Logout'; +export type { NoPermissionError } from './models/NoPermissionError'; +export type { Participant } from './models/Participant'; +export type { PasswordNeededError } from './models/PasswordNeededError'; +export type { Permission } from './models/Permission'; +export type { RefreshAuth } from './models/RefreshAuth'; +export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountInvalidError'; +export type { ResponseEmpty } from './models/ResponseEmpty'; +export type { ResponseParticipant } from './models/ResponseParticipant'; +export type { ResponseRunner } from './models/ResponseRunner'; +export type { ResponseRunnerGroup } from './models/ResponseRunnerGroup'; +export type { ResponseRunnerOrganisation } from './models/ResponseRunnerOrganisation'; +export type { ResponseRunnerTeam } from './models/ResponseRunnerTeam'; +export type { ResponseTrack } from './models/ResponseTrack'; +export type { Runner } from './models/Runner'; +export type { RunnerCard } from './models/RunnerCard'; +export type { RunnerGroup } from './models/RunnerGroup'; +export type { RunnerGroupNeededError } from './models/RunnerGroupNeededError'; +export type { RunnerGroupNotFoundError } from './models/RunnerGroupNotFoundError'; +export type { RunnerIdsNotMatchingError } from './models/RunnerIdsNotMatchingError'; +export type { RunnerNotFoundError } from './models/RunnerNotFoundError'; +export type { RunnerOrganisation } from './models/RunnerOrganisation'; +export type { RunnerOrganisationHasRunnersError } from './models/RunnerOrganisationHasRunnersError'; +export type { RunnerOrganisationHasTeamsError } from './models/RunnerOrganisationHasTeamsError'; +export type { RunnerOrganisationIdsNotMatchingError } from './models/RunnerOrganisationIdsNotMatchingError'; +export type { RunnerOrganisationNotFoundError } from './models/RunnerOrganisationNotFoundError'; +export type { RunnerOrganisationWrongTypeError } from './models/RunnerOrganisationWrongTypeError'; +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 { ScanStation } from './models/ScanStation'; +export type { Track } from './models/Track'; +export type { TrackIdsNotMatchingError } from './models/TrackIdsNotMatchingError'; +export type { TrackNotFoundError } from './models/TrackNotFoundError'; +export type { TrackScan } from './models/TrackScan'; +export type { UpdateRunner } from './models/UpdateRunner'; +export type { UpdateRunnerTeam } from './models/UpdateRunnerTeam'; +export type { User } from './models/User'; +export type { UserAction } from './models/UserAction'; +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 { 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 { RunnerOrganisationService } from './services/RunnerOrganisationService'; +export { RunnerService } from './services/RunnerService'; +export { RunnerTeamService } from './services/RunnerTeamService'; +export { TrackService } from './services/TrackService'; +export { UserGroupService } from './services/UserGroupService'; +export { UserService } from './services/UserService'; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..5386138 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserService = exports.UserGroupService = exports.TrackService = exports.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.AuthService = 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 AuthService_1 = require("./services/AuthService"); +Object.defineProperty(exports, "AuthService", { enumerable: true, get: function () { return AuthService_1.AuthService; } }); +var RunnerOrganisationService_1 = require("./services/RunnerOrganisationService"); +Object.defineProperty(exports, "RunnerOrganisationService", { enumerable: true, get: function () { return RunnerOrganisationService_1.RunnerOrganisationService; } }); +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 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; } }); diff --git a/dist/models/Address.d.ts b/dist/models/Address.d.ts new file mode 100644 index 0000000..05fdd58 --- /dev/null +++ b/dist/models/Address.d.ts @@ -0,0 +1,9 @@ +export declare type Address = { + id: number; + description?: string; + address1: string; + address2?: string; + postalcode: string; + city: string; + country: string; +}; diff --git a/dist/models/Address.js b/dist/models/Address.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Address.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/AddressNotFoundError.d.ts b/dist/models/AddressNotFoundError.d.ts new file mode 100644 index 0000000..0bcf25b --- /dev/null +++ b/dist/models/AddressNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type AddressNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/AddressNotFoundError.js b/dist/models/AddressNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/AddressNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/AddressWrongTypeError.d.ts b/dist/models/AddressWrongTypeError.d.ts new file mode 100644 index 0000000..14f6935 --- /dev/null +++ b/dist/models/AddressWrongTypeError.d.ts @@ -0,0 +1,4 @@ +export declare type AddressWrongTypeError = { + name: string; + message: string; +}; diff --git a/dist/models/AddressWrongTypeError.js b/dist/models/AddressWrongTypeError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/AddressWrongTypeError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Auth.d.ts b/dist/models/Auth.d.ts new file mode 100644 index 0000000..85555d5 --- /dev/null +++ b/dist/models/Auth.d.ts @@ -0,0 +1,6 @@ +export declare type Auth = { + access_token: string; + refresh_token: string; + access_token_expires_at: number; + refresh_token_expires_at: number; +}; diff --git a/dist/models/Auth.js b/dist/models/Auth.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Auth.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateAuth.d.ts b/dist/models/CreateAuth.d.ts new file mode 100644 index 0000000..f44f55f --- /dev/null +++ b/dist/models/CreateAuth.d.ts @@ -0,0 +1,5 @@ +export declare type CreateAuth = { + username?: string; + password: string; + email?: string; +}; diff --git a/dist/models/CreateAuth.js b/dist/models/CreateAuth.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateAuth.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateParticipant.d.ts b/dist/models/CreateParticipant.d.ts new file mode 100644 index 0000000..b22a2cb --- /dev/null +++ b/dist/models/CreateParticipant.d.ts @@ -0,0 +1,8 @@ +export declare type CreateParticipant = { + firstname: string; + middlename?: string; + lastname: string; + phone?: string; + email?: string; + address?: number; +}; diff --git a/dist/models/CreateParticipant.js b/dist/models/CreateParticipant.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateParticipant.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateRunner.d.ts b/dist/models/CreateRunner.d.ts new file mode 100644 index 0000000..39e9c54 --- /dev/null +++ b/dist/models/CreateRunner.d.ts @@ -0,0 +1,9 @@ +export declare type CreateRunner = { + group: number; + firstname: string; + middlename?: string; + lastname: string; + phone?: string; + email?: string; + address?: number; +}; diff --git a/dist/models/CreateRunner.js b/dist/models/CreateRunner.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateRunner.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateRunnerGroup.d.ts b/dist/models/CreateRunnerGroup.d.ts new file mode 100644 index 0000000..2341f7b --- /dev/null +++ b/dist/models/CreateRunnerGroup.d.ts @@ -0,0 +1,4 @@ +export declare type CreateRunnerGroup = { + name: string; + contact?: number; +}; diff --git a/dist/models/CreateRunnerGroup.js b/dist/models/CreateRunnerGroup.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateRunnerGroup.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateRunnerOrganisation.d.ts b/dist/models/CreateRunnerOrganisation.d.ts new file mode 100644 index 0000000..41b1aa6 --- /dev/null +++ b/dist/models/CreateRunnerOrganisation.d.ts @@ -0,0 +1,5 @@ +export declare type CreateRunnerOrganisation = { + address?: number; + name: string; + contact?: number; +}; diff --git a/dist/models/CreateRunnerOrganisation.js b/dist/models/CreateRunnerOrganisation.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateRunnerOrganisation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateRunnerTeam.d.ts b/dist/models/CreateRunnerTeam.d.ts new file mode 100644 index 0000000..8addd5c --- /dev/null +++ b/dist/models/CreateRunnerTeam.d.ts @@ -0,0 +1,5 @@ +export declare type CreateRunnerTeam = { + parentGroup: number; + name: string; + contact?: number; +}; diff --git a/dist/models/CreateRunnerTeam.js b/dist/models/CreateRunnerTeam.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateRunnerTeam.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateTrack.d.ts b/dist/models/CreateTrack.d.ts new file mode 100644 index 0000000..71fc99e --- /dev/null +++ b/dist/models/CreateTrack.d.ts @@ -0,0 +1,4 @@ +export declare type CreateTrack = { + name: string; + distance: number; +}; diff --git a/dist/models/CreateTrack.js b/dist/models/CreateTrack.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateTrack.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateUser.d.ts b/dist/models/CreateUser.d.ts new file mode 100644 index 0000000..e947bae --- /dev/null +++ b/dist/models/CreateUser.d.ts @@ -0,0 +1,10 @@ +export declare type CreateUser = { + firstname: string; + middlename?: string; + lastname: string; + username?: string; + email?: string; + phone?: string; + password: string; + groupId?: any; +}; diff --git a/dist/models/CreateUser.js b/dist/models/CreateUser.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateUser.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateUserGroup.d.ts b/dist/models/CreateUserGroup.d.ts new file mode 100644 index 0000000..d5602de --- /dev/null +++ b/dist/models/CreateUserGroup.d.ts @@ -0,0 +1,4 @@ +export declare type CreateUserGroup = { + name: string; + description?: string; +}; diff --git a/dist/models/CreateUserGroup.js b/dist/models/CreateUserGroup.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/CreateUserGroup.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/DistanceDonation.d.ts b/dist/models/DistanceDonation.d.ts new file mode 100644 index 0000000..b8db7d8 --- /dev/null +++ b/dist/models/DistanceDonation.d.ts @@ -0,0 +1,6 @@ +export declare type DistanceDonation = { + runner: string; + amountPerDistance: number; + id: number; + donor: string; +}; diff --git a/dist/models/DistanceDonation.js b/dist/models/DistanceDonation.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/DistanceDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Donation.d.ts b/dist/models/Donation.d.ts new file mode 100644 index 0000000..c016c56 --- /dev/null +++ b/dist/models/Donation.d.ts @@ -0,0 +1,4 @@ +export declare type Donation = { + id: number; + donor: string; +}; diff --git a/dist/models/Donation.js b/dist/models/Donation.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Donation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ExpiredJWTError.d.ts b/dist/models/ExpiredJWTError.d.ts new file mode 100644 index 0000000..94aa37d --- /dev/null +++ b/dist/models/ExpiredJWTError.d.ts @@ -0,0 +1,4 @@ +export declare type ExpiredJWTError = { + name: string; + message: string; +}; diff --git a/dist/models/ExpiredJWTError.js b/dist/models/ExpiredJWTError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ExpiredJWTError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/GroupContact.d.ts b/dist/models/GroupContact.d.ts new file mode 100644 index 0000000..b87216f --- /dev/null +++ b/dist/models/GroupContact.d.ts @@ -0,0 +1,9 @@ +export declare type GroupContact = { + id: number; + firstname: string; + middlename?: string; + lastname: string; + address?: any; + phone?: string; + email?: string; +}; diff --git a/dist/models/GroupContact.js b/dist/models/GroupContact.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/GroupContact.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/GroupContactNotFoundError.d.ts b/dist/models/GroupContactNotFoundError.d.ts new file mode 100644 index 0000000..06c55a0 --- /dev/null +++ b/dist/models/GroupContactNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type GroupContactNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/GroupContactNotFoundError.js b/dist/models/GroupContactNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/GroupContactNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/GroupContactWrongTypeError.d.ts b/dist/models/GroupContactWrongTypeError.d.ts new file mode 100644 index 0000000..e44163c --- /dev/null +++ b/dist/models/GroupContactWrongTypeError.d.ts @@ -0,0 +1,4 @@ +export declare type GroupContactWrongTypeError = { + name: string; + message: string; +}; diff --git a/dist/models/GroupContactWrongTypeError.js b/dist/models/GroupContactWrongTypeError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/GroupContactWrongTypeError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/GroupNameNeededError.d.ts b/dist/models/GroupNameNeededError.d.ts new file mode 100644 index 0000000..f84fc19 --- /dev/null +++ b/dist/models/GroupNameNeededError.d.ts @@ -0,0 +1,4 @@ +export declare type GroupNameNeededError = { + name: string; + message: string; +}; diff --git a/dist/models/GroupNameNeededError.js b/dist/models/GroupNameNeededError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/GroupNameNeededError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/HandleLogout.d.ts b/dist/models/HandleLogout.d.ts new file mode 100644 index 0000000..70c8ea4 --- /dev/null +++ b/dist/models/HandleLogout.d.ts @@ -0,0 +1,3 @@ +export declare type HandleLogout = { + token?: string; +}; diff --git a/dist/models/HandleLogout.js b/dist/models/HandleLogout.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/HandleLogout.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/IllegalJWTError.d.ts b/dist/models/IllegalJWTError.d.ts new file mode 100644 index 0000000..f66788e --- /dev/null +++ b/dist/models/IllegalJWTError.d.ts @@ -0,0 +1,4 @@ +export declare type IllegalJWTError = { + name: string; + message: string; +}; diff --git a/dist/models/IllegalJWTError.js b/dist/models/IllegalJWTError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/IllegalJWTError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/InvalidCredentialsError.d.ts b/dist/models/InvalidCredentialsError.d.ts new file mode 100644 index 0000000..819b3dd --- /dev/null +++ b/dist/models/InvalidCredentialsError.d.ts @@ -0,0 +1,4 @@ +export declare type InvalidCredentialsError = { + name: string; + message: string; +}; diff --git a/dist/models/InvalidCredentialsError.js b/dist/models/InvalidCredentialsError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/InvalidCredentialsError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/JwtNotProvidedError.d.ts b/dist/models/JwtNotProvidedError.d.ts new file mode 100644 index 0000000..075c476 --- /dev/null +++ b/dist/models/JwtNotProvidedError.d.ts @@ -0,0 +1,4 @@ +export declare type JwtNotProvidedError = { + name: string; + message: string; +}; diff --git a/dist/models/JwtNotProvidedError.js b/dist/models/JwtNotProvidedError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/JwtNotProvidedError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Logout.d.ts b/dist/models/Logout.d.ts new file mode 100644 index 0000000..530d287 --- /dev/null +++ b/dist/models/Logout.d.ts @@ -0,0 +1,3 @@ +export declare type Logout = { + timestamp: string; +}; diff --git a/dist/models/Logout.js b/dist/models/Logout.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Logout.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/NoPermissionError.d.ts b/dist/models/NoPermissionError.d.ts new file mode 100644 index 0000000..d786d54 --- /dev/null +++ b/dist/models/NoPermissionError.d.ts @@ -0,0 +1,4 @@ +export declare type NoPermissionError = { + name: string; + message: string; +}; diff --git a/dist/models/NoPermissionError.js b/dist/models/NoPermissionError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/NoPermissionError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Participant.d.ts b/dist/models/Participant.d.ts new file mode 100644 index 0000000..c1d9eac --- /dev/null +++ b/dist/models/Participant.d.ts @@ -0,0 +1,8 @@ +export declare type Participant = { + id: number; + firstname: string; + middlename?: string; + lastname: string; + phone?: string; + email?: string; +}; diff --git a/dist/models/Participant.js b/dist/models/Participant.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Participant.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/PasswordNeededError.d.ts b/dist/models/PasswordNeededError.d.ts new file mode 100644 index 0000000..6cd729b --- /dev/null +++ b/dist/models/PasswordNeededError.d.ts @@ -0,0 +1,4 @@ +export declare type PasswordNeededError = { + name: string; + message: string; +}; diff --git a/dist/models/PasswordNeededError.js b/dist/models/PasswordNeededError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/PasswordNeededError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Permission.d.ts b/dist/models/Permission.d.ts new file mode 100644 index 0000000..c04ecd9 --- /dev/null +++ b/dist/models/Permission.d.ts @@ -0,0 +1,5 @@ +export declare type Permission = { + id: number; + target: string; + action: string; +}; diff --git a/dist/models/Permission.js b/dist/models/Permission.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Permission.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RefreshAuth.d.ts b/dist/models/RefreshAuth.d.ts new file mode 100644 index 0000000..03349eb --- /dev/null +++ b/dist/models/RefreshAuth.d.ts @@ -0,0 +1,3 @@ +export declare type RefreshAuth = { + token?: string; +}; diff --git a/dist/models/RefreshAuth.js b/dist/models/RefreshAuth.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RefreshAuth.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RefreshTokenCountInvalidError.d.ts b/dist/models/RefreshTokenCountInvalidError.d.ts new file mode 100644 index 0000000..1586f62 --- /dev/null +++ b/dist/models/RefreshTokenCountInvalidError.d.ts @@ -0,0 +1,4 @@ +export declare type RefreshTokenCountInvalidError = { + name: string; + message: string; +}; diff --git a/dist/models/RefreshTokenCountInvalidError.js b/dist/models/RefreshTokenCountInvalidError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RefreshTokenCountInvalidError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseEmpty.d.ts b/dist/models/ResponseEmpty.d.ts new file mode 100644 index 0000000..3549d91 --- /dev/null +++ b/dist/models/ResponseEmpty.d.ts @@ -0,0 +1,3 @@ +export declare type ResponseEmpty = { + response: string; +}; diff --git a/dist/models/ResponseEmpty.js b/dist/models/ResponseEmpty.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseEmpty.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseParticipant.d.ts b/dist/models/ResponseParticipant.d.ts new file mode 100644 index 0000000..7460ba0 --- /dev/null +++ b/dist/models/ResponseParticipant.d.ts @@ -0,0 +1,8 @@ +export declare type ResponseParticipant = { + id: number; + firstname: string; + middlename: string; + lastname: string; + phone: string; + email: string; +}; diff --git a/dist/models/ResponseParticipant.js b/dist/models/ResponseParticipant.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseParticipant.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseRunner.d.ts b/dist/models/ResponseRunner.d.ts new file mode 100644 index 0000000..71a16a7 --- /dev/null +++ b/dist/models/ResponseRunner.d.ts @@ -0,0 +1,11 @@ +import type { RunnerGroup } from './RunnerGroup'; +export declare type ResponseRunner = { + distance: number; + group: RunnerGroup; + id: number; + firstname: string; + middlename: string; + lastname: string; + phone: string; + email: string; +}; diff --git a/dist/models/ResponseRunner.js b/dist/models/ResponseRunner.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseRunner.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseRunnerGroup.d.ts b/dist/models/ResponseRunnerGroup.d.ts new file mode 100644 index 0000000..bfcf452 --- /dev/null +++ b/dist/models/ResponseRunnerGroup.d.ts @@ -0,0 +1,6 @@ +import type { GroupContact } from './GroupContact'; +export declare type ResponseRunnerGroup = { + id: number; + name: string; + contact?: GroupContact; +}; diff --git a/dist/models/ResponseRunnerGroup.js b/dist/models/ResponseRunnerGroup.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseRunnerGroup.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseRunnerOrganisation.d.ts b/dist/models/ResponseRunnerOrganisation.d.ts new file mode 100644 index 0000000..0c0edd1 --- /dev/null +++ b/dist/models/ResponseRunnerOrganisation.d.ts @@ -0,0 +1,9 @@ +import type { Address } from './Address'; +import type { GroupContact } from './GroupContact'; +export declare type ResponseRunnerOrganisation = { + address: Address; + teams: Array; + id: number; + name: string; + contact?: GroupContact; +}; diff --git a/dist/models/ResponseRunnerOrganisation.js b/dist/models/ResponseRunnerOrganisation.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseRunnerOrganisation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseRunnerTeam.d.ts b/dist/models/ResponseRunnerTeam.d.ts new file mode 100644 index 0000000..ed51f57 --- /dev/null +++ b/dist/models/ResponseRunnerTeam.d.ts @@ -0,0 +1,8 @@ +import type { GroupContact } from './GroupContact'; +import type { RunnerOrganisation } from './RunnerOrganisation'; +export declare type ResponseRunnerTeam = { + parentGroup: RunnerOrganisation; + id: number; + name: string; + contact?: GroupContact; +}; diff --git a/dist/models/ResponseRunnerTeam.js b/dist/models/ResponseRunnerTeam.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseRunnerTeam.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseTrack.d.ts b/dist/models/ResponseTrack.d.ts new file mode 100644 index 0000000..a70bc88 --- /dev/null +++ b/dist/models/ResponseTrack.d.ts @@ -0,0 +1,5 @@ +export declare type ResponseTrack = { + id: number; + name: string; + distance: number; +}; diff --git a/dist/models/ResponseTrack.js b/dist/models/ResponseTrack.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ResponseTrack.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Runner.d.ts b/dist/models/Runner.d.ts new file mode 100644 index 0000000..c89715f --- /dev/null +++ b/dist/models/Runner.d.ts @@ -0,0 +1,10 @@ +export declare type Runner = { + group: string; + distance: number; + id: number; + firstname: string; + middlename?: string; + lastname: string; + phone?: string; + email?: string; +}; diff --git a/dist/models/Runner.js b/dist/models/Runner.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Runner.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerCard.d.ts b/dist/models/RunnerCard.d.ts new file mode 100644 index 0000000..09e0255 --- /dev/null +++ b/dist/models/RunnerCard.d.ts @@ -0,0 +1,6 @@ +export declare type RunnerCard = { + id: number; + runner?: any; + code: string; + enabled: boolean; +}; diff --git a/dist/models/RunnerCard.js b/dist/models/RunnerCard.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerCard.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerGroup.d.ts b/dist/models/RunnerGroup.d.ts new file mode 100644 index 0000000..9fce82f --- /dev/null +++ b/dist/models/RunnerGroup.d.ts @@ -0,0 +1,5 @@ +export declare type RunnerGroup = { + id: number; + name: string; + contact?: any; +}; diff --git a/dist/models/RunnerGroup.js b/dist/models/RunnerGroup.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerGroup.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerGroupNeededError.d.ts b/dist/models/RunnerGroupNeededError.d.ts new file mode 100644 index 0000000..7256aec --- /dev/null +++ b/dist/models/RunnerGroupNeededError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerGroupNeededError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerGroupNeededError.js b/dist/models/RunnerGroupNeededError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerGroupNeededError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerGroupNotFoundError.d.ts b/dist/models/RunnerGroupNotFoundError.d.ts new file mode 100644 index 0000000..685b3d7 --- /dev/null +++ b/dist/models/RunnerGroupNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerGroupNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerGroupNotFoundError.js b/dist/models/RunnerGroupNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerGroupNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerIdsNotMatchingError.d.ts b/dist/models/RunnerIdsNotMatchingError.d.ts new file mode 100644 index 0000000..863f151 --- /dev/null +++ b/dist/models/RunnerIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerIdsNotMatchingError.js b/dist/models/RunnerIdsNotMatchingError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerNotFoundError.d.ts b/dist/models/RunnerNotFoundError.d.ts new file mode 100644 index 0000000..b1e5c12 --- /dev/null +++ b/dist/models/RunnerNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerNotFoundError.js b/dist/models/RunnerNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerOrganisation.d.ts b/dist/models/RunnerOrganisation.d.ts new file mode 100644 index 0000000..6e32b70 --- /dev/null +++ b/dist/models/RunnerOrganisation.d.ts @@ -0,0 +1,6 @@ +export declare type RunnerOrganisation = { + address?: any; + id: number; + name: string; + contact?: any; +}; diff --git a/dist/models/RunnerOrganisation.js b/dist/models/RunnerOrganisation.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerOrganisation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerOrganisationHasRunnersError.d.ts b/dist/models/RunnerOrganisationHasRunnersError.d.ts new file mode 100644 index 0000000..0ca4210 --- /dev/null +++ b/dist/models/RunnerOrganisationHasRunnersError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerOrganisationHasRunnersError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerOrganisationHasRunnersError.js b/dist/models/RunnerOrganisationHasRunnersError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerOrganisationHasRunnersError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerOrganisationHasTeamsError.d.ts b/dist/models/RunnerOrganisationHasTeamsError.d.ts new file mode 100644 index 0000000..6a2ab0a --- /dev/null +++ b/dist/models/RunnerOrganisationHasTeamsError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerOrganisationHasTeamsError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerOrganisationHasTeamsError.js b/dist/models/RunnerOrganisationHasTeamsError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerOrganisationHasTeamsError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerOrganisationIdsNotMatchingError.d.ts b/dist/models/RunnerOrganisationIdsNotMatchingError.d.ts new file mode 100644 index 0000000..0249f1c --- /dev/null +++ b/dist/models/RunnerOrganisationIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerOrganisationIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerOrganisationIdsNotMatchingError.js b/dist/models/RunnerOrganisationIdsNotMatchingError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerOrganisationIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerOrganisationNotFoundError.d.ts b/dist/models/RunnerOrganisationNotFoundError.d.ts new file mode 100644 index 0000000..70e55ab --- /dev/null +++ b/dist/models/RunnerOrganisationNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerOrganisationNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerOrganisationNotFoundError.js b/dist/models/RunnerOrganisationNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerOrganisationNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerOrganisationWrongTypeError.d.ts b/dist/models/RunnerOrganisationWrongTypeError.d.ts new file mode 100644 index 0000000..f2248f0 --- /dev/null +++ b/dist/models/RunnerOrganisationWrongTypeError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerOrganisationWrongTypeError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerOrganisationWrongTypeError.js b/dist/models/RunnerOrganisationWrongTypeError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerOrganisationWrongTypeError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerTeam.d.ts b/dist/models/RunnerTeam.d.ts new file mode 100644 index 0000000..0e01499 --- /dev/null +++ b/dist/models/RunnerTeam.d.ts @@ -0,0 +1,6 @@ +export declare type RunnerTeam = { + parentGroup: string; + id: number; + name: string; + contact?: any; +}; diff --git a/dist/models/RunnerTeam.js b/dist/models/RunnerTeam.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerTeam.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerTeamHasRunnersError.d.ts b/dist/models/RunnerTeamHasRunnersError.d.ts new file mode 100644 index 0000000..f87d0f6 --- /dev/null +++ b/dist/models/RunnerTeamHasRunnersError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerTeamHasRunnersError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerTeamHasRunnersError.js b/dist/models/RunnerTeamHasRunnersError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerTeamHasRunnersError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerTeamIdsNotMatchingError.d.ts b/dist/models/RunnerTeamIdsNotMatchingError.d.ts new file mode 100644 index 0000000..179318a --- /dev/null +++ b/dist/models/RunnerTeamIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerTeamIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerTeamIdsNotMatchingError.js b/dist/models/RunnerTeamIdsNotMatchingError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerTeamIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerTeamNeedsParentError.d.ts b/dist/models/RunnerTeamNeedsParentError.d.ts new file mode 100644 index 0000000..d917aaa --- /dev/null +++ b/dist/models/RunnerTeamNeedsParentError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerTeamNeedsParentError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerTeamNeedsParentError.js b/dist/models/RunnerTeamNeedsParentError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerTeamNeedsParentError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerTeamNotFoundError.d.ts b/dist/models/RunnerTeamNotFoundError.d.ts new file mode 100644 index 0000000..c2ce631 --- /dev/null +++ b/dist/models/RunnerTeamNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerTeamNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerTeamNotFoundError.js b/dist/models/RunnerTeamNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/RunnerTeamNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Scan.d.ts b/dist/models/Scan.d.ts new file mode 100644 index 0000000..80e7f29 --- /dev/null +++ b/dist/models/Scan.d.ts @@ -0,0 +1,6 @@ +export declare type Scan = { + id: number; + runner: string; + distance: number; + valid: boolean; +}; diff --git a/dist/models/Scan.js b/dist/models/Scan.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Scan.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ScanStation.d.ts b/dist/models/ScanStation.d.ts new file mode 100644 index 0000000..7695415 --- /dev/null +++ b/dist/models/ScanStation.d.ts @@ -0,0 +1,7 @@ +export declare type ScanStation = { + id: number; + description?: string; + track: string; + key: string; + enabled: boolean; +}; diff --git a/dist/models/ScanStation.js b/dist/models/ScanStation.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/ScanStation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Track.d.ts b/dist/models/Track.d.ts new file mode 100644 index 0000000..23c7e0c --- /dev/null +++ b/dist/models/Track.d.ts @@ -0,0 +1,5 @@ +export declare type Track = { + id: number; + name: string; + distance: number; +}; diff --git a/dist/models/Track.js b/dist/models/Track.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/Track.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/TrackIdsNotMatchingError.d.ts b/dist/models/TrackIdsNotMatchingError.d.ts new file mode 100644 index 0000000..3dcd4bf --- /dev/null +++ b/dist/models/TrackIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type TrackIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/TrackIdsNotMatchingError.js b/dist/models/TrackIdsNotMatchingError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/TrackIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/TrackNotFoundError.d.ts b/dist/models/TrackNotFoundError.d.ts new file mode 100644 index 0000000..07a39c7 --- /dev/null +++ b/dist/models/TrackNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type TrackNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/TrackNotFoundError.js b/dist/models/TrackNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/TrackNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/TrackScan.d.ts b/dist/models/TrackScan.d.ts new file mode 100644 index 0000000..6902ef3 --- /dev/null +++ b/dist/models/TrackScan.d.ts @@ -0,0 +1,10 @@ +export declare type TrackScan = { + track: string; + card: string; + station: string; + distance: number; + timestamp: string; + id: number; + runner: string; + valid: boolean; +}; diff --git a/dist/models/TrackScan.js b/dist/models/TrackScan.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/TrackScan.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UpdateRunner.d.ts b/dist/models/UpdateRunner.d.ts new file mode 100644 index 0000000..39ad9ee --- /dev/null +++ b/dist/models/UpdateRunner.d.ts @@ -0,0 +1,11 @@ +import type { RunnerGroup } from './RunnerGroup'; +export declare type UpdateRunner = { + id: number; + group: RunnerGroup; + firstname: string; + middlename?: string; + lastname: string; + phone?: string; + email?: string; + address?: number; +}; diff --git a/dist/models/UpdateRunner.js b/dist/models/UpdateRunner.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UpdateRunner.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UpdateRunnerTeam.d.ts b/dist/models/UpdateRunnerTeam.d.ts new file mode 100644 index 0000000..016410a --- /dev/null +++ b/dist/models/UpdateRunnerTeam.d.ts @@ -0,0 +1,7 @@ +import type { RunnerOrganisation } from './RunnerOrganisation'; +export declare type UpdateRunnerTeam = { + id: number; + parentGroup: RunnerOrganisation; + name: string; + contact?: number; +}; diff --git a/dist/models/UpdateRunnerTeam.js b/dist/models/UpdateRunnerTeam.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UpdateRunnerTeam.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/User.d.ts b/dist/models/User.d.ts new file mode 100644 index 0000000..63b6a66 --- /dev/null +++ b/dist/models/User.d.ts @@ -0,0 +1,17 @@ +export declare type User = { + id: number; + uuid: string; + email: string; + phone?: string; + username: string; + firstname: string; + middlename?: string; + lastname: string; + password: string; + permissions?: any; + groups?: any; + enabled: boolean; + refreshTokenCount: number; + profilePic?: string; + actions?: any; +}; diff --git a/dist/models/User.js b/dist/models/User.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/User.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserAction.d.ts b/dist/models/UserAction.d.ts new file mode 100644 index 0000000..c93f140 --- /dev/null +++ b/dist/models/UserAction.d.ts @@ -0,0 +1,6 @@ +export declare type UserAction = { + id: number; + target: string; + action: string; + changed?: string; +}; diff --git a/dist/models/UserAction.js b/dist/models/UserAction.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserAction.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserGroup.d.ts b/dist/models/UserGroup.d.ts new file mode 100644 index 0000000..243ffd6 --- /dev/null +++ b/dist/models/UserGroup.d.ts @@ -0,0 +1,5 @@ +export declare type UserGroup = { + id: number; + name: string; + description?: string; +}; diff --git a/dist/models/UserGroup.js b/dist/models/UserGroup.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserGroup.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserGroupIdsNotMatchingError.d.ts b/dist/models/UserGroupIdsNotMatchingError.d.ts new file mode 100644 index 0000000..9dca8c6 --- /dev/null +++ b/dist/models/UserGroupIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type UserGroupIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/UserGroupIdsNotMatchingError.js b/dist/models/UserGroupIdsNotMatchingError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserGroupIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserGroupNotFoundError.d.ts b/dist/models/UserGroupNotFoundError.d.ts new file mode 100644 index 0000000..80f5a4a --- /dev/null +++ b/dist/models/UserGroupNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type UserGroupNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/UserGroupNotFoundError.js b/dist/models/UserGroupNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserGroupNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserIdsNotMatchingError.d.ts b/dist/models/UserIdsNotMatchingError.d.ts new file mode 100644 index 0000000..2a6d90f --- /dev/null +++ b/dist/models/UserIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type UserIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/UserIdsNotMatchingError.js b/dist/models/UserIdsNotMatchingError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserNonexistantOrRefreshtokenInvalidError.d.ts b/dist/models/UserNonexistantOrRefreshtokenInvalidError.d.ts new file mode 100644 index 0000000..7835a95 --- /dev/null +++ b/dist/models/UserNonexistantOrRefreshtokenInvalidError.d.ts @@ -0,0 +1,4 @@ +export declare type UserNonexistantOrRefreshtokenInvalidError = { + name: string; + message: string; +}; diff --git a/dist/models/UserNonexistantOrRefreshtokenInvalidError.js b/dist/models/UserNonexistantOrRefreshtokenInvalidError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserNonexistantOrRefreshtokenInvalidError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserNotFoundError.d.ts b/dist/models/UserNotFoundError.d.ts new file mode 100644 index 0000000..d80ddb5 --- /dev/null +++ b/dist/models/UserNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type UserNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/UserNotFoundError.js b/dist/models/UserNotFoundError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UserNotFoundOrRefreshTokenCountInvalidError.d.ts b/dist/models/UserNotFoundOrRefreshTokenCountInvalidError.d.ts new file mode 100644 index 0000000..cc32a5a --- /dev/null +++ b/dist/models/UserNotFoundOrRefreshTokenCountInvalidError.d.ts @@ -0,0 +1,4 @@ +export declare type UserNotFoundOrRefreshTokenCountInvalidError = { + name: string; + message: string; +}; diff --git a/dist/models/UserNotFoundOrRefreshTokenCountInvalidError.js b/dist/models/UserNotFoundOrRefreshTokenCountInvalidError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UserNotFoundOrRefreshTokenCountInvalidError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UsernameOrEmailNeededError.d.ts b/dist/models/UsernameOrEmailNeededError.d.ts new file mode 100644 index 0000000..e78074b --- /dev/null +++ b/dist/models/UsernameOrEmailNeededError.d.ts @@ -0,0 +1,4 @@ +export declare type UsernameOrEmailNeededError = { + name: string; + message: string; +}; diff --git a/dist/models/UsernameOrEmailNeededError.js b/dist/models/UsernameOrEmailNeededError.js new file mode 100644 index 0000000..27bdcf1 --- /dev/null +++ b/dist/models/UsernameOrEmailNeededError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/services/AuthService.d.ts b/dist/services/AuthService.d.ts new file mode 100644 index 0000000..4887b07 --- /dev/null +++ b/dist/services/AuthService.d.ts @@ -0,0 +1,38 @@ +import type { Auth } from '../models/Auth'; +import type { CreateAuth } from '../models/CreateAuth'; +import type { HandleLogout } from '../models/HandleLogout'; +import type { IllegalJWTError } from '../models/IllegalJWTError'; +import type { InvalidCredentialsError } from '../models/InvalidCredentialsError'; +import type { JwtNotProvidedError } from '../models/JwtNotProvidedError'; +import type { Logout } from '../models/Logout'; +import type { PasswordNeededError } from '../models/PasswordNeededError'; +import type { RefreshAuth } from '../models/RefreshAuth'; +import type { RefreshTokenCountInvalidError } from '../models/RefreshTokenCountInvalidError'; +import type { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError'; +import type { UserNotFoundError } from '../models/UserNotFoundError'; +export declare class AuthService { + /** + * Login + * Create a new access token object + * @param requestBody CreateAuth + * @result any + * @throws ApiError + */ + static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>; + /** + * Logout + * Create a new access token object + * @param requestBody HandleLogout + * @result any + * @throws ApiError + */ + static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>; + /** + * Refresh + * refresh a access token + * @param requestBody RefreshAuth + * @result any + * @throws ApiError + */ + static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>; +} diff --git a/dist/services/AuthService.js b/dist/services/AuthService.js new file mode 100644 index 0000000..60e6511 --- /dev/null +++ b/dist/services/AuthService.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AuthService = void 0; +const request_1 = require("../core/request"); +class AuthService { + /** + * Login + * Create a new access token object + * @param requestBody CreateAuth + * @result any + * @throws ApiError + */ + static async authControllerLogin(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/auth/login`, + body: requestBody, + }); + return result.body; + } + /** + * Logout + * Create a new access token object + * @param requestBody HandleLogout + * @result any + * @throws ApiError + */ + static async authControllerLogout(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/auth/logout`, + body: requestBody, + }); + return result.body; + } + /** + * Refresh + * refresh a access token + * @param requestBody RefreshAuth + * @result any + * @throws ApiError + */ + static async authControllerRefresh(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/auth/refresh`, + body: requestBody, + }); + return result.body; + } +} +exports.AuthService = AuthService; diff --git a/dist/services/RunnerOrganisationService.d.ts b/dist/services/RunnerOrganisationService.d.ts new file mode 100644 index 0000000..9a67ce6 --- /dev/null +++ b/dist/services/RunnerOrganisationService.d.ts @@ -0,0 +1,48 @@ +import type { CreateRunnerOrganisation } from '../models/CreateRunnerOrganisation'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { ResponseRunnerOrganisation } from '../models/ResponseRunnerOrganisation'; +import type { RunnerOrganisation } from '../models/RunnerOrganisation'; +export declare class RunnerOrganisationService { + /** + * Get all + * Lists all runnerOrganisations. + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static runnerOrganisationControllerGetAll(): Promise>; + /** + * Post + * Create a new runnerOrganisation object (id will be generated automagicly). + * @param requestBody CreateRunnerOrganisation + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static runnerOrganisationControllerPost(requestBody?: CreateRunnerOrganisation): Promise; + /** + * Get one + * Returns a runnerOrganisation of a specified id (if it exists) + * @param id + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static runnerOrganisationControllerGetOne(id: number): Promise; + /** + * Put + * Update a runnerOrganisation object (id can't be changed). + * @param id + * @param requestBody RunnerOrganisation + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static runnerOrganisationControllerPut(id: number, requestBody?: RunnerOrganisation): Promise; + /** + * Remove + * Delete a specified runnerOrganisation (if it exists). + * @param id + * @param force + * @result ResponseRunnerOrganisation + * @result ResponseEmpty + * @throws ApiError + */ + static runnerOrganisationControllerRemove(id: number, force?: boolean): Promise; +} diff --git a/dist/services/RunnerOrganisationService.js b/dist/services/RunnerOrganisationService.js new file mode 100644 index 0000000..7a0f8f7 --- /dev/null +++ b/dist/services/RunnerOrganisationService.js @@ -0,0 +1,84 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RunnerOrganisationService = void 0; +const request_1 = require("../core/request"); +class RunnerOrganisationService { + /** + * Get all + * Lists all runnerOrganisations. + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static async runnerOrganisationControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/organisations`, + }); + return result.body; + } + /** + * Post + * Create a new runnerOrganisation object (id will be generated automagicly). + * @param requestBody CreateRunnerOrganisation + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static async runnerOrganisationControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/organisations`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a runnerOrganisation of a specified id (if it exists) + * @param id + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static async runnerOrganisationControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/organisations/${id}`, + }); + return result.body; + } + /** + * Put + * Update a runnerOrganisation object (id can't be changed). + * @param id + * @param requestBody RunnerOrganisation + * @result ResponseRunnerOrganisation + * @throws ApiError + */ + static async runnerOrganisationControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/organisations/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified runnerOrganisation (if it exists). + * @param id + * @param force + * @result ResponseRunnerOrganisation + * @result ResponseEmpty + * @throws ApiError + */ + static async runnerOrganisationControllerRemove(id, force) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/organisations/${id}`, + query: { + 'force': force, + }, + }); + return result.body; + } +} +exports.RunnerOrganisationService = RunnerOrganisationService; diff --git a/dist/services/RunnerService.d.ts b/dist/services/RunnerService.d.ts new file mode 100644 index 0000000..54ee4c3 --- /dev/null +++ b/dist/services/RunnerService.d.ts @@ -0,0 +1,50 @@ +import type { CreateRunner } from '../models/CreateRunner'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { ResponseRunner } from '../models/ResponseRunner'; +import type { RunnerGroupNeededError } from '../models/RunnerGroupNeededError'; +import type { RunnerGroupNotFoundError } from '../models/RunnerGroupNotFoundError'; +import type { UpdateRunner } from '../models/UpdateRunner'; +export declare class RunnerService { + /** + * Get all + * Lists all runners. + * @result ResponseRunner + * @throws ApiError + */ + static runnerControllerGetAll(): Promise>; + /** + * Post + * Create a new runner object (id will be generated automagicly). + * @param requestBody CreateRunner + * @result any + * @throws ApiError + */ + static runnerControllerPost(requestBody?: CreateRunner): Promise<(ResponseRunner | RunnerGroupNeededError | RunnerGroupNotFoundError)>; + /** + * Get one + * Returns a runner of a specified id (if it exists) + * @param id + * @result ResponseRunner + * @throws ApiError + */ + static runnerControllerGetOne(id: number): Promise; + /** + * Put + * Update a runner object (id can't be changed). + * @param id + * @param requestBody UpdateRunner + * @result ResponseRunner + * @throws ApiError + */ + static runnerControllerPut(id: number, requestBody?: UpdateRunner): Promise; + /** + * Remove + * Delete a specified runner (if it exists). + * @param id + * @param force + * @result ResponseRunner + * @result ResponseEmpty + * @throws ApiError + */ + static runnerControllerRemove(id: number, force?: boolean): Promise; +} diff --git a/dist/services/RunnerService.js b/dist/services/RunnerService.js new file mode 100644 index 0000000..a1557cc --- /dev/null +++ b/dist/services/RunnerService.js @@ -0,0 +1,84 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RunnerService = void 0; +const request_1 = require("../core/request"); +class RunnerService { + /** + * Get all + * Lists all runners. + * @result ResponseRunner + * @throws ApiError + */ + static async runnerControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/runners`, + }); + return result.body; + } + /** + * Post + * Create a new runner object (id will be generated automagicly). + * @param requestBody CreateRunner + * @result any + * @throws ApiError + */ + static async runnerControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/runners`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a runner of a specified id (if it exists) + * @param id + * @result ResponseRunner + * @throws ApiError + */ + static async runnerControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/runners/${id}`, + }); + return result.body; + } + /** + * Put + * Update a runner object (id can't be changed). + * @param id + * @param requestBody UpdateRunner + * @result ResponseRunner + * @throws ApiError + */ + static async runnerControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/runners/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified runner (if it exists). + * @param id + * @param force + * @result ResponseRunner + * @result ResponseEmpty + * @throws ApiError + */ + static async runnerControllerRemove(id, force) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/runners/${id}`, + query: { + 'force': force, + }, + }); + return result.body; + } +} +exports.RunnerService = RunnerService; diff --git a/dist/services/RunnerTeamService.d.ts b/dist/services/RunnerTeamService.d.ts new file mode 100644 index 0000000..16cc319 --- /dev/null +++ b/dist/services/RunnerTeamService.d.ts @@ -0,0 +1,48 @@ +import type { CreateRunnerTeam } from '../models/CreateRunnerTeam'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { ResponseRunnerTeam } from '../models/ResponseRunnerTeam'; +import type { UpdateRunnerTeam } from '../models/UpdateRunnerTeam'; +export declare class RunnerTeamService { + /** + * Get all + * Lists all runnerTeams. + * @result ResponseRunnerTeam + * @throws ApiError + */ + static runnerTeamControllerGetAll(): Promise>; + /** + * Post + * Create a new runnerTeam object (id will be generated automagicly). + * @param requestBody CreateRunnerTeam + * @result ResponseRunnerTeam + * @throws ApiError + */ + static runnerTeamControllerPost(requestBody?: CreateRunnerTeam): Promise; + /** + * Get one + * Returns a runnerTeam of a specified id (if it exists) + * @param id + * @result ResponseRunnerTeam + * @throws ApiError + */ + static runnerTeamControllerGetOne(id: number): Promise; + /** + * Put + * Update a runnerTeam object (id can't be changed). + * @param id + * @param requestBody UpdateRunnerTeam + * @result ResponseRunnerTeam + * @throws ApiError + */ + static runnerTeamControllerPut(id: number, requestBody?: UpdateRunnerTeam): Promise; + /** + * Remove + * Delete a specified runnerTeam (if it exists). + * @param id + * @param force + * @result ResponseRunnerTeam + * @result ResponseEmpty + * @throws ApiError + */ + static runnerTeamControllerRemove(id: number, force?: boolean): Promise; +} diff --git a/dist/services/RunnerTeamService.js b/dist/services/RunnerTeamService.js new file mode 100644 index 0000000..c620596 --- /dev/null +++ b/dist/services/RunnerTeamService.js @@ -0,0 +1,84 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RunnerTeamService = void 0; +const request_1 = require("../core/request"); +class RunnerTeamService { + /** + * Get all + * Lists all runnerTeams. + * @result ResponseRunnerTeam + * @throws ApiError + */ + static async runnerTeamControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/teams`, + }); + return result.body; + } + /** + * Post + * Create a new runnerTeam object (id will be generated automagicly). + * @param requestBody CreateRunnerTeam + * @result ResponseRunnerTeam + * @throws ApiError + */ + static async runnerTeamControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/teams`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a runnerTeam of a specified id (if it exists) + * @param id + * @result ResponseRunnerTeam + * @throws ApiError + */ + static async runnerTeamControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/teams/${id}`, + }); + return result.body; + } + /** + * Put + * Update a runnerTeam object (id can't be changed). + * @param id + * @param requestBody UpdateRunnerTeam + * @result ResponseRunnerTeam + * @throws ApiError + */ + static async runnerTeamControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/teams/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified runnerTeam (if it exists). + * @param id + * @param force + * @result ResponseRunnerTeam + * @result ResponseEmpty + * @throws ApiError + */ + static async runnerTeamControllerRemove(id, force) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/teams/${id}`, + query: { + 'force': force, + }, + }); + return result.body; + } +} +exports.RunnerTeamService = RunnerTeamService; diff --git a/dist/services/TrackService.d.ts b/dist/services/TrackService.d.ts new file mode 100644 index 0000000..7d23986 --- /dev/null +++ b/dist/services/TrackService.d.ts @@ -0,0 +1,47 @@ +import type { CreateTrack } from '../models/CreateTrack'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { ResponseTrack } from '../models/ResponseTrack'; +import type { Track } from '../models/Track'; +export declare class TrackService { + /** + * Get all + * Lists all tracks. + * @result ResponseTrack + * @throws ApiError + */ + static trackControllerGetAll(): Promise>; + /** + * Post + * Create a new track object (id will be generated automagicly). + * @param requestBody CreateTrack + * @result ResponseTrack + * @throws ApiError + */ + static trackControllerPost(requestBody?: CreateTrack): Promise; + /** + * Get one + * Returns a track of a specified id (if it exists) + * @param id + * @result ResponseTrack + * @throws ApiError + */ + static trackControllerGetOne(id: number): Promise; + /** + * Put + * Update a track object (id can't be changed). + * @param id + * @param requestBody Track + * @result ResponseTrack + * @throws ApiError + */ + static trackControllerPut(id: number, requestBody?: Track): Promise; + /** + * Remove + * Delete a specified track (if it exists). + * @param id + * @result ResponseTrack + * @result ResponseEmpty + * @throws ApiError + */ + static trackControllerRemove(id: number): Promise; +} diff --git a/dist/services/TrackService.js b/dist/services/TrackService.js new file mode 100644 index 0000000..0a2f8ed --- /dev/null +++ b/dist/services/TrackService.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TrackService = void 0; +const request_1 = require("../core/request"); +class TrackService { + /** + * Get all + * Lists all tracks. + * @result ResponseTrack + * @throws ApiError + */ + static async trackControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/tracks`, + }); + return result.body; + } + /** + * Post + * Create a new track object (id will be generated automagicly). + * @param requestBody CreateTrack + * @result ResponseTrack + * @throws ApiError + */ + static async trackControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/tracks`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a track of a specified id (if it exists) + * @param id + * @result ResponseTrack + * @throws ApiError + */ + static async trackControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/tracks/${id}`, + }); + return result.body; + } + /** + * Put + * Update a track object (id can't be changed). + * @param id + * @param requestBody Track + * @result ResponseTrack + * @throws ApiError + */ + static async trackControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/tracks/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified track (if it exists). + * @param id + * @result ResponseTrack + * @result ResponseEmpty + * @throws ApiError + */ + static async trackControllerRemove(id) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/tracks/${id}`, + }); + return result.body; + } +} +exports.TrackService = TrackService; diff --git a/dist/services/UserGroupService.d.ts b/dist/services/UserGroupService.d.ts new file mode 100644 index 0000000..930e935 --- /dev/null +++ b/dist/services/UserGroupService.d.ts @@ -0,0 +1,47 @@ +import type { CreateUserGroup } from '../models/CreateUserGroup'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { UserGroup } from '../models/UserGroup'; +import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; +export declare class UserGroupService { + /** + * Get all + * Lists all usergroups. + * @result UserGroup + * @throws ApiError + */ + static userGroupControllerGetAll(): Promise>; + /** + * Post + * Create a new usergroup object (id will be generated automagicly). + * @param requestBody CreateUserGroup + * @result any + * @throws ApiError + */ + static userGroupControllerPost(requestBody?: CreateUserGroup): Promise<(UserGroup | UserGroupNotFoundError)>; + /** + * Get one + * Returns a usergroup of a specified id (if it exists) + * @param id + * @result UserGroup + * @throws ApiError + */ + static userGroupControllerGetOne(id: number): Promise; + /** + * Put + * Update a usergroup object (id can't be changed). + * @param id + * @param requestBody UserGroup + * @result UserGroup + * @throws ApiError + */ + static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise; + /** + * Remove + * Delete a specified usergroup (if it exists). + * @param id + * @result UserGroup + * @result ResponseEmpty + * @throws ApiError + */ + static userGroupControllerRemove(id: number): Promise; +} diff --git a/dist/services/UserGroupService.js b/dist/services/UserGroupService.js new file mode 100644 index 0000000..f7d1d2f --- /dev/null +++ b/dist/services/UserGroupService.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserGroupService = void 0; +const request_1 = require("../core/request"); +class UserGroupService { + /** + * Get all + * Lists all usergroups. + * @result UserGroup + * @throws ApiError + */ + static async userGroupControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/usergroups`, + }); + return result.body; + } + /** + * Post + * Create a new usergroup object (id will be generated automagicly). + * @param requestBody CreateUserGroup + * @result any + * @throws ApiError + */ + static async userGroupControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/usergroups`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a usergroup of a specified id (if it exists) + * @param id + * @result UserGroup + * @throws ApiError + */ + static async userGroupControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/usergroups/${id}`, + }); + return result.body; + } + /** + * Put + * Update a usergroup object (id can't be changed). + * @param id + * @param requestBody UserGroup + * @result UserGroup + * @throws ApiError + */ + static async userGroupControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/usergroups/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified usergroup (if it exists). + * @param id + * @result UserGroup + * @result ResponseEmpty + * @throws ApiError + */ + static async userGroupControllerRemove(id) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/usergroups/${id}`, + }); + return result.body; + } +} +exports.UserGroupService = UserGroupService; diff --git a/dist/services/UserService.d.ts b/dist/services/UserService.d.ts new file mode 100644 index 0000000..16e428e --- /dev/null +++ b/dist/services/UserService.d.ts @@ -0,0 +1,47 @@ +import type { CreateUser } from '../models/CreateUser'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { User } from '../models/User'; +import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; +export declare class UserService { + /** + * Get all + * Lists all users. + * @result User + * @throws ApiError + */ + static userControllerGetAll(): Promise>; + /** + * Post + * Create a new user object (id will be generated automagicly). + * @param requestBody CreateUser + * @result any + * @throws ApiError + */ + static userControllerPost(requestBody?: CreateUser): Promise<(User | UserGroupNotFoundError)>; + /** + * Get one + * Returns a user of a specified id (if it exists) + * @param id + * @result User + * @throws ApiError + */ + static userControllerGetOne(id: number): Promise; + /** + * Put + * Update a user object (id can't be changed). + * @param id + * @param requestBody User + * @result User + * @throws ApiError + */ + static userControllerPut(id: number, requestBody?: User): Promise; + /** + * Remove + * Delete a specified runner (if it exists). + * @param id + * @result User + * @result ResponseEmpty + * @throws ApiError + */ + static userControllerRemove(id: number): Promise; +} diff --git a/dist/services/UserService.js b/dist/services/UserService.js new file mode 100644 index 0000000..9520e7d --- /dev/null +++ b/dist/services/UserService.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserService = void 0; +const request_1 = require("../core/request"); +class UserService { + /** + * Get all + * Lists all users. + * @result User + * @throws ApiError + */ + static async userControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/users`, + }); + return result.body; + } + /** + * Post + * Create a new user object (id will be generated automagicly). + * @param requestBody CreateUser + * @result any + * @throws ApiError + */ + static async userControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/users`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a user of a specified id (if it exists) + * @param id + * @result User + * @throws ApiError + */ + static async userControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/users/${id}`, + }); + return result.body; + } + /** + * Put + * Update a user object (id can't be changed). + * @param id + * @param requestBody User + * @result User + * @throws ApiError + */ + static async userControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/users/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified runner (if it exists). + * @param id + * @result User + * @result ResponseEmpty + * @throws ApiError + */ + static async userControllerRemove(id) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/users/${id}`, + }); + return result.body; + } +} +exports.UserService = UserService; diff --git a/openapi.json b/openapi.json new file mode 100644 index 0000000..2052161 --- /dev/null +++ b/openapi.json @@ -0,0 +1 @@ +{"components":{"schemas":{"ExpiredJWTError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"IllegalJWTError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNonexistantOrRefreshtokenInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"InvalidCredentialsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"NoPermissionError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UsernameOrEmailNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PasswordNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"JwtNotProvidedError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNotFoundOrRefreshTokenCountInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RefreshTokenCountInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"description":{"type":"string"}},"type":"object","required":["id","name"]},"Permission":{"properties":{"id":{"type":"integer"},"target":{"type":"string","minLength":1},"action":{"type":"string","minLength":1}},"type":"object","required":["id","target","action"]},"UserAction":{"properties":{"id":{"type":"integer"},"target":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"changed":{"type":"string"}},"type":"object","required":["id","target","action"]},"User":{"properties":{"id":{"type":"integer"},"uuid":{"format":"uuid","type":"string"},"email":{"format":"email","type":"string"},"phone":{"type":"string"},"username":{"type":"string"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"password":{"minLength":1,"type":"string"},"permissions":{},"groups":{},"enabled":{"type":"boolean"},"refreshTokenCount":{"type":"integer"},"profilePic":{"type":"string"},"actions":{}},"type":"object","required":["id","uuid","email","username","firstname","lastname","password","enabled","refreshTokenCount"]},"UserIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"Auth":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"access_token_expires_at":{"type":"integer"},"refresh_token_expires_at":{"type":"integer"}},"type":"object","required":["access_token","refresh_token","access_token_expires_at","refresh_token_expires_at"]},"CreateAuth":{"properties":{"username":{"type":"string"},"password":{"type":"string"},"email":{"type":"string","format":"email"}},"type":"object","required":["password"]},"Logout":{"properties":{"timestamp":{"type":"string"}},"type":"object","required":["timestamp"]},"HandleLogout":{"properties":{"token":{"type":"string"}},"type":"object"},"RefreshAuth":{"properties":{"token":{"type":"string"}},"type":"object"},"RunnerNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerGroupNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerGroupNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationHasRunnersError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationHasTeamsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamHasRunnersError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamNeedsParentError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"GroupContact":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"address":{},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["id","firstname","lastname"]},"RunnerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["id","name"]},"RunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["parentGroup","id","name"]},"RunnerOrganisation":{"properties":{"address":{},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["id","name"]},"Address":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"address1":{"minLength":1,"type":"string"},"address2":{"type":"string"},"postalcode":{"type":"string","minLength":1},"city":{"minLength":1,"type":"string"},"country":{"minLength":1,"type":"string"}},"type":"object","required":["id","address1","postalcode","city","country"]},"Participant":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["id","firstname","lastname"]},"Donation":{"properties":{"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["id","donor"]},"DistanceDonation":{"properties":{"runner":{"minLength":1,"type":"string"},"amountPerDistance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["runner","amountPerDistance","id","donor"]},"Scan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"}},"type":"object","required":["id","runner","distance","valid"]},"Track":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","name","distance"]},"ScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"track":{"minLength":1,"type":"string"},"key":{"type":"string","minLength":1},"enabled":{"type":"boolean"}},"type":"object","required":["id","track","key","enabled"]},"TrackScan":{"properties":{"track":{"minLength":1,"type":"string"},"card":{"minLength":1,"type":"string"},"station":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"timestamp":{"minLength":1,"type":"string","pattern":"d{4}-[01]d-[0-3]dT[0-2]d:[0-5]d:[0-5]d.d+Z?"},"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"}},"type":"object","required":["track","card","station","distance","timestamp","id","runner","valid"]},"RunnerCard":{"properties":{"id":{"type":"integer"},"runner":{},"code":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","code","enabled"]},"Runner":{"properties":{"group":{"minLength":1,"type":"string"},"distance":{"type":"integer"},"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["group","distance","id","firstname","lastname"]},"AddressWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"AddressNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateParticipant":{"properties":{"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["firstname","lastname"]},"CreateRunner":{"properties":{"group":{"type":"integer"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["group","firstname","lastname"]},"UpdateRunner":{"properties":{"id":{"type":"integer"},"group":{"$ref":"#/components/schemas/RunnerGroup"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["id","group","firstname","lastname"]},"ResponseEmpty":{"properties":{"response":{"type":"string"}},"type":"object","required":["response"]},"ResponseParticipant":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["id","firstname","middlename","lastname","phone","email"]},"ResponseRunner":{"properties":{"distance":{"type":"integer"},"group":{"$ref":"#/components/schemas/RunnerGroup"},"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["distance","group","id","firstname","middlename","lastname","phone","email"]},"GroupContactWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"GroupContactNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateRunnerGroup":{"properties":{"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["name"]},"CreateRunnerOrganisation":{"properties":{"address":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["name"]},"ResponseRunnerGroup":{"properties":{"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["id","name"]},"ResponseRunnerOrganisation":{"properties":{"address":{"minLength":1,"type":"string","$ref":"#/components/schemas/Address"},"teams":{"items":{},"type":"array"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["address","teams","id","name"]},"CreateRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["parentGroup","name"]},"UpdateRunnerTeam":{"properties":{"id":{"type":"integer"},"parentGroup":{"minLength":1,"type":"string","$ref":"#/components/schemas/RunnerOrganisation"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","parentGroup","name"]},"ResponseRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string","$ref":"#/components/schemas/RunnerOrganisation"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["parentGroup","id","name"]},"TrackNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateTrack":{"properties":{"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["name","distance"]},"ResponseTrack":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"GroupNameNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroupNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroupIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateUser":{"properties":{"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"password":{"type":"string"},"groupId":{}},"type":"object","required":["firstname","lastname","password"]},"CreateUserGroup":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["name"]}},"securitySchemes":{"AuthToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"info":{"title":"LfK! Backend API","version":"1.0.0","description":"The the backend API for the LfK! runner system."},"openapi":"3.0.0","paths":{"/api/auth/login":{"post":{"operationId":"AuthController.login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuth"}}},"description":"CreateAuth","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Auth"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"},{"$ref":"#/components/schemas/PasswordNeededError"},{"$ref":"#/components/schemas/InvalidCredentialsError"}]}}},"description":""}},"summary":"Login","tags":["Auth"],"description":"Create a new access token object"}},"/api/auth/logout":{"post":{"operationId":"AuthController.logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleLogout"}}},"description":"HandleLogout","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Logout"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"},{"$ref":"#/components/schemas/PasswordNeededError"},{"$ref":"#/components/schemas/InvalidCredentialsError"}]}}},"description":""}},"summary":"Logout","tags":["Auth"],"description":"Create a new access token object"}},"/api/auth/refresh":{"post":{"operationId":"AuthController.refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAuth"}}},"description":"RefreshAuth","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Auth"},{"$ref":"#/components/schemas/JwtNotProvidedError"},{"$ref":"#/components/schemas/IllegalJWTError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/RefreshTokenCountInvalidError"}]}}},"description":""}},"summary":"Refresh","tags":["Auth"],"description":"refresh a access token"}},"/api/runners":{"get":{"operationId":"RunnerController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner"],"description":"Lists all runners."},"post":{"operationId":"RunnerController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunner"}}},"description":"CreateRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseRunner"},{"$ref":"#/components/schemas/RunnerGroupNeededError"},{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["Runner"],"description":"Create a new runner object (id will be generated automagicly)."}},"/api/runners/{id}":{"get":{"operationId":"RunnerController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner"],"description":"Returns a runner of a specified id (if it exists)"},"put":{"operationId":"RunnerController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunner"}}},"description":"UpdateRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner"],"description":"Update a runner object (id can't be changed)."},"delete":{"operationId":"RunnerController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Runner"],"description":"Delete a specified runner (if it exists)."}},"/api/teams":{"get":{"operationId":"RunnerTeamController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerTeam"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Team"],"description":"Lists all runnerTeams."},"post":{"operationId":"RunnerTeamController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerTeam"}}},"description":"CreateRunnerTeam","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""}},"summary":"Post","tags":["Runner Team"],"description":"Create a new runnerTeam object (id will be generated automagicly)."}},"/api/teams/{id}":{"get":{"operationId":"RunnerTeamController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Team"],"description":"Returns a runnerTeam of a specified id (if it exists)"},"put":{"operationId":"RunnerTeamController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerTeam"}}},"description":"UpdateRunnerTeam","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Team"],"description":"Update a runnerTeam object (id can't be changed)."},"delete":{"operationId":"RunnerTeamController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamHasRunnersError"}}},"description":""}},"summary":"Remove","tags":["Runner Team"],"description":"Delete a specified runnerTeam (if it exists)."}},"/api/organisations":{"get":{"operationId":"RunnerOrganisationController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Organisation"],"description":"Lists all runnerOrganisations."},"post":{"operationId":"RunnerOrganisationController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerOrganisation"}}},"description":"CreateRunnerOrganisation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""}},"summary":"Post","tags":["Runner Organisation"],"description":"Create a new runnerOrganisation object (id will be generated automagicly)."}},"/api/organisations/{id}":{"get":{"operationId":"RunnerOrganisationController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Organisation"],"description":"Returns a runnerOrganisation of a specified id (if it exists)"},"put":{"operationId":"RunnerOrganisationController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisation"}}},"description":"RunnerOrganisation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Organisation"],"description":"Update a runnerOrganisation object (id can't be changed)."},"delete":{"operationId":"RunnerOrganisationController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RunnerOrganisationHasTeamsError"},{"$ref":"#/components/schemas/RunnerOrganisationHasRunnersError"}]}}},"description":""}},"summary":"Remove","tags":["Runner Organisation"],"description":"Delete a specified runnerOrganisation (if it exists)."}},"/api/tracks":{"get":{"operationId":"TrackController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseTrack"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Track"],"description":"Lists all tracks."},"post":{"operationId":"TrackController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrack"}}},"description":"CreateTrack","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""}},"summary":"Post","tags":["Track"],"description":"Create a new track object (id will be generated automagicly)."}},"/api/tracks/{id}":{"get":{"operationId":"TrackController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Track"],"description":"Returns a track of a specified id (if it exists)"},"put":{"operationId":"TrackController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Track"}}},"description":"Track","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Track"],"description":"Update a track object (id can't be changed)."},"delete":{"operationId":"TrackController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Track"],"description":"Delete a specified track (if it exists)."}},"/api/users":{"get":{"operationId":"UserController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/User"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User"],"description":"Lists all users."},"post":{"operationId":"UserController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUser"}}},"description":"CreateUser","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/User"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User"],"description":"Create a new user object (id will be generated automagicly)."}},"/api/users/{id}":{"get":{"operationId":"UserController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User"],"description":"Returns a user of a specified id (if it exists)"},"put":{"operationId":"UserController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"User","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["User"],"description":"Update a user object (id can't be changed)."},"delete":{"operationId":"UserController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User"],"description":"Delete a specified runner (if it exists)."}},"/api/usergroups":{"get":{"operationId":"UserGroupController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserGroup"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User Group"],"description":"Lists all usergroups."},"post":{"operationId":"UserGroupController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserGroup"}}},"description":"CreateUserGroup","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserGroup"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User Group"],"description":"Create a new usergroup object (id will be generated automagicly)."}},"/api/usergroups/{id}":{"get":{"operationId":"UserGroupController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User Group"],"description":"Returns a usergroup of a specified id (if it exists)"},"put":{"operationId":"UserGroupController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":"UserGroup","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["User Group"],"description":"Update a usergroup object (id can't be changed)."},"delete":{"operationId":"UserGroupController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User Group"],"description":"Delete a specified usergroup (if it exists)."}}}} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..7d959dd --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "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.3", + "license": "CC-BY-NC-SA-4.0", + "main": "./dist/index.js", + "repository": { + "type": "git", + "url": "git+https://git.odit.services/lfk/lib" + }, + "keywords": [ + "odit", + "odit.services", + "lfk" + ], + "author": "ODIT.Services", + "files": [ + "**/dist", + "package.json", + "README.md" + ], + "scripts": { + "build:js": "npm run build:prepare && npm run build && npm run build:compile && npm run build:cleanup", + "build:prepare": "rimraf ./lib ./dist", + "build": "openapi --input ./openapi.json --output ./lib --client fetch", + "build:compile": "tsc", + "build:cleanup": "rimraf ./lib" + }, + "bugs": { + "url": "https://git.odit.services/lfk/lib/issues" + }, + "homepage": "https://git.odit.services/lfk/lib/", + "devDependencies": { + "openapi-typescript-codegen": "^0.7.0", + "rimraf": "^3.0.2", + "typescript": "^4.1.3" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2bf6d29 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "rootDir": "./lib", + "outDir": "./dist", + "esModuleInterop": true, + "sourceMap": false, + "allowSyntheticDefaultImports": true, + "declaration": true + }, + "include": [ + "lib/**/*" + ], + "exclude": [ + "node_modules", + "**/*.spec.ts" + ] +} \ No newline at end of file