@d19n/youfibre-odin-sdk 2.0.345 → 2.0.346
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/AccountApi.d.ts +4 -0
- package/dist/api-sdk-v2/AccountApi.js +12 -0
- package/dist/api-sdk-v2/CaseApi.d.ts +2 -0
- package/dist/api-sdk-v2/CaseApi.js +6 -0
- package/dist/api-sdk-v2/ContactApi.d.ts +2 -0
- package/dist/api-sdk-v2/ContactApi.js +6 -0
- package/dist/api-sdk-v2/FrustrationEventApi.d.ts +50 -0
- package/dist/api-sdk-v2/FrustrationEventApi.js +161 -0
- package/dist/api-sdk-v2/FrustrationScoreApi.d.ts +54 -0
- package/dist/api-sdk-v2/FrustrationScoreApi.js +173 -0
- package/dist/db-sdk-v2/AccountDb.d.ts +4 -0
- package/dist/db-sdk-v2/AccountDb.js +12 -0
- package/dist/db-sdk-v2/CaseDb.d.ts +2 -0
- package/dist/db-sdk-v2/CaseDb.js +6 -0
- package/dist/db-sdk-v2/ContactDb.d.ts +2 -0
- package/dist/db-sdk-v2/ContactDb.js +6 -0
- package/dist/db-sdk-v2/FrustrationEventDb.d.ts +122 -0
- package/dist/db-sdk-v2/FrustrationEventDb.js +210 -0
- package/dist/db-sdk-v2/FrustrationScoreDb.d.ts +126 -0
- package/dist/db-sdk-v2/FrustrationScoreDb.js +222 -0
- package/dist/entities-v2/Account.d.ts +6 -0
- package/dist/entities-v2/Case.d.ts +58 -4
- package/dist/entities-v2/Case.js +31 -5
- package/dist/entities-v2/Contact.d.ts +3 -0
- package/dist/entities-v2/Conversation.d.ts +6 -0
- package/dist/entities-v2/Conversation.js +6 -0
- package/dist/entities-v2/FrustrationEvent.d.ts +222 -0
- package/dist/entities-v2/FrustrationEvent.js +160 -0
- package/dist/entities-v2/FrustrationScore.d.ts +171 -0
- package/dist/entities-v2/FrustrationScore.js +123 -0
- package/dist/records-v2/FileRecord.d.ts +12 -813
- package/dist/records-v2/FileRecord.js +31 -1352
- 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 **199** entities across **13** modules.
|
|
128
128
|
|
|
129
129
|
### CrmModule
|
|
130
130
|
|
|
@@ -210,6 +210,8 @@ This SDK includes **197** entities across **13** modules.
|
|
|
210
210
|
| **CaseAction** | CaseAction Entity Definition | DEFAULT |
|
|
211
211
|
| **CaseQueueListView** | CaseQueueListView Entity Definition | DEFAULT |
|
|
212
212
|
| **CoachingSession** | CoachingSession Entity Definition | DEFAULT |
|
|
213
|
+
| **FrustrationEvent** | FrustrationEvent Entity Definition | DEFAULT |
|
|
214
|
+
| **FrustrationScore** | FrustrationScore Entity Definition | DEFAULT |
|
|
213
215
|
| **KnowledgeArticle** | KnowledgeArticle Entity Definition | RELEASE_NOTE, USER_GUIDE |
|
|
214
216
|
| **LinearIssue** | LinearIssue Entity Definition | DEFAULT |
|
|
215
217
|
| **Note** | Note Entity Definition | DEFAULT |
|
|
@@ -31,6 +31,8 @@ export declare class AccountApi extends ApiProvider {
|
|
|
31
31
|
private _mobileconfiguration?;
|
|
32
32
|
private _file?;
|
|
33
33
|
private _dataissue?;
|
|
34
|
+
private _frustrationscore?;
|
|
35
|
+
private _frustrationevent?;
|
|
34
36
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
35
37
|
get note(): ApiRecordLinkManager;
|
|
36
38
|
get organization(): ApiRecordLinkManager;
|
|
@@ -46,6 +48,8 @@ export declare class AccountApi extends ApiProvider {
|
|
|
46
48
|
get mobileconfiguration(): ApiRecordLinkManager;
|
|
47
49
|
get file(): ApiRecordLinkManager;
|
|
48
50
|
get dataissue(): ApiRecordLinkManager;
|
|
51
|
+
get frustrationscore(): ApiRecordLinkManager;
|
|
52
|
+
get frustrationevent(): ApiRecordLinkManager;
|
|
49
53
|
setRecord(sourceRecord: any): void;
|
|
50
54
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
51
55
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<AccountProperties>>>;
|
|
@@ -117,6 +117,18 @@ class AccountApi extends api_provider_1.ApiProvider {
|
|
|
117
117
|
}
|
|
118
118
|
return this._dataissue;
|
|
119
119
|
}
|
|
120
|
+
get frustrationscore() {
|
|
121
|
+
if (!this._frustrationscore) {
|
|
122
|
+
this._frustrationscore = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'CrmModule:Account', 'SupportModule:FrustrationScore', 'FrustrationScore__Account');
|
|
123
|
+
}
|
|
124
|
+
return this._frustrationscore;
|
|
125
|
+
}
|
|
126
|
+
get frustrationevent() {
|
|
127
|
+
if (!this._frustrationevent) {
|
|
128
|
+
this._frustrationevent = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'CrmModule:Account', 'SupportModule:FrustrationEvent', 'FrustrationEvent__Account');
|
|
129
|
+
}
|
|
130
|
+
return this._frustrationevent;
|
|
131
|
+
}
|
|
120
132
|
// ============================================
|
|
121
133
|
// STANDARD METHODS (Unchanged API)
|
|
122
134
|
// ============================================
|
|
@@ -48,6 +48,7 @@ export declare class CaseApi extends ApiProvider {
|
|
|
48
48
|
private _qareport?;
|
|
49
49
|
private _qaevaluation?;
|
|
50
50
|
private _coachingsession?;
|
|
51
|
+
private _frustrationscore?;
|
|
51
52
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
52
53
|
get activitylog(): ApiRecordLinkManager;
|
|
53
54
|
get caseaction(): ApiRecordLinkManager;
|
|
@@ -80,6 +81,7 @@ export declare class CaseApi extends ApiProvider {
|
|
|
80
81
|
get qareport(): ApiRecordLinkManager;
|
|
81
82
|
get qaevaluation(): ApiRecordLinkManager;
|
|
82
83
|
get coachingsession(): ApiRecordLinkManager;
|
|
84
|
+
get frustrationscore(): ApiRecordLinkManager;
|
|
83
85
|
setRecord(sourceRecord: any): void;
|
|
84
86
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
85
87
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<CaseProperties>>>;
|
|
@@ -219,6 +219,12 @@ class CaseApi extends api_provider_1.ApiProvider {
|
|
|
219
219
|
}
|
|
220
220
|
return this._coachingsession;
|
|
221
221
|
}
|
|
222
|
+
get frustrationscore() {
|
|
223
|
+
if (!this._frustrationscore) {
|
|
224
|
+
this._frustrationscore = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:Case', 'SupportModule:FrustrationScore', 'FrustrationScore__Case');
|
|
225
|
+
}
|
|
226
|
+
return this._frustrationscore;
|
|
227
|
+
}
|
|
222
228
|
// ============================================
|
|
223
229
|
// STANDARD METHODS (Unchanged API)
|
|
224
230
|
// ============================================
|
|
@@ -53,6 +53,7 @@ export declare class ContactApi extends ApiProvider {
|
|
|
53
53
|
private _order?;
|
|
54
54
|
private _npssurvey?;
|
|
55
55
|
private _contractbuyout?;
|
|
56
|
+
private _frustrationscore?;
|
|
56
57
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
57
58
|
get note(): ApiRecordLinkManager;
|
|
58
59
|
get lead(): ApiRecordLinkManager;
|
|
@@ -90,6 +91,7 @@ export declare class ContactApi extends ApiProvider {
|
|
|
90
91
|
get order(): ApiRecordLinkManager;
|
|
91
92
|
get npssurvey(): ApiRecordLinkManager;
|
|
92
93
|
get contractbuyout(): ApiRecordLinkManager;
|
|
94
|
+
get frustrationscore(): ApiRecordLinkManager;
|
|
93
95
|
setRecord(sourceRecord: any): void;
|
|
94
96
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
95
97
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<ContactProperties>>>;
|
|
@@ -249,6 +249,12 @@ class ContactApi extends api_provider_1.ApiProvider {
|
|
|
249
249
|
}
|
|
250
250
|
return this._contractbuyout;
|
|
251
251
|
}
|
|
252
|
+
get frustrationscore() {
|
|
253
|
+
if (!this._frustrationscore) {
|
|
254
|
+
this._frustrationscore = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'CrmModule:Contact', 'SupportModule:FrustrationScore', 'FrustrationScore__Contact');
|
|
255
|
+
}
|
|
256
|
+
return this._frustrationscore;
|
|
257
|
+
}
|
|
252
258
|
// ============================================
|
|
253
259
|
// STANDARD METHODS (Unchanged API)
|
|
254
260
|
// ============================================
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { FrustrationEventProperties } from '../entities-v2/FrustrationEvent';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new FrustrationEventApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.frustrationevent.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class FrustrationEventApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _account?;
|
|
21
|
+
private _frustrationscore?;
|
|
22
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
23
|
+
get account(): ApiRecordLinkManager;
|
|
24
|
+
get frustrationscore(): ApiRecordLinkManager;
|
|
25
|
+
setRecord(sourceRecord: any): void;
|
|
26
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
27
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationEventProperties>>>;
|
|
28
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationEventProperties>>>;
|
|
29
|
+
reIndex(body: {
|
|
30
|
+
id: string;
|
|
31
|
+
schemaId: string;
|
|
32
|
+
}[]): Promise<any>;
|
|
33
|
+
get(frustrationEventId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationEventProperties>>;
|
|
34
|
+
getMany(frustrationEventIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationEventProperties>[]>;
|
|
35
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
36
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
37
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
38
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
39
|
+
delete(frustrationEventId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
40
|
+
deleteMany(frustrationEventIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
41
|
+
restore(frustrationEventIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
42
|
+
applyAction(dto: any): Promise<any[]>;
|
|
43
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
44
|
+
getVersions(): Promise<{
|
|
45
|
+
[key: string]: Record<string, any>;
|
|
46
|
+
}>;
|
|
47
|
+
getRevisionTimeline(): Promise<{
|
|
48
|
+
[key: string]: Record<string, any>[];
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
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.FrustrationEventApi = 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 FrustrationEventApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.frustrationevent.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class FrustrationEventApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'FrustrationEvent';
|
|
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 account() {
|
|
37
|
+
if (!this._account) {
|
|
38
|
+
this._account = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:FrustrationEvent', 'CrmModule:Account', 'FrustrationEvent__Account');
|
|
39
|
+
}
|
|
40
|
+
return this._account;
|
|
41
|
+
}
|
|
42
|
+
get frustrationscore() {
|
|
43
|
+
if (!this._frustrationscore) {
|
|
44
|
+
this._frustrationscore = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:FrustrationEvent', 'SupportModule:FrustrationScore', 'FrustrationEvent__FrustrationScore');
|
|
45
|
+
}
|
|
46
|
+
return this._frustrationscore;
|
|
47
|
+
}
|
|
48
|
+
// ============================================
|
|
49
|
+
// STANDARD METHODS (Unchanged API)
|
|
50
|
+
// ============================================
|
|
51
|
+
setRecord(sourceRecord) {
|
|
52
|
+
this.sourceRecord = sourceRecord;
|
|
53
|
+
}
|
|
54
|
+
schema() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
60
|
+
search(params) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// Use this function when you want paginating through the results to be handled
|
|
66
|
+
searchAndPaginate(params) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Use this function to re-index records in elastic search
|
|
72
|
+
reIndex(body) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return yield this._reIndexRecords(body);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// Use this function when you want to return a single record
|
|
78
|
+
get(frustrationEventId) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, frustrationEventId);
|
|
81
|
+
if (res)
|
|
82
|
+
this.setRecord(res);
|
|
83
|
+
return res;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
// Use this function when you want to return many records by primaryKeys
|
|
87
|
+
getMany(frustrationEventIds) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, frustrationEventIds);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// Use this function when you want to upsert one record
|
|
93
|
+
upsert(upsertDto) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
96
|
+
return res[0];
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// Use this function when you want to upsert many records
|
|
100
|
+
upsertMany(upsertDtos) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// Use this function when you want to update one record
|
|
106
|
+
update(updateDto) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
109
|
+
return res[0];
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Use this function when you want to update many records
|
|
113
|
+
updateMany(updateDtos) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete one record
|
|
119
|
+
delete(frustrationEventId) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, [frustrationEventId]);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to delete many records
|
|
125
|
+
deleteMany(frustrationEventIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._delete(this.moduleName, this.entityName, frustrationEventIds);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Use this function when you want to restore one or many records
|
|
131
|
+
restore(frustrationEventIds) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return yield this._restore(this.moduleName, this.entityName, frustrationEventIds);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Use this function when you want to apply a single action
|
|
137
|
+
applyAction(dto) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Use this function when you want to bulk apply actions
|
|
143
|
+
bulkApplyActions(dtos) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Use this function when you want to return the versions for a single record
|
|
149
|
+
getVersions() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// Use this function when you want to return the change history for a single record
|
|
155
|
+
getRevisionTimeline() {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.FrustrationEventApi = FrustrationEventApi;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { FrustrationScoreProperties } from '../entities-v2/FrustrationScore';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new FrustrationScoreApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.frustrationscore.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class FrustrationScoreApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _account?;
|
|
21
|
+
private _contact?;
|
|
22
|
+
private _case?;
|
|
23
|
+
private _frustrationevent?;
|
|
24
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
25
|
+
get account(): ApiRecordLinkManager;
|
|
26
|
+
get contact(): ApiRecordLinkManager;
|
|
27
|
+
get case(): ApiRecordLinkManager;
|
|
28
|
+
get frustrationevent(): ApiRecordLinkManager;
|
|
29
|
+
setRecord(sourceRecord: any): void;
|
|
30
|
+
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
31
|
+
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationScoreProperties>>>;
|
|
32
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationScoreProperties>>>;
|
|
33
|
+
reIndex(body: {
|
|
34
|
+
id: string;
|
|
35
|
+
schemaId: string;
|
|
36
|
+
}[]): Promise<any>;
|
|
37
|
+
get(frustrationScoreId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationScoreProperties>>;
|
|
38
|
+
getMany(frustrationScoreIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<FrustrationScoreProperties>[]>;
|
|
39
|
+
upsert(upsertDto: OdinRecordCreateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
40
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
41
|
+
update(updateDto: OdinRecordUpdateDto): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes>;
|
|
42
|
+
updateMany(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").IDbRecordCreateUpdateRes[]>;
|
|
43
|
+
delete(frustrationScoreId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
44
|
+
deleteMany(frustrationScoreIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
45
|
+
restore(frustrationScoreIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinRestoreResponse[]>;
|
|
46
|
+
applyAction(dto: any): Promise<any[]>;
|
|
47
|
+
bulkApplyActions(dtos: any[]): Promise<any[]>;
|
|
48
|
+
getVersions(): Promise<{
|
|
49
|
+
[key: string]: Record<string, any>;
|
|
50
|
+
}>;
|
|
51
|
+
getRevisionTimeline(): Promise<{
|
|
52
|
+
[key: string]: Record<string, any>[];
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
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.FrustrationScoreApi = 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 FrustrationScoreApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.frustrationscore.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class FrustrationScoreApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'FrustrationScore';
|
|
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 account() {
|
|
37
|
+
if (!this._account) {
|
|
38
|
+
this._account = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:FrustrationScore', 'CrmModule:Account', 'FrustrationScore__Account');
|
|
39
|
+
}
|
|
40
|
+
return this._account;
|
|
41
|
+
}
|
|
42
|
+
get contact() {
|
|
43
|
+
if (!this._contact) {
|
|
44
|
+
this._contact = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:FrustrationScore', 'CrmModule:Contact', 'FrustrationScore__Contact');
|
|
45
|
+
}
|
|
46
|
+
return this._contact;
|
|
47
|
+
}
|
|
48
|
+
get case() {
|
|
49
|
+
if (!this._case) {
|
|
50
|
+
this._case = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:FrustrationScore', 'SupportModule:Case', 'FrustrationScore__Case');
|
|
51
|
+
}
|
|
52
|
+
return this._case;
|
|
53
|
+
}
|
|
54
|
+
get frustrationevent() {
|
|
55
|
+
if (!this._frustrationevent) {
|
|
56
|
+
this._frustrationevent = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:FrustrationScore', 'SupportModule:FrustrationEvent', 'FrustrationEvent__FrustrationScore');
|
|
57
|
+
}
|
|
58
|
+
return this._frustrationevent;
|
|
59
|
+
}
|
|
60
|
+
// ============================================
|
|
61
|
+
// STANDARD METHODS (Unchanged API)
|
|
62
|
+
// ============================================
|
|
63
|
+
setRecord(sourceRecord) {
|
|
64
|
+
this.sourceRecord = sourceRecord;
|
|
65
|
+
}
|
|
66
|
+
schema() {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return yield this.getSchema(this.moduleName, this.entityName);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Use this function when you want to search and handle all pagination on your own
|
|
72
|
+
search(params) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// Use this function when you want paginating through the results to be handled
|
|
78
|
+
searchAndPaginate(params) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Use this function to re-index records in elastic search
|
|
84
|
+
reIndex(body) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
return yield this._reIndexRecords(body);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// Use this function when you want to return a single record
|
|
90
|
+
get(frustrationScoreId) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, frustrationScoreId);
|
|
93
|
+
if (res)
|
|
94
|
+
this.setRecord(res);
|
|
95
|
+
return res;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
// Use this function when you want to return many records by primaryKeys
|
|
99
|
+
getMany(frustrationScoreIds) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, frustrationScoreIds);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
// Use this function when you want to upsert one record
|
|
105
|
+
upsert(upsertDto) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto]);
|
|
108
|
+
return res[0];
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
// Use this function when you want to upsert many records
|
|
112
|
+
upsertMany(upsertDtos) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
// Use this function when you want to update one record
|
|
118
|
+
update(updateDto) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto]);
|
|
121
|
+
return res[0];
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to update many records
|
|
125
|
+
updateMany(updateDtos) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// Use this function when you want to delete one record
|
|
131
|
+
delete(frustrationScoreId) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return yield this._delete(this.moduleName, this.entityName, [frustrationScoreId]);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
// Use this function when you want to delete many records
|
|
137
|
+
deleteMany(frustrationScoreIds) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
return yield this._delete(this.moduleName, this.entityName, frustrationScoreIds);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Use this function when you want to restore one or many records
|
|
143
|
+
restore(frustrationScoreIds) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return yield this._restore(this.moduleName, this.entityName, frustrationScoreIds);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Use this function when you want to apply a single action
|
|
149
|
+
applyAction(dto) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// Use this function when you want to bulk apply actions
|
|
155
|
+
bulkApplyActions(dtos) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return yield this._bulkApplyActions(this.moduleName, this.entityName, dtos);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
// Use this function when you want to return the versions for a single record
|
|
161
|
+
getVersions() {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
// Use this function when you want to return the change history for a single record
|
|
167
|
+
getRevisionTimeline() {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.FrustrationScoreApi = FrustrationScoreApi;
|
|
@@ -35,6 +35,8 @@ export declare class AccountDb extends DbProvider {
|
|
|
35
35
|
private _mobileconfiguration?;
|
|
36
36
|
private _file?;
|
|
37
37
|
private _dataissue?;
|
|
38
|
+
private _frustrationscore?;
|
|
39
|
+
private _frustrationevent?;
|
|
38
40
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
39
41
|
get note(): DbRecordLinkManager;
|
|
40
42
|
get organization(): DbRecordLinkManager;
|
|
@@ -50,6 +52,8 @@ export declare class AccountDb extends DbProvider {
|
|
|
50
52
|
get mobileconfiguration(): DbRecordLinkManager;
|
|
51
53
|
get file(): DbRecordLinkManager;
|
|
52
54
|
get dataissue(): DbRecordLinkManager;
|
|
55
|
+
get frustrationscore(): DbRecordLinkManager;
|
|
56
|
+
get frustrationevent(): DbRecordLinkManager;
|
|
53
57
|
setRecord(sourceRecord: any): void;
|
|
54
58
|
/**
|
|
55
59
|
* Search records with manual pagination control
|
|
@@ -122,6 +122,18 @@ class AccountDb extends db_provider_1.DbProvider {
|
|
|
122
122
|
}
|
|
123
123
|
return this._dataissue;
|
|
124
124
|
}
|
|
125
|
+
get frustrationscore() {
|
|
126
|
+
if (!this._frustrationscore) {
|
|
127
|
+
this._frustrationscore = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:Account', 'SupportModule:FrustrationScore', 'FrustrationScore__Account');
|
|
128
|
+
}
|
|
129
|
+
return this._frustrationscore;
|
|
130
|
+
}
|
|
131
|
+
get frustrationevent() {
|
|
132
|
+
if (!this._frustrationevent) {
|
|
133
|
+
this._frustrationevent = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:Account', 'SupportModule:FrustrationEvent', 'FrustrationEvent__Account');
|
|
134
|
+
}
|
|
135
|
+
return this._frustrationevent;
|
|
136
|
+
}
|
|
125
137
|
// ============================================
|
|
126
138
|
// STANDARD METHODS
|
|
127
139
|
// ============================================
|
|
@@ -52,6 +52,7 @@ export declare class CaseDb extends DbProvider {
|
|
|
52
52
|
private _qareport?;
|
|
53
53
|
private _qaevaluation?;
|
|
54
54
|
private _coachingsession?;
|
|
55
|
+
private _frustrationscore?;
|
|
55
56
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
56
57
|
get activitylog(): DbRecordLinkManager;
|
|
57
58
|
get caseaction(): DbRecordLinkManager;
|
|
@@ -84,6 +85,7 @@ export declare class CaseDb extends DbProvider {
|
|
|
84
85
|
get qareport(): DbRecordLinkManager;
|
|
85
86
|
get qaevaluation(): DbRecordLinkManager;
|
|
86
87
|
get coachingsession(): DbRecordLinkManager;
|
|
88
|
+
get frustrationscore(): DbRecordLinkManager;
|
|
87
89
|
setRecord(sourceRecord: any): void;
|
|
88
90
|
/**
|
|
89
91
|
* Search records with manual pagination control
|
package/dist/db-sdk-v2/CaseDb.js
CHANGED
|
@@ -224,6 +224,12 @@ class CaseDb extends db_provider_1.DbProvider {
|
|
|
224
224
|
}
|
|
225
225
|
return this._coachingsession;
|
|
226
226
|
}
|
|
227
|
+
get frustrationscore() {
|
|
228
|
+
if (!this._frustrationscore) {
|
|
229
|
+
this._frustrationscore = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:Case', 'SupportModule:FrustrationScore', 'FrustrationScore__Case');
|
|
230
|
+
}
|
|
231
|
+
return this._frustrationscore;
|
|
232
|
+
}
|
|
227
233
|
// ============================================
|
|
228
234
|
// STANDARD METHODS
|
|
229
235
|
// ============================================
|
|
@@ -57,6 +57,7 @@ export declare class ContactDb extends DbProvider {
|
|
|
57
57
|
private _order?;
|
|
58
58
|
private _npssurvey?;
|
|
59
59
|
private _contractbuyout?;
|
|
60
|
+
private _frustrationscore?;
|
|
60
61
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
61
62
|
get note(): DbRecordLinkManager;
|
|
62
63
|
get lead(): DbRecordLinkManager;
|
|
@@ -94,6 +95,7 @@ export declare class ContactDb extends DbProvider {
|
|
|
94
95
|
get order(): DbRecordLinkManager;
|
|
95
96
|
get npssurvey(): DbRecordLinkManager;
|
|
96
97
|
get contractbuyout(): DbRecordLinkManager;
|
|
98
|
+
get frustrationscore(): DbRecordLinkManager;
|
|
97
99
|
setRecord(sourceRecord: any): void;
|
|
98
100
|
/**
|
|
99
101
|
* Search records with manual pagination control
|
|
@@ -254,6 +254,12 @@ class ContactDb extends db_provider_1.DbProvider {
|
|
|
254
254
|
}
|
|
255
255
|
return this._contractbuyout;
|
|
256
256
|
}
|
|
257
|
+
get frustrationscore() {
|
|
258
|
+
if (!this._frustrationscore) {
|
|
259
|
+
this._frustrationscore = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'CrmModule:Contact', 'SupportModule:FrustrationScore', 'FrustrationScore__Contact');
|
|
260
|
+
}
|
|
261
|
+
return this._frustrationscore;
|
|
262
|
+
}
|
|
257
263
|
// ============================================
|
|
258
264
|
// STANDARD METHODS
|
|
259
265
|
// ============================================
|