@d19n/youfibre-odin-sdk 1.0.21 → 1.0.23

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 (130) hide show
  1. package/dist/api-sdk-v1/BillingRequestApi.d.ts +7 -0
  2. package/dist/api-sdk-v1/BillingRequestApi.js +26 -0
  3. package/dist/api-sdk-v1/CaseApi.d.ts +7 -0
  4. package/dist/api-sdk-v1/CaseApi.js +26 -0
  5. package/dist/api-sdk-v1/ConsumptionRateApi.d.ts +7 -0
  6. package/dist/api-sdk-v1/ConsumptionRateApi.js +26 -0
  7. package/dist/api-sdk-v1/ConsumptionScheduleApi.d.ts +7 -0
  8. package/dist/api-sdk-v1/ConsumptionScheduleApi.js +26 -0
  9. package/dist/api-sdk-v1/ContactApi.d.ts +7 -0
  10. package/dist/api-sdk-v1/ContactApi.js +26 -0
  11. package/dist/api-sdk-v1/ContactIdentityApi.d.ts +7 -0
  12. package/dist/api-sdk-v1/ContactIdentityApi.js +26 -0
  13. package/dist/api-sdk-v1/CustomerDeviceOntRemovalApi.d.ts +7 -0
  14. package/dist/api-sdk-v1/CustomerDeviceOntRemovalApi.js +26 -0
  15. package/dist/api-sdk-v1/FileApi.d.ts +0 -49
  16. package/dist/api-sdk-v1/FileApi.js +0 -182
  17. package/dist/api-sdk-v1/InvoiceItemApi.d.ts +7 -0
  18. package/dist/api-sdk-v1/InvoiceItemApi.js +26 -0
  19. package/dist/api-sdk-v1/MilestoneApi.d.ts +7 -0
  20. package/dist/api-sdk-v1/MilestoneApi.js +26 -0
  21. package/dist/api-sdk-v1/NoteApi.d.ts +7 -0
  22. package/dist/api-sdk-v1/NoteApi.js +26 -0
  23. package/dist/api-sdk-v1/OfferApi.d.ts +7 -0
  24. package/dist/api-sdk-v1/OfferApi.js +26 -0
  25. package/dist/api-sdk-v1/OrderApi.d.ts +7 -0
  26. package/dist/api-sdk-v1/OrderApi.js +26 -0
  27. package/dist/api-sdk-v1/OrderItemApi.d.ts +7 -0
  28. package/dist/api-sdk-v1/OrderItemApi.js +26 -0
  29. package/dist/api-sdk-v1/OrganizationApi.d.ts +7 -0
  30. package/dist/api-sdk-v1/OrganizationApi.js +26 -0
  31. package/dist/api-sdk-v1/ProductApi.d.ts +9 -1
  32. package/dist/api-sdk-v1/ProductApi.js +31 -0
  33. package/dist/api-sdk-v1/ProductComponentApi.d.ts +7 -0
  34. package/dist/api-sdk-v1/ProductComponentApi.js +26 -0
  35. package/dist/api-sdk-v1/RestrictionApi.d.ts +7 -0
  36. package/dist/api-sdk-v1/RestrictionApi.js +26 -0
  37. package/dist/api-sdk-v1/ServiceApi.d.ts +7 -0
  38. package/dist/api-sdk-v1/ServiceApi.js +26 -0
  39. package/dist/api-sdk-v1/SplitOrderApi.d.ts +7 -0
  40. package/dist/api-sdk-v1/SplitOrderApi.js +26 -0
  41. package/dist/api-sdk-v1/TransactionApi.d.ts +7 -0
  42. package/dist/api-sdk-v1/TransactionApi.js +26 -0
  43. package/dist/api-sdk-v1/WorkOrderApi.d.ts +14 -0
  44. package/dist/api-sdk-v1/WorkOrderApi.js +52 -0
  45. package/dist/db-sdk-v1/BillingRequestDb.d.ts +7 -0
  46. package/dist/db-sdk-v1/BillingRequestDb.js +33 -0
  47. package/dist/db-sdk-v1/CaseDb.d.ts +7 -0
  48. package/dist/db-sdk-v1/CaseDb.js +33 -0
  49. package/dist/db-sdk-v1/ConsumptionRateDb.d.ts +7 -0
  50. package/dist/db-sdk-v1/ConsumptionRateDb.js +33 -0
  51. package/dist/db-sdk-v1/ConsumptionScheduleDb.d.ts +7 -0
  52. package/dist/db-sdk-v1/ConsumptionScheduleDb.js +33 -0
  53. package/dist/db-sdk-v1/ContactDb.d.ts +7 -0
  54. package/dist/db-sdk-v1/ContactDb.js +33 -0
  55. package/dist/db-sdk-v1/ContactIdentityDb.d.ts +7 -0
  56. package/dist/db-sdk-v1/ContactIdentityDb.js +33 -0
  57. package/dist/db-sdk-v1/FileDb.d.ts +0 -49
  58. package/dist/db-sdk-v1/FileDb.js +0 -231
  59. package/dist/db-sdk-v1/InvoiceItemDb.d.ts +7 -0
  60. package/dist/db-sdk-v1/InvoiceItemDb.js +33 -0
  61. package/dist/db-sdk-v1/MilestoneDb.d.ts +7 -0
  62. package/dist/db-sdk-v1/MilestoneDb.js +33 -0
  63. package/dist/db-sdk-v1/NoteDb.d.ts +7 -0
  64. package/dist/db-sdk-v1/NoteDb.js +33 -0
  65. package/dist/db-sdk-v1/OfferDb.d.ts +7 -0
  66. package/dist/db-sdk-v1/OfferDb.js +33 -0
  67. package/dist/db-sdk-v1/OrderDb.d.ts +7 -0
  68. package/dist/db-sdk-v1/OrderDb.js +33 -0
  69. package/dist/db-sdk-v1/OrderItemDb.d.ts +7 -0
  70. package/dist/db-sdk-v1/OrderItemDb.js +33 -0
  71. package/dist/db-sdk-v1/OrganizationDb.d.ts +7 -0
  72. package/dist/db-sdk-v1/OrganizationDb.js +33 -0
  73. package/dist/db-sdk-v1/ProductComponentDb.d.ts +7 -0
  74. package/dist/db-sdk-v1/ProductComponentDb.js +33 -0
  75. package/dist/db-sdk-v1/ProductDb.d.ts +9 -1
  76. package/dist/db-sdk-v1/ProductDb.js +38 -0
  77. package/dist/db-sdk-v1/RestrictionDb.d.ts +7 -0
  78. package/dist/db-sdk-v1/RestrictionDb.js +33 -0
  79. package/dist/db-sdk-v1/ServiceDb.d.ts +7 -0
  80. package/dist/db-sdk-v1/ServiceDb.js +33 -0
  81. package/dist/db-sdk-v1/SplitOrderDb.d.ts +7 -0
  82. package/dist/db-sdk-v1/SplitOrderDb.js +33 -0
  83. package/dist/db-sdk-v1/TransactionDb.d.ts +7 -0
  84. package/dist/db-sdk-v1/TransactionDb.js +33 -0
  85. package/dist/db-sdk-v1/WorkOrderDb.d.ts +14 -0
  86. package/dist/db-sdk-v1/WorkOrderDb.js +66 -0
  87. package/package.json +2 -2
  88. package/src/api-sdk-v1/BillingRequestApi.ts +27 -0
  89. package/src/api-sdk-v1/CaseApi.ts +27 -0
  90. package/src/api-sdk-v1/ConsumptionRateApi.ts +27 -0
  91. package/src/api-sdk-v1/ConsumptionScheduleApi.ts +27 -0
  92. package/src/api-sdk-v1/ContactApi.ts +27 -0
  93. package/src/api-sdk-v1/ContactIdentityApi.ts +27 -0
  94. package/src/api-sdk-v1/CustomerDeviceOntRemovalApi.ts +27 -0
  95. package/src/api-sdk-v1/FileApi.ts +0 -189
  96. package/src/api-sdk-v1/InvoiceItemApi.ts +27 -0
  97. package/src/api-sdk-v1/MilestoneApi.ts +27 -0
  98. package/src/api-sdk-v1/NoteApi.ts +27 -0
  99. package/src/api-sdk-v1/OfferApi.ts +27 -0
  100. package/src/api-sdk-v1/OrderApi.ts +27 -0
  101. package/src/api-sdk-v1/OrderItemApi.ts +27 -0
  102. package/src/api-sdk-v1/OrganizationApi.ts +27 -0
  103. package/src/api-sdk-v1/ProductApi.ts +31 -0
  104. package/src/api-sdk-v1/ProductComponentApi.ts +27 -0
  105. package/src/api-sdk-v1/RestrictionApi.ts +27 -0
  106. package/src/api-sdk-v1/ServiceApi.ts +27 -0
  107. package/src/api-sdk-v1/SplitOrderApi.ts +27 -0
  108. package/src/api-sdk-v1/TransactionApi.ts +27 -0
  109. package/src/api-sdk-v1/WorkOrderApi.ts +54 -0
  110. package/src/db-sdk-v1/BillingRequestDb.ts +35 -0
  111. package/src/db-sdk-v1/CaseDb.ts +35 -0
  112. package/src/db-sdk-v1/ConsumptionRateDb.ts +35 -0
  113. package/src/db-sdk-v1/ConsumptionScheduleDb.ts +35 -0
  114. package/src/db-sdk-v1/ContactDb.ts +35 -0
  115. package/src/db-sdk-v1/ContactIdentityDb.ts +35 -0
  116. package/src/db-sdk-v1/FileDb.ts +0 -245
  117. package/src/db-sdk-v1/InvoiceItemDb.ts +35 -0
  118. package/src/db-sdk-v1/MilestoneDb.ts +35 -0
  119. package/src/db-sdk-v1/NoteDb.ts +35 -0
  120. package/src/db-sdk-v1/OfferDb.ts +35 -0
  121. package/src/db-sdk-v1/OrderDb.ts +35 -0
  122. package/src/db-sdk-v1/OrderItemDb.ts +35 -0
  123. package/src/db-sdk-v1/OrganizationDb.ts +35 -0
  124. package/src/db-sdk-v1/ProductComponentDb.ts +35 -0
  125. package/src/db-sdk-v1/ProductDb.ts +39 -0
  126. package/src/db-sdk-v1/RestrictionDb.ts +35 -0
  127. package/src/db-sdk-v1/ServiceDb.ts +35 -0
  128. package/src/db-sdk-v1/SplitOrderDb.ts +35 -0
  129. package/src/db-sdk-v1/TransactionDb.ts +35 -0
  130. package/src/db-sdk-v1/WorkOrderDb.ts +70 -0
@@ -245,39 +245,6 @@ class FileDb extends db_provider_1.DbProvider {
245
245
  });
246
246
  }
247
247
  // Use this function when you want to return a single record
248
- getKnowledgeArticles(fileId) {
249
- return __awaiter(this, void 0, void 0, function* () {
250
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'KnowledgeArticle');
251
- });
252
- }
253
- linkKnowledgeArticleFiles(fileId, knowledgeArticleIds) {
254
- return __awaiter(this, void 0, void 0, function* () {
255
- const associationDtos = [];
256
- for (const param of knowledgeArticleIds) {
257
- associationDtos.push({
258
- entity: 'SupportModule:KnowledgeArticle',
259
- recordId: param.id,
260
- linkType: 'KnowledgeArticle__File',
261
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
262
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
263
- });
264
- }
265
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
266
- });
267
- }
268
- unlinkKnowledgeArticleFiles(fileId, linkedKnowledgeArticleIds) {
269
- return __awaiter(this, void 0, void 0, function* () {
270
- const associationDtos = [];
271
- for (const pk of linkedKnowledgeArticleIds) {
272
- associationDtos.push({
273
- primaryKey: fileId,
274
- linkedRecordPrimaryKey: pk,
275
- });
276
- }
277
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
278
- });
279
- }
280
- // Use this function when you want to return a single record
281
248
  getCases(fileId) {
282
249
  return __awaiter(this, void 0, void 0, function* () {
283
250
  return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Case');
@@ -971,72 +938,6 @@ class FileDb extends db_provider_1.DbProvider {
971
938
  });
972
939
  }
973
940
  // Use this function when you want to return a single record
974
- getNetomniaFtth2StageInstallAudits(fileId) {
975
- return __awaiter(this, void 0, void 0, function* () {
976
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtth2StageInstallAudit');
977
- });
978
- }
979
- linkNetomniaFtth2StageInstallAuditFiles(fileId, netomniaFtth2StageInstallAuditIds) {
980
- return __awaiter(this, void 0, void 0, function* () {
981
- const associationDtos = [];
982
- for (const param of netomniaFtth2StageInstallAuditIds) {
983
- associationDtos.push({
984
- entity: 'FieldServiceModule:NetomniaFtth2StageInstallAudit',
985
- recordId: param.id,
986
- linkType: 'NetomniaFtth2StageInstallAudit__File',
987
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
988
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
989
- });
990
- }
991
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
992
- });
993
- }
994
- unlinkNetomniaFtth2StageInstallAuditFiles(fileId, linkedNetomniaFtth2StageInstallAuditIds) {
995
- return __awaiter(this, void 0, void 0, function* () {
996
- const associationDtos = [];
997
- for (const pk of linkedNetomniaFtth2StageInstallAuditIds) {
998
- associationDtos.push({
999
- primaryKey: fileId,
1000
- linkedRecordPrimaryKey: pk,
1001
- });
1002
- }
1003
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1004
- });
1005
- }
1006
- // Use this function when you want to return a single record
1007
- getYfStockCounts(fileId) {
1008
- return __awaiter(this, void 0, void 0, function* () {
1009
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfStockCount');
1010
- });
1011
- }
1012
- linkYfStockCountFiles(fileId, yfStockCountIds) {
1013
- return __awaiter(this, void 0, void 0, function* () {
1014
- const associationDtos = [];
1015
- for (const param of yfStockCountIds) {
1016
- associationDtos.push({
1017
- entity: 'FieldServiceModule:YfStockCount',
1018
- recordId: param.id,
1019
- linkType: 'YfStockCount__File',
1020
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
1021
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1022
- });
1023
- }
1024
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1025
- });
1026
- }
1027
- unlinkYfStockCountFiles(fileId, linkedYfStockCountIds) {
1028
- return __awaiter(this, void 0, void 0, function* () {
1029
- const associationDtos = [];
1030
- for (const pk of linkedYfStockCountIds) {
1031
- associationDtos.push({
1032
- primaryKey: fileId,
1033
- linkedRecordPrimaryKey: pk,
1034
- });
1035
- }
1036
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1037
- });
1038
- }
1039
- // Use this function when you want to return a single record
1040
941
  getYfEquipmentCollections(fileId) {
1041
942
  return __awaiter(this, void 0, void 0, function* () {
1042
943
  return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfEquipmentCollection');
@@ -1460,105 +1361,6 @@ class FileDb extends db_provider_1.DbProvider {
1460
1361
  });
1461
1362
  }
1462
1363
  // Use this function when you want to return a single record
1463
- getUgRetroAudits(fileId) {
1464
- return __awaiter(this, void 0, void 0, function* () {
1465
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgRetroAudit');
1466
- });
1467
- }
1468
- linkUgRetroAuditFiles(fileId, ugRetroAuditIds) {
1469
- return __awaiter(this, void 0, void 0, function* () {
1470
- const associationDtos = [];
1471
- for (const param of ugRetroAuditIds) {
1472
- associationDtos.push({
1473
- entity: 'FieldServiceModule:UgRetroAudit',
1474
- recordId: param.id,
1475
- linkType: 'UgRetroAudit__File',
1476
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
1477
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1478
- });
1479
- }
1480
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1481
- });
1482
- }
1483
- unlinkUgRetroAuditFiles(fileId, linkedUgRetroAuditIds) {
1484
- return __awaiter(this, void 0, void 0, function* () {
1485
- const associationDtos = [];
1486
- for (const pk of linkedUgRetroAuditIds) {
1487
- associationDtos.push({
1488
- primaryKey: fileId,
1489
- linkedRecordPrimaryKey: pk,
1490
- });
1491
- }
1492
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1493
- });
1494
- }
1495
- // Use this function when you want to return a single record
1496
- getOhRetroAudits(fileId) {
1497
- return __awaiter(this, void 0, void 0, function* () {
1498
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhRetroAudit');
1499
- });
1500
- }
1501
- linkOhRetroAuditFiles(fileId, ohRetroAuditIds) {
1502
- return __awaiter(this, void 0, void 0, function* () {
1503
- const associationDtos = [];
1504
- for (const param of ohRetroAuditIds) {
1505
- associationDtos.push({
1506
- entity: 'FieldServiceModule:OhRetroAudit',
1507
- recordId: param.id,
1508
- linkType: 'OhRetroAudit__File',
1509
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
1510
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1511
- });
1512
- }
1513
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1514
- });
1515
- }
1516
- unlinkOhRetroAuditFiles(fileId, linkedOhRetroAuditIds) {
1517
- return __awaiter(this, void 0, void 0, function* () {
1518
- const associationDtos = [];
1519
- for (const pk of linkedOhRetroAuditIds) {
1520
- associationDtos.push({
1521
- primaryKey: fileId,
1522
- linkedRecordPrimaryKey: pk,
1523
- });
1524
- }
1525
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1526
- });
1527
- }
1528
- // Use this function when you want to return a single record
1529
- getRemediationOutcomeForms(fileId) {
1530
- return __awaiter(this, void 0, void 0, function* () {
1531
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'RemediationOutcomeForm');
1532
- });
1533
- }
1534
- linkRemediationOutcomeFormFiles(fileId, remediationOutcomeFormIds) {
1535
- return __awaiter(this, void 0, void 0, function* () {
1536
- const associationDtos = [];
1537
- for (const param of remediationOutcomeFormIds) {
1538
- associationDtos.push({
1539
- entity: 'FieldServiceModule:RemediationOutcomeForm',
1540
- recordId: param.id,
1541
- linkType: 'RemediationOutcomeForm_File',
1542
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
1543
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1544
- });
1545
- }
1546
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1547
- });
1548
- }
1549
- unlinkRemediationOutcomeFormFiles(fileId, linkedRemediationOutcomeFormIds) {
1550
- return __awaiter(this, void 0, void 0, function* () {
1551
- const associationDtos = [];
1552
- for (const pk of linkedRemediationOutcomeFormIds) {
1553
- associationDtos.push({
1554
- primaryKey: fileId,
1555
- linkedRecordPrimaryKey: pk,
1556
- });
1557
- }
1558
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1559
- });
1560
- }
1561
- // Use this function when you want to return a single record
1562
1364
  getUgInProgressAudits(fileId) {
1563
1365
  return __awaiter(this, void 0, void 0, function* () {
1564
1366
  return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgInProgressAudit');
@@ -1625,39 +1427,6 @@ class FileDb extends db_provider_1.DbProvider {
1625
1427
  });
1626
1428
  }
1627
1429
  // Use this function when you want to return a single record
1628
- getBlockageA55s(fileId) {
1629
- return __awaiter(this, void 0, void 0, function* () {
1630
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BlockageA55');
1631
- });
1632
- }
1633
- linkOverlayA55Files(fileId, blockageA55Ids) {
1634
- return __awaiter(this, void 0, void 0, function* () {
1635
- const associationDtos = [];
1636
- for (const param of blockageA55Ids) {
1637
- associationDtos.push({
1638
- entity: 'FieldServiceModule:BlockageA55',
1639
- recordId: param.id,
1640
- linkType: 'OverlayA55_File',
1641
- relationType: param === null || param === void 0 ? void 0 : param.relationType,
1642
- relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1643
- });
1644
- }
1645
- return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1646
- });
1647
- }
1648
- unlinkOverlayA55Files(fileId, linkedBlockageA55Ids) {
1649
- return __awaiter(this, void 0, void 0, function* () {
1650
- const associationDtos = [];
1651
- for (const pk of linkedBlockageA55Ids) {
1652
- associationDtos.push({
1653
- primaryKey: fileId,
1654
- linkedRecordPrimaryKey: pk,
1655
- });
1656
- }
1657
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1658
- });
1659
- }
1660
- // Use this function when you want to return a single record
1661
1430
  getOverlayRealA55s(fileId) {
1662
1431
  return __awaiter(this, void 0, void 0, function* () {
1663
1432
  return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OverlayRealA55');
@@ -24,4 +24,11 @@ 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>;
27
34
  }
@@ -112,5 +112,38 @@ 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
+ }
115
148
  }
116
149
  exports.InvoiceItemDb = InvoiceItemDb;
@@ -31,6 +31,13 @@ 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>;
34
41
  getNotes(milestoneId: string): Promise<any>;
35
42
  linkMilestoneNotes(milestoneId: string, noteIds: {
36
43
  id: string;
@@ -146,6 +146,39 @@ 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
149
182
  getNotes(milestoneId) {
150
183
  return __awaiter(this, void 0, void 0, function* () {
151
184
  return yield this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
@@ -346,6 +346,13 @@ 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: {
351
+ id: string;
352
+ relationType?: RelationTypeEnum;
353
+ relatedAssociationId?: string;
354
+ }[]): Promise<any>;
355
+ unlinkNoteNotes(noteId: string, linkedNoteIds: string[]): Promise<any>;
349
356
  linkNoteFiles(noteId: string, fileIds: {
350
357
  id: string;
351
358
  relationType?: RelationTypeEnum;
@@ -1630,6 +1630,39 @@ 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) {
1640
+ return __awaiter(this, void 0, void 0, function* () {
1641
+ const associationDtos = [];
1642
+ for (const param of noteIds) {
1643
+ associationDtos.push({
1644
+ entity: 'SupportModule:Note',
1645
+ recordId: param.id,
1646
+ linkType: 'Note__Note',
1647
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1648
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1649
+ });
1650
+ }
1651
+ return yield this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
1652
+ });
1653
+ }
1654
+ unlinkNoteNotes(noteId, linkedNoteIds) {
1655
+ return __awaiter(this, void 0, void 0, function* () {
1656
+ const associationDtos = [];
1657
+ for (const pk of linkedNoteIds) {
1658
+ associationDtos.push({
1659
+ primaryKey: noteId,
1660
+ linkedRecordPrimaryKey: pk,
1661
+ });
1662
+ }
1663
+ return yield this._deleteLinks(this.moduleName, this.entityName, noteId, associationDtos);
1664
+ });
1665
+ }
1633
1666
  linkNoteFiles(noteId, fileIds) {
1634
1667
  return __awaiter(this, void 0, void 0, function* () {
1635
1668
  const associationDtos = [];
@@ -38,6 +38,13 @@ 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>;
41
48
  getDiscounts(offerId: string): Promise<any>;
42
49
  linkOfferDiscounts(offerId: string, discountIds: {
43
50
  id: string;
@@ -179,6 +179,39 @@ 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
182
215
  getDiscounts(offerId) {
183
216
  return __awaiter(this, void 0, void 0, function* () {
184
217
  return yield this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
@@ -116,6 +116,13 @@ 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>;
119
126
  getPicRequests(orderId: string): Promise<any>;
120
127
  linkPicRequestOrders(orderId: string, picRequestIds: {
121
128
  id: string;
@@ -547,6 +547,39 @@ 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
550
583
  getPicRequests(orderId) {
551
584
  return __awaiter(this, void 0, void 0, function* () {
552
585
  return yield this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
@@ -101,6 +101,13 @@ 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>;
104
111
  getVoiceConfigurations(orderItemId: string): Promise<any>;
105
112
  linkOrderItemVoiceConfigurations(orderItemId: string, voiceConfigurationIds: {
106
113
  id: string;
@@ -476,6 +476,39 @@ 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
479
512
  getVoiceConfigurations(orderItemId) {
480
513
  return __awaiter(this, void 0, void 0, function* () {
481
514
  return yield this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
@@ -38,4 +38,11 @@ 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>;
41
48
  }
@@ -178,5 +178,38 @@ 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
+ }
181
214
  }
182
215
  exports.OrganizationDb = OrganizationDb;
@@ -31,4 +31,11 @@ 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>;
34
41
  }