@d19n/youfibre-odin-sdk 2.0.321 → 2.0.323
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 +7 -2
- package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.d.ts +14 -14
- package/dist/actions-v2/CompleteServiceWorkOrderFlowDto.js +22 -22
- package/dist/actions-v2/CreateOutboundDialSessionDto.d.ts +15 -1
- package/dist/actions-v2/DefaultServiceWorkOrderEditFormDto.d.ts +8 -1
- package/dist/actions-v2/UpdateCustomerDeviceBatteryDto.d.ts +3 -1
- package/dist/actions-v2/UpdateCustomerDeviceBatteryDto.js +3 -1
- package/dist/actions-v2/UpdateOutboundDialCampaignCaseDto.d.ts +29 -1
- package/dist/actions-v2/UpdateOutboundDialCampaignCaseOnDialEndDto.d.ts +29 -1
- package/dist/actions-v2/UpdateOutboundDialSessionOnAmdResultDto.d.ts +15 -1
- package/dist/api-sdk-v2/CaseApi.d.ts +4 -0
- package/dist/api-sdk-v2/CaseApi.js +12 -0
- package/dist/api-sdk-v2/CoachingSessionApi.d.ts +50 -0
- package/dist/api-sdk-v2/CoachingSessionApi.js +161 -0
- package/dist/api-sdk-v2/QaEvaluationAnswerApi.d.ts +48 -0
- package/dist/api-sdk-v2/QaEvaluationAnswerApi.js +155 -0
- package/dist/api-sdk-v2/QaEvaluationApi.d.ts +54 -0
- package/dist/api-sdk-v2/QaEvaluationApi.js +173 -0
- package/dist/api-sdk-v2/QaScorecardQuestionApi.d.ts +48 -0
- package/dist/api-sdk-v2/QaScorecardQuestionApi.js +155 -0
- package/dist/api-sdk-v2/QaScorecardTemplateApi.d.ts +50 -0
- package/dist/api-sdk-v2/QaScorecardTemplateApi.js +161 -0
- package/dist/db-sdk-v2/CaseDb.d.ts +4 -0
- package/dist/db-sdk-v2/CaseDb.js +12 -0
- package/dist/db-sdk-v2/CoachingSessionDb.d.ts +122 -0
- package/dist/db-sdk-v2/CoachingSessionDb.js +210 -0
- package/dist/db-sdk-v2/QaEvaluationAnswerDb.d.ts +120 -0
- package/dist/db-sdk-v2/QaEvaluationAnswerDb.js +204 -0
- package/dist/db-sdk-v2/QaEvaluationDb.d.ts +126 -0
- package/dist/db-sdk-v2/QaEvaluationDb.js +222 -0
- package/dist/db-sdk-v2/QaScorecardQuestionDb.d.ts +120 -0
- package/dist/db-sdk-v2/QaScorecardQuestionDb.js +204 -0
- package/dist/db-sdk-v2/QaScorecardTemplateDb.d.ts +122 -0
- package/dist/db-sdk-v2/QaScorecardTemplateDb.js +210 -0
- package/dist/entities-v2/Case.d.ts +14 -0
- package/dist/entities-v2/Case.js +9 -1
- package/dist/entities-v2/CoachingSession.d.ts +247 -0
- package/dist/entities-v2/CoachingSession.js +145 -0
- package/dist/entities-v2/CustomerDeviceRouter.d.ts +258 -8
- package/dist/entities-v2/CustomerDeviceRouter.js +17 -9
- package/dist/entities-v2/OutboundDialCampaignCase.d.ts +33 -1
- package/dist/entities-v2/OutboundDialCampaignCase.js +8 -0
- package/dist/entities-v2/OutboundDialSession.d.ts +17 -1
- package/dist/entities-v2/OutboundDialSession.js +4 -0
- package/dist/entities-v2/QaEvaluation.d.ts +361 -0
- package/dist/entities-v2/QaEvaluation.js +217 -0
- package/dist/entities-v2/QaEvaluationAnswer.d.ts +127 -0
- package/dist/entities-v2/QaEvaluationAnswer.js +92 -0
- package/dist/entities-v2/QaScorecardQuestion.d.ts +155 -0
- package/dist/entities-v2/QaScorecardQuestion.js +96 -0
- package/dist/entities-v2/QaScorecardTemplate.d.ts +152 -0
- package/dist/entities-v2/QaScorecardTemplate.js +114 -0
- package/dist/entities-v2/WorkOrder.d.ts +210 -1
- package/dist/entities-v2/WorkOrder.js +22 -4
- package/dist/entities-v2/YfFieldVisitOutcomeForm.d.ts +4 -3
- package/dist/entities-v2/YfFieldVisitOutcomeForm.js +2 -1
- package/dist/records-v2/CustomerDeviceRouterRecord.d.ts +38 -2
- package/dist/records-v2/CustomerDeviceRouterRecord.js +37 -0
- package/dist/records-v2/WorkOrderRecord.d.ts +4 -4
- package/dist/records-v2/WorkOrderRecord.js +4 -4
- package/dist/records-v2/YfFieldVisitOutcomeFormRecord.d.ts +5 -4
- package/dist/records-v2/YfFieldVisitOutcomeFormRecord.js +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,210 @@
|
|
|
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.QaScorecardTemplateDb = 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 QaScorecardTemplateApi(authParams).get(id)
|
|
20
|
+
* - New: new odin.qascorecardtemplate.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 QaScorecardTemplateDb(principal, dbService, { omitPermissionsCheck: true })
|
|
26
|
+
* - Method level: await db.getByPrimaryKey(id, { entities: [] }, { omitPermissionsCheck: true })
|
|
27
|
+
*/
|
|
28
|
+
class QaScorecardTemplateDb extends db_provider_1.DbProvider {
|
|
29
|
+
constructor(principal, dbService, defaultOptions) {
|
|
30
|
+
super(principal, dbService, defaultOptions);
|
|
31
|
+
this.moduleName = 'SupportModule';
|
|
32
|
+
this.entityName = 'QaScorecardTemplate';
|
|
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 qaevaluation() {
|
|
42
|
+
if (!this._qaevaluation) {
|
|
43
|
+
this._qaevaluation = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:QaScorecardTemplate', 'SupportModule:QaEvaluation', 'QaScorecardTemplate__QaEvaluation');
|
|
44
|
+
}
|
|
45
|
+
return this._qaevaluation;
|
|
46
|
+
}
|
|
47
|
+
get qascorecardquestion() {
|
|
48
|
+
if (!this._qascorecardquestion) {
|
|
49
|
+
this._qascorecardquestion = new db_record_link_manager_1.DbRecordLinkManager(this.principal, this.dbService, 'SupportModule:QaScorecardTemplate', 'SupportModule:QaScorecardQuestion', 'QaScorecardTemplate__QaScorecardQuestion');
|
|
50
|
+
}
|
|
51
|
+
return this._qascorecardquestion;
|
|
52
|
+
}
|
|
53
|
+
// ============================================
|
|
54
|
+
// STANDARD METHODS
|
|
55
|
+
// ============================================
|
|
56
|
+
// Methods support separate query options and provider options for clean API
|
|
57
|
+
setRecord(sourceRecord) {
|
|
58
|
+
this.sourceRecord = sourceRecord;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Search records with manual pagination control
|
|
62
|
+
* @param params - Search parameters
|
|
63
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
64
|
+
*/
|
|
65
|
+
searchRecords(params, providerOptions) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
return yield this._searchRecords(this.moduleName, this.entityName, params, providerOptions);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Search all records with automatic pagination
|
|
72
|
+
* @param params - Search parameters
|
|
73
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
74
|
+
*/
|
|
75
|
+
searchAllRecordsAndPaginate(params, providerOptions) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
return yield this._searchAllRecordsAndPaginate(this.moduleName, this.entityName, params, 0, providerOptions);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get a single record by primary key
|
|
82
|
+
* @param qaScorecardTemplateId - Record ID
|
|
83
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
84
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* // Simple get
|
|
88
|
+
* const record = await db.getByPrimaryKey(id);
|
|
89
|
+
*
|
|
90
|
+
* // With related entities
|
|
91
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['InvoiceItem', 'Transaction'] });
|
|
92
|
+
*
|
|
93
|
+
* // With permissions bypass
|
|
94
|
+
* const record = await db.getByPrimaryKey(id, {}, { omitPermissionsCheck: true });
|
|
95
|
+
*
|
|
96
|
+
* // Both options
|
|
97
|
+
* const record = await db.getByPrimaryKey(id, { entities: ['Invoice'] }, { omitPermissionsCheck: true });
|
|
98
|
+
*/
|
|
99
|
+
getByPrimaryKey(qaScorecardTemplateId, queryOptions, providerOptions) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const res = yield this._getByPrimaryKey(this.moduleName, this.entityName, qaScorecardTemplateId, queryOptions, providerOptions);
|
|
102
|
+
if (res)
|
|
103
|
+
this.setRecord(res);
|
|
104
|
+
return res;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get multiple records by primary keys
|
|
109
|
+
* @param qaScorecardTemplateIds - Array of record IDs
|
|
110
|
+
* @param queryOptions - Query options (WHAT: entities to include)
|
|
111
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
112
|
+
*/
|
|
113
|
+
getManyByPrimaryKey(qaScorecardTemplateIds, queryOptions, providerOptions) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this._getManyByPrimaryKey(this.moduleName, this.entityName, qaScorecardTemplateIds, queryOptions, providerOptions);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Upsert a single record
|
|
120
|
+
* @param upsertDto - Record to upsert
|
|
121
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
122
|
+
*/
|
|
123
|
+
upsert(upsertDto, providerOptions) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const res = yield this._upsert(this.moduleName, this.entityName, [upsertDto], providerOptions);
|
|
126
|
+
return res[0];
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Upsert multiple records
|
|
131
|
+
* @param upsertDtos - Records to upsert
|
|
132
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
133
|
+
*/
|
|
134
|
+
upsertMany(upsertDtos, providerOptions) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
return yield this._upsert(this.moduleName, this.entityName, upsertDtos, providerOptions);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Update a single record
|
|
141
|
+
* @param updateDto - Record to update
|
|
142
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
143
|
+
*/
|
|
144
|
+
update(updateDto, providerOptions) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const res = yield this._update(this.moduleName, this.entityName, [updateDto], providerOptions);
|
|
147
|
+
return res[0];
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Update multiple records
|
|
152
|
+
* @param updateDtos - Records to update
|
|
153
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
154
|
+
*/
|
|
155
|
+
updateMany(updateDtos, providerOptions) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return yield this._update(this.moduleName, this.entityName, updateDtos, providerOptions);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Delete one or many records
|
|
162
|
+
* @param qaScorecardTemplateIds - Record IDs to delete
|
|
163
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
164
|
+
*/
|
|
165
|
+
delete(qaScorecardTemplateIds, providerOptions) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
return yield this._delete(this.moduleName, this.entityName, qaScorecardTemplateIds, providerOptions);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Restore one or many deleted records
|
|
172
|
+
* @param qaScorecardTemplateIds - Record IDs to restore
|
|
173
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
174
|
+
*/
|
|
175
|
+
restore(qaScorecardTemplateIds, providerOptions) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
return yield this._restore(this.moduleName, this.entityName, qaScorecardTemplateIds, providerOptions);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Apply an action to a record
|
|
182
|
+
* @param actionName - The action key
|
|
183
|
+
* @param dto - The action DTO
|
|
184
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
185
|
+
*/
|
|
186
|
+
applyAction(actionName, dto, providerOptions) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
return yield this._applyAction(this.moduleName, this.entityName, dto, providerOptions);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Get version history for the current source record
|
|
193
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
194
|
+
*/
|
|
195
|
+
getVersions(providerOptions) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
return yield this._getVersions(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Get revision timeline for the current source record
|
|
202
|
+
* @param providerOptions - Provider options (HOW: omitPermissionsCheck)
|
|
203
|
+
*/
|
|
204
|
+
getRevisionTimeline(providerOptions) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
return yield this._getRevisionTimeline(this.moduleName, this.entityName, this.sourceRecord.id, providerOptions);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
exports.QaScorecardTemplateDb = QaScorecardTemplateDb;
|
|
@@ -35,6 +35,8 @@ import { OutboundDialCampaignCaseProperties } from './OutboundDialCampaignCase';
|
|
|
35
35
|
import { OutboundDialSessionProperties } from './OutboundDialSession';
|
|
36
36
|
import { CallProperties } from './Call';
|
|
37
37
|
import { QaReportProperties } from './QaReport';
|
|
38
|
+
import { QaEvaluationProperties } from './QaEvaluation';
|
|
39
|
+
import { CoachingSessionProperties } from './CoachingSession';
|
|
38
40
|
/**
|
|
39
41
|
* Available types for Case records
|
|
40
42
|
*/
|
|
@@ -2245,6 +2247,10 @@ export declare class Case extends OdinRecord<CaseProperties> {
|
|
|
2245
2247
|
Call: OdinLink<LinkedOdinRecord<CallProperties>>;
|
|
2246
2248
|
/** Linked QaReport records (Case__QaReport) */
|
|
2247
2249
|
QaReport: OdinLink<LinkedOdinRecord<QaReportProperties>>;
|
|
2250
|
+
/** Linked QaEvaluation records (Case__QaEvaluation) */
|
|
2251
|
+
QaEvaluation: OdinLink<LinkedOdinRecord<QaEvaluationProperties>>;
|
|
2252
|
+
/** Linked CoachingSession records (Case__CoachingSession) */
|
|
2253
|
+
CoachingSession: OdinLink<LinkedOdinRecord<CoachingSessionProperties>>;
|
|
2248
2254
|
}
|
|
2249
2255
|
/**
|
|
2250
2256
|
* RabbitMQ routing keys for Case events
|
|
@@ -2348,3 +2354,11 @@ export declare const ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_DELETED = "Supp
|
|
|
2348
2354
|
export declare const ROUTING_KEY_LINK_CASE_QA_REPORT_CREATED = "SupportModule.Case.QaReport.SubDbRecordAssociationCreated";
|
|
2349
2355
|
/** Event: Case__QaReport link deleted */
|
|
2350
2356
|
export declare const ROUTING_KEY_LINK_CASE_QA_REPORT_DELETED = "SupportModule.Case.QaReport.SubDbRecordAssociationDeleted";
|
|
2357
|
+
/** Event: Case__QaEvaluation link created */
|
|
2358
|
+
export declare const ROUTING_KEY_LINK_CASE_QA_EVALUATION_CREATED = "SupportModule.Case.QaEvaluation.SubDbRecordAssociationCreated";
|
|
2359
|
+
/** Event: Case__QaEvaluation link deleted */
|
|
2360
|
+
export declare const ROUTING_KEY_LINK_CASE_QA_EVALUATION_DELETED = "SupportModule.Case.QaEvaluation.SubDbRecordAssociationDeleted";
|
|
2361
|
+
/** Event: Case__CoachingSession link created */
|
|
2362
|
+
export declare const ROUTING_KEY_LINK_CASE_COACHING_SESSION_CREATED = "SupportModule.Case.CoachingSession.SubDbRecordAssociationCreated";
|
|
2363
|
+
/** Event: Case__CoachingSession link deleted */
|
|
2364
|
+
export declare const ROUTING_KEY_LINK_CASE_COACHING_SESSION_DELETED = "SupportModule.Case.CoachingSession.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_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;
|
|
16
|
+
exports.ROUTING_KEY_LINK_CASE_COACHING_SESSION_DELETED = exports.ROUTING_KEY_LINK_CASE_COACHING_SESSION_CREATED = exports.ROUTING_KEY_LINK_CASE_QA_EVALUATION_DELETED = exports.ROUTING_KEY_LINK_CASE_QA_EVALUATION_CREATED = 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
|
|
@@ -1187,3 +1187,11 @@ exports.ROUTING_KEY_LINK_OUTBOUND_DIAL_SESSION_CASE_DELETED = 'SupportModule.Cas
|
|
|
1187
1187
|
exports.ROUTING_KEY_LINK_CASE_QA_REPORT_CREATED = 'SupportModule.Case.QaReport.SubDbRecordAssociationCreated';
|
|
1188
1188
|
/** Event: Case__QaReport link deleted */
|
|
1189
1189
|
exports.ROUTING_KEY_LINK_CASE_QA_REPORT_DELETED = 'SupportModule.Case.QaReport.SubDbRecordAssociationDeleted';
|
|
1190
|
+
/** Event: Case__QaEvaluation link created */
|
|
1191
|
+
exports.ROUTING_KEY_LINK_CASE_QA_EVALUATION_CREATED = 'SupportModule.Case.QaEvaluation.SubDbRecordAssociationCreated';
|
|
1192
|
+
/** Event: Case__QaEvaluation link deleted */
|
|
1193
|
+
exports.ROUTING_KEY_LINK_CASE_QA_EVALUATION_DELETED = 'SupportModule.Case.QaEvaluation.SubDbRecordAssociationDeleted';
|
|
1194
|
+
/** Event: Case__CoachingSession link created */
|
|
1195
|
+
exports.ROUTING_KEY_LINK_CASE_COACHING_SESSION_CREATED = 'SupportModule.Case.CoachingSession.SubDbRecordAssociationCreated';
|
|
1196
|
+
/** Event: Case__CoachingSession link deleted */
|
|
1197
|
+
exports.ROUTING_KEY_LINK_CASE_COACHING_SESSION_DELETED = 'SupportModule.Case.CoachingSession.SubDbRecordAssociationDeleted';
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CoachingSession Entity Definition
|
|
3
|
+
*
|
|
4
|
+
* One coaching conversation with one agent, normally created from a submitted QA evaluation. Tracked to completion, acknowledged by the agent, and measured by the change in their QA scores either side.
|
|
5
|
+
*
|
|
6
|
+
* @module SupportModule
|
|
7
|
+
* @entity CoachingSession
|
|
8
|
+
* @schemaId d1cf0d88-2b19-4ae1-b565-8d1b04e50522
|
|
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 { QaEvaluationProperties } from './QaEvaluation';
|
|
15
|
+
import { CaseProperties } from './Case';
|
|
16
|
+
/**
|
|
17
|
+
* Available types for CoachingSession records
|
|
18
|
+
*/
|
|
19
|
+
export declare enum CoachingSessionEntityTypes {
|
|
20
|
+
/** This is the default record type */
|
|
21
|
+
DEFAULT = "DEFAULT"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pipeline stage names for DEFAULT CoachingSession
|
|
25
|
+
* Pipeline: Coaching Session Pipeline
|
|
26
|
+
* Scheduled → Completed → Acknowledged, with Cancelled reachable from either live stage. Overdue is NOT a stage: it is Scheduled with DueAt in the past, derived at read time.
|
|
27
|
+
*/
|
|
28
|
+
export declare enum DefaultCoachingSessionStageNames {
|
|
29
|
+
/** Booked, not yet held. Reads as overdue wherever DueAt has passed. (default) */
|
|
30
|
+
Scheduled = "Scheduled",
|
|
31
|
+
/** The conversation happened and the coach recorded what was agreed. Not terminal — the agent has not yet confirmed understanding. */
|
|
32
|
+
Completed = "Completed",
|
|
33
|
+
/** The coached agent confirmed understanding. The success state, and the only one that shows the process actually worked. (success) */
|
|
34
|
+
Acknowledged = "Acknowledged",
|
|
35
|
+
/** The session will not happen. Excluded from the completion-rate denominator, so cancelling is never a way to improve the number. (fail) */
|
|
36
|
+
Cancelled = "Cancelled"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Pipeline stage keys for DEFAULT CoachingSession
|
|
40
|
+
* Use these keys when transitioning between stages
|
|
41
|
+
*/
|
|
42
|
+
export declare enum DefaultCoachingSessionStageKeys {
|
|
43
|
+
/** Booked, not yet held. Reads as overdue wherever DueAt has passed. */
|
|
44
|
+
CoachingSessionStageScheduled = "CoachingSessionStageScheduled",
|
|
45
|
+
/** The conversation happened and the coach recorded what was agreed. Not terminal — the agent has not yet confirmed understanding. */
|
|
46
|
+
CoachingSessionStageCompleted = "CoachingSessionStageCompleted",
|
|
47
|
+
/** The coached agent confirmed understanding. The success state, and the only one that shows the process actually worked. */
|
|
48
|
+
CoachingSessionStageAcknowledged = "CoachingSessionStageAcknowledged",
|
|
49
|
+
/** The session will not happen. Excluded from the completion-rate denominator, so cancelling is never a way to improve the number. */
|
|
50
|
+
CoachingSessionStageCancelled = "CoachingSessionStageCancelled"
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Valid values for CoachingSession.FocusArea
|
|
54
|
+
*
|
|
55
|
+
* What the session is about, for reporting across a team.
|
|
56
|
+
*
|
|
57
|
+
* @remarks Available options:
|
|
58
|
+
* - `COMPLIANCE` - Compliance
|
|
59
|
+
* - `PROCESS` - Process
|
|
60
|
+
* - `SKILLS` - Skills
|
|
61
|
+
* - `SOFT_SKILLS` - Soft skills
|
|
62
|
+
*/
|
|
63
|
+
export declare enum CoachingSessionFocusArea {
|
|
64
|
+
COMPLIANCE = "COMPLIANCE",
|
|
65
|
+
PROCESS = "PROCESS",
|
|
66
|
+
SKILLS = "SKILLS",
|
|
67
|
+
SOFT_SKILLS = "SOFT_SKILLS"
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Property keys for CoachingSession
|
|
71
|
+
* Use these constants instead of string literals for type safety
|
|
72
|
+
*/
|
|
73
|
+
export declare enum CoachingSessionPropertyKeys {
|
|
74
|
+
/** Point-in-time name of the coached agent. */
|
|
75
|
+
AgentName = "AgentName",
|
|
76
|
+
/** Who is running the session — the principal that created it. */
|
|
77
|
+
CoachId = "CoachId",
|
|
78
|
+
/** What the session is about, for reporting across a team. */
|
|
79
|
+
FocusArea = "FocusArea",
|
|
80
|
+
/** The coach’s commitment. A Scheduled session past this date reads as overdue — derived at read time, never stored as a stage. */
|
|
81
|
+
DueAt = "DueAt",
|
|
82
|
+
/** When the agent confirmed understanding. Only the coached agent can set it; a coach cannot acknowledge on their behalf. */
|
|
83
|
+
AgentAcknowledgedAt = "AgentAcknowledgedAt",
|
|
84
|
+
/** The evaluation that triggered the session, if any. Coaching can also be raised directly against a Case. */
|
|
85
|
+
SourceQaEvaluationId = "SourceQaEvaluationId",
|
|
86
|
+
/** Point-in-time name of the coach. */
|
|
87
|
+
CoachName = "CoachName",
|
|
88
|
+
/** The agent’s team when the session was created. */
|
|
89
|
+
TeamId = "TeamId",
|
|
90
|
+
/** Scorecard question ids that triggered the session, e.g. ["EMAIL.BEHAV.12"]. Ids rather than prose so recurring themes and repeat failures are countable across a team. */
|
|
91
|
+
Themes = "Themes",
|
|
92
|
+
/** When the conversation happened. The anchor for the effectiveness windows — the agent’s scores 30 days either side of this. */
|
|
93
|
+
CompletedAt = "CompletedAt",
|
|
94
|
+
/** The coached agent. Only this user may acknowledge the session. */
|
|
95
|
+
AgentId = "AgentId",
|
|
96
|
+
/** Why the session was raised, in the coach’s words. */
|
|
97
|
+
Reason = "Reason",
|
|
98
|
+
/** What the agent agreed to do differently. */
|
|
99
|
+
ActionItems = "ActionItems",
|
|
100
|
+
/** What good looks like next time — what the follow-up will be measured against. */
|
|
101
|
+
ExpectedOutcome = "ExpectedOutcome",
|
|
102
|
+
/** When the session is booked for. */
|
|
103
|
+
ScheduledAt = "ScheduledAt",
|
|
104
|
+
/** The previous session this one follows up, so a reassessment chain can be read end to end. */
|
|
105
|
+
FollowUpOfId = "FollowUpOfId"
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Properties for CoachingSession records
|
|
109
|
+
*
|
|
110
|
+
* @see SupportModule:CoachingSession
|
|
111
|
+
*/
|
|
112
|
+
export interface CoachingSessionProperties {
|
|
113
|
+
/** Point-in-time name of the coached agent.
|
|
114
|
+
*
|
|
115
|
+
* @type {TEXT}
|
|
116
|
+
* @default
|
|
117
|
+
*/
|
|
118
|
+
AgentName: string;
|
|
119
|
+
/** Who is running the session — the principal that created it.
|
|
120
|
+
*
|
|
121
|
+
* @type {TEXT}
|
|
122
|
+
* @default
|
|
123
|
+
*/
|
|
124
|
+
CoachId: string;
|
|
125
|
+
/** What the session is about, for reporting across a team.
|
|
126
|
+
*
|
|
127
|
+
* @type {ENUM}
|
|
128
|
+
* @default
|
|
129
|
+
* @enum {CoachingSessionFocusArea}
|
|
130
|
+
*/
|
|
131
|
+
FocusArea: CoachingSessionFocusArea;
|
|
132
|
+
/** The coach’s commitment. A Scheduled session past this date reads as overdue — derived at read time, never stored as a stage.
|
|
133
|
+
*
|
|
134
|
+
* @type {DATE_TIME}
|
|
135
|
+
* @default
|
|
136
|
+
*/
|
|
137
|
+
DueAt: string;
|
|
138
|
+
/** When the agent confirmed understanding. Only the coached agent can set it; a coach cannot acknowledge on their behalf.
|
|
139
|
+
*
|
|
140
|
+
* @type {DATE_TIME}
|
|
141
|
+
* @default
|
|
142
|
+
*/
|
|
143
|
+
AgentAcknowledgedAt: string;
|
|
144
|
+
/** The evaluation that triggered the session, if any. Coaching can also be raised directly against a Case.
|
|
145
|
+
*
|
|
146
|
+
* @type {TEXT}
|
|
147
|
+
* @default
|
|
148
|
+
*/
|
|
149
|
+
SourceQaEvaluationId: string;
|
|
150
|
+
/** Point-in-time name of the coach.
|
|
151
|
+
*
|
|
152
|
+
* @type {TEXT}
|
|
153
|
+
* @default
|
|
154
|
+
*/
|
|
155
|
+
CoachName: string;
|
|
156
|
+
/** The agent’s team when the session was created.
|
|
157
|
+
*
|
|
158
|
+
* @type {TEXT}
|
|
159
|
+
* @default
|
|
160
|
+
*/
|
|
161
|
+
TeamId: string;
|
|
162
|
+
/** Scorecard question ids that triggered the session, e.g. ["EMAIL.BEHAV.12"]. Ids rather than prose so recurring themes and repeat failures are countable across a team.
|
|
163
|
+
*
|
|
164
|
+
* @type {JSON}
|
|
165
|
+
* @default
|
|
166
|
+
*/
|
|
167
|
+
Themes: string;
|
|
168
|
+
/** When the conversation happened. The anchor for the effectiveness windows — the agent’s scores 30 days either side of this.
|
|
169
|
+
*
|
|
170
|
+
* @type {DATE_TIME}
|
|
171
|
+
* @default
|
|
172
|
+
*/
|
|
173
|
+
CompletedAt: string;
|
|
174
|
+
/** The coached agent. Only this user may acknowledge the session.
|
|
175
|
+
*
|
|
176
|
+
* @type {TEXT}
|
|
177
|
+
* @default
|
|
178
|
+
*/
|
|
179
|
+
AgentId: string;
|
|
180
|
+
/** Why the session was raised, in the coach’s words.
|
|
181
|
+
*
|
|
182
|
+
* @type {TEXT_LONG}
|
|
183
|
+
* @default
|
|
184
|
+
*/
|
|
185
|
+
Reason: string;
|
|
186
|
+
/** What the agent agreed to do differently.
|
|
187
|
+
*
|
|
188
|
+
* @type {TEXT_LONG}
|
|
189
|
+
* @default
|
|
190
|
+
*/
|
|
191
|
+
ActionItems: string;
|
|
192
|
+
/** What good looks like next time — what the follow-up will be measured against.
|
|
193
|
+
*
|
|
194
|
+
* @type {TEXT_LONG}
|
|
195
|
+
* @default
|
|
196
|
+
*/
|
|
197
|
+
ExpectedOutcome: string;
|
|
198
|
+
/** When the session is booked for.
|
|
199
|
+
*
|
|
200
|
+
* @type {DATE_TIME}
|
|
201
|
+
* @default
|
|
202
|
+
*/
|
|
203
|
+
ScheduledAt: string;
|
|
204
|
+
/** The previous session this one follows up, so a reassessment chain can be read end to end.
|
|
205
|
+
*
|
|
206
|
+
* @type {TEXT}
|
|
207
|
+
* @default
|
|
208
|
+
*/
|
|
209
|
+
FollowUpOfId: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* CoachingSession entity from SupportModule
|
|
213
|
+
*
|
|
214
|
+
* One coaching conversation with one agent, normally created from a submitted QA evaluation. Tracked to completion, acknowledged by the agent, and measured by the change in their QA scores either side.
|
|
215
|
+
*
|
|
216
|
+
* @module SupportModule
|
|
217
|
+
* @entity CoachingSession
|
|
218
|
+
* @schemaId d1cf0d88-2b19-4ae1-b565-8d1b04e50522
|
|
219
|
+
* @recordPrefix COACH
|
|
220
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
221
|
+
*/
|
|
222
|
+
export declare class CoachingSession extends OdinRecord<CoachingSessionProperties> {
|
|
223
|
+
entity: 'SupportModule:CoachingSession';
|
|
224
|
+
type: CoachingSessionEntityTypes;
|
|
225
|
+
schemaId: 'd1cf0d88-2b19-4ae1-b565-8d1b04e50522';
|
|
226
|
+
properties: CoachingSessionProperties;
|
|
227
|
+
/** Linked QaEvaluation records (QaEvaluation__CoachingSession) */
|
|
228
|
+
QaEvaluation: OdinLink<LinkedOdinRecord<QaEvaluationProperties>>;
|
|
229
|
+
/** Linked Case records (Case__CoachingSession) */
|
|
230
|
+
Case: OdinLink<LinkedOdinRecord<CaseProperties>>;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* RabbitMQ routing keys for CoachingSession events
|
|
234
|
+
*/
|
|
235
|
+
export declare const ROUTING_KEY_COACHING_SESSION_CREATED = "SupportModule.CoachingSession.SubDbRecordCreated";
|
|
236
|
+
export declare const ROUTING_KEY_COACHING_SESSION_UPDATED = "SupportModule.CoachingSession.SubDbRecordUpdated";
|
|
237
|
+
export declare const ROUTING_KEY_COACHING_SESSION_DELETED = "SupportModule.CoachingSession.SubDbRecordDeleted";
|
|
238
|
+
/**
|
|
239
|
+
* Type-specific routing keys for CoachingSession events
|
|
240
|
+
* Subscribe to these for events on specific entity types only
|
|
241
|
+
*/
|
|
242
|
+
/** This is the default record type created */
|
|
243
|
+
export declare const ROUTING_KEY_COACHING_SESSION_DEFAULT_CREATED = "SupportModule.CoachingSession.DEFAULT.SubDbRecordCreated";
|
|
244
|
+
/** This is the default record type updated */
|
|
245
|
+
export declare const ROUTING_KEY_COACHING_SESSION_DEFAULT_UPDATED = "SupportModule.CoachingSession.DEFAULT.SubDbRecordUpdated";
|
|
246
|
+
/** This is the default record type deleted */
|
|
247
|
+
export declare const ROUTING_KEY_COACHING_SESSION_DEFAULT_DELETED = "SupportModule.CoachingSession.DEFAULT.SubDbRecordDeleted";
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CoachingSession Entity Definition
|
|
4
|
+
*
|
|
5
|
+
* One coaching conversation with one agent, normally created from a submitted QA evaluation. Tracked to completion, acknowledged by the agent, and measured by the change in their QA scores either side.
|
|
6
|
+
*
|
|
7
|
+
* @module SupportModule
|
|
8
|
+
* @entity CoachingSession
|
|
9
|
+
* @schemaId d1cf0d88-2b19-4ae1-b565-8d1b04e50522
|
|
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_COACHING_SESSION_DEFAULT_DELETED = exports.ROUTING_KEY_COACHING_SESSION_DEFAULT_UPDATED = exports.ROUTING_KEY_COACHING_SESSION_DEFAULT_CREATED = exports.ROUTING_KEY_COACHING_SESSION_DELETED = exports.ROUTING_KEY_COACHING_SESSION_UPDATED = exports.ROUTING_KEY_COACHING_SESSION_CREATED = exports.CoachingSession = exports.CoachingSessionPropertyKeys = exports.CoachingSessionFocusArea = exports.DefaultCoachingSessionStageKeys = exports.DefaultCoachingSessionStageNames = exports.CoachingSessionEntityTypes = void 0;
|
|
16
|
+
const core_1 = require("@d19n/odin-types/dist/core");
|
|
17
|
+
/**
|
|
18
|
+
* Available types for CoachingSession records
|
|
19
|
+
*/
|
|
20
|
+
var CoachingSessionEntityTypes;
|
|
21
|
+
(function (CoachingSessionEntityTypes) {
|
|
22
|
+
/** This is the default record type */
|
|
23
|
+
CoachingSessionEntityTypes["DEFAULT"] = "DEFAULT";
|
|
24
|
+
})(CoachingSessionEntityTypes = exports.CoachingSessionEntityTypes || (exports.CoachingSessionEntityTypes = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Pipeline stage names for DEFAULT CoachingSession
|
|
27
|
+
* Pipeline: Coaching Session Pipeline
|
|
28
|
+
* Scheduled → Completed → Acknowledged, with Cancelled reachable from either live stage. Overdue is NOT a stage: it is Scheduled with DueAt in the past, derived at read time.
|
|
29
|
+
*/
|
|
30
|
+
var DefaultCoachingSessionStageNames;
|
|
31
|
+
(function (DefaultCoachingSessionStageNames) {
|
|
32
|
+
/** Booked, not yet held. Reads as overdue wherever DueAt has passed. (default) */
|
|
33
|
+
DefaultCoachingSessionStageNames["Scheduled"] = "Scheduled";
|
|
34
|
+
/** The conversation happened and the coach recorded what was agreed. Not terminal — the agent has not yet confirmed understanding. */
|
|
35
|
+
DefaultCoachingSessionStageNames["Completed"] = "Completed";
|
|
36
|
+
/** The coached agent confirmed understanding. The success state, and the only one that shows the process actually worked. (success) */
|
|
37
|
+
DefaultCoachingSessionStageNames["Acknowledged"] = "Acknowledged";
|
|
38
|
+
/** The session will not happen. Excluded from the completion-rate denominator, so cancelling is never a way to improve the number. (fail) */
|
|
39
|
+
DefaultCoachingSessionStageNames["Cancelled"] = "Cancelled";
|
|
40
|
+
})(DefaultCoachingSessionStageNames = exports.DefaultCoachingSessionStageNames || (exports.DefaultCoachingSessionStageNames = {}));
|
|
41
|
+
/**
|
|
42
|
+
* Pipeline stage keys for DEFAULT CoachingSession
|
|
43
|
+
* Use these keys when transitioning between stages
|
|
44
|
+
*/
|
|
45
|
+
var DefaultCoachingSessionStageKeys;
|
|
46
|
+
(function (DefaultCoachingSessionStageKeys) {
|
|
47
|
+
/** Booked, not yet held. Reads as overdue wherever DueAt has passed. */
|
|
48
|
+
DefaultCoachingSessionStageKeys["CoachingSessionStageScheduled"] = "CoachingSessionStageScheduled";
|
|
49
|
+
/** The conversation happened and the coach recorded what was agreed. Not terminal — the agent has not yet confirmed understanding. */
|
|
50
|
+
DefaultCoachingSessionStageKeys["CoachingSessionStageCompleted"] = "CoachingSessionStageCompleted";
|
|
51
|
+
/** The coached agent confirmed understanding. The success state, and the only one that shows the process actually worked. */
|
|
52
|
+
DefaultCoachingSessionStageKeys["CoachingSessionStageAcknowledged"] = "CoachingSessionStageAcknowledged";
|
|
53
|
+
/** The session will not happen. Excluded from the completion-rate denominator, so cancelling is never a way to improve the number. */
|
|
54
|
+
DefaultCoachingSessionStageKeys["CoachingSessionStageCancelled"] = "CoachingSessionStageCancelled";
|
|
55
|
+
})(DefaultCoachingSessionStageKeys = exports.DefaultCoachingSessionStageKeys || (exports.DefaultCoachingSessionStageKeys = {}));
|
|
56
|
+
/**
|
|
57
|
+
* Valid values for CoachingSession.FocusArea
|
|
58
|
+
*
|
|
59
|
+
* What the session is about, for reporting across a team.
|
|
60
|
+
*
|
|
61
|
+
* @remarks Available options:
|
|
62
|
+
* - `COMPLIANCE` - Compliance
|
|
63
|
+
* - `PROCESS` - Process
|
|
64
|
+
* - `SKILLS` - Skills
|
|
65
|
+
* - `SOFT_SKILLS` - Soft skills
|
|
66
|
+
*/
|
|
67
|
+
var CoachingSessionFocusArea;
|
|
68
|
+
(function (CoachingSessionFocusArea) {
|
|
69
|
+
CoachingSessionFocusArea["COMPLIANCE"] = "COMPLIANCE";
|
|
70
|
+
CoachingSessionFocusArea["PROCESS"] = "PROCESS";
|
|
71
|
+
CoachingSessionFocusArea["SKILLS"] = "SKILLS";
|
|
72
|
+
CoachingSessionFocusArea["SOFT_SKILLS"] = "SOFT_SKILLS";
|
|
73
|
+
})(CoachingSessionFocusArea = exports.CoachingSessionFocusArea || (exports.CoachingSessionFocusArea = {}));
|
|
74
|
+
/**
|
|
75
|
+
* Property keys for CoachingSession
|
|
76
|
+
* Use these constants instead of string literals for type safety
|
|
77
|
+
*/
|
|
78
|
+
var CoachingSessionPropertyKeys;
|
|
79
|
+
(function (CoachingSessionPropertyKeys) {
|
|
80
|
+
/** Point-in-time name of the coached agent. */
|
|
81
|
+
CoachingSessionPropertyKeys["AgentName"] = "AgentName";
|
|
82
|
+
/** Who is running the session — the principal that created it. */
|
|
83
|
+
CoachingSessionPropertyKeys["CoachId"] = "CoachId";
|
|
84
|
+
/** What the session is about, for reporting across a team. */
|
|
85
|
+
CoachingSessionPropertyKeys["FocusArea"] = "FocusArea";
|
|
86
|
+
/** The coach’s commitment. A Scheduled session past this date reads as overdue — derived at read time, never stored as a stage. */
|
|
87
|
+
CoachingSessionPropertyKeys["DueAt"] = "DueAt";
|
|
88
|
+
/** When the agent confirmed understanding. Only the coached agent can set it; a coach cannot acknowledge on their behalf. */
|
|
89
|
+
CoachingSessionPropertyKeys["AgentAcknowledgedAt"] = "AgentAcknowledgedAt";
|
|
90
|
+
/** The evaluation that triggered the session, if any. Coaching can also be raised directly against a Case. */
|
|
91
|
+
CoachingSessionPropertyKeys["SourceQaEvaluationId"] = "SourceQaEvaluationId";
|
|
92
|
+
/** Point-in-time name of the coach. */
|
|
93
|
+
CoachingSessionPropertyKeys["CoachName"] = "CoachName";
|
|
94
|
+
/** The agent’s team when the session was created. */
|
|
95
|
+
CoachingSessionPropertyKeys["TeamId"] = "TeamId";
|
|
96
|
+
/** Scorecard question ids that triggered the session, e.g. ["EMAIL.BEHAV.12"]. Ids rather than prose so recurring themes and repeat failures are countable across a team. */
|
|
97
|
+
CoachingSessionPropertyKeys["Themes"] = "Themes";
|
|
98
|
+
/** When the conversation happened. The anchor for the effectiveness windows — the agent’s scores 30 days either side of this. */
|
|
99
|
+
CoachingSessionPropertyKeys["CompletedAt"] = "CompletedAt";
|
|
100
|
+
/** The coached agent. Only this user may acknowledge the session. */
|
|
101
|
+
CoachingSessionPropertyKeys["AgentId"] = "AgentId";
|
|
102
|
+
/** Why the session was raised, in the coach’s words. */
|
|
103
|
+
CoachingSessionPropertyKeys["Reason"] = "Reason";
|
|
104
|
+
/** What the agent agreed to do differently. */
|
|
105
|
+
CoachingSessionPropertyKeys["ActionItems"] = "ActionItems";
|
|
106
|
+
/** What good looks like next time — what the follow-up will be measured against. */
|
|
107
|
+
CoachingSessionPropertyKeys["ExpectedOutcome"] = "ExpectedOutcome";
|
|
108
|
+
/** When the session is booked for. */
|
|
109
|
+
CoachingSessionPropertyKeys["ScheduledAt"] = "ScheduledAt";
|
|
110
|
+
/** The previous session this one follows up, so a reassessment chain can be read end to end. */
|
|
111
|
+
CoachingSessionPropertyKeys["FollowUpOfId"] = "FollowUpOfId";
|
|
112
|
+
})(CoachingSessionPropertyKeys = exports.CoachingSessionPropertyKeys || (exports.CoachingSessionPropertyKeys = {}));
|
|
113
|
+
/**
|
|
114
|
+
* CoachingSession entity from SupportModule
|
|
115
|
+
*
|
|
116
|
+
* One coaching conversation with one agent, normally created from a submitted QA evaluation. Tracked to completion, acknowledged by the agent, and measured by the change in their QA scores either side.
|
|
117
|
+
*
|
|
118
|
+
* @module SupportModule
|
|
119
|
+
* @entity CoachingSession
|
|
120
|
+
* @schemaId d1cf0d88-2b19-4ae1-b565-8d1b04e50522
|
|
121
|
+
* @recordPrefix COACH
|
|
122
|
+
* @capabilities searchable, updateable, undeletable, triggerable
|
|
123
|
+
*/
|
|
124
|
+
class CoachingSession extends core_1.OdinRecord {
|
|
125
|
+
}
|
|
126
|
+
exports.CoachingSession = CoachingSession;
|
|
127
|
+
// ============================================
|
|
128
|
+
// RABBITMQ EVENT ROUTING KEYS
|
|
129
|
+
// ============================================
|
|
130
|
+
/**
|
|
131
|
+
* RabbitMQ routing keys for CoachingSession events
|
|
132
|
+
*/
|
|
133
|
+
exports.ROUTING_KEY_COACHING_SESSION_CREATED = 'SupportModule.CoachingSession.SubDbRecordCreated';
|
|
134
|
+
exports.ROUTING_KEY_COACHING_SESSION_UPDATED = 'SupportModule.CoachingSession.SubDbRecordUpdated';
|
|
135
|
+
exports.ROUTING_KEY_COACHING_SESSION_DELETED = 'SupportModule.CoachingSession.SubDbRecordDeleted';
|
|
136
|
+
/**
|
|
137
|
+
* Type-specific routing keys for CoachingSession events
|
|
138
|
+
* Subscribe to these for events on specific entity types only
|
|
139
|
+
*/
|
|
140
|
+
/** This is the default record type created */
|
|
141
|
+
exports.ROUTING_KEY_COACHING_SESSION_DEFAULT_CREATED = 'SupportModule.CoachingSession.DEFAULT.SubDbRecordCreated';
|
|
142
|
+
/** This is the default record type updated */
|
|
143
|
+
exports.ROUTING_KEY_COACHING_SESSION_DEFAULT_UPDATED = 'SupportModule.CoachingSession.DEFAULT.SubDbRecordUpdated';
|
|
144
|
+
/** This is the default record type deleted */
|
|
145
|
+
exports.ROUTING_KEY_COACHING_SESSION_DEFAULT_DELETED = 'SupportModule.CoachingSession.DEFAULT.SubDbRecordDeleted';
|