@d19n/youfibre-odin-sdk 2.0.39 → 2.0.41
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 +11 -28
- package/dist/EntityRegistry.d.ts +0 -2
- package/dist/EntityRegistry.js +0 -2
- package/dist/OdinApiClient.d.ts +0 -4
- package/dist/OdinApiClient.js +0 -8
- package/dist/OdinDbClient.d.ts +0 -4
- package/dist/OdinDbClient.js +0 -8
- package/dist/accessors-v2/index.d.ts +0 -1
- package/dist/accessors-v2/index.js +2 -4
- package/dist/actions-v2/AssignCaseDto.d.ts +4 -4
- package/dist/actions-v2/AssignCaseWithNoteFlowDto.d.ts +4 -4
- package/dist/actions-v2/CreateAddressCrmDatasetDto.d.ts +116 -0
- package/dist/actions-v2/CreateAddressCrmDatasetDto.js +59 -0
- package/dist/actions-v2/CreateCaseFromContactDto.d.ts +4 -4
- package/dist/db-accessors-v2/index.d.ts +0 -1
- package/dist/db-accessors-v2/index.js +2 -4
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +4 -4
- package/dist/entities-v2/CrmDataset.d.ts +23 -1
- package/dist/entities-v2/CrmDataset.js +2 -0
- package/dist/entities-v2/Lead.d.ts +0 -7
- package/dist/entities-v2/Lead.js +0 -2
- package/dist/entities-v2/ServiceAppointmentConfig.d.ts +6 -3
- package/dist/entities-v2/ServiceAppointmentConfig.js +6 -3
- package/dist/entities-v2/WorkOrder.d.ts +3 -1
- package/dist/entities-v2/WorkOrder.js +2 -0
- package/dist/records-v2/AccountRecord.d.ts +0 -29
- package/dist/records-v2/AccountRecord.js +0 -36
- package/dist/records-v2/AddressRecord.d.ts +0 -28
- package/dist/records-v2/AddressRecord.js +1 -45
- package/dist/records-v2/CaseRecord.js +8 -62
- package/dist/records-v2/ChurnRequestRecord.js +1 -7
- package/dist/records-v2/ContactRecord.d.ts +0 -49
- package/dist/records-v2/ContactRecord.js +1 -79
- package/dist/records-v2/ContractBuyOutRecord.js +2 -14
- package/dist/records-v2/CrmDatasetRecord.d.ts +29 -0
- package/dist/records-v2/CrmDatasetRecord.js +36 -0
- package/dist/records-v2/CustomerDeviceOntRecord.js +1 -7
- package/dist/records-v2/LeadRecord.d.ts +0 -29
- package/dist/records-v2/LeadRecord.js +0 -36
- package/dist/records-v2/OrderItemRecord.d.ts +0 -29
- package/dist/records-v2/OrderItemRecord.js +0 -36
- package/dist/records-v2/OrderRecord.d.ts +0 -99
- package/dist/records-v2/OrderRecord.js +8 -182
- package/dist/records-v2/PICRequestRecord.js +1 -7
- package/dist/records-v2/PaymentMethodRefundRecord.js +1 -6
- package/dist/records-v2/TestEntityForVisualBuilderRecord.js +1 -6
- package/dist/records-v2/WorkOrderRecord.js +41 -364
- package/dist/records-v2/index.d.ts +1 -2
- package/dist/records-v2/index.js +6 -9
- package/package.json +2 -2
- package/dist/accessors-v2/PhoneNumberAccessor.d.ts +0 -111
- package/dist/accessors-v2/PhoneNumberAccessor.js +0 -190
- package/dist/actions-v2/CreateAccountFromBrskDto.d.ts +0 -102
- package/dist/actions-v2/CreateAccountFromBrskDto.js +0 -54
- package/dist/actions-v2/CreateContactFromBrskDto.d.ts +0 -107
- package/dist/actions-v2/CreateContactFromBrskDto.js +0 -52
- package/dist/actions-v2/CreateLeadFromBrskDto.d.ts +0 -118
- package/dist/actions-v2/CreateLeadFromBrskDto.js +0 -52
- package/dist/actions-v2/CreateOrderFromBrskDto.d.ts +0 -138
- package/dist/actions-v2/CreateOrderFromBrskDto.js +0 -52
- package/dist/actions-v2/CreateOrderItemFromBrskDto.d.ts +0 -198
- package/dist/actions-v2/CreateOrderItemFromBrskDto.js +0 -52
- package/dist/actions-v2/CreatePhoneNumberFromBrskDto.d.ts +0 -67
- package/dist/actions-v2/CreatePhoneNumberFromBrskDto.js +0 -54
- package/dist/actions-v2/MoveOrderFromSupplyToActiveDto.d.ts +0 -112
- package/dist/actions-v2/MoveOrderFromSupplyToActiveDto.js +0 -77
- package/dist/actions-v2/MoveOrderFromSupplyToCancelledDto.d.ts +0 -112
- package/dist/actions-v2/MoveOrderFromSupplyToCancelledDto.js +0 -77
- package/dist/actions-v2/UpdateAddressFromBrskDto.d.ts +0 -61
- package/dist/actions-v2/UpdateAddressFromBrskDto.js +0 -54
- package/dist/db-accessors-v2/PhoneNumberDbAccessor.d.ts +0 -149
- package/dist/db-accessors-v2/PhoneNumberDbAccessor.js +0 -227
- package/dist/records-v2/PhoneNumberRecord.d.ts +0 -205
- package/dist/records-v2/PhoneNumberRecord.js +0 -292
|
@@ -39,7 +39,6 @@ const FieldServiceDispatchedProductRecord_1 = require("./FieldServiceDispatchedP
|
|
|
39
39
|
const AccountRecord_1 = require("./AccountRecord");
|
|
40
40
|
const PICRequestRecord_1 = require("./PICRequestRecord");
|
|
41
41
|
const OrderItemRecord_1 = require("./OrderItemRecord");
|
|
42
|
-
const PhoneNumberRecord_1 = require("./PhoneNumberRecord");
|
|
43
42
|
const NoteRecord_1 = require("./NoteRecord");
|
|
44
43
|
const SmsMessageRecord_1 = require("./SmsMessageRecord");
|
|
45
44
|
const OneTouchSwitchRecord_1 = require("./OneTouchSwitchRecord");
|
|
@@ -174,9 +173,6 @@ class CancelActiveOrderFlowBuilder {
|
|
|
174
173
|
actionName: 'CreateChurnRequest',
|
|
175
174
|
properties,
|
|
176
175
|
entity: 'OrderModule:ChurnRequest',
|
|
177
|
-
schemaId: '3d48e162-6b20-4994-a5ea-c717c102778e',
|
|
178
|
-
schemaActionId: '493eb782-4dc9-4fde-a762-17da931bc544',
|
|
179
|
-
schemaTypeId: '86ec30d1-84ec-4001-9933-21c8a5a91896',
|
|
180
176
|
type: 'DEFAULT',
|
|
181
177
|
autoLinkParent: true,
|
|
182
178
|
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 }))),
|
|
@@ -233,9 +229,6 @@ class CancelActiveOrderFlowBuilder {
|
|
|
233
229
|
return {
|
|
234
230
|
entity: step.entity,
|
|
235
231
|
type: step.type,
|
|
236
|
-
schemaId: step.schemaId,
|
|
237
|
-
schemaActionId: step.schemaActionId,
|
|
238
|
-
schemaTypeId: step.schemaTypeId,
|
|
239
232
|
actionName: step.actionName,
|
|
240
233
|
properties: step.properties,
|
|
241
234
|
title: step.title,
|
|
@@ -244,7 +237,7 @@ class CancelActiveOrderFlowBuilder {
|
|
|
244
237
|
groups: step.groups,
|
|
245
238
|
};
|
|
246
239
|
});
|
|
247
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CancelActiveOrder',
|
|
240
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CancelActiveOrder', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'OrderStageCancelled' }), this._options);
|
|
248
241
|
}
|
|
249
242
|
}
|
|
250
243
|
exports.CancelActiveOrderFlowBuilder = CancelActiveOrderFlowBuilder;
|
|
@@ -285,9 +278,6 @@ class CancelOrderPreInstallFlowBuilder {
|
|
|
285
278
|
actionName: 'CreatePICRequest',
|
|
286
279
|
properties,
|
|
287
280
|
entity: 'OrderModule:PICRequest',
|
|
288
|
-
schemaId: 'c60768fb-7e5d-4574-9919-59b7ca6aff3b',
|
|
289
|
-
schemaActionId: 'e4e9d292-35dd-4cf3-9635-1514c442d3d8',
|
|
290
|
-
schemaTypeId: 'e7b56b02-e248-4bc3-a4e4-9ed9efc35c45',
|
|
291
281
|
type: 'DEFAULT',
|
|
292
282
|
autoLinkParent: true,
|
|
293
283
|
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 }))),
|
|
@@ -344,9 +334,6 @@ class CancelOrderPreInstallFlowBuilder {
|
|
|
344
334
|
return {
|
|
345
335
|
entity: step.entity,
|
|
346
336
|
type: step.type,
|
|
347
|
-
schemaId: step.schemaId,
|
|
348
|
-
schemaActionId: step.schemaActionId,
|
|
349
|
-
schemaTypeId: step.schemaTypeId,
|
|
350
337
|
actionName: step.actionName,
|
|
351
338
|
properties: step.properties,
|
|
352
339
|
title: step.title,
|
|
@@ -355,7 +342,7 @@ class CancelOrderPreInstallFlowBuilder {
|
|
|
355
342
|
groups: step.groups,
|
|
356
343
|
};
|
|
357
344
|
});
|
|
358
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CancelOrderPreInstall',
|
|
345
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CancelOrderPreInstall', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'OrderStageCancelled' }), this._options);
|
|
359
346
|
}
|
|
360
347
|
}
|
|
361
348
|
exports.CancelOrderPreInstallFlowBuilder = CancelOrderPreInstallFlowBuilder;
|
|
@@ -395,9 +382,6 @@ class CreateCollectionAmcoWorkOrderFromOrderFlowBuilder {
|
|
|
395
382
|
actionName: 'CreateCollectionAmcoWorkOrder',
|
|
396
383
|
properties,
|
|
397
384
|
entity: 'FieldServiceModule:WorkOrder',
|
|
398
|
-
schemaId: '813cdda2-c52e-4ea7-b873-a7c5cd058c91',
|
|
399
|
-
schemaActionId: '8c679191-1925-405d-993b-4624fe7d0235',
|
|
400
|
-
schemaTypeId: '742b38a5-130c-4ecd-b1b3-85cf08e8f769',
|
|
401
385
|
type: 'COLLECTION_AMCO',
|
|
402
386
|
autoLinkParent: true,
|
|
403
387
|
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 }))),
|
|
@@ -454,9 +438,6 @@ class CreateCollectionAmcoWorkOrderFromOrderFlowBuilder {
|
|
|
454
438
|
return {
|
|
455
439
|
entity: step.entity,
|
|
456
440
|
type: step.type,
|
|
457
|
-
schemaId: step.schemaId,
|
|
458
|
-
schemaActionId: step.schemaActionId,
|
|
459
|
-
schemaTypeId: step.schemaTypeId,
|
|
460
441
|
actionName: step.actionName,
|
|
461
442
|
properties: step.properties,
|
|
462
443
|
title: step.title,
|
|
@@ -465,7 +446,7 @@ class CreateCollectionAmcoWorkOrderFromOrderFlowBuilder {
|
|
|
465
446
|
groups: step.groups,
|
|
466
447
|
};
|
|
467
448
|
});
|
|
468
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateCollectionAmcoWorkOrderFromOrder',
|
|
449
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateCollectionAmcoWorkOrderFromOrder', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
|
|
469
450
|
}
|
|
470
451
|
}
|
|
471
452
|
exports.CreateCollectionAmcoWorkOrderFromOrderFlowBuilder = CreateCollectionAmcoWorkOrderFromOrderFlowBuilder;
|
|
@@ -505,9 +486,6 @@ class CreateCollectionWorkOrderFromOrderFlowBuilder {
|
|
|
505
486
|
actionName: 'CreateCollectionWorkOrder',
|
|
506
487
|
properties,
|
|
507
488
|
entity: 'FieldServiceModule:WorkOrder',
|
|
508
|
-
schemaId: '813cdda2-c52e-4ea7-b873-a7c5cd058c91',
|
|
509
|
-
schemaActionId: 'f4e2f2fc-9f79-4592-a9e5-d879155cc7f1',
|
|
510
|
-
schemaTypeId: '83804195-cbac-4926-9c87-8883ad613814',
|
|
511
489
|
type: 'COLLECTION',
|
|
512
490
|
autoLinkParent: true,
|
|
513
491
|
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 }))),
|
|
@@ -564,9 +542,6 @@ class CreateCollectionWorkOrderFromOrderFlowBuilder {
|
|
|
564
542
|
return {
|
|
565
543
|
entity: step.entity,
|
|
566
544
|
type: step.type,
|
|
567
|
-
schemaId: step.schemaId,
|
|
568
|
-
schemaActionId: step.schemaActionId,
|
|
569
|
-
schemaTypeId: step.schemaTypeId,
|
|
570
545
|
actionName: step.actionName,
|
|
571
546
|
properties: step.properties,
|
|
572
547
|
title: step.title,
|
|
@@ -575,7 +550,7 @@ class CreateCollectionWorkOrderFromOrderFlowBuilder {
|
|
|
575
550
|
groups: step.groups,
|
|
576
551
|
};
|
|
577
552
|
});
|
|
578
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateCollectionWorkOrderFromOrder',
|
|
553
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateCollectionWorkOrderFromOrder', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
|
|
579
554
|
}
|
|
580
555
|
}
|
|
581
556
|
exports.CreateCollectionWorkOrderFromOrderFlowBuilder = CreateCollectionWorkOrderFromOrderFlowBuilder;
|
|
@@ -615,9 +590,6 @@ class CreateDispatchAmcoWorkOrderFromOrderFlowBuilder {
|
|
|
615
590
|
actionName: 'CreateDispatchAmcoWorkOrder',
|
|
616
591
|
properties,
|
|
617
592
|
entity: 'FieldServiceModule:WorkOrder',
|
|
618
|
-
schemaId: '813cdda2-c52e-4ea7-b873-a7c5cd058c91',
|
|
619
|
-
schemaActionId: '0a906e2b-0f85-4b63-b5b1-9074f92a6c7e',
|
|
620
|
-
schemaTypeId: 'e7dc3f45-b51b-40f1-9eea-29bcc4557867',
|
|
621
593
|
type: 'DISPATCH_AMCO',
|
|
622
594
|
autoLinkParent: true,
|
|
623
595
|
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 }))),
|
|
@@ -674,9 +646,6 @@ class CreateDispatchAmcoWorkOrderFromOrderFlowBuilder {
|
|
|
674
646
|
return {
|
|
675
647
|
entity: step.entity,
|
|
676
648
|
type: step.type,
|
|
677
|
-
schemaId: step.schemaId,
|
|
678
|
-
schemaActionId: step.schemaActionId,
|
|
679
|
-
schemaTypeId: step.schemaTypeId,
|
|
680
649
|
actionName: step.actionName,
|
|
681
650
|
properties: step.properties,
|
|
682
651
|
title: step.title,
|
|
@@ -685,7 +654,7 @@ class CreateDispatchAmcoWorkOrderFromOrderFlowBuilder {
|
|
|
685
654
|
groups: step.groups,
|
|
686
655
|
};
|
|
687
656
|
});
|
|
688
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateDispatchAmcoWorkOrderFromOrder',
|
|
657
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'CreateDispatchAmcoWorkOrderFromOrder', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined }), this._options);
|
|
689
658
|
}
|
|
690
659
|
}
|
|
691
660
|
exports.CreateDispatchAmcoWorkOrderFromOrderFlowBuilder = CreateDispatchAmcoWorkOrderFromOrderFlowBuilder;
|
|
@@ -726,9 +695,6 @@ class MoveOrderFromDeactivatedToCancelledFlowBuilder {
|
|
|
726
695
|
actionName: 'CreateChurnRequest',
|
|
727
696
|
properties,
|
|
728
697
|
entity: 'OrderModule:ChurnRequest',
|
|
729
|
-
schemaId: '3d48e162-6b20-4994-a5ea-c717c102778e',
|
|
730
|
-
schemaActionId: '493eb782-4dc9-4fde-a762-17da931bc544',
|
|
731
|
-
schemaTypeId: '86ec30d1-84ec-4001-9933-21c8a5a91896',
|
|
732
698
|
type: 'DEFAULT',
|
|
733
699
|
autoLinkParent: true,
|
|
734
700
|
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 }))),
|
|
@@ -785,9 +751,6 @@ class MoveOrderFromDeactivatedToCancelledFlowBuilder {
|
|
|
785
751
|
return {
|
|
786
752
|
entity: step.entity,
|
|
787
753
|
type: step.type,
|
|
788
|
-
schemaId: step.schemaId,
|
|
789
|
-
schemaActionId: step.schemaActionId,
|
|
790
|
-
schemaTypeId: step.schemaTypeId,
|
|
791
754
|
actionName: step.actionName,
|
|
792
755
|
properties: step.properties,
|
|
793
756
|
title: step.title,
|
|
@@ -796,7 +759,7 @@ class MoveOrderFromDeactivatedToCancelledFlowBuilder {
|
|
|
796
759
|
groups: step.groups,
|
|
797
760
|
};
|
|
798
761
|
});
|
|
799
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'MoveOrderFromDeactivatedToCancelled',
|
|
762
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'MoveOrderFromDeactivatedToCancelled', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'OrderStageCancelled' }), this._options);
|
|
800
763
|
}
|
|
801
764
|
}
|
|
802
765
|
exports.MoveOrderFromDeactivatedToCancelledFlowBuilder = MoveOrderFromDeactivatedToCancelledFlowBuilder;
|
|
@@ -837,9 +800,6 @@ class MoveOrderFromPendingCancellationToCancelledFlowBuilder {
|
|
|
837
800
|
actionName: 'CreateChurnRequest',
|
|
838
801
|
properties,
|
|
839
802
|
entity: 'OrderModule:ChurnRequest',
|
|
840
|
-
schemaId: '3d48e162-6b20-4994-a5ea-c717c102778e',
|
|
841
|
-
schemaActionId: '493eb782-4dc9-4fde-a762-17da931bc544',
|
|
842
|
-
schemaTypeId: '86ec30d1-84ec-4001-9933-21c8a5a91896',
|
|
843
803
|
type: 'DEFAULT',
|
|
844
804
|
autoLinkParent: true,
|
|
845
805
|
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 }))),
|
|
@@ -896,9 +856,6 @@ class MoveOrderFromPendingCancellationToCancelledFlowBuilder {
|
|
|
896
856
|
return {
|
|
897
857
|
entity: step.entity,
|
|
898
858
|
type: step.type,
|
|
899
|
-
schemaId: step.schemaId,
|
|
900
|
-
schemaActionId: step.schemaActionId,
|
|
901
|
-
schemaTypeId: step.schemaTypeId,
|
|
902
859
|
actionName: step.actionName,
|
|
903
860
|
properties: step.properties,
|
|
904
861
|
title: step.title,
|
|
@@ -907,7 +864,7 @@ class MoveOrderFromPendingCancellationToCancelledFlowBuilder {
|
|
|
907
864
|
groups: step.groups,
|
|
908
865
|
};
|
|
909
866
|
});
|
|
910
|
-
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'MoveOrderFromPendingCancellationToCancelled',
|
|
867
|
+
return Object.assign(Object.assign(Object.assign({}, ((record === null || record === void 0 ? void 0 : record.id) && { id: record.id })), { entity: 'OrderModule:Order', actionName: 'MoveOrderFromPendingCancellationToCancelled', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'OrderStageCancelled' }), this._options);
|
|
911
868
|
}
|
|
912
869
|
}
|
|
913
870
|
exports.MoveOrderFromPendingCancellationToCancelledFlowBuilder = MoveOrderFromPendingCancellationToCancelledFlowBuilder;
|
|
@@ -949,8 +906,6 @@ class MoveOrderToActiveFlowBuilder {
|
|
|
949
906
|
properties,
|
|
950
907
|
id,
|
|
951
908
|
entity: 'OrderModule:Order',
|
|
952
|
-
schemaId: 'a5fc0677-e439-4d6f-81e9-e7c05e2fa36c',
|
|
953
|
-
schemaActionId: '45e29ca6-9ddf-46a8-bd10-4b7537a0b3e3',
|
|
954
909
|
autoLinkParent: false,
|
|
955
910
|
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 }))),
|
|
956
911
|
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
@@ -1008,9 +963,6 @@ class MoveOrderToActiveFlowBuilder {
|
|
|
1008
963
|
return {
|
|
1009
964
|
entity: step.entity,
|
|
1010
965
|
type: step.type,
|
|
1011
|
-
schemaId: step.schemaId,
|
|
1012
|
-
schemaActionId: step.schemaActionId,
|
|
1013
|
-
schemaTypeId: step.schemaTypeId,
|
|
1014
966
|
actionName: step.actionName,
|
|
1015
967
|
properties: step.properties,
|
|
1016
968
|
title: step.title,
|
|
@@ -1019,7 +971,7 @@ class MoveOrderToActiveFlowBuilder {
|
|
|
1019
971
|
groups: step.groups,
|
|
1020
972
|
};
|
|
1021
973
|
});
|
|
1022
|
-
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveOrderToActive',
|
|
974
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'MoveOrderToActive', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'OrderStageActive' }, this._options);
|
|
1023
975
|
}
|
|
1024
976
|
}
|
|
1025
977
|
exports.MoveOrderToActiveFlowBuilder = MoveOrderToActiveFlowBuilder;
|
|
@@ -1327,36 +1279,6 @@ class OrderRecord {
|
|
|
1327
1279
|
}
|
|
1328
1280
|
return this._orderItems;
|
|
1329
1281
|
}
|
|
1330
|
-
/**
|
|
1331
|
-
* Access linked PhoneNumber records
|
|
1332
|
-
* @remarks Available labels: Order__PhoneNumber
|
|
1333
|
-
* @throws Error if called on a new (unsaved) record
|
|
1334
|
-
*
|
|
1335
|
-
* @example
|
|
1336
|
-
* ```typescript
|
|
1337
|
-
* // Get all linked PhoneNumber records
|
|
1338
|
-
* const items = await record.phoneNumbers.list();
|
|
1339
|
-
* const first = await record.phoneNumbers.first();
|
|
1340
|
-
*
|
|
1341
|
-
* // Filter by label
|
|
1342
|
-
* const specific = await record.phoneNumbers.first({ label: 'Order__PhoneNumber' });
|
|
1343
|
-
* ```
|
|
1344
|
-
*/
|
|
1345
|
-
get phoneNumbers() {
|
|
1346
|
-
var _a;
|
|
1347
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
1348
|
-
throw new Error('Cannot access links on a new (unsaved) record');
|
|
1349
|
-
if (!this._phoneNumbers) {
|
|
1350
|
-
this._phoneNumbers = new record_link_manager_1.RecordLinkManager(this._provider, this._record, {
|
|
1351
|
-
sourceEntity: 'OrderModule:Order',
|
|
1352
|
-
targetEntity: 'CrmModule:PhoneNumber',
|
|
1353
|
-
targetModuleName: 'CrmModule',
|
|
1354
|
-
targetEntityName: 'PhoneNumber',
|
|
1355
|
-
labels: ['Order__PhoneNumber'],
|
|
1356
|
-
}, PhoneNumberRecord_1.PhoneNumberRecord);
|
|
1357
|
-
}
|
|
1358
|
-
return this._phoneNumbers;
|
|
1359
|
-
}
|
|
1360
1282
|
/**
|
|
1361
1283
|
* Access linked Note records
|
|
1362
1284
|
* @remarks Available labels: Order__Note
|
|
@@ -2055,42 +1977,6 @@ class OrderRecord {
|
|
|
2055
1977
|
// ============================================
|
|
2056
1978
|
// CREATE ACTIONS (no existing record required)
|
|
2057
1979
|
// ============================================
|
|
2058
|
-
/**
|
|
2059
|
-
* CreateOrderFromBrsk
|
|
2060
|
-
*
|
|
2061
|
-
* Creates a new Order record with the specified properties.
|
|
2062
|
-
* Returns an ActionBuilder - call .execute() to create or .dryRun() for debugging.
|
|
2063
|
-
*
|
|
2064
|
-
* @param properties - The properties for the new record
|
|
2065
|
-
* @param options - Optional settings
|
|
2066
|
-
* @param options.type - Override the record type
|
|
2067
|
-
* @param options.journeyId - Associate with a journey
|
|
2068
|
-
* @param options.stageKey - Set initial pipeline stage
|
|
2069
|
-
* @returns ActionBuilder - call .execute() to create or .dryRun() for payload
|
|
2070
|
-
*
|
|
2071
|
-
* @example
|
|
2072
|
-
* ```typescript
|
|
2073
|
-
* // Create with properties
|
|
2074
|
-
* const record = odinClient.orders.new();
|
|
2075
|
-
* await record.createOrderFromBrsk({ ... }).execute();
|
|
2076
|
-
*
|
|
2077
|
-
* // Dry run (for debugging)
|
|
2078
|
-
* const payload = record.createOrderFromBrsk({ ... }).dryRun();
|
|
2079
|
-
* ```
|
|
2080
|
-
*/
|
|
2081
|
-
createOrderFromBrsk(properties, options) {
|
|
2082
|
-
var _a, _b;
|
|
2083
|
-
const payload = {
|
|
2084
|
-
entity: 'OrderModule:Order',
|
|
2085
|
-
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,
|
|
2086
|
-
actionName: 'CreateOrderFromBrsk',
|
|
2087
|
-
properties: properties || {},
|
|
2088
|
-
associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined,
|
|
2089
|
-
journeyId: options === null || options === void 0 ? void 0 : options.journeyId,
|
|
2090
|
-
stageKey: options === null || options === void 0 ? void 0 : options.stageKey,
|
|
2091
|
-
};
|
|
2092
|
-
return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
|
|
2093
|
-
}
|
|
2094
1980
|
/**
|
|
2095
1981
|
* CreateRecontractOrder
|
|
2096
1982
|
*
|
|
@@ -2750,64 +2636,6 @@ class OrderRecord {
|
|
|
2750
2636
|
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveOrderFromPreOrderToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'OrderStageCancelled' }, options);
|
|
2751
2637
|
return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
|
|
2752
2638
|
}
|
|
2753
|
-
/**
|
|
2754
|
-
* MoveOrderFromSupplyToActive
|
|
2755
|
-
*
|
|
2756
|
-
* Transitions this Order record to a new pipeline stage.
|
|
2757
|
-
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
2758
|
-
*
|
|
2759
|
-
* @remarks Transitions to stage: OrderStageActive
|
|
2760
|
-
*
|
|
2761
|
-
* @param options - Optional settings
|
|
2762
|
-
* @param options.journeyId - Associate with a journey
|
|
2763
|
-
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
2764
|
-
* @throws Error if called on a new (unsaved) record
|
|
2765
|
-
*
|
|
2766
|
-
* @example
|
|
2767
|
-
* ```typescript
|
|
2768
|
-
* const record = await odinClient.orders.get(id);
|
|
2769
|
-
* await record.moveOrderFromSupplyToActive().execute();
|
|
2770
|
-
*
|
|
2771
|
-
* // Dry run (for debugging)
|
|
2772
|
-
* const payload = record.moveOrderFromSupplyToActive().dryRun();
|
|
2773
|
-
* ```
|
|
2774
|
-
*/
|
|
2775
|
-
moveOrderFromSupplyToActive(options) {
|
|
2776
|
-
var _a;
|
|
2777
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
2778
|
-
throw new Error('moveOrderFromSupplyToActive requires an existing record. Use accessor.get() first.');
|
|
2779
|
-
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveOrderFromSupplyToActive', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'OrderStageActive' }, options);
|
|
2780
|
-
return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
|
|
2781
|
-
}
|
|
2782
|
-
/**
|
|
2783
|
-
* MoveOrderFromSupplyToCancelled
|
|
2784
|
-
*
|
|
2785
|
-
* Transitions this Order record to a new pipeline stage.
|
|
2786
|
-
* Returns an ActionBuilder - call .execute() to transition or .dryRun() for debugging.
|
|
2787
|
-
*
|
|
2788
|
-
* @remarks Transitions to stage: OrderStageCancelled
|
|
2789
|
-
*
|
|
2790
|
-
* @param options - Optional settings
|
|
2791
|
-
* @param options.journeyId - Associate with a journey
|
|
2792
|
-
* @returns ActionBuilder - call .execute() to transition or .dryRun() for payload
|
|
2793
|
-
* @throws Error if called on a new (unsaved) record
|
|
2794
|
-
*
|
|
2795
|
-
* @example
|
|
2796
|
-
* ```typescript
|
|
2797
|
-
* const record = await odinClient.orders.get(id);
|
|
2798
|
-
* await record.moveOrderFromSupplyToCancelled().execute();
|
|
2799
|
-
*
|
|
2800
|
-
* // Dry run (for debugging)
|
|
2801
|
-
* const payload = record.moveOrderFromSupplyToCancelled().dryRun();
|
|
2802
|
-
* ```
|
|
2803
|
-
*/
|
|
2804
|
-
moveOrderFromSupplyToCancelled(options) {
|
|
2805
|
-
var _a;
|
|
2806
|
-
if (!((_a = this._record) === null || _a === void 0 ? void 0 : _a.id))
|
|
2807
|
-
throw new Error('moveOrderFromSupplyToCancelled requires an existing record. Use accessor.get() first.');
|
|
2808
|
-
const payload = Object.assign({ id: this._record.id, entity: this._record.entity, type: this._record.type, actionName: 'MoveOrderFromSupplyToCancelled', associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, stageKey: 'OrderStageCancelled' }, options);
|
|
2809
|
-
return new ActionBuilder(this._provider, 'OrderModule', 'Order', payload, () => { this._pendingLinks = []; });
|
|
2810
|
-
}
|
|
2811
2639
|
/**
|
|
2812
2640
|
* MoveOrderToActive
|
|
2813
2641
|
*
|
|
@@ -3101,8 +2929,6 @@ OrderRecord.accountsLabels = ['Account__Order'];
|
|
|
3101
2929
|
OrderRecord.picRequestsLabels = ['PICRequest__Order'];
|
|
3102
2930
|
/** Valid labels for OrderItem associations */
|
|
3103
2931
|
OrderRecord.orderItemsLabels = ['Order_OrderItem'];
|
|
3104
|
-
/** Valid labels for PhoneNumber associations */
|
|
3105
|
-
OrderRecord.phoneNumbersLabels = ['Order__PhoneNumber'];
|
|
3106
2932
|
/** Valid labels for Note associations */
|
|
3107
2933
|
OrderRecord.notesLabels = ['Order__Note'];
|
|
3108
2934
|
/** Valid labels for SmsMessage associations */
|
|
@@ -148,9 +148,6 @@ class CompletePicRequestFlowFlowBuilder {
|
|
|
148
148
|
properties,
|
|
149
149
|
id,
|
|
150
150
|
entity: 'OrderModule:PICRequest',
|
|
151
|
-
schemaId: 'c60768fb-7e5d-4574-9919-59b7ca6aff3b',
|
|
152
|
-
schemaActionId: 'bbd6810c-b61d-4016-961e-f5f2a568ff57',
|
|
153
|
-
schemaTypeId: 'e7b56b02-e248-4bc3-a4e4-9ed9efc35c45',
|
|
154
151
|
type: 'DEFAULT',
|
|
155
152
|
autoLinkParent: false,
|
|
156
153
|
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 }))),
|
|
@@ -209,9 +206,6 @@ class CompletePicRequestFlowFlowBuilder {
|
|
|
209
206
|
return {
|
|
210
207
|
entity: step.entity,
|
|
211
208
|
type: step.type,
|
|
212
|
-
schemaId: step.schemaId,
|
|
213
|
-
schemaActionId: step.schemaActionId,
|
|
214
|
-
schemaTypeId: step.schemaTypeId,
|
|
215
209
|
actionName: step.actionName,
|
|
216
210
|
properties: step.properties,
|
|
217
211
|
title: step.title,
|
|
@@ -220,7 +214,7 @@ class CompletePicRequestFlowFlowBuilder {
|
|
|
220
214
|
groups: step.groups,
|
|
221
215
|
};
|
|
222
216
|
});
|
|
223
|
-
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'CompletePicRequestFlow',
|
|
217
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'CompletePicRequestFlow', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'PICRequestStageDone' }, this._options);
|
|
224
218
|
}
|
|
225
219
|
}
|
|
226
220
|
exports.CompletePicRequestFlowFlowBuilder = CompletePicRequestFlowFlowBuilder;
|
|
@@ -155,8 +155,6 @@ class CompletePaymentMethodRefundFlowFlowBuilder {
|
|
|
155
155
|
properties,
|
|
156
156
|
id,
|
|
157
157
|
entity: 'BillingModule:PaymentMethodRefund',
|
|
158
|
-
schemaId: 'f47de64e-c385-4980-922c-89a1a1559bc5',
|
|
159
|
-
schemaActionId: '9cd4d215-9af2-4874-9637-66b2dd567e3b',
|
|
160
158
|
autoLinkParent: false,
|
|
161
159
|
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 }))),
|
|
162
160
|
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
@@ -214,9 +212,6 @@ class CompletePaymentMethodRefundFlowFlowBuilder {
|
|
|
214
212
|
return {
|
|
215
213
|
entity: step.entity,
|
|
216
214
|
type: step.type,
|
|
217
|
-
schemaId: step.schemaId,
|
|
218
|
-
schemaActionId: step.schemaActionId,
|
|
219
|
-
schemaTypeId: step.schemaTypeId,
|
|
220
215
|
actionName: step.actionName,
|
|
221
216
|
properties: step.properties,
|
|
222
217
|
title: step.title,
|
|
@@ -225,7 +220,7 @@ class CompletePaymentMethodRefundFlowFlowBuilder {
|
|
|
225
220
|
groups: step.groups,
|
|
226
221
|
};
|
|
227
222
|
});
|
|
228
|
-
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'CompletePaymentMethodRefundFlow',
|
|
223
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'CompletePaymentMethodRefundFlow', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'PaymentMethodRefundStageDone' }, this._options);
|
|
229
224
|
}
|
|
230
225
|
}
|
|
231
226
|
exports.CompletePaymentMethodRefundFlowFlowBuilder = CompletePaymentMethodRefundFlowFlowBuilder;
|
|
@@ -149,8 +149,6 @@ class StageChangeTestEntityForVisualBuilderFlowBuilder {
|
|
|
149
149
|
properties,
|
|
150
150
|
id,
|
|
151
151
|
entity: 'FieldServiceModule:YfStockAudit',
|
|
152
|
-
schemaId: '5f7c3690-dc8f-4cba-b43b-2551711396fc',
|
|
153
|
-
schemaActionId: '21a0f46f-e02d-4e95-aee0-f6102877c31a',
|
|
154
152
|
autoLinkParent: false,
|
|
155
153
|
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 }))),
|
|
156
154
|
groups: options === null || options === void 0 ? void 0 : options.groups,
|
|
@@ -208,9 +206,6 @@ class StageChangeTestEntityForVisualBuilderFlowBuilder {
|
|
|
208
206
|
return {
|
|
209
207
|
entity: step.entity,
|
|
210
208
|
type: step.type,
|
|
211
|
-
schemaId: step.schemaId,
|
|
212
|
-
schemaActionId: step.schemaActionId,
|
|
213
|
-
schemaTypeId: step.schemaTypeId,
|
|
214
209
|
actionName: step.actionName,
|
|
215
210
|
properties: step.properties,
|
|
216
211
|
title: step.title,
|
|
@@ -219,7 +214,7 @@ class StageChangeTestEntityForVisualBuilderFlowBuilder {
|
|
|
219
214
|
groups: step.groups,
|
|
220
215
|
};
|
|
221
216
|
});
|
|
222
|
-
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'StageChangeTestEntityForVisualBuilder',
|
|
217
|
+
return Object.assign({ id: record.id, entity: record.entity, type: record.type, actionName: 'StageChangeTestEntityForVisualBuilder', steps: stepsWithAssociations, associations: this._pendingLinks.length > 0 ? this._pendingLinks : undefined, groups: this._groups.length > 0 ? this._groups : undefined, stageKey: 'DefaultStageInProgress' }, this._options);
|
|
223
218
|
}
|
|
224
219
|
}
|
|
225
220
|
exports.StageChangeTestEntityForVisualBuilderFlowBuilder = StageChangeTestEntityForVisualBuilderFlowBuilder;
|