@d19n/youfibre-odin-sdk 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/api-sdk-v1/BillingRequestApi.d.ts +0 -7
  2. package/dist/api-sdk-v1/BillingRequestApi.js +0 -26
  3. package/dist/api-sdk-v1/CaseApi.d.ts +0 -7
  4. package/dist/api-sdk-v1/CaseApi.js +0 -26
  5. package/dist/api-sdk-v1/ConsumptionRateApi.d.ts +0 -7
  6. package/dist/api-sdk-v1/ConsumptionRateApi.js +0 -26
  7. package/dist/api-sdk-v1/ConsumptionScheduleApi.d.ts +0 -7
  8. package/dist/api-sdk-v1/ConsumptionScheduleApi.js +0 -26
  9. package/dist/api-sdk-v1/ContactApi.d.ts +87 -3
  10. package/dist/api-sdk-v1/ContactApi.js +319 -7
  11. package/dist/api-sdk-v1/ContactIdentityApi.d.ts +0 -7
  12. package/dist/api-sdk-v1/ContactIdentityApi.js +0 -26
  13. package/dist/api-sdk-v1/FileApi.d.ts +338 -3
  14. package/dist/api-sdk-v1/FileApi.js +1249 -7
  15. package/dist/api-sdk-v1/InvoiceItemApi.d.ts +0 -7
  16. package/dist/api-sdk-v1/InvoiceItemApi.js +0 -26
  17. package/dist/api-sdk-v1/LeadApi.d.ts +24 -3
  18. package/dist/api-sdk-v1/LeadApi.js +85 -7
  19. package/dist/api-sdk-v1/MilestoneApi.d.ts +0 -7
  20. package/dist/api-sdk-v1/MilestoneApi.js +0 -26
  21. package/dist/api-sdk-v1/NoteApi.d.ts +3 -4
  22. package/dist/api-sdk-v1/NoteApi.js +7 -13
  23. package/dist/api-sdk-v1/OfferApi.d.ts +0 -7
  24. package/dist/api-sdk-v1/OfferApi.js +0 -26
  25. package/dist/api-sdk-v1/OrderApi.d.ts +7 -8
  26. package/dist/api-sdk-v1/OrderApi.js +21 -27
  27. package/dist/api-sdk-v1/OrderItemApi.d.ts +0 -7
  28. package/dist/api-sdk-v1/OrderItemApi.js +0 -26
  29. package/dist/api-sdk-v1/OrganizationApi.d.ts +0 -7
  30. package/dist/api-sdk-v1/OrganizationApi.js +0 -26
  31. package/dist/api-sdk-v1/ProductApi.d.ts +1 -9
  32. package/dist/api-sdk-v1/ProductApi.js +0 -31
  33. package/dist/api-sdk-v1/ProductComponentApi.d.ts +0 -7
  34. package/dist/api-sdk-v1/ProductComponentApi.js +0 -26
  35. package/dist/api-sdk-v1/RestrictionApi.d.ts +0 -7
  36. package/dist/api-sdk-v1/RestrictionApi.js +0 -26
  37. package/dist/api-sdk-v1/ServiceApi.d.ts +0 -7
  38. package/dist/api-sdk-v1/ServiceApi.js +0 -26
  39. package/dist/api-sdk-v1/ServiceAppointmentConfigApi.d.ts +12 -0
  40. package/dist/api-sdk-v1/ServiceAppointmentConfigApi.js +40 -0
  41. package/dist/api-sdk-v1/SplitOrderApi.d.ts +2 -3
  42. package/dist/api-sdk-v1/SplitOrderApi.js +6 -12
  43. package/dist/api-sdk-v1/TransactionApi.d.ts +0 -7
  44. package/dist/api-sdk-v1/TransactionApi.js +0 -26
  45. package/dist/api-sdk-v1/UserApi.d.ts +18 -0
  46. package/dist/api-sdk-v1/UserApi.js +60 -0
  47. package/dist/api-sdk-v1/WorkOrderApi.d.ts +44 -3
  48. package/dist/api-sdk-v1/WorkOrderApi.js +157 -7
  49. package/dist/db-sdk-v1/BillingRequestDb.d.ts +0 -7
  50. package/dist/db-sdk-v1/BillingRequestDb.js +0 -33
  51. package/dist/db-sdk-v1/CaseDb.d.ts +0 -7
  52. package/dist/db-sdk-v1/CaseDb.js +0 -33
  53. package/dist/db-sdk-v1/ConsumptionRateDb.d.ts +0 -7
  54. package/dist/db-sdk-v1/ConsumptionRateDb.js +0 -33
  55. package/dist/db-sdk-v1/ConsumptionScheduleDb.d.ts +0 -7
  56. package/dist/db-sdk-v1/ConsumptionScheduleDb.js +0 -33
  57. package/dist/db-sdk-v1/ContactDb.d.ts +87 -3
  58. package/dist/db-sdk-v1/ContactDb.js +403 -7
  59. package/dist/db-sdk-v1/ContactIdentityDb.d.ts +0 -7
  60. package/dist/db-sdk-v1/ContactIdentityDb.js +0 -33
  61. package/dist/db-sdk-v1/FileDb.d.ts +338 -3
  62. package/dist/db-sdk-v1/FileDb.js +1585 -7
  63. package/dist/db-sdk-v1/InvoiceItemDb.d.ts +0 -7
  64. package/dist/db-sdk-v1/InvoiceItemDb.js +0 -33
  65. package/dist/db-sdk-v1/LeadDb.d.ts +24 -3
  66. package/dist/db-sdk-v1/LeadDb.js +106 -7
  67. package/dist/db-sdk-v1/MilestoneDb.d.ts +0 -7
  68. package/dist/db-sdk-v1/MilestoneDb.js +0 -33
  69. package/dist/db-sdk-v1/NoteDb.d.ts +3 -4
  70. package/dist/db-sdk-v1/NoteDb.js +7 -13
  71. package/dist/db-sdk-v1/OfferDb.d.ts +0 -7
  72. package/dist/db-sdk-v1/OfferDb.js +0 -33
  73. package/dist/db-sdk-v1/OrderDb.d.ts +7 -8
  74. package/dist/db-sdk-v1/OrderDb.js +28 -34
  75. package/dist/db-sdk-v1/OrderItemDb.d.ts +0 -7
  76. package/dist/db-sdk-v1/OrderItemDb.js +0 -33
  77. package/dist/db-sdk-v1/OrganizationDb.d.ts +0 -7
  78. package/dist/db-sdk-v1/OrganizationDb.js +0 -33
  79. package/dist/db-sdk-v1/ProductComponentDb.d.ts +0 -7
  80. package/dist/db-sdk-v1/ProductComponentDb.js +0 -33
  81. package/dist/db-sdk-v1/ProductDb.d.ts +1 -9
  82. package/dist/db-sdk-v1/ProductDb.js +0 -38
  83. package/dist/db-sdk-v1/RestrictionDb.d.ts +0 -7
  84. package/dist/db-sdk-v1/RestrictionDb.js +0 -33
  85. package/dist/db-sdk-v1/ServiceAppointmentConfigDb.d.ts +12 -0
  86. package/dist/db-sdk-v1/ServiceAppointmentConfigDb.js +54 -0
  87. package/dist/db-sdk-v1/ServiceDb.d.ts +0 -7
  88. package/dist/db-sdk-v1/ServiceDb.js +0 -33
  89. package/dist/db-sdk-v1/SplitOrderDb.d.ts +2 -3
  90. package/dist/db-sdk-v1/SplitOrderDb.js +6 -12
  91. package/dist/db-sdk-v1/TransactionDb.d.ts +0 -7
  92. package/dist/db-sdk-v1/TransactionDb.js +0 -33
  93. package/dist/db-sdk-v1/UserDb.d.ts +18 -0
  94. package/dist/db-sdk-v1/UserDb.js +81 -0
  95. package/dist/db-sdk-v1/WorkOrderDb.d.ts +44 -3
  96. package/dist/db-sdk-v1/WorkOrderDb.js +199 -7
  97. package/package.json +2 -2
  98. package/src/api-sdk-v1/BillingRequestApi.ts +0 -27
  99. package/src/api-sdk-v1/CaseApi.ts +0 -27
  100. package/src/api-sdk-v1/ConsumptionRateApi.ts +0 -27
  101. package/src/api-sdk-v1/ConsumptionScheduleApi.ts +0 -27
  102. package/src/api-sdk-v1/ContactApi.ts +343 -19
  103. package/src/api-sdk-v1/ContactIdentityApi.ts +0 -27
  104. package/src/api-sdk-v1/FileApi.ts +1310 -19
  105. package/src/api-sdk-v1/InvoiceItemApi.ts +0 -27
  106. package/src/api-sdk-v1/LeadApi.ts +100 -19
  107. package/src/api-sdk-v1/MilestoneApi.ts +0 -27
  108. package/src/api-sdk-v1/NoteApi.ts +7 -12
  109. package/src/api-sdk-v1/OfferApi.ts +0 -27
  110. package/src/api-sdk-v1/OrderApi.ts +23 -28
  111. package/src/api-sdk-v1/OrderItemApi.ts +0 -27
  112. package/src/api-sdk-v1/OrganizationApi.ts +0 -27
  113. package/src/api-sdk-v1/ProductApi.ts +0 -31
  114. package/src/api-sdk-v1/ProductComponentApi.ts +0 -27
  115. package/src/api-sdk-v1/RestrictionApi.ts +0 -27
  116. package/src/api-sdk-v1/ServiceApi.ts +0 -27
  117. package/src/api-sdk-v1/ServiceAppointmentConfigApi.ts +44 -0
  118. package/src/api-sdk-v1/SplitOrderApi.ts +17 -22
  119. package/src/api-sdk-v1/TransactionApi.ts +0 -27
  120. package/src/api-sdk-v1/UserApi.ts +66 -0
  121. package/src/api-sdk-v1/WorkOrderApi.ts +178 -21
  122. package/src/db-sdk-v1/BillingRequestDb.ts +0 -35
  123. package/src/db-sdk-v1/CaseDb.ts +0 -35
  124. package/src/db-sdk-v1/ConsumptionRateDb.ts +0 -35
  125. package/src/db-sdk-v1/ConsumptionScheduleDb.ts +0 -35
  126. package/src/db-sdk-v1/ContactDb.ts +443 -23
  127. package/src/db-sdk-v1/ContactIdentityDb.ts +0 -35
  128. package/src/db-sdk-v1/FileDb.ts +1698 -23
  129. package/src/db-sdk-v1/InvoiceItemDb.ts +0 -35
  130. package/src/db-sdk-v1/LeadDb.ts +128 -23
  131. package/src/db-sdk-v1/MilestoneDb.ts +0 -35
  132. package/src/db-sdk-v1/NoteDb.ts +7 -12
  133. package/src/db-sdk-v1/OfferDb.ts +0 -35
  134. package/src/db-sdk-v1/OrderDb.ts +31 -36
  135. package/src/db-sdk-v1/OrderItemDb.ts +0 -35
  136. package/src/db-sdk-v1/OrganizationDb.ts +0 -35
  137. package/src/db-sdk-v1/ProductComponentDb.ts +0 -35
  138. package/src/db-sdk-v1/ProductDb.ts +0 -39
  139. package/src/db-sdk-v1/RestrictionDb.ts +0 -35
  140. package/src/db-sdk-v1/ServiceAppointmentConfigDb.ts +60 -0
  141. package/src/db-sdk-v1/ServiceDb.ts +0 -35
  142. package/src/db-sdk-v1/SplitOrderDb.ts +20 -25
  143. package/src/db-sdk-v1/TransactionDb.ts +0 -35
  144. package/src/db-sdk-v1/UserDb.ts +90 -0
  145. package/src/db-sdk-v1/WorkOrderDb.ts +229 -24
  146. package/src/generators/runner.ts +2 -3
@@ -80,17 +80,17 @@ class FileDb extends db_provider_1.DbProvider {
80
80
  });
81
81
  }
82
82
  // Use this function when you want to return a single record
83
- getFiles(fileId) {
83
+ getAppointments(fileId) {
84
84
  return __awaiter(this, void 0, void 0, function* () {
85
- return yield this._getLinks(this.moduleName, this.entityName, fileId, 'File');
85
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Appointment');
86
86
  });
87
87
  }
88
- linkAppointmentFiles(fileId, fileIds) {
88
+ linkAppointmentFiles(fileId, appointmentIds) {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
90
  const associationDtos = [];
91
- for (const param of fileIds) {
91
+ for (const param of appointmentIds) {
92
92
  associationDtos.push({
93
- entity: 'SchemaModule:File',
93
+ entity: 'CrmModule:Appointment',
94
94
  recordId: param.id,
95
95
  linkType: 'Appointment__File',
96
96
  relationType: param === null || param === void 0 ? void 0 : param.relationType,
@@ -100,10 +100,43 @@ class FileDb extends db_provider_1.DbProvider {
100
100
  return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
101
101
  });
102
102
  }
103
- unlinkAppointmentFiles(fileId, linkedFileIds) {
103
+ unlinkAppointmentFiles(fileId, linkedAppointmentIds) {
104
104
  return __awaiter(this, void 0, void 0, function* () {
105
105
  const associationDtos = [];
106
- for (const pk of linkedFileIds) {
106
+ for (const pk of linkedAppointmentIds) {
107
+ associationDtos.push({
108
+ primaryKey: fileId,
109
+ linkedRecordPrimaryKey: pk,
110
+ });
111
+ }
112
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
113
+ });
114
+ }
115
+ // Use this function when you want to return a single record
116
+ getUgExternalAudits(fileId) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgExternalAudit');
119
+ });
120
+ }
121
+ linkUgExternalAuditFiles(fileId, ugExternalAuditIds) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ const associationDtos = [];
124
+ for (const param of ugExternalAuditIds) {
125
+ associationDtos.push({
126
+ entity: 'FieldServiceModule:UgExternalAudit',
127
+ recordId: param.id,
128
+ linkType: 'UgExternalAudit_File',
129
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
130
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
131
+ });
132
+ }
133
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
134
+ });
135
+ }
136
+ unlinkUgExternalAuditFiles(fileId, linkedUgExternalAuditIds) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ const associationDtos = [];
139
+ for (const pk of linkedUgExternalAuditIds) {
107
140
  associationDtos.push({
108
141
  primaryKey: fileId,
109
142
  linkedRecordPrimaryKey: pk,
@@ -145,5 +178,1550 @@ class FileDb extends db_provider_1.DbProvider {
145
178
  return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
146
179
  });
147
180
  }
181
+ // Use this function when you want to return a single record
182
+ getWorkOrders(fileId) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'WorkOrder');
185
+ });
186
+ }
187
+ linkWorkOrderFiles(fileId, workOrderIds) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const associationDtos = [];
190
+ for (const param of workOrderIds) {
191
+ associationDtos.push({
192
+ entity: 'FieldServiceModule:WorkOrder',
193
+ recordId: param.id,
194
+ linkType: 'WorkOrder__File',
195
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
196
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
197
+ });
198
+ }
199
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
200
+ });
201
+ }
202
+ unlinkWorkOrderFiles(fileId, linkedWorkOrderIds) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ const associationDtos = [];
205
+ for (const pk of linkedWorkOrderIds) {
206
+ associationDtos.push({
207
+ primaryKey: fileId,
208
+ linkedRecordPrimaryKey: pk,
209
+ });
210
+ }
211
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
212
+ });
213
+ }
214
+ // Use this function when you want to return a single record
215
+ getInternalInstallAudits(fileId) {
216
+ return __awaiter(this, void 0, void 0, function* () {
217
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'InternalInstallAudit');
218
+ });
219
+ }
220
+ linkInternalInstallAuditFiles(fileId, internalInstallAuditIds) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ const associationDtos = [];
223
+ for (const param of internalInstallAuditIds) {
224
+ associationDtos.push({
225
+ entity: 'FieldServiceModule:InternalInstallAudit',
226
+ recordId: param.id,
227
+ linkType: 'InternalInstallAudit_File',
228
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
229
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
230
+ });
231
+ }
232
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
233
+ });
234
+ }
235
+ unlinkInternalInstallAuditFiles(fileId, linkedInternalInstallAuditIds) {
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ const associationDtos = [];
238
+ for (const pk of linkedInternalInstallAuditIds) {
239
+ associationDtos.push({
240
+ primaryKey: fileId,
241
+ linkedRecordPrimaryKey: pk,
242
+ });
243
+ }
244
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
245
+ });
246
+ }
247
+ // Use this function when you want to return a single record
248
+ getKnowledgeArticles(fileId) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'KnowledgeArticle');
251
+ });
252
+ }
253
+ linkKnowledgeArticleFiles(fileId, knowledgeArticleIds) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const associationDtos = [];
256
+ for (const param of knowledgeArticleIds) {
257
+ associationDtos.push({
258
+ entity: 'SupportModule:KnowledgeArticle',
259
+ recordId: param.id,
260
+ linkType: 'KnowledgeArticle__File',
261
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
262
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
263
+ });
264
+ }
265
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
266
+ });
267
+ }
268
+ unlinkKnowledgeArticleFiles(fileId, linkedKnowledgeArticleIds) {
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ const associationDtos = [];
271
+ for (const pk of linkedKnowledgeArticleIds) {
272
+ associationDtos.push({
273
+ primaryKey: fileId,
274
+ linkedRecordPrimaryKey: pk,
275
+ });
276
+ }
277
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
278
+ });
279
+ }
280
+ // Use this function when you want to return a single record
281
+ getCases(fileId) {
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Case');
284
+ });
285
+ }
286
+ linkCaseFiles(fileId, caseIds) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ const associationDtos = [];
289
+ for (const param of caseIds) {
290
+ associationDtos.push({
291
+ entity: 'SupportModule:Case',
292
+ recordId: param.id,
293
+ linkType: 'Case__File',
294
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
295
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
296
+ });
297
+ }
298
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
299
+ });
300
+ }
301
+ unlinkCaseFiles(fileId, linkedCaseIds) {
302
+ return __awaiter(this, void 0, void 0, function* () {
303
+ const associationDtos = [];
304
+ for (const pk of linkedCaseIds) {
305
+ associationDtos.push({
306
+ primaryKey: fileId,
307
+ linkedRecordPrimaryKey: pk,
308
+ });
309
+ }
310
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
311
+ });
312
+ }
313
+ // Use this function when you want to return a single record
314
+ getLeads(fileId) {
315
+ return __awaiter(this, void 0, void 0, function* () {
316
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Lead');
317
+ });
318
+ }
319
+ linkLeadFiles(fileId, leadIds) {
320
+ return __awaiter(this, void 0, void 0, function* () {
321
+ const associationDtos = [];
322
+ for (const param of leadIds) {
323
+ associationDtos.push({
324
+ entity: 'CrmModule:Lead',
325
+ recordId: param.id,
326
+ linkType: 'Lead__File',
327
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
328
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
329
+ });
330
+ }
331
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
332
+ });
333
+ }
334
+ unlinkLeadFiles(fileId, linkedLeadIds) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ const associationDtos = [];
337
+ for (const pk of linkedLeadIds) {
338
+ associationDtos.push({
339
+ primaryKey: fileId,
340
+ linkedRecordPrimaryKey: pk,
341
+ });
342
+ }
343
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
344
+ });
345
+ }
346
+ // Use this function when you want to return a single record
347
+ getContacts(fileId) {
348
+ return __awaiter(this, void 0, void 0, function* () {
349
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Contact');
350
+ });
351
+ }
352
+ linkContactFiles(fileId, contactIds) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ const associationDtos = [];
355
+ for (const param of contactIds) {
356
+ associationDtos.push({
357
+ entity: 'CrmModule:Contact',
358
+ recordId: param.id,
359
+ linkType: 'Contact__File',
360
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
361
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
362
+ });
363
+ }
364
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
365
+ });
366
+ }
367
+ unlinkContactFiles(fileId, linkedContactIds) {
368
+ return __awaiter(this, void 0, void 0, function* () {
369
+ const associationDtos = [];
370
+ for (const pk of linkedContactIds) {
371
+ associationDtos.push({
372
+ primaryKey: fileId,
373
+ linkedRecordPrimaryKey: pk,
374
+ });
375
+ }
376
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
377
+ });
378
+ }
379
+ // Use this function when you want to return a single record
380
+ getOrders(fileId) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Order');
383
+ });
384
+ }
385
+ linkOrderFiles(fileId, orderIds) {
386
+ return __awaiter(this, void 0, void 0, function* () {
387
+ const associationDtos = [];
388
+ for (const param of orderIds) {
389
+ associationDtos.push({
390
+ entity: 'OrderModule:Order',
391
+ recordId: param.id,
392
+ linkType: 'Order__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
+ unlinkOrderFiles(fileId, linkedOrderIds) {
401
+ return __awaiter(this, void 0, void 0, function* () {
402
+ const associationDtos = [];
403
+ for (const pk of linkedOrderIds) {
404
+ associationDtos.push({
405
+ primaryKey: fileId,
406
+ linkedRecordPrimaryKey: pk,
407
+ });
408
+ }
409
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
410
+ });
411
+ }
412
+ // Use this function when you want to return a single record
413
+ getBillingRequests(fileId) {
414
+ return __awaiter(this, void 0, void 0, function* () {
415
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BillingRequest');
416
+ });
417
+ }
418
+ linkBillingRequestFiles(fileId, billingRequestIds) {
419
+ return __awaiter(this, void 0, void 0, function* () {
420
+ const associationDtos = [];
421
+ for (const param of billingRequestIds) {
422
+ associationDtos.push({
423
+ entity: 'BillingModule:BillingRequest',
424
+ recordId: param.id,
425
+ linkType: 'BillingRequest__File',
426
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
427
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
428
+ });
429
+ }
430
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
431
+ });
432
+ }
433
+ unlinkBillingRequestFiles(fileId, linkedBillingRequestIds) {
434
+ return __awaiter(this, void 0, void 0, function* () {
435
+ const associationDtos = [];
436
+ for (const pk of linkedBillingRequestIds) {
437
+ associationDtos.push({
438
+ primaryKey: fileId,
439
+ linkedRecordPrimaryKey: pk,
440
+ });
441
+ }
442
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
443
+ });
444
+ }
445
+ // Use this function when you want to return a single record
446
+ getTransactions(fileId) {
447
+ return __awaiter(this, void 0, void 0, function* () {
448
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Transaction');
449
+ });
450
+ }
451
+ linkTransactionFiles(fileId, transactionIds) {
452
+ return __awaiter(this, void 0, void 0, function* () {
453
+ const associationDtos = [];
454
+ for (const param of transactionIds) {
455
+ associationDtos.push({
456
+ entity: 'BillingModule:Transaction',
457
+ recordId: param.id,
458
+ linkType: 'Transaction__File',
459
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
460
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
461
+ });
462
+ }
463
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
464
+ });
465
+ }
466
+ unlinkTransactionFiles(fileId, linkedTransactionIds) {
467
+ return __awaiter(this, void 0, void 0, function* () {
468
+ const associationDtos = [];
469
+ for (const pk of linkedTransactionIds) {
470
+ associationDtos.push({
471
+ primaryKey: fileId,
472
+ linkedRecordPrimaryKey: pk,
473
+ });
474
+ }
475
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
476
+ });
477
+ }
478
+ // Use this function when you want to return a single record
479
+ getPaymentMethods(fileId) {
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'PaymentMethod');
482
+ });
483
+ }
484
+ linkPaymentMethodFiles(fileId, paymentMethodIds) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ const associationDtos = [];
487
+ for (const param of paymentMethodIds) {
488
+ associationDtos.push({
489
+ entity: 'BillingModule:PaymentMethod',
490
+ recordId: param.id,
491
+ linkType: 'PaymentMethod__File',
492
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
493
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
494
+ });
495
+ }
496
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
497
+ });
498
+ }
499
+ unlinkPaymentMethodFiles(fileId, linkedPaymentMethodIds) {
500
+ return __awaiter(this, void 0, void 0, function* () {
501
+ const associationDtos = [];
502
+ for (const pk of linkedPaymentMethodIds) {
503
+ associationDtos.push({
504
+ primaryKey: fileId,
505
+ linkedRecordPrimaryKey: pk,
506
+ });
507
+ }
508
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
509
+ });
510
+ }
511
+ // Use this function when you want to return a single record
512
+ getCustomerDeviceOnts(fileId) {
513
+ return __awaiter(this, void 0, void 0, function* () {
514
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'CustomerDeviceOnt');
515
+ });
516
+ }
517
+ linkCustomerDeviceOntFiles(fileId, customerDeviceOntIds) {
518
+ return __awaiter(this, void 0, void 0, function* () {
519
+ const associationDtos = [];
520
+ for (const param of customerDeviceOntIds) {
521
+ associationDtos.push({
522
+ entity: 'ServiceModule:CustomerDeviceOnt',
523
+ recordId: param.id,
524
+ linkType: 'CustomerDeviceOnt__File',
525
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
526
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
527
+ });
528
+ }
529
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
530
+ });
531
+ }
532
+ unlinkCustomerDeviceOntFiles(fileId, linkedCustomerDeviceOntIds) {
533
+ return __awaiter(this, void 0, void 0, function* () {
534
+ const associationDtos = [];
535
+ for (const pk of linkedCustomerDeviceOntIds) {
536
+ associationDtos.push({
537
+ primaryKey: fileId,
538
+ linkedRecordPrimaryKey: pk,
539
+ });
540
+ }
541
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
542
+ });
543
+ }
544
+ // Use this function when you want to return a single record
545
+ getCreditNotes(fileId) {
546
+ return __awaiter(this, void 0, void 0, function* () {
547
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'CreditNote');
548
+ });
549
+ }
550
+ linkCreditNoteFiles(fileId, creditNoteIds) {
551
+ return __awaiter(this, void 0, void 0, function* () {
552
+ const associationDtos = [];
553
+ for (const param of creditNoteIds) {
554
+ associationDtos.push({
555
+ entity: 'BillingModule:CreditNote',
556
+ recordId: param.id,
557
+ linkType: 'CreditNote__File',
558
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
559
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
560
+ });
561
+ }
562
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
563
+ });
564
+ }
565
+ unlinkCreditNoteFiles(fileId, linkedCreditNoteIds) {
566
+ return __awaiter(this, void 0, void 0, function* () {
567
+ const associationDtos = [];
568
+ for (const pk of linkedCreditNoteIds) {
569
+ associationDtos.push({
570
+ primaryKey: fileId,
571
+ linkedRecordPrimaryKey: pk,
572
+ });
573
+ }
574
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
575
+ });
576
+ }
577
+ // Use this function when you want to return a single record
578
+ getAddresss(fileId) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Address');
581
+ });
582
+ }
583
+ linkAddressFiles(fileId, addressIds) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ const associationDtos = [];
586
+ for (const param of addressIds) {
587
+ associationDtos.push({
588
+ entity: 'CrmModule:Address',
589
+ recordId: param.id,
590
+ linkType: 'Address__File',
591
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
592
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
593
+ });
594
+ }
595
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
596
+ });
597
+ }
598
+ unlinkAddressFiles(fileId, linkedAddressIds) {
599
+ return __awaiter(this, void 0, void 0, function* () {
600
+ const associationDtos = [];
601
+ for (const pk of linkedAddressIds) {
602
+ associationDtos.push({
603
+ primaryKey: fileId,
604
+ linkedRecordPrimaryKey: pk,
605
+ });
606
+ }
607
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
608
+ });
609
+ }
610
+ // Use this function when you want to return a single record
611
+ getChangeReasons(fileId) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'ChangeReason');
614
+ });
615
+ }
616
+ linkChangeReasonFiles(fileId, changeReasonIds) {
617
+ return __awaiter(this, void 0, void 0, function* () {
618
+ const associationDtos = [];
619
+ for (const param of changeReasonIds) {
620
+ associationDtos.push({
621
+ entity: 'FieldServiceModule:ChangeReason',
622
+ recordId: param.id,
623
+ linkType: 'ChangeReason__File',
624
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
625
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
626
+ });
627
+ }
628
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
629
+ });
630
+ }
631
+ unlinkChangeReasonFiles(fileId, linkedChangeReasonIds) {
632
+ return __awaiter(this, void 0, void 0, function* () {
633
+ const associationDtos = [];
634
+ for (const pk of linkedChangeReasonIds) {
635
+ associationDtos.push({
636
+ primaryKey: fileId,
637
+ linkedRecordPrimaryKey: pk,
638
+ });
639
+ }
640
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
641
+ });
642
+ }
643
+ // Use this function when you want to return a single record
644
+ getDiscounts(fileId) {
645
+ return __awaiter(this, void 0, void 0, function* () {
646
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Discount');
647
+ });
648
+ }
649
+ linkDiscountFiles(fileId, discountIds) {
650
+ return __awaiter(this, void 0, void 0, function* () {
651
+ const associationDtos = [];
652
+ for (const param of discountIds) {
653
+ associationDtos.push({
654
+ entity: 'ProductModule:Discount',
655
+ recordId: param.id,
656
+ linkType: 'Discount__File',
657
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
658
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
659
+ });
660
+ }
661
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
662
+ });
663
+ }
664
+ unlinkDiscountFiles(fileId, linkedDiscountIds) {
665
+ return __awaiter(this, void 0, void 0, function* () {
666
+ const associationDtos = [];
667
+ for (const pk of linkedDiscountIds) {
668
+ associationDtos.push({
669
+ primaryKey: fileId,
670
+ linkedRecordPrimaryKey: pk,
671
+ });
672
+ }
673
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
674
+ });
675
+ }
676
+ // Use this function when you want to return a single record
677
+ getPaymentMethodRefunds(fileId) {
678
+ return __awaiter(this, void 0, void 0, function* () {
679
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'PaymentMethodRefund');
680
+ });
681
+ }
682
+ linkPaymentMethodRefundFiles(fileId, paymentMethodRefundIds) {
683
+ return __awaiter(this, void 0, void 0, function* () {
684
+ const associationDtos = [];
685
+ for (const param of paymentMethodRefundIds) {
686
+ associationDtos.push({
687
+ entity: 'BillingModule:PaymentMethodRefund',
688
+ recordId: param.id,
689
+ linkType: 'PaymentMethodRefund__File',
690
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
691
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
692
+ });
693
+ }
694
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
695
+ });
696
+ }
697
+ unlinkPaymentMethodRefundFiles(fileId, linkedPaymentMethodRefundIds) {
698
+ return __awaiter(this, void 0, void 0, function* () {
699
+ const associationDtos = [];
700
+ for (const pk of linkedPaymentMethodRefundIds) {
701
+ associationDtos.push({
702
+ primaryKey: fileId,
703
+ linkedRecordPrimaryKey: pk,
704
+ });
705
+ }
706
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
707
+ });
708
+ }
709
+ // Use this function when you want to return a single record
710
+ getServiceAppointments(fileId) {
711
+ return __awaiter(this, void 0, void 0, function* () {
712
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'ServiceAppointment');
713
+ });
714
+ }
715
+ linkServiceAppointmentFiles(fileId, serviceAppointmentIds) {
716
+ return __awaiter(this, void 0, void 0, function* () {
717
+ const associationDtos = [];
718
+ for (const param of serviceAppointmentIds) {
719
+ associationDtos.push({
720
+ entity: 'FieldServiceModule:ServiceAppointment',
721
+ recordId: param.id,
722
+ linkType: 'ServiceAppointment__File',
723
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
724
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
725
+ });
726
+ }
727
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
728
+ });
729
+ }
730
+ unlinkServiceAppointmentFiles(fileId, linkedServiceAppointmentIds) {
731
+ return __awaiter(this, void 0, void 0, function* () {
732
+ const associationDtos = [];
733
+ for (const pk of linkedServiceAppointmentIds) {
734
+ associationDtos.push({
735
+ primaryKey: fileId,
736
+ linkedRecordPrimaryKey: pk,
737
+ });
738
+ }
739
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
740
+ });
741
+ }
742
+ // Use this function when you want to return a single record
743
+ getBillingAdjustments(fileId) {
744
+ return __awaiter(this, void 0, void 0, function* () {
745
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BillingAdjustment');
746
+ });
747
+ }
748
+ linkBillingAdjustmentFiles(fileId, billingAdjustmentIds) {
749
+ return __awaiter(this, void 0, void 0, function* () {
750
+ const associationDtos = [];
751
+ for (const param of billingAdjustmentIds) {
752
+ associationDtos.push({
753
+ entity: 'OrderModule:BillingAdjustment',
754
+ recordId: param.id,
755
+ linkType: 'BillingAdjustment__File',
756
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
757
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
758
+ });
759
+ }
760
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
761
+ });
762
+ }
763
+ unlinkBillingAdjustmentFiles(fileId, linkedBillingAdjustmentIds) {
764
+ return __awaiter(this, void 0, void 0, function* () {
765
+ const associationDtos = [];
766
+ for (const pk of linkedBillingAdjustmentIds) {
767
+ associationDtos.push({
768
+ primaryKey: fileId,
769
+ linkedRecordPrimaryKey: pk,
770
+ });
771
+ }
772
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
773
+ });
774
+ }
775
+ // Use this function when you want to return a single record
776
+ getActivitys(fileId) {
777
+ return __awaiter(this, void 0, void 0, function* () {
778
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Activity');
779
+ });
780
+ }
781
+ linkActivityFiles(fileId, activityIds) {
782
+ return __awaiter(this, void 0, void 0, function* () {
783
+ const associationDtos = [];
784
+ for (const param of activityIds) {
785
+ associationDtos.push({
786
+ entity: 'SchemaModule:Activity',
787
+ recordId: param.id,
788
+ linkType: 'Activity__File',
789
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
790
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
791
+ });
792
+ }
793
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
794
+ });
795
+ }
796
+ unlinkActivityFiles(fileId, linkedActivityIds) {
797
+ return __awaiter(this, void 0, void 0, function* () {
798
+ const associationDtos = [];
799
+ for (const pk of linkedActivityIds) {
800
+ associationDtos.push({
801
+ primaryKey: fileId,
802
+ linkedRecordPrimaryKey: pk,
803
+ });
804
+ }
805
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
806
+ });
807
+ }
808
+ // Use this function when you want to return a single record
809
+ getNetomniaInstallVerifications(fileId) {
810
+ return __awaiter(this, void 0, void 0, function* () {
811
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaInstallVerification');
812
+ });
813
+ }
814
+ linkNetomniaInstallVerificationFiles(fileId, netomniaInstallVerificationIds) {
815
+ return __awaiter(this, void 0, void 0, function* () {
816
+ const associationDtos = [];
817
+ for (const param of netomniaInstallVerificationIds) {
818
+ associationDtos.push({
819
+ entity: 'FieldServiceModule:NetomniaInstallVerification',
820
+ recordId: param.id,
821
+ linkType: 'NetomniaInstallVerification__File',
822
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
823
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
824
+ });
825
+ }
826
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
827
+ });
828
+ }
829
+ unlinkNetomniaInstallVerificationFiles(fileId, linkedNetomniaInstallVerificationIds) {
830
+ return __awaiter(this, void 0, void 0, function* () {
831
+ const associationDtos = [];
832
+ for (const pk of linkedNetomniaInstallVerificationIds) {
833
+ associationDtos.push({
834
+ primaryKey: fileId,
835
+ linkedRecordPrimaryKey: pk,
836
+ });
837
+ }
838
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
839
+ });
840
+ }
841
+ // Use this function when you want to return a single record
842
+ getNetomniaFtthServiceVisitSheets(fileId) {
843
+ return __awaiter(this, void 0, void 0, function* () {
844
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtthServiceVisitSheet');
845
+ });
846
+ }
847
+ linkNetomniaFtthServiceVisitSheetFiles(fileId, netomniaFtthServiceVisitSheetIds) {
848
+ return __awaiter(this, void 0, void 0, function* () {
849
+ const associationDtos = [];
850
+ for (const param of netomniaFtthServiceVisitSheetIds) {
851
+ associationDtos.push({
852
+ entity: 'FieldServiceModule:NetomniaFtthServiceVisitSheet',
853
+ recordId: param.id,
854
+ linkType: 'NetomniaFtthServiceVisitSheet__File',
855
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
856
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
857
+ });
858
+ }
859
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
860
+ });
861
+ }
862
+ unlinkNetomniaFtthServiceVisitSheetFiles(fileId, linkedNetomniaFtthServiceVisitSheetIds) {
863
+ return __awaiter(this, void 0, void 0, function* () {
864
+ const associationDtos = [];
865
+ for (const pk of linkedNetomniaFtthServiceVisitSheetIds) {
866
+ associationDtos.push({
867
+ primaryKey: fileId,
868
+ linkedRecordPrimaryKey: pk,
869
+ });
870
+ }
871
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
872
+ });
873
+ }
874
+ // Use this function when you want to return a single record
875
+ getNetomniaFtth1StageInstallAudits(fileId) {
876
+ return __awaiter(this, void 0, void 0, function* () {
877
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtth1StageInstallAudit');
878
+ });
879
+ }
880
+ linkNetomniaFtth1StageInstallAuditFiles(fileId, netomniaFtth1StageInstallAuditIds) {
881
+ return __awaiter(this, void 0, void 0, function* () {
882
+ const associationDtos = [];
883
+ for (const param of netomniaFtth1StageInstallAuditIds) {
884
+ associationDtos.push({
885
+ entity: 'FieldServiceModule:NetomniaFtth1StageInstallAudit',
886
+ recordId: param.id,
887
+ linkType: 'NetomniaFtth1StageInstallAudit__File',
888
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
889
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
890
+ });
891
+ }
892
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
893
+ });
894
+ }
895
+ unlinkNetomniaFtth1StageInstallAuditFiles(fileId, linkedNetomniaFtth1StageInstallAuditIds) {
896
+ return __awaiter(this, void 0, void 0, function* () {
897
+ const associationDtos = [];
898
+ for (const pk of linkedNetomniaFtth1StageInstallAuditIds) {
899
+ associationDtos.push({
900
+ primaryKey: fileId,
901
+ linkedRecordPrimaryKey: pk,
902
+ });
903
+ }
904
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
905
+ });
906
+ }
907
+ // Use this function when you want to return a single record
908
+ getCustomerDeviceRouters(fileId) {
909
+ return __awaiter(this, void 0, void 0, function* () {
910
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'CustomerDeviceRouter');
911
+ });
912
+ }
913
+ linkCustomerDeviceRouterFiles(fileId, customerDeviceRouterIds) {
914
+ return __awaiter(this, void 0, void 0, function* () {
915
+ const associationDtos = [];
916
+ for (const param of customerDeviceRouterIds) {
917
+ associationDtos.push({
918
+ entity: 'ServiceModule:CustomerDeviceRouter',
919
+ recordId: param.id,
920
+ linkType: 'CustomerDeviceRouter__File',
921
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
922
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
923
+ });
924
+ }
925
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
926
+ });
927
+ }
928
+ unlinkCustomerDeviceRouterFiles(fileId, linkedCustomerDeviceRouterIds) {
929
+ return __awaiter(this, void 0, void 0, function* () {
930
+ const associationDtos = [];
931
+ for (const pk of linkedCustomerDeviceRouterIds) {
932
+ associationDtos.push({
933
+ primaryKey: fileId,
934
+ linkedRecordPrimaryKey: pk,
935
+ });
936
+ }
937
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
938
+ });
939
+ }
940
+ // Use this function when you want to return a single record
941
+ getVisits(fileId) {
942
+ return __awaiter(this, void 0, void 0, function* () {
943
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Visit');
944
+ });
945
+ }
946
+ linkVisitFiles(fileId, visitIds) {
947
+ return __awaiter(this, void 0, void 0, function* () {
948
+ const associationDtos = [];
949
+ for (const param of visitIds) {
950
+ associationDtos.push({
951
+ entity: 'CrmModule:Visit',
952
+ recordId: param.id,
953
+ linkType: 'Visit__File',
954
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
955
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
956
+ });
957
+ }
958
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
959
+ });
960
+ }
961
+ unlinkVisitFiles(fileId, linkedVisitIds) {
962
+ return __awaiter(this, void 0, void 0, function* () {
963
+ const associationDtos = [];
964
+ for (const pk of linkedVisitIds) {
965
+ associationDtos.push({
966
+ primaryKey: fileId,
967
+ linkedRecordPrimaryKey: pk,
968
+ });
969
+ }
970
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
971
+ });
972
+ }
973
+ // Use this function when you want to return a single record
974
+ getNetomniaFtth2StageInstallAudits(fileId) {
975
+ return __awaiter(this, void 0, void 0, function* () {
976
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'NetomniaFtth2StageInstallAudit');
977
+ });
978
+ }
979
+ linkNetomniaFtth2StageInstallAuditFiles(fileId, netomniaFtth2StageInstallAuditIds) {
980
+ return __awaiter(this, void 0, void 0, function* () {
981
+ const associationDtos = [];
982
+ for (const param of netomniaFtth2StageInstallAuditIds) {
983
+ associationDtos.push({
984
+ entity: 'FieldServiceModule:NetomniaFtth2StageInstallAudit',
985
+ recordId: param.id,
986
+ linkType: 'NetomniaFtth2StageInstallAudit__File',
987
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
988
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
989
+ });
990
+ }
991
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
992
+ });
993
+ }
994
+ unlinkNetomniaFtth2StageInstallAuditFiles(fileId, linkedNetomniaFtth2StageInstallAuditIds) {
995
+ return __awaiter(this, void 0, void 0, function* () {
996
+ const associationDtos = [];
997
+ for (const pk of linkedNetomniaFtth2StageInstallAuditIds) {
998
+ associationDtos.push({
999
+ primaryKey: fileId,
1000
+ linkedRecordPrimaryKey: pk,
1001
+ });
1002
+ }
1003
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1004
+ });
1005
+ }
1006
+ // Use this function when you want to return a single record
1007
+ getYfStockCounts(fileId) {
1008
+ return __awaiter(this, void 0, void 0, function* () {
1009
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfStockCount');
1010
+ });
1011
+ }
1012
+ linkYfStockCountFiles(fileId, yfStockCountIds) {
1013
+ return __awaiter(this, void 0, void 0, function* () {
1014
+ const associationDtos = [];
1015
+ for (const param of yfStockCountIds) {
1016
+ associationDtos.push({
1017
+ entity: 'FieldServiceModule:YfStockCount',
1018
+ recordId: param.id,
1019
+ linkType: 'YfStockCount__File',
1020
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1021
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1022
+ });
1023
+ }
1024
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1025
+ });
1026
+ }
1027
+ unlinkYfStockCountFiles(fileId, linkedYfStockCountIds) {
1028
+ return __awaiter(this, void 0, void 0, function* () {
1029
+ const associationDtos = [];
1030
+ for (const pk of linkedYfStockCountIds) {
1031
+ associationDtos.push({
1032
+ primaryKey: fileId,
1033
+ linkedRecordPrimaryKey: pk,
1034
+ });
1035
+ }
1036
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1037
+ });
1038
+ }
1039
+ // Use this function when you want to return a single record
1040
+ getYfEquipmentCollections(fileId) {
1041
+ return __awaiter(this, void 0, void 0, function* () {
1042
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfEquipmentCollection');
1043
+ });
1044
+ }
1045
+ linkYfEquipmentCollectionFiles(fileId, yfEquipmentCollectionIds) {
1046
+ return __awaiter(this, void 0, void 0, function* () {
1047
+ const associationDtos = [];
1048
+ for (const param of yfEquipmentCollectionIds) {
1049
+ associationDtos.push({
1050
+ entity: 'FieldServiceModule:YfEquipmentCollection',
1051
+ recordId: param.id,
1052
+ linkType: 'YfEquipmentCollection__File',
1053
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1054
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1055
+ });
1056
+ }
1057
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1058
+ });
1059
+ }
1060
+ unlinkYfEquipmentCollectionFiles(fileId, linkedYfEquipmentCollectionIds) {
1061
+ return __awaiter(this, void 0, void 0, function* () {
1062
+ const associationDtos = [];
1063
+ for (const pk of linkedYfEquipmentCollectionIds) {
1064
+ associationDtos.push({
1065
+ primaryKey: fileId,
1066
+ linkedRecordPrimaryKey: pk,
1067
+ });
1068
+ }
1069
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1070
+ });
1071
+ }
1072
+ // Use this function when you want to return a single record
1073
+ getYfFieldServiceVisits(fileId) {
1074
+ return __awaiter(this, void 0, void 0, function* () {
1075
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'YfFieldServiceVisit');
1076
+ });
1077
+ }
1078
+ linkYfFieldServiceVisitFiles(fileId, yfFieldServiceVisitIds) {
1079
+ return __awaiter(this, void 0, void 0, function* () {
1080
+ const associationDtos = [];
1081
+ for (const param of yfFieldServiceVisitIds) {
1082
+ associationDtos.push({
1083
+ entity: 'FieldServiceModule:YfFieldServiceVisit',
1084
+ recordId: param.id,
1085
+ linkType: 'YfFieldServiceVisit__File',
1086
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1087
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1088
+ });
1089
+ }
1090
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1091
+ });
1092
+ }
1093
+ unlinkYfFieldServiceVisitFiles(fileId, linkedYfFieldServiceVisitIds) {
1094
+ return __awaiter(this, void 0, void 0, function* () {
1095
+ const associationDtos = [];
1096
+ for (const pk of linkedYfFieldServiceVisitIds) {
1097
+ associationDtos.push({
1098
+ primaryKey: fileId,
1099
+ linkedRecordPrimaryKey: pk,
1100
+ });
1101
+ }
1102
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1103
+ });
1104
+ }
1105
+ // Use this function when you want to return a single record
1106
+ getRemediationRequiredReasons(fileId) {
1107
+ return __awaiter(this, void 0, void 0, function* () {
1108
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'RemediationRequiredReason');
1109
+ });
1110
+ }
1111
+ linkRemediationRequiredReasonFiles(fileId, remediationRequiredReasonIds) {
1112
+ return __awaiter(this, void 0, void 0, function* () {
1113
+ const associationDtos = [];
1114
+ for (const param of remediationRequiredReasonIds) {
1115
+ associationDtos.push({
1116
+ entity: 'FieldServiceModule:RemediationRequiredReason',
1117
+ recordId: param.id,
1118
+ linkType: 'RemediationRequiredReason__File',
1119
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1120
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1121
+ });
1122
+ }
1123
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1124
+ });
1125
+ }
1126
+ unlinkRemediationRequiredReasonFiles(fileId, linkedRemediationRequiredReasonIds) {
1127
+ return __awaiter(this, void 0, void 0, function* () {
1128
+ const associationDtos = [];
1129
+ for (const pk of linkedRemediationRequiredReasonIds) {
1130
+ associationDtos.push({
1131
+ primaryKey: fileId,
1132
+ linkedRecordPrimaryKey: pk,
1133
+ });
1134
+ }
1135
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1136
+ });
1137
+ }
1138
+ // Use this function when you want to return a single record
1139
+ getInvoices(fileId) {
1140
+ return __awaiter(this, void 0, void 0, function* () {
1141
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Invoice');
1142
+ });
1143
+ }
1144
+ linkInvoiceFiles(fileId, invoiceIds) {
1145
+ return __awaiter(this, void 0, void 0, function* () {
1146
+ const associationDtos = [];
1147
+ for (const param of invoiceIds) {
1148
+ associationDtos.push({
1149
+ entity: 'BillingModule:Invoice',
1150
+ recordId: param.id,
1151
+ linkType: 'Invoice__File',
1152
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1153
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1154
+ });
1155
+ }
1156
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1157
+ });
1158
+ }
1159
+ unlinkInvoiceFiles(fileId, linkedInvoiceIds) {
1160
+ return __awaiter(this, void 0, void 0, function* () {
1161
+ const associationDtos = [];
1162
+ for (const pk of linkedInvoiceIds) {
1163
+ associationDtos.push({
1164
+ primaryKey: fileId,
1165
+ linkedRecordPrimaryKey: pk,
1166
+ });
1167
+ }
1168
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1169
+ });
1170
+ }
1171
+ // Use this function when you want to return a single record
1172
+ getFingerprints(fileId) {
1173
+ return __awaiter(this, void 0, void 0, function* () {
1174
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'Fingerprint');
1175
+ });
1176
+ }
1177
+ linkFingerprintFiles(fileId, fingerprintIds) {
1178
+ return __awaiter(this, void 0, void 0, function* () {
1179
+ const associationDtos = [];
1180
+ for (const param of fingerprintIds) {
1181
+ associationDtos.push({
1182
+ entity: 'CrmModule:Fingerprint',
1183
+ recordId: param.id,
1184
+ linkType: 'Fingerprint__File',
1185
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1186
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1187
+ });
1188
+ }
1189
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1190
+ });
1191
+ }
1192
+ unlinkFingerprintFiles(fileId, linkedFingerprintIds) {
1193
+ return __awaiter(this, void 0, void 0, function* () {
1194
+ const associationDtos = [];
1195
+ for (const pk of linkedFingerprintIds) {
1196
+ associationDtos.push({
1197
+ primaryKey: fileId,
1198
+ linkedRecordPrimaryKey: pk,
1199
+ });
1200
+ }
1201
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1202
+ });
1203
+ }
1204
+ linkNoteFiles(fileId, noteIds) {
1205
+ return __awaiter(this, void 0, void 0, function* () {
1206
+ const associationDtos = [];
1207
+ for (const param of noteIds) {
1208
+ associationDtos.push({
1209
+ entity: 'SupportModule:Note',
1210
+ recordId: param.id,
1211
+ linkType: 'Note__File',
1212
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1213
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1214
+ });
1215
+ }
1216
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1217
+ });
1218
+ }
1219
+ unlinkNoteFiles(fileId, linkedNoteIds) {
1220
+ return __awaiter(this, void 0, void 0, function* () {
1221
+ const associationDtos = [];
1222
+ for (const pk of linkedNoteIds) {
1223
+ associationDtos.push({
1224
+ primaryKey: fileId,
1225
+ linkedRecordPrimaryKey: pk,
1226
+ });
1227
+ }
1228
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1229
+ });
1230
+ }
1231
+ // Use this function when you want to return a single record
1232
+ getSweeperMaintenanceAudits(fileId) {
1233
+ return __awaiter(this, void 0, void 0, function* () {
1234
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'SweeperMaintenanceAudit');
1235
+ });
1236
+ }
1237
+ linkSweeperMaintenanceAuditFiles(fileId, sweeperMaintenanceAuditIds) {
1238
+ return __awaiter(this, void 0, void 0, function* () {
1239
+ const associationDtos = [];
1240
+ for (const param of sweeperMaintenanceAuditIds) {
1241
+ associationDtos.push({
1242
+ entity: 'FieldServiceModule:SweeperMaintenanceAudit',
1243
+ recordId: param.id,
1244
+ linkType: 'SweeperMaintenanceAudit__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
+ unlinkSweeperMaintenanceAuditFiles(fileId, linkedSweeperMaintenanceAuditIds) {
1253
+ return __awaiter(this, void 0, void 0, function* () {
1254
+ const associationDtos = [];
1255
+ for (const pk of linkedSweeperMaintenanceAuditIds) {
1256
+ associationDtos.push({
1257
+ primaryKey: fileId,
1258
+ linkedRecordPrimaryKey: pk,
1259
+ });
1260
+ }
1261
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1262
+ });
1263
+ }
1264
+ // Use this function when you want to return a single record
1265
+ getBlockageReportA55s(fileId) {
1266
+ return __awaiter(this, void 0, void 0, function* () {
1267
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BlockageReportA55');
1268
+ });
1269
+ }
1270
+ linkBlockageReportA55Files(fileId, blockageReportA55Ids) {
1271
+ return __awaiter(this, void 0, void 0, function* () {
1272
+ const associationDtos = [];
1273
+ for (const param of blockageReportA55Ids) {
1274
+ associationDtos.push({
1275
+ entity: 'FieldServiceModule:BlockageReportA55',
1276
+ recordId: param.id,
1277
+ linkType: 'BlockageReportA55__File',
1278
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1279
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1280
+ });
1281
+ }
1282
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1283
+ });
1284
+ }
1285
+ unlinkBlockageReportA55Files(fileId, linkedBlockageReportA55Ids) {
1286
+ return __awaiter(this, void 0, void 0, function* () {
1287
+ const associationDtos = [];
1288
+ for (const pk of linkedBlockageReportA55Ids) {
1289
+ associationDtos.push({
1290
+ primaryKey: fileId,
1291
+ linkedRecordPrimaryKey: pk,
1292
+ });
1293
+ }
1294
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1295
+ });
1296
+ }
1297
+ // Use this function when you want to return a single record
1298
+ getUgInstallationAudits(fileId) {
1299
+ return __awaiter(this, void 0, void 0, function* () {
1300
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgInstallationAudit');
1301
+ });
1302
+ }
1303
+ linkUgInstallationAuditFiles(fileId, ugInstallationAuditIds) {
1304
+ return __awaiter(this, void 0, void 0, function* () {
1305
+ const associationDtos = [];
1306
+ for (const param of ugInstallationAuditIds) {
1307
+ associationDtos.push({
1308
+ entity: 'FieldServiceModule:UgInstallationAudit',
1309
+ recordId: param.id,
1310
+ linkType: 'UgInstallationAudit__File',
1311
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1312
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1313
+ });
1314
+ }
1315
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1316
+ });
1317
+ }
1318
+ unlinkUgInstallationAuditFiles(fileId, linkedUgInstallationAuditIds) {
1319
+ return __awaiter(this, void 0, void 0, function* () {
1320
+ const associationDtos = [];
1321
+ for (const pk of linkedUgInstallationAuditIds) {
1322
+ associationDtos.push({
1323
+ primaryKey: fileId,
1324
+ linkedRecordPrimaryKey: pk,
1325
+ });
1326
+ }
1327
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1328
+ });
1329
+ }
1330
+ // Use this function when you want to return a single record
1331
+ getOhInstallationAudits(fileId) {
1332
+ return __awaiter(this, void 0, void 0, function* () {
1333
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhInstallationAudit');
1334
+ });
1335
+ }
1336
+ linkOhInstallationAuditFiles(fileId, ohInstallationAuditIds) {
1337
+ return __awaiter(this, void 0, void 0, function* () {
1338
+ const associationDtos = [];
1339
+ for (const param of ohInstallationAuditIds) {
1340
+ associationDtos.push({
1341
+ entity: 'FieldServiceModule:OhInstallationAudit',
1342
+ recordId: param.id,
1343
+ linkType: 'OhInstallationAudit__File',
1344
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1345
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1346
+ });
1347
+ }
1348
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1349
+ });
1350
+ }
1351
+ unlinkOhInstallationAuditFiles(fileId, linkedOhInstallationAuditIds) {
1352
+ return __awaiter(this, void 0, void 0, function* () {
1353
+ const associationDtos = [];
1354
+ for (const pk of linkedOhInstallationAuditIds) {
1355
+ associationDtos.push({
1356
+ primaryKey: fileId,
1357
+ linkedRecordPrimaryKey: pk,
1358
+ });
1359
+ }
1360
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1361
+ });
1362
+ }
1363
+ // Use this function when you want to return a single record
1364
+ getServiceVisitAudits(fileId) {
1365
+ return __awaiter(this, void 0, void 0, function* () {
1366
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'ServiceVisitAudit');
1367
+ });
1368
+ }
1369
+ linkServiceVisitAuditFiles(fileId, serviceVisitAuditIds) {
1370
+ return __awaiter(this, void 0, void 0, function* () {
1371
+ const associationDtos = [];
1372
+ for (const param of serviceVisitAuditIds) {
1373
+ associationDtos.push({
1374
+ entity: 'FieldServiceModule:ServiceVisitAudit',
1375
+ recordId: param.id,
1376
+ linkType: 'ServiceVisitAudit__File',
1377
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1378
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1379
+ });
1380
+ }
1381
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1382
+ });
1383
+ }
1384
+ unlinkServiceVisitAuditFiles(fileId, linkedServiceVisitAuditIds) {
1385
+ return __awaiter(this, void 0, void 0, function* () {
1386
+ const associationDtos = [];
1387
+ for (const pk of linkedServiceVisitAuditIds) {
1388
+ associationDtos.push({
1389
+ primaryKey: fileId,
1390
+ linkedRecordPrimaryKey: pk,
1391
+ });
1392
+ }
1393
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1394
+ });
1395
+ }
1396
+ // Use this function when you want to return a single record
1397
+ getOhAuditOfInstallations(fileId) {
1398
+ return __awaiter(this, void 0, void 0, function* () {
1399
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhAuditOfInstallation');
1400
+ });
1401
+ }
1402
+ linkOhAuditOfInstallationFiles(fileId, ohAuditOfInstallationIds) {
1403
+ return __awaiter(this, void 0, void 0, function* () {
1404
+ const associationDtos = [];
1405
+ for (const param of ohAuditOfInstallationIds) {
1406
+ associationDtos.push({
1407
+ entity: 'FieldServiceModule:OhAuditOfInstallation',
1408
+ recordId: param.id,
1409
+ linkType: 'OhAuditOfInstallation__File',
1410
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1411
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1412
+ });
1413
+ }
1414
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1415
+ });
1416
+ }
1417
+ unlinkOhAuditOfInstallationFiles(fileId, linkedOhAuditOfInstallationIds) {
1418
+ return __awaiter(this, void 0, void 0, function* () {
1419
+ const associationDtos = [];
1420
+ for (const pk of linkedOhAuditOfInstallationIds) {
1421
+ associationDtos.push({
1422
+ primaryKey: fileId,
1423
+ linkedRecordPrimaryKey: pk,
1424
+ });
1425
+ }
1426
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1427
+ });
1428
+ }
1429
+ // Use this function when you want to return a single record
1430
+ getUgAuditOfInstallations(fileId) {
1431
+ return __awaiter(this, void 0, void 0, function* () {
1432
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgAuditOfInstallation');
1433
+ });
1434
+ }
1435
+ linkUgAuditOfInstallationFiles(fileId, ugAuditOfInstallationIds) {
1436
+ return __awaiter(this, void 0, void 0, function* () {
1437
+ const associationDtos = [];
1438
+ for (const param of ugAuditOfInstallationIds) {
1439
+ associationDtos.push({
1440
+ entity: 'FieldServiceModule:UgAuditOfInstallation',
1441
+ recordId: param.id,
1442
+ linkType: 'UgAuditOfInstallation__File',
1443
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1444
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1445
+ });
1446
+ }
1447
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1448
+ });
1449
+ }
1450
+ unlinkUgAuditOfInstallationFiles(fileId, linkedUgAuditOfInstallationIds) {
1451
+ return __awaiter(this, void 0, void 0, function* () {
1452
+ const associationDtos = [];
1453
+ for (const pk of linkedUgAuditOfInstallationIds) {
1454
+ associationDtos.push({
1455
+ primaryKey: fileId,
1456
+ linkedRecordPrimaryKey: pk,
1457
+ });
1458
+ }
1459
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1460
+ });
1461
+ }
1462
+ // Use this function when you want to return a single record
1463
+ getUgRetroAudits(fileId) {
1464
+ return __awaiter(this, void 0, void 0, function* () {
1465
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgRetroAudit');
1466
+ });
1467
+ }
1468
+ linkUgRetroAuditFiles(fileId, ugRetroAuditIds) {
1469
+ return __awaiter(this, void 0, void 0, function* () {
1470
+ const associationDtos = [];
1471
+ for (const param of ugRetroAuditIds) {
1472
+ associationDtos.push({
1473
+ entity: 'FieldServiceModule:UgRetroAudit',
1474
+ recordId: param.id,
1475
+ linkType: 'UgRetroAudit__File',
1476
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1477
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1478
+ });
1479
+ }
1480
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1481
+ });
1482
+ }
1483
+ unlinkUgRetroAuditFiles(fileId, linkedUgRetroAuditIds) {
1484
+ return __awaiter(this, void 0, void 0, function* () {
1485
+ const associationDtos = [];
1486
+ for (const pk of linkedUgRetroAuditIds) {
1487
+ associationDtos.push({
1488
+ primaryKey: fileId,
1489
+ linkedRecordPrimaryKey: pk,
1490
+ });
1491
+ }
1492
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1493
+ });
1494
+ }
1495
+ // Use this function when you want to return a single record
1496
+ getOhRetroAudits(fileId) {
1497
+ return __awaiter(this, void 0, void 0, function* () {
1498
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhRetroAudit');
1499
+ });
1500
+ }
1501
+ linkOhRetroAuditFiles(fileId, ohRetroAuditIds) {
1502
+ return __awaiter(this, void 0, void 0, function* () {
1503
+ const associationDtos = [];
1504
+ for (const param of ohRetroAuditIds) {
1505
+ associationDtos.push({
1506
+ entity: 'FieldServiceModule:OhRetroAudit',
1507
+ recordId: param.id,
1508
+ linkType: 'OhRetroAudit__File',
1509
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1510
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1511
+ });
1512
+ }
1513
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1514
+ });
1515
+ }
1516
+ unlinkOhRetroAuditFiles(fileId, linkedOhRetroAuditIds) {
1517
+ return __awaiter(this, void 0, void 0, function* () {
1518
+ const associationDtos = [];
1519
+ for (const pk of linkedOhRetroAuditIds) {
1520
+ associationDtos.push({
1521
+ primaryKey: fileId,
1522
+ linkedRecordPrimaryKey: pk,
1523
+ });
1524
+ }
1525
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1526
+ });
1527
+ }
1528
+ // Use this function when you want to return a single record
1529
+ getRemediationOutcomeForms(fileId) {
1530
+ return __awaiter(this, void 0, void 0, function* () {
1531
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'RemediationOutcomeForm');
1532
+ });
1533
+ }
1534
+ linkRemediationOutcomeFormFiles(fileId, remediationOutcomeFormIds) {
1535
+ return __awaiter(this, void 0, void 0, function* () {
1536
+ const associationDtos = [];
1537
+ for (const param of remediationOutcomeFormIds) {
1538
+ associationDtos.push({
1539
+ entity: 'FieldServiceModule:RemediationOutcomeForm',
1540
+ recordId: param.id,
1541
+ linkType: 'RemediationOutcomeForm_File',
1542
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1543
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1544
+ });
1545
+ }
1546
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1547
+ });
1548
+ }
1549
+ unlinkRemediationOutcomeFormFiles(fileId, linkedRemediationOutcomeFormIds) {
1550
+ return __awaiter(this, void 0, void 0, function* () {
1551
+ const associationDtos = [];
1552
+ for (const pk of linkedRemediationOutcomeFormIds) {
1553
+ associationDtos.push({
1554
+ primaryKey: fileId,
1555
+ linkedRecordPrimaryKey: pk,
1556
+ });
1557
+ }
1558
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1559
+ });
1560
+ }
1561
+ // Use this function when you want to return a single record
1562
+ getUgInProgressAudits(fileId) {
1563
+ return __awaiter(this, void 0, void 0, function* () {
1564
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'UgInProgressAudit');
1565
+ });
1566
+ }
1567
+ linkUgInProgressAuditFiles(fileId, ugInProgressAuditIds) {
1568
+ return __awaiter(this, void 0, void 0, function* () {
1569
+ const associationDtos = [];
1570
+ for (const param of ugInProgressAuditIds) {
1571
+ associationDtos.push({
1572
+ entity: 'FieldServiceModule:UgInProgressAudit',
1573
+ recordId: param.id,
1574
+ linkType: 'UgInProgressAudit_File',
1575
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1576
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1577
+ });
1578
+ }
1579
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1580
+ });
1581
+ }
1582
+ unlinkUgInProgressAuditFiles(fileId, linkedUgInProgressAuditIds) {
1583
+ return __awaiter(this, void 0, void 0, function* () {
1584
+ const associationDtos = [];
1585
+ for (const pk of linkedUgInProgressAuditIds) {
1586
+ associationDtos.push({
1587
+ primaryKey: fileId,
1588
+ linkedRecordPrimaryKey: pk,
1589
+ });
1590
+ }
1591
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1592
+ });
1593
+ }
1594
+ // Use this function when you want to return a single record
1595
+ getOhInProgressAudits(fileId) {
1596
+ return __awaiter(this, void 0, void 0, function* () {
1597
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhInProgressAudit');
1598
+ });
1599
+ }
1600
+ linkOhInProgressAuditFiles(fileId, ohInProgressAuditIds) {
1601
+ return __awaiter(this, void 0, void 0, function* () {
1602
+ const associationDtos = [];
1603
+ for (const param of ohInProgressAuditIds) {
1604
+ associationDtos.push({
1605
+ entity: 'FieldServiceModule:OhInProgressAudit',
1606
+ recordId: param.id,
1607
+ linkType: 'OhInProgressAudit_File',
1608
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1609
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1610
+ });
1611
+ }
1612
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1613
+ });
1614
+ }
1615
+ unlinkOhInProgressAuditFiles(fileId, linkedOhInProgressAuditIds) {
1616
+ return __awaiter(this, void 0, void 0, function* () {
1617
+ const associationDtos = [];
1618
+ for (const pk of linkedOhInProgressAuditIds) {
1619
+ associationDtos.push({
1620
+ primaryKey: fileId,
1621
+ linkedRecordPrimaryKey: pk,
1622
+ });
1623
+ }
1624
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1625
+ });
1626
+ }
1627
+ // Use this function when you want to return a single record
1628
+ getBlockageA55s(fileId) {
1629
+ return __awaiter(this, void 0, void 0, function* () {
1630
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'BlockageA55');
1631
+ });
1632
+ }
1633
+ linkOverlayA55Files(fileId, blockageA55Ids) {
1634
+ return __awaiter(this, void 0, void 0, function* () {
1635
+ const associationDtos = [];
1636
+ for (const param of blockageA55Ids) {
1637
+ associationDtos.push({
1638
+ entity: 'FieldServiceModule:BlockageA55',
1639
+ recordId: param.id,
1640
+ linkType: 'OverlayA55_File',
1641
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1642
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1643
+ });
1644
+ }
1645
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1646
+ });
1647
+ }
1648
+ unlinkOverlayA55Files(fileId, linkedBlockageA55Ids) {
1649
+ return __awaiter(this, void 0, void 0, function* () {
1650
+ const associationDtos = [];
1651
+ for (const pk of linkedBlockageA55Ids) {
1652
+ associationDtos.push({
1653
+ primaryKey: fileId,
1654
+ linkedRecordPrimaryKey: pk,
1655
+ });
1656
+ }
1657
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1658
+ });
1659
+ }
1660
+ // Use this function when you want to return a single record
1661
+ getOverlayRealA55s(fileId) {
1662
+ return __awaiter(this, void 0, void 0, function* () {
1663
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OverlayRealA55');
1664
+ });
1665
+ }
1666
+ linkOverlayRealA55Files(fileId, overlayRealA55Ids) {
1667
+ return __awaiter(this, void 0, void 0, function* () {
1668
+ const associationDtos = [];
1669
+ for (const param of overlayRealA55Ids) {
1670
+ associationDtos.push({
1671
+ entity: 'FieldServiceModule:OverlayRealA55',
1672
+ recordId: param.id,
1673
+ linkType: 'OverlayRealA55_File',
1674
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1675
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1676
+ });
1677
+ }
1678
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1679
+ });
1680
+ }
1681
+ unlinkOverlayRealA55Files(fileId, linkedOverlayRealA55Ids) {
1682
+ return __awaiter(this, void 0, void 0, function* () {
1683
+ const associationDtos = [];
1684
+ for (const pk of linkedOverlayRealA55Ids) {
1685
+ associationDtos.push({
1686
+ primaryKey: fileId,
1687
+ linkedRecordPrimaryKey: pk,
1688
+ });
1689
+ }
1690
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1691
+ });
1692
+ }
1693
+ // Use this function when you want to return a single record
1694
+ getOhExternalAudits(fileId) {
1695
+ return __awaiter(this, void 0, void 0, function* () {
1696
+ return yield this._getLinks(this.moduleName, this.entityName, fileId, 'OhExternalAudit');
1697
+ });
1698
+ }
1699
+ linkOhExternalAuditFiles(fileId, ohExternalAuditIds) {
1700
+ return __awaiter(this, void 0, void 0, function* () {
1701
+ const associationDtos = [];
1702
+ for (const param of ohExternalAuditIds) {
1703
+ associationDtos.push({
1704
+ entity: 'FieldServiceModule:OhExternalAudit',
1705
+ recordId: param.id,
1706
+ linkType: 'OhExternalAudit_File',
1707
+ relationType: param === null || param === void 0 ? void 0 : param.relationType,
1708
+ relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
1709
+ });
1710
+ }
1711
+ return yield this._createLinks(this.moduleName, this.entityName, fileId, associationDtos);
1712
+ });
1713
+ }
1714
+ unlinkOhExternalAuditFiles(fileId, linkedOhExternalAuditIds) {
1715
+ return __awaiter(this, void 0, void 0, function* () {
1716
+ const associationDtos = [];
1717
+ for (const pk of linkedOhExternalAuditIds) {
1718
+ associationDtos.push({
1719
+ primaryKey: fileId,
1720
+ linkedRecordPrimaryKey: pk,
1721
+ });
1722
+ }
1723
+ return yield this._deleteLinks(this.moduleName, this.entityName, fileId, associationDtos);
1724
+ });
1725
+ }
148
1726
  }
149
1727
  exports.FileDb = FileDb;