@d19n/youfibre-odin-sdk 1.0.19 → 1.0.21

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 (146) hide show
  1. package/dist/api-sdk-v1/BillingRequestApi.d.ts +0 -7
  2. package/dist/api-sdk-v1/BillingRequestApi.js +0 -26
  3. package/dist/api-sdk-v1/CaseApi.d.ts +0 -7
  4. package/dist/api-sdk-v1/CaseApi.js +0 -26
  5. package/dist/api-sdk-v1/ConsumptionRateApi.d.ts +0 -7
  6. package/dist/api-sdk-v1/ConsumptionRateApi.js +0 -26
  7. package/dist/api-sdk-v1/ConsumptionScheduleApi.d.ts +0 -7
  8. package/dist/api-sdk-v1/ConsumptionScheduleApi.js +0 -26
  9. package/dist/api-sdk-v1/ContactApi.d.ts +87 -3
  10. package/dist/api-sdk-v1/ContactApi.js +319 -7
  11. package/dist/api-sdk-v1/ContactIdentityApi.d.ts +0 -7
  12. package/dist/api-sdk-v1/ContactIdentityApi.js +0 -26
  13. package/dist/api-sdk-v1/FileApi.d.ts +338 -3
  14. package/dist/api-sdk-v1/FileApi.js +1249 -7
  15. package/dist/api-sdk-v1/InvoiceItemApi.d.ts +0 -7
  16. package/dist/api-sdk-v1/InvoiceItemApi.js +0 -26
  17. package/dist/api-sdk-v1/LeadApi.d.ts +24 -3
  18. package/dist/api-sdk-v1/LeadApi.js +85 -7
  19. package/dist/api-sdk-v1/MilestoneApi.d.ts +0 -7
  20. package/dist/api-sdk-v1/MilestoneApi.js +0 -26
  21. package/dist/api-sdk-v1/NoteApi.d.ts +3 -4
  22. package/dist/api-sdk-v1/NoteApi.js +7 -13
  23. package/dist/api-sdk-v1/OfferApi.d.ts +0 -7
  24. package/dist/api-sdk-v1/OfferApi.js +0 -26
  25. package/dist/api-sdk-v1/OrderApi.d.ts +7 -8
  26. package/dist/api-sdk-v1/OrderApi.js +21 -27
  27. package/dist/api-sdk-v1/OrderItemApi.d.ts +0 -7
  28. package/dist/api-sdk-v1/OrderItemApi.js +0 -26
  29. package/dist/api-sdk-v1/OrganizationApi.d.ts +0 -7
  30. package/dist/api-sdk-v1/OrganizationApi.js +0 -26
  31. package/dist/api-sdk-v1/ProductApi.d.ts +1 -9
  32. package/dist/api-sdk-v1/ProductApi.js +0 -31
  33. package/dist/api-sdk-v1/ProductComponentApi.d.ts +0 -7
  34. package/dist/api-sdk-v1/ProductComponentApi.js +0 -26
  35. package/dist/api-sdk-v1/RestrictionApi.d.ts +0 -7
  36. package/dist/api-sdk-v1/RestrictionApi.js +0 -26
  37. package/dist/api-sdk-v1/ServiceApi.d.ts +0 -7
  38. package/dist/api-sdk-v1/ServiceApi.js +0 -26
  39. package/dist/api-sdk-v1/ServiceAppointmentConfigApi.d.ts +12 -0
  40. package/dist/api-sdk-v1/ServiceAppointmentConfigApi.js +40 -0
  41. package/dist/api-sdk-v1/SplitOrderApi.d.ts +2 -3
  42. package/dist/api-sdk-v1/SplitOrderApi.js +6 -12
  43. package/dist/api-sdk-v1/TransactionApi.d.ts +0 -7
  44. package/dist/api-sdk-v1/TransactionApi.js +0 -26
  45. package/dist/api-sdk-v1/UserApi.d.ts +18 -0
  46. package/dist/api-sdk-v1/UserApi.js +60 -0
  47. package/dist/api-sdk-v1/WorkOrderApi.d.ts +44 -3
  48. package/dist/api-sdk-v1/WorkOrderApi.js +157 -7
  49. package/dist/db-sdk-v1/BillingRequestDb.d.ts +0 -7
  50. package/dist/db-sdk-v1/BillingRequestDb.js +0 -33
  51. package/dist/db-sdk-v1/CaseDb.d.ts +0 -7
  52. package/dist/db-sdk-v1/CaseDb.js +0 -33
  53. package/dist/db-sdk-v1/ConsumptionRateDb.d.ts +0 -7
  54. package/dist/db-sdk-v1/ConsumptionRateDb.js +0 -33
  55. package/dist/db-sdk-v1/ConsumptionScheduleDb.d.ts +0 -7
  56. package/dist/db-sdk-v1/ConsumptionScheduleDb.js +0 -33
  57. package/dist/db-sdk-v1/ContactDb.d.ts +87 -3
  58. package/dist/db-sdk-v1/ContactDb.js +403 -7
  59. package/dist/db-sdk-v1/ContactIdentityDb.d.ts +0 -7
  60. package/dist/db-sdk-v1/ContactIdentityDb.js +0 -33
  61. package/dist/db-sdk-v1/FileDb.d.ts +338 -3
  62. package/dist/db-sdk-v1/FileDb.js +1585 -7
  63. package/dist/db-sdk-v1/InvoiceItemDb.d.ts +0 -7
  64. package/dist/db-sdk-v1/InvoiceItemDb.js +0 -33
  65. package/dist/db-sdk-v1/LeadDb.d.ts +24 -3
  66. package/dist/db-sdk-v1/LeadDb.js +106 -7
  67. package/dist/db-sdk-v1/MilestoneDb.d.ts +0 -7
  68. package/dist/db-sdk-v1/MilestoneDb.js +0 -33
  69. package/dist/db-sdk-v1/NoteDb.d.ts +3 -4
  70. package/dist/db-sdk-v1/NoteDb.js +7 -13
  71. package/dist/db-sdk-v1/OfferDb.d.ts +0 -7
  72. package/dist/db-sdk-v1/OfferDb.js +0 -33
  73. package/dist/db-sdk-v1/OrderDb.d.ts +7 -8
  74. package/dist/db-sdk-v1/OrderDb.js +28 -34
  75. package/dist/db-sdk-v1/OrderItemDb.d.ts +0 -7
  76. package/dist/db-sdk-v1/OrderItemDb.js +0 -33
  77. package/dist/db-sdk-v1/OrganizationDb.d.ts +0 -7
  78. package/dist/db-sdk-v1/OrganizationDb.js +0 -33
  79. package/dist/db-sdk-v1/ProductComponentDb.d.ts +0 -7
  80. package/dist/db-sdk-v1/ProductComponentDb.js +0 -33
  81. package/dist/db-sdk-v1/ProductDb.d.ts +1 -9
  82. package/dist/db-sdk-v1/ProductDb.js +0 -38
  83. package/dist/db-sdk-v1/RestrictionDb.d.ts +0 -7
  84. package/dist/db-sdk-v1/RestrictionDb.js +0 -33
  85. package/dist/db-sdk-v1/ServiceAppointmentConfigDb.d.ts +12 -0
  86. package/dist/db-sdk-v1/ServiceAppointmentConfigDb.js +54 -0
  87. package/dist/db-sdk-v1/ServiceDb.d.ts +0 -7
  88. package/dist/db-sdk-v1/ServiceDb.js +0 -33
  89. package/dist/db-sdk-v1/SplitOrderDb.d.ts +2 -3
  90. package/dist/db-sdk-v1/SplitOrderDb.js +6 -12
  91. package/dist/db-sdk-v1/TransactionDb.d.ts +0 -7
  92. package/dist/db-sdk-v1/TransactionDb.js +0 -33
  93. package/dist/db-sdk-v1/UserDb.d.ts +18 -0
  94. package/dist/db-sdk-v1/UserDb.js +81 -0
  95. package/dist/db-sdk-v1/WorkOrderDb.d.ts +44 -3
  96. package/dist/db-sdk-v1/WorkOrderDb.js +199 -7
  97. package/package.json +2 -2
  98. package/src/api-sdk-v1/BillingRequestApi.ts +0 -27
  99. package/src/api-sdk-v1/CaseApi.ts +0 -27
  100. package/src/api-sdk-v1/ConsumptionRateApi.ts +0 -27
  101. package/src/api-sdk-v1/ConsumptionScheduleApi.ts +0 -27
  102. package/src/api-sdk-v1/ContactApi.ts +343 -19
  103. package/src/api-sdk-v1/ContactIdentityApi.ts +0 -27
  104. package/src/api-sdk-v1/FileApi.ts +1310 -19
  105. package/src/api-sdk-v1/InvoiceItemApi.ts +0 -27
  106. package/src/api-sdk-v1/LeadApi.ts +100 -19
  107. package/src/api-sdk-v1/MilestoneApi.ts +0 -27
  108. package/src/api-sdk-v1/NoteApi.ts +7 -12
  109. package/src/api-sdk-v1/OfferApi.ts +0 -27
  110. package/src/api-sdk-v1/OrderApi.ts +23 -28
  111. package/src/api-sdk-v1/OrderItemApi.ts +0 -27
  112. package/src/api-sdk-v1/OrganizationApi.ts +0 -27
  113. package/src/api-sdk-v1/ProductApi.ts +0 -31
  114. package/src/api-sdk-v1/ProductComponentApi.ts +0 -27
  115. package/src/api-sdk-v1/RestrictionApi.ts +0 -27
  116. package/src/api-sdk-v1/ServiceApi.ts +0 -27
  117. package/src/api-sdk-v1/ServiceAppointmentConfigApi.ts +44 -0
  118. package/src/api-sdk-v1/SplitOrderApi.ts +17 -22
  119. package/src/api-sdk-v1/TransactionApi.ts +0 -27
  120. package/src/api-sdk-v1/UserApi.ts +66 -0
  121. package/src/api-sdk-v1/WorkOrderApi.ts +178 -21
  122. package/src/db-sdk-v1/BillingRequestDb.ts +0 -35
  123. package/src/db-sdk-v1/CaseDb.ts +0 -35
  124. package/src/db-sdk-v1/ConsumptionRateDb.ts +0 -35
  125. package/src/db-sdk-v1/ConsumptionScheduleDb.ts +0 -35
  126. package/src/db-sdk-v1/ContactDb.ts +443 -23
  127. package/src/db-sdk-v1/ContactIdentityDb.ts +0 -35
  128. package/src/db-sdk-v1/FileDb.ts +1698 -23
  129. package/src/db-sdk-v1/InvoiceItemDb.ts +0 -35
  130. package/src/db-sdk-v1/LeadDb.ts +128 -23
  131. package/src/db-sdk-v1/MilestoneDb.ts +0 -35
  132. package/src/db-sdk-v1/NoteDb.ts +7 -12
  133. package/src/db-sdk-v1/OfferDb.ts +0 -35
  134. package/src/db-sdk-v1/OrderDb.ts +31 -36
  135. package/src/db-sdk-v1/OrderItemDb.ts +0 -35
  136. package/src/db-sdk-v1/OrganizationDb.ts +0 -35
  137. package/src/db-sdk-v1/ProductComponentDb.ts +0 -35
  138. package/src/db-sdk-v1/ProductDb.ts +0 -39
  139. package/src/db-sdk-v1/RestrictionDb.ts +0 -35
  140. package/src/db-sdk-v1/ServiceAppointmentConfigDb.ts +60 -0
  141. package/src/db-sdk-v1/ServiceDb.ts +0 -35
  142. package/src/db-sdk-v1/SplitOrderDb.ts +20 -25
  143. package/src/db-sdk-v1/TransactionDb.ts +0 -35
  144. package/src/db-sdk-v1/UserDb.ts +90 -0
  145. package/src/db-sdk-v1/WorkOrderDb.ts +229 -24
  146. package/src/generators/runner.ts +2 -3
@@ -24,11 +24,4 @@ export declare class InvoiceItemDb extends DbProvider {
24
24
  relatedAssociationId?: string;
25
25
  }[]): Promise<any>;
26
26
  unlinkInvoiceInvoiceItems(invoiceItemId: string, linkedInvoiceIds: string[]): Promise<any>;
27
- getInvoiceItems(invoiceItemId: string): Promise<any>;
28
- linkInvoiceItemInvoiceItems(invoiceItemId: string, invoiceItemIds: {
29
- id: string;
30
- relationType?: RelationTypeEnum;
31
- relatedAssociationId?: string;
32
- }[]): Promise<any>;
33
- unlinkInvoiceItemInvoiceItems(invoiceItemId: string, linkedInvoiceItemIds: string[]): Promise<any>;
34
27
  }
@@ -112,38 +112,5 @@ class InvoiceItemDb extends db_provider_1.DbProvider {
112
112
  return yield this._deleteLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
113
113
  });
114
114
  }
115
- // Use this function when you want to return a single record
116
- getInvoiceItems(invoiceItemId) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- return yield this._getLinks(this.moduleName, this.entityName, invoiceItemId, 'InvoiceItem');
119
- });
120
- }
121
- linkInvoiceItemInvoiceItems(invoiceItemId, invoiceItemIds) {
122
- return __awaiter(this, void 0, void 0, function* () {
123
- const associationDtos = [];
124
- for (const param of invoiceItemIds) {
125
- associationDtos.push({
126
- entity: 'BillingModule:InvoiceItem',
127
- recordId: param.id,
128
- linkType: 'InvoiceItem__InvoiceItem',
129
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
130
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
131
- });
132
- }
133
- return yield this._createLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
134
- });
135
- }
136
- unlinkInvoiceItemInvoiceItems(invoiceItemId, linkedInvoiceItemIds) {
137
- return __awaiter(this, void 0, void 0, function* () {
138
- const associationDtos = [];
139
- for (const pk of linkedInvoiceItemIds) {
140
- associationDtos.push({
141
- primaryKey: invoiceItemId,
142
- linkedRecordPrimaryKey: pk,
143
- });
144
- }
145
- return yield this._deleteLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
146
- });
147
- }
148
115
  }
149
116
  exports.InvoiceItemDb = InvoiceItemDb;
@@ -80,13 +80,20 @@ export declare class LeadDb extends DbProvider {
80
80
  relatedAssociationId?: string;
81
81
  }[]): Promise<any>;
82
82
  unlinkLeadFiles(leadId: string, linkedFileIds: string[]): Promise<any>;
83
- getLeads(leadId: string): Promise<any>;
84
- linkWorkOrderLeads(leadId: string, leadIds: {
83
+ getWorkOrders(leadId: string): Promise<any>;
84
+ linkWorkOrderLeads(leadId: string, workOrderIds: {
85
85
  id: string;
86
86
  relationType?: RelationTypeEnum;
87
87
  relatedAssociationId?: string;
88
88
  }[]): Promise<any>;
89
- unlinkWorkOrderLeads(leadId: string, linkedLeadIds: string[]): Promise<any>;
89
+ unlinkWorkOrderLeads(leadId: string, linkedWorkOrderIds: string[]): Promise<any>;
90
+ getCrmDatasets(leadId: string): Promise<any>;
91
+ linkCrmDatasetLeads(leadId: string, crmDatasetIds: {
92
+ id: string;
93
+ relationType?: RelationTypeEnum;
94
+ relatedAssociationId?: string;
95
+ }[]): Promise<any>;
96
+ unlinkCrmDatasetLeads(leadId: string, linkedCrmDatasetIds: string[]): Promise<any>;
90
97
  getOrders(leadId: string): Promise<any>;
91
98
  linkLeadOrders(leadId: string, orderIds: {
92
99
  id: string;
@@ -108,4 +115,18 @@ export declare class LeadDb extends DbProvider {
108
115
  relatedAssociationId?: string;
109
116
  }[]): Promise<any>;
110
117
  unlinkLeadAppointments(leadId: string, linkedAppointmentIds: string[]): Promise<any>;
118
+ getCalls(leadId: string): Promise<any>;
119
+ linkCallLeads(leadId: string, callIds: {
120
+ id: string;
121
+ relationType?: RelationTypeEnum;
122
+ relatedAssociationId?: string;
123
+ }[]): Promise<any>;
124
+ unlinkCallLeads(leadId: string, linkedCallIds: string[]): Promise<any>;
125
+ getFingerprints(leadId: string): Promise<any>;
126
+ linkFingerprintLeads(leadId: string, fingerprintIds: {
127
+ id: string;
128
+ relationType?: RelationTypeEnum;
129
+ relatedAssociationId?: string;
130
+ }[]): Promise<any>;
131
+ unlinkFingerprintLeads(leadId: string, linkedFingerprintIds: string[]): Promise<any>;
111
132
  }
@@ -377,17 +377,17 @@ class LeadDb extends db_provider_1.DbProvider {
377
377
  });
378
378
  }
379
379
  // Use this function when you want to return a single record
380
- getLeads(leadId) {
380
+ getWorkOrders(leadId) {
381
381
  return __awaiter(this, void 0, void 0, function* () {
382
- return yield this._getLinks(this.moduleName, this.entityName, leadId, 'Lead');
382
+ return yield this._getLinks(this.moduleName, this.entityName, leadId, 'WorkOrder');
383
383
  });
384
384
  }
385
- linkWorkOrderLeads(leadId, leadIds) {
385
+ linkWorkOrderLeads(leadId, workOrderIds) {
386
386
  return __awaiter(this, void 0, void 0, function* () {
387
387
  const associationDtos = [];
388
- for (const param of leadIds) {
388
+ for (const param of workOrderIds) {
389
389
  associationDtos.push({
390
- entity: 'CrmModule:Lead',
390
+ entity: 'FieldServiceModule:WorkOrder',
391
391
  recordId: param.id,
392
392
  linkType: 'WorkOrder__Lead',
393
393
  relationType: param === null || param === void 0 ? void 0 : param.relationType,
@@ -397,10 +397,43 @@ class LeadDb extends db_provider_1.DbProvider {
397
397
  return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
398
398
  });
399
399
  }
400
- unlinkWorkOrderLeads(leadId, linkedLeadIds) {
400
+ unlinkWorkOrderLeads(leadId, linkedWorkOrderIds) {
401
401
  return __awaiter(this, void 0, void 0, function* () {
402
402
  const associationDtos = [];
403
- for (const pk of linkedLeadIds) {
403
+ for (const pk of linkedWorkOrderIds) {
404
+ associationDtos.push({
405
+ primaryKey: leadId,
406
+ linkedRecordPrimaryKey: pk,
407
+ });
408
+ }
409
+ return yield this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
410
+ });
411
+ }
412
+ // Use this function when you want to return a single record
413
+ getCrmDatasets(leadId) {
414
+ return __awaiter(this, void 0, void 0, function* () {
415
+ return yield this._getLinks(this.moduleName, this.entityName, leadId, 'CrmDataset');
416
+ });
417
+ }
418
+ linkCrmDatasetLeads(leadId, crmDatasetIds) {
419
+ return __awaiter(this, void 0, void 0, function* () {
420
+ const associationDtos = [];
421
+ for (const param of crmDatasetIds) {
422
+ associationDtos.push({
423
+ entity: 'CrmModule:CrmDataset',
424
+ recordId: param.id,
425
+ linkType: 'CrmDataset__Lead',
426
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
427
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
428
+ });
429
+ }
430
+ return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
431
+ });
432
+ }
433
+ unlinkCrmDatasetLeads(leadId, linkedCrmDatasetIds) {
434
+ return __awaiter(this, void 0, void 0, function* () {
435
+ const associationDtos = [];
436
+ for (const pk of linkedCrmDatasetIds) {
404
437
  associationDtos.push({
405
438
  primaryKey: leadId,
406
439
  linkedRecordPrimaryKey: pk,
@@ -508,5 +541,71 @@ class LeadDb extends db_provider_1.DbProvider {
508
541
  return yield this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
509
542
  });
510
543
  }
544
+ // Use this function when you want to return a single record
545
+ getCalls(leadId) {
546
+ return __awaiter(this, void 0, void 0, function* () {
547
+ return yield this._getLinks(this.moduleName, this.entityName, leadId, 'Call');
548
+ });
549
+ }
550
+ linkCallLeads(leadId, callIds) {
551
+ return __awaiter(this, void 0, void 0, function* () {
552
+ const associationDtos = [];
553
+ for (const param of callIds) {
554
+ associationDtos.push({
555
+ entity: 'NotificationModule:Call',
556
+ recordId: param.id,
557
+ linkType: 'Call__Lead',
558
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
559
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
560
+ });
561
+ }
562
+ return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
563
+ });
564
+ }
565
+ unlinkCallLeads(leadId, linkedCallIds) {
566
+ return __awaiter(this, void 0, void 0, function* () {
567
+ const associationDtos = [];
568
+ for (const pk of linkedCallIds) {
569
+ associationDtos.push({
570
+ primaryKey: leadId,
571
+ linkedRecordPrimaryKey: pk,
572
+ });
573
+ }
574
+ return yield this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
575
+ });
576
+ }
577
+ // Use this function when you want to return a single record
578
+ getFingerprints(leadId) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ return yield this._getLinks(this.moduleName, this.entityName, leadId, 'Fingerprint');
581
+ });
582
+ }
583
+ linkFingerprintLeads(leadId, fingerprintIds) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ const associationDtos = [];
586
+ for (const param of fingerprintIds) {
587
+ associationDtos.push({
588
+ entity: 'CrmModule:Fingerprint',
589
+ recordId: param.id,
590
+ linkType: 'Fingerprint__Lead',
591
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
592
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
593
+ });
594
+ }
595
+ return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
596
+ });
597
+ }
598
+ unlinkFingerprintLeads(leadId, linkedFingerprintIds) {
599
+ return __awaiter(this, void 0, void 0, function* () {
600
+ const associationDtos = [];
601
+ for (const pk of linkedFingerprintIds) {
602
+ associationDtos.push({
603
+ primaryKey: leadId,
604
+ linkedRecordPrimaryKey: pk,
605
+ });
606
+ }
607
+ return yield this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
608
+ });
609
+ }
511
610
  }
512
611
  exports.LeadDb = LeadDb;
@@ -31,13 +31,6 @@ export declare class MilestoneDb extends DbProvider {
31
31
  relatedAssociationId?: string;
32
32
  }[]): Promise<any>;
33
33
  unlinkMilestoneTasks(milestoneId: string, linkedTaskIds: string[]): Promise<any>;
34
- getMilestones(milestoneId: string): Promise<any>;
35
- linkMilestoneMilestones(milestoneId: string, milestoneIds: {
36
- id: string;
37
- relationType?: RelationTypeEnum;
38
- relatedAssociationId?: string;
39
- }[]): Promise<any>;
40
- unlinkMilestoneMilestones(milestoneId: string, linkedMilestoneIds: string[]): Promise<any>;
41
34
  getNotes(milestoneId: string): Promise<any>;
42
35
  linkMilestoneNotes(milestoneId: string, noteIds: {
43
36
  id: string;
@@ -146,39 +146,6 @@ class MilestoneDb extends db_provider_1.DbProvider {
146
146
  });
147
147
  }
148
148
  // Use this function when you want to return a single record
149
- getMilestones(milestoneId) {
150
- return __awaiter(this, void 0, void 0, function* () {
151
- return yield this._getLinks(this.moduleName, this.entityName, milestoneId, 'Milestone');
152
- });
153
- }
154
- linkMilestoneMilestones(milestoneId, milestoneIds) {
155
- return __awaiter(this, void 0, void 0, function* () {
156
- const associationDtos = [];
157
- for (const param of milestoneIds) {
158
- associationDtos.push({
159
- entity: 'ProjectModule:Milestone',
160
- recordId: param.id,
161
- linkType: 'Milestone__Milestone',
162
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
163
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
164
- });
165
- }
166
- return yield this._createLinks(this.moduleName, this.entityName, milestoneId, associationDtos);
167
- });
168
- }
169
- unlinkMilestoneMilestones(milestoneId, linkedMilestoneIds) {
170
- return __awaiter(this, void 0, void 0, function* () {
171
- const associationDtos = [];
172
- for (const pk of linkedMilestoneIds) {
173
- associationDtos.push({
174
- primaryKey: milestoneId,
175
- linkedRecordPrimaryKey: pk,
176
- });
177
- }
178
- return yield this._deleteLinks(this.moduleName, this.entityName, milestoneId, associationDtos);
179
- });
180
- }
181
- // Use this function when you want to return a single record
182
149
  getNotes(milestoneId) {
183
150
  return __awaiter(this, void 0, void 0, function* () {
184
151
  return yield this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
@@ -171,7 +171,7 @@ export declare class NoteDb extends DbProvider {
171
171
  relatedAssociationId?: string;
172
172
  }[]): Promise<any>;
173
173
  unlinkChurnRequestNotes(noteId: string, linkedChurnRequestIds: string[]): Promise<any>;
174
- getPICRequests(noteId: string): Promise<any>;
174
+ getPicRequests(noteId: string): Promise<any>;
175
175
  linkPicRequestNotes(noteId: string, picRequestIds: {
176
176
  id: string;
177
177
  relationType?: RelationTypeEnum;
@@ -346,13 +346,12 @@ export declare class NoteDb extends DbProvider {
346
346
  relatedAssociationId?: string;
347
347
  }[]): Promise<any>;
348
348
  unlinkSmsMessageNotes(noteId: string, linkedSmsMessageIds: string[]): Promise<any>;
349
- getNotes(noteId: string): Promise<any>;
350
- linkNoteNotes(noteId: string, noteIds: {
349
+ linkNoteFiles(noteId: string, fileIds: {
351
350
  id: string;
352
351
  relationType?: RelationTypeEnum;
353
352
  relatedAssociationId?: string;
354
353
  }[]): Promise<any>;
355
- unlinkNoteNotes(noteId: string, linkedNoteIds: string[]): Promise<any>;
354
+ unlinkNoteFiles(noteId: string, linkedFileIds: string[]): Promise<any>;
356
355
  getSweeperMaintenanceAudits(noteId: string): Promise<any>;
357
356
  linkSweeperMaintenanceAuditNotes(noteId: string, sweeperMaintenanceAuditIds: {
358
357
  id: string;
@@ -806,7 +806,7 @@ class NoteDb extends db_provider_1.DbProvider {
806
806
  });
807
807
  }
808
808
  // Use this function when you want to return a single record
809
- getPICRequests(noteId) {
809
+ getPicRequests(noteId) {
810
810
  return __awaiter(this, void 0, void 0, function* () {
811
811
  return yield this._getLinks(this.moduleName, this.entityName, noteId, 'PICRequest');
812
812
  });
@@ -1630,20 +1630,14 @@ class NoteDb extends db_provider_1.DbProvider {
1630
1630
  return yield this._deleteLinks(this.moduleName, this.entityName, noteId, associationDtos);
1631
1631
  });
1632
1632
  }
1633
- // Use this function when you want to return a single record
1634
- getNotes(noteId) {
1635
- return __awaiter(this, void 0, void 0, function* () {
1636
- return yield this._getLinks(this.moduleName, this.entityName, noteId, 'Note');
1637
- });
1638
- }
1639
- linkNoteNotes(noteId, noteIds) {
1633
+ linkNoteFiles(noteId, fileIds) {
1640
1634
  return __awaiter(this, void 0, void 0, function* () {
1641
1635
  const associationDtos = [];
1642
- for (const param of noteIds) {
1636
+ for (const param of fileIds) {
1643
1637
  associationDtos.push({
1644
- entity: 'SupportModule:Note',
1638
+ entity: 'SchemaModule:File',
1645
1639
  recordId: param.id,
1646
- linkType: 'Note__Note',
1640
+ linkType: 'Note__File',
1647
1641
  relationType: param === null || param === void 0 ? void 0 : param.relationType,
1648
1642
  relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1649
1643
  });
@@ -1651,10 +1645,10 @@ class NoteDb extends db_provider_1.DbProvider {
1651
1645
  return yield this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
1652
1646
  });
1653
1647
  }
1654
- unlinkNoteNotes(noteId, linkedNoteIds) {
1648
+ unlinkNoteFiles(noteId, linkedFileIds) {
1655
1649
  return __awaiter(this, void 0, void 0, function* () {
1656
1650
  const associationDtos = [];
1657
- for (const pk of linkedNoteIds) {
1651
+ for (const pk of linkedFileIds) {
1658
1652
  associationDtos.push({
1659
1653
  primaryKey: noteId,
1660
1654
  linkedRecordPrimaryKey: pk,
@@ -38,13 +38,6 @@ export declare class OfferDb extends DbProvider {
38
38
  relatedAssociationId?: string;
39
39
  }[]): Promise<any>;
40
40
  unlinkOrderItemOffers(offerId: string, linkedOrderItemIds: string[]): Promise<any>;
41
- getOffers(offerId: string): Promise<any>;
42
- linkOfferOffers(offerId: string, offerIds: {
43
- id: string;
44
- relationType?: RelationTypeEnum;
45
- relatedAssociationId?: string;
46
- }[]): Promise<any>;
47
- unlinkOfferOffers(offerId: string, linkedOfferIds: string[]): Promise<any>;
48
41
  getDiscounts(offerId: string): Promise<any>;
49
42
  linkOfferDiscounts(offerId: string, discountIds: {
50
43
  id: string;
@@ -179,39 +179,6 @@ class OfferDb extends db_provider_1.DbProvider {
179
179
  });
180
180
  }
181
181
  // Use this function when you want to return a single record
182
- getOffers(offerId) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- return yield this._getLinks(this.moduleName, this.entityName, offerId, 'Offer');
185
- });
186
- }
187
- linkOfferOffers(offerId, offerIds) {
188
- return __awaiter(this, void 0, void 0, function* () {
189
- const associationDtos = [];
190
- for (const param of offerIds) {
191
- associationDtos.push({
192
- entity: 'ProductModule:Offer',
193
- recordId: param.id,
194
- linkType: 'Offer__Offer',
195
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
196
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
197
- });
198
- }
199
- return yield this._createLinks(this.moduleName, this.entityName, offerId, associationDtos);
200
- });
201
- }
202
- unlinkOfferOffers(offerId, linkedOfferIds) {
203
- return __awaiter(this, void 0, void 0, function* () {
204
- const associationDtos = [];
205
- for (const pk of linkedOfferIds) {
206
- associationDtos.push({
207
- primaryKey: offerId,
208
- linkedRecordPrimaryKey: pk,
209
- });
210
- }
211
- return yield this._deleteLinks(this.moduleName, this.entityName, offerId, associationDtos);
212
- });
213
- }
214
- // Use this function when you want to return a single record
215
182
  getDiscounts(offerId) {
216
183
  return __awaiter(this, void 0, void 0, function* () {
217
184
  return yield this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
@@ -116,14 +116,7 @@ export declare class OrderDb extends DbProvider {
116
116
  relatedAssociationId?: string;
117
117
  }[]): Promise<any>;
118
118
  unlinkOrderActivitys(orderId: string, linkedActivityIds: string[]): Promise<any>;
119
- getOrders(orderId: string): Promise<any>;
120
- linkOrderOrders(orderId: string, orderIds: {
121
- id: string;
122
- relationType?: RelationTypeEnum;
123
- relatedAssociationId?: string;
124
- }[]): Promise<any>;
125
- unlinkOrderOrders(orderId: string, linkedOrderIds: string[]): Promise<any>;
126
- getPICRequests(orderId: string): Promise<any>;
119
+ getPicRequests(orderId: string): Promise<any>;
127
120
  linkPicRequestOrders(orderId: string, picRequestIds: {
128
121
  id: string;
129
122
  relationType?: RelationTypeEnum;
@@ -221,6 +214,12 @@ export declare class OrderDb extends DbProvider {
221
214
  relatedAssociationId?: string;
222
215
  }[]): Promise<any>;
223
216
  unlinkOrderInvoices(orderId: string, linkedInvoiceIds: string[]): Promise<any>;
217
+ linkOrderSplitOrders(orderId: string, splitOrderIds: {
218
+ id: string;
219
+ relationType?: RelationTypeEnum;
220
+ relatedAssociationId?: string;
221
+ }[]): Promise<any>;
222
+ unlinkOrderSplitOrders(orderId: string, linkedSplitOrderIds: string[]): Promise<any>;
224
223
  getPhoneNumbers(orderId: string): Promise<any>;
225
224
  linkOrderPhoneNumbers(orderId: string, phoneNumberIds: {
226
225
  id: string;
@@ -547,40 +547,7 @@ class OrderDb extends db_provider_1.DbProvider {
547
547
  });
548
548
  }
549
549
  // Use this function when you want to return a single record
550
- getOrders(orderId) {
551
- return __awaiter(this, void 0, void 0, function* () {
552
- return yield this._getLinks(this.moduleName, this.entityName, orderId, 'Order');
553
- });
554
- }
555
- linkOrderOrders(orderId, orderIds) {
556
- return __awaiter(this, void 0, void 0, function* () {
557
- const associationDtos = [];
558
- for (const param of orderIds) {
559
- associationDtos.push({
560
- entity: 'OrderModule:Order',
561
- recordId: param.id,
562
- linkType: 'Order__Order',
563
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
564
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
565
- });
566
- }
567
- return yield this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
568
- });
569
- }
570
- unlinkOrderOrders(orderId, linkedOrderIds) {
571
- return __awaiter(this, void 0, void 0, function* () {
572
- const associationDtos = [];
573
- for (const pk of linkedOrderIds) {
574
- associationDtos.push({
575
- primaryKey: orderId,
576
- linkedRecordPrimaryKey: pk,
577
- });
578
- }
579
- return yield this._deleteLinks(this.moduleName, this.entityName, orderId, associationDtos);
580
- });
581
- }
582
- // Use this function when you want to return a single record
583
- getPICRequests(orderId) {
550
+ getPicRequests(orderId) {
584
551
  return __awaiter(this, void 0, void 0, function* () {
585
552
  return yield this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
586
553
  });
@@ -1041,6 +1008,33 @@ class OrderDb extends db_provider_1.DbProvider {
1041
1008
  return yield this._deleteLinks(this.moduleName, this.entityName, orderId, associationDtos);
1042
1009
  });
1043
1010
  }
1011
+ linkOrderSplitOrders(orderId, splitOrderIds) {
1012
+ return __awaiter(this, void 0, void 0, function* () {
1013
+ const associationDtos = [];
1014
+ for (const param of splitOrderIds) {
1015
+ associationDtos.push({
1016
+ entity: 'OrderModule:SplitOrder',
1017
+ recordId: param.id,
1018
+ linkType: 'Order__SplitOrder',
1019
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1020
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1021
+ });
1022
+ }
1023
+ return yield this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
1024
+ });
1025
+ }
1026
+ unlinkOrderSplitOrders(orderId, linkedSplitOrderIds) {
1027
+ return __awaiter(this, void 0, void 0, function* () {
1028
+ const associationDtos = [];
1029
+ for (const pk of linkedSplitOrderIds) {
1030
+ associationDtos.push({
1031
+ primaryKey: orderId,
1032
+ linkedRecordPrimaryKey: pk,
1033
+ });
1034
+ }
1035
+ return yield this._deleteLinks(this.moduleName, this.entityName, orderId, associationDtos);
1036
+ });
1037
+ }
1044
1038
  // Use this function when you want to return a single record
1045
1039
  getPhoneNumbers(orderId) {
1046
1040
  return __awaiter(this, void 0, void 0, function* () {
@@ -101,13 +101,6 @@ export declare class OrderItemDb extends DbProvider {
101
101
  relatedAssociationId?: string;
102
102
  }[]): Promise<any>;
103
103
  unlinkOrderItemActivitys(orderItemId: string, linkedActivityIds: string[]): Promise<any>;
104
- getOrderItems(orderItemId: string): Promise<any>;
105
- linkOrderItemOrderItems(orderItemId: string, orderItemIds: {
106
- id: string;
107
- relationType?: RelationTypeEnum;
108
- relatedAssociationId?: string;
109
- }[]): Promise<any>;
110
- unlinkOrderItemOrderItems(orderItemId: string, linkedOrderItemIds: string[]): Promise<any>;
111
104
  getVoiceConfigurations(orderItemId: string): Promise<any>;
112
105
  linkOrderItemVoiceConfigurations(orderItemId: string, voiceConfigurationIds: {
113
106
  id: string;
@@ -476,39 +476,6 @@ class OrderItemDb extends db_provider_1.DbProvider {
476
476
  });
477
477
  }
478
478
  // Use this function when you want to return a single record
479
- getOrderItems(orderItemId) {
480
- return __awaiter(this, void 0, void 0, function* () {
481
- return yield this._getLinks(this.moduleName, this.entityName, orderItemId, 'OrderItem');
482
- });
483
- }
484
- linkOrderItemOrderItems(orderItemId, orderItemIds) {
485
- return __awaiter(this, void 0, void 0, function* () {
486
- const associationDtos = [];
487
- for (const param of orderItemIds) {
488
- associationDtos.push({
489
- entity: 'OrderModule:OrderItem',
490
- recordId: param.id,
491
- linkType: 'OrderItem__OrderItem',
492
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
493
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
494
- });
495
- }
496
- return yield this._createLinks(this.moduleName, this.entityName, orderItemId, associationDtos);
497
- });
498
- }
499
- unlinkOrderItemOrderItems(orderItemId, linkedOrderItemIds) {
500
- return __awaiter(this, void 0, void 0, function* () {
501
- const associationDtos = [];
502
- for (const pk of linkedOrderItemIds) {
503
- associationDtos.push({
504
- primaryKey: orderItemId,
505
- linkedRecordPrimaryKey: pk,
506
- });
507
- }
508
- return yield this._deleteLinks(this.moduleName, this.entityName, orderItemId, associationDtos);
509
- });
510
- }
511
- // Use this function when you want to return a single record
512
479
  getVoiceConfigurations(orderItemId) {
513
480
  return __awaiter(this, void 0, void 0, function* () {
514
481
  return yield this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
@@ -38,11 +38,4 @@ export declare class OrganizationDb extends DbProvider {
38
38
  relatedAssociationId?: string;
39
39
  }[]): Promise<any>;
40
40
  unlinkLeadOrganizations(organizationId: string, linkedLeadIds: string[]): Promise<any>;
41
- getOrganizations(organizationId: string): Promise<any>;
42
- linkOrganizationOrganizations(organizationId: string, organizationIds: {
43
- id: string;
44
- relationType?: RelationTypeEnum;
45
- relatedAssociationId?: string;
46
- }[]): Promise<any>;
47
- unlinkOrganizationOrganizations(organizationId: string, linkedOrganizationIds: string[]): Promise<any>;
48
41
  }
@@ -178,38 +178,5 @@ class OrganizationDb extends db_provider_1.DbProvider {
178
178
  return yield this._deleteLinks(this.moduleName, this.entityName, organizationId, associationDtos);
179
179
  });
180
180
  }
181
- // Use this function when you want to return a single record
182
- getOrganizations(organizationId) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- return yield this._getLinks(this.moduleName, this.entityName, organizationId, 'Organization');
185
- });
186
- }
187
- linkOrganizationOrganizations(organizationId, organizationIds) {
188
- return __awaiter(this, void 0, void 0, function* () {
189
- const associationDtos = [];
190
- for (const param of organizationIds) {
191
- associationDtos.push({
192
- entity: 'CrmModule:Organization',
193
- recordId: param.id,
194
- linkType: 'Organization__Organization',
195
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
196
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
197
- });
198
- }
199
- return yield this._createLinks(this.moduleName, this.entityName, organizationId, associationDtos);
200
- });
201
- }
202
- unlinkOrganizationOrganizations(organizationId, linkedOrganizationIds) {
203
- return __awaiter(this, void 0, void 0, function* () {
204
- const associationDtos = [];
205
- for (const pk of linkedOrganizationIds) {
206
- associationDtos.push({
207
- primaryKey: organizationId,
208
- linkedRecordPrimaryKey: pk,
209
- });
210
- }
211
- return yield this._deleteLinks(this.moduleName, this.entityName, organizationId, associationDtos);
212
- });
213
- }
214
181
  }
215
182
  exports.OrganizationDb = OrganizationDb;
@@ -31,11 +31,4 @@ export declare class ProductComponentDb extends DbProvider {
31
31
  relatedAssociationId?: string;
32
32
  }[]): Promise<any>;
33
33
  unlinkProductProductComponents(productComponentId: string, linkedProductIds: string[]): Promise<any>;
34
- getProductComponents(productComponentId: string): Promise<any>;
35
- linkProductComponentProductComponents(productComponentId: string, productComponentIds: {
36
- id: string;
37
- relationType?: RelationTypeEnum;
38
- relatedAssociationId?: string;
39
- }[]): Promise<any>;
40
- unlinkProductComponentProductComponents(productComponentId: string, linkedProductComponentIds: string[]): Promise<any>;
41
34
  }