🚀New lib version v0.2.0 [CI SKIP]
continuous-integration/drone Build is passing Details

This commit is contained in:
Nicolai Ort 2021-01-20 17:08:44 +00:00
parent e329836a06
commit b62a240ca6
50 changed files with 255 additions and 37 deletions

View File

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

13
dist/index.d.ts vendored
View File

@ -1,13 +1,17 @@
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 { AddressCityEmptyError } from './models/AddressCityEmptyError';
export type { AddressCountryEmptyError } from './models/AddressCountryEmptyError';
export type { AddressFirstLineEmptyError } from './models/AddressFirstLineEmptyError';
export type { AddressPostalCodeEmptyError } from './models/AddressPostalCodeEmptyError';
export type { AddressPostalCodeInvalidError } from './models/AddressPostalCodeInvalidError';
export type { CreateAuth } from './models/CreateAuth';
export type { CreateDistanceDonation } from './models/CreateDistanceDonation';
export type { CreateDonation } from './models/CreateDonation';
export type { CreateDonor } from './models/CreateDonor';
export type { CreateFixedDonation } from './models/CreateFixedDonation';
export type { CreateGroupContact } from './models/CreateGroupContact';
export type { CreateParticipant } from './models/CreateParticipant';
export { CreatePermission } from './models/CreatePermission';
export type { CreateResetToken } from './models/CreateResetToken';
@ -34,8 +38,8 @@ export type { DonorNotFoundError } from './models/DonorNotFoundError';
export type { DonorReceiptAddressNeededError } from './models/DonorReceiptAddressNeededError';
export type { FixedDonation } from './models/FixedDonation';
export type { GroupContact } from './models/GroupContact';
export type { GroupContactIdsNotMatchingError } from './models/GroupContactIdsNotMatchingError';
export type { GroupContactNotFoundError } from './models/GroupContactNotFoundError';
export type { GroupContactWrongTypeError } from './models/GroupContactWrongTypeError';
export type { GroupNameNeededError } from './models/GroupNameNeededError';
export type { HandleLogout } from './models/HandleLogout';
export type { IllegalJWTError } from './models/IllegalJWTError';
@ -63,6 +67,7 @@ export type { ResponseDistanceDonation } from './models/ResponseDistanceDonation
export type { ResponseDonation } from './models/ResponseDonation';
export type { ResponseDonor } from './models/ResponseDonor';
export type { ResponseEmpty } from './models/ResponseEmpty';
export type { ResponseGroupContact } from './models/ResponseGroupContact';
export type { ResponseParticipant } from './models/ResponseParticipant';
export { ResponsePermission } from './models/ResponsePermission';
export type { ResponsePrincipal } from './models/ResponsePrincipal';
@ -126,6 +131,7 @@ export type { UpdateDistanceDonation } from './models/UpdateDistanceDonation';
export type { UpdateDonation } from './models/UpdateDonation';
export type { UpdateDonor } from './models/UpdateDonor';
export type { UpdateFixedDonation } from './models/UpdateFixedDonation';
export type { UpdateGroupContact } from './models/UpdateGroupContact';
export type { UpdatePermission } from './models/UpdatePermission';
export type { UpdateRunner } from './models/UpdateRunner';
export type { UpdateRunnerCard } from './models/UpdateRunnerCard';
@ -154,6 +160,7 @@ export type { UserNotFoundOrRefreshTokenCountInvalidError } from './models/UserN
export { AuthService } from './services/AuthService';
export { DonationService } from './services/DonationService';
export { DonorService } from './services/DonorService';
export { GroupContactService } from './services/GroupContactService';
export { ImportService } from './services/ImportService';
export { MeService } from './services/MeService';
export { PermissionService } from './services/PermissionService';

4
dist/index.js vendored
View File

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

View File

@ -1,8 +1,6 @@
export declare type Address = {
id: number;
description?: string;
address1: string;
address2?: string;
address2: string;
postalcode: string;
city: string;
country: string;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,5 +5,5 @@ export declare type CreateDonor = {
lastname: string;
phone?: string;
email?: string;
address?: number;
address?: any;
};

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

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

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

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

View File

@ -4,5 +4,5 @@ export declare type CreateParticipant = {
lastname: string;
phone?: string;
email?: string;
address?: number;
address?: any;
};

View File

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

View File

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

View File

@ -5,5 +5,5 @@ export declare type CreateRunner = {
lastname: string;
phone?: string;
email?: string;
address?: number;
address?: any;
};

View File

@ -1,5 +1,5 @@
export declare type CreateRunnerOrganisation = {
address?: number;
address?: any;
name: string;
contact?: number;
};

View File

@ -3,7 +3,6 @@ export declare type GroupContact = {
firstname: string;
middlename?: string;
lastname: string;
address?: any;
phone?: string;
email?: string;
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,4 +7,5 @@ export declare type ResponseDonor = {
lastname: string;
phone: string;
email: string;
address?: any;
};

10
dist/models/ResponseGroupContact.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
export declare type ResponseGroupContact = {
id: number;
firstname: string;
middlename: string;
lastname: string;
phone: string;
email: string;
groups: any;
address: any;
};

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

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

View File

@ -5,4 +5,5 @@ export declare type ResponseParticipant = {
lastname: string;
phone: string;
email: string;
address?: any;
};

View File

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

View File

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

View File

@ -7,4 +7,5 @@ export declare type ResponseRunner = {
lastname: string;
phone: string;
email: string;
address?: any;
};

View File

@ -6,5 +6,5 @@ export declare type UpdateDonor = {
lastname: string;
phone?: string;
email?: string;
address?: number;
address?: any;
};

10
dist/models/UpdateGroupContact.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
export declare type UpdateGroupContact = {
id: number;
firstname: string;
middlename?: string;
lastname: string;
address?: any;
phone?: string;
email?: string;
groups?: any;
};

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

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

View File

@ -6,5 +6,5 @@ export declare type UpdateRunner = {
lastname: string;
phone?: string;
email?: string;
address?: number;
address?: any;
};

View File

@ -1,6 +1,6 @@
export declare type UpdateRunnerOrganisation = {
id: number;
address?: number;
address?: any;
name: string;
contact?: number;
};

48
dist/services/GroupContactService.d.ts vendored Normal file
View File

@ -0,0 +1,48 @@
import type { CreateGroupContact } from '../models/CreateGroupContact';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseGroupContact } from '../models/ResponseGroupContact';
import type { UpdateGroupContact } from '../models/UpdateGroupContact';
export declare class GroupContactService {
/**
* Get all
* Lists all contacts. <br> This includes the contact's associated groups.
* @returns ResponseGroupContact
* @throws ApiError
*/
static groupContactControllerGetAll(): Promise<Array<ResponseGroupContact>>;
/**
* Post
* Create a new contact.
* @param requestBody CreateGroupContact
* @returns ResponseGroupContact
* @throws ApiError
*/
static groupContactControllerPost(requestBody?: CreateGroupContact): Promise<ResponseGroupContact>;
/**
* Get one
* Lists all information about the contact whose id got provided. <br> This includes the contact's associated groups.
* @param id
* @returns ResponseGroupContact
* @throws ApiError
*/
static groupContactControllerGetOne(id: number): Promise<ResponseGroupContact>;
/**
* Put
* Update the contact whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateGroupContact
* @returns ResponseGroupContact
* @throws ApiError
*/
static groupContactControllerPut(id: number, requestBody?: UpdateGroupContact): Promise<ResponseGroupContact>;
/**
* Remove
* Delete the contact whose id you provided. <br> If no contact with this id exists it will just return 204(no content). <br> This won't delete any groups associated with the contact.
* @param id
* @param force
* @returns ResponseGroupContact
* @returns ResponseEmpty
* @throws ApiError
*/
static groupContactControllerRemove(id: number, force?: boolean): Promise<ResponseGroupContact | ResponseEmpty>;
}

84
dist/services/GroupContactService.js vendored Normal file
View File

@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GroupContactService = void 0;
const request_1 = require("../core/request");
class GroupContactService {
/**
* Get all
* Lists all contacts. <br> This includes the contact's associated groups.
* @returns ResponseGroupContact
* @throws ApiError
*/
static async groupContactControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/contacts`,
});
return result.body;
}
/**
* Post
* Create a new contact.
* @param requestBody CreateGroupContact
* @returns ResponseGroupContact
* @throws ApiError
*/
static async groupContactControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/contacts`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Lists all information about the contact whose id got provided. <br> This includes the contact's associated groups.
* @param id
* @returns ResponseGroupContact
* @throws ApiError
*/
static async groupContactControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/contacts/${id}`,
});
return result.body;
}
/**
* Put
* Update the contact whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateGroupContact
* @returns ResponseGroupContact
* @throws ApiError
*/
static async groupContactControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/contacts/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete the contact whose id you provided. <br> If no contact with this id exists it will just return 204(no content). <br> This won't delete any groups associated with the contact.
* @param id
* @param force
* @returns ResponseGroupContact
* @returns ResponseEmpty
* @throws ApiError
*/
static async groupContactControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/contacts/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.GroupContactService = GroupContactService;

View File

@ -37,7 +37,7 @@ export declare class RunnerOrganisationService {
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> If no organisation with this id exists it will just return 204(no content).
* 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

View File

@ -63,7 +63,7 @@ class RunnerOrganisationService {
}
/**
* 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> If no organisation with this id exists it will just return 204(no content).
* 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

View File

@ -37,7 +37,7 @@ export declare class RunnerTeamService {
static runnerTeamControllerPut(id: number, requestBody?: UpdateRunnerTeam): Promise<ResponseRunnerTeam>;
/**
* Remove
* Delete the team whose id you provided. <br> If the team still has runners associated this will fail. <br> To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while). <br> If no team with this id exists it will just return 204(no content).
* Delete the team whose id you provided. <br> If the team still has runners associated this will fail. <br> To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact.<br> If no team with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseRunnerTeam

View File

@ -63,7 +63,7 @@ class RunnerTeamService {
}
/**
* Remove
* Delete the team whose id you provided. <br> If the team still has runners associated this will fail. <br> To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while). <br> If no team with this id exists it will just return 204(no content).
* Delete the team whose id you provided. <br> If the team still has runners associated this will fail. <br> To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while). <br> This won't delete the associated contact.<br> If no team with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseRunnerTeam

File diff suppressed because one or more lines are too long

View File

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