@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
@@ -278,17 +278,17 @@ class WorkOrderDb extends db_provider_1.DbProvider {
278
278
  });
279
279
  }
280
280
  // Use this function when you want to return a single record
281
- getWorkOrders(workOrderId) {
281
+ getAccounts(workOrderId) {
282
282
  return __awaiter(this, void 0, void 0, function* () {
283
- return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'WorkOrder');
283
+ return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'Account');
284
284
  });
285
285
  }
286
- linkAccountWorkOrders(workOrderId, workOrderIds) {
286
+ linkAccountWorkOrders(workOrderId, accountIds) {
287
287
  return __awaiter(this, void 0, void 0, function* () {
288
288
  const associationDtos = [];
289
- for (const param of workOrderIds) {
289
+ for (const param of accountIds) {
290
290
  associationDtos.push({
291
- entity: 'FieldServiceModule:WorkOrder',
291
+ entity: 'CrmModule:Account',
292
292
  recordId: param.id,
293
293
  linkType: 'Account__WorkOrder',
294
294
  relationType: param === null || param === void 0 ? void 0 : param.relationType,
@@ -298,10 +298,10 @@ class WorkOrderDb extends db_provider_1.DbProvider {
298
298
  return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
299
299
  });
300
300
  }
301
- unlinkAccountWorkOrders(workOrderId, linkedWorkOrderIds) {
301
+ unlinkAccountWorkOrders(workOrderId, linkedAccountIds) {
302
302
  return __awaiter(this, void 0, void 0, function* () {
303
303
  const associationDtos = [];
304
- for (const pk of linkedWorkOrderIds) {
304
+ for (const pk of linkedAccountIds) {
305
305
  associationDtos.push({
306
306
  primaryKey: workOrderId,
307
307
  linkedRecordPrimaryKey: pk,
@@ -542,6 +542,39 @@ class WorkOrderDb extends db_provider_1.DbProvider {
542
542
  });
543
543
  }
544
544
  // Use this function when you want to return a single record
545
+ getPaymentMethodRefunds(workOrderId) {
546
+ return __awaiter(this, void 0, void 0, function* () {
547
+ return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'PaymentMethodRefund');
548
+ });
549
+ }
550
+ linkPaymentMethodRefundWorkOrders(workOrderId, paymentMethodRefundIds) {
551
+ return __awaiter(this, void 0, void 0, function* () {
552
+ const associationDtos = [];
553
+ for (const param of paymentMethodRefundIds) {
554
+ associationDtos.push({
555
+ entity: 'BillingModule:PaymentMethodRefund',
556
+ recordId: param.id,
557
+ linkType: 'PaymentMethodRefund__WorkOrder',
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, workOrderId, associationDtos);
563
+ });
564
+ }
565
+ unlinkPaymentMethodRefundWorkOrders(workOrderId, linkedPaymentMethodRefundIds) {
566
+ return __awaiter(this, void 0, void 0, function* () {
567
+ const associationDtos = [];
568
+ for (const pk of linkedPaymentMethodRefundIds) {
569
+ associationDtos.push({
570
+ primaryKey: workOrderId,
571
+ linkedRecordPrimaryKey: pk,
572
+ });
573
+ }
574
+ return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
575
+ });
576
+ }
577
+ // Use this function when you want to return a single record
545
578
  getLeads(workOrderId) {
546
579
  return __awaiter(this, void 0, void 0, function* () {
547
580
  return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'Lead');
@@ -707,6 +740,39 @@ class WorkOrderDb extends db_provider_1.DbProvider {
707
740
  });
708
741
  }
709
742
  // Use this function when you want to return a single record
743
+ getOrders(workOrderId) {
744
+ return __awaiter(this, void 0, void 0, function* () {
745
+ return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'Order');
746
+ });
747
+ }
748
+ linkOrderWorkOrders(workOrderId, orderIds) {
749
+ return __awaiter(this, void 0, void 0, function* () {
750
+ const associationDtos = [];
751
+ for (const param of orderIds) {
752
+ associationDtos.push({
753
+ entity: 'OrderModule:Order',
754
+ recordId: param.id,
755
+ linkType: 'Order__WorkOrder',
756
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
757
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
758
+ });
759
+ }
760
+ return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
761
+ });
762
+ }
763
+ unlinkOrderWorkOrders(workOrderId, linkedOrderIds) {
764
+ return __awaiter(this, void 0, void 0, function* () {
765
+ const associationDtos = [];
766
+ for (const pk of linkedOrderIds) {
767
+ associationDtos.push({
768
+ primaryKey: workOrderId,
769
+ linkedRecordPrimaryKey: pk,
770
+ });
771
+ }
772
+ return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
773
+ });
774
+ }
775
+ // Use this function when you want to return a single record
710
776
  getServiceAppointmentConfigs(workOrderId) {
711
777
  return __awaiter(this, void 0, void 0, function* () {
712
778
  return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'ServiceAppointmentConfig');
@@ -806,6 +872,105 @@ class WorkOrderDb extends db_provider_1.DbProvider {
806
872
  });
807
873
  }
808
874
  // Use this function when you want to return a single record
875
+ getOrderRemediationTasks(workOrderId) {
876
+ return __awaiter(this, void 0, void 0, function* () {
877
+ return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'OrderRemediationTask');
878
+ });
879
+ }
880
+ linkOrderRemediationTaskWorkOrders(workOrderId, orderRemediationTaskIds) {
881
+ return __awaiter(this, void 0, void 0, function* () {
882
+ const associationDtos = [];
883
+ for (const param of orderRemediationTaskIds) {
884
+ associationDtos.push({
885
+ entity: 'OrderModule:OrderRemediationTask',
886
+ recordId: param.id,
887
+ linkType: 'OrderRemediationTask__WorkOrder',
888
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
889
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
890
+ });
891
+ }
892
+ return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
893
+ });
894
+ }
895
+ unlinkOrderRemediationTaskWorkOrders(workOrderId, linkedOrderRemediationTaskIds) {
896
+ return __awaiter(this, void 0, void 0, function* () {
897
+ const associationDtos = [];
898
+ for (const pk of linkedOrderRemediationTaskIds) {
899
+ associationDtos.push({
900
+ primaryKey: workOrderId,
901
+ linkedRecordPrimaryKey: pk,
902
+ });
903
+ }
904
+ return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
905
+ });
906
+ }
907
+ // Use this function when you want to return a single record
908
+ getCases(workOrderId) {
909
+ return __awaiter(this, void 0, void 0, function* () {
910
+ return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'Case');
911
+ });
912
+ }
913
+ linkCaseWorkOrders(workOrderId, caseIds) {
914
+ return __awaiter(this, void 0, void 0, function* () {
915
+ const associationDtos = [];
916
+ for (const param of caseIds) {
917
+ associationDtos.push({
918
+ entity: 'SupportModule:Case',
919
+ recordId: param.id,
920
+ linkType: 'Case__WorkOrder',
921
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
922
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
923
+ });
924
+ }
925
+ return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
926
+ });
927
+ }
928
+ unlinkCaseWorkOrders(workOrderId, linkedCaseIds) {
929
+ return __awaiter(this, void 0, void 0, function* () {
930
+ const associationDtos = [];
931
+ for (const pk of linkedCaseIds) {
932
+ associationDtos.push({
933
+ primaryKey: workOrderId,
934
+ linkedRecordPrimaryKey: pk,
935
+ });
936
+ }
937
+ return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
938
+ });
939
+ }
940
+ // Use this function when you want to return a single record
941
+ getCalls(workOrderId) {
942
+ return __awaiter(this, void 0, void 0, function* () {
943
+ return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'Call');
944
+ });
945
+ }
946
+ linkCallWorkOrders(workOrderId, callIds) {
947
+ return __awaiter(this, void 0, void 0, function* () {
948
+ const associationDtos = [];
949
+ for (const param of callIds) {
950
+ associationDtos.push({
951
+ entity: 'NotificationModule:Call',
952
+ recordId: param.id,
953
+ linkType: 'Call__WorkOrder',
954
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
955
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
956
+ });
957
+ }
958
+ return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
959
+ });
960
+ }
961
+ unlinkCallWorkOrders(workOrderId, linkedCallIds) {
962
+ return __awaiter(this, void 0, void 0, function* () {
963
+ const associationDtos = [];
964
+ for (const pk of linkedCallIds) {
965
+ associationDtos.push({
966
+ primaryKey: workOrderId,
967
+ linkedRecordPrimaryKey: pk,
968
+ });
969
+ }
970
+ return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
971
+ });
972
+ }
973
+ // Use this function when you want to return a single record
809
974
  getPermissionToFails(workOrderId) {
810
975
  return __awaiter(this, void 0, void 0, function* () {
811
976
  return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'PermissionToFail');
@@ -1036,6 +1201,33 @@ class WorkOrderDb extends db_provider_1.DbProvider {
1036
1201
  return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
1037
1202
  });
1038
1203
  }
1204
+ linkWorkOrderOwners(workOrderId, userIds) {
1205
+ return __awaiter(this, void 0, void 0, function* () {
1206
+ const associationDtos = [];
1207
+ for (const param of userIds) {
1208
+ associationDtos.push({
1209
+ entity: 'IdentityModule:User',
1210
+ recordId: param.id,
1211
+ linkType: 'WorkOrderOwner',
1212
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1213
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1214
+ });
1215
+ }
1216
+ return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
1217
+ });
1218
+ }
1219
+ unlinkWorkOrderOwners(workOrderId, linkedUserIds) {
1220
+ return __awaiter(this, void 0, void 0, function* () {
1221
+ const associationDtos = [];
1222
+ for (const pk of linkedUserIds) {
1223
+ associationDtos.push({
1224
+ primaryKey: workOrderId,
1225
+ linkedRecordPrimaryKey: pk,
1226
+ });
1227
+ }
1228
+ return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
1229
+ });
1230
+ }
1039
1231
  // Use this function when you want to return a single record
1040
1232
  getNetomniaFtthServiceVisitSheets(workOrderId) {
1041
1233
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d19n/youfibre-odin-sdk",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "author": "@d19n",
6
6
  "license": "UNLICENSED",
@@ -11,7 +11,7 @@
11
11
  "typescript": "^5.4.5"
12
12
  },
13
13
  "dependencies": {
14
- "@d19n/odin-sdk-generator": "^1.0.52",
14
+ "@d19n/odin-sdk-generator": "^1.0.57",
15
15
  "@d19n/odin-types": "^1.0.10"
16
16
  },
17
17
  "scripts": {
@@ -101,33 +101,6 @@
101
101
  }
102
102
 
103
103
 
104
- // Use this function when you want to return a single record
105
- public async getBillingRequests(billingRequestId: string) {
106
- return await this._getLinks(this.moduleName, this.entityName, billingRequestId, 'BillingRequest');
107
- }
108
-
109
- public async linkBillingRequestBillingRequests(billingRequestId: string, billingRequestIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
110
-
111
- const associationDtos = [];
112
- for(const param of billingRequestIds){
113
- associationDtos.push({
114
- entity: 'BillingModule:BillingRequest',
115
- recordId: param.id,
116
- linkType: 'BillingRequest__BillingRequest',
117
- relationType: param?.relationType,
118
- relatedAssociationId: param?.relatedAssociationId
119
- });
120
- }
121
-
122
- return await this._createLinks(this.moduleName, this.entityName, billingRequestId, associationDtos);
123
- }
124
-
125
- public async unLinkBillingRequestBillingRequests(billingRequestId: string, linkedBillingRequestId: string) {
126
-
127
- return await this._deleteLinks(this.moduleName, this.entityName, billingRequestId, linkedBillingRequestId);
128
- }
129
-
130
-
131
104
  // Use this function when you want to return a single record
132
105
  public async getFiles(billingRequestId: string) {
133
106
  return await this._getLinks(this.moduleName, this.entityName, billingRequestId, 'File');
@@ -74,33 +74,6 @@
74
74
  }
75
75
 
76
76
 
77
- // Use this function when you want to return a single record
78
- public async getCases(caseId: string) {
79
- return await this._getLinks(this.moduleName, this.entityName, caseId, 'Case');
80
- }
81
-
82
- public async linkCaseCases(caseId: string, caseIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
83
-
84
- const associationDtos = [];
85
- for(const param of caseIds){
86
- associationDtos.push({
87
- entity: 'SupportModule:Case',
88
- recordId: param.id,
89
- linkType: 'Case__Case',
90
- relationType: param?.relationType,
91
- relatedAssociationId: param?.relatedAssociationId
92
- });
93
- }
94
-
95
- return await this._createLinks(this.moduleName, this.entityName, caseId, associationDtos);
96
- }
97
-
98
- public async unLinkCaseCases(caseId: string, linkedCaseId: string) {
99
-
100
- return await this._deleteLinks(this.moduleName, this.entityName, caseId, linkedCaseId);
101
- }
102
-
103
-
104
77
  // Use this function when you want to return a single record
105
78
  public async getFiles(caseId: string) {
106
79
  return await this._getLinks(this.moduleName, this.entityName, caseId, 'File');
@@ -101,31 +101,4 @@
101
101
  }
102
102
 
103
103
 
104
- // Use this function when you want to return a single record
105
- public async getConsumptionRates(consumptionRateId: string) {
106
- return await this._getLinks(this.moduleName, this.entityName, consumptionRateId, 'ConsumptionRate');
107
- }
108
-
109
- public async linkConsumptionRateConsumptionRates(consumptionRateId: string, consumptionRateIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
110
-
111
- const associationDtos = [];
112
- for(const param of consumptionRateIds){
113
- associationDtos.push({
114
- entity: 'ProductModule:ConsumptionRate',
115
- recordId: param.id,
116
- linkType: 'ConsumptionRate__ConsumptionRate',
117
- relationType: param?.relationType,
118
- relatedAssociationId: param?.relatedAssociationId
119
- });
120
- }
121
-
122
- return await this._createLinks(this.moduleName, this.entityName, consumptionRateId, associationDtos);
123
- }
124
-
125
- public async unLinkConsumptionRateConsumptionRates(consumptionRateId: string, linkedConsumptionRateId: string) {
126
-
127
- return await this._deleteLinks(this.moduleName, this.entityName, consumptionRateId, linkedConsumptionRateId);
128
- }
129
-
130
-
131
104
  }
@@ -128,31 +128,4 @@
128
128
  }
129
129
 
130
130
 
131
- // Use this function when you want to return a single record
132
- public async getConsumptionSchedules(consumptionScheduleId: string) {
133
- return await this._getLinks(this.moduleName, this.entityName, consumptionScheduleId, 'ConsumptionSchedule');
134
- }
135
-
136
- public async linkConsumptionScheduleConsumptionSchedules(consumptionScheduleId: string, consumptionScheduleIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
137
-
138
- const associationDtos = [];
139
- for(const param of consumptionScheduleIds){
140
- associationDtos.push({
141
- entity: 'ProductModule:ConsumptionSchedule',
142
- recordId: param.id,
143
- linkType: 'ConsumptionSchedule__ConsumptionSchedule',
144
- relationType: param?.relationType,
145
- relatedAssociationId: param?.relatedAssociationId
146
- });
147
- }
148
-
149
- return await this._createLinks(this.moduleName, this.entityName, consumptionScheduleId, associationDtos);
150
- }
151
-
152
- public async unLinkConsumptionScheduleConsumptionSchedules(consumptionScheduleId: string, linkedConsumptionScheduleId: string) {
153
-
154
- return await this._deleteLinks(this.moduleName, this.entityName, consumptionScheduleId, linkedConsumptionScheduleId);
155
- }
156
-
157
-
158
131
  }