@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
@@ -91,17 +91,17 @@ class FileApi extends api_provider_1.ApiProvider {
91
91
  });
92
92
  }
93
93
  // Use this function when you want to return a single record
94
- getFiles(fileId) {
94
+ getAppointments(fileId) {
95
95
  return __awaiter(this, void 0, void 0, function* () {
96
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'File');
96
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Appointment');
97
97
  });
98
98
  }
99
- linkAppointmentFiles(fileId, fileIds) {
99
+ linkAppointmentFiles(fileId, appointmentIds) {
100
100
  return __awaiter(this, void 0, void 0, function* () {
101
101
  const associationDtos = [];
102
- for (const param of fileIds) {
102
+ for (const param of appointmentIds) {
103
103
  associationDtos.push({
104
- entity: 'SchemaModule:File',
104
+ entity: 'CrmModule:Appointment',
105
105
  recordId: param.id,
106
106
  linkType: 'Appointment__File',
107
107
  relationType: param === null || param === void 0 ? void 0 : param.relationType,
@@ -111,9 +111,35 @@ class FileApi extends api_provider_1.ApiProvider {
111
111
  return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
112
112
  });
113
113
  }
114
- unLinkAppointmentFiles(fileId, linkedFileId) {
114
+ unLinkAppointmentFiles(fileId, linkedAppointmentId) {
115
115
  return __awaiter(this, void 0, void 0, function* () {
116
- return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedFileId);
116
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedAppointmentId);
117
+ });
118
+ }
119
+ // Use this function when you want to return a single record
120
+ getUgExternalAudits(fileId) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgExternalAudit');
123
+ });
124
+ }
125
+ linkUgExternalAuditFiles(fileId, ugExternalAuditIds) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ const associationDtos = [];
128
+ for (const param of ugExternalAuditIds) {
129
+ associationDtos.push({
130
+ entity: 'FieldServiceModule:UgExternalAudit',
131
+ recordId: param.id,
132
+ linkType: 'UgExternalAudit_File',
133
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
134
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
135
+ });
136
+ }
137
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
138
+ });
139
+ }
140
+ unLinkUgExternalAuditFiles(fileId, linkedUgExternalAuditId) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedUgExternalAuditId);
117
143
  });
118
144
  }
119
145
  // Use this function when you want to return a single record
@@ -142,5 +168,1221 @@ class FileApi extends api_provider_1.ApiProvider {
142
168
  return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedNoteId);
143
169
  });
144
170
  }
171
+ // Use this function when you want to return a single record
172
+ getWorkOrders(fileId) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'WorkOrder');
175
+ });
176
+ }
177
+ linkWorkOrderFiles(fileId, workOrderIds) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ const associationDtos = [];
180
+ for (const param of workOrderIds) {
181
+ associationDtos.push({
182
+ entity: 'FieldServiceModule:WorkOrder',
183
+ recordId: param.id,
184
+ linkType: 'WorkOrder__File',
185
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
186
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
187
+ });
188
+ }
189
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
190
+ });
191
+ }
192
+ unLinkWorkOrderFiles(fileId, linkedWorkOrderId) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedWorkOrderId);
195
+ });
196
+ }
197
+ // Use this function when you want to return a single record
198
+ getInternalInstallAudits(fileId) {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'InternalInstallAudit');
201
+ });
202
+ }
203
+ linkInternalInstallAuditFiles(fileId, internalInstallAuditIds) {
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ const associationDtos = [];
206
+ for (const param of internalInstallAuditIds) {
207
+ associationDtos.push({
208
+ entity: 'FieldServiceModule:InternalInstallAudit',
209
+ recordId: param.id,
210
+ linkType: 'InternalInstallAudit_File',
211
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
212
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
213
+ });
214
+ }
215
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
216
+ });
217
+ }
218
+ unLinkInternalInstallAuditFiles(fileId, linkedInternalInstallAuditId) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedInternalInstallAuditId);
221
+ });
222
+ }
223
+ // Use this function when you want to return a single record
224
+ getKnowledgeArticles(fileId) {
225
+ return __awaiter(this, void 0, void 0, function* () {
226
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'KnowledgeArticle');
227
+ });
228
+ }
229
+ linkKnowledgeArticleFiles(fileId, knowledgeArticleIds) {
230
+ return __awaiter(this, void 0, void 0, function* () {
231
+ const associationDtos = [];
232
+ for (const param of knowledgeArticleIds) {
233
+ associationDtos.push({
234
+ entity: 'SupportModule:KnowledgeArticle',
235
+ recordId: param.id,
236
+ linkType: 'KnowledgeArticle__File',
237
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
238
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
239
+ });
240
+ }
241
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
242
+ });
243
+ }
244
+ unLinkKnowledgeArticleFiles(fileId, linkedKnowledgeArticleId) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedKnowledgeArticleId);
247
+ });
248
+ }
249
+ // Use this function when you want to return a single record
250
+ getCases(fileId) {
251
+ return __awaiter(this, void 0, void 0, function* () {
252
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Case');
253
+ });
254
+ }
255
+ linkCaseFiles(fileId, caseIds) {
256
+ return __awaiter(this, void 0, void 0, function* () {
257
+ const associationDtos = [];
258
+ for (const param of caseIds) {
259
+ associationDtos.push({
260
+ entity: 'SupportModule:Case',
261
+ recordId: param.id,
262
+ linkType: 'Case__File',
263
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
264
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
265
+ });
266
+ }
267
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
268
+ });
269
+ }
270
+ unLinkCaseFiles(fileId, linkedCaseId) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedCaseId);
273
+ });
274
+ }
275
+ // Use this function when you want to return a single record
276
+ getLeads(fileId) {
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Lead');
279
+ });
280
+ }
281
+ linkLeadFiles(fileId, leadIds) {
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ const associationDtos = [];
284
+ for (const param of leadIds) {
285
+ associationDtos.push({
286
+ entity: 'CrmModule:Lead',
287
+ recordId: param.id,
288
+ linkType: 'Lead__File',
289
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
290
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
291
+ });
292
+ }
293
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
294
+ });
295
+ }
296
+ unLinkLeadFiles(fileId, linkedLeadId) {
297
+ return __awaiter(this, void 0, void 0, function* () {
298
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedLeadId);
299
+ });
300
+ }
301
+ // Use this function when you want to return a single record
302
+ getContacts(fileId) {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Contact');
305
+ });
306
+ }
307
+ linkContactFiles(fileId, contactIds) {
308
+ return __awaiter(this, void 0, void 0, function* () {
309
+ const associationDtos = [];
310
+ for (const param of contactIds) {
311
+ associationDtos.push({
312
+ entity: 'CrmModule:Contact',
313
+ recordId: param.id,
314
+ linkType: 'Contact__File',
315
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
316
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
317
+ });
318
+ }
319
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
320
+ });
321
+ }
322
+ unLinkContactFiles(fileId, linkedContactId) {
323
+ return __awaiter(this, void 0, void 0, function* () {
324
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedContactId);
325
+ });
326
+ }
327
+ // Use this function when you want to return a single record
328
+ getOrders(fileId) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Order');
331
+ });
332
+ }
333
+ linkOrderFiles(fileId, orderIds) {
334
+ return __awaiter(this, void 0, void 0, function* () {
335
+ const associationDtos = [];
336
+ for (const param of orderIds) {
337
+ associationDtos.push({
338
+ entity: 'OrderModule:Order',
339
+ recordId: param.id,
340
+ linkType: 'Order__File',
341
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
342
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
343
+ });
344
+ }
345
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
346
+ });
347
+ }
348
+ unLinkOrderFiles(fileId, linkedOrderId) {
349
+ return __awaiter(this, void 0, void 0, function* () {
350
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOrderId);
351
+ });
352
+ }
353
+ // Use this function when you want to return a single record
354
+ getBillingRequests(fileId) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BillingRequest');
357
+ });
358
+ }
359
+ linkBillingRequestFiles(fileId, billingRequestIds) {
360
+ return __awaiter(this, void 0, void 0, function* () {
361
+ const associationDtos = [];
362
+ for (const param of billingRequestIds) {
363
+ associationDtos.push({
364
+ entity: 'BillingModule:BillingRequest',
365
+ recordId: param.id,
366
+ linkType: 'BillingRequest__File',
367
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
368
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
369
+ });
370
+ }
371
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
372
+ });
373
+ }
374
+ unLinkBillingRequestFiles(fileId, linkedBillingRequestId) {
375
+ return __awaiter(this, void 0, void 0, function* () {
376
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedBillingRequestId);
377
+ });
378
+ }
379
+ // Use this function when you want to return a single record
380
+ getTransactions(fileId) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Transaction');
383
+ });
384
+ }
385
+ linkTransactionFiles(fileId, transactionIds) {
386
+ return __awaiter(this, void 0, void 0, function* () {
387
+ const associationDtos = [];
388
+ for (const param of transactionIds) {
389
+ associationDtos.push({
390
+ entity: 'BillingModule:Transaction',
391
+ recordId: param.id,
392
+ linkType: 'Transaction__File',
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, fileId, associationDtos);
398
+ });
399
+ }
400
+ unLinkTransactionFiles(fileId, linkedTransactionId) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedTransactionId);
403
+ });
404
+ }
405
+ // Use this function when you want to return a single record
406
+ getPaymentMethods(fileId) {
407
+ return __awaiter(this, void 0, void 0, function* () {
408
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'PaymentMethod');
409
+ });
410
+ }
411
+ linkPaymentMethodFiles(fileId, paymentMethodIds) {
412
+ return __awaiter(this, void 0, void 0, function* () {
413
+ const associationDtos = [];
414
+ for (const param of paymentMethodIds) {
415
+ associationDtos.push({
416
+ entity: 'BillingModule:PaymentMethod',
417
+ recordId: param.id,
418
+ linkType: 'PaymentMethod__File',
419
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
420
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
421
+ });
422
+ }
423
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
424
+ });
425
+ }
426
+ unLinkPaymentMethodFiles(fileId, linkedPaymentMethodId) {
427
+ return __awaiter(this, void 0, void 0, function* () {
428
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedPaymentMethodId);
429
+ });
430
+ }
431
+ // Use this function when you want to return a single record
432
+ getCustomerDeviceOnts(fileId) {
433
+ return __awaiter(this, void 0, void 0, function* () {
434
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'CustomerDeviceOnt');
435
+ });
436
+ }
437
+ linkCustomerDeviceOntFiles(fileId, customerDeviceOntIds) {
438
+ return __awaiter(this, void 0, void 0, function* () {
439
+ const associationDtos = [];
440
+ for (const param of customerDeviceOntIds) {
441
+ associationDtos.push({
442
+ entity: 'ServiceModule:CustomerDeviceOnt',
443
+ recordId: param.id,
444
+ linkType: 'CustomerDeviceOnt__File',
445
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
446
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
447
+ });
448
+ }
449
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
450
+ });
451
+ }
452
+ unLinkCustomerDeviceOntFiles(fileId, linkedCustomerDeviceOntId) {
453
+ return __awaiter(this, void 0, void 0, function* () {
454
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedCustomerDeviceOntId);
455
+ });
456
+ }
457
+ // Use this function when you want to return a single record
458
+ getCreditNotes(fileId) {
459
+ return __awaiter(this, void 0, void 0, function* () {
460
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'CreditNote');
461
+ });
462
+ }
463
+ linkCreditNoteFiles(fileId, creditNoteIds) {
464
+ return __awaiter(this, void 0, void 0, function* () {
465
+ const associationDtos = [];
466
+ for (const param of creditNoteIds) {
467
+ associationDtos.push({
468
+ entity: 'BillingModule:CreditNote',
469
+ recordId: param.id,
470
+ linkType: 'CreditNote__File',
471
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
472
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
473
+ });
474
+ }
475
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
476
+ });
477
+ }
478
+ unLinkCreditNoteFiles(fileId, linkedCreditNoteId) {
479
+ return __awaiter(this, void 0, void 0, function* () {
480
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedCreditNoteId);
481
+ });
482
+ }
483
+ // Use this function when you want to return a single record
484
+ getAddresss(fileId) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Address');
487
+ });
488
+ }
489
+ linkAddressFiles(fileId, addressIds) {
490
+ return __awaiter(this, void 0, void 0, function* () {
491
+ const associationDtos = [];
492
+ for (const param of addressIds) {
493
+ associationDtos.push({
494
+ entity: 'CrmModule:Address',
495
+ recordId: param.id,
496
+ linkType: 'Address__File',
497
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
498
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
499
+ });
500
+ }
501
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
502
+ });
503
+ }
504
+ unLinkAddressFiles(fileId, linkedAddressId) {
505
+ return __awaiter(this, void 0, void 0, function* () {
506
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedAddressId);
507
+ });
508
+ }
509
+ // Use this function when you want to return a single record
510
+ getChangeReasons(fileId) {
511
+ return __awaiter(this, void 0, void 0, function* () {
512
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'ChangeReason');
513
+ });
514
+ }
515
+ linkChangeReasonFiles(fileId, changeReasonIds) {
516
+ return __awaiter(this, void 0, void 0, function* () {
517
+ const associationDtos = [];
518
+ for (const param of changeReasonIds) {
519
+ associationDtos.push({
520
+ entity: 'FieldServiceModule:ChangeReason',
521
+ recordId: param.id,
522
+ linkType: 'ChangeReason__File',
523
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
524
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
525
+ });
526
+ }
527
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
528
+ });
529
+ }
530
+ unLinkChangeReasonFiles(fileId, linkedChangeReasonId) {
531
+ return __awaiter(this, void 0, void 0, function* () {
532
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedChangeReasonId);
533
+ });
534
+ }
535
+ // Use this function when you want to return a single record
536
+ getDiscounts(fileId) {
537
+ return __awaiter(this, void 0, void 0, function* () {
538
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Discount');
539
+ });
540
+ }
541
+ linkDiscountFiles(fileId, discountIds) {
542
+ return __awaiter(this, void 0, void 0, function* () {
543
+ const associationDtos = [];
544
+ for (const param of discountIds) {
545
+ associationDtos.push({
546
+ entity: 'ProductModule:Discount',
547
+ recordId: param.id,
548
+ linkType: 'Discount__File',
549
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
550
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
551
+ });
552
+ }
553
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
554
+ });
555
+ }
556
+ unLinkDiscountFiles(fileId, linkedDiscountId) {
557
+ return __awaiter(this, void 0, void 0, function* () {
558
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedDiscountId);
559
+ });
560
+ }
561
+ // Use this function when you want to return a single record
562
+ getPaymentMethodRefunds(fileId) {
563
+ return __awaiter(this, void 0, void 0, function* () {
564
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'PaymentMethodRefund');
565
+ });
566
+ }
567
+ linkPaymentMethodRefundFiles(fileId, paymentMethodRefundIds) {
568
+ return __awaiter(this, void 0, void 0, function* () {
569
+ const associationDtos = [];
570
+ for (const param of paymentMethodRefundIds) {
571
+ associationDtos.push({
572
+ entity: 'BillingModule:PaymentMethodRefund',
573
+ recordId: param.id,
574
+ linkType: 'PaymentMethodRefund__File',
575
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
576
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
577
+ });
578
+ }
579
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
580
+ });
581
+ }
582
+ unLinkPaymentMethodRefundFiles(fileId, linkedPaymentMethodRefundId) {
583
+ return __awaiter(this, void 0, void 0, function* () {
584
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedPaymentMethodRefundId);
585
+ });
586
+ }
587
+ // Use this function when you want to return a single record
588
+ getServiceAppointments(fileId) {
589
+ return __awaiter(this, void 0, void 0, function* () {
590
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'ServiceAppointment');
591
+ });
592
+ }
593
+ linkServiceAppointmentFiles(fileId, serviceAppointmentIds) {
594
+ return __awaiter(this, void 0, void 0, function* () {
595
+ const associationDtos = [];
596
+ for (const param of serviceAppointmentIds) {
597
+ associationDtos.push({
598
+ entity: 'FieldServiceModule:ServiceAppointment',
599
+ recordId: param.id,
600
+ linkType: 'ServiceAppointment__File',
601
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
602
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
603
+ });
604
+ }
605
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
606
+ });
607
+ }
608
+ unLinkServiceAppointmentFiles(fileId, linkedServiceAppointmentId) {
609
+ return __awaiter(this, void 0, void 0, function* () {
610
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedServiceAppointmentId);
611
+ });
612
+ }
613
+ // Use this function when you want to return a single record
614
+ getBillingAdjustments(fileId) {
615
+ return __awaiter(this, void 0, void 0, function* () {
616
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BillingAdjustment');
617
+ });
618
+ }
619
+ linkBillingAdjustmentFiles(fileId, billingAdjustmentIds) {
620
+ return __awaiter(this, void 0, void 0, function* () {
621
+ const associationDtos = [];
622
+ for (const param of billingAdjustmentIds) {
623
+ associationDtos.push({
624
+ entity: 'OrderModule:BillingAdjustment',
625
+ recordId: param.id,
626
+ linkType: 'BillingAdjustment__File',
627
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
628
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
629
+ });
630
+ }
631
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
632
+ });
633
+ }
634
+ unLinkBillingAdjustmentFiles(fileId, linkedBillingAdjustmentId) {
635
+ return __awaiter(this, void 0, void 0, function* () {
636
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedBillingAdjustmentId);
637
+ });
638
+ }
639
+ // Use this function when you want to return a single record
640
+ getActivitys(fileId) {
641
+ return __awaiter(this, void 0, void 0, function* () {
642
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Activity');
643
+ });
644
+ }
645
+ linkActivityFiles(fileId, activityIds) {
646
+ return __awaiter(this, void 0, void 0, function* () {
647
+ const associationDtos = [];
648
+ for (const param of activityIds) {
649
+ associationDtos.push({
650
+ entity: 'SchemaModule:Activity',
651
+ recordId: param.id,
652
+ linkType: 'Activity__File',
653
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
654
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
655
+ });
656
+ }
657
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
658
+ });
659
+ }
660
+ unLinkActivityFiles(fileId, linkedActivityId) {
661
+ return __awaiter(this, void 0, void 0, function* () {
662
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedActivityId);
663
+ });
664
+ }
665
+ // Use this function when you want to return a single record
666
+ getNetomniaInstallVerifications(fileId) {
667
+ return __awaiter(this, void 0, void 0, function* () {
668
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaInstallVerification');
669
+ });
670
+ }
671
+ linkNetomniaInstallVerificationFiles(fileId, netomniaInstallVerificationIds) {
672
+ return __awaiter(this, void 0, void 0, function* () {
673
+ const associationDtos = [];
674
+ for (const param of netomniaInstallVerificationIds) {
675
+ associationDtos.push({
676
+ entity: 'FieldServiceModule:NetomniaInstallVerification',
677
+ recordId: param.id,
678
+ linkType: 'NetomniaInstallVerification__File',
679
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
680
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
681
+ });
682
+ }
683
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
684
+ });
685
+ }
686
+ unLinkNetomniaInstallVerificationFiles(fileId, linkedNetomniaInstallVerificationId) {
687
+ return __awaiter(this, void 0, void 0, function* () {
688
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedNetomniaInstallVerificationId);
689
+ });
690
+ }
691
+ // Use this function when you want to return a single record
692
+ getNetomniaFtthServiceVisitSheets(fileId) {
693
+ return __awaiter(this, void 0, void 0, function* () {
694
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtthServiceVisitSheet');
695
+ });
696
+ }
697
+ linkNetomniaFtthServiceVisitSheetFiles(fileId, netomniaFtthServiceVisitSheetIds) {
698
+ return __awaiter(this, void 0, void 0, function* () {
699
+ const associationDtos = [];
700
+ for (const param of netomniaFtthServiceVisitSheetIds) {
701
+ associationDtos.push({
702
+ entity: 'FieldServiceModule:NetomniaFtthServiceVisitSheet',
703
+ recordId: param.id,
704
+ linkType: 'NetomniaFtthServiceVisitSheet__File',
705
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
706
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
707
+ });
708
+ }
709
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
710
+ });
711
+ }
712
+ unLinkNetomniaFtthServiceVisitSheetFiles(fileId, linkedNetomniaFtthServiceVisitSheetId) {
713
+ return __awaiter(this, void 0, void 0, function* () {
714
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedNetomniaFtthServiceVisitSheetId);
715
+ });
716
+ }
717
+ // Use this function when you want to return a single record
718
+ getNetomniaFtth1StageInstallAudits(fileId) {
719
+ return __awaiter(this, void 0, void 0, function* () {
720
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtth1StageInstallAudit');
721
+ });
722
+ }
723
+ linkNetomniaFtth1StageInstallAuditFiles(fileId, netomniaFtth1StageInstallAuditIds) {
724
+ return __awaiter(this, void 0, void 0, function* () {
725
+ const associationDtos = [];
726
+ for (const param of netomniaFtth1StageInstallAuditIds) {
727
+ associationDtos.push({
728
+ entity: 'FieldServiceModule:NetomniaFtth1StageInstallAudit',
729
+ recordId: param.id,
730
+ linkType: 'NetomniaFtth1StageInstallAudit__File',
731
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
732
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
733
+ });
734
+ }
735
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
736
+ });
737
+ }
738
+ unLinkNetomniaFtth1StageInstallAuditFiles(fileId, linkedNetomniaFtth1StageInstallAuditId) {
739
+ return __awaiter(this, void 0, void 0, function* () {
740
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedNetomniaFtth1StageInstallAuditId);
741
+ });
742
+ }
743
+ // Use this function when you want to return a single record
744
+ getCustomerDeviceRouters(fileId) {
745
+ return __awaiter(this, void 0, void 0, function* () {
746
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'CustomerDeviceRouter');
747
+ });
748
+ }
749
+ linkCustomerDeviceRouterFiles(fileId, customerDeviceRouterIds) {
750
+ return __awaiter(this, void 0, void 0, function* () {
751
+ const associationDtos = [];
752
+ for (const param of customerDeviceRouterIds) {
753
+ associationDtos.push({
754
+ entity: 'ServiceModule:CustomerDeviceRouter',
755
+ recordId: param.id,
756
+ linkType: 'CustomerDeviceRouter__File',
757
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
758
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
759
+ });
760
+ }
761
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
762
+ });
763
+ }
764
+ unLinkCustomerDeviceRouterFiles(fileId, linkedCustomerDeviceRouterId) {
765
+ return __awaiter(this, void 0, void 0, function* () {
766
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedCustomerDeviceRouterId);
767
+ });
768
+ }
769
+ // Use this function when you want to return a single record
770
+ getVisits(fileId) {
771
+ return __awaiter(this, void 0, void 0, function* () {
772
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Visit');
773
+ });
774
+ }
775
+ linkVisitFiles(fileId, visitIds) {
776
+ return __awaiter(this, void 0, void 0, function* () {
777
+ const associationDtos = [];
778
+ for (const param of visitIds) {
779
+ associationDtos.push({
780
+ entity: 'CrmModule:Visit',
781
+ recordId: param.id,
782
+ linkType: 'Visit__File',
783
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
784
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
785
+ });
786
+ }
787
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
788
+ });
789
+ }
790
+ unLinkVisitFiles(fileId, linkedVisitId) {
791
+ return __awaiter(this, void 0, void 0, function* () {
792
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedVisitId);
793
+ });
794
+ }
795
+ // Use this function when you want to return a single record
796
+ getNetomniaFtth2StageInstallAudits(fileId) {
797
+ return __awaiter(this, void 0, void 0, function* () {
798
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtth2StageInstallAudit');
799
+ });
800
+ }
801
+ linkNetomniaFtth2StageInstallAuditFiles(fileId, netomniaFtth2StageInstallAuditIds) {
802
+ return __awaiter(this, void 0, void 0, function* () {
803
+ const associationDtos = [];
804
+ for (const param of netomniaFtth2StageInstallAuditIds) {
805
+ associationDtos.push({
806
+ entity: 'FieldServiceModule:NetomniaFtth2StageInstallAudit',
807
+ recordId: param.id,
808
+ linkType: 'NetomniaFtth2StageInstallAudit__File',
809
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
810
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
811
+ });
812
+ }
813
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
814
+ });
815
+ }
816
+ unLinkNetomniaFtth2StageInstallAuditFiles(fileId, linkedNetomniaFtth2StageInstallAuditId) {
817
+ return __awaiter(this, void 0, void 0, function* () {
818
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedNetomniaFtth2StageInstallAuditId);
819
+ });
820
+ }
821
+ // Use this function when you want to return a single record
822
+ getYfStockCounts(fileId) {
823
+ return __awaiter(this, void 0, void 0, function* () {
824
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfStockCount');
825
+ });
826
+ }
827
+ linkYfStockCountFiles(fileId, yfStockCountIds) {
828
+ return __awaiter(this, void 0, void 0, function* () {
829
+ const associationDtos = [];
830
+ for (const param of yfStockCountIds) {
831
+ associationDtos.push({
832
+ entity: 'FieldServiceModule:YfStockCount',
833
+ recordId: param.id,
834
+ linkType: 'YfStockCount__File',
835
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
836
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
837
+ });
838
+ }
839
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
840
+ });
841
+ }
842
+ unLinkYfStockCountFiles(fileId, linkedYfStockCountId) {
843
+ return __awaiter(this, void 0, void 0, function* () {
844
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedYfStockCountId);
845
+ });
846
+ }
847
+ // Use this function when you want to return a single record
848
+ getYfEquipmentCollections(fileId) {
849
+ return __awaiter(this, void 0, void 0, function* () {
850
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfEquipmentCollection');
851
+ });
852
+ }
853
+ linkYfEquipmentCollectionFiles(fileId, yfEquipmentCollectionIds) {
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ const associationDtos = [];
856
+ for (const param of yfEquipmentCollectionIds) {
857
+ associationDtos.push({
858
+ entity: 'FieldServiceModule:YfEquipmentCollection',
859
+ recordId: param.id,
860
+ linkType: 'YfEquipmentCollection__File',
861
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
862
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
863
+ });
864
+ }
865
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
866
+ });
867
+ }
868
+ unLinkYfEquipmentCollectionFiles(fileId, linkedYfEquipmentCollectionId) {
869
+ return __awaiter(this, void 0, void 0, function* () {
870
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedYfEquipmentCollectionId);
871
+ });
872
+ }
873
+ // Use this function when you want to return a single record
874
+ getYfFieldServiceVisits(fileId) {
875
+ return __awaiter(this, void 0, void 0, function* () {
876
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfFieldServiceVisit');
877
+ });
878
+ }
879
+ linkYfFieldServiceVisitFiles(fileId, yfFieldServiceVisitIds) {
880
+ return __awaiter(this, void 0, void 0, function* () {
881
+ const associationDtos = [];
882
+ for (const param of yfFieldServiceVisitIds) {
883
+ associationDtos.push({
884
+ entity: 'FieldServiceModule:YfFieldServiceVisit',
885
+ recordId: param.id,
886
+ linkType: 'YfFieldServiceVisit__File',
887
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
888
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
889
+ });
890
+ }
891
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
892
+ });
893
+ }
894
+ unLinkYfFieldServiceVisitFiles(fileId, linkedYfFieldServiceVisitId) {
895
+ return __awaiter(this, void 0, void 0, function* () {
896
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedYfFieldServiceVisitId);
897
+ });
898
+ }
899
+ // Use this function when you want to return a single record
900
+ getRemediationRequiredReasons(fileId) {
901
+ return __awaiter(this, void 0, void 0, function* () {
902
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'RemediationRequiredReason');
903
+ });
904
+ }
905
+ linkRemediationRequiredReasonFiles(fileId, remediationRequiredReasonIds) {
906
+ return __awaiter(this, void 0, void 0, function* () {
907
+ const associationDtos = [];
908
+ for (const param of remediationRequiredReasonIds) {
909
+ associationDtos.push({
910
+ entity: 'FieldServiceModule:RemediationRequiredReason',
911
+ recordId: param.id,
912
+ linkType: 'RemediationRequiredReason__File',
913
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
914
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
915
+ });
916
+ }
917
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
918
+ });
919
+ }
920
+ unLinkRemediationRequiredReasonFiles(fileId, linkedRemediationRequiredReasonId) {
921
+ return __awaiter(this, void 0, void 0, function* () {
922
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedRemediationRequiredReasonId);
923
+ });
924
+ }
925
+ // Use this function when you want to return a single record
926
+ getInvoices(fileId) {
927
+ return __awaiter(this, void 0, void 0, function* () {
928
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Invoice');
929
+ });
930
+ }
931
+ linkInvoiceFiles(fileId, invoiceIds) {
932
+ return __awaiter(this, void 0, void 0, function* () {
933
+ const associationDtos = [];
934
+ for (const param of invoiceIds) {
935
+ associationDtos.push({
936
+ entity: 'BillingModule:Invoice',
937
+ recordId: param.id,
938
+ linkType: 'Invoice__File',
939
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
940
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
941
+ });
942
+ }
943
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
944
+ });
945
+ }
946
+ unLinkInvoiceFiles(fileId, linkedInvoiceId) {
947
+ return __awaiter(this, void 0, void 0, function* () {
948
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedInvoiceId);
949
+ });
950
+ }
951
+ // Use this function when you want to return a single record
952
+ getFingerprints(fileId) {
953
+ return __awaiter(this, void 0, void 0, function* () {
954
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Fingerprint');
955
+ });
956
+ }
957
+ linkFingerprintFiles(fileId, fingerprintIds) {
958
+ return __awaiter(this, void 0, void 0, function* () {
959
+ const associationDtos = [];
960
+ for (const param of fingerprintIds) {
961
+ associationDtos.push({
962
+ entity: 'CrmModule:Fingerprint',
963
+ recordId: param.id,
964
+ linkType: 'Fingerprint__File',
965
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
966
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
967
+ });
968
+ }
969
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
970
+ });
971
+ }
972
+ unLinkFingerprintFiles(fileId, linkedFingerprintId) {
973
+ return __awaiter(this, void 0, void 0, function* () {
974
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedFingerprintId);
975
+ });
976
+ }
977
+ linkNoteFiles(fileId, noteIds) {
978
+ return __awaiter(this, void 0, void 0, function* () {
979
+ const associationDtos = [];
980
+ for (const param of noteIds) {
981
+ associationDtos.push({
982
+ entity: 'SupportModule:Note',
983
+ recordId: param.id,
984
+ linkType: 'Note__File',
985
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
986
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
987
+ });
988
+ }
989
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
990
+ });
991
+ }
992
+ unLinkNoteFiles(fileId, linkedNoteId) {
993
+ return __awaiter(this, void 0, void 0, function* () {
994
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedNoteId);
995
+ });
996
+ }
997
+ // Use this function when you want to return a single record
998
+ getSweeperMaintenanceAudits(fileId) {
999
+ return __awaiter(this, void 0, void 0, function* () {
1000
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'SweeperMaintenanceAudit');
1001
+ });
1002
+ }
1003
+ linkSweeperMaintenanceAuditFiles(fileId, sweeperMaintenanceAuditIds) {
1004
+ return __awaiter(this, void 0, void 0, function* () {
1005
+ const associationDtos = [];
1006
+ for (const param of sweeperMaintenanceAuditIds) {
1007
+ associationDtos.push({
1008
+ entity: 'FieldServiceModule:SweeperMaintenanceAudit',
1009
+ recordId: param.id,
1010
+ linkType: 'SweeperMaintenanceAudit__File',
1011
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1012
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1013
+ });
1014
+ }
1015
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1016
+ });
1017
+ }
1018
+ unLinkSweeperMaintenanceAuditFiles(fileId, linkedSweeperMaintenanceAuditId) {
1019
+ return __awaiter(this, void 0, void 0, function* () {
1020
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedSweeperMaintenanceAuditId);
1021
+ });
1022
+ }
1023
+ // Use this function when you want to return a single record
1024
+ getBlockageReportA55s(fileId) {
1025
+ return __awaiter(this, void 0, void 0, function* () {
1026
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BlockageReportA55');
1027
+ });
1028
+ }
1029
+ linkBlockageReportA55Files(fileId, blockageReportA55Ids) {
1030
+ return __awaiter(this, void 0, void 0, function* () {
1031
+ const associationDtos = [];
1032
+ for (const param of blockageReportA55Ids) {
1033
+ associationDtos.push({
1034
+ entity: 'FieldServiceModule:BlockageReportA55',
1035
+ recordId: param.id,
1036
+ linkType: 'BlockageReportA55__File',
1037
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1038
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1039
+ });
1040
+ }
1041
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1042
+ });
1043
+ }
1044
+ unLinkBlockageReportA55Files(fileId, linkedBlockageReportA55Id) {
1045
+ return __awaiter(this, void 0, void 0, function* () {
1046
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedBlockageReportA55Id);
1047
+ });
1048
+ }
1049
+ // Use this function when you want to return a single record
1050
+ getUgInstallationAudits(fileId) {
1051
+ return __awaiter(this, void 0, void 0, function* () {
1052
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgInstallationAudit');
1053
+ });
1054
+ }
1055
+ linkUgInstallationAuditFiles(fileId, ugInstallationAuditIds) {
1056
+ return __awaiter(this, void 0, void 0, function* () {
1057
+ const associationDtos = [];
1058
+ for (const param of ugInstallationAuditIds) {
1059
+ associationDtos.push({
1060
+ entity: 'FieldServiceModule:UgInstallationAudit',
1061
+ recordId: param.id,
1062
+ linkType: 'UgInstallationAudit__File',
1063
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1064
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1065
+ });
1066
+ }
1067
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1068
+ });
1069
+ }
1070
+ unLinkUgInstallationAuditFiles(fileId, linkedUgInstallationAuditId) {
1071
+ return __awaiter(this, void 0, void 0, function* () {
1072
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedUgInstallationAuditId);
1073
+ });
1074
+ }
1075
+ // Use this function when you want to return a single record
1076
+ getOhInstallationAudits(fileId) {
1077
+ return __awaiter(this, void 0, void 0, function* () {
1078
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhInstallationAudit');
1079
+ });
1080
+ }
1081
+ linkOhInstallationAuditFiles(fileId, ohInstallationAuditIds) {
1082
+ return __awaiter(this, void 0, void 0, function* () {
1083
+ const associationDtos = [];
1084
+ for (const param of ohInstallationAuditIds) {
1085
+ associationDtos.push({
1086
+ entity: 'FieldServiceModule:OhInstallationAudit',
1087
+ recordId: param.id,
1088
+ linkType: 'OhInstallationAudit__File',
1089
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1090
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1091
+ });
1092
+ }
1093
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1094
+ });
1095
+ }
1096
+ unLinkOhInstallationAuditFiles(fileId, linkedOhInstallationAuditId) {
1097
+ return __awaiter(this, void 0, void 0, function* () {
1098
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOhInstallationAuditId);
1099
+ });
1100
+ }
1101
+ // Use this function when you want to return a single record
1102
+ getServiceVisitAudits(fileId) {
1103
+ return __awaiter(this, void 0, void 0, function* () {
1104
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'ServiceVisitAudit');
1105
+ });
1106
+ }
1107
+ linkServiceVisitAuditFiles(fileId, serviceVisitAuditIds) {
1108
+ return __awaiter(this, void 0, void 0, function* () {
1109
+ const associationDtos = [];
1110
+ for (const param of serviceVisitAuditIds) {
1111
+ associationDtos.push({
1112
+ entity: 'FieldServiceModule:ServiceVisitAudit',
1113
+ recordId: param.id,
1114
+ linkType: 'ServiceVisitAudit__File',
1115
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1116
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1117
+ });
1118
+ }
1119
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1120
+ });
1121
+ }
1122
+ unLinkServiceVisitAuditFiles(fileId, linkedServiceVisitAuditId) {
1123
+ return __awaiter(this, void 0, void 0, function* () {
1124
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedServiceVisitAuditId);
1125
+ });
1126
+ }
1127
+ // Use this function when you want to return a single record
1128
+ getOhAuditOfInstallations(fileId) {
1129
+ return __awaiter(this, void 0, void 0, function* () {
1130
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhAuditOfInstallation');
1131
+ });
1132
+ }
1133
+ linkOhAuditOfInstallationFiles(fileId, ohAuditOfInstallationIds) {
1134
+ return __awaiter(this, void 0, void 0, function* () {
1135
+ const associationDtos = [];
1136
+ for (const param of ohAuditOfInstallationIds) {
1137
+ associationDtos.push({
1138
+ entity: 'FieldServiceModule:OhAuditOfInstallation',
1139
+ recordId: param.id,
1140
+ linkType: 'OhAuditOfInstallation__File',
1141
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1142
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1143
+ });
1144
+ }
1145
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1146
+ });
1147
+ }
1148
+ unLinkOhAuditOfInstallationFiles(fileId, linkedOhAuditOfInstallationId) {
1149
+ return __awaiter(this, void 0, void 0, function* () {
1150
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOhAuditOfInstallationId);
1151
+ });
1152
+ }
1153
+ // Use this function when you want to return a single record
1154
+ getUgAuditOfInstallations(fileId) {
1155
+ return __awaiter(this, void 0, void 0, function* () {
1156
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgAuditOfInstallation');
1157
+ });
1158
+ }
1159
+ linkUgAuditOfInstallationFiles(fileId, ugAuditOfInstallationIds) {
1160
+ return __awaiter(this, void 0, void 0, function* () {
1161
+ const associationDtos = [];
1162
+ for (const param of ugAuditOfInstallationIds) {
1163
+ associationDtos.push({
1164
+ entity: 'FieldServiceModule:UgAuditOfInstallation',
1165
+ recordId: param.id,
1166
+ linkType: 'UgAuditOfInstallation__File',
1167
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1168
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1169
+ });
1170
+ }
1171
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1172
+ });
1173
+ }
1174
+ unLinkUgAuditOfInstallationFiles(fileId, linkedUgAuditOfInstallationId) {
1175
+ return __awaiter(this, void 0, void 0, function* () {
1176
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedUgAuditOfInstallationId);
1177
+ });
1178
+ }
1179
+ // Use this function when you want to return a single record
1180
+ getUgRetroAudits(fileId) {
1181
+ return __awaiter(this, void 0, void 0, function* () {
1182
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgRetroAudit');
1183
+ });
1184
+ }
1185
+ linkUgRetroAuditFiles(fileId, ugRetroAuditIds) {
1186
+ return __awaiter(this, void 0, void 0, function* () {
1187
+ const associationDtos = [];
1188
+ for (const param of ugRetroAuditIds) {
1189
+ associationDtos.push({
1190
+ entity: 'FieldServiceModule:UgRetroAudit',
1191
+ recordId: param.id,
1192
+ linkType: 'UgRetroAudit__File',
1193
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1194
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1195
+ });
1196
+ }
1197
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1198
+ });
1199
+ }
1200
+ unLinkUgRetroAuditFiles(fileId, linkedUgRetroAuditId) {
1201
+ return __awaiter(this, void 0, void 0, function* () {
1202
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedUgRetroAuditId);
1203
+ });
1204
+ }
1205
+ // Use this function when you want to return a single record
1206
+ getOhRetroAudits(fileId) {
1207
+ return __awaiter(this, void 0, void 0, function* () {
1208
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhRetroAudit');
1209
+ });
1210
+ }
1211
+ linkOhRetroAuditFiles(fileId, ohRetroAuditIds) {
1212
+ return __awaiter(this, void 0, void 0, function* () {
1213
+ const associationDtos = [];
1214
+ for (const param of ohRetroAuditIds) {
1215
+ associationDtos.push({
1216
+ entity: 'FieldServiceModule:OhRetroAudit',
1217
+ recordId: param.id,
1218
+ linkType: 'OhRetroAudit__File',
1219
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1220
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1221
+ });
1222
+ }
1223
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1224
+ });
1225
+ }
1226
+ unLinkOhRetroAuditFiles(fileId, linkedOhRetroAuditId) {
1227
+ return __awaiter(this, void 0, void 0, function* () {
1228
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOhRetroAuditId);
1229
+ });
1230
+ }
1231
+ // Use this function when you want to return a single record
1232
+ getRemediationOutcomeForms(fileId) {
1233
+ return __awaiter(this, void 0, void 0, function* () {
1234
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'RemediationOutcomeForm');
1235
+ });
1236
+ }
1237
+ linkRemediationOutcomeFormFiles(fileId, remediationOutcomeFormIds) {
1238
+ return __awaiter(this, void 0, void 0, function* () {
1239
+ const associationDtos = [];
1240
+ for (const param of remediationOutcomeFormIds) {
1241
+ associationDtos.push({
1242
+ entity: 'FieldServiceModule:RemediationOutcomeForm',
1243
+ recordId: param.id,
1244
+ linkType: 'RemediationOutcomeForm_File',
1245
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1246
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1247
+ });
1248
+ }
1249
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1250
+ });
1251
+ }
1252
+ unLinkRemediationOutcomeFormFiles(fileId, linkedRemediationOutcomeFormId) {
1253
+ return __awaiter(this, void 0, void 0, function* () {
1254
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedRemediationOutcomeFormId);
1255
+ });
1256
+ }
1257
+ // Use this function when you want to return a single record
1258
+ getUgInProgressAudits(fileId) {
1259
+ return __awaiter(this, void 0, void 0, function* () {
1260
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgInProgressAudit');
1261
+ });
1262
+ }
1263
+ linkUgInProgressAuditFiles(fileId, ugInProgressAuditIds) {
1264
+ return __awaiter(this, void 0, void 0, function* () {
1265
+ const associationDtos = [];
1266
+ for (const param of ugInProgressAuditIds) {
1267
+ associationDtos.push({
1268
+ entity: 'FieldServiceModule:UgInProgressAudit',
1269
+ recordId: param.id,
1270
+ linkType: 'UgInProgressAudit_File',
1271
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1272
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1273
+ });
1274
+ }
1275
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1276
+ });
1277
+ }
1278
+ unLinkUgInProgressAuditFiles(fileId, linkedUgInProgressAuditId) {
1279
+ return __awaiter(this, void 0, void 0, function* () {
1280
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedUgInProgressAuditId);
1281
+ });
1282
+ }
1283
+ // Use this function when you want to return a single record
1284
+ getOhInProgressAudits(fileId) {
1285
+ return __awaiter(this, void 0, void 0, function* () {
1286
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhInProgressAudit');
1287
+ });
1288
+ }
1289
+ linkOhInProgressAuditFiles(fileId, ohInProgressAuditIds) {
1290
+ return __awaiter(this, void 0, void 0, function* () {
1291
+ const associationDtos = [];
1292
+ for (const param of ohInProgressAuditIds) {
1293
+ associationDtos.push({
1294
+ entity: 'FieldServiceModule:OhInProgressAudit',
1295
+ recordId: param.id,
1296
+ linkType: 'OhInProgressAudit_File',
1297
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1298
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1299
+ });
1300
+ }
1301
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1302
+ });
1303
+ }
1304
+ unLinkOhInProgressAuditFiles(fileId, linkedOhInProgressAuditId) {
1305
+ return __awaiter(this, void 0, void 0, function* () {
1306
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOhInProgressAuditId);
1307
+ });
1308
+ }
1309
+ // Use this function when you want to return a single record
1310
+ getBlockageA55s(fileId) {
1311
+ return __awaiter(this, void 0, void 0, function* () {
1312
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BlockageA55');
1313
+ });
1314
+ }
1315
+ linkOverlayA55Files(fileId, blockageA55Ids) {
1316
+ return __awaiter(this, void 0, void 0, function* () {
1317
+ const associationDtos = [];
1318
+ for (const param of blockageA55Ids) {
1319
+ associationDtos.push({
1320
+ entity: 'FieldServiceModule:BlockageA55',
1321
+ recordId: param.id,
1322
+ linkType: 'OverlayA55_File',
1323
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1324
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1325
+ });
1326
+ }
1327
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1328
+ });
1329
+ }
1330
+ unLinkOverlayA55Files(fileId, linkedBlockageA55Id) {
1331
+ return __awaiter(this, void 0, void 0, function* () {
1332
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedBlockageA55Id);
1333
+ });
1334
+ }
1335
+ // Use this function when you want to return a single record
1336
+ getOverlayRealA55s(fileId) {
1337
+ return __awaiter(this, void 0, void 0, function* () {
1338
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OverlayRealA55');
1339
+ });
1340
+ }
1341
+ linkOverlayRealA55Files(fileId, overlayRealA55Ids) {
1342
+ return __awaiter(this, void 0, void 0, function* () {
1343
+ const associationDtos = [];
1344
+ for (const param of overlayRealA55Ids) {
1345
+ associationDtos.push({
1346
+ entity: 'FieldServiceModule:OverlayRealA55',
1347
+ recordId: param.id,
1348
+ linkType: 'OverlayRealA55_File',
1349
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1350
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1351
+ });
1352
+ }
1353
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1354
+ });
1355
+ }
1356
+ unLinkOverlayRealA55Files(fileId, linkedOverlayRealA55Id) {
1357
+ return __awaiter(this, void 0, void 0, function* () {
1358
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOverlayRealA55Id);
1359
+ });
1360
+ }
1361
+ // Use this function when you want to return a single record
1362
+ getOhExternalAudits(fileId) {
1363
+ return __awaiter(this, void 0, void 0, function* () {
1364
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhExternalAudit');
1365
+ });
1366
+ }
1367
+ linkOhExternalAuditFiles(fileId, ohExternalAuditIds) {
1368
+ return __awaiter(this, void 0, void 0, function* () {
1369
+ const associationDtos = [];
1370
+ for (const param of ohExternalAuditIds) {
1371
+ associationDtos.push({
1372
+ entity: 'FieldServiceModule:OhExternalAudit',
1373
+ recordId: param.id,
1374
+ linkType: 'OhExternalAudit_File',
1375
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1376
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1377
+ });
1378
+ }
1379
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1380
+ });
1381
+ }
1382
+ unLinkOhExternalAuditFiles(fileId, linkedOhExternalAuditId) {
1383
+ return __awaiter(this, void 0, void 0, function* () {
1384
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, linkedOhExternalAuditId);
1385
+ });
1386
+ }
145
1387
  }
146
1388
  exports.FileApi = FileApi;