@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
@@ -80,17 +80,17 @@ class ContactDb extends db_provider_1.DbProvider {
80
80
  });
81
81
  }
82
82
  // Use this function when you want to return a single record
83
- getContacts(contactId) {
83
+ getOrganizations(contactId) {
84
84
  return __awaiter(this, void 0, void 0, function* () {
85
- return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Contact');
85
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Organization');
86
86
  });
87
87
  }
88
- linkOrganizationContacts(contactId, contactIds) {
88
+ linkOrganizationContacts(contactId, organizationIds) {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
90
  const associationDtos = [];
91
- for (const param of contactIds) {
91
+ for (const param of organizationIds) {
92
92
  associationDtos.push({
93
- entity: 'CrmModule:Contact',
93
+ entity: 'CrmModule:Organization',
94
94
  recordId: param.id,
95
95
  linkType: 'Organization__Contact',
96
96
  relationType: param === null || param === void 0 ? void 0 : param.relationType,
@@ -100,10 +100,43 @@ class ContactDb extends db_provider_1.DbProvider {
100
100
  return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
101
101
  });
102
102
  }
103
- unlinkOrganizationContacts(contactId, linkedContactIds) {
103
+ unlinkOrganizationContacts(contactId, linkedOrganizationIds) {
104
104
  return __awaiter(this, void 0, void 0, function* () {
105
105
  const associationDtos = [];
106
- for (const pk of linkedContactIds) {
106
+ for (const pk of linkedOrganizationIds) {
107
+ associationDtos.push({
108
+ primaryKey: contactId,
109
+ linkedRecordPrimaryKey: pk,
110
+ });
111
+ }
112
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
113
+ });
114
+ }
115
+ // Use this function when you want to return a single record
116
+ getAccounts(contactId) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Account');
119
+ });
120
+ }
121
+ linkBillingContacts(contactId, accountIds) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ const associationDtos = [];
124
+ for (const param of accountIds) {
125
+ associationDtos.push({
126
+ entity: 'CrmModule:Account',
127
+ recordId: param.id,
128
+ linkType: 'BillingContact',
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, contactId, associationDtos);
134
+ });
135
+ }
136
+ unlinkBillingContacts(contactId, linkedAccountIds) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const associationDtos = [];
139
+ for (const pk of linkedAccountIds) {
107
140
  associationDtos.push({
108
141
  primaryKey: contactId,
109
142
  linkedRecordPrimaryKey: pk,
@@ -179,6 +212,105 @@ class ContactDb extends db_provider_1.DbProvider {
179
212
  });
180
213
  }
181
214
  // Use this function when you want to return a single record
215
+ getWorkOrders(contactId) {
216
+ return __awaiter(this, void 0, void 0, function* () {
217
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'WorkOrder');
218
+ });
219
+ }
220
+ linkWorkOrderContacts(contactId, workOrderIds) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ const associationDtos = [];
223
+ for (const param of workOrderIds) {
224
+ associationDtos.push({
225
+ entity: 'FieldServiceModule:WorkOrder',
226
+ recordId: param.id,
227
+ linkType: 'WorkOrder__Contact',
228
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
229
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
230
+ });
231
+ }
232
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
233
+ });
234
+ }
235
+ unlinkWorkOrderContacts(contactId, linkedWorkOrderIds) {
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ const associationDtos = [];
238
+ for (const pk of linkedWorkOrderIds) {
239
+ associationDtos.push({
240
+ primaryKey: contactId,
241
+ linkedRecordPrimaryKey: pk,
242
+ });
243
+ }
244
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
245
+ });
246
+ }
247
+ // Use this function when you want to return a single record
248
+ getOrders(contactId) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Order');
251
+ });
252
+ }
253
+ linkOrderContacts(contactId, orderIds) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const associationDtos = [];
256
+ for (const param of orderIds) {
257
+ associationDtos.push({
258
+ entity: 'OrderModule:Order',
259
+ recordId: param.id,
260
+ linkType: 'Order__Contact',
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, contactId, associationDtos);
266
+ });
267
+ }
268
+ unlinkOrderContacts(contactId, linkedOrderIds) {
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ const associationDtos = [];
271
+ for (const pk of linkedOrderIds) {
272
+ associationDtos.push({
273
+ primaryKey: contactId,
274
+ linkedRecordPrimaryKey: pk,
275
+ });
276
+ }
277
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
278
+ });
279
+ }
280
+ // Use this function when you want to return a single record
281
+ getLeads(contactId) {
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Lead');
284
+ });
285
+ }
286
+ linkLeadContacts(contactId, leadIds) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ const associationDtos = [];
289
+ for (const param of leadIds) {
290
+ associationDtos.push({
291
+ entity: 'CrmModule:Lead',
292
+ recordId: param.id,
293
+ linkType: 'Lead__Contact',
294
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
295
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
296
+ });
297
+ }
298
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
299
+ });
300
+ }
301
+ unlinkLeadContacts(contactId, linkedLeadIds) {
302
+ return __awaiter(this, void 0, void 0, function* () {
303
+ const associationDtos = [];
304
+ for (const pk of linkedLeadIds) {
305
+ associationDtos.push({
306
+ primaryKey: contactId,
307
+ linkedRecordPrimaryKey: pk,
308
+ });
309
+ }
310
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
311
+ });
312
+ }
313
+ // Use this function when you want to return a single record
182
314
  getAddresss(contactId) {
183
315
  return __awaiter(this, void 0, void 0, function* () {
184
316
  return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Address');
@@ -245,6 +377,39 @@ class ContactDb extends db_provider_1.DbProvider {
245
377
  });
246
378
  }
247
379
  // Use this function when you want to return a single record
380
+ getInvoices(contactId) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Invoice');
383
+ });
384
+ }
385
+ linkInvoiceContacts(contactId, invoiceIds) {
386
+ return __awaiter(this, void 0, void 0, function* () {
387
+ const associationDtos = [];
388
+ for (const param of invoiceIds) {
389
+ associationDtos.push({
390
+ entity: 'BillingModule:Invoice',
391
+ recordId: param.id,
392
+ linkType: 'Invoice__Contact',
393
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
394
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
395
+ });
396
+ }
397
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
398
+ });
399
+ }
400
+ unlinkInvoiceContacts(contactId, linkedInvoiceIds) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ const associationDtos = [];
403
+ for (const pk of linkedInvoiceIds) {
404
+ associationDtos.push({
405
+ primaryKey: contactId,
406
+ linkedRecordPrimaryKey: pk,
407
+ });
408
+ }
409
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
410
+ });
411
+ }
412
+ // Use this function when you want to return a single record
248
413
  getBillingRequests(contactId) {
249
414
  return __awaiter(this, void 0, void 0, function* () {
250
415
  return yield this._getLinks(this.moduleName, this.entityName, contactId, 'BillingRequest');
@@ -311,6 +476,72 @@ class ContactDb extends db_provider_1.DbProvider {
311
476
  });
312
477
  }
313
478
  // Use this function when you want to return a single record
479
+ getCommissions(contactId) {
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Commission');
482
+ });
483
+ }
484
+ linkCommissionContacts(contactId, commissionIds) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ const associationDtos = [];
487
+ for (const param of commissionIds) {
488
+ associationDtos.push({
489
+ entity: 'BillingModule:Commission',
490
+ recordId: param.id,
491
+ linkType: 'Commission__Contact',
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, contactId, associationDtos);
497
+ });
498
+ }
499
+ unlinkCommissionContacts(contactId, linkedCommissionIds) {
500
+ return __awaiter(this, void 0, void 0, function* () {
501
+ const associationDtos = [];
502
+ for (const pk of linkedCommissionIds) {
503
+ associationDtos.push({
504
+ primaryKey: contactId,
505
+ linkedRecordPrimaryKey: pk,
506
+ });
507
+ }
508
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
509
+ });
510
+ }
511
+ // Use this function when you want to return a single record
512
+ getOneTouchSwitchs(contactId) {
513
+ return __awaiter(this, void 0, void 0, function* () {
514
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'OneTouchSwitch');
515
+ });
516
+ }
517
+ linkOneTouchSwitchContacts(contactId, oneTouchSwitchIds) {
518
+ return __awaiter(this, void 0, void 0, function* () {
519
+ const associationDtos = [];
520
+ for (const param of oneTouchSwitchIds) {
521
+ associationDtos.push({
522
+ entity: 'OrderModule:OneTouchSwitch',
523
+ recordId: param.id,
524
+ linkType: 'OneTouchSwitch__Contact',
525
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
526
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
527
+ });
528
+ }
529
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
530
+ });
531
+ }
532
+ unlinkOneTouchSwitchContacts(contactId, linkedOneTouchSwitchIds) {
533
+ return __awaiter(this, void 0, void 0, function* () {
534
+ const associationDtos = [];
535
+ for (const pk of linkedOneTouchSwitchIds) {
536
+ associationDtos.push({
537
+ primaryKey: contactId,
538
+ linkedRecordPrimaryKey: pk,
539
+ });
540
+ }
541
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
542
+ });
543
+ }
544
+ // Use this function when you want to return a single record
314
545
  getContactIdentitys(contactId) {
315
546
  return __awaiter(this, void 0, void 0, function* () {
316
547
  return yield this._getLinks(this.moduleName, this.entityName, contactId, 'ContactIdentity');
@@ -377,6 +608,39 @@ class ContactDb extends db_provider_1.DbProvider {
377
608
  });
378
609
  }
379
610
  // Use this function when you want to return a single record
611
+ getDeactivationApprovals(contactId) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'DeactivationApproval');
614
+ });
615
+ }
616
+ linkDeactivationApprovalContacts(contactId, deactivationApprovalIds) {
617
+ return __awaiter(this, void 0, void 0, function* () {
618
+ const associationDtos = [];
619
+ for (const param of deactivationApprovalIds) {
620
+ associationDtos.push({
621
+ entity: 'OrderModule:DeactivationApproval',
622
+ recordId: param.id,
623
+ linkType: 'DeactivationApproval__Contact',
624
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
625
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
626
+ });
627
+ }
628
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
629
+ });
630
+ }
631
+ unlinkDeactivationApprovalContacts(contactId, linkedDeactivationApprovalIds) {
632
+ return __awaiter(this, void 0, void 0, function* () {
633
+ const associationDtos = [];
634
+ for (const pk of linkedDeactivationApprovalIds) {
635
+ associationDtos.push({
636
+ primaryKey: contactId,
637
+ linkedRecordPrimaryKey: pk,
638
+ });
639
+ }
640
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
641
+ });
642
+ }
643
+ // Use this function when you want to return a single record
380
644
  getPhoneNumbers(contactId) {
381
645
  return __awaiter(this, void 0, void 0, function* () {
382
646
  return yield this._getLinks(this.moduleName, this.entityName, contactId, 'PhoneNumber');
@@ -410,6 +674,72 @@ class ContactDb extends db_provider_1.DbProvider {
410
674
  });
411
675
  }
412
676
  // Use this function when you want to return a single record
677
+ getOrderRemediationTasks(contactId) {
678
+ return __awaiter(this, void 0, void 0, function* () {
679
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'OrderRemediationTask');
680
+ });
681
+ }
682
+ linkOrderRemediationTaskContacts(contactId, orderRemediationTaskIds) {
683
+ return __awaiter(this, void 0, void 0, function* () {
684
+ const associationDtos = [];
685
+ for (const param of orderRemediationTaskIds) {
686
+ associationDtos.push({
687
+ entity: 'OrderModule:OrderRemediationTask',
688
+ recordId: param.id,
689
+ linkType: 'OrderRemediationTask__Contact',
690
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
691
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
692
+ });
693
+ }
694
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
695
+ });
696
+ }
697
+ unlinkOrderRemediationTaskContacts(contactId, linkedOrderRemediationTaskIds) {
698
+ return __awaiter(this, void 0, void 0, function* () {
699
+ const associationDtos = [];
700
+ for (const pk of linkedOrderRemediationTaskIds) {
701
+ associationDtos.push({
702
+ primaryKey: contactId,
703
+ linkedRecordPrimaryKey: pk,
704
+ });
705
+ }
706
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
707
+ });
708
+ }
709
+ // Use this function when you want to return a single record
710
+ getCases(contactId) {
711
+ return __awaiter(this, void 0, void 0, function* () {
712
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Case');
713
+ });
714
+ }
715
+ linkCaseContacts(contactId, caseIds) {
716
+ return __awaiter(this, void 0, void 0, function* () {
717
+ const associationDtos = [];
718
+ for (const param of caseIds) {
719
+ associationDtos.push({
720
+ entity: 'SupportModule:Case',
721
+ recordId: param.id,
722
+ linkType: 'Case__Contact',
723
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
724
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
725
+ });
726
+ }
727
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
728
+ });
729
+ }
730
+ unlinkCaseContacts(contactId, linkedCaseIds) {
731
+ return __awaiter(this, void 0, void 0, function* () {
732
+ const associationDtos = [];
733
+ for (const pk of linkedCaseIds) {
734
+ associationDtos.push({
735
+ primaryKey: contactId,
736
+ linkedRecordPrimaryKey: pk,
737
+ });
738
+ }
739
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
740
+ });
741
+ }
742
+ // Use this function when you want to return a single record
413
743
  getAppointments(contactId) {
414
744
  return __awaiter(this, void 0, void 0, function* () {
415
745
  return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Appointment');
@@ -443,6 +773,39 @@ class ContactDb extends db_provider_1.DbProvider {
443
773
  });
444
774
  }
445
775
  // Use this function when you want to return a single record
776
+ getCalls(contactId) {
777
+ return __awaiter(this, void 0, void 0, function* () {
778
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Call');
779
+ });
780
+ }
781
+ linkCallContacts(contactId, callIds) {
782
+ return __awaiter(this, void 0, void 0, function* () {
783
+ const associationDtos = [];
784
+ for (const param of callIds) {
785
+ associationDtos.push({
786
+ entity: 'NotificationModule:Call',
787
+ recordId: param.id,
788
+ linkType: 'Call__Contact',
789
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
790
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
791
+ });
792
+ }
793
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
794
+ });
795
+ }
796
+ unlinkCallContacts(contactId, linkedCallIds) {
797
+ return __awaiter(this, void 0, void 0, function* () {
798
+ const associationDtos = [];
799
+ for (const pk of linkedCallIds) {
800
+ associationDtos.push({
801
+ primaryKey: contactId,
802
+ linkedRecordPrimaryKey: pk,
803
+ });
804
+ }
805
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
806
+ });
807
+ }
808
+ // Use this function when you want to return a single record
446
809
  getPaymentMethods(contactId) {
447
810
  return __awaiter(this, void 0, void 0, function* () {
448
811
  return yield this._getLinks(this.moduleName, this.entityName, contactId, 'PaymentMethod');
@@ -475,5 +838,38 @@ class ContactDb extends db_provider_1.DbProvider {
475
838
  return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
476
839
  });
477
840
  }
841
+ // Use this function when you want to return a single record
842
+ getFingerprints(contactId) {
843
+ return __awaiter(this, void 0, void 0, function* () {
844
+ return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Fingerprint');
845
+ });
846
+ }
847
+ linkFingerprintContacts(contactId, fingerprintIds) {
848
+ return __awaiter(this, void 0, void 0, function* () {
849
+ const associationDtos = [];
850
+ for (const param of fingerprintIds) {
851
+ associationDtos.push({
852
+ entity: 'CrmModule:Fingerprint',
853
+ recordId: param.id,
854
+ linkType: 'Fingerprint__Contact',
855
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
856
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
857
+ });
858
+ }
859
+ return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
860
+ });
861
+ }
862
+ unlinkFingerprintContacts(contactId, linkedFingerprintIds) {
863
+ return __awaiter(this, void 0, void 0, function* () {
864
+ const associationDtos = [];
865
+ for (const pk of linkedFingerprintIds) {
866
+ associationDtos.push({
867
+ primaryKey: contactId,
868
+ linkedRecordPrimaryKey: pk,
869
+ });
870
+ }
871
+ return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
872
+ });
873
+ }
478
874
  }
479
875
  exports.ContactDb = ContactDb;
@@ -24,13 +24,6 @@ export declare class ContactIdentityDb extends DbProvider {
24
24
  relatedAssociationId?: string;
25
25
  }[]): Promise<any>;
26
26
  unlinkContactIdentityPaymentMethods(contactIdentityId: string, linkedPaymentMethodIds: string[]): Promise<any>;
27
- getContactIdentitys(contactIdentityId: string): Promise<any>;
28
- linkContactIdentityContactIdentitys(contactIdentityId: string, contactIdentityIds: {
29
- id: string;
30
- relationType?: RelationTypeEnum;
31
- relatedAssociationId?: string;
32
- }[]): Promise<any>;
33
- unlinkContactIdentityContactIdentitys(contactIdentityId: string, linkedContactIdentityIds: string[]): Promise<any>;
34
27
  getContacts(contactIdentityId: string): Promise<any>;
35
28
  linkContactContactIdentitys(contactIdentityId: string, contactIds: {
36
29
  id: string;
@@ -113,39 +113,6 @@ class ContactIdentityDb extends db_provider_1.DbProvider {
113
113
  });
114
114
  }
115
115
  // Use this function when you want to return a single record
116
- getContactIdentitys(contactIdentityId) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- return yield this._getLinks(this.moduleName, this.entityName, contactIdentityId, 'ContactIdentity');
119
- });
120
- }
121
- linkContactIdentityContactIdentitys(contactIdentityId, contactIdentityIds) {
122
- return __awaiter(this, void 0, void 0, function* () {
123
- const associationDtos = [];
124
- for (const param of contactIdentityIds) {
125
- associationDtos.push({
126
- entity: 'CrmModule:ContactIdentity',
127
- recordId: param.id,
128
- linkType: 'ContactIdentity__ContactIdentity',
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, contactIdentityId, associationDtos);
134
- });
135
- }
136
- unlinkContactIdentityContactIdentitys(contactIdentityId, linkedContactIdentityIds) {
137
- return __awaiter(this, void 0, void 0, function* () {
138
- const associationDtos = [];
139
- for (const pk of linkedContactIdentityIds) {
140
- associationDtos.push({
141
- primaryKey: contactIdentityId,
142
- linkedRecordPrimaryKey: pk,
143
- });
144
- }
145
- return yield this._deleteLinks(this.moduleName, this.entityName, contactIdentityId, associationDtos);
146
- });
147
- }
148
- // Use this function when you want to return a single record
149
116
  getContacts(contactIdentityId) {
150
117
  return __awaiter(this, void 0, void 0, function* () {
151
118
  return yield this._getLinks(this.moduleName, this.entityName, contactIdentityId, 'Contact');