@d19n/youfibre-odin-sdk 2.0.310 → 2.0.312
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 +2 -1
- package/dist/actions-v2/MovePgReportEventToFailedDto.d.ts +0 -7
- package/dist/actions-v2/MovePgReportEventToFailedDto.js +0 -7
- package/dist/actions-v2/MovePgReportEventToSucceededDto.d.ts +0 -7
- package/dist/actions-v2/MovePgReportEventToSucceededDto.js +0 -7
- package/dist/api-sdk-v2/CaseApi.d.ts +2 -0
- package/dist/api-sdk-v2/CaseApi.js +6 -0
- package/dist/api-sdk-v2/QaReportApi.d.ts +48 -0
- package/dist/api-sdk-v2/QaReportApi.js +155 -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/QaReportDb.d.ts +120 -0
- package/dist/db-sdk-v2/QaReportDb.js +204 -0
- package/dist/entities-v2/Case.d.ts +7 -0
- package/dist/entities-v2/Case.js +5 -1
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +2 -2
- package/dist/entities-v2/QaReport.d.ts +153 -0
- package/dist/entities-v2/QaReport.js +100 -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 **182** entities across **12** modules.
|
|
128
128
|
|
|
129
129
|
### CrmModule
|
|
130
130
|
|
|
@@ -214,6 +214,7 @@ This SDK includes **181** entities across **12** modules.
|
|
|
214
214
|
| **OutboundDialCampaign** | OutboundDialCampaign Entity Definition | DEFAULT |
|
|
215
215
|
| **OutboundDialCampaignCase** | OutboundDialCampaignCase Entity Definition | DEFAULT |
|
|
216
216
|
| **OutboundDialSession** | OutboundDialSession Entity Definition | DEFAULT |
|
|
217
|
+
| **QaReport** | QaReport Entity Definition | DEFAULT |
|
|
217
218
|
| **Queue** | Queue Entity Definition | DEFAULT |
|
|
218
219
|
| **QueueChange** | QueueChange Entity Definition | DEFAULT |
|
|
219
220
|
| **SupportTask** | SupportTask Entity Definition | DEFAULT |
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MovePgReportEventToFailed Action DTO
|
|
3
3
|
*
|
|
4
|
-
* Move Report Event to Failed
|
|
5
|
-
*
|
|
6
4
|
* @module BillingModule
|
|
7
5
|
* @entity PgReportEvent
|
|
8
|
-
* @entityType DEFAULT
|
|
9
6
|
* @actionKey MovePgReportEventToFailed
|
|
10
7
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed
|
|
11
8
|
*
|
|
@@ -65,12 +62,9 @@ export interface MovePgReportEventToFailedProperties {
|
|
|
65
62
|
/**
|
|
66
63
|
* MovePgReportEventToFailed
|
|
67
64
|
*
|
|
68
|
-
* Move Report Event to Failed
|
|
69
|
-
*
|
|
70
65
|
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
71
66
|
* @module BillingModule
|
|
72
67
|
* @entity PgReportEvent
|
|
73
|
-
* @entityType DEFAULT (Default)
|
|
74
68
|
* @targetStages EventStatusStageFailed
|
|
75
69
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed
|
|
76
70
|
* @permission schema.action.movepgreporteventtofailed.trigger
|
|
@@ -82,7 +76,6 @@ export declare class MovePgReportEventToFailedDto extends OdinRecordUpdateDto<Re
|
|
|
82
76
|
static readonly ACTION_KEY = "MovePgReportEventToFailed";
|
|
83
77
|
static readonly MODULE_NAME = "BillingModule";
|
|
84
78
|
static readonly ENTITIES: string[];
|
|
85
|
-
static readonly ENTITY_TYPE = "DEFAULT";
|
|
86
79
|
static readonly EVENT_NAME = "k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed";
|
|
87
80
|
static readonly SCHEMA_ACTION_ID = "5bc28550-0b44-414a-96e2-2cb775aaf9bd";
|
|
88
81
|
static readonly PERMISSION = "schema.action.movepgreporteventtofailed.trigger";
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* MovePgReportEventToFailed Action DTO
|
|
4
4
|
*
|
|
5
|
-
* Move Report Event to Failed
|
|
6
|
-
*
|
|
7
5
|
* @module BillingModule
|
|
8
6
|
* @entity PgReportEvent
|
|
9
|
-
* @entityType DEFAULT
|
|
10
7
|
* @actionKey MovePgReportEventToFailed
|
|
11
8
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed
|
|
12
9
|
*
|
|
@@ -24,12 +21,9 @@ exports.MovePgReportEventToFailedSteps = {
|
|
|
24
21
|
/**
|
|
25
22
|
* MovePgReportEventToFailed
|
|
26
23
|
*
|
|
27
|
-
* Move Report Event to Failed
|
|
28
|
-
*
|
|
29
24
|
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
30
25
|
* @module BillingModule
|
|
31
26
|
* @entity PgReportEvent
|
|
32
|
-
* @entityType DEFAULT (Default)
|
|
33
27
|
* @targetStages EventStatusStageFailed
|
|
34
28
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed
|
|
35
29
|
* @permission schema.action.movepgreporteventtofailed.trigger
|
|
@@ -56,7 +50,6 @@ MovePgReportEventToFailedDto.ACTION_TYPE = 'UPDATE';
|
|
|
56
50
|
MovePgReportEventToFailedDto.ACTION_KEY = 'MovePgReportEventToFailed';
|
|
57
51
|
MovePgReportEventToFailedDto.MODULE_NAME = 'BillingModule';
|
|
58
52
|
MovePgReportEventToFailedDto.ENTITIES = ['PgReportEvent'];
|
|
59
|
-
MovePgReportEventToFailedDto.ENTITY_TYPE = 'DEFAULT';
|
|
60
53
|
MovePgReportEventToFailedDto.EVENT_NAME = 'k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToFailed';
|
|
61
54
|
MovePgReportEventToFailedDto.SCHEMA_ACTION_ID = '5bc28550-0b44-414a-96e2-2cb775aaf9bd';
|
|
62
55
|
MovePgReportEventToFailedDto.PERMISSION = 'schema.action.movepgreporteventtofailed.trigger';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MovePgReportEventToSucceeded Action DTO
|
|
3
3
|
*
|
|
4
|
-
* Move Report Event to Succeeded
|
|
5
|
-
*
|
|
6
4
|
* @module BillingModule
|
|
7
5
|
* @entity PgReportEvent
|
|
8
|
-
* @entityType DEFAULT
|
|
9
6
|
* @actionKey MovePgReportEventToSucceeded
|
|
10
7
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded
|
|
11
8
|
*
|
|
@@ -65,12 +62,9 @@ export interface MovePgReportEventToSucceededProperties {
|
|
|
65
62
|
/**
|
|
66
63
|
* MovePgReportEventToSucceeded
|
|
67
64
|
*
|
|
68
|
-
* Move Report Event to Succeeded
|
|
69
|
-
*
|
|
70
65
|
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
71
66
|
* @module BillingModule
|
|
72
67
|
* @entity PgReportEvent
|
|
73
|
-
* @entityType DEFAULT (Default)
|
|
74
68
|
* @targetStages EventStatusStageSucceeded
|
|
75
69
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded
|
|
76
70
|
* @permission schema.action.movepgreporteventtosucceeded.trigger
|
|
@@ -82,7 +76,6 @@ export declare class MovePgReportEventToSucceededDto extends OdinRecordUpdateDto
|
|
|
82
76
|
static readonly ACTION_KEY = "MovePgReportEventToSucceeded";
|
|
83
77
|
static readonly MODULE_NAME = "BillingModule";
|
|
84
78
|
static readonly ENTITIES: string[];
|
|
85
|
-
static readonly ENTITY_TYPE = "DEFAULT";
|
|
86
79
|
static readonly EVENT_NAME = "k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded";
|
|
87
80
|
static readonly SCHEMA_ACTION_ID = "03af6b90-5f75-41e3-a7f3-ecdbe706d72d";
|
|
88
81
|
static readonly PERMISSION = "schema.action.movepgreporteventtosucceeded.trigger";
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* MovePgReportEventToSucceeded Action DTO
|
|
4
4
|
*
|
|
5
|
-
* Move Report Event to Succeeded
|
|
6
|
-
*
|
|
7
5
|
* @module BillingModule
|
|
8
6
|
* @entity PgReportEvent
|
|
9
|
-
* @entityType DEFAULT
|
|
10
7
|
* @actionKey MovePgReportEventToSucceeded
|
|
11
8
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded
|
|
12
9
|
*
|
|
@@ -24,12 +21,9 @@ exports.MovePgReportEventToSucceededSteps = {
|
|
|
24
21
|
/**
|
|
25
22
|
* MovePgReportEventToSucceeded
|
|
26
23
|
*
|
|
27
|
-
* Move Report Event to Succeeded
|
|
28
|
-
*
|
|
29
24
|
* @actionType STAGE_TRANSITION - Transitions record to new pipeline stage
|
|
30
25
|
* @module BillingModule
|
|
31
26
|
* @entity PgReportEvent
|
|
32
|
-
* @entityType DEFAULT (Default)
|
|
33
27
|
* @targetStages EventStatusStageSucceeded
|
|
34
28
|
* @event k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded
|
|
35
29
|
* @permission schema.action.movepgreporteventtosucceeded.trigger
|
|
@@ -56,7 +50,6 @@ MovePgReportEventToSucceededDto.ACTION_TYPE = 'UPDATE';
|
|
|
56
50
|
MovePgReportEventToSucceededDto.ACTION_KEY = 'MovePgReportEventToSucceeded';
|
|
57
51
|
MovePgReportEventToSucceededDto.MODULE_NAME = 'BillingModule';
|
|
58
52
|
MovePgReportEventToSucceededDto.ENTITIES = ['PgReportEvent'];
|
|
59
|
-
MovePgReportEventToSucceededDto.ENTITY_TYPE = 'DEFAULT';
|
|
60
53
|
MovePgReportEventToSucceededDto.EVENT_NAME = 'k1.t-hEOJjsDb.BillingModule.PgReportEvent.Transition.MovePgReportEventToSucceeded';
|
|
61
54
|
MovePgReportEventToSucceededDto.SCHEMA_ACTION_ID = '03af6b90-5f75-41e3-a7f3-ecdbe706d72d';
|
|
62
55
|
MovePgReportEventToSucceededDto.PERMISSION = 'schema.action.movepgreporteventtosucceeded.trigger';
|
|
@@ -45,6 +45,7 @@ export declare class CaseApi extends ApiProvider {
|
|
|
45
45
|
private _outbounddialcampaigncase?;
|
|
46
46
|
private _outbounddialsession?;
|
|
47
47
|
private _call?;
|
|
48
|
+
private _qareport?;
|
|
48
49
|
constructor(authParams?: OauthParams, authToken?: string);
|
|
49
50
|
get activitylog(): ApiRecordLinkManager;
|
|
50
51
|
get caseaction(): ApiRecordLinkManager;
|
|
@@ -74,6 +75,7 @@ export declare class CaseApi extends ApiProvider {
|
|
|
74
75
|
get outbounddialcampaigncase(): ApiRecordLinkManager;
|
|
75
76
|
get outbounddialsession(): ApiRecordLinkManager;
|
|
76
77
|
get call(): ApiRecordLinkManager;
|
|
78
|
+
get qareport(): ApiRecordLinkManager;
|
|
77
79
|
setRecord(sourceRecord: any): void;
|
|
78
80
|
schema(): Promise<import("@d19n/odin-types/dist/core").OdinSchema>;
|
|
79
81
|
search(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<CaseProperties>>>;
|
|
@@ -201,6 +201,12 @@ class CaseApi extends api_provider_1.ApiProvider {
|
|
|
201
201
|
}
|
|
202
202
|
return this._call;
|
|
203
203
|
}
|
|
204
|
+
get qareport() {
|
|
205
|
+
if (!this._qareport) {
|
|
206
|
+
this._qareport = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:Case', 'SupportModule:QaReport', 'Case__QaReport');
|
|
207
|
+
}
|
|
208
|
+
return this._qareport;
|
|
209
|
+
}
|
|
204
210
|
// ============================================
|
|
205
211
|
// STANDARD METHODS (Unchanged API)
|
|
206
212
|
// ============================================
|
|
@@ -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 { QaReportProperties } from '../entities-v2/QaReport';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use OdinApiClient.
|
|
8
|
+
*
|
|
9
|
+
* Migration:
|
|
10
|
+
* - Old: new QaReportApi(authParams).get(id)
|
|
11
|
+
* - New: new odin.qareport.get(id)
|
|
12
|
+
*
|
|
13
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
14
|
+
*/
|
|
15
|
+
export declare class QaReportApi extends ApiProvider {
|
|
16
|
+
protected readonly authToken?: string;
|
|
17
|
+
private readonly moduleName;
|
|
18
|
+
private readonly entityName;
|
|
19
|
+
private sourceRecord;
|
|
20
|
+
private _case?;
|
|
21
|
+
constructor(authParams?: OauthParams, authToken?: string);
|
|
22
|
+
get case(): 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<QaReportProperties>>>;
|
|
26
|
+
searchAndPaginate(params: Partial<OdinSearchV2>): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>>>;
|
|
27
|
+
reIndex(body: {
|
|
28
|
+
id: string;
|
|
29
|
+
schemaId: string;
|
|
30
|
+
}[]): Promise<any>;
|
|
31
|
+
get(qaReportId: string): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>>;
|
|
32
|
+
getMany(qaReportIds: string[]): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>[]>;
|
|
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(qaReportId: string): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
38
|
+
deleteMany(qaReportIds: string[]): Promise<import("@d19n/odin-sdk-generator/dist/odin-sdk-types").OdinDeleteResponse[]>;
|
|
39
|
+
restore(qaReportIds: 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.QaReportApi = 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 QaReportApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.qareport.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinApiClient returns typed record wrappers with action methods.
|
|
23
|
+
*/
|
|
24
|
+
class QaReportApi extends api_provider_1.ApiProvider {
|
|
25
|
+
constructor(authParams, authToken) {
|
|
26
|
+
super(authParams, authToken);
|
|
27
|
+
this.authToken = authToken;
|
|
28
|
+
this.moduleName = 'SupportModule';
|
|
29
|
+
this.entityName = 'QaReport';
|
|
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 case() {
|
|
37
|
+
if (!this._case) {
|
|
38
|
+
this._case = new api_record_link_manager_1.ApiRecordLinkManager(this.authParams, 'SupportModule:QaReport', 'SupportModule:Case', 'Case__QaReport');
|
|
39
|
+
}
|
|
40
|
+
return this._case;
|
|
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(qaReportId) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaReportId);
|
|
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(qaReportIds) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaReportIds);
|
|
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(qaReportId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._delete(this.moduleName, this.entityName, [qaReportId]);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Use this function when you want to delete many records
|
|
119
|
+
deleteMany(qaReportIds) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
return yield this._delete(this.moduleName, this.entityName, qaReportIds);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// Use this function when you want to restore one or many records
|
|
125
|
+
restore(qaReportIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
return yield this._restore(this.moduleName, this.entityName, qaReportIds);
|
|
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.QaReportApi = QaReportApi;
|
|
@@ -49,6 +49,7 @@ export declare class CaseDb extends DbProvider {
|
|
|
49
49
|
private _outbounddialcampaigncase?;
|
|
50
50
|
private _outbounddialsession?;
|
|
51
51
|
private _call?;
|
|
52
|
+
private _qareport?;
|
|
52
53
|
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
53
54
|
get activitylog(): DbRecordLinkManager;
|
|
54
55
|
get caseaction(): DbRecordLinkManager;
|
|
@@ -78,6 +79,7 @@ export declare class CaseDb extends DbProvider {
|
|
|
78
79
|
get outbounddialcampaigncase(): DbRecordLinkManager;
|
|
79
80
|
get outbounddialsession(): DbRecordLinkManager;
|
|
80
81
|
get call(): DbRecordLinkManager;
|
|
82
|
+
get qareport(): DbRecordLinkManager;
|
|
81
83
|
setRecord(sourceRecord: any): void;
|
|
82
84
|
/**
|
|
83
85
|
* Search records with manual pagination control
|
package/dist/db-sdk-v2/CaseDb.js
CHANGED
|
@@ -206,6 +206,12 @@ class CaseDb extends db_provider_1.DbProvider {
|
|
|
206
206
|
}
|
|
207
207
|
return this._call;
|
|
208
208
|
}
|
|
209
|
+
get qareport() {
|
|
210
|
+
if (!this._qareport) {
|
|
211
|
+
this._qareport = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:Case', 'SupportModule:QaReport', 'Case__QaReport');
|
|
212
|
+
}
|
|
213
|
+
return this._qareport;
|
|
214
|
+
}
|
|
209
215
|
// ============================================
|
|
210
216
|
// STANDARD METHODS
|
|
211
217
|
// ============================================
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { DbProvider, DbProviderOptions, DbGetQueryOptions } from '@d19n/odin-sdk-generator/dist/db.provider';
|
|
2
|
+
import { OdinSearchV2, OdinRecordCreateDto, OdinRecordUpdateDto } from '@d19n/odin-types/dist/core';
|
|
3
|
+
import { DbRecordLinkManager } from '@d19n/odin-sdk-generator/dist/db.record.link.manager';
|
|
4
|
+
import { QaReportProperties } from '../entities-v2/QaReport';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use OdinDbClient.
|
|
7
|
+
*
|
|
8
|
+
* Migration:
|
|
9
|
+
* - Old: new QaReportApi(authParams).get(id)
|
|
10
|
+
* - New: new odin.qareport.get(id)
|
|
11
|
+
*
|
|
12
|
+
* The new OdinDbClient returns typed record wrappers with action methods.
|
|
13
|
+
*
|
|
14
|
+
* Supports separate query options and provider options:
|
|
15
|
+
* - Constructor level: new QaReportDb(principal, dbService, { omitPermissionsCheck: true })
|
|
16
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
17
|
+
*/
|
|
18
|
+
export declare class QaReportDb extends DbProvider {
|
|
19
|
+
protected readonly principal: any;
|
|
20
|
+
protected readonly dbService: any;
|
|
21
|
+
private readonly moduleName;
|
|
22
|
+
private readonly entityName;
|
|
23
|
+
private sourceRecord;
|
|
24
|
+
private _case?;
|
|
25
|
+
constructor(principal: any, dbService: any, defaultOptions?: DbProviderOptions);
|
|
26
|
+
get case(): DbRecordLinkManager;
|
|
27
|
+
setRecord(sourceRecord: any): void;
|
|
28
|
+
/**
|
|
29
|
+
* Search records with manual pagination control
|
|
30
|
+
* @param params - Search parameters
|
|
31
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
32
|
+
*/
|
|
33
|
+
searchRecords(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>>>;
|
|
34
|
+
/**
|
|
35
|
+
* Search all records with automatic pagination
|
|
36
|
+
* @param params - Search parameters
|
|
37
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
38
|
+
*/
|
|
39
|
+
searchAllRecordsAndPaginate(params: Partial<OdinSearchV2>, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core/interfaces/v2.db.interfaces").OdinSearchResponse<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>>>;
|
|
40
|
+
/**
|
|
41
|
+
* Get a single record by primary key
|
|
42
|
+
* @param qaReportId - Record ID
|
|
43
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
44
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // Simple get
|
|
48
|
+
* const record = await db.getByPrimaryKey(id);
|
|
49
|
+
*
|
|
50
|
+
* // With related entities
|
|
51
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
|
|
52
|
+
*
|
|
53
|
+
* // With permissions bypass
|
|
54
|
+
* const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
|
|
55
|
+
*
|
|
56
|
+
* // Both options
|
|
57
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
|
|
58
|
+
*/
|
|
59
|
+
getByPrimaryKey(qaReportId: string, queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>>;
|
|
60
|
+
/**
|
|
61
|
+
* Get multiple records by primary keys
|
|
62
|
+
* @param qaReportIds - Array of record IDs
|
|
63
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
64
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
65
|
+
*/
|
|
66
|
+
getManyByPrimaryKey(qaReportIds: string[], queryOptions?: DbGetQueryOptions, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").OdinRecord<QaReportProperties>[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Upsert a single record
|
|
69
|
+
* @param upsertDto - Record to upsert
|
|
70
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
71
|
+
*/
|
|
72
|
+
upsert(upsertDto: OdinRecordCreateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
|
|
73
|
+
/**
|
|
74
|
+
* Upsert multiple records
|
|
75
|
+
* @param upsertDtos - Records to upsert
|
|
76
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
77
|
+
*/
|
|
78
|
+
upsertMany(upsertDtos: OdinRecordCreateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Update a single record
|
|
81
|
+
* @param updateDto - Record to update
|
|
82
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
83
|
+
*/
|
|
84
|
+
update(updateDto: OdinRecordUpdateDto, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes>;
|
|
85
|
+
/**
|
|
86
|
+
* Update multiple records
|
|
87
|
+
* @param updateDtos - Records to update
|
|
88
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
89
|
+
*/
|
|
90
|
+
updateMany(updateDtos: OdinRecordUpdateDto[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Delete one or many records
|
|
93
|
+
* @param qaReportIds - Record IDs to delete
|
|
94
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
95
|
+
*/
|
|
96
|
+
delete(qaReportIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordDeleted[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Restore one or many deleted records
|
|
99
|
+
* @param qaReportIds - Record IDs to restore
|
|
100
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
101
|
+
*/
|
|
102
|
+
restore(qaReportIds: string[], providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-sdk-generator").DbRecordRestored[]>;
|
|
103
|
+
/**
|
|
104
|
+
* Apply an action to a record
|
|
105
|
+
* @param actionName - The action key
|
|
106
|
+
* @param dto - The action DTO
|
|
107
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
108
|
+
*/
|
|
109
|
+
applyAction(actionName: string, dto: any, providerOptions?: DbProviderOptions): Promise<import("@d19n/odin-types/dist/core").IDbRecordCreateUpdateRes[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Get version history for the current source record
|
|
112
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
113
|
+
*/
|
|
114
|
+
getVersions(providerOptions?: DbProviderOptions): Promise<any>;
|
|
115
|
+
/**
|
|
116
|
+
* Get revision timeline for the current source record
|
|
117
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
118
|
+
*/
|
|
119
|
+
getRevisionTimeline(providerOptions?: DbProviderOptions): Promise<any>;
|
|
120
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
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.QaReportDb = void 0;
|
|
13
|
+
const db_provider_1 = require("@d19n/odin-sdk-generator/dist/db.provider");
|
|
14
|
+
const db_record_link_manager_1 = require("@d19n/odin-sdk-generator/dist/db.record.link.manager");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use OdinDbClient.
|
|
17
|
+
*
|
|
18
|
+
* Migration:
|
|
19
|
+
* - Old: new QaReportApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.qareport.get(id)
|
|
21
|
+
*
|
|
22
|
+
* The new OdinDbClient returns typed record wrappers with action methods.
|
|
23
|
+
*
|
|
24
|
+
* Supports separate query options and provider options:
|
|
25
|
+
* - Constructor level: new QaReportDb(principal, dbService, { omitPermissionsCheck: true })
|
|
26
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
27
|
+
*/
|
|
28
|
+
class QaReportDb extends db_provider_1.DbProvider {
|
|
29
|
+
constructor(principal, dbService, defaultOptions) {
|
|
30
|
+
super(principal, dbService, defaultOptions);
|
|
31
|
+
this.moduleName = 'SupportModule';
|
|
32
|
+
this.entityName = 'QaReport';
|
|
33
|
+
this.principal = principal;
|
|
34
|
+
this.dbService = dbService;
|
|
35
|
+
// Link managers are lazy-loaded on first access
|
|
36
|
+
}
|
|
37
|
+
// ============================================
|
|
38
|
+
// LAZY-LOADED LINK MANAGERS (Public Getters)
|
|
39
|
+
// ============================================
|
|
40
|
+
// Usage remains identical: db.address.list(recordId)
|
|
41
|
+
get case() {
|
|
42
|
+
if (!this._case) {
|
|
43
|
+
this._case = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:QaReport', 'SupportModule:Case', 'Case__QaReport');
|
|
44
|
+
}
|
|
45
|
+
return this._case;
|
|
46
|
+
}
|
|
47
|
+
// ============================================
|
|
48
|
+
// STANDARD METHODS
|
|
49
|
+
// ============================================
|
|
50
|
+
// Methods support separate query options and provider options for clean API
|
|
51
|
+
setRecord(sourceRecord) {
|
|
52
|
+
this.sourceRecord = sourceRecord;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Search records with manual pagination control
|
|
56
|
+
* @param params - Search parameters
|
|
57
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
58
|
+
*/
|
|
59
|
+
searchRecords(params, providerOptions) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params, providerOptions);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Search all records with automatic pagination
|
|
66
|
+
* @param params - Search parameters
|
|
67
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
68
|
+
*/
|
|
69
|
+
searchAllRecordsAndPaginate(params, providerOptions) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params, 0, providerOptions);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get a single record by primary key
|
|
76
|
+
* @param qaReportId - Record ID
|
|
77
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
78
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* // Simple get
|
|
82
|
+
* const record = await db.getByPrimaryKey(id);
|
|
83
|
+
*
|
|
84
|
+
* // With related entities
|
|
85
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
|
|
86
|
+
*
|
|
87
|
+
* // With permissions bypass
|
|
88
|
+
* const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
|
|
89
|
+
*
|
|
90
|
+
* // Both options
|
|
91
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
|
|
92
|
+
*/
|
|
93
|
+
getByPrimaryKey(qaReportId, queryOptions, providerOptions) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaReportId, queryOptions, providerOptions);
|
|
96
|
+
if (res)
|
|
97
|
+
this.setRecord(res);
|
|
98
|
+
return res;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get multiple records by primary keys
|
|
103
|
+
* @param qaReportIds - Array of record IDs
|
|
104
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
105
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
106
|
+
*/
|
|
107
|
+
getManyByPrimaryKey(qaReportIds, queryOptions, providerOptions) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaReportIds, queryOptions, providerOptions);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Upsert a single record
|
|
114
|
+
* @param upsertDto - Record to upsert
|
|
115
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
116
|
+
*/
|
|
117
|
+
upsert(upsertDto, providerOptions) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto], providerOptions);
|
|
120
|
+
return res[0];
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Upsert multiple records
|
|
125
|
+
* @param upsertDtos - Records to upsert
|
|
126
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
127
|
+
*/
|
|
128
|
+
upsertMany(upsertDtos, providerOptions) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos, providerOptions);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Update a single record
|
|
135
|
+
* @param updateDto - Record to update
|
|
136
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
137
|
+
*/
|
|
138
|
+
update(updateDto, providerOptions) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto], providerOptions);
|
|
141
|
+
return res[0];
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Update multiple records
|
|
146
|
+
* @param updateDtos - Records to update
|
|
147
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
148
|
+
*/
|
|
149
|
+
updateMany(updateDtos, providerOptions) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos, providerOptions);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Delete one or many records
|
|
156
|
+
* @param qaReportIds - Record IDs to delete
|
|
157
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
158
|
+
*/
|
|
159
|
+
delete(qaReportIds, providerOptions) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
return yield this._delete(this.moduleName, this.entityName, qaReportIds, providerOptions);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Restore one or many deleted records
|
|
166
|
+
* @param qaReportIds - Record IDs to restore
|
|
167
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
168
|
+
*/
|
|
169
|
+
restore(qaReportIds, providerOptions) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
return yield this._restore(this.moduleName, this.entityName, qaReportIds, providerOptions);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Apply an action to a record
|
|
176
|
+
* @param actionName - The action key
|
|
177
|
+
* @param dto - The action DTO
|
|
178
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
179
|
+
*/
|
|
180
|
+
applyAction(actionName, dto, providerOptions) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto, providerOptions);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get version history for the current source record
|
|
187
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
188
|
+
*/
|
|
189
|
+
getVersions(providerOptions) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Get revision timeline for the current source record
|
|
196
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
197
|
+
*/
|
|
198
|
+
getRevisionTimeline(providerOptions) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
exports.QaReportDb = QaReportDb;
|
|
@@ -34,6 +34,7 @@ import { OneTouchSwitchProperties } from './OneTouchSwitch';
|
|
|
34
34
|
import { OutboundDialCampaignCaseProperties } from './OutboundDialCampaignCase';
|
|
35
35
|
import { OutboundDialSessionProperties } from './OutboundDialSession';
|
|
36
36
|
import { CallProperties } from './Call';
|
|
37
|
+
import { QaReportProperties } from './QaReport';
|
|
37
38
|
/**
|
|
38
39
|
* Available types for Case records
|
|
39
40
|
*/
|
|
@@ -2242,6 +2243,8 @@ export declare class Case extends OdinRecord<CaseProperties> {
|
|
|
2242
2243
|
OutboundDialSession: OdinLink<LinkedOdinRecord<OutboundDialSessionProperties>>;
|
|
2243
2244
|
/** Linked Call records (Call__Case) */
|
|
2244
2245
|
Call: OdinLink<LinkedOdinRecord<CallProperties>>;
|
|
2246
|
+
/** Linked QaReport records (Case__QaReport) */
|
|
2247
|
+
QaReport: OdinLink<LinkedOdinRecord<QaReportProperties>>;
|
|
2245
2248
|
}
|
|
2246
2249
|
/**
|
|
2247
2250
|
* RabbitMQ routing keys for Case events
|
|
@@ -2341,3 +2344,7 @@ export declare const ROUTING_KEY_LINK_CASE_ONE_TOUCH_SWITCH_DELETED = "SupportMo
|
|
|
2341
2344
|
export declare const ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_CREATED = "SupportModule.Case.OutboundDialSession.SubDbRecordAssociationCreated";
|
|
2342
2345
|
/** Event: OutboundDialSession__Case link deleted */
|
|
2343
2346
|
export declare const ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_DELETED = "SupportModule.Case.OutboundDialSession.SubDbRecordAssociationDeleted";
|
|
2347
|
+
/** Event: Case__QaReport link created */
|
|
2348
|
+
export declare const ROUTING_KEY_LINK_CASE_QA_REPORT_CREATED = "SupportModule.Case.QaReport.SubDbRecordAssociationCreated";
|
|
2349
|
+
/** Event: Case__QaReport link deleted */
|
|
2350
|
+
export declare const ROUTING_KEY_LINK_CASE_QA_REPORT_DELETED = "SupportModule.Case.QaReport.SubDbRecordAssociationDeleted";
|
package/dist/entities-v2/Case.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ROUTING_KEY_LINK_CASE_CASE_ACTION_CREATED = exports.ROUTING_KEY_LINK_CASE_ACTIVITY_LOG_DELETED = exports.ROUTING_KEY_LINK_CASE_ACTIVITY_LOG_CREATED = exports.ROUTING_KEY_CASE_OUTAGE_DELETED = exports.ROUTING_KEY_CASE_OUTAGE_UPDATED = exports.ROUTING_KEY_CASE_OUTAGE_CREATED = exports.ROUTING_KEY_CASE_DEFAULT_DELETED = exports.ROUTING_KEY_CASE_DEFAULT_UPDATED = exports.ROUTING_KEY_CASE_DEFAULT_CREATED = exports.ROUTING_KEY_CASE_DELETED = exports.ROUTING_KEY_CASE_UPDATED = exports.ROUTING_KEY_CASE_CREATED = exports.Case = exports.CasePropertyKeys = exports.CaseDeprecated = exports.CaseRetentionOutcome = exports.CaseVulnerableCustomer = exports.CaseAutoResolutionStatus = exports.CaseLastDialOutcome = exports.CaseEscalationReason = exports.CaseOmbudsmanReason = exports.CaseSource = exports.CaseReasonForReview = exports.CaseImpact = exports.CaseCsatReason = exports.CaseBusinessArea = exports.CaseRetentionOffer = exports.CaseSla = exports.CaseReasonForLeaving = exports.CaseDpaCustomerType = exports.CaseDpaCustomerCategory = exports.CaseConversationStatus = exports.CaseBlockedReason = exports.CaseSubCategory = exports.CaseCategory = exports.CaseChannel = exports.CaseProblem = exports.CasePrimaryExceptionReason = exports.CasePrimaryException = exports.CaseFormalComplaint = exports.CaseOrigin = exports.CaseProviders = exports.CaseCsatResolutionReason = exports.CaseComplaint = exports.CaseCsatAgentReason = exports.OutageCaseStageKeys = exports.OutageCaseStageNames = exports.DefaultCaseStageKeys = exports.DefaultCaseStageNames = exports.CaseEntityTypes = void 0;
|
|
16
|
-
exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_DELETED = exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_CREATED = exports.ROUTING_KEY_LINK_CASE_ONE_TOUCH_SWITCH_DELETED = exports.ROUTING_KEY_LINK_CASE_ONE_TOUCH_SWITCH_CREATED = exports.ROUTING_KEY_LINK_CASE_CASE_DELETED = exports.ROUTING_KEY_LINK_CASE_CASE_CREATED = exports.ROUTING_KEY_LINK_CASE_SMS_MESSAGE_DELETED = exports.ROUTING_KEY_LINK_CASE_SMS_MESSAGE_CREATED = exports.ROUTING_KEY_LINK_CASE_USER_DELETED = exports.ROUTING_KEY_LINK_CASE_USER_CREATED = exports.ROUTING_KEY_LINK_CASE_CONTRACT_BUY_OUT_DELETED = exports.ROUTING_KEY_LINK_CASE_CONTRACT_BUY_OUT_CREATED = exports.ROUTING_KEY_LINK_CASE_QUEUE_CHANGE_DELETED = exports.ROUTING_KEY_LINK_CASE_QUEUE_CHANGE_CREATED = exports.ROUTING_KEY_LINK_CASE_ADDRESS_DELETED = exports.ROUTING_KEY_LINK_CASE_ADDRESS_CREATED = exports.ROUTING_KEY_LINK_CASE_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_CASE_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_CASE_EMAIL_DELETED = exports.ROUTING_KEY_LINK_CASE_EMAIL_CREATED = exports.ROUTING_KEY_LINK_CASE_CONTACT_DELETED = exports.ROUTING_KEY_LINK_CASE_CONTACT_CREATED = exports.ROUTING_KEY_LINK_CASE_PUSH_NOTIFICATION_DELETED = exports.ROUTING_KEY_LINK_CASE_PUSH_NOTIFICATION_CREATED = exports.ROUTING_KEY_LINK_CASE_ORDER_DELETED = exports.ROUTING_KEY_LINK_CASE_ORDER_CREATED = exports.ROUTING_KEY_LINK_CASE_CONVERSATION_DELETED = exports.ROUTING_KEY_LINK_CASE_CONVERSATION_CREATED = exports.ROUTING_KEY_LINK_CASE_TEAM_DELETED = exports.ROUTING_KEY_LINK_CASE_TEAM_CREATED = exports.ROUTING_KEY_LINK_CASE_NOTE_DELETED = exports.ROUTING_KEY_LINK_CASE_NOTE_CREATED = exports.ROUTING_KEY_LINK_CASE_FILE_DELETED = exports.ROUTING_KEY_LINK_CASE_FILE_CREATED = exports.ROUTING_KEY_LINK_CASE_CASE_ACTION_DELETED = void 0;
|
|
16
|
+
exports.ROUTING_KEY_LINK_CASE_QA_REPORT_DELETED = exports.ROUTING_KEY_LINK_CASE_QA_REPORT_CREATED = exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_DELETED = exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_CREATED = exports.ROUTING_KEY_LINK_CASE_ONE_TOUCH_SWITCH_DELETED = exports.ROUTING_KEY_LINK_CASE_ONE_TOUCH_SWITCH_CREATED = exports.ROUTING_KEY_LINK_CASE_CASE_DELETED = exports.ROUTING_KEY_LINK_CASE_CASE_CREATED = exports.ROUTING_KEY_LINK_CASE_SMS_MESSAGE_DELETED = exports.ROUTING_KEY_LINK_CASE_SMS_MESSAGE_CREATED = exports.ROUTING_KEY_LINK_CASE_USER_DELETED = exports.ROUTING_KEY_LINK_CASE_USER_CREATED = exports.ROUTING_KEY_LINK_CASE_CONTRACT_BUY_OUT_DELETED = exports.ROUTING_KEY_LINK_CASE_CONTRACT_BUY_OUT_CREATED = exports.ROUTING_KEY_LINK_CASE_QUEUE_CHANGE_DELETED = exports.ROUTING_KEY_LINK_CASE_QUEUE_CHANGE_CREATED = exports.ROUTING_KEY_LINK_CASE_ADDRESS_DELETED = exports.ROUTING_KEY_LINK_CASE_ADDRESS_CREATED = exports.ROUTING_KEY_LINK_CASE_WORK_ORDER_DELETED = exports.ROUTING_KEY_LINK_CASE_WORK_ORDER_CREATED = exports.ROUTING_KEY_LINK_CASE_EMAIL_DELETED = exports.ROUTING_KEY_LINK_CASE_EMAIL_CREATED = exports.ROUTING_KEY_LINK_CASE_CONTACT_DELETED = exports.ROUTING_KEY_LINK_CASE_CONTACT_CREATED = exports.ROUTING_KEY_LINK_CASE_PUSH_NOTIFICATION_DELETED = exports.ROUTING_KEY_LINK_CASE_PUSH_NOTIFICATION_CREATED = exports.ROUTING_KEY_LINK_CASE_ORDER_DELETED = exports.ROUTING_KEY_LINK_CASE_ORDER_CREATED = exports.ROUTING_KEY_LINK_CASE_CONVERSATION_DELETED = exports.ROUTING_KEY_LINK_CASE_CONVERSATION_CREATED = exports.ROUTING_KEY_LINK_CASE_TEAM_DELETED = exports.ROUTING_KEY_LINK_CASE_TEAM_CREATED = exports.ROUTING_KEY_LINK_CASE_NOTE_DELETED = exports.ROUTING_KEY_LINK_CASE_NOTE_CREATED = exports.ROUTING_KEY_LINK_CASE_FILE_DELETED = exports.ROUTING_KEY_LINK_CASE_FILE_CREATED = exports.ROUTING_KEY_LINK_CASE_CASE_ACTION_DELETED = void 0;
|
|
17
17
|
const core_1 = require("@d19n/odin-types/dist/core");
|
|
18
18
|
/**
|
|
19
19
|
* Available types for Case records
|
|
@@ -1183,3 +1183,7 @@ exports.ROUTING_KEY_LINK_CASE_ONE_TOUCH_SWITCH_DELETED = 'SupportModule.Case.One
|
|
|
1183
1183
|
exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_CREATED = 'SupportModule.Case.OutboundDialSession.SubDbRecordAssociationCreated';
|
|
1184
1184
|
/** Event: OutboundDialSession__Case link deleted */
|
|
1185
1185
|
exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_DELETED = 'SupportModule.Case.OutboundDialSession.SubDbRecordAssociationDeleted';
|
|
1186
|
+
/** Event: Case__QaReport link created */
|
|
1187
|
+
exports.ROUTING_KEY_LINK_CASE_QA_REPORT_CREATED = 'SupportModule.Case.QaReport.SubDbRecordAssociationCreated';
|
|
1188
|
+
/** Event: Case__QaReport link deleted */
|
|
1189
|
+
exports.ROUTING_KEY_LINK_CASE_QA_REPORT_DELETED = 'SupportModule.Case.QaReport.SubDbRecordAssociationDeleted';
|
|
@@ -23,12 +23,12 @@ export declare enum ConfigEntityTypes {
|
|
|
23
23
|
* Use these constants instead of string literals for type safety
|
|
24
24
|
*/
|
|
25
25
|
export declare enum ConfigPropertyKeys {
|
|
26
|
-
/** Data field for Config records. Used by Platform team. */
|
|
27
|
-
Test = "Test",
|
|
28
26
|
/** the name of the app this config relates to (Platform - Config) */
|
|
29
27
|
AppName = "AppName",
|
|
30
28
|
/** object of { key: value } mappings (Platform - Config) */
|
|
31
|
-
Mappings = "Mappings"
|
|
29
|
+
Mappings = "Mappings",
|
|
30
|
+
/** Data field for Config records. Used by Platform team. */
|
|
31
|
+
Test = "Test"
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Properties for Config records
|
|
@@ -36,11 +36,6 @@ export declare enum ConfigPropertyKeys {
|
|
|
36
36
|
* @see SchemaModule:Config
|
|
37
37
|
*/
|
|
38
38
|
export interface ConfigProperties {
|
|
39
|
-
/** Data field for Config records. Used by Platform team.
|
|
40
|
-
*
|
|
41
|
-
* @type {TEXT}
|
|
42
|
-
*/
|
|
43
|
-
Test: string;
|
|
44
39
|
/** the name of the app this config relates to (Platform - Config)
|
|
45
40
|
*
|
|
46
41
|
* @type {TEXT}
|
|
@@ -51,6 +46,11 @@ export interface ConfigProperties {
|
|
|
51
46
|
* @type {JSON}
|
|
52
47
|
*/
|
|
53
48
|
Mappings: string;
|
|
49
|
+
/** Data field for Config records. Used by Platform team.
|
|
50
|
+
*
|
|
51
|
+
* @type {TEXT}
|
|
52
|
+
*/
|
|
53
|
+
Test: string;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Config entity from SchemaModule
|
|
@@ -28,12 +28,12 @@ var ConfigEntityTypes;
|
|
|
28
28
|
*/
|
|
29
29
|
var ConfigPropertyKeys;
|
|
30
30
|
(function (ConfigPropertyKeys) {
|
|
31
|
-
/** Data field for Config records. Used by Platform team. */
|
|
32
|
-
ConfigPropertyKeys["Test"] = "Test";
|
|
33
31
|
/** the name of the app this config relates to (Platform - Config) */
|
|
34
32
|
ConfigPropertyKeys["AppName"] = "AppName";
|
|
35
33
|
/** object of { key: value } mappings (Platform - Config) */
|
|
36
34
|
ConfigPropertyKeys["Mappings"] = "Mappings";
|
|
35
|
+
/** Data field for Config records. Used by Platform team. */
|
|
36
|
+
ConfigPropertyKeys["Test"] = "Test";
|
|
37
37
|
})(ConfigPropertyKeys = exports.ConfigPropertyKeys || (exports.ConfigPropertyKeys = {}));
|
|
38
38
|
/**
|
|
39
39
|
* Config entity from SchemaModule
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QaReport Entity Definition
|
|
3
|
+
*
|
|
4
|
+
* An AI-generated quality assurance scorecard for one closed SupportModule:Case. Written on demand when an agent presses Generate in the QA Report tab; one record per generation, so a case can carry several and earlier scores are kept.
|
|
5
|
+
*
|
|
6
|
+
* @module SupportModule
|
|
7
|
+
* @entity QaReport
|
|
8
|
+
* @schemaId 68057e56-74e5-4b9e-b4c2-6c3f46b000ad
|
|
9
|
+
*
|
|
10
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
11
|
+
* Generated from Odin schema definition
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecord, OdinLink, LinkedOdinRecord } from '@d19n/odin-types/dist/core';
|
|
14
|
+
import { CaseProperties } from './Case';
|
|
15
|
+
/**
|
|
16
|
+
* Available types for QaReport records
|
|
17
|
+
*/
|
|
18
|
+
export declare enum QaReportEntityTypes {
|
|
19
|
+
/** This is the default record type */
|
|
20
|
+
DEFAULT = "DEFAULT"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Valid values for QaReport.Channel
|
|
24
|
+
*
|
|
25
|
+
* Channel of the scored case. Copied from the case so QA can be filtered by channel without joining back.
|
|
26
|
+
*
|
|
27
|
+
* @remarks Available options:
|
|
28
|
+
* - `CALL` - Call
|
|
29
|
+
* - `EMAIL` - Email
|
|
30
|
+
* - `IN_APP_CHAT` - In-app chat
|
|
31
|
+
* - `PORTAL_CHAT` - Portal chat
|
|
32
|
+
* - `WEB_CHAT` - Web chat
|
|
33
|
+
*/
|
|
34
|
+
export declare enum QaReportChannel {
|
|
35
|
+
CALL = "CALL",
|
|
36
|
+
EMAIL = "EMAIL",
|
|
37
|
+
IN_APP_CHAT = "IN_APP_CHAT",
|
|
38
|
+
PORTAL_CHAT = "PORTAL_CHAT",
|
|
39
|
+
WEB_CHAT = "WEB_CHAT"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Property keys for QaReport
|
|
43
|
+
* Use these constants instead of string literals for type safety
|
|
44
|
+
*/
|
|
45
|
+
export declare enum QaReportPropertyKeys {
|
|
46
|
+
/** The case this report scores. */
|
|
47
|
+
CaseId = "CaseId",
|
|
48
|
+
/** The scorecard as returned by the Databricks quality_assurance_report endpoint, sanitised HTML. Around 13KB in practice. */
|
|
49
|
+
ReportHtml = "ReportHtml",
|
|
50
|
+
/** Total score the rubric awarded, 0-100, parsed out of the report. Stored separately so QA can be reported on without parsing HTML. */
|
|
51
|
+
Score = "Score",
|
|
52
|
+
/** Channel of the scored case. Copied from the case so QA can be filtered by channel without joining back. */
|
|
53
|
+
Channel = "Channel",
|
|
54
|
+
/** Identity user id of the agent scored, from the case RAssignedOrgUserId. Not a LOOKUP: users live in IdentityModule and there is no association to bind to. */
|
|
55
|
+
AgentId = "AgentId",
|
|
56
|
+
/** Display name of the agent at the time of scoring. Point-in-time on purpose, so the assessment still reads correctly if the person is renamed or leaves. */
|
|
57
|
+
AgentName = "AgentName",
|
|
58
|
+
/** Returned by the Databricks endpoint. The only thread tying this record to the matching inference row on the Databricks side — without it you are matching on timestamp and hoping. */
|
|
59
|
+
CorrelationId = "CorrelationId",
|
|
60
|
+
/** Which model produced the report, e.g. system.ai.gpt-5-4. Needed to compare scores once the rubric or the model changes. */
|
|
61
|
+
LlmEndpointUsed = "LlmEndpointUsed"
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Properties for QaReport records
|
|
65
|
+
*
|
|
66
|
+
* @see SupportModule:QaReport
|
|
67
|
+
*/
|
|
68
|
+
export interface QaReportProperties {
|
|
69
|
+
/** The case this report scores.
|
|
70
|
+
*
|
|
71
|
+
* @type {LOOKUP}
|
|
72
|
+
* @default
|
|
73
|
+
*/
|
|
74
|
+
CaseId: string;
|
|
75
|
+
/** The scorecard as returned by the Databricks quality_assurance_report endpoint, sanitised HTML. Around 13KB in practice.
|
|
76
|
+
*
|
|
77
|
+
* @type {TEXT_LONG}
|
|
78
|
+
* @default
|
|
79
|
+
*/
|
|
80
|
+
ReportHtml: string;
|
|
81
|
+
/** Total score the rubric awarded, 0-100, parsed out of the report. Stored separately so QA can be reported on without parsing HTML.
|
|
82
|
+
*
|
|
83
|
+
* @type {NUMBER}
|
|
84
|
+
* @default
|
|
85
|
+
*/
|
|
86
|
+
Score: number;
|
|
87
|
+
/** Channel of the scored case. Copied from the case so QA can be filtered by channel without joining back.
|
|
88
|
+
*
|
|
89
|
+
* @type {ENUM}
|
|
90
|
+
* @default
|
|
91
|
+
* @enum {QaReportChannel}
|
|
92
|
+
*/
|
|
93
|
+
Channel: QaReportChannel;
|
|
94
|
+
/** Identity user id of the agent scored, from the case RAssignedOrgUserId. Not a LOOKUP: users live in IdentityModule and there is no association to bind to.
|
|
95
|
+
*
|
|
96
|
+
* @type {TEXT}
|
|
97
|
+
* @default
|
|
98
|
+
*/
|
|
99
|
+
AgentId: string;
|
|
100
|
+
/** Display name of the agent at the time of scoring. Point-in-time on purpose, so the assessment still reads correctly if the person is renamed or leaves.
|
|
101
|
+
*
|
|
102
|
+
* @type {TEXT}
|
|
103
|
+
* @default
|
|
104
|
+
*/
|
|
105
|
+
AgentName: string;
|
|
106
|
+
/** Returned by the Databricks endpoint. The only thread tying this record to the matching inference row on the Databricks side — without it you are matching on timestamp and hoping.
|
|
107
|
+
*
|
|
108
|
+
* @type {TEXT}
|
|
109
|
+
* @default
|
|
110
|
+
*/
|
|
111
|
+
CorrelationId: string;
|
|
112
|
+
/** Which model produced the report, e.g. system.ai.gpt-5-4. Needed to compare scores once the rubric or the model changes.
|
|
113
|
+
*
|
|
114
|
+
* @type {TEXT}
|
|
115
|
+
* @default
|
|
116
|
+
*/
|
|
117
|
+
LlmEndpointUsed: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* QaReport entity from SupportModule
|
|
121
|
+
*
|
|
122
|
+
* An AI-generated quality assurance scorecard for one closed SupportModule:Case. Written on demand when an agent presses Generate in the QA Report tab; one record per generation, so a case can carry several and earlier scores are kept.
|
|
123
|
+
*
|
|
124
|
+
* @module SupportModule
|
|
125
|
+
* @entity QaReport
|
|
126
|
+
* @schemaId 68057e56-74e5-4b9e-b4c2-6c3f46b000ad
|
|
127
|
+
* @recordPrefix QAR
|
|
128
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
129
|
+
*/
|
|
130
|
+
export declare class QaReport extends OdinRecord<QaReportProperties> {
|
|
131
|
+
entity: 'SupportModule:QaReport';
|
|
132
|
+
type: QaReportEntityTypes;
|
|
133
|
+
schemaId: '68057e56-74e5-4b9e-b4c2-6c3f46b000ad';
|
|
134
|
+
properties: QaReportProperties;
|
|
135
|
+
/** Linked Case records (Case__QaReport) */
|
|
136
|
+
Case: OdinLink<LinkedOdinRecord<CaseProperties>>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* RabbitMQ routing keys for QaReport events
|
|
140
|
+
*/
|
|
141
|
+
export declare const ROUTING_KEY_QA_REPORT_CREATED = "SupportModule.QaReport.SubDbRecordCreated";
|
|
142
|
+
export declare const ROUTING_KEY_QA_REPORT_UPDATED = "SupportModule.QaReport.SubDbRecordUpdated";
|
|
143
|
+
export declare const ROUTING_KEY_QA_REPORT_DELETED = "SupportModule.QaReport.SubDbRecordDeleted";
|
|
144
|
+
/**
|
|
145
|
+
* Type-specific routing keys for QaReport events
|
|
146
|
+
* Subscribe to these for events on specific entity types only
|
|
147
|
+
*/
|
|
148
|
+
/** This is the default record type created */
|
|
149
|
+
export declare const ROUTING_KEY_QA_REPORT_DEFAULT_CREATED = "SupportModule.QaReport.DEFAULT.SubDbRecordCreated";
|
|
150
|
+
/** This is the default record type updated */
|
|
151
|
+
export declare const ROUTING_KEY_QA_REPORT_DEFAULT_UPDATED = "SupportModule.QaReport.DEFAULT.SubDbRecordUpdated";
|
|
152
|
+
/** This is the default record type deleted */
|
|
153
|
+
export declare const ROUTING_KEY_QA_REPORT_DEFAULT_DELETED = "SupportModule.QaReport.DEFAULT.SubDbRecordDeleted";
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* QaReport Entity Definition
|
|
4
|
+
*
|
|
5
|
+
* An AI-generated quality assurance scorecard for one closed SupportModule:Case. Written on demand when an agent presses Generate in the QA Report tab; one record per generation, so a case can carry several and earlier scores are kept.
|
|
6
|
+
*
|
|
7
|
+
* @module SupportModule
|
|
8
|
+
* @entity QaReport
|
|
9
|
+
* @schemaId 68057e56-74e5-4b9e-b4c2-6c3f46b000ad
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
* Generated from Odin schema definition
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ROUTING_KEY_QA_REPORT_DEFAULT_DELETED = exports.ROUTING_KEY_QA_REPORT_DEFAULT_UPDATED = exports.ROUTING_KEY_QA_REPORT_DEFAULT_CREATED = exports.ROUTING_KEY_QA_REPORT_DELETED = exports.ROUTING_KEY_QA_REPORT_UPDATED = exports.ROUTING_KEY_QA_REPORT_CREATED = exports.QaReport = exports.QaReportPropertyKeys = exports.QaReportChannel = exports.QaReportEntityTypes = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Available types for QaReport records
|
|
19
|
+
*/
|
|
20
|
+
var QaReportEntityTypes;
|
|
21
|
+
(function (QaReportEntityTypes) {
|
|
22
|
+
/** This is the default record type */
|
|
23
|
+
QaReportEntityTypes["DEFAULT"] = "DEFAULT";
|
|
24
|
+
})(QaReportEntityTypes = exports.QaReportEntityTypes || (exports.QaReportEntityTypes = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Valid values for QaReport.Channel
|
|
27
|
+
*
|
|
28
|
+
* Channel of the scored case. Copied from the case so QA can be filtered by channel without joining back.
|
|
29
|
+
*
|
|
30
|
+
* @remarks Available options:
|
|
31
|
+
* - `CALL` - Call
|
|
32
|
+
* - `EMAIL` - Email
|
|
33
|
+
* - `IN_APP_CHAT` - In-app chat
|
|
34
|
+
* - `PORTAL_CHAT` - Portal chat
|
|
35
|
+
* - `WEB_CHAT` - Web chat
|
|
36
|
+
*/
|
|
37
|
+
var QaReportChannel;
|
|
38
|
+
(function (QaReportChannel) {
|
|
39
|
+
QaReportChannel["CALL"] = "CALL";
|
|
40
|
+
QaReportChannel["EMAIL"] = "EMAIL";
|
|
41
|
+
QaReportChannel["IN_APP_CHAT"] = "IN_APP_CHAT";
|
|
42
|
+
QaReportChannel["PORTAL_CHAT"] = "PORTAL_CHAT";
|
|
43
|
+
QaReportChannel["WEB_CHAT"] = "WEB_CHAT";
|
|
44
|
+
})(QaReportChannel = exports.QaReportChannel || (exports.QaReportChannel = {}));
|
|
45
|
+
/**
|
|
46
|
+
* Property keys for QaReport
|
|
47
|
+
* Use these constants instead of string literals for type safety
|
|
48
|
+
*/
|
|
49
|
+
var QaReportPropertyKeys;
|
|
50
|
+
(function (QaReportPropertyKeys) {
|
|
51
|
+
/** The case this report scores. */
|
|
52
|
+
QaReportPropertyKeys["CaseId"] = "CaseId";
|
|
53
|
+
/** The scorecard as returned by the Databricks quality_assurance_report endpoint, sanitised HTML. Around 13KB in practice. */
|
|
54
|
+
QaReportPropertyKeys["ReportHtml"] = "ReportHtml";
|
|
55
|
+
/** Total score the rubric awarded, 0-100, parsed out of the report. Stored separately so QA can be reported on without parsing HTML. */
|
|
56
|
+
QaReportPropertyKeys["Score"] = "Score";
|
|
57
|
+
/** Channel of the scored case. Copied from the case so QA can be filtered by channel without joining back. */
|
|
58
|
+
QaReportPropertyKeys["Channel"] = "Channel";
|
|
59
|
+
/** Identity user id of the agent scored, from the case RAssignedOrgUserId. Not a LOOKUP: users live in IdentityModule and there is no association to bind to. */
|
|
60
|
+
QaReportPropertyKeys["AgentId"] = "AgentId";
|
|
61
|
+
/** Display name of the agent at the time of scoring. Point-in-time on purpose, so the assessment still reads correctly if the person is renamed or leaves. */
|
|
62
|
+
QaReportPropertyKeys["AgentName"] = "AgentName";
|
|
63
|
+
/** Returned by the Databricks endpoint. The only thread tying this record to the matching inference row on the Databricks side — without it you are matching on timestamp and hoping. */
|
|
64
|
+
QaReportPropertyKeys["CorrelationId"] = "CorrelationId";
|
|
65
|
+
/** Which model produced the report, e.g. system.ai.gpt-5-4. Needed to compare scores once the rubric or the model changes. */
|
|
66
|
+
QaReportPropertyKeys["LlmEndpointUsed"] = "LlmEndpointUsed";
|
|
67
|
+
})(QaReportPropertyKeys = exports.QaReportPropertyKeys || (exports.QaReportPropertyKeys = {}));
|
|
68
|
+
/**
|
|
69
|
+
* QaReport entity from SupportModule
|
|
70
|
+
*
|
|
71
|
+
* An AI-generated quality assurance scorecard for one closed SupportModule:Case. Written on demand when an agent presses Generate in the QA Report tab; one record per generation, so a case can carry several and earlier scores are kept.
|
|
72
|
+
*
|
|
73
|
+
* @module SupportModule
|
|
74
|
+
* @entity QaReport
|
|
75
|
+
* @schemaId 68057e56-74e5-4b9e-b4c2-6c3f46b000ad
|
|
76
|
+
* @recordPrefix QAR
|
|
77
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
78
|
+
*/
|
|
79
|
+
class QaReport extends core_1.OdinRecord {
|
|
80
|
+
}
|
|
81
|
+
exports.QaReport = QaReport;
|
|
82
|
+
// ============================================
|
|
83
|
+
// RABBITMQ EVENT ROUTING KEYS
|
|
84
|
+
// ============================================
|
|
85
|
+
/**
|
|
86
|
+
* RabbitMQ routing keys for QaReport events
|
|
87
|
+
*/
|
|
88
|
+
exports.ROUTING_KEY_QA_REPORT_CREATED = 'SupportModule.QaReport.SubDbRecordCreated';
|
|
89
|
+
exports.ROUTING_KEY_QA_REPORT_UPDATED = 'SupportModule.QaReport.SubDbRecordUpdated';
|
|
90
|
+
exports.ROUTING_KEY_QA_REPORT_DELETED = 'SupportModule.QaReport.SubDbRecordDeleted';
|
|
91
|
+
/**
|
|
92
|
+
* Type-specific routing keys for QaReport events
|
|
93
|
+
* Subscribe to these for events on specific entity types only
|
|
94
|
+
*/
|
|
95
|
+
/** This is the default record type created */
|
|
96
|
+
exports.ROUTING_KEY_QA_REPORT_DEFAULT_CREATED = 'SupportModule.QaReport.DEFAULT.SubDbRecordCreated';
|
|
97
|
+
/** This is the default record type updated */
|
|
98
|
+
exports.ROUTING_KEY_QA_REPORT_DEFAULT_UPDATED = 'SupportModule.QaReport.DEFAULT.SubDbRecordUpdated';
|
|
99
|
+
/** This is the default record type deleted */
|
|
100
|
+
exports.ROUTING_KEY_QA_REPORT_DEFAULT_DELETED = 'SupportModule.QaReport.DEFAULT.SubDbRecordDeleted';
|