@d19n/youfibre-odin-sdk 2.0.159 → 2.0.160
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.
|
@@ -98,9 +98,10 @@ export interface YfKciEffect {
|
|
|
98
98
|
*
|
|
99
99
|
* NOTE: `ChangeReasonRescheduleReason` does NOT map 1:1 to KCI types —
|
|
100
100
|
* the KCI only tells us *that* the supplier moved the slot, not the
|
|
101
|
-
* granular operational reason. We therefore stamp a single
|
|
102
|
-
*
|
|
103
|
-
* KCI reschedule rather than inventing a per-KCI mapping
|
|
101
|
+
* granular operational reason. We therefore stamp a single dedicated,
|
|
102
|
+
* cause-agnostic value (`SUPPLIER_RESCHEDULED_APPOINTMENT`) for every
|
|
103
|
+
* supplier-driven KCI reschedule rather than inventing a per-KCI mapping
|
|
104
|
+
* or borrowing a member that implies a specific cause.
|
|
104
105
|
*/
|
|
105
106
|
readonly rescheduleReason?: string;
|
|
106
107
|
};
|
|
@@ -198,7 +198,7 @@ exports.KCI_EFFECT_ROWS = [
|
|
|
198
198
|
supplierReferenceFrom: 'provideServiceOrder.appointmentReservationReference',
|
|
199
199
|
// REAPPOINTED is a supplier reschedule → update existing SA in place
|
|
200
200
|
// + record the SA_RESCHEDULE ChangeReason.
|
|
201
|
-
rescheduleReason: '
|
|
201
|
+
rescheduleReason: 'SUPPLIER_RESCHEDULED_APPOINTMENT',
|
|
202
202
|
},
|
|
203
203
|
// Co-effect: REAPPOINTED's dto also carries an updated
|
|
204
204
|
// `provideServiceOrder.committedDate` for the rebooked appointment.
|
|
@@ -343,7 +343,7 @@ exports.KCI_EFFECT_ROWS = [
|
|
|
343
343
|
dateFrom: 'appointmentDate',
|
|
344
344
|
timeBlockFrom: 'appointmentTimeBlock',
|
|
345
345
|
supplierReferenceFrom: 'provideServiceOrder.appointmentReservationReference',
|
|
346
|
-
rescheduleReason: '
|
|
346
|
+
rescheduleReason: 'SUPPLIER_RESCHEDULED_APPOINTMENT',
|
|
347
347
|
},
|
|
348
348
|
notes: 'Supplier-confirmed REMEDIATION reschedule. Update the WO ' +
|
|
349
349
|
'ServiceAppointment Date/TimeBlock in place, land the WO in Scheduled, ' +
|
|
@@ -412,7 +412,7 @@ exports.KCI_EFFECT_ROWS = [
|
|
|
412
412
|
dateFrom: 'appointmentDate',
|
|
413
413
|
timeBlockFrom: 'appointmentTimeBlock',
|
|
414
414
|
supplierReferenceFrom: 'provideServiceOrder.appointmentReservationReference',
|
|
415
|
-
rescheduleReason: '
|
|
415
|
+
rescheduleReason: 'SUPPLIER_RESCHEDULED_APPOINTMENT',
|
|
416
416
|
},
|
|
417
417
|
notes: 'Supplier-confirmed SERVICE reschedule. Update the WO ServiceAppointment ' +
|
|
418
418
|
'Date/TimeBlock in place, land the WO in Scheduled, and record the ' +
|
|
@@ -147,7 +147,7 @@ function run() {
|
|
|
147
147
|
if (decision.kind === 'WO_SCHEDULE_APPOINTMENT') {
|
|
148
148
|
assert('dateFrom=appointmentDate', decision.dateFrom === 'appointmentDate');
|
|
149
149
|
assert('timeBlockFrom=appointmentTimeBlock', decision.timeBlockFrom === 'appointmentTimeBlock');
|
|
150
|
-
assert('rescheduleReason=
|
|
150
|
+
assert('rescheduleReason=SUPPLIER_RESCHEDULED_APPOINTMENT', decision.rescheduleReason === 'SUPPLIER_RESCHEDULED_APPOINTMENT');
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
console.log('Test: SERVICE WORK_ORDER_RESCHEDULED → WO_SCHEDULE_APPOINTMENT (REPAIR reschedule)');
|
|
@@ -159,7 +159,7 @@ function run() {
|
|
|
159
159
|
assert('kind=WO_SCHEDULE_APPOINTMENT', decision.kind === 'WO_SCHEDULE_APPOINTMENT');
|
|
160
160
|
if (decision.kind === 'WO_SCHEDULE_APPOINTMENT') {
|
|
161
161
|
assert('row=repair-update-service-rescheduled', decision.row.id === 'repair-update-service-rescheduled');
|
|
162
|
-
assert('rescheduleReason=
|
|
162
|
+
assert('rescheduleReason=SUPPLIER_RESCHEDULED_APPOINTMENT', decision.rescheduleReason === 'SUPPLIER_RESCHEDULED_APPOINTMENT');
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
console.log('Test: REMEDIATION WORK_ORDER_RESCHEDULED → WO_SCHEDULE_APPOINTMENT (PROVIDE reschedule)');
|
|
@@ -171,7 +171,7 @@ function run() {
|
|
|
171
171
|
assert('kind=WO_SCHEDULE_APPOINTMENT', decision.kind === 'WO_SCHEDULE_APPOINTMENT');
|
|
172
172
|
if (decision.kind === 'WO_SCHEDULE_APPOINTMENT') {
|
|
173
173
|
assert('row=provide-update-remediation-rescheduled', decision.row.id === 'provide-update-remediation-rescheduled');
|
|
174
|
-
assert('rescheduleReason=
|
|
174
|
+
assert('rescheduleReason=SUPPLIER_RESCHEDULED_APPOINTMENT', decision.rescheduleReason === 'SUPPLIER_RESCHEDULED_APPOINTMENT');
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
console.log('Test: WARNING → LOG_KCI_ONLY');
|