@odit/lfk-client-js
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -6,3 +6,3 @@ "use strict"; | ||
BASE: '', | ||
VERSION: '0.0.8', | ||
VERSION: '0.0.11', | ||
WITH_CREDENTIALS: false, | ||
@@ -9,0 +9,0 @@ TOKEN: undefined, |
@@ -6,3 +6,2 @@ export { ApiError } from './core/ApiError'; | ||
export type { AddressWrongTypeError } from './models/AddressWrongTypeError'; | ||
export type { Auth } from './models/Auth'; | ||
export type { CreateAuth } from './models/CreateAuth'; | ||
@@ -14,2 +13,3 @@ export type { CreateDonor } from './models/CreateDonor'; | ||
export type { CreateRunner } from './models/CreateRunner'; | ||
export type { CreateRunnerCard } from './models/CreateRunnerCard'; | ||
export type { CreateRunnerGroup } from './models/CreateRunnerGroup'; | ||
@@ -56,2 +56,3 @@ export type { CreateRunnerOrganisation } from './models/CreateRunnerOrganisation'; | ||
export type { ResetPassword } from './models/ResetPassword'; | ||
export type { ResponseAuth } from './models/ResponseAuth'; | ||
export type { ResponseDonor } from './models/ResponseDonor'; | ||
@@ -63,2 +64,3 @@ export type { ResponseEmpty } from './models/ResponseEmpty'; | ||
export type { ResponseRunner } from './models/ResponseRunner'; | ||
export type { ResponseRunnerCard } from './models/ResponseRunnerCard'; | ||
export type { ResponseRunnerGroup } from './models/ResponseRunnerGroup'; | ||
@@ -80,2 +82,6 @@ export type { ResponseRunnerOrganisation } from './models/ResponseRunnerOrganisation'; | ||
export type { RunnerCard } from './models/RunnerCard'; | ||
export type { RunnerCardHasScansError } from './models/RunnerCardHasScansError'; | ||
export type { RunnerCardIdOutOfRangeError } from './models/RunnerCardIdOutOfRangeError'; | ||
export type { RunnerCardIdsNotMatchingError } from './models/RunnerCardIdsNotMatchingError'; | ||
export type { RunnerCardNotFoundError } from './models/RunnerCardNotFoundError'; | ||
export type { RunnerGroup } from './models/RunnerGroup'; | ||
@@ -116,2 +122,3 @@ export type { RunnerGroupNeededError } from './models/RunnerGroupNeededError'; | ||
export type { UpdateRunner } from './models/UpdateRunner'; | ||
export type { UpdateRunnerCard } from './models/UpdateRunnerCard'; | ||
export type { UpdateRunnerOrganisation } from './models/UpdateRunnerOrganisation'; | ||
@@ -122,3 +129,5 @@ export type { UpdateRunnerTeam } from './models/UpdateRunnerTeam'; | ||
export type { UpdateTrack } from './models/UpdateTrack'; | ||
export type { UpdateTrackScan } from './models/UpdateTrackScan'; | ||
export type { UpdateUser } from './models/UpdateUser'; | ||
export type { UpdateUserGroup } from './models/UpdateUserGroup'; | ||
export type { User } from './models/User'; | ||
@@ -139,2 +148,3 @@ export { UserAction } from './models/UserAction'; | ||
export { PermissionService } from './services/PermissionService'; | ||
export { RunnerCardService } from './services/RunnerCardService'; | ||
export { RunnerOrganisationService } from './services/RunnerOrganisationService'; | ||
@@ -141,0 +151,0 @@ export { RunnerService } from './services/RunnerService'; |
"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.PermissionService = exports.ImportService = exports.DonorService = 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.ImportService = exports.DonorService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0; | ||
/* istanbul ignore file */ | ||
@@ -27,2 +27,4 @@ /* tslint:disable */ | ||
Object.defineProperty(exports, "PermissionService", { enumerable: true, get: function () { return PermissionService_1.PermissionService; } }); | ||
var RunnerCardService_1 = require("./services/RunnerCardService"); | ||
Object.defineProperty(exports, "RunnerCardService", { enumerable: true, get: function () { return RunnerCardService_1.RunnerCardService; } }); | ||
var RunnerOrganisationService_1 = require("./services/RunnerOrganisationService"); | ||
@@ -29,0 +31,0 @@ Object.defineProperty(exports, "RunnerOrganisationService", { enumerable: true, get: function () { return RunnerOrganisationService_1.RunnerOrganisationService; } }); |
@@ -18,3 +18,4 @@ export declare type CreatePermission = { | ||
SCAN = "SCAN", | ||
STATION = "STATION" | ||
STATION = "STATION", | ||
CARD = "CARD" | ||
} | ||
@@ -21,0 +22,0 @@ enum action { |
@@ -22,2 +22,3 @@ "use strict"; | ||
target["STATION"] = "STATION"; | ||
target["CARD"] = "CARD"; | ||
})(target = CreatePermission.target || (CreatePermission.target = {})); | ||
@@ -24,0 +25,0 @@ let action; |
export declare type CreateTrackScan = { | ||
track: string; | ||
card: string; | ||
station: string; | ||
runner: number; | ||
valid?: boolean; | ||
distance: number; | ||
card: number; | ||
station: number; | ||
}; |
@@ -18,3 +18,4 @@ export declare type Permission = { | ||
SCAN = "SCAN", | ||
STATION = "STATION" | ||
STATION = "STATION", | ||
CARD = "CARD" | ||
} | ||
@@ -21,0 +22,0 @@ enum action { |
@@ -22,2 +22,3 @@ "use strict"; | ||
target["STATION"] = "STATION"; | ||
target["CARD"] = "CARD"; | ||
})(target = Permission.target || (Permission.target = {})); | ||
@@ -24,0 +25,0 @@ let action; |
@@ -19,3 +19,4 @@ export declare type ResponsePermission = { | ||
SCAN = "SCAN", | ||
STATION = "STATION" | ||
STATION = "STATION", | ||
CARD = "CARD" | ||
} | ||
@@ -22,0 +23,0 @@ enum action { |
@@ -22,2 +22,3 @@ "use strict"; | ||
target["STATION"] = "STATION"; | ||
target["CARD"] = "CARD"; | ||
})(target = ResponsePermission.target || (ResponsePermission.target = {})); | ||
@@ -24,0 +25,0 @@ let action; |
export declare type RunnerCard = { | ||
id: number; | ||
runner?: any; | ||
code: string; | ||
enabled: boolean; | ||
}; |
@@ -6,3 +6,3 @@ export declare type TrackScan = { | ||
distance: number; | ||
timestamp: string; | ||
timestamp: number; | ||
id: number; | ||
@@ -9,0 +9,0 @@ runner: string; |
@@ -1,2 +0,1 @@ | ||
import type { Auth } from '../models/Auth'; | ||
import type { CreateAuth } from '../models/CreateAuth'; | ||
@@ -13,2 +12,3 @@ import type { CreateResetToken } from '../models/CreateResetToken'; | ||
import type { ResetPassword } from '../models/ResetPassword'; | ||
import type { ResponseAuth } from '../models/ResponseAuth'; | ||
import type { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError'; | ||
@@ -26,3 +26,3 @@ import type { UserNotFoundError } from '../models/UserNotFoundError'; | ||
*/ | ||
static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>; | ||
static authControllerLogin(requestBody?: CreateAuth): Promise<(ResponseAuth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>; | ||
/** | ||
@@ -45,3 +45,3 @@ * Logout | ||
*/ | ||
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>; | ||
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(ResponseAuth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>; | ||
/** | ||
@@ -54,3 +54,3 @@ * Get reset token | ||
*/ | ||
static authControllerGetResetToken(requestBody?: CreateResetToken): Promise<(Auth | UserNotFoundError | UsernameOrEmailNeededError)>; | ||
static authControllerGetResetToken(requestBody?: CreateResetToken): Promise<(ResponseAuth | UserNotFoundError | UsernameOrEmailNeededError)>; | ||
/** | ||
@@ -64,3 +64,3 @@ * Reset password | ||
*/ | ||
static authControllerResetPassword(token: string, requestBody?: ResetPassword): Promise<(Auth | UserNotFoundError | UsernameOrEmailNeededError)>; | ||
static authControllerResetPassword(token: string, requestBody?: ResetPassword): Promise<(ResponseAuth | UserNotFoundError | UsernameOrEmailNeededError)>; | ||
} |
@@ -42,3 +42,3 @@ import type { CreateRunner } from '../models/CreateRunner'; | ||
* Remove | ||
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content). | ||
* Delete the runner whose id you provided. <br> This will also delete all scans and cards associated with the runner. <br> If no runner with this id exists it will just return 204(no content). | ||
* @param id | ||
@@ -45,0 +45,0 @@ * @param force |
@@ -66,3 +66,3 @@ "use strict"; | ||
* Remove | ||
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content). | ||
* Delete the runner whose id you provided. <br> This will also delete all scans and cards associated with the runner. <br> If no runner with this id exists it will just return 204(no content). | ||
* @param id | ||
@@ -69,0 +69,0 @@ * @param force |
@@ -7,2 +7,3 @@ import type { CreateScan } from '../models/CreateScan'; | ||
import type { UpdateScan } from '../models/UpdateScan'; | ||
import type { UpdateTrackScan } from '../models/UpdateTrackScan'; | ||
export declare class ScanService { | ||
@@ -18,3 +19,3 @@ /** | ||
* Post | ||
* Create a new scan. <br> Please remeber to provide the scan's runner's id and distance for normal scans. | ||
* Create a new scan (not track scan - use /scans/trackscans instead). <br> Please rmemember to provide the scan's runner's id and distance. | ||
* @param requestBody CreateScan | ||
@@ -35,3 +36,3 @@ * @returns ResponseScan | ||
* Put | ||
* Update the scan whose id you provided. <br> Please remember that ids can't be changed and distances must be positive. | ||
* Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that ids can't be changed and distances must be positive. | ||
* @param id | ||
@@ -55,8 +56,17 @@ * @param requestBody UpdateScan | ||
* Post track scans | ||
* Create a new track scan. <br> This is just a alias for posting /scans | ||
* Create a new track scan (for "normal" scans use /scans instead). <br> Please remember that to provide the scan's card's station's id. | ||
* @param requestBody CreateTrackScan | ||
* @returns ResponseScan | ||
* @returns ResponseTrackScan | ||
* @throws ApiError | ||
*/ | ||
static scanControllerPostTrackScans(requestBody?: CreateTrackScan): Promise<ResponseScan>; | ||
static scanControllerPostTrackScans(requestBody?: CreateTrackScan): Promise<ResponseTrackScan>; | ||
/** | ||
* Put track scan | ||
* Update the track scan (not "normal" scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that only the validity, runner and track can be changed. | ||
* @param id | ||
* @param requestBody UpdateTrackScan | ||
* @returns ResponseTrackScan | ||
* @throws ApiError | ||
*/ | ||
static scanControllerPutTrackScan(id: number, requestBody?: UpdateTrackScan): Promise<ResponseTrackScan>; | ||
} |
@@ -21,3 +21,3 @@ "use strict"; | ||
* Post | ||
* Create a new scan. <br> Please remeber to provide the scan's runner's id and distance for normal scans. | ||
* Create a new scan (not track scan - use /scans/trackscans instead). <br> Please rmemember to provide the scan's runner's id and distance. | ||
* @param requestBody CreateScan | ||
@@ -51,3 +51,3 @@ * @returns ResponseScan | ||
* Put | ||
* Update the scan whose id you provided. <br> Please remember that ids can't be changed and distances must be positive. | ||
* Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that ids can't be changed and distances must be positive. | ||
* @param id | ||
@@ -87,5 +87,5 @@ * @param requestBody UpdateScan | ||
* Post track scans | ||
* Create a new track scan. <br> This is just a alias for posting /scans | ||
* Create a new track scan (for "normal" scans use /scans instead). <br> Please remember that to provide the scan's card's station's id. | ||
* @param requestBody CreateTrackScan | ||
* @returns ResponseScan | ||
* @returns ResponseTrackScan | ||
* @throws ApiError | ||
@@ -101,3 +101,19 @@ */ | ||
} | ||
/** | ||
* Put track scan | ||
* Update the track scan (not "normal" scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that only the validity, runner and track can be changed. | ||
* @param id | ||
* @param requestBody UpdateTrackScan | ||
* @returns ResponseTrackScan | ||
* @throws ApiError | ||
*/ | ||
static async scanControllerPutTrackScan(id, requestBody) { | ||
const result = await request_1.request({ | ||
method: 'PUT', | ||
path: `/api/scans/trackscans/${id}`, | ||
body: requestBody, | ||
}); | ||
return result.body; | ||
} | ||
} | ||
exports.ScanService = ScanService; |
@@ -32,2 +32,3 @@ import type { CreateStatsClient } from '../models/CreateStatsClient'; | ||
* @param id | ||
* @param force | ||
* @returns ResponseStatsClient | ||
@@ -37,3 +38,3 @@ * @returns ResponseEmpty | ||
*/ | ||
static statsClientControllerRemove(id: number): Promise<ResponseStatsClient | ResponseEmpty>; | ||
static statsClientControllerRemove(id: number, force?: boolean): Promise<ResponseStatsClient | ResponseEmpty>; | ||
} |
@@ -52,2 +52,3 @@ "use strict"; | ||
* @param id | ||
* @param force | ||
* @returns ResponseStatsClient | ||
@@ -57,6 +58,9 @@ * @returns ResponseEmpty | ||
*/ | ||
static async statsClientControllerRemove(id) { | ||
static async statsClientControllerRemove(id, force) { | ||
const result = await request_1.request({ | ||
method: 'DELETE', | ||
path: `/api/statsclients/${id}`, | ||
query: { | ||
'force': force, | ||
}, | ||
}); | ||
@@ -63,0 +67,0 @@ return result.body; |
import type { CreateUserGroup } from '../models/CreateUserGroup'; | ||
import type { ResponseEmpty } from '../models/ResponseEmpty'; | ||
import type { ResponseUserGroup } from '../models/ResponseUserGroup'; | ||
import type { UpdateUserGroup } from '../models/UpdateUserGroup'; | ||
import type { UserGroup } from '../models/UserGroup'; | ||
@@ -34,7 +35,7 @@ import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; | ||
* @param id | ||
* @param requestBody UserGroup | ||
* @param requestBody UpdateUserGroup | ||
* @returns UserGroup | ||
* @throws ApiError | ||
*/ | ||
static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise<UserGroup>; | ||
static userGroupControllerPut(id: number, requestBody?: UpdateUserGroup): Promise<UserGroup>; | ||
/** | ||
@@ -41,0 +42,0 @@ * Remove |
@@ -52,3 +52,3 @@ "use strict"; | ||
* @param id | ||
* @param requestBody UserGroup | ||
* @param requestBody UpdateUserGroup | ||
* @returns UserGroup | ||
@@ -55,0 +55,0 @@ * @throws ApiError |
{ | ||
"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.10", | ||
"version": "0.0.11", | ||
"license": "CC-BY-NC-SA-4.0", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164384
315
4191