@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
@@ -74,32 +74,59 @@
74
74
  }
75
75
 
76
76
 
77
- // Use this function when you want to return a single record
78
- public async getContacts(contactId: string) {
79
- return await this._getLinks(this.moduleName, this.entityName, contactId, 'Contact');
80
- }
77
+ // Use this function when you want to return a single record
78
+ public async getOrganizations(contactId: string) {
79
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Organization');
80
+ }
81
81
 
82
- public async linkOrganizationContacts(contactId: string, contactIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
82
+ public async linkOrganizationContacts(contactId: string, organizationIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
83
83
 
84
- const associationDtos = [];
85
- for(const param of contactIds){
86
- associationDtos.push({
87
- entity: 'CrmModule:Contact',
88
- recordId: param.id,
89
- linkType: 'Organization__Contact',
90
- relationType: param?.relationType,
91
- relatedAssociationId: param?.relatedAssociationId
92
- });
93
- }
84
+ const associationDtos = [];
85
+ for(const param of organizationIds){
86
+ associationDtos.push({
87
+ entity: 'CrmModule:Organization',
88
+ recordId: param.id,
89
+ linkType: 'Organization__Contact',
90
+ relationType: param?.relationType,
91
+ relatedAssociationId: param?.relatedAssociationId
92
+ });
93
+ }
94
94
 
95
- return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
95
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
96
+ }
97
+
98
+ public async unLinkOrganizationContacts(contactId: string, linkedOrganizationId: string) {
99
+
100
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedOrganizationId);
101
+ }
102
+
103
+
104
+ // Use this function when you want to return a single record
105
+ public async getAccounts(contactId: string) {
106
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Account');
96
107
  }
108
+
109
+ public async linkBillingContacts(contactId: string, accountIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
97
110
 
98
- public async unLinkOrganizationContacts(contactId: string, linkedContactId: string) {
99
-
100
- return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedContactId);
111
+ const associationDtos = [];
112
+ for(const param of accountIds){
113
+ associationDtos.push({
114
+ entity: 'CrmModule:Account',
115
+ recordId: param.id,
116
+ linkType: 'BillingContact',
117
+ relationType: param?.relationType,
118
+ relatedAssociationId: param?.relatedAssociationId
119
+ });
101
120
  }
102
121
 
122
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
123
+ }
124
+
125
+ public async unLinkBillingContacts(contactId: string, linkedAccountId: string) {
126
+
127
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedAccountId);
128
+ }
129
+
103
130
 
104
131
  // Use this function when you want to return a single record
105
132
  public async getActivitys(contactId: string) {
@@ -155,6 +182,87 @@
155
182
  }
156
183
 
157
184
 
185
+ // Use this function when you want to return a single record
186
+ public async getWorkOrders(contactId: string) {
187
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'WorkOrder');
188
+ }
189
+
190
+ public async linkWorkOrderContacts(contactId: string, workOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
191
+
192
+ const associationDtos = [];
193
+ for(const param of workOrderIds){
194
+ associationDtos.push({
195
+ entity: 'FieldServiceModule:WorkOrder',
196
+ recordId: param.id,
197
+ linkType: 'WorkOrder__Contact',
198
+ relationType: param?.relationType,
199
+ relatedAssociationId: param?.relatedAssociationId
200
+ });
201
+ }
202
+
203
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
204
+ }
205
+
206
+ public async unLinkWorkOrderContacts(contactId: string, linkedWorkOrderId: string) {
207
+
208
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedWorkOrderId);
209
+ }
210
+
211
+
212
+ // Use this function when you want to return a single record
213
+ public async getOrders(contactId: string) {
214
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Order');
215
+ }
216
+
217
+ public async linkOrderContacts(contactId: string, orderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
218
+
219
+ const associationDtos = [];
220
+ for(const param of orderIds){
221
+ associationDtos.push({
222
+ entity: 'OrderModule:Order',
223
+ recordId: param.id,
224
+ linkType: 'Order__Contact',
225
+ relationType: param?.relationType,
226
+ relatedAssociationId: param?.relatedAssociationId
227
+ });
228
+ }
229
+
230
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
231
+ }
232
+
233
+ public async unLinkOrderContacts(contactId: string, linkedOrderId: string) {
234
+
235
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedOrderId);
236
+ }
237
+
238
+
239
+ // Use this function when you want to return a single record
240
+ public async getLeads(contactId: string) {
241
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Lead');
242
+ }
243
+
244
+ public async linkLeadContacts(contactId: string, leadIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
245
+
246
+ const associationDtos = [];
247
+ for(const param of leadIds){
248
+ associationDtos.push({
249
+ entity: 'CrmModule:Lead',
250
+ recordId: param.id,
251
+ linkType: 'Lead__Contact',
252
+ relationType: param?.relationType,
253
+ relatedAssociationId: param?.relatedAssociationId
254
+ });
255
+ }
256
+
257
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
258
+ }
259
+
260
+ public async unLinkLeadContacts(contactId: string, linkedLeadId: string) {
261
+
262
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedLeadId);
263
+ }
264
+
265
+
158
266
  // Use this function when you want to return a single record
159
267
  public async getAddresss(contactId: string) {
160
268
  return await this._getLinks(this.moduleName, this.entityName, contactId, 'Address');
@@ -209,6 +317,33 @@
209
317
  }
210
318
 
211
319
 
320
+ // Use this function when you want to return a single record
321
+ public async getInvoices(contactId: string) {
322
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Invoice');
323
+ }
324
+
325
+ public async linkInvoiceContacts(contactId: string, invoiceIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
326
+
327
+ const associationDtos = [];
328
+ for(const param of invoiceIds){
329
+ associationDtos.push({
330
+ entity: 'BillingModule:Invoice',
331
+ recordId: param.id,
332
+ linkType: 'Invoice__Contact',
333
+ relationType: param?.relationType,
334
+ relatedAssociationId: param?.relatedAssociationId
335
+ });
336
+ }
337
+
338
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
339
+ }
340
+
341
+ public async unLinkInvoiceContacts(contactId: string, linkedInvoiceId: string) {
342
+
343
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedInvoiceId);
344
+ }
345
+
346
+
212
347
  // Use this function when you want to return a single record
213
348
  public async getBillingRequests(contactId: string) {
214
349
  return await this._getLinks(this.moduleName, this.entityName, contactId, 'BillingRequest');
@@ -263,6 +398,60 @@
263
398
  }
264
399
 
265
400
 
401
+ // Use this function when you want to return a single record
402
+ public async getCommissions(contactId: string) {
403
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Commission');
404
+ }
405
+
406
+ public async linkCommissionContacts(contactId: string, commissionIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
407
+
408
+ const associationDtos = [];
409
+ for(const param of commissionIds){
410
+ associationDtos.push({
411
+ entity: 'BillingModule:Commission',
412
+ recordId: param.id,
413
+ linkType: 'Commission__Contact',
414
+ relationType: param?.relationType,
415
+ relatedAssociationId: param?.relatedAssociationId
416
+ });
417
+ }
418
+
419
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
420
+ }
421
+
422
+ public async unLinkCommissionContacts(contactId: string, linkedCommissionId: string) {
423
+
424
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedCommissionId);
425
+ }
426
+
427
+
428
+ // Use this function when you want to return a single record
429
+ public async getOneTouchSwitchs(contactId: string) {
430
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'OneTouchSwitch');
431
+ }
432
+
433
+ public async linkOneTouchSwitchContacts(contactId: string, oneTouchSwitchIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
434
+
435
+ const associationDtos = [];
436
+ for(const param of oneTouchSwitchIds){
437
+ associationDtos.push({
438
+ entity: 'OrderModule:OneTouchSwitch',
439
+ recordId: param.id,
440
+ linkType: 'OneTouchSwitch__Contact',
441
+ relationType: param?.relationType,
442
+ relatedAssociationId: param?.relatedAssociationId
443
+ });
444
+ }
445
+
446
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
447
+ }
448
+
449
+ public async unLinkOneTouchSwitchContacts(contactId: string, linkedOneTouchSwitchId: string) {
450
+
451
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedOneTouchSwitchId);
452
+ }
453
+
454
+
266
455
  // Use this function when you want to return a single record
267
456
  public async getContactIdentitys(contactId: string) {
268
457
  return await this._getLinks(this.moduleName, this.entityName, contactId, 'ContactIdentity');
@@ -317,6 +506,33 @@
317
506
  }
318
507
 
319
508
 
509
+ // Use this function when you want to return a single record
510
+ public async getDeactivationApprovals(contactId: string) {
511
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'DeactivationApproval');
512
+ }
513
+
514
+ public async linkDeactivationApprovalContacts(contactId: string, deactivationApprovalIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
515
+
516
+ const associationDtos = [];
517
+ for(const param of deactivationApprovalIds){
518
+ associationDtos.push({
519
+ entity: 'OrderModule:DeactivationApproval',
520
+ recordId: param.id,
521
+ linkType: 'DeactivationApproval__Contact',
522
+ relationType: param?.relationType,
523
+ relatedAssociationId: param?.relatedAssociationId
524
+ });
525
+ }
526
+
527
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
528
+ }
529
+
530
+ public async unLinkDeactivationApprovalContacts(contactId: string, linkedDeactivationApprovalId: string) {
531
+
532
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedDeactivationApprovalId);
533
+ }
534
+
535
+
320
536
  // Use this function when you want to return a single record
321
537
  public async getPhoneNumbers(contactId: string) {
322
538
  return await this._getLinks(this.moduleName, this.entityName, contactId, 'PhoneNumber');
@@ -344,6 +560,60 @@
344
560
  }
345
561
 
346
562
 
563
+ // Use this function when you want to return a single record
564
+ public async getOrderRemediationTasks(contactId: string) {
565
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'OrderRemediationTask');
566
+ }
567
+
568
+ public async linkOrderRemediationTaskContacts(contactId: string, orderRemediationTaskIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
569
+
570
+ const associationDtos = [];
571
+ for(const param of orderRemediationTaskIds){
572
+ associationDtos.push({
573
+ entity: 'OrderModule:OrderRemediationTask',
574
+ recordId: param.id,
575
+ linkType: 'OrderRemediationTask__Contact',
576
+ relationType: param?.relationType,
577
+ relatedAssociationId: param?.relatedAssociationId
578
+ });
579
+ }
580
+
581
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
582
+ }
583
+
584
+ public async unLinkOrderRemediationTaskContacts(contactId: string, linkedOrderRemediationTaskId: string) {
585
+
586
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedOrderRemediationTaskId);
587
+ }
588
+
589
+
590
+ // Use this function when you want to return a single record
591
+ public async getCases(contactId: string) {
592
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Case');
593
+ }
594
+
595
+ public async linkCaseContacts(contactId: string, caseIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
596
+
597
+ const associationDtos = [];
598
+ for(const param of caseIds){
599
+ associationDtos.push({
600
+ entity: 'SupportModule:Case',
601
+ recordId: param.id,
602
+ linkType: 'Case__Contact',
603
+ relationType: param?.relationType,
604
+ relatedAssociationId: param?.relatedAssociationId
605
+ });
606
+ }
607
+
608
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
609
+ }
610
+
611
+ public async unLinkCaseContacts(contactId: string, linkedCaseId: string) {
612
+
613
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedCaseId);
614
+ }
615
+
616
+
347
617
  // Use this function when you want to return a single record
348
618
  public async getAppointments(contactId: string) {
349
619
  return await this._getLinks(this.moduleName, this.entityName, contactId, 'Appointment');
@@ -371,6 +641,33 @@
371
641
  }
372
642
 
373
643
 
644
+ // Use this function when you want to return a single record
645
+ public async getCalls(contactId: string) {
646
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Call');
647
+ }
648
+
649
+ public async linkCallContacts(contactId: string, callIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
650
+
651
+ const associationDtos = [];
652
+ for(const param of callIds){
653
+ associationDtos.push({
654
+ entity: 'NotificationModule:Call',
655
+ recordId: param.id,
656
+ linkType: 'Call__Contact',
657
+ relationType: param?.relationType,
658
+ relatedAssociationId: param?.relatedAssociationId
659
+ });
660
+ }
661
+
662
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
663
+ }
664
+
665
+ public async unLinkCallContacts(contactId: string, linkedCallId: string) {
666
+
667
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedCallId);
668
+ }
669
+
670
+
374
671
  // Use this function when you want to return a single record
375
672
  public async getPaymentMethods(contactId: string) {
376
673
  return await this._getLinks(this.moduleName, this.entityName, contactId, 'PaymentMethod');
@@ -398,4 +695,31 @@
398
695
  }
399
696
 
400
697
 
698
+ // Use this function when you want to return a single record
699
+ public async getFingerprints(contactId: string) {
700
+ return await this._getLinks(this.moduleName, this.entityName, contactId, 'Fingerprint');
701
+ }
702
+
703
+ public async linkFingerprintContacts(contactId: string, fingerprintIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
704
+
705
+ const associationDtos = [];
706
+ for(const param of fingerprintIds){
707
+ associationDtos.push({
708
+ entity: 'CrmModule:Fingerprint',
709
+ recordId: param.id,
710
+ linkType: 'Fingerprint__Contact',
711
+ relationType: param?.relationType,
712
+ relatedAssociationId: param?.relatedAssociationId
713
+ });
714
+ }
715
+
716
+ return await this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
717
+ }
718
+
719
+ public async unLinkFingerprintContacts(contactId: string, linkedFingerprintId: string) {
720
+
721
+ return await this._deleteLinks(this.moduleName, this.entityName, contactId, linkedFingerprintId);
722
+ }
723
+
724
+
401
725
  }
@@ -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 getContactIdentitys(contactIdentityId: string) {
106
- return await this._getLinks(this.moduleName, this.entityName, contactIdentityId, 'ContactIdentity');
107
- }
108
-
109
- public async linkContactIdentityContactIdentitys(contactIdentityId: string, contactIdentityIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
110
-
111
- const associationDtos = [];
112
- for(const param of contactIdentityIds){
113
- associationDtos.push({
114
- entity: 'CrmModule:ContactIdentity',
115
- recordId: param.id,
116
- linkType: 'ContactIdentity__ContactIdentity',
117
- relationType: param?.relationType,
118
- relatedAssociationId: param?.relatedAssociationId
119
- });
120
- }
121
-
122
- return await this._createLinks(this.moduleName, this.entityName, contactIdentityId, associationDtos);
123
- }
124
-
125
- public async unLinkContactIdentityContactIdentitys(contactIdentityId: string, linkedContactIdentityId: string) {
126
-
127
- return await this._deleteLinks(this.moduleName, this.entityName, contactIdentityId, linkedContactIdentityId);
128
- }
129
-
130
-
131
104
  // Use this function when you want to return a single record
132
105
  public async getContacts(contactIdentityId: string) {
133
106
  return await this._getLinks(this.moduleName, this.entityName, contactIdentityId, 'Contact');