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

This commit is contained in:
2021-01-24 18:01:44 +00:00
parent bec78aa2fd
commit 01191cefe9
54 changed files with 238 additions and 143 deletions

View File

@@ -33,7 +33,7 @@ class ImportService {
static async importControllerPostOrgsJson(id, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/organisations/${id}/import`,
path: `/api/organizations/${id}/import`,
body: requestBody,
});
return result.body;
@@ -81,7 +81,7 @@ class ImportService {
static async importControllerPostOrgsCsv(id) {
const result = await request_1.request({
method: 'POST',
path: `/api/organisations/${id}/import/csv`,
path: `/api/organizations/${id}/import/csv`,
});
return result.body;
}

View File

@@ -1,48 +0,0 @@
import type { CreateRunnerOrganisation } from '../models/CreateRunnerOrganisation';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunnerOrganisation } from '../models/ResponseRunnerOrganisation';
import type { UpdateRunnerOrganisation } from '../models/UpdateRunnerOrganisation';
export declare class RunnerOrganisationService {
/**
* Get all
* Lists all organisations. <br> This includes their address, contact and teams (if existing/associated).
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerGetAll(): Promise<Array<ResponseRunnerOrganisation>>;
/**
* Post
* Create a new organsisation.
* @param requestBody CreateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerPost(requestBody?: CreateRunnerOrganisation): Promise<ResponseRunnerOrganisation>;
/**
* Get one
* Lists all information about the organisation whose id got provided.
* @param id
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerGetOne(id: number): Promise<ResponseRunnerOrganisation>;
/**
* Put
* Update the organisation whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerPut(id: number, requestBody?: UpdateRunnerOrganisation): Promise<ResponseRunnerOrganisation>;
/**
* Remove
* Delete the organsisation whose id you provided. <br> If the organisation still has runners and/or teams associated this will fail. <br> To delete the organisation with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact. <br> If no organisation with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseRunnerOrganisation
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerOrganisationControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerOrganisation | ResponseEmpty>;
}

View File

@@ -0,0 +1,48 @@
import type { CreateRunnerOrganization } from '../models/CreateRunnerOrganization';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunnerOrganization } from '../models/ResponseRunnerOrganization';
import type { UpdateRunnerOrganization } from '../models/UpdateRunnerOrganization';
export declare class RunnerOrganizationService {
/**
* Get all
* Lists all organizations. <br> This includes their address, contact and teams (if existing/associated).
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static runnerOrganizationControllerGetAll(): Promise<Array<ResponseRunnerOrganization>>;
/**
* Post
* Create a new organsisation.
* @param requestBody CreateRunnerOrganization
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static runnerOrganizationControllerPost(requestBody?: CreateRunnerOrganization): Promise<ResponseRunnerOrganization>;
/**
* Get one
* Lists all information about the organization whose id got provided.
* @param id
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static runnerOrganizationControllerGetOne(id: number): Promise<ResponseRunnerOrganization>;
/**
* Put
* Update the organization whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerOrganization
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static runnerOrganizationControllerPut(id: number, requestBody?: UpdateRunnerOrganization): Promise<ResponseRunnerOrganization>;
/**
* Remove
* Delete the organsisation whose id you provided. <br> If the organization still has runners and/or teams associated this will fail. <br> To delete the organization with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact. <br> If no organization with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseRunnerOrganization
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerOrganizationControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerOrganization | ResponseEmpty>;
}

View File

@@ -1,79 +1,79 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunnerOrganisationService = void 0;
exports.RunnerOrganizationService = void 0;
const request_1 = require("../core/request");
class RunnerOrganisationService {
class RunnerOrganizationService {
/**
* Get all
* Lists all organisations. <br> This includes their address, contact and teams (if existing/associated).
* @returns ResponseRunnerOrganisation
* Lists all organizations. <br> This includes their address, contact and teams (if existing/associated).
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static async runnerOrganisationControllerGetAll() {
static async runnerOrganizationControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/organisations`,
path: `/api/organizations`,
});
return result.body;
}
/**
* Post
* Create a new organsisation.
* @param requestBody CreateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @param requestBody CreateRunnerOrganization
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static async runnerOrganisationControllerPost(requestBody) {
static async runnerOrganizationControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/organisations`,
path: `/api/organizations`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Lists all information about the organisation whose id got provided.
* Lists all information about the organization whose id got provided.
* @param id
* @returns ResponseRunnerOrganisation
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static async runnerOrganisationControllerGetOne(id) {
static async runnerOrganizationControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/organisations/${id}`,
path: `/api/organizations/${id}`,
});
return result.body;
}
/**
* Put
* Update the organisation whose id you provided. <br> Please remember that ids can't be changed.
* Update the organization whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @param requestBody UpdateRunnerOrganization
* @returns ResponseRunnerOrganization
* @throws ApiError
*/
static async runnerOrganisationControllerPut(id, requestBody) {
static async runnerOrganizationControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/organisations/${id}`,
path: `/api/organizations/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete the organsisation whose id you provided. <br> If the organisation still has runners and/or teams associated this will fail. <br> To delete the organisation with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact. <br> If no organisation with this id exists it will just return 204(no content).
* Delete the organsisation whose id you provided. <br> If the organization still has runners and/or teams associated this will fail. <br> To delete the organization with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact. <br> If no organization with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseRunnerOrganisation
* @returns ResponseRunnerOrganization
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerOrganisationControllerRemove(id, force) {
static async runnerOrganizationControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/organisations/${id}`,
path: `/api/organizations/${id}`,
query: {
'force': force,
},
@@ -81,4 +81,4 @@ class RunnerOrganisationService {
return result.body;
}
}
exports.RunnerOrganisationService = RunnerOrganisationService;
exports.RunnerOrganizationService = RunnerOrganizationService;

View File

@@ -1,3 +1,5 @@
import type { CreateSelfServiceCitizenRunner } from '../models/CreateSelfServiceCitizenRunner';
import type { CreateSelfServiceRunner } from '../models/CreateSelfServiceRunner';
import type { ResponseSelfServiceRunner } from '../models/ResponseSelfServiceRunner';
export declare class RunnerSelfService {
/**
@@ -8,4 +10,21 @@ export declare class RunnerSelfService {
* @throws ApiError
*/
static runnerSelfServiceControllerGet(jwt: string): Promise<ResponseSelfServiceRunner>;
/**
* Register runner
* Create a new selfservice runner in the citizen org. <br> This endpoint shoud be used to allow "everyday citizen" to register themselves. <br> You have to provide a mail address, b/c the future we'll implement email verification.
* @param requestBody CreateSelfServiceCitizenRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static runnerSelfServiceControllerRegisterRunner(requestBody?: CreateSelfServiceCitizenRunner): Promise<ResponseSelfServiceRunner>;
/**
* Register organization runner
* Create a new selfservice runner in a provided org. <br> The orgs get provided and authorized via api tokens that can be optained via the /organizations endpoint.
* @param token
* @param requestBody CreateSelfServiceRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static runnerSelfServiceControllerRegisterOrganizationRunner(token: string, requestBody?: CreateSelfServiceRunner): Promise<ResponseSelfServiceRunner>;
}

View File

@@ -17,5 +17,36 @@ class RunnerSelfService {
});
return result.body;
}
/**
* Register runner
* Create a new selfservice runner in the citizen org. <br> This endpoint shoud be used to allow "everyday citizen" to register themselves. <br> You have to provide a mail address, b/c the future we'll implement email verification.
* @param requestBody CreateSelfServiceCitizenRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static async runnerSelfServiceControllerRegisterRunner(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/register`,
body: requestBody,
});
return result.body;
}
/**
* Register organization runner
* Create a new selfservice runner in a provided org. <br> The orgs get provided and authorized via api tokens that can be optained via the /organizations endpoint.
* @param token
* @param requestBody CreateSelfServiceRunner
* @returns ResponseSelfServiceRunner
* @throws ApiError
*/
static async runnerSelfServiceControllerRegisterOrganizationRunner(token, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/register/${token}`,
body: requestBody,
});
return result.body;
}
}
exports.RunnerSelfService = RunnerSelfService;

View File

@@ -5,7 +5,7 @@ import type { UpdateRunnerTeam } from '../models/UpdateRunnerTeam';
export declare class RunnerTeamService {
/**
* Get all
* Lists all teams. <br> This includes their parent organisation and contact (if existing/associated).
* Lists all teams. <br> This includes their parent organization and contact (if existing/associated).
* @returns ResponseRunnerTeam
* @throws ApiError
*/

View File

@@ -5,7 +5,7 @@ const request_1 = require("../core/request");
class RunnerTeamService {
/**
* Get all
* Lists all teams. <br> This includes their parent organisation and contact (if existing/associated).
* Lists all teams. <br> This includes their parent organization and contact (if existing/associated).
* @returns ResponseRunnerTeam
* @throws ApiError
*/

View File

@@ -47,14 +47,14 @@ export declare class StatsService {
static statsControllerGetTopTeamsByDonations(): Promise<Array<ResponseStatsTeam>>;
/**
* Get top orgs by distance
* Returns the top ten organisations by distance.
* Returns the top ten organizations by distance.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static statsControllerGetTopOrgsByDistance(): Promise<Array<ResponseStatsOrgnisation>>;
/**
* Get top orgs by donations
* Returns the top ten organisations by donations.
* Returns the top ten organizations by donations.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/

View File

@@ -83,27 +83,27 @@ class StatsService {
}
/**
* Get top orgs by distance
* Returns the top ten organisations by distance.
* Returns the top ten organizations by distance.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static async statsControllerGetTopOrgsByDistance() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/organisations/distance`,
path: `/api/stats/organizations/distance`,
});
return result.body;
}
/**
* Get top orgs by donations
* Returns the top ten organisations by donations.
* Returns the top ten organizations by donations.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static async statsControllerGetTopOrgsByDonations() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/organisations/donations`,
path: `/api/stats/organizations/donations`,
});
return result.body;
}