@d19n/youfibre-odin-sdk 1.0.136-beta.9 → 1.0.136
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-sdk-v2/CallEventApi.d.ts +36 -0
- package/dist/api-sdk-v2/CallEventApi.js +125 -0
- package/dist/api-sdk-v2/CallLegApi.d.ts +36 -0
- package/dist/api-sdk-v2/CallLegApi.js +125 -0
- package/dist/api-sdk-v2/CallTransferApi.d.ts +36 -0
- package/dist/api-sdk-v2/CallTransferApi.js +125 -0
- package/dist/api-sdk-v2/CallUpdatesApi.d.ts +36 -0
- package/dist/api-sdk-v2/CallUpdatesApi.js +125 -0
- package/dist/db-sdk-v2/CallEventDb.d.ts +26 -0
- package/dist/db-sdk-v2/CallEventDb.js +108 -0
- package/dist/db-sdk-v2/CallLegDb.d.ts +26 -0
- package/dist/db-sdk-v2/CallLegDb.js +108 -0
- package/dist/db-sdk-v2/CallTransferDb.d.ts +26 -0
- package/dist/db-sdk-v2/CallTransferDb.js +108 -0
- package/dist/db-sdk-v2/CallUpdatesDb.d.ts +26 -0
- package/dist/db-sdk-v2/CallUpdatesDb.js +108 -0
- package/dist/entities-v2/Call.d.ts +31 -14
- package/dist/entities-v2/Call.js +21 -8
- package/dist/entities-v2/CallEvent.d.ts +41 -0
- package/dist/entities-v2/CallEvent.js +35 -0
- package/dist/entities-v2/CallLeg.d.ts +85 -0
- package/dist/entities-v2/CallLeg.js +65 -0
- package/dist/entities-v2/CallTransfer.d.ts +58 -0
- package/dist/entities-v2/CallTransfer.js +42 -0
- package/dist/entities-v2/CallUpdates.d.ts +17 -0
- package/dist/entities-v2/CallUpdates.js +18 -0
- package/dist/entities-v2/CollectionAmcoWorkOrder.d.ts +9 -1
- package/dist/entities-v2/CollectionAmcoWorkOrder.js +4 -0
- package/dist/entities-v2/CollectionWorkOrder.d.ts +9 -1
- package/dist/entities-v2/CollectionWorkOrder.js +4 -0
- package/dist/entities-v2/DispatchAmcoWorkOrder.d.ts +9 -1
- package/dist/entities-v2/DispatchAmcoWorkOrder.js +4 -0
- package/dist/entities-v2/FinanceWorkOrder.d.ts +9 -1
- package/dist/entities-v2/FinanceWorkOrder.js +4 -0
- package/dist/entities-v2/InspectionWorkOrder.d.ts +9 -1
- package/dist/entities-v2/InspectionWorkOrder.js +4 -0
- package/dist/entities-v2/InstallBusinessWorkOrder.d.ts +9 -1
- package/dist/entities-v2/InstallBusinessWorkOrder.js +4 -0
- package/dist/entities-v2/InstallServiceWorkOrder.d.ts +9 -1
- package/dist/entities-v2/InstallServiceWorkOrder.js +4 -0
- package/dist/entities-v2/InstallWorkOrder.d.ts +9 -1
- package/dist/entities-v2/InstallWorkOrder.js +4 -0
- package/dist/entities-v2/Invoice.d.ts +17 -17
- package/dist/entities-v2/Invoice.js +17 -17
- package/dist/entities-v2/NetworkAdjustmentWorkOrder.d.ts +9 -1
- package/dist/entities-v2/NetworkAdjustmentWorkOrder.js +4 -0
- package/dist/entities-v2/PlanningWorkOrder.d.ts +9 -1
- package/dist/entities-v2/PlanningWorkOrder.js +4 -0
- package/dist/entities-v2/PrePullWorkOrder.d.ts +9 -1
- package/dist/entities-v2/PrePullWorkOrder.js +4 -0
- package/dist/entities-v2/RemediationWorkOrder.d.ts +9 -1
- package/dist/entities-v2/RemediationWorkOrder.js +4 -0
- package/dist/entities-v2/ServiceWorkOrder.d.ts +9 -1
- package/dist/entities-v2/ServiceWorkOrder.js +4 -0
- package/dist/entities-v2/WayleaveWorkOrder.d.ts +9 -1
- package/dist/entities-v2/WayleaveWorkOrder.js +4 -0
- package/dist/entities-v2/WorkOrder.d.ts +9 -1
- package/dist/entities-v2/WorkOrder.js +4 -0
- package/dist/types-v1/Types.d.ts +4 -0
- package/dist/types-v1/Types.js +4 -0
- package/package.json +1 -1
- package/src/api-sdk-v2/CallEventApi.ts +133 -0
- package/src/api-sdk-v2/CallLegApi.ts +133 -0
- package/src/api-sdk-v2/CallTransferApi.ts +133 -0
- package/src/api-sdk-v2/CallUpdatesApi.ts +133 -0
- package/src/db-sdk-v2/CallEventDb.ts +119 -0
- package/src/db-sdk-v2/CallLegDb.ts +119 -0
- package/src/db-sdk-v2/CallTransferDb.ts +119 -0
- package/src/db-sdk-v2/CallUpdatesDb.ts +119 -0
- package/src/entities-v2/Call.ts +44 -22
- package/src/entities-v2/CallEvent.ts +69 -0
- package/src/entities-v2/CallLeg.ts +129 -0
- package/src/entities-v2/CallTransfer.ts +96 -0
- package/src/entities-v2/CallUpdates.ts +37 -0
- package/src/entities-v2/CollectionAmcoWorkOrder.ts +12 -0
- package/src/entities-v2/CollectionWorkOrder.ts +12 -0
- package/src/entities-v2/DispatchAmcoWorkOrder.ts +12 -0
- package/src/entities-v2/FinanceWorkOrder.ts +12 -0
- package/src/entities-v2/InspectionWorkOrder.ts +12 -0
- package/src/entities-v2/InstallBusinessWorkOrder.ts +12 -0
- package/src/entities-v2/InstallServiceWorkOrder.ts +12 -0
- package/src/entities-v2/InstallWorkOrder.ts +12 -0
- package/src/entities-v2/Invoice.ts +17 -17
- package/src/entities-v2/NetworkAdjustmentWorkOrder.ts +12 -0
- package/src/entities-v2/PlanningWorkOrder.ts +12 -0
- package/src/entities-v2/PrePullWorkOrder.ts +12 -0
- package/src/entities-v2/RemediationWorkOrder.ts +12 -0
- package/src/entities-v2/ServiceWorkOrder.ts +12 -0
- package/src/entities-v2/WayleaveWorkOrder.ts +12 -0
- package/src/entities-v2/WorkOrder.ts +12 -0
- package/src/types-v1/Types.ts +4 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
5
|
+
import { CallEventProperties } from '../entities-v2/CallEvent';
|
|
6
|
+
export declare class CallEventApi extends ApiProvider {
|
|
7
|
+
protected readonly authToken?: string;
|
|
8
|
+
private readonly moduleName;
|
|
9
|
+
private readonly entityName;
|
|
10
|
+
private sourceRecord;
|
|
11
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
12
|
+
setRecord(sourceRecord: any): void;
|
|
13
|
+
schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
|
|
14
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallEventProperties>>>;
|
|
15
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallEventProperties>>>;
|
|
16
|
+
reIndex(body: {
|
|
17
|
+
id: string;
|
|
18
|
+
schemaId: string;
|
|
19
|
+
}[]): Promise<any>;
|
|
20
|
+
get(callEventId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallEventProperties>>;
|
|
21
|
+
getMany(callEventIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallEventProperties>[]>;
|
|
22
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
23
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
24
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
25
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
26
|
+
delete(callEventId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse>;
|
|
27
|
+
deleteMany(callEventIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse[]>;
|
|
28
|
+
restore(callEventIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRestoreResponse[]>;
|
|
29
|
+
applyAction(dto: any): Promise<any[]>;
|
|
30
|
+
getVersions(): Promise<{
|
|
31
|
+
[key: string]: Record<string, any>;
|
|
32
|
+
}>;
|
|
33
|
+
getRevisionTimeline(): Promise<{
|
|
34
|
+
[key: string]: Record<string, any>[];
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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.CallEventApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
class CallEventApi extends api_provider_1.ApiProvider {
|
|
15
|
+
constructor(authParams, authToken) {
|
|
16
|
+
super(authParams, authToken);
|
|
17
|
+
this.authToken = authToken;
|
|
18
|
+
this.moduleName = 'NotificationModule';
|
|
19
|
+
this.entityName = 'CallEvent';
|
|
20
|
+
}
|
|
21
|
+
setRecord(sourceRecord) {
|
|
22
|
+
this.sourceRecord = sourceRecord;
|
|
23
|
+
}
|
|
24
|
+
schema() {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
30
|
+
search(params) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Use this function when you want paginating through the results to be handled
|
|
36
|
+
searchAndPaginate(params) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Use this function to re-index records in elastic search
|
|
42
|
+
reIndex(body) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return yield this._reIndexRecords(body);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// Use this function when you want to return a single record
|
|
48
|
+
get(callEventId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, callEventId);
|
|
51
|
+
this.setRecord(res);
|
|
52
|
+
return res;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want to return many records by primaryKeys
|
|
56
|
+
getMany(callEventIds) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, callEventIds);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function when you want to upsert one record
|
|
62
|
+
upsert(upsertDto) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
65
|
+
return res[0];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Use this function when you want to upsert many records
|
|
69
|
+
upsertMany(upsertDtos) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// Use this function when you want to update one record
|
|
75
|
+
update(updateDto) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
78
|
+
return res[0];
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// Use this function when you want to update many records
|
|
82
|
+
updateMany(updateDtos) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Use this function when you want to delete one record
|
|
88
|
+
delete(callEventId) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const res = yield this._delete(this.moduleName, this.entityName, [callEventId]);
|
|
91
|
+
return res[0];
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
// Use this function when you want to delete many records
|
|
95
|
+
deleteMany(callEventIds) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield this._delete(this.moduleName, this.entityName, callEventIds);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// Use this function when you want to restore one or many records
|
|
101
|
+
restore(callEventIds) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return yield this._restore(this.moduleName, this.entityName, callEventIds);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Use this function when you want to apply actions
|
|
107
|
+
applyAction(dto) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to return the versions for a single record
|
|
113
|
+
getVersions() {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to return the change history for a single record
|
|
119
|
+
getRevisionTimeline() {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.CallEventApi = CallEventApi;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
5
|
+
import { CallLegProperties } from '../entities-v2/CallLeg';
|
|
6
|
+
export declare class CallLegApi extends ApiProvider {
|
|
7
|
+
protected readonly authToken?: string;
|
|
8
|
+
private readonly moduleName;
|
|
9
|
+
private readonly entityName;
|
|
10
|
+
private sourceRecord;
|
|
11
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
12
|
+
setRecord(sourceRecord: any): void;
|
|
13
|
+
schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
|
|
14
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallLegProperties>>>;
|
|
15
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallLegProperties>>>;
|
|
16
|
+
reIndex(body: {
|
|
17
|
+
id: string;
|
|
18
|
+
schemaId: string;
|
|
19
|
+
}[]): Promise<any>;
|
|
20
|
+
get(callLegId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallLegProperties>>;
|
|
21
|
+
getMany(callLegIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallLegProperties>[]>;
|
|
22
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
23
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
24
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
25
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
26
|
+
delete(callLegId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse>;
|
|
27
|
+
deleteMany(callLegIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse[]>;
|
|
28
|
+
restore(callLegIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRestoreResponse[]>;
|
|
29
|
+
applyAction(dto: any): Promise<any[]>;
|
|
30
|
+
getVersions(): Promise<{
|
|
31
|
+
[key: string]: Record<string, any>;
|
|
32
|
+
}>;
|
|
33
|
+
getRevisionTimeline(): Promise<{
|
|
34
|
+
[key: string]: Record<string, any>[];
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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.CallLegApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
class CallLegApi extends api_provider_1.ApiProvider {
|
|
15
|
+
constructor(authParams, authToken) {
|
|
16
|
+
super(authParams, authToken);
|
|
17
|
+
this.authToken = authToken;
|
|
18
|
+
this.moduleName = 'NotificationModule';
|
|
19
|
+
this.entityName = 'CallLeg';
|
|
20
|
+
}
|
|
21
|
+
setRecord(sourceRecord) {
|
|
22
|
+
this.sourceRecord = sourceRecord;
|
|
23
|
+
}
|
|
24
|
+
schema() {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
30
|
+
search(params) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Use this function when you want paginating through the results to be handled
|
|
36
|
+
searchAndPaginate(params) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Use this function to re-index records in elastic search
|
|
42
|
+
reIndex(body) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return yield this._reIndexRecords(body);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// Use this function when you want to return a single record
|
|
48
|
+
get(callLegId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, callLegId);
|
|
51
|
+
this.setRecord(res);
|
|
52
|
+
return res;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want to return many records by primaryKeys
|
|
56
|
+
getMany(callLegIds) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, callLegIds);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function when you want to upsert one record
|
|
62
|
+
upsert(upsertDto) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
65
|
+
return res[0];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Use this function when you want to upsert many records
|
|
69
|
+
upsertMany(upsertDtos) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// Use this function when you want to update one record
|
|
75
|
+
update(updateDto) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
78
|
+
return res[0];
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// Use this function when you want to update many records
|
|
82
|
+
updateMany(updateDtos) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Use this function when you want to delete one record
|
|
88
|
+
delete(callLegId) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const res = yield this._delete(this.moduleName, this.entityName, [callLegId]);
|
|
91
|
+
return res[0];
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
// Use this function when you want to delete many records
|
|
95
|
+
deleteMany(callLegIds) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield this._delete(this.moduleName, this.entityName, callLegIds);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// Use this function when you want to restore one or many records
|
|
101
|
+
restore(callLegIds) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return yield this._restore(this.moduleName, this.entityName, callLegIds);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Use this function when you want to apply actions
|
|
107
|
+
applyAction(dto) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to return the versions for a single record
|
|
113
|
+
getVersions() {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to return the change history for a single record
|
|
119
|
+
getRevisionTimeline() {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.CallLegApi = CallLegApi;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
5
|
+
import { CallTransferProperties } from '../entities-v2/CallTransfer';
|
|
6
|
+
export declare class CallTransferApi extends ApiProvider {
|
|
7
|
+
protected readonly authToken?: string;
|
|
8
|
+
private readonly moduleName;
|
|
9
|
+
private readonly entityName;
|
|
10
|
+
private sourceRecord;
|
|
11
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
12
|
+
setRecord(sourceRecord: any): void;
|
|
13
|
+
schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
|
|
14
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallTransferProperties>>>;
|
|
15
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallTransferProperties>>>;
|
|
16
|
+
reIndex(body: {
|
|
17
|
+
id: string;
|
|
18
|
+
schemaId: string;
|
|
19
|
+
}[]): Promise<any>;
|
|
20
|
+
get(callTransferId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallTransferProperties>>;
|
|
21
|
+
getMany(callTransferIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallTransferProperties>[]>;
|
|
22
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
23
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
24
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
25
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
26
|
+
delete(callTransferId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse>;
|
|
27
|
+
deleteMany(callTransferIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse[]>;
|
|
28
|
+
restore(callTransferIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRestoreResponse[]>;
|
|
29
|
+
applyAction(dto: any): Promise<any[]>;
|
|
30
|
+
getVersions(): Promise<{
|
|
31
|
+
[key: string]: Record<string, any>;
|
|
32
|
+
}>;
|
|
33
|
+
getRevisionTimeline(): Promise<{
|
|
34
|
+
[key: string]: Record<string, any>[];
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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.CallTransferApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
class CallTransferApi extends api_provider_1.ApiProvider {
|
|
15
|
+
constructor(authParams, authToken) {
|
|
16
|
+
super(authParams, authToken);
|
|
17
|
+
this.authToken = authToken;
|
|
18
|
+
this.moduleName = 'NotificationModule';
|
|
19
|
+
this.entityName = 'CallTransfer';
|
|
20
|
+
}
|
|
21
|
+
setRecord(sourceRecord) {
|
|
22
|
+
this.sourceRecord = sourceRecord;
|
|
23
|
+
}
|
|
24
|
+
schema() {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
30
|
+
search(params) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Use this function when you want paginating through the results to be handled
|
|
36
|
+
searchAndPaginate(params) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Use this function to re-index records in elastic search
|
|
42
|
+
reIndex(body) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return yield this._reIndexRecords(body);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// Use this function when you want to return a single record
|
|
48
|
+
get(callTransferId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, callTransferId);
|
|
51
|
+
this.setRecord(res);
|
|
52
|
+
return res;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want to return many records by primaryKeys
|
|
56
|
+
getMany(callTransferIds) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, callTransferIds);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function when you want to upsert one record
|
|
62
|
+
upsert(upsertDto) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
65
|
+
return res[0];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Use this function when you want to upsert many records
|
|
69
|
+
upsertMany(upsertDtos) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// Use this function when you want to update one record
|
|
75
|
+
update(updateDto) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
78
|
+
return res[0];
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// Use this function when you want to update many records
|
|
82
|
+
updateMany(updateDtos) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Use this function when you want to delete one record
|
|
88
|
+
delete(callTransferId) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const res = yield this._delete(this.moduleName, this.entityName, [callTransferId]);
|
|
91
|
+
return res[0];
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
// Use this function when you want to delete many records
|
|
95
|
+
deleteMany(callTransferIds) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield this._delete(this.moduleName, this.entityName, callTransferIds);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// Use this function when you want to restore one or many records
|
|
101
|
+
restore(callTransferIds) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return yield this._restore(this.moduleName, this.entityName, callTransferIds);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Use this function when you want to apply actions
|
|
107
|
+
applyAction(dto) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to return the versions for a single record
|
|
113
|
+
getVersions() {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to return the change history for a single record
|
|
119
|
+
getRevisionTimeline() {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.CallTransferApi = CallTransferApi;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
|
|
2
|
+
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
|
+
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
5
|
+
import { CallUpdatesProperties } from '../entities-v2/CallUpdates';
|
|
6
|
+
export declare class CallUpdatesApi extends ApiProvider {
|
|
7
|
+
protected readonly authToken?: string;
|
|
8
|
+
private readonly moduleName;
|
|
9
|
+
private readonly entityName;
|
|
10
|
+
private sourceRecord;
|
|
11
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
12
|
+
setRecord(sourceRecord: any): void;
|
|
13
|
+
schema(): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinSchema>;
|
|
14
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallUpdatesProperties>>>;
|
|
15
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/api.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallUpdatesProperties>>>;
|
|
16
|
+
reIndex(body: {
|
|
17
|
+
id: string;
|
|
18
|
+
schemaId: string;
|
|
19
|
+
}[]): Promise<any>;
|
|
20
|
+
get(callUpdatesId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallUpdatesProperties>>;
|
|
21
|
+
getMany(callUpdatesIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRecord<CallUpdatesProperties>[]>;
|
|
22
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
23
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
24
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes>;
|
|
25
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
26
|
+
delete(callUpdatesId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse>;
|
|
27
|
+
deleteMany(callUpdatesIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinDeleteResponse[]>;
|
|
28
|
+
restore(callUpdatesIds: string[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinRestoreResponse[]>;
|
|
29
|
+
applyAction(dto: any): Promise<any[]>;
|
|
30
|
+
getVersions(): Promise<{
|
|
31
|
+
[key: string]: Record<string, any>;
|
|
32
|
+
}>;
|
|
33
|
+
getRevisionTimeline(): Promise<{
|
|
34
|
+
[key: string]: Record<string, any>[];
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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.CallUpdatesApi = void 0;
|
|
13
|
+
const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
|
|
14
|
+
class CallUpdatesApi extends api_provider_1.ApiProvider {
|
|
15
|
+
constructor(authParams, authToken) {
|
|
16
|
+
super(authParams, authToken);
|
|
17
|
+
this.authToken = authToken;
|
|
18
|
+
this.moduleName = 'NotificationModule';
|
|
19
|
+
this.entityName = 'CallUpdates';
|
|
20
|
+
}
|
|
21
|
+
setRecord(sourceRecord) {
|
|
22
|
+
this.sourceRecord = sourceRecord;
|
|
23
|
+
}
|
|
24
|
+
schema() {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
30
|
+
search(params) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Use this function when you want paginating through the results to be handled
|
|
36
|
+
searchAndPaginate(params) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Use this function to re-index records in elastic search
|
|
42
|
+
reIndex(body) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return yield this._reIndexRecords(body);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// Use this function when you want to return a single record
|
|
48
|
+
get(callUpdatesId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, callUpdatesId);
|
|
51
|
+
this.setRecord(res);
|
|
52
|
+
return res;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Use this function when you want to return many records by primaryKeys
|
|
56
|
+
getMany(callUpdatesIds) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, callUpdatesIds);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// Use this function when you want to upsert one record
|
|
62
|
+
upsert(upsertDto) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
65
|
+
return res[0];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Use this function when you want to upsert many records
|
|
69
|
+
upsertMany(upsertDtos) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
// Use this function when you want to update one record
|
|
75
|
+
update(updateDto) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
78
|
+
return res[0];
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// Use this function when you want to update many records
|
|
82
|
+
updateMany(updateDtos) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// Use this function when you want to delete one record
|
|
88
|
+
delete(callUpdatesId) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const res = yield this._delete(this.moduleName, this.entityName, [callUpdatesId]);
|
|
91
|
+
return res[0];
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
// Use this function when you want to delete many records
|
|
95
|
+
deleteMany(callUpdatesIds) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield this._delete(this.moduleName, this.entityName, callUpdatesIds);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// Use this function when you want to restore one or many records
|
|
101
|
+
restore(callUpdatesIds) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return yield this._restore(this.moduleName, this.entityName, callUpdatesIds);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Use this function when you want to apply actions
|
|
107
|
+
applyAction(dto) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to return the versions for a single record
|
|
113
|
+
getVersions() {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to return the change history for a single record
|
|
119
|
+
getRevisionTimeline() {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.CallUpdatesApi = CallUpdatesApi;
|