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

This commit is contained in:
Nicolai Ort 2021-01-16 20:37:14 +00:00
parent 3e9d3e4120
commit e329836a06
12 changed files with 100 additions and 7 deletions

View File

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

2
dist/index.d.ts vendored
View File

@ -139,6 +139,7 @@ export type { UpdateUser } from './models/UpdateUser';
export type { UpdateUserGroup } from './models/UpdateUserGroup';
export type { User } from './models/User';
export { UserAction } from './models/UserAction';
export type { UserDeletionNotConfirmedError } from './models/UserDeletionNotConfirmedError';
export type { UserDisabledError } from './models/UserDisabledError';
export type { UserEmailNeededError } from './models/UserEmailNeededError';
export type { UserGroup } from './models/UserGroup';
@ -154,6 +155,7 @@ export { AuthService } from './services/AuthService';
export { DonationService } from './services/DonationService';
export { DonorService } from './services/DonorService';
export { ImportService } from './services/ImportService';
export { MeService } from './services/MeService';
export { PermissionService } from './services/PermissionService';
export { RunnerCardService } from './services/RunnerCardService';
export { RunnerOrganisationService } from './services/RunnerOrganisationService';

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.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.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 */
@ -24,6 +24,8 @@ var DonorService_1 = require("./services/DonorService");
Object.defineProperty(exports, "DonorService", { enumerable: true, get: function () { return DonorService_1.DonorService; } });
var ImportService_1 = require("./services/ImportService");
Object.defineProperty(exports, "ImportService", { enumerable: true, get: function () { return ImportService_1.ImportService; } });
var MeService_1 = require("./services/MeService");
Object.defineProperty(exports, "MeService", { enumerable: true, get: function () { return MeService_1.MeService; } });
var PermissionService_1 = require("./services/PermissionService");
Object.defineProperty(exports, "PermissionService", { enumerable: true, get: function () { return PermissionService_1.PermissionService; } });
var RunnerCardService_1 = require("./services/RunnerCardService");

View File

@ -7,7 +7,7 @@ export declare type UpdateUser = {
email: string;
phone?: string;
password?: string;
enabled: boolean;
enabled?: boolean;
groups?: any;
profilePic?: string;
};

View File

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

28
dist/services/MeService.d.ts vendored Normal file
View File

@ -0,0 +1,28 @@
import type { ResponseUser } from '../models/ResponseUser';
import type { ResponseUserPermissions } from '../models/ResponseUserPermissions';
import type { UpdateUser } from '../models/UpdateUser';
export declare class MeService {
/**
* Get permissions
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
* @returns ResponseUserPermissions
* @throws ApiError
*/
static meControllerGetPermissions(): Promise<ResponseUserPermissions>;
/**
* Put
* Update the yourself. <br> You can't edit your own permissions or group memberships here - Please use the /api/users/:id enpoint instead. <br> Please remember that ids can't be changed.
* @param requestBody UpdateUser
* @returns ResponseUser
* @throws ApiError
*/
static meControllerPut(requestBody?: UpdateUser): Promise<ResponseUser>;
/**
* Remove
* Delete yourself. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to you they will get deleted as well.
* @param force
* @returns ResponseUser
* @throws ApiError
*/
static meControllerRemove(force?: boolean): Promise<ResponseUser>;
}

52
dist/services/MeService.js vendored Normal file
View File

@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MeService = void 0;
const request_1 = require("../core/request");
class MeService {
/**
* Get permissions
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
* @returns ResponseUserPermissions
* @throws ApiError
*/
static async meControllerGetPermissions() {
const result = await request_1.request({
method: 'GET',
path: `/api/users/me/`,
});
return result.body;
}
/**
* Put
* Update the yourself. <br> You can't edit your own permissions or group memberships here - Please use the /api/users/:id enpoint instead. <br> Please remember that ids can't be changed.
* @param requestBody UpdateUser
* @returns ResponseUser
* @throws ApiError
*/
static async meControllerPut(requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/users/me/`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete yourself. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to you they will get deleted as well.
* @param force
* @returns ResponseUser
* @throws ApiError
*/
static async meControllerRemove(force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/users/me/`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.MeService = MeService;

View File

@ -37,7 +37,7 @@ export declare class UserService {
static userControllerPut(id: number, requestBody?: UpdateUser): Promise<ResponseUser>;
/**
* Remove
* Delete the user whose id you provided. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* Delete the user whose id you provided. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseUser

View File

@ -63,7 +63,7 @@ class UserService {
}
/**
* Remove
* Delete the user whose id you provided. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* Delete the user whose id you provided. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseUser

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.0",
"version": "0.1.1",
"license": "CC-BY-NC-SA-4.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",