itrm-tools 1.3.16-beta.9 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/alegra/AlegraConnectionManager.d.ts +30 -30
- package/dist/api/request/crud/CrudManager.d.ts +11 -11
- package/dist/api/request/crud/CrudServiceManager.d.ts +28 -28
- package/dist/api/request/crud/CrudServiceManager.js +98 -98
- package/dist/api/request/crud/CrudServiceManager.js.map +1 -1
- package/dist/api/request/crud/common/ActivityHistoryManager.d.ts +38 -38
- package/dist/api/request/crud/common/ActivityHistoryManager.js +68 -68
- package/dist/api/request/crud/common/ApplicationManager.d.ts +37 -37
- package/dist/api/request/crud/common/ApplicationManager.js +56 -56
- package/dist/api/request/crud/common/AvailablePlatformManager.d.ts +38 -38
- package/dist/api/request/crud/common/AvailablePlatformManager.js +68 -68
- package/dist/api/request/crud/common/ComponentManager.d.ts +48 -51
- package/dist/api/request/crud/common/ComponentManager.js +62 -62
- package/dist/api/request/crud/common/ComponentManager.js.map +1 -1
- package/dist/api/request/crud/common/KeyManager.d.ts +41 -41
- package/dist/api/request/crud/common/KeyManager.js +69 -69
- package/dist/api/request/crud/common/PlatformManager.d.ts +41 -44
- package/dist/api/request/crud/common/PlatformManager.js +59 -59
- package/dist/api/request/crud/common/PlatformManager.js.map +1 -1
- package/dist/api/request/crud/common/RoleManager.d.ts +40 -41
- package/dist/api/request/crud/common/RoleManager.js +56 -56
- package/dist/api/request/crud/common/RoleManager.js.map +1 -1
- package/dist/api/request/crud/common/StatusManager.d.ts +32 -32
- package/dist/api/request/crud/common/StatusManager.js +56 -56
- package/dist/api/request/crud/common/TypeManager.d.ts +32 -32
- package/dist/api/request/crud/common/TypeManager.js +56 -56
- package/dist/api/request/crud/common/UserCredentialsManager.d.ts +37 -37
- package/dist/api/request/crud/common/UserCredentialsManager.js +66 -66
- package/dist/api/request/crud/common/UserManager.d.ts +38 -38
- package/dist/api/request/crud/common/UserManager.js +62 -62
- package/dist/api/utils/Response.d.ts +25 -25
- package/dist/api/utils/Response.js +85 -85
- package/dist/cryptography/jwt/JwtUtils.d.ts +18 -18
- package/dist/cryptography/jwt/JwtUtils.js +36 -36
- package/dist/cryptography/password/PasswordUtils.d.ts +6 -6
- package/dist/cryptography/password/PasswordUtils.js +34 -34
- package/dist/index.d.ts +62 -63
- package/dist/index.js +126 -128
- package/dist/index.js.map +1 -1
- package/dist/types/api.d.ts +21 -21
- package/dist/types/api.js +2 -2
- package/package.json +1 -1
- package/dist/api/request/crud/common/ServiceSessionManager.d.ts +0 -24
- package/dist/api/request/crud/common/ServiceSessionManager.js +0 -109
- package/dist/api/request/crud/common/ServiceSessionManager.js.map +0 -1
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RoleManager = void 0;
|
|
4
|
-
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
-
class RoleManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
-
url;
|
|
7
|
-
constructor(url) {
|
|
8
|
-
super();
|
|
9
|
-
this.url = url;
|
|
10
|
-
}
|
|
11
|
-
find(details) {
|
|
12
|
-
return this.sendFinding(`${this.url}/roles?name=${details.name}`, details.config);
|
|
13
|
-
}
|
|
14
|
-
findById(details) {
|
|
15
|
-
return this.sendFinding(`${this.url}/roles?id=${details.id}`, details.config);
|
|
16
|
-
}
|
|
17
|
-
async count(details) {
|
|
18
|
-
let url = this.buildRequestUrl(`${this.url}/roles`, details);
|
|
19
|
-
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
-
}
|
|
21
|
-
async findAll(details) {
|
|
22
|
-
let roles = [];
|
|
23
|
-
let url = this.buildRequestUrl(`${this.url}/roles`, details);
|
|
24
|
-
if (details.limit) {
|
|
25
|
-
roles = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
-
do {
|
|
30
|
-
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
-
if (values)
|
|
32
|
-
roles = roles.concat(values);
|
|
33
|
-
isEmpty = values == undefined || values.length == 0;
|
|
34
|
-
offset += limit;
|
|
35
|
-
} while (!isEmpty);
|
|
36
|
-
}
|
|
37
|
-
return roles;
|
|
38
|
-
}
|
|
39
|
-
buildRequestUrl(url, details) {
|
|
40
|
-
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.name ? `&name=${details.name}` : ""}
|
|
41
|
-
return `${url}?${suffix.substring(1)}`;
|
|
42
|
-
}
|
|
43
|
-
create(details) {
|
|
44
|
-
return this.sendCreation(`${this.url}/roles`, { name: details.name, permissions: details.permissions }, details.config);
|
|
45
|
-
}
|
|
46
|
-
createMany(details) {
|
|
47
|
-
return this.sendCreationMany(`${this.url}/roles`, details.values ?? [], details.config);
|
|
48
|
-
}
|
|
49
|
-
modify(role) {
|
|
50
|
-
return this.sendModification(`${this.url}/roles/${role.roleId}`, { name: role.name, permissions: role.permissions }, role.config);
|
|
51
|
-
}
|
|
52
|
-
destroy(role) {
|
|
53
|
-
return this.sendDestruction(`${this.url}/roles/${role.roleId}`, role.config);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.RoleManager = RoleManager;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RoleManager = void 0;
|
|
4
|
+
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
+
class RoleManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
+
url;
|
|
7
|
+
constructor(url) {
|
|
8
|
+
super();
|
|
9
|
+
this.url = url;
|
|
10
|
+
}
|
|
11
|
+
find(details) {
|
|
12
|
+
return this.sendFinding(`${this.url}/roles?name=${details.name}`, details.config);
|
|
13
|
+
}
|
|
14
|
+
findById(details) {
|
|
15
|
+
return this.sendFinding(`${this.url}/roles?id=${details.id}`, details.config);
|
|
16
|
+
}
|
|
17
|
+
async count(details) {
|
|
18
|
+
let url = this.buildRequestUrl(`${this.url}/roles`, details);
|
|
19
|
+
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
+
}
|
|
21
|
+
async findAll(details) {
|
|
22
|
+
let roles = [];
|
|
23
|
+
let url = this.buildRequestUrl(`${this.url}/roles`, details);
|
|
24
|
+
if (details.limit) {
|
|
25
|
+
roles = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
+
do {
|
|
30
|
+
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
+
if (values)
|
|
32
|
+
roles = roles.concat(values);
|
|
33
|
+
isEmpty = values == undefined || values.length == 0;
|
|
34
|
+
offset += limit;
|
|
35
|
+
} while (!isEmpty);
|
|
36
|
+
}
|
|
37
|
+
return roles;
|
|
38
|
+
}
|
|
39
|
+
buildRequestUrl(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.name ? `&name=${details.name}` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
create(details) {
|
|
44
|
+
return this.sendCreation(`${this.url}/roles`, { name: details.name, permissions: details.permissions }, details.config);
|
|
45
|
+
}
|
|
46
|
+
createMany(details) {
|
|
47
|
+
return this.sendCreationMany(`${this.url}/roles`, details.values ?? [], details.config);
|
|
48
|
+
}
|
|
49
|
+
modify(role) {
|
|
50
|
+
return this.sendModification(`${this.url}/roles/${role.roleId}`, { name: role.name, permissions: role.permissions }, role.config);
|
|
51
|
+
}
|
|
52
|
+
destroy(role) {
|
|
53
|
+
return this.sendDestruction(`${this.url}/roles/${role.roleId}`, role.config);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.RoleManager = RoleManager;
|
|
57
57
|
//# sourceMappingURL=RoleManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/RoleManager.ts"],"names":[],"mappings":";;;AACA,8DAAwF;
|
|
1
|
+
{"version":3,"file":"RoleManager.js","sourceRoot":"","sources":["../../../../../src/api/request/crud/common/RoleManager.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
2
|
-
import { AxiosRequestConfig } from "axios";
|
|
3
|
-
export interface IStatus {
|
|
4
|
-
statusId?: number;
|
|
5
|
-
status?: string;
|
|
6
|
-
details?: Record<string, Record<string, string>>;
|
|
7
|
-
updatedAt?: string;
|
|
8
|
-
createdAt?: string;
|
|
9
|
-
config?: AxiosRequestConfig;
|
|
10
|
-
}
|
|
11
|
-
export interface IStatusSearchDetails {
|
|
12
|
-
id?: string | number;
|
|
13
|
-
status?: string;
|
|
14
|
-
details?: any;
|
|
15
|
-
values?: IStatus[];
|
|
16
|
-
limit?: number;
|
|
17
|
-
offset?: number;
|
|
18
|
-
config?: AxiosRequestConfig;
|
|
19
|
-
}
|
|
20
|
-
export declare class StatusManager extends CrudServiceManager<IStatusSearchDetails, IStatus> {
|
|
21
|
-
private readonly url;
|
|
22
|
-
constructor(url: string);
|
|
23
|
-
find(details: IStatusSearchDetails): Promise<IStatus | undefined>;
|
|
24
|
-
findById(details: StandardIdRequestDefinition): Promise<IStatus | undefined>;
|
|
25
|
-
count(details: IStatusSearchDetails): Promise<number>;
|
|
26
|
-
findAll(details: IStatusSearchDetails): Promise<IStatus[] | undefined>;
|
|
27
|
-
private buildRequestUrl;
|
|
28
|
-
create(details: IStatusSearchDetails): Promise<IStatus | undefined>;
|
|
29
|
-
createMany(details: IStatusSearchDetails): Promise<IStatus[] | undefined>;
|
|
30
|
-
modify(status: IStatus): Promise<IStatus | undefined>;
|
|
31
|
-
destroy(status: IStatus): Promise<void | number>;
|
|
32
|
-
}
|
|
1
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
2
|
+
import { AxiosRequestConfig } from "axios";
|
|
3
|
+
export interface IStatus {
|
|
4
|
+
statusId?: number;
|
|
5
|
+
status?: string;
|
|
6
|
+
details?: Record<string, Record<string, string>>;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
config?: AxiosRequestConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface IStatusSearchDetails {
|
|
12
|
+
id?: string | number;
|
|
13
|
+
status?: string;
|
|
14
|
+
details?: any;
|
|
15
|
+
values?: IStatus[];
|
|
16
|
+
limit?: number;
|
|
17
|
+
offset?: number;
|
|
18
|
+
config?: AxiosRequestConfig;
|
|
19
|
+
}
|
|
20
|
+
export declare class StatusManager extends CrudServiceManager<IStatusSearchDetails, IStatus> {
|
|
21
|
+
private readonly url;
|
|
22
|
+
constructor(url: string);
|
|
23
|
+
find(details: IStatusSearchDetails): Promise<IStatus | undefined>;
|
|
24
|
+
findById(details: StandardIdRequestDefinition): Promise<IStatus | undefined>;
|
|
25
|
+
count(details: IStatusSearchDetails): Promise<number>;
|
|
26
|
+
findAll(details: IStatusSearchDetails): Promise<IStatus[] | undefined>;
|
|
27
|
+
private buildRequestUrl;
|
|
28
|
+
create(details: IStatusSearchDetails): Promise<IStatus | undefined>;
|
|
29
|
+
createMany(details: IStatusSearchDetails): Promise<IStatus[] | undefined>;
|
|
30
|
+
modify(status: IStatus): Promise<IStatus | undefined>;
|
|
31
|
+
destroy(status: IStatus): Promise<void | number>;
|
|
32
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StatusManager = void 0;
|
|
4
|
-
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
-
class StatusManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
-
url;
|
|
7
|
-
constructor(url) {
|
|
8
|
-
super();
|
|
9
|
-
this.url = url;
|
|
10
|
-
}
|
|
11
|
-
find(details) {
|
|
12
|
-
return this.sendFinding(`${this.url}/status?status=${details.status}`, details.config);
|
|
13
|
-
}
|
|
14
|
-
findById(details) {
|
|
15
|
-
return this.sendFinding(`${this.url}/status?id=${details.id}`, details.config);
|
|
16
|
-
}
|
|
17
|
-
async count(details) {
|
|
18
|
-
let url = this.buildRequestUrl(`${this.url}/status`, details);
|
|
19
|
-
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
-
}
|
|
21
|
-
async findAll(details) {
|
|
22
|
-
let status = [];
|
|
23
|
-
let url = this.buildRequestUrl(`${this.url}/status`, details);
|
|
24
|
-
if (details.limit) {
|
|
25
|
-
status = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
-
do {
|
|
30
|
-
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
-
if (values)
|
|
32
|
-
status = status.concat(values);
|
|
33
|
-
isEmpty = values == undefined || values.length == 0;
|
|
34
|
-
offset += limit;
|
|
35
|
-
} while (!isEmpty);
|
|
36
|
-
}
|
|
37
|
-
return status;
|
|
38
|
-
}
|
|
39
|
-
buildRequestUrl(url, details) {
|
|
40
|
-
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.status ? `&status=${details.status}` : ""}`;
|
|
41
|
-
return `${url}?${suffix.substring(1)}`;
|
|
42
|
-
}
|
|
43
|
-
create(details) {
|
|
44
|
-
return this.sendCreation(`${this.url}/status`, { status: details.status, details: details.details }, details.config);
|
|
45
|
-
}
|
|
46
|
-
createMany(details) {
|
|
47
|
-
return this.sendCreationMany(`${this.url}/status`, details.values ?? [], details.config);
|
|
48
|
-
}
|
|
49
|
-
modify(status) {
|
|
50
|
-
return this.sendModification(`${this.url}/status/${status.statusId}`, { status: status.status, details: status.details }, status.config);
|
|
51
|
-
}
|
|
52
|
-
destroy(status) {
|
|
53
|
-
return this.sendDestruction(`${this.url}/status/${status.statusId}`, status.config);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.StatusManager = StatusManager;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusManager = void 0;
|
|
4
|
+
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
+
class StatusManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
+
url;
|
|
7
|
+
constructor(url) {
|
|
8
|
+
super();
|
|
9
|
+
this.url = url;
|
|
10
|
+
}
|
|
11
|
+
find(details) {
|
|
12
|
+
return this.sendFinding(`${this.url}/status?status=${details.status}`, details.config);
|
|
13
|
+
}
|
|
14
|
+
findById(details) {
|
|
15
|
+
return this.sendFinding(`${this.url}/status?id=${details.id}`, details.config);
|
|
16
|
+
}
|
|
17
|
+
async count(details) {
|
|
18
|
+
let url = this.buildRequestUrl(`${this.url}/status`, details);
|
|
19
|
+
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
+
}
|
|
21
|
+
async findAll(details) {
|
|
22
|
+
let status = [];
|
|
23
|
+
let url = this.buildRequestUrl(`${this.url}/status`, details);
|
|
24
|
+
if (details.limit) {
|
|
25
|
+
status = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
+
do {
|
|
30
|
+
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
+
if (values)
|
|
32
|
+
status = status.concat(values);
|
|
33
|
+
isEmpty = values == undefined || values.length == 0;
|
|
34
|
+
offset += limit;
|
|
35
|
+
} while (!isEmpty);
|
|
36
|
+
}
|
|
37
|
+
return status;
|
|
38
|
+
}
|
|
39
|
+
buildRequestUrl(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.status ? `&status=${details.status}` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
create(details) {
|
|
44
|
+
return this.sendCreation(`${this.url}/status`, { status: details.status, details: details.details }, details.config);
|
|
45
|
+
}
|
|
46
|
+
createMany(details) {
|
|
47
|
+
return this.sendCreationMany(`${this.url}/status`, details.values ?? [], details.config);
|
|
48
|
+
}
|
|
49
|
+
modify(status) {
|
|
50
|
+
return this.sendModification(`${this.url}/status/${status.statusId}`, { status: status.status, details: status.details }, status.config);
|
|
51
|
+
}
|
|
52
|
+
destroy(status) {
|
|
53
|
+
return this.sendDestruction(`${this.url}/status/${status.statusId}`, status.config);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.StatusManager = StatusManager;
|
|
57
57
|
//# sourceMappingURL=StatusManager.js.map
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from "axios";
|
|
2
|
-
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
3
|
-
export interface IType {
|
|
4
|
-
typeId?: number;
|
|
5
|
-
type?: string;
|
|
6
|
-
details?: Record<string, Record<string, string> | string>;
|
|
7
|
-
updatedAt?: string;
|
|
8
|
-
createdAt?: string;
|
|
9
|
-
config?: AxiosRequestConfig;
|
|
10
|
-
}
|
|
11
|
-
export interface ITypeSearchDetails {
|
|
12
|
-
id?: string | number;
|
|
13
|
-
type?: string;
|
|
14
|
-
details?: any;
|
|
15
|
-
values?: IType[];
|
|
16
|
-
limit?: number;
|
|
17
|
-
offset?: number;
|
|
18
|
-
config?: AxiosRequestConfig;
|
|
19
|
-
}
|
|
20
|
-
export declare class TypeManager extends CrudServiceManager<ITypeSearchDetails, IType> {
|
|
21
|
-
private readonly url;
|
|
22
|
-
constructor(url: string);
|
|
23
|
-
find(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
24
|
-
findById(details: StandardIdRequestDefinition): Promise<IType | undefined>;
|
|
25
|
-
count(details: ITypeSearchDetails): Promise<number>;
|
|
26
|
-
findAll(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
27
|
-
private buildRequestUrl;
|
|
28
|
-
create(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
29
|
-
createMany(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
30
|
-
modify(type: IType): Promise<IType | undefined>;
|
|
31
|
-
destroy(type: IType): Promise<void | number>;
|
|
32
|
-
}
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
3
|
+
export interface IType {
|
|
4
|
+
typeId?: number;
|
|
5
|
+
type?: string;
|
|
6
|
+
details?: Record<string, Record<string, string> | string>;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
config?: AxiosRequestConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface ITypeSearchDetails {
|
|
12
|
+
id?: string | number;
|
|
13
|
+
type?: string;
|
|
14
|
+
details?: any;
|
|
15
|
+
values?: IType[];
|
|
16
|
+
limit?: number;
|
|
17
|
+
offset?: number;
|
|
18
|
+
config?: AxiosRequestConfig;
|
|
19
|
+
}
|
|
20
|
+
export declare class TypeManager extends CrudServiceManager<ITypeSearchDetails, IType> {
|
|
21
|
+
private readonly url;
|
|
22
|
+
constructor(url: string);
|
|
23
|
+
find(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
24
|
+
findById(details: StandardIdRequestDefinition): Promise<IType | undefined>;
|
|
25
|
+
count(details: ITypeSearchDetails): Promise<number>;
|
|
26
|
+
findAll(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
27
|
+
private buildRequestUrl;
|
|
28
|
+
create(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
29
|
+
createMany(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
30
|
+
modify(type: IType): Promise<IType | undefined>;
|
|
31
|
+
destroy(type: IType): Promise<void | number>;
|
|
32
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeManager = void 0;
|
|
4
|
-
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
-
class TypeManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
-
url;
|
|
7
|
-
constructor(url) {
|
|
8
|
-
super();
|
|
9
|
-
this.url = url;
|
|
10
|
-
}
|
|
11
|
-
find(details) {
|
|
12
|
-
return this.sendFinding(`${this.url}/types?type=${details.type}`, details.config);
|
|
13
|
-
}
|
|
14
|
-
findById(details) {
|
|
15
|
-
return this.sendFinding(`${this.url}/types?id=${details.id}`, details.config);
|
|
16
|
-
}
|
|
17
|
-
async count(details) {
|
|
18
|
-
let url = this.buildRequestUrl(`${this.url}/types`, details);
|
|
19
|
-
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
-
}
|
|
21
|
-
async findAll(details) {
|
|
22
|
-
let types = [];
|
|
23
|
-
let url = this.buildRequestUrl(`${this.url}/types`, details);
|
|
24
|
-
if (details.limit) {
|
|
25
|
-
types = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
-
do {
|
|
30
|
-
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
-
if (values)
|
|
32
|
-
types = types.concat(values);
|
|
33
|
-
isEmpty = values == undefined || values.length == 0;
|
|
34
|
-
offset += limit;
|
|
35
|
-
} while (!isEmpty);
|
|
36
|
-
}
|
|
37
|
-
return types;
|
|
38
|
-
}
|
|
39
|
-
buildRequestUrl(url, details) {
|
|
40
|
-
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.type ? `&type=${details.type}` : ""}`;
|
|
41
|
-
return `${url}?${suffix.substring(1)}`;
|
|
42
|
-
}
|
|
43
|
-
create(details) {
|
|
44
|
-
return this.sendCreation(`${this.url}/types`, { type: details.type, details: details.details ?? {} }, details.config);
|
|
45
|
-
}
|
|
46
|
-
createMany(details) {
|
|
47
|
-
return this.sendCreationMany(`${this.url}/types`, details.values ?? [], details.config);
|
|
48
|
-
}
|
|
49
|
-
modify(type) {
|
|
50
|
-
return this.sendModification(`${this.url}/types/${type.typeId}`, { type: type.type, details: type.details ?? {} }, type.config);
|
|
51
|
-
}
|
|
52
|
-
destroy(type) {
|
|
53
|
-
return this.sendDestruction(`${this.url}/types/${type.typeId}`, type.config);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.TypeManager = TypeManager;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeManager = void 0;
|
|
4
|
+
const CrudServiceManager_1 = require("../CrudServiceManager");
|
|
5
|
+
class TypeManager extends CrudServiceManager_1.CrudServiceManager {
|
|
6
|
+
url;
|
|
7
|
+
constructor(url) {
|
|
8
|
+
super();
|
|
9
|
+
this.url = url;
|
|
10
|
+
}
|
|
11
|
+
find(details) {
|
|
12
|
+
return this.sendFinding(`${this.url}/types?type=${details.type}`, details.config);
|
|
13
|
+
}
|
|
14
|
+
findById(details) {
|
|
15
|
+
return this.sendFinding(`${this.url}/types?id=${details.id}`, details.config);
|
|
16
|
+
}
|
|
17
|
+
async count(details) {
|
|
18
|
+
let url = this.buildRequestUrl(`${this.url}/types`, details);
|
|
19
|
+
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
+
}
|
|
21
|
+
async findAll(details) {
|
|
22
|
+
let types = [];
|
|
23
|
+
let url = this.buildRequestUrl(`${this.url}/types`, details);
|
|
24
|
+
if (details.limit) {
|
|
25
|
+
types = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
+
do {
|
|
30
|
+
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
+
if (values)
|
|
32
|
+
types = types.concat(values);
|
|
33
|
+
isEmpty = values == undefined || values.length == 0;
|
|
34
|
+
offset += limit;
|
|
35
|
+
} while (!isEmpty);
|
|
36
|
+
}
|
|
37
|
+
return types;
|
|
38
|
+
}
|
|
39
|
+
buildRequestUrl(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.type ? `&type=${details.type}` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
create(details) {
|
|
44
|
+
return this.sendCreation(`${this.url}/types`, { type: details.type, details: details.details ?? {} }, details.config);
|
|
45
|
+
}
|
|
46
|
+
createMany(details) {
|
|
47
|
+
return this.sendCreationMany(`${this.url}/types`, details.values ?? [], details.config);
|
|
48
|
+
}
|
|
49
|
+
modify(type) {
|
|
50
|
+
return this.sendModification(`${this.url}/types/${type.typeId}`, { type: type.type, details: type.details ?? {} }, type.config);
|
|
51
|
+
}
|
|
52
|
+
destroy(type) {
|
|
53
|
+
return this.sendDestruction(`${this.url}/types/${type.typeId}`, type.config);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.TypeManager = TypeManager;
|
|
57
57
|
//# sourceMappingURL=TypeManager.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
2
|
-
import { AxiosRequestConfig } from "axios";
|
|
3
|
-
export interface IUserCredentials {
|
|
4
|
-
userCredentialId?: number;
|
|
5
|
-
userName?: string;
|
|
6
|
-
password?: string;
|
|
7
|
-
email?: string;
|
|
8
|
-
metadata?: Record<string, boolean>;
|
|
9
|
-
updatedAt?: string;
|
|
10
|
-
createdAt?: string;
|
|
11
|
-
config?: AxiosRequestConfig;
|
|
12
|
-
}
|
|
13
|
-
export interface IUserCredentialsSearchDetails {
|
|
14
|
-
id?: string | number;
|
|
15
|
-
userName?: string;
|
|
16
|
-
password?: string;
|
|
17
|
-
email?: string;
|
|
18
|
-
metadata?: any;
|
|
19
|
-
credentialsId?: number;
|
|
20
|
-
values?: IUserCredentials[];
|
|
21
|
-
limit?: number;
|
|
22
|
-
offset?: number;
|
|
23
|
-
config?: AxiosRequestConfig;
|
|
24
|
-
}
|
|
25
|
-
export declare class UserCredentialsManager extends CrudServiceManager<IUserCredentialsSearchDetails, IUserCredentials> {
|
|
26
|
-
private readonly url;
|
|
27
|
-
constructor(url: string);
|
|
28
|
-
find(details: IUserCredentialsSearchDetails): Promise<IUserCredentials | undefined>;
|
|
29
|
-
findById(details: StandardIdRequestDefinition): Promise<IUserCredentials | undefined>;
|
|
30
|
-
count(details: IUserCredentialsSearchDetails): Promise<number>;
|
|
31
|
-
findAll(details: IUserCredentialsSearchDetails): Promise<IUserCredentials[] | undefined>;
|
|
32
|
-
private buildRequestUrl;
|
|
33
|
-
create(details: IUserCredentialsSearchDetails): Promise<IUserCredentials | undefined>;
|
|
34
|
-
createMany(details: IUserCredentialsSearchDetails): Promise<IUserCredentials[] | undefined>;
|
|
35
|
-
modify(user: IUserCredentials): Promise<IUserCredentials | undefined>;
|
|
36
|
-
destroy(user: IUserCredentials): Promise<number | void>;
|
|
37
|
-
}
|
|
1
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "../CrudServiceManager";
|
|
2
|
+
import { AxiosRequestConfig } from "axios";
|
|
3
|
+
export interface IUserCredentials {
|
|
4
|
+
userCredentialId?: number;
|
|
5
|
+
userName?: string;
|
|
6
|
+
password?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
metadata?: Record<string, boolean>;
|
|
9
|
+
updatedAt?: string;
|
|
10
|
+
createdAt?: string;
|
|
11
|
+
config?: AxiosRequestConfig;
|
|
12
|
+
}
|
|
13
|
+
export interface IUserCredentialsSearchDetails {
|
|
14
|
+
id?: string | number;
|
|
15
|
+
userName?: string;
|
|
16
|
+
password?: string;
|
|
17
|
+
email?: string;
|
|
18
|
+
metadata?: any;
|
|
19
|
+
credentialsId?: number;
|
|
20
|
+
values?: IUserCredentials[];
|
|
21
|
+
limit?: number;
|
|
22
|
+
offset?: number;
|
|
23
|
+
config?: AxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class UserCredentialsManager extends CrudServiceManager<IUserCredentialsSearchDetails, IUserCredentials> {
|
|
26
|
+
private readonly url;
|
|
27
|
+
constructor(url: string);
|
|
28
|
+
find(details: IUserCredentialsSearchDetails): Promise<IUserCredentials | undefined>;
|
|
29
|
+
findById(details: StandardIdRequestDefinition): Promise<IUserCredentials | undefined>;
|
|
30
|
+
count(details: IUserCredentialsSearchDetails): Promise<number>;
|
|
31
|
+
findAll(details: IUserCredentialsSearchDetails): Promise<IUserCredentials[] | undefined>;
|
|
32
|
+
private buildRequestUrl;
|
|
33
|
+
create(details: IUserCredentialsSearchDetails): Promise<IUserCredentials | undefined>;
|
|
34
|
+
createMany(details: IUserCredentialsSearchDetails): Promise<IUserCredentials[] | undefined>;
|
|
35
|
+
modify(user: IUserCredentials): Promise<IUserCredentials | undefined>;
|
|
36
|
+
destroy(user: IUserCredentials): Promise<number | void>;
|
|
37
|
+
}
|