@d19n/youfibre-odin-sdk 2.0.185 → 2.0.187

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.
Files changed (32) hide show
  1. package/README.md +14 -15
  2. package/dist/actions-v2/CreateMissedIncomingCallDto.d.ts +9 -1
  3. package/dist/actions-v2/MoveInspectionWorkOrderToInProgressSubstantialDto.d.ts +7 -1
  4. package/dist/actions-v2/MoveInspectionWorkOrderToInProgressSubstantialDto.js +7 -1
  5. package/dist/actions-v2/MoveInstallWorkOrderToInProgressSubstantialDto.d.ts +7 -1
  6. package/dist/actions-v2/MoveInstallWorkOrderToInProgressSubstantialDto.js +7 -1
  7. package/dist/actions-v2/MovePrePullWorkOrderToInProgressSubstantialDto.d.ts +7 -1
  8. package/dist/actions-v2/MovePrePullWorkOrderToInProgressSubstantialDto.js +7 -1
  9. package/dist/actions-v2/MoveRemediationWorkOrderToInProgressSubstantialDto.d.ts +7 -1
  10. package/dist/actions-v2/MoveRemediationWorkOrderToInProgressSubstantialDto.js +7 -1
  11. package/dist/actions-v2/MoveServiceWorkOrderToInProgressDto.d.ts +7 -1
  12. package/dist/actions-v2/MoveServiceWorkOrderToInProgressDto.js +7 -1
  13. package/dist/actions-v2/MoveServiceWorkOrderToInProgressSubstantialDto.d.ts +7 -1
  14. package/dist/actions-v2/MoveServiceWorkOrderToInProgressSubstantialDto.js +7 -1
  15. package/dist/actions-v2/MoveServiceWorkOrderToInProgressSupplierDto.d.ts +7 -1
  16. package/dist/actions-v2/MoveServiceWorkOrderToInProgressSupplierDto.js +7 -1
  17. package/dist/actions-v2/UpdateAdditionalCareDto.d.ts +10 -10
  18. package/dist/actions-v2/UpdateContactDto.d.ts +10 -10
  19. package/dist/entities-v2/Order.d.ts +7 -0
  20. package/dist/entities-v2/Order.js +2 -0
  21. package/dist/records-v2/ContactRecord.d.ts +7 -6
  22. package/dist/records-v2/ContactRecord.js +15 -7
  23. package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.d.ts +3 -3
  24. package/dist/records-v2/SiteSpecificRiskAssessmentOutcomeFormRecord.js +3 -3
  25. package/dist/records-v2/WorkOrderRecord.js +7 -0
  26. package/dist/records-v2/index.d.ts +1 -1
  27. package/dist/records-v2/index.js +4 -4
  28. package/dist/wholesale-provider/kci-effect-bridge.js +19 -0
  29. package/dist/wholesale-provider/test/kci-effect-bridge.spec.js +12 -0
  30. package/package.json +1 -1
  31. package/dist/actions-v2/CreateSsraDto.d.ts +0 -277
  32. package/dist/actions-v2/CreateSsraDto.js +0 -50
@@ -21,8 +21,8 @@ export interface UpdateContactMessage extends OdinRecordUpdatedEvent<UpdateConta
21
21
  /**
22
22
  * Properties for UpdateContact action
23
23
  *
24
- * @property Required fields: 4
25
- * @property Optional fields: 12
24
+ * @property Required fields: 3
25
+ * @property Optional fields: 13
26
26
  */
27
27
  export interface UpdateContactProperties {
28
28
  /**
@@ -49,14 +49,6 @@ export interface UpdateContactProperties {
49
49
  * @required
50
50
  */
51
51
  LastName: string;
52
- /**
53
- * Additional Care Consent
54
- *
55
- * Customer consent for recording additional care requiremetns (Sales - Contact)
56
- * @type {ENUM}
57
- * @required
58
- */
59
- AdditionalCareConsent: string;
60
52
  /**
61
53
  * Phone
62
54
  *
@@ -135,6 +127,14 @@ export interface UpdateContactProperties {
135
127
  * @type {TEXT_LONG}
136
128
  */
137
129
  AdditionalCareNotes?: string | null;
130
+ /**
131
+ * Additional Care Consent
132
+ *
133
+ * Customer consent for recording additional care requiremetns (Sales - Contact)
134
+ * @type {ENUM}
135
+ * @requiredWhen MedicallyDependant = ["YES"] AND TelecareAlarm = ["YES"]
136
+ */
137
+ AdditionalCareConsent?: string | null;
138
138
  }
139
139
  /**
140
140
  * UpdateContact
@@ -465,6 +465,8 @@ export declare enum OrderPropertyKeys {
465
465
  CashbackApprovalDate = "CashbackApprovalDate",
466
466
  /** Supplier-committed fulfillment date carried on COMMITTED KCI (per yf-kci-effect-bridge.ts#provide-committed). Stamped onto YF Order via walker-driven receiveKci PROPERTY_WRITE. */
467
467
  CommittedDate = "CommittedDate",
468
+ /** One Touch Switch reference number */
469
+ ExternalReferenceOts = "ExternalReferenceOts",
468
470
  /** status of the order (must be activated for billing) (Sales - Order) */
469
471
  ActivationStatus = "ActivationStatus"
470
472
  }
@@ -1042,6 +1044,11 @@ export interface OrderProperties {
1042
1044
  * @tracked Changes to this field are tracked in audit history
1043
1045
  */
1044
1046
  CommittedDate: string;
1047
+ /** One Touch Switch reference number
1048
+ *
1049
+ * @type {TEXT}
1050
+ */
1051
+ ExternalReferenceOts: string;
1045
1052
  /** status of the order (must be activated for billing) (Sales - Order)
1046
1053
  *
1047
1054
  * @type {ENUM}
@@ -447,6 +447,8 @@ var OrderPropertyKeys;
447
447
  OrderPropertyKeys["CashbackApprovalDate"] = "CashbackApprovalDate";
448
448
  /** Supplier-committed fulfillment date carried on COMMITTED KCI (per yf-kci-effect-bridge.ts#provide-committed). Stamped onto YF Order via walker-driven receiveKci PROPERTY_WRITE. */
449
449
  OrderPropertyKeys["CommittedDate"] = "CommittedDate";
450
+ /** One Touch Switch reference number */
451
+ OrderPropertyKeys["ExternalReferenceOts"] = "ExternalReferenceOts";
450
452
  /** status of the order (must be activated for billing) (Sales - Order) */
451
453
  OrderPropertyKeys["ActivationStatus"] = "ActivationStatus";
452
454
  })(OrderPropertyKeys = exports.OrderPropertyKeys || (exports.OrderPropertyKeys = {}));
@@ -790,13 +790,11 @@ export declare class ContactRecord<TProps = ContactProperties> {
790
790
  /**
791
791
  * UpdateAdditionalCare
792
792
  *
793
- * Updates this Contact record with the specified properties.
793
+ * Updates this Contact record.
794
794
  * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
795
795
  *
796
- * @param properties - Required properties for this action
797
- * @param options - Optional settings
798
- * @param options.journeyId - Associate with a journey
799
- * @param options.stageKey - Transition to pipeline stage
796
+ * @param propertiesOrOptions - Properties to update, or options object
797
+ * @param options - Optional settings (journeyId, stageKey)
800
798
  * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
801
799
  * @throws Error if called on a new (unsaved) record
802
800
  *
@@ -809,7 +807,10 @@ export declare class ContactRecord<TProps = ContactProperties> {
809
807
  * const payload = record.updateAdditionalCare({ ... }).dryRun();
810
808
  * ```
811
809
  */
812
- updateAdditionalCare(properties: UpdateAdditionalCareProperties, options?: {
810
+ updateAdditionalCare(propertiesOrOptions?: UpdateAdditionalCareProperties | {
811
+ journeyId?: string;
812
+ stageKey?: string;
813
+ }, options?: {
813
814
  journeyId?: string;
814
815
  stageKey?: string;
815
816
  }): ActionBuilder;
@@ -1182,13 +1182,11 @@ class ContactRecord {
1182
1182
  /**
1183
1183
  * UpdateAdditionalCare
1184
1184
  *
1185
- * Updates this Contact record with the specified properties.
1185
+ * Updates this Contact record.
1186
1186
  * Returns an ActionBuilder - call .execute() to update or .dryRun() for debugging.
1187
1187
  *
1188
- * @param properties - Required properties for this action
1189
- * @param options - Optional settings
1190
- * @param options.journeyId - Associate with a journey
1191
- * @param options.stageKey - Transition to pipeline stage
1188
+ * @param propertiesOrOptions - Properties to update, or options object
1189
+ * @param options - Optional settings (journeyId, stageKey)
1192
1190
  * @returns ActionBuilder - call .execute() to update or .dryRun() for payload
1193
1191
  * @throws Error if called on a new (unsaved) record
1194
1192
  *
@@ -1201,11 +1199,21 @@ class ContactRecord {
1201
1199
  * const payload = record.updateAdditionalCare({ ... }).dryRun();
1202
1200
  * ```
1203
1201
  */
1204
- updateAdditionalCare(properties, options) {
1202
+ updateAdditionalCare(propertiesOrOptions, options) {
1205
1203
  var _a;
1206
1204
  if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
1207
1205
  throw new Error('updateAdditionalCare requires an existing record. Use accessor.get() first.');
1208
- const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAdditionalCare', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, options);
1206
+ let properties = {};
1207
+ let opts = options;
1208
+ if (propertiesOrOptions) {
1209
+ if ('journeyId' in propertiesOrOptions || 'stageKey' in propertiesOrOptions) {
1210
+ opts = propertiesOrOptions;
1211
+ }
1212
+ else {
1213
+ properties = propertiesOrOptions;
1214
+ }
1215
+ }
1216
+ const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'UpdateAdditionalCare', properties, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined }, opts);
1209
1217
  return new ActionBuilder(this._provider, 'CrmModule', 'Contact', payload, () => { this._pendingLinks = []; });
1210
1218
  }
1211
1219
  /**
@@ -23,7 +23,7 @@ import { IDbRecordCreateUpdateRes } from '@d19n/odin-types/dist/core/interfaces/
23
23
  import { IOdinProvider } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
24
24
  import { RecordLinkManager } from '@d19n/odin-sdk-generator/dist/record-link-manager';
25
25
  import { SiteSpecificRiskAssessmentOutcomeFormProperties, OutcomeFormSiteSpecificRiskAssessmentOutcomeFormProperties } from '../entities-v2/SiteSpecificRiskAssessmentOutcomeForm';
26
- import { CreateSsraProperties } from '../actions-v2/CreateSsraDto';
26
+ import { CreateSsraProperties } from '../actions-v2/MoveInspectionWorkOrderToInProgressSubstantialDto';
27
27
  import { UpdateSsraProperties } from '../actions-v2/UpdateSsraDto';
28
28
  import { NoteRecord } from './NoteRecord';
29
29
  import { FileRecord } from './FileRecord';
@@ -218,9 +218,10 @@ export declare class SiteSpecificRiskAssessmentOutcomeFormRecord<TProps = SiteSp
218
218
  * Creates a new SiteSpecificRiskAssessmentOutcomeForm record with the specified properties.
219
219
  * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
220
220
  *
221
+ * @remarks Record type: OUTCOME_FORM
222
+ *
221
223
  * @param properties - The properties for the new record
222
224
  * @param options - Optional settings
223
- * @param options.type - Override the record type
224
225
  * @param options.journeyId - Associate with a journey
225
226
  * @param options.stageKey - Set initial pipeline stage
226
227
  * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
@@ -236,7 +237,6 @@ export declare class SiteSpecificRiskAssessmentOutcomeFormRecord<TProps = SiteSp
236
237
  * ```
237
238
  */
238
239
  createSsra(properties: CreateSsraProperties, options?: {
239
- type?: string;
240
240
  journeyId?: string;
241
241
  stageKey?: string;
242
242
  }): ActionBuilder;
@@ -298,9 +298,10 @@ class SiteSpecificRiskAssessmentOutcomeFormRecord {
298
298
  * Creates a new SiteSpecificRiskAssessmentOutcomeForm record with the specified properties.
299
299
  * Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
300
300
  *
301
+ * @remarks Record type: OUTCOME_FORM
302
+ *
301
303
  * @param properties - The properties for the new record
302
304
  * @param options - Optional settings
303
- * @param options.type - Override the record type
304
305
  * @param options.journeyId - Associate with a journey
305
306
  * @param options.stageKey - Set initial pipeline stage
306
307
  * @returns ActionBuilder - call .execute() to create or .dryRun() for payload
@@ -316,10 +317,9 @@ class SiteSpecificRiskAssessmentOutcomeFormRecord {
316
317
  * ```
317
318
  */
318
319
  createSsra(properties, options) {
319
- var _a, _b;
320
320
  const payload = {
321
321
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
322
- type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : (_b = this._record) === null || _b === void 0 ? void 0 : _b.type,
322
+ type: 'OUTCOME_FORM',
323
323
  actionName: 'CreateSsra',
324
324
  properties: properties || {},
325
325
  associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
@@ -1909,6 +1909,7 @@ class MoveInspectionWorkOrderToInProgressSubstantialFlowBuilder {
1909
1909
  actionName: 'CreateSsra',
1910
1910
  properties,
1911
1911
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
1912
+ type: 'OUTCOME_FORM',
1912
1913
  autoLinkParent: true,
1913
1914
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
1914
1915
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -2120,6 +2121,7 @@ class MoveInstallWorkOrderToInProgressSubstantialFlowBuilder {
2120
2121
  actionName: 'CreateSsra',
2121
2122
  properties,
2122
2123
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
2124
+ type: 'OUTCOME_FORM',
2123
2125
  autoLinkParent: true,
2124
2126
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
2125
2127
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -2331,6 +2333,7 @@ class MovePrePullWorkOrderToInProgressSubstantialFlowBuilder {
2331
2333
  actionName: 'CreateSsra',
2332
2334
  properties,
2333
2335
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
2336
+ type: 'OUTCOME_FORM',
2334
2337
  autoLinkParent: true,
2335
2338
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
2336
2339
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -2558,6 +2561,7 @@ class MoveRemediationWorkOrderToInProgressSubstantialFlowBuilder {
2558
2561
  actionName: 'CreateSsra',
2559
2562
  properties,
2560
2563
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
2564
+ type: 'OUTCOME_FORM',
2561
2565
  autoLinkParent: true,
2562
2566
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
2563
2567
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -2785,6 +2789,7 @@ class MoveServiceWorkOrderToInProgressFlowBuilder {
2785
2789
  actionName: 'CreateSsra',
2786
2790
  properties,
2787
2791
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
2792
+ type: 'OUTCOME_FORM',
2788
2793
  autoLinkParent: true,
2789
2794
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
2790
2795
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -2889,6 +2894,7 @@ class MoveServiceWorkOrderToInProgressSubstantialFlowBuilder {
2889
2894
  actionName: 'CreateSsra',
2890
2895
  properties,
2891
2896
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
2897
+ type: 'OUTCOME_FORM',
2892
2898
  autoLinkParent: true,
2893
2899
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
2894
2900
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -2993,6 +2999,7 @@ class MoveServiceWorkOrderToInProgressSupplierFlowBuilder {
2993
2999
  actionName: 'CreateSsra',
2994
3000
  properties,
2995
3001
  entity: 'FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm',
3002
+ type: 'OUTCOME_FORM',
2996
3003
  autoLinkParent: true,
2997
3004
  associations: (_a = options === null || options === void 0 ? void 0 : options.associations) === null || _a === void 0 ? void 0 : _a.map(a => (Object.assign(Object.assign({}, a), { linkType: null, relationType: undefined }))),
2998
3005
  groups: options === null || options === void 0 ? void 0 : options.groups,
@@ -90,7 +90,6 @@ export { OrderItemRecord, isOrderItemRecord } from './OrderItemRecord';
90
90
  export { VoiceConfigurationRecord, isVoiceConfigurationRecord } from './VoiceConfigurationRecord';
91
91
  export { RegionRecord, isRegionRecord } from './RegionRecord';
92
92
  export { SalesTerritoryRecord, isSalesTerritoryRecord } from './SalesTerritoryRecord';
93
- export { SiteSpecificRiskAssessmentOutcomeFormRecord, isSiteSpecificRiskAssessmentOutcomeFormRecord } from './SiteSpecificRiskAssessmentOutcomeFormRecord';
94
93
  export { TeamRecord, isTeamRecord } from './TeamRecord';
95
94
  export { TimeSlotRecord, isTimeSlotRecord } from './TimeSlotRecord';
96
95
  export { TwilioTaskQueueRecord, isTwilioTaskQueueRecord } from './TwilioTaskQueueRecord';
@@ -105,6 +104,7 @@ export { DiscountRecord, isDiscountRecord } from './DiscountRecord';
105
104
  export { InvoiceRecord, isInvoiceRecord } from './InvoiceRecord';
106
105
  export { KnowledgeArticleRecord, isKnowledgeArticleRecord } from './KnowledgeArticleRecord';
107
106
  export { RemediationRequiredReasonRecord, isRemediationRequiredReasonRecord } from './RemediationRequiredReasonRecord';
107
+ export { SiteSpecificRiskAssessmentOutcomeFormRecord, isSiteSpecificRiskAssessmentOutcomeFormRecord } from './SiteSpecificRiskAssessmentOutcomeFormRecord';
108
108
  export { OutageRecord, isOutageRecord } from './OutageRecord';
109
109
  export { ServiceAppointmentRecord, isServiceAppointmentRecord } from './ServiceAppointmentRecord';
110
110
  export { OfferRecord, isOfferRecord } from './OfferRecord';
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.isYfFieldServiceVisitRecord = exports.YfFieldServiceVisitRecord = exports.isRemediationOutcomeFormRecord = exports.RemediationOutcomeFormRecord = exports.isOhExternalAuditRecord = exports.OhExternalAuditRecord = exports.isUgExternalAuditRecord = exports.UgExternalAuditRecord = exports.isPaymentMethodRefundRecord = exports.PaymentMethodRefundRecord = exports.isConversationRecord = exports.ConversationRecord = exports.isOntReplacementApprovalRecord = exports.OntReplacementApprovalRecord = exports.isAccountRecord = exports.AccountRecord = exports.isPermissionToFailRecord = exports.PermissionToFailRecord = exports.isTransactionRecord = exports.TransactionRecord = exports.isPaymentRecord = exports.PaymentRecord = exports.isPICRequestRecord = exports.PICRequestRecord = exports.isChangeReasonRecord = exports.ChangeReasonRecord = exports.isChurnRequestRecord = exports.ChurnRequestRecord = exports.isBillingRequestRecord = exports.BillingRequestRecord = exports.isBillingAdjustmentRecord = exports.BillingAdjustmentRecord = exports.isServiceAppointmentConfigRecord = exports.ServiceAppointmentConfigRecord = exports.isCrmDatasetRecord = exports.CrmDatasetRecord = exports.isNoteRecord = exports.NoteRecord = exports.isContractBuyOutRecord = exports.ContractBuyOutRecord = exports.isCaseRecord = exports.CaseRecord = exports.isAddressInteractionRecord = exports.AddressInteractionRecord = exports.isAddressRecord = exports.AddressRecord = exports.isWorkOrderRecord = exports.WorkOrderRecord = exports.isOrderRecord = exports.OrderRecord = void 0;
15
15
  exports.isImpersonationTrackerRecord = exports.ImpersonationTrackerRecord = exports.isActivityRecord = exports.ActivityRecord = exports.isFileRecord = exports.FileRecord = exports.isFieldServiceProductRecord = exports.FieldServiceProductRecord = exports.isFieldServiceDispatchedProductRecord = exports.FieldServiceDispatchedProductRecord = exports.isExchangeRecord = exports.ExchangeRecord = exports.isEmailTemplateRecord = exports.EmailTemplateRecord = exports.isEmailSenderRecord = exports.EmailSenderRecord = exports.isCustomerDeviceOntRecord = exports.CustomerDeviceOntRecord = exports.isCustomerDeviceConfigurationRecord = exports.CustomerDeviceConfigurationRecord = exports.isContactIdentityRecord = exports.ContactIdentityRecord = exports.isConfigRecord = exports.ConfigRecord = exports.isEmailRecord = exports.EmailRecord = exports.isRewardRecord = exports.RewardRecord = exports.isContactRecord = exports.ContactRecord = exports.isCallTransferRecord = exports.CallTransferRecord = exports.isProductRecord = exports.ProductRecord = exports.isBrskEntityMigrationErrorRecord = exports.BrskEntityMigrationErrorRecord = exports.isBngProvisionRecord = exports.BngProvisionRecord = exports.isPgFileAllocationRecord = exports.PgFileAllocationRecord = exports.isAppointmentRecord = exports.AppointmentRecord = exports.isCallLegRecord = exports.CallLegRecord = exports.isAffiliateCodeRecord = exports.AffiliateCodeRecord = exports.isActivityLogRecord = exports.ActivityLogRecord = exports.isAccountCreditRecord = exports.AccountCreditRecord = void 0;
16
16
  exports.isPgWebhookAttemptRecord = exports.PgWebhookAttemptRecord = exports.isPgAccountValidationRecord = exports.PgAccountValidationRecord = exports.isPgTransactionRecord = exports.PgTransactionRecord = exports.isPgSortCodeSubstitutionRecord = exports.PgSortCodeSubstitutionRecord = exports.isPgVocalinkRecord = exports.PgVocalinkRecord = exports.isPgDirectDebitFileRecord = exports.PgDirectDebitFileRecord = exports.isPgPaymentMethodRecord = exports.PgPaymentMethodRecord = exports.isPgLogRecord = exports.PgLogRecord = exports.isPgDisputeRecord = exports.PgDisputeRecord = exports.isPgContactRecord = exports.PgContactRecord = exports.isPaymentMethodRecord = exports.PaymentMethodRecord = exports.isSmsMessageRecord = exports.SmsMessageRecord = exports.isReferralRecord = exports.ReferralRecord = exports.isOrderKciRecord = exports.OrderKciRecord = exports.isOrderCheckRecord = exports.OrderCheckRecord = exports.isCampaignRecord = exports.CampaignRecord = exports.isOneTouchSwitchRecord = exports.OneTouchSwitchRecord = exports.isOfferTemplateRecord = exports.OfferTemplateRecord = exports.isReturnsRecord = exports.ReturnsRecord = exports.isNetworkDeviceRecord = exports.NetworkDeviceRecord = exports.isMessageRecord = exports.MessageRecord = exports.isLeadRecord = exports.LeadRecord = exports.isInvoiceItemRecord = exports.InvoiceItemRecord = exports.isTwilioCallEventRecord = exports.TwilioCallEventRecord = exports.isCallRecord = exports.CallRecord = void 0;
17
- exports.isOverlayRealA55Record = exports.OverlayRealA55Record = exports.isOfferRecord = exports.OfferRecord = exports.isServiceAppointmentRecord = exports.ServiceAppointmentRecord = exports.isOutageRecord = exports.OutageRecord = exports.isRemediationRequiredReasonRecord = exports.RemediationRequiredReasonRecord = exports.isKnowledgeArticleRecord = exports.KnowledgeArticleRecord = exports.isInvoiceRecord = exports.InvoiceRecord = exports.isDiscountRecord = exports.DiscountRecord = exports.isCustomerDeviceRouterRecord = exports.CustomerDeviceRouterRecord = exports.isCustomerDeviceAtaRecord = exports.CustomerDeviceAtaRecord = exports.isCreditNoteRecord = exports.CreditNoteRecord = exports.isWorkOrderStatusUpdateRecord = exports.WorkOrderStatusUpdateRecord = exports.isWayleaveAuditRecord = exports.WayleaveAuditRecord = exports.isUserRecord = exports.UserRecord = exports.isTwilioUserUpdateRecord = exports.TwilioUserUpdateRecord = exports.isTwilioTaskQueueRecord = exports.TwilioTaskQueueRecord = exports.isTimeSlotRecord = exports.TimeSlotRecord = exports.isTeamRecord = exports.TeamRecord = exports.isSiteSpecificRiskAssessmentOutcomeFormRecord = exports.SiteSpecificRiskAssessmentOutcomeFormRecord = exports.isSalesTerritoryRecord = exports.SalesTerritoryRecord = exports.isRegionRecord = exports.RegionRecord = exports.isVoiceConfigurationRecord = exports.VoiceConfigurationRecord = exports.isOrderItemRecord = exports.OrderItemRecord = exports.isPushNotificationRecord = exports.PushNotificationRecord = exports.isPgWebhookRecord = exports.PgWebhookRecord = void 0;
17
+ exports.isOverlayRealA55Record = exports.OverlayRealA55Record = exports.isOfferRecord = exports.OfferRecord = exports.isServiceAppointmentRecord = exports.ServiceAppointmentRecord = exports.isOutageRecord = exports.OutageRecord = exports.isSiteSpecificRiskAssessmentOutcomeFormRecord = exports.SiteSpecificRiskAssessmentOutcomeFormRecord = exports.isRemediationRequiredReasonRecord = exports.RemediationRequiredReasonRecord = exports.isKnowledgeArticleRecord = exports.KnowledgeArticleRecord = exports.isInvoiceRecord = exports.InvoiceRecord = exports.isDiscountRecord = exports.DiscountRecord = exports.isCustomerDeviceRouterRecord = exports.CustomerDeviceRouterRecord = exports.isCustomerDeviceAtaRecord = exports.CustomerDeviceAtaRecord = exports.isCreditNoteRecord = exports.CreditNoteRecord = exports.isWorkOrderStatusUpdateRecord = exports.WorkOrderStatusUpdateRecord = exports.isWayleaveAuditRecord = exports.WayleaveAuditRecord = exports.isUserRecord = exports.UserRecord = exports.isTwilioUserUpdateRecord = exports.TwilioUserUpdateRecord = exports.isTwilioTaskQueueRecord = exports.TwilioTaskQueueRecord = exports.isTimeSlotRecord = exports.TimeSlotRecord = exports.isTeamRecord = exports.TeamRecord = exports.isSalesTerritoryRecord = exports.SalesTerritoryRecord = exports.isRegionRecord = exports.RegionRecord = exports.isVoiceConfigurationRecord = exports.VoiceConfigurationRecord = exports.isOrderItemRecord = exports.OrderItemRecord = exports.isPushNotificationRecord = exports.PushNotificationRecord = exports.isPgWebhookRecord = exports.PgWebhookRecord = void 0;
18
18
  exports.isCustomerPhonePortingRecord = exports.CustomerPhonePortingRecord = exports.isVisitRecord = exports.VisitRecord = exports.isServiceRecord = exports.ServiceRecord = exports.isScheduleSlotRecord = exports.ScheduleSlotRecord = exports.isPriceBookRecord = exports.PriceBookRecord = void 0;
19
19
  var OrderRecord_1 = require("./OrderRecord");
20
20
  Object.defineProperty(exports, "OrderRecord", { enumerable: true, get: function () { return OrderRecord_1.OrderRecord; } });
@@ -259,9 +259,6 @@ Object.defineProperty(exports, "isRegionRecord", { enumerable: true, get: functi
259
259
  var SalesTerritoryRecord_1 = require("./SalesTerritoryRecord");
260
260
  Object.defineProperty(exports, "SalesTerritoryRecord", { enumerable: true, get: function () { return SalesTerritoryRecord_1.SalesTerritoryRecord; } });
261
261
  Object.defineProperty(exports, "isSalesTerritoryRecord", { enumerable: true, get: function () { return SalesTerritoryRecord_1.isSalesTerritoryRecord; } });
262
- var SiteSpecificRiskAssessmentOutcomeFormRecord_1 = require("./SiteSpecificRiskAssessmentOutcomeFormRecord");
263
- Object.defineProperty(exports, "SiteSpecificRiskAssessmentOutcomeFormRecord", { enumerable: true, get: function () { return SiteSpecificRiskAssessmentOutcomeFormRecord_1.SiteSpecificRiskAssessmentOutcomeFormRecord; } });
264
- Object.defineProperty(exports, "isSiteSpecificRiskAssessmentOutcomeFormRecord", { enumerable: true, get: function () { return SiteSpecificRiskAssessmentOutcomeFormRecord_1.isSiteSpecificRiskAssessmentOutcomeFormRecord; } });
265
262
  var TeamRecord_1 = require("./TeamRecord");
266
263
  Object.defineProperty(exports, "TeamRecord", { enumerable: true, get: function () { return TeamRecord_1.TeamRecord; } });
267
264
  Object.defineProperty(exports, "isTeamRecord", { enumerable: true, get: function () { return TeamRecord_1.isTeamRecord; } });
@@ -304,6 +301,9 @@ Object.defineProperty(exports, "isKnowledgeArticleRecord", { enumerable: true, g
304
301
  var RemediationRequiredReasonRecord_1 = require("./RemediationRequiredReasonRecord");
305
302
  Object.defineProperty(exports, "RemediationRequiredReasonRecord", { enumerable: true, get: function () { return RemediationRequiredReasonRecord_1.RemediationRequiredReasonRecord; } });
306
303
  Object.defineProperty(exports, "isRemediationRequiredReasonRecord", { enumerable: true, get: function () { return RemediationRequiredReasonRecord_1.isRemediationRequiredReasonRecord; } });
304
+ var SiteSpecificRiskAssessmentOutcomeFormRecord_1 = require("./SiteSpecificRiskAssessmentOutcomeFormRecord");
305
+ Object.defineProperty(exports, "SiteSpecificRiskAssessmentOutcomeFormRecord", { enumerable: true, get: function () { return SiteSpecificRiskAssessmentOutcomeFormRecord_1.SiteSpecificRiskAssessmentOutcomeFormRecord; } });
306
+ Object.defineProperty(exports, "isSiteSpecificRiskAssessmentOutcomeFormRecord", { enumerable: true, get: function () { return SiteSpecificRiskAssessmentOutcomeFormRecord_1.isSiteSpecificRiskAssessmentOutcomeFormRecord; } });
307
307
  var OutageRecord_1 = require("./OutageRecord");
308
308
  Object.defineProperty(exports, "OutageRecord", { enumerable: true, get: function () { return OutageRecord_1.OutageRecord; } });
309
309
  Object.defineProperty(exports, "isOutageRecord", { enumerable: true, get: function () { return OutageRecord_1.isOutageRecord; } });
@@ -396,6 +396,25 @@ exports.KCI_EFFECT_ROWS = [
396
396
  },
397
397
  logAgainstOrder: true,
398
398
  },
399
+ {
400
+ // Supplier moved the SERVICE WO to Pending (awaiting tenant action). Move
401
+ // the YF SERVICE WO mirror to Pending via the move-to-pending semanticOp;
402
+ // actionKeyFor resolves the source-gated SDK action per the WO's current
403
+ // stage (Scheduled/EnRoute/InProgress/RemediationRequired → ...ToPending
404
+ // Supplier), and the Pending transition fires YF's own ServiceAppointment
405
+ // release. NET enum value: NETOMNIA_SERVICE_WORK_ORDER_PENDING. Closes the
406
+ // NET↔YF SERVICE-Pending drift (T-20260508-010, SERVICE half).
407
+ id: 'repair-update-service-pending',
408
+ reasonCode: 'UPDATE',
409
+ serviceOrderKind: 'REPAIR',
410
+ supplierCodes: ['NETOMNIA_SERVICE_WORK_ORDER_PENDING'],
411
+ yfEffect: {
412
+ kind: 'WO_FLOW_ACTION',
413
+ semanticOp: 'move-to-pending',
414
+ notes: 'SERVICE WO moved to Pending by supplier — advance YF SERVICE WO → Pending via move-to-pending (releases the linked ServiceAppointment). Valid sources: Scheduled, EnRoute, InProgress, RemediationRequired; other stages log-only.',
415
+ },
416
+ logAgainstOrder: true,
417
+ },
399
418
  {
400
419
  // Supplier rescheduled the SERVICE (repair) visit. Move the SERVICE WO's
401
420
  // appointment to the new slot and land it back in Scheduled (from any
@@ -162,6 +162,18 @@ function run() {
162
162
  assert('rescheduleReason=SUPPLIER_RESCHEDULED_APPOINTMENT', decision.rescheduleReason === 'SUPPLIER_RESCHEDULED_APPOINTMENT');
163
163
  }
164
164
  }
165
+ console.log("Test: SERVICE WORK_ORDER_PENDING → WO_FLOW_ACTION semanticOp='move-to-pending' (REPAIR)");
166
+ {
167
+ const dto = makeProvideDto('UPDATE');
168
+ dto.supplierCodes = ['NETOMNIA_SERVICE_WORK_ORDER_PENDING'];
169
+ const decision = (0, kci_effect_bridge_1.decideKciDispatch)(dto);
170
+ assert('detectKciKind=REPAIR', (0, kci_effect_bridge_1.detectKciKind)(dto) === 'REPAIR');
171
+ assert('kind=WO_FLOW_ACTION', decision.kind === 'WO_FLOW_ACTION');
172
+ if (decision.kind === 'WO_FLOW_ACTION') {
173
+ assert('row=repair-update-service-pending', decision.row.id === 'repair-update-service-pending');
174
+ assert("semanticOp=move-to-pending", decision.semanticOp === 'move-to-pending');
175
+ }
176
+ }
165
177
  console.log('Test: REMEDIATION WORK_ORDER_RESCHEDULED → WO_SCHEDULE_APPOINTMENT (PROVIDE reschedule)');
166
178
  {
167
179
  const dto = makeProvideDto('UPDATE');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "2.0.185",
3
+ "version": "2.0.187",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",
@@ -1,277 +0,0 @@
1
- /**
2
- * CreateSsra Action DTO
3
- *
4
- * @module FieldServiceModule
5
- * @entity SiteSpecificRiskAssessmentOutcomeForm
6
- * @actionKey CreateSsra
7
- * @event k1.t-hEOJjsDb.FieldServiceModule.SiteSpecificRiskAssessmentOutcomeForm.Create.CreateSsra
8
- *
9
- * AUTO-GENERATED - DO NOT EDIT DIRECTLY
10
- */
11
- import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
12
- /**
13
- * RabbitMQ message payload for CreateSsra created events
14
- *
15
- * @event k1.t-hEOJjsDb.FieldServiceModule.SiteSpecificRiskAssessmentOutcomeForm.Create.CreateSsra
16
- */
17
- export interface CreateSsraMessage extends OdinRecordCreatedEvent<CreateSsraDto, CreateSsraProperties> {
18
- }
19
- /**
20
- * Properties for CreateSsra action
21
- *
22
- * @property Required fields: 20
23
- * @property Optional fields: 9
24
- */
25
- export interface CreateSsraProperties {
26
- /**
27
- * FitAndWellToCompleteJob
28
- *
29
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
30
- * @type {ENUM}
31
- * @required
32
- */
33
- FitAndWellToCompleteJob: string;
34
- /**
35
- * CorrectPpe
36
- *
37
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
38
- * @type {ENUM}
39
- * @required
40
- */
41
- CorrectPpe: string;
42
- /**
43
- * AnyOtherIndividualsOnTheSite
44
- *
45
- * Reference identifier for SiteSpecificRiskAssessmentOutcomeForm relationships. Used for data integrity.
46
- * @type {ENUM}
47
- * @required
48
- */
49
- AnyOtherIndividualsOnTheSite: string;
50
- /**
51
- * OtherIndividualsNames
52
- *
53
- * Reference identifier for SiteSpecificRiskAssessmentOutcomeForm relationships. Used for data integrity.
54
- * @type {TEXT_LONG}
55
- * @required
56
- * @visibleWhen AnyOtherIndividualsOnTheSite = ["YES"]
57
- */
58
- OtherIndividualsNames: string;
59
- /**
60
- * AccessToRiskAssessmentAndSafeSystemOfWork
61
- *
62
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
63
- * @type {ENUM}
64
- * @required
65
- */
66
- AccessToRiskAssessmentAndSafeSystemOfWork: string;
67
- /**
68
- * PeoplesafeActivated
69
- *
70
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
71
- * @type {ENUM}
72
- * @required
73
- */
74
- PeoplesafeActivated: string;
75
- /**
76
- * AnimalsAndPetsLockedAway
77
- *
78
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
79
- * @type {ENUM}
80
- * @required
81
- */
82
- AnimalsAndPetsLockedAway: string;
83
- /**
84
- * WorkAreaFreeFromHazards
85
- * @type {ENUM}
86
- * @required
87
- */
88
- WorkAreaFreeFromHazards: string;
89
- /**
90
- * CompletingDrillingWithinProperty
91
- * @type {ENUM}
92
- * @required
93
- */
94
- CompletingDrillingWithinProperty: string;
95
- /**
96
- * SafetyGlassesEarDefendersDustMaskAvailable
97
- *
98
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
99
- * @type {ENUM}
100
- * @required
101
- * @visibleWhen CompletingDrillingWithinProperty = ["YES"]
102
- */
103
- SafetyGlassesEarDefendersDustMaskAvailable: string;
104
- /**
105
- * DrillConfirmationOntMountPhoto
106
- *
107
- * Please add image (Field Operations - SiteSpecificRiskAssessmentOutcomeForm)
108
- * @type {FILE_MULTIPLE}
109
- * @required
110
- * @visibleWhen CompletingDrillingWithinProperty = ["YES"]
111
- */
112
- DrillConfirmationOntMountPhoto: string;
113
- /**
114
- * DrillConfirmationDrillOutPhoto
115
- *
116
- * Please add image (Field Operations - SiteSpecificRiskAssessmentOutcomeForm)
117
- * @type {FILE_MULTIPLE}
118
- * @required
119
- * @visibleWhen CompletingDrillingWithinProperty = ["YES"]
120
- */
121
- DrillConfirmationDrillOutPhoto: string;
122
- /**
123
- * AreLaddersBeingUsed
124
- * @type {ENUM}
125
- * @required
126
- */
127
- AreLaddersBeingUsed: string;
128
- /**
129
- * LadderPreUseCheckSafe
130
- * @type {ENUM}
131
- * @required
132
- * @visibleWhen AreLaddersBeingUsed = ["YES"]
133
- */
134
- LadderPreUseCheckSafe: string;
135
- /**
136
- * EquipmentDefects
137
- *
138
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
139
- * @type {ENUM}
140
- * @required
141
- */
142
- EquipmentDefects: string;
143
- /**
144
- * AreThereAnyAdditionalHazards
145
- * @type {ENUM}
146
- * @required
147
- */
148
- AreThereAnyAdditionalHazards: string;
149
- /**
150
- * AdditionalControlsOnSite
151
- *
152
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
153
- * @type {TEXT_LONG}
154
- * @required
155
- * @visibleWhen AreThereAnyAdditionalHazards = ["YES"]
156
- */
157
- AdditionalControlsOnSite: string;
158
- /**
159
- * AdditionalControlsOnSitePhoto
160
- *
161
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
162
- * @type {FILE_MULTIPLE}
163
- * @required
164
- * @visibleWhen AreThereAnyAdditionalHazards = ["YES"]
165
- */
166
- AdditionalControlsOnSitePhoto: string;
167
- /**
168
- * ActivitySafe
169
- *
170
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
171
- * @type {ENUM}
172
- * @required
173
- */
174
- ActivitySafe: string;
175
- /**
176
- * ActivityUnsafeExplanation
177
- *
178
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
179
- * @type {TEXT_LONG}
180
- * @required
181
- * @visibleWhen ActivitySafe = ["UNSAFE"]
182
- */
183
- ActivityUnsafeExplanation: string;
184
- /**
185
- * SsraStatement
186
- *
187
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
188
- * @type {TEXT}
189
- */
190
- SsraStatement?: string | null;
191
- /**
192
- * FitnessAlert
193
- *
194
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
195
- * @type {TEXT}
196
- * @visibleWhen FitAndWellToCompleteJob = ["NO"]
197
- */
198
- FitnessAlert?: string | null;
199
- /**
200
- * PpeAlert
201
- *
202
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
203
- * @type {TEXT}
204
- * @visibleWhen CorrectPpe = ["NO"]
205
- */
206
- PpeAlert?: string | null;
207
- /**
208
- * RiskAssessmentAccessAlert
209
- * @type {TEXT}
210
- * @visibleWhen AccessToRiskAssessmentAndSafeSystemOfWork = ["NO"]
211
- */
212
- RiskAssessmentAccessAlert?: string | null;
213
- /**
214
- * PeoplesafeAlert
215
- * @type {TEXT}
216
- * @visibleWhen PeoplesafeActivated = ["NO"]
217
- */
218
- PeoplesafeAlert?: string | null;
219
- /**
220
- * AnimalsAndPetsAlert
221
- *
222
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
223
- * @type {TEXT}
224
- * @visibleWhen AnimalsAndPetsLockedAway = ["NO"]
225
- */
226
- AnimalsAndPetsAlert?: string | null;
227
- /**
228
- * WorkAreaHazardsAlert
229
- * @type {TEXT}
230
- * @visibleWhen WorkAreaFreeFromHazards = ["NO"]
231
- */
232
- WorkAreaHazardsAlert?: string | null;
233
- /**
234
- * LadderDefectAlert
235
- * @type {TEXT}
236
- * @visibleWhen LadderPreUseCheckSafe = ["NO"]
237
- */
238
- LadderDefectAlert?: string | null;
239
- /**
240
- * EquipmentDefectiveAlert
241
- *
242
- * Data field for SiteSpecificRiskAssessmentOutcomeForm records. Used by Field Operations team.
243
- * @type {TEXT}
244
- * @visibleWhen EquipmentDefects = ["DEFECTIVE"]
245
- */
246
- EquipmentDefectiveAlert?: string | null;
247
- }
248
- /**
249
- * CreateSsra
250
- *
251
- * @actionType CREATE - Creates a new SiteSpecificRiskAssessmentOutcomeForm record
252
- * @module FieldServiceModule
253
- * @entity SiteSpecificRiskAssessmentOutcomeForm
254
- * @event k1.t-hEOJjsDb.FieldServiceModule.SiteSpecificRiskAssessmentOutcomeForm.Create.CreateSsra
255
- * @permission schema.action.createssra.trigger
256
- * @benchmark This action is tracked for performance benchmarks
257
- */
258
- export declare class CreateSsraDto extends OdinRecordCreateDto<CreateSsraProperties> {
259
- /** Used by SDK generators to identify action type */
260
- static readonly ACTION_TYPE = "CREATE";
261
- static readonly ACTION_KEY = "CreateSsra";
262
- static readonly MODULE_NAME = "FieldServiceModule";
263
- static readonly ENTITIES: string[];
264
- static readonly EVENT_NAME = "k1.t-hEOJjsDb.FieldServiceModule.SiteSpecificRiskAssessmentOutcomeForm.Create.CreateSsra";
265
- static readonly PERMISSION = "schema.action.createssra.trigger";
266
- /** Step metadata - entity this action targets */
267
- static readonly STEP_ENTITY = "FieldServiceModule:SiteSpecificRiskAssessmentOutcomeForm";
268
- static readonly STEP_SCHEMA_ID = "6380e75c-a0cc-43e8-a57e-dabc00310d16";
269
- static readonly STEP_SCHEMA_ACTION_ID = "a17ac2ef-f23e-4183-8aba-92ea3debd5fb";
270
- static readonly AUTO_LINK_PARENT = true;
271
- readonly actionName: string;
272
- readonly schemaActionId: string;
273
- readonly entity: string;
274
- constructor(properties: CreateSsraProperties, options?: {
275
- journeyId?: string;
276
- });
277
- }