@d19n/youfibre-odin-sdk 2.0.103 → 2.0.104
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.
|
@@ -57,10 +57,14 @@ export interface YfKciEffect {
|
|
|
57
57
|
* reference via the field-service scheduleAppointment service. The dispatcher
|
|
58
58
|
* extracts each property's value from the DTO at the JSONPath given by
|
|
59
59
|
* `*From` and POSTs to /FieldServiceModule/.../schedule-appointment with
|
|
60
|
-
* skipSupplierBooking=true (the KCI is the supplier's commit, not a request).
|
|
60
|
+
* skipSupplierBooking=true (the KCI is the supplier's commit, not a request).
|
|
61
|
+
*
|
|
62
|
+
* The target WO is resolved from `dto.tenantWorkOrderReference` at dispatch
|
|
63
|
+
* time; the field-service endpoint then picks the right Scheduled-stage key
|
|
64
|
+
* per WO type (INSTALL / SERVICE → WorkOrderStageScheduled, INSTALL_BUSINESS
|
|
65
|
+
* → BusinessInstallPipelineStageScheduled). No woType pin needed on the
|
|
66
|
+
* bridge row. */
|
|
61
67
|
readonly scheduleAppointment?: {
|
|
62
|
-
/** Which WO type the appointment lives on. */
|
|
63
|
-
readonly woType: 'INSTALL' | 'INSTALL_BUSINESS' | 'SERVICE';
|
|
64
68
|
/** JSONPath from KCI dto root for the appointment start datetime. */
|
|
65
69
|
readonly dateFrom: string;
|
|
66
70
|
/** JSONPath for the timeslot classification (WEEKDAY_AM / WEEKDAY_PM / etc.). */
|
|
@@ -100,7 +104,6 @@ export declare type KciDispatchDecision = {
|
|
|
100
104
|
} | {
|
|
101
105
|
kind: 'WO_SCHEDULE_APPOINTMENT';
|
|
102
106
|
row: KciEffectRow;
|
|
103
|
-
woType: 'INSTALL' | 'INSTALL_BUSINESS' | 'SERVICE';
|
|
104
107
|
dateFrom: string;
|
|
105
108
|
timeBlockFrom: string;
|
|
106
109
|
supplierReferenceFrom: string;
|
|
@@ -189,7 +189,6 @@ exports.KCI_EFFECT_ROWS = [
|
|
|
189
189
|
yfEffect: {
|
|
190
190
|
kind: 'WO_SCHEDULE_APPOINTMENT',
|
|
191
191
|
scheduleAppointment: {
|
|
192
|
-
woType: 'INSTALL',
|
|
193
192
|
dateFrom: 'provideServiceOrder.appointmentTimeslot.timeslotStartDateTime',
|
|
194
193
|
timeBlockFrom: 'provideServiceOrder.appointmentTimeslot.classification',
|
|
195
194
|
supplierReferenceFrom: 'provideServiceOrder.appointmentReservationReference',
|
|
@@ -197,7 +196,9 @@ exports.KCI_EFFECT_ROWS = [
|
|
|
197
196
|
notes: 'Supplier-confirmed reschedule. Bundled effect: WO Pending→Scheduled + ' +
|
|
198
197
|
'set appointment date + stamp supplier reservation reference. Single ' +
|
|
199
198
|
'scheduleAppointment service call handles all three (skipSupplierBooking=true ' +
|
|
200
|
-
'because KCI is the commit, not a request).'
|
|
199
|
+
'because KCI is the commit, not a request). Target WO resolved from ' +
|
|
200
|
+
'dto.tenantWorkOrderReference; field-service picks the right Scheduled-stage ' +
|
|
201
|
+
'key per WO type.',
|
|
201
202
|
},
|
|
202
203
|
logAgainstOrder: true,
|
|
203
204
|
},
|
|
@@ -467,7 +468,6 @@ function decideKciDispatch(dto) {
|
|
|
467
468
|
return {
|
|
468
469
|
kind: 'WO_SCHEDULE_APPOINTMENT',
|
|
469
470
|
row,
|
|
470
|
-
woType: row.yfEffect.scheduleAppointment.woType,
|
|
471
471
|
dateFrom: row.yfEffect.scheduleAppointment.dateFrom,
|
|
472
472
|
timeBlockFrom: row.yfEffect.scheduleAppointment.timeBlockFrom,
|
|
473
473
|
supplierReferenceFrom: row.yfEffect.scheduleAppointment.supplierReferenceFrom,
|