@ampsec/platform-client 25.1.0 → 25.2.0
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.
|
@@ -2,39 +2,42 @@ import { BaseDto, BaseUpsertDto, ExtKeyMap, Page } from '../dto';
|
|
|
2
2
|
import { TargetApi } from './constants';
|
|
3
3
|
import { AmpDataService, AmpDataServiceImpl } from './data.service';
|
|
4
4
|
import { RestClient } from './rest';
|
|
5
|
+
export type EntityCallOptions = {
|
|
6
|
+
params: unknown;
|
|
7
|
+
};
|
|
5
8
|
export interface AmpEntityService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
6
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
7
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
8
|
-
delete(_id: string): Promise<Page<ReadT>>;
|
|
9
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
10
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
11
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
9
12
|
}
|
|
10
13
|
export interface AmpSdkTenantService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
11
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
12
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
13
|
-
delete(_id: string,
|
|
14
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
15
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
16
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
14
17
|
}
|
|
15
18
|
export interface AmpGlobalEntityService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
16
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
17
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
18
|
-
delete(_id: string): Promise<Page<ReadT>>;
|
|
19
|
-
getLookupIds(_tid: string): Promise<ExtKeyMap>;
|
|
19
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
20
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
21
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
22
|
+
getLookupIds(_tid: string, _options?: EntityCallOptions): Promise<ExtKeyMap>;
|
|
20
23
|
}
|
|
21
24
|
export interface AmpSaaSEntityService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
22
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
23
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
24
|
-
delete(_id: string): Promise<Page<ReadT>>;
|
|
25
|
-
getLookupIds(_cid: string): Promise<ExtKeyMap>;
|
|
25
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
26
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
27
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
28
|
+
getLookupIds(_cid: string, _options?: EntityCallOptions): Promise<ExtKeyMap>;
|
|
26
29
|
}
|
|
27
30
|
export declare class AmpEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataServiceImpl<ReadT> implements AmpEntityService<WriteT, ReadT> {
|
|
28
31
|
constructor(rest: RestClient, kind: string, targetApi?: TargetApi);
|
|
29
|
-
create(model: WriteT): Promise<Page<ReadT>>;
|
|
30
|
-
update(model: WriteT): Promise<Page<ReadT>>;
|
|
31
|
-
delete(id: string,
|
|
32
|
+
create(model: WriteT, options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
33
|
+
update(model: WriteT, options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
34
|
+
delete(id: string, options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
32
35
|
}
|
|
33
36
|
export declare class AmpGlobalEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpEntityServiceImpl<WriteT, ReadT> implements AmpGlobalEntityService<WriteT, ReadT> {
|
|
34
37
|
constructor(rest: RestClient, kind: string, targetApi?: TargetApi);
|
|
35
|
-
getLookupIds(tid: string): Promise<ExtKeyMap>;
|
|
38
|
+
getLookupIds(tid: string, options?: EntityCallOptions): Promise<ExtKeyMap>;
|
|
36
39
|
}
|
|
37
40
|
export declare class AmpSaaSEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpEntityServiceImpl<WriteT, ReadT> implements AmpSaaSEntityService<WriteT, ReadT> {
|
|
38
41
|
constructor(rest: RestClient, kind: string, targetApi?: TargetApi);
|
|
39
|
-
getLookupIds(cid: string): Promise<ExtKeyMap>;
|
|
42
|
+
getLookupIds(cid: string, options?: EntityCallOptions): Promise<ExtKeyMap>;
|
|
40
43
|
}
|
|
@@ -7,27 +7,29 @@ class AmpEntityServiceImpl extends data_service_1.AmpDataServiceImpl {
|
|
|
7
7
|
constructor(rest, kind, targetApi = constants_1.TARGET_API_AGENT) {
|
|
8
8
|
super(rest, kind, targetApi);
|
|
9
9
|
}
|
|
10
|
-
create(model) {
|
|
10
|
+
create(model, options) {
|
|
11
11
|
return this.getPage({
|
|
12
12
|
url: `/${this.targetApi}/v1/${this.kind}`,
|
|
13
13
|
method: 'POST',
|
|
14
|
+
params: options === null || options === void 0 ? void 0 : options.params,
|
|
14
15
|
data: model,
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
|
-
update(model) {
|
|
18
|
+
update(model, options) {
|
|
18
19
|
return this.getPage({
|
|
19
20
|
url: `/${this.targetApi}/v1/${this.kind}/${model.id}`,
|
|
20
21
|
method: 'PUT',
|
|
22
|
+
params: options === null || options === void 0 ? void 0 : options.params,
|
|
21
23
|
data: model,
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
|
-
async delete(id,
|
|
26
|
+
async delete(id, options) {
|
|
25
27
|
const res = await this.getById(id);
|
|
26
28
|
if (res.data.length === 1) {
|
|
27
29
|
const req = {
|
|
28
30
|
url: `/${this.targetApi}/v1/${this.kind}/${id}`,
|
|
29
31
|
method: 'DELETE',
|
|
30
|
-
params:
|
|
32
|
+
params: options === null || options === void 0 ? void 0 : options.params,
|
|
31
33
|
};
|
|
32
34
|
const { error } = await this.call(req, (error) => {
|
|
33
35
|
if (error instanceof Error) {
|
|
@@ -53,11 +55,15 @@ class AmpGlobalEntityServiceImpl extends AmpEntityServiceImpl {
|
|
|
53
55
|
constructor(rest, kind, targetApi = constants_1.TARGET_API_AGENT) {
|
|
54
56
|
super(rest, kind, targetApi);
|
|
55
57
|
}
|
|
56
|
-
getLookupIds(tid) {
|
|
58
|
+
getLookupIds(tid, options) {
|
|
59
|
+
var _a;
|
|
57
60
|
const req = {
|
|
58
61
|
url: `/${this.targetApi}/v1/${this.kind}/ext_key_map`,
|
|
59
62
|
method: 'GET',
|
|
60
|
-
params: {
|
|
63
|
+
params: {
|
|
64
|
+
...((_a = options === null || options === void 0 ? void 0 : options.params) !== null && _a !== void 0 ? _a : {}),
|
|
65
|
+
tid,
|
|
66
|
+
},
|
|
61
67
|
};
|
|
62
68
|
return this.call(req, extIdMapErrorHandler);
|
|
63
69
|
}
|
|
@@ -67,11 +73,15 @@ class AmpSaaSEntityServiceImpl extends AmpEntityServiceImpl {
|
|
|
67
73
|
constructor(rest, kind, targetApi = constants_1.TARGET_API_AGENT) {
|
|
68
74
|
super(rest, kind, targetApi);
|
|
69
75
|
}
|
|
70
|
-
getLookupIds(cid) {
|
|
76
|
+
getLookupIds(cid, options) {
|
|
77
|
+
var _a;
|
|
71
78
|
const req = {
|
|
72
79
|
url: `/${this.targetApi}/v1/${this.kind}/ext_key_map`,
|
|
73
80
|
method: 'GET',
|
|
74
|
-
params: {
|
|
81
|
+
params: {
|
|
82
|
+
...((_a = options === null || options === void 0 ? void 0 : options.params) !== null && _a !== void 0 ? _a : {}),
|
|
83
|
+
cid,
|
|
84
|
+
},
|
|
75
85
|
};
|
|
76
86
|
return this.call(req, extIdMapErrorHandler);
|
|
77
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.service.js","sourceRoot":"","sources":["../../../src/services/entity.service.ts"],"names":[],"mappings":";;;AACA,2CAAsE;AACtE,iDAAkE;
|
|
1
|
+
{"version":3,"file":"entity.service.js","sourceRoot":"","sources":["../../../src/services/entity.service.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -2,28 +2,34 @@ import {BaseDto, BaseUpsertDto, ExtKeyMap, Page} from '../dto';
|
|
|
2
2
|
import {TargetApi, TARGET_API_AGENT, ErrorHandler} from './constants';
|
|
3
3
|
import {AmpDataService, AmpDataServiceImpl} from './data.service';
|
|
4
4
|
import {RestClient, RestRequest} from './rest';
|
|
5
|
+
import {QueryMap} from './rest/utils';
|
|
6
|
+
|
|
7
|
+
export type EntityCallOptions = {
|
|
8
|
+
params: unknown;
|
|
9
|
+
};
|
|
5
10
|
|
|
6
11
|
export interface AmpEntityService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
7
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
8
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
9
|
-
delete(_id: string): Promise<Page<ReadT>>;
|
|
12
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
13
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
14
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
10
15
|
}
|
|
16
|
+
|
|
11
17
|
export interface AmpSdkTenantService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
12
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
13
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
14
|
-
delete(_id: string,
|
|
18
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
19
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
20
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
15
21
|
}
|
|
16
22
|
export interface AmpGlobalEntityService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
17
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
18
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
19
|
-
delete(_id: string): Promise<Page<ReadT>>;
|
|
20
|
-
getLookupIds(_tid: string): Promise<ExtKeyMap>;
|
|
23
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
24
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
25
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
26
|
+
getLookupIds(_tid: string, _options?: EntityCallOptions): Promise<ExtKeyMap>;
|
|
21
27
|
}
|
|
22
28
|
export interface AmpSaaSEntityService<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataService<ReadT> {
|
|
23
|
-
create(_model: WriteT): Promise<Page<ReadT>>;
|
|
24
|
-
update(_model: WriteT): Promise<Page<ReadT>>;
|
|
25
|
-
delete(_id: string): Promise<Page<ReadT>>;
|
|
26
|
-
getLookupIds(_cid: string): Promise<ExtKeyMap>;
|
|
29
|
+
create(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
30
|
+
update(_model: WriteT, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
31
|
+
delete(_id: string, _options?: EntityCallOptions): Promise<Page<ReadT>>;
|
|
32
|
+
getLookupIds(_cid: string, _options?: EntityCallOptions): Promise<ExtKeyMap>;
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export class AmpEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT extends BaseDto> extends AmpDataServiceImpl<ReadT> implements AmpEntityService<WriteT, ReadT> {
|
|
@@ -31,29 +37,31 @@ export class AmpEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT extends Ba
|
|
|
31
37
|
super(rest, kind, targetApi);
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
create(model: WriteT): Promise<Page<ReadT>> {
|
|
40
|
+
create(model: WriteT, options?: EntityCallOptions): Promise<Page<ReadT>> {
|
|
35
41
|
return this.getPage({
|
|
36
42
|
url: `/${this.targetApi}/v1/${this.kind}`,
|
|
37
43
|
method: 'POST',
|
|
44
|
+
params: options?.params as QueryMap,
|
|
38
45
|
data: model,
|
|
39
46
|
});
|
|
40
47
|
}
|
|
41
48
|
|
|
42
|
-
update(model: WriteT): Promise<Page<ReadT>> {
|
|
49
|
+
update(model: WriteT, options?: EntityCallOptions): Promise<Page<ReadT>> {
|
|
43
50
|
return this.getPage({
|
|
44
51
|
url: `/${this.targetApi}/v1/${this.kind}/${model.id}`,
|
|
45
52
|
method: 'PUT',
|
|
53
|
+
params: options?.params as QueryMap,
|
|
46
54
|
data: model,
|
|
47
55
|
});
|
|
48
56
|
}
|
|
49
57
|
|
|
50
|
-
async delete(id: string,
|
|
58
|
+
async delete(id: string, options?: EntityCallOptions): Promise<Page<ReadT>> {
|
|
51
59
|
const res = await this.getById(id);
|
|
52
60
|
if (res.data.length === 1) {
|
|
53
61
|
const req: RestRequest = {
|
|
54
62
|
url: `/${this.targetApi}/v1/${this.kind}/${id}`,
|
|
55
63
|
method: 'DELETE',
|
|
56
|
-
params:
|
|
64
|
+
params: options?.params as QueryMap,
|
|
57
65
|
};
|
|
58
66
|
const {error} = await this.call(req, (error: unknown) => {
|
|
59
67
|
if (error instanceof Error) {
|
|
@@ -83,11 +91,14 @@ export class AmpGlobalEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT exte
|
|
|
83
91
|
constructor(rest: RestClient, kind: string, targetApi: TargetApi = TARGET_API_AGENT) {
|
|
84
92
|
super(rest, kind, targetApi);
|
|
85
93
|
}
|
|
86
|
-
getLookupIds(tid: string): Promise<ExtKeyMap> {
|
|
94
|
+
getLookupIds(tid: string, options?: EntityCallOptions): Promise<ExtKeyMap> {
|
|
87
95
|
const req: RestRequest = {
|
|
88
96
|
url: `/${this.targetApi}/v1/${this.kind}/ext_key_map`,
|
|
89
97
|
method: 'GET',
|
|
90
|
-
params: {
|
|
98
|
+
params: {
|
|
99
|
+
...((options?.params as QueryMap) ?? {}),
|
|
100
|
+
tid,
|
|
101
|
+
},
|
|
91
102
|
};
|
|
92
103
|
return this.call(req, extIdMapErrorHandler);
|
|
93
104
|
}
|
|
@@ -100,11 +111,14 @@ export class AmpSaaSEntityServiceImpl<WriteT extends BaseUpsertDto, ReadT extend
|
|
|
100
111
|
constructor(rest: RestClient, kind: string, targetApi: TargetApi = TARGET_API_AGENT) {
|
|
101
112
|
super(rest, kind, targetApi);
|
|
102
113
|
}
|
|
103
|
-
getLookupIds(cid: string): Promise<ExtKeyMap> {
|
|
114
|
+
getLookupIds(cid: string, options?: EntityCallOptions): Promise<ExtKeyMap> {
|
|
104
115
|
const req: RestRequest = {
|
|
105
116
|
url: `/${this.targetApi}/v1/${this.kind}/ext_key_map`,
|
|
106
117
|
method: 'GET',
|
|
107
|
-
params: {
|
|
118
|
+
params: {
|
|
119
|
+
...((options?.params as QueryMap) ?? {}),
|
|
120
|
+
cid,
|
|
121
|
+
},
|
|
108
122
|
};
|
|
109
123
|
return this.call(req, extIdMapErrorHandler);
|
|
110
124
|
}
|