@d19n/youfibre-odin-sdk 2.0.351 → 2.0.352
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/README.md +3 -1
- package/dist/api-sdk-v2/AiTagItemApi.d.ts +48 -0
- package/dist/api-sdk-v2/AiTagItemApi.js +155 -0
- package/dist/api-sdk-v2/AiTagSetApi.d.ts +48 -0
- package/dist/api-sdk-v2/AiTagSetApi.js +155 -0
- package/dist/api-sdk-v2/FileApi.d.ts +132 -132
- package/dist/api-sdk-v2/FileApi.js +268 -268
- package/dist/db-sdk-v2/AiTagItemDb.d.ts +120 -0
- package/dist/db-sdk-v2/AiTagItemDb.js +204 -0
- package/dist/db-sdk-v2/AiTagSetDb.d.ts +120 -0
- package/dist/db-sdk-v2/AiTagSetDb.js +204 -0
- package/dist/db-sdk-v2/FileDb.d.ts +132 -132
- package/dist/db-sdk-v2/FileDb.js +268 -268
- package/dist/entities-v2/AiTagItem.d.ts +195 -0
- package/dist/entities-v2/AiTagItem.js +118 -0
- package/dist/entities-v2/AiTagSet.d.ts +151 -0
- package/dist/entities-v2/AiTagSet.js +110 -0
- package/dist/entities-v2/ChangeReason.d.ts +2 -1
- package/dist/entities-v2/ChangeReason.js +2 -1
- package/dist/entities-v2/File.d.ts +0 -6
- package/dist/entities-v2/File.js +1 -5
- package/dist/entities-v2/VoiceConfiguration.d.ts +130 -130
- package/dist/entities-v2/VoiceConfiguration.js +46 -46
- package/dist/records-v2/FileRecord.d.ts +833 -12
- package/dist/records-v2/FileRecord.js +1386 -32
- package/dist/wholesale-provider/kci-effect-bridge.js +8 -2
- package/dist/wholesale-provider/test/kci-effect-bridge.spec.js +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ await workOrder.completeWorkOrder({ ... });
|
|
|
124
124
|
|
|
125
125
|
## Entities
|
|
126
126
|
|
|
127
|
-
This SDK includes **
|
|
127
|
+
This SDK includes **202** entities across **13** modules.
|
|
128
128
|
|
|
129
129
|
### CrmModule
|
|
130
130
|
|
|
@@ -206,6 +206,8 @@ This SDK includes **200** entities across **13** modules.
|
|
|
206
206
|
| **AgentStatus** | AgentStatus Entity Definition | DEFAULT |
|
|
207
207
|
| **AgentStatusHistory** | AgentStatusHistory Entity Definition | DEFAULT |
|
|
208
208
|
| **AiRouteRequest** | AiRouteRequest Entity Definition | DEFAULT |
|
|
209
|
+
| **AiTagItem** | AiTagItem Entity Definition | DEFAULT |
|
|
210
|
+
| **AiTagSet** | AiTagSet Entity Definition | DEFAULT |
|
|
209
211
|
| **Case** | Case Entity Definition | OUTAGE |
|
|
210
212
|
| **CaseAction** | CaseAction Entity Definition | DEFAULT |
|
|
211
213
|
| **CaseQueueListView** | CaseQueueListView Entity Definition | DEFAULT |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
4
|
+
import { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
|
|
5
|
+
import { AiTagItemProperties } from '../entities-v2/AiTagItem';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new AiTagItemApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.aitagitem.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class AiTagItemApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _aitagset?;
|
|
21
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
22
|
+
get aitagset(): ApiRecordLinkManager;
|
|
23
|
+
setRecord(sourceRecord: any): void;
|
|
24
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
25
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AiTagItemProperties>>>;
|
|
26
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AiTagItemProperties>>>;
|
|
27
|
+
reIndex(body: {
|
|
28
|
+
id: string;
|
|
29
|
+
schemaId: string;
|
|
30
|
+
}[]): Promise<any>;
|
|
31
|
+
get(aiTagItemId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiTagItemProperties>>;
|
|
32
|
+
getMany(aiTagItemIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiTagItemProperties>[]>;
|
|
33
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
34
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
35
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
36
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
37
|
+
delete(aiTagItemId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
38
|
+
deleteMany(aiTagItemIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
39
|
+
restore(aiTagItemIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
40
|
+
applyAction(dto: any): Promise<any[]>;
|
|
41
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
42
|
+
getVersions(): Promise<{
|
|
43
|
+
[key: string]: Record<string, any>;
|
|
44
|
+
}>;
|
|
45
|
+
getRevisionTimeline(): Promise<{
|
|
46
|
+
[key: string]: Record<string, any>[];
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AiTagItemApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
const api_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/api.record.link.manager");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use OdinApiClient.
|
|
17
|
+
*
|
|
18
|
+
* Migration:
|
|
19
|
+
* - Old: new AiTagItemApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.aitagitem.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class AiTagItemApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'AiTagItem';
|
|
30
|
+
// Link managers are lazy-loaded on first access
|
|
31
|
+
}
|
|
32
|
+
// ============================================
|
|
33
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
34
|
+
// ============================================
|
|
35
|
+
// Usage remains identical: api.address.list(recordId)
|
|
36
|
+
get aitagset() {
|
|
37
|
+
if (!this._aitagset) {
|
|
38
|
+
this._aitagset = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:AiTagItem', 'SupportModule:AiTagSet', 'AiTagSet__AiTagItem');
|
|
39
|
+
}
|
|
40
|
+
return this._aitagset;
|
|
41
|
+
}
|
|
42
|
+
// ============================================
|
|
43
|
+
// STANDARD METHODS (Unchanged API)
|
|
44
|
+
// ============================================
|
|
45
|
+
setRecord(sourceRecord) {
|
|
46
|
+
this.sourceRecord = sourceRecord;
|
|
47
|
+
}
|
|
48
|
+
schema() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
54
|
+
search(params) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// Use this function when you want paginating through the results to be handled
|
|
60
|
+
searchAndPaginate(params) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Use this function to re-index records in elastic search
|
|
66
|
+
reIndex(body) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return yield this._reIndexRecords(body);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Use this function when you want to return a single record
|
|
72
|
+
get(aiTagItemId) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, aiTagItemId);
|
|
75
|
+
if (res)
|
|
76
|
+
this.setRecord(res);
|
|
77
|
+
return res;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
// Use this function when you want to return many records by primaryKeys
|
|
81
|
+
getMany(aiTagItemIds) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, aiTagItemIds);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
// Use this function when you want to upsert one record
|
|
87
|
+
upsert(upsertDto) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
90
|
+
return res[0];
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Use this function when you want to upsert many records
|
|
94
|
+
upsertMany(upsertDtos) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// Use this function when you want to update one record
|
|
100
|
+
update(updateDto) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
103
|
+
return res[0];
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Use this function when you want to update many records
|
|
107
|
+
updateMany(updateDtos) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to delete one record
|
|
113
|
+
delete(aiTagItemId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._delete(this.moduleName, this.entityName, [aiTagItemId]);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete many records
|
|
119
|
+
deleteMany(aiTagItemIds) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, aiTagItemIds);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to restore one or many records
|
|
125
|
+
restore(aiTagItemIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._restore(this.moduleName, this.entityName, aiTagItemIds);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Use this function when you want to apply a single action
|
|
131
|
+
applyAction(dto) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Use this function when you want to bulk apply actions
|
|
137
|
+
bulkApplyActions(dtos) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Use this function when you want to return the versions for a single record
|
|
143
|
+
getVersions() {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Use this function when you want to return the change history for a single record
|
|
149
|
+
getRevisionTimeline() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.AiTagItemApi = AiTagItemApi;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
4
|
+
import { ApiRecordLinkManager } from '@d19n/odin-sdk-generator/dist/api.record.link.manager';
|
|
5
|
+
import { AiTagSetProperties } from '../entities-v2/AiTagSet';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new AiTagSetApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.aitagset.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class AiTagSetApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _aitagitem?;
|
|
21
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
22
|
+
get aitagitem(): ApiRecordLinkManager;
|
|
23
|
+
setRecord(sourceRecord: any): void;
|
|
24
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
25
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AiTagSetProperties>>>;
|
|
26
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AiTagSetProperties>>>;
|
|
27
|
+
reIndex(body: {
|
|
28
|
+
id: string;
|
|
29
|
+
schemaId: string;
|
|
30
|
+
}[]): Promise<any>;
|
|
31
|
+
get(aiTagSetId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiTagSetProperties>>;
|
|
32
|
+
getMany(aiTagSetIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<AiTagSetProperties>[]>;
|
|
33
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
34
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
35
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
36
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
37
|
+
delete(aiTagSetId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
38
|
+
deleteMany(aiTagSetIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
39
|
+
restore(aiTagSetIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
40
|
+
applyAction(dto: any): Promise<any[]>;
|
|
41
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
42
|
+
getVersions(): Promise<{
|
|
43
|
+
[key: string]: Record<string, any>;
|
|
44
|
+
}>;
|
|
45
|
+
getRevisionTimeline(): Promise<{
|
|
46
|
+
[key: string]: Record<string, any>[];
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AiTagSetApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
const api_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/api.record.link.manager");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use OdinApiClient.
|
|
17
|
+
*
|
|
18
|
+
* Migration:
|
|
19
|
+
* - Old: new AiTagSetApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.aitagset.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class AiTagSetApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'AiTagSet';
|
|
30
|
+
// Link managers are lazy-loaded on first access
|
|
31
|
+
}
|
|
32
|
+
// ============================================
|
|
33
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
34
|
+
// ============================================
|
|
35
|
+
// Usage remains identical: api.address.list(recordId)
|
|
36
|
+
get aitagitem() {
|
|
37
|
+
if (!this._aitagitem) {
|
|
38
|
+
this._aitagitem = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:AiTagSet', 'SupportModule:AiTagItem', 'AiTagSet__AiTagItem');
|
|
39
|
+
}
|
|
40
|
+
return this._aitagitem;
|
|
41
|
+
}
|
|
42
|
+
// ============================================
|
|
43
|
+
// STANDARD METHODS (Unchanged API)
|
|
44
|
+
// ============================================
|
|
45
|
+
setRecord(sourceRecord) {
|
|
46
|
+
this.sourceRecord = sourceRecord;
|
|
47
|
+
}
|
|
48
|
+
schema() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
54
|
+
search(params) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// Use this function when you want paginating through the results to be handled
|
|
60
|
+
searchAndPaginate(params) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Use this function to re-index records in elastic search
|
|
66
|
+
reIndex(body) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return yield this._reIndexRecords(body);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Use this function when you want to return a single record
|
|
72
|
+
get(aiTagSetId) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, aiTagSetId);
|
|
75
|
+
if (res)
|
|
76
|
+
this.setRecord(res);
|
|
77
|
+
return res;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
// Use this function when you want to return many records by primaryKeys
|
|
81
|
+
getMany(aiTagSetIds) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, aiTagSetIds);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
// Use this function when you want to upsert one record
|
|
87
|
+
upsert(upsertDto) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
90
|
+
return res[0];
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Use this function when you want to upsert many records
|
|
94
|
+
upsertMany(upsertDtos) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// Use this function when you want to update one record
|
|
100
|
+
update(updateDto) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
103
|
+
return res[0];
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Use this function when you want to update many records
|
|
107
|
+
updateMany(updateDtos) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to delete one record
|
|
113
|
+
delete(aiTagSetId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._delete(this.moduleName, this.entityName, [aiTagSetId]);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete many records
|
|
119
|
+
deleteMany(aiTagSetIds) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, aiTagSetIds);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to restore one or many records
|
|
125
|
+
restore(aiTagSetIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._restore(this.moduleName, this.entityName, aiTagSetIds);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Use this function when you want to apply a single action
|
|
131
|
+
applyAction(dto) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Use this function when you want to bulk apply actions
|
|
137
|
+
bulkApplyActions(dtos) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Use this function when you want to return the versions for a single record
|
|
143
|
+
getVersions() {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Use this function when you want to return the change history for a single record
|
|
149
|
+
getRevisionTimeline() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.AiTagSetApi = AiTagSetApi;
|