@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.
- package/dist/api-sdk-v1/BillingRequestApi.d.ts +0 -7
- package/dist/api-sdk-v1/BillingRequestApi.js +0 -26
- package/dist/api-sdk-v1/CaseApi.d.ts +0 -7
- package/dist/api-sdk-v1/CaseApi.js +0 -26
- package/dist/api-sdk-v1/ConsumptionRateApi.d.ts +0 -7
- package/dist/api-sdk-v1/ConsumptionRateApi.js +0 -26
- package/dist/api-sdk-v1/ConsumptionScheduleApi.d.ts +0 -7
- package/dist/api-sdk-v1/ConsumptionScheduleApi.js +0 -26
- package/dist/api-sdk-v1/ContactApi.d.ts +87 -3
- package/dist/api-sdk-v1/ContactApi.js +319 -7
- package/dist/api-sdk-v1/ContactIdentityApi.d.ts +0 -7
- package/dist/api-sdk-v1/ContactIdentityApi.js +0 -26
- package/dist/api-sdk-v1/FileApi.d.ts +338 -3
- package/dist/api-sdk-v1/FileApi.js +1249 -7
- package/dist/api-sdk-v1/InvoiceItemApi.d.ts +0 -7
- package/dist/api-sdk-v1/InvoiceItemApi.js +0 -26
- package/dist/api-sdk-v1/LeadApi.d.ts +24 -3
- package/dist/api-sdk-v1/LeadApi.js +85 -7
- package/dist/api-sdk-v1/MilestoneApi.d.ts +0 -7
- package/dist/api-sdk-v1/MilestoneApi.js +0 -26
- package/dist/api-sdk-v1/NoteApi.d.ts +3 -4
- package/dist/api-sdk-v1/NoteApi.js +7 -13
- package/dist/api-sdk-v1/OfferApi.d.ts +0 -7
- package/dist/api-sdk-v1/OfferApi.js +0 -26
- package/dist/api-sdk-v1/OrderApi.d.ts +7 -8
- package/dist/api-sdk-v1/OrderApi.js +21 -27
- package/dist/api-sdk-v1/OrderItemApi.d.ts +0 -7
- package/dist/api-sdk-v1/OrderItemApi.js +0 -26
- package/dist/api-sdk-v1/OrganizationApi.d.ts +0 -7
- package/dist/api-sdk-v1/OrganizationApi.js +0 -26
- package/dist/api-sdk-v1/ProductApi.d.ts +1 -9
- package/dist/api-sdk-v1/ProductApi.js +0 -31
- package/dist/api-sdk-v1/ProductComponentApi.d.ts +0 -7
- package/dist/api-sdk-v1/ProductComponentApi.js +0 -26
- package/dist/api-sdk-v1/RestrictionApi.d.ts +0 -7
- package/dist/api-sdk-v1/RestrictionApi.js +0 -26
- package/dist/api-sdk-v1/ServiceApi.d.ts +0 -7
- package/dist/api-sdk-v1/ServiceApi.js +0 -26
- package/dist/api-sdk-v1/ServiceAppointmentConfigApi.d.ts +12 -0
- package/dist/api-sdk-v1/ServiceAppointmentConfigApi.js +40 -0
- package/dist/api-sdk-v1/SplitOrderApi.d.ts +2 -3
- package/dist/api-sdk-v1/SplitOrderApi.js +6 -12
- package/dist/api-sdk-v1/TransactionApi.d.ts +0 -7
- package/dist/api-sdk-v1/TransactionApi.js +0 -26
- package/dist/api-sdk-v1/UserApi.d.ts +18 -0
- package/dist/api-sdk-v1/UserApi.js +60 -0
- package/dist/api-sdk-v1/WorkOrderApi.d.ts +44 -3
- package/dist/api-sdk-v1/WorkOrderApi.js +157 -7
- package/dist/db-sdk-v1/BillingRequestDb.d.ts +0 -7
- package/dist/db-sdk-v1/BillingRequestDb.js +0 -33
- package/dist/db-sdk-v1/CaseDb.d.ts +0 -7
- package/dist/db-sdk-v1/CaseDb.js +0 -33
- package/dist/db-sdk-v1/ConsumptionRateDb.d.ts +0 -7
- package/dist/db-sdk-v1/ConsumptionRateDb.js +0 -33
- package/dist/db-sdk-v1/ConsumptionScheduleDb.d.ts +0 -7
- package/dist/db-sdk-v1/ConsumptionScheduleDb.js +0 -33
- package/dist/db-sdk-v1/ContactDb.d.ts +87 -3
- package/dist/db-sdk-v1/ContactDb.js +403 -7
- package/dist/db-sdk-v1/ContactIdentityDb.d.ts +0 -7
- package/dist/db-sdk-v1/ContactIdentityDb.js +0 -33
- package/dist/db-sdk-v1/FileDb.d.ts +338 -3
- package/dist/db-sdk-v1/FileDb.js +1585 -7
- package/dist/db-sdk-v1/InvoiceItemDb.d.ts +0 -7
- package/dist/db-sdk-v1/InvoiceItemDb.js +0 -33
- package/dist/db-sdk-v1/LeadDb.d.ts +24 -3
- package/dist/db-sdk-v1/LeadDb.js +106 -7
- package/dist/db-sdk-v1/MilestoneDb.d.ts +0 -7
- package/dist/db-sdk-v1/MilestoneDb.js +0 -33
- package/dist/db-sdk-v1/NoteDb.d.ts +3 -4
- package/dist/db-sdk-v1/NoteDb.js +7 -13
- package/dist/db-sdk-v1/OfferDb.d.ts +0 -7
- package/dist/db-sdk-v1/OfferDb.js +0 -33
- package/dist/db-sdk-v1/OrderDb.d.ts +7 -8
- package/dist/db-sdk-v1/OrderDb.js +28 -34
- package/dist/db-sdk-v1/OrderItemDb.d.ts +0 -7
- package/dist/db-sdk-v1/OrderItemDb.js +0 -33
- package/dist/db-sdk-v1/OrganizationDb.d.ts +0 -7
- package/dist/db-sdk-v1/OrganizationDb.js +0 -33
- package/dist/db-sdk-v1/ProductComponentDb.d.ts +0 -7
- package/dist/db-sdk-v1/ProductComponentDb.js +0 -33
- package/dist/db-sdk-v1/ProductDb.d.ts +1 -9
- package/dist/db-sdk-v1/ProductDb.js +0 -38
- package/dist/db-sdk-v1/RestrictionDb.d.ts +0 -7
- package/dist/db-sdk-v1/RestrictionDb.js +0 -33
- package/dist/db-sdk-v1/ServiceAppointmentConfigDb.d.ts +12 -0
- package/dist/db-sdk-v1/ServiceAppointmentConfigDb.js +54 -0
- package/dist/db-sdk-v1/ServiceDb.d.ts +0 -7
- package/dist/db-sdk-v1/ServiceDb.js +0 -33
- package/dist/db-sdk-v1/SplitOrderDb.d.ts +2 -3
- package/dist/db-sdk-v1/SplitOrderDb.js +6 -12
- package/dist/db-sdk-v1/TransactionDb.d.ts +0 -7
- package/dist/db-sdk-v1/TransactionDb.js +0 -33
- package/dist/db-sdk-v1/UserDb.d.ts +18 -0
- package/dist/db-sdk-v1/UserDb.js +81 -0
- package/dist/db-sdk-v1/WorkOrderDb.d.ts +44 -3
- package/dist/db-sdk-v1/WorkOrderDb.js +199 -7
- package/package.json +2 -2
- package/src/api-sdk-v1/BillingRequestApi.ts +0 -27
- package/src/api-sdk-v1/CaseApi.ts +0 -27
- package/src/api-sdk-v1/ConsumptionRateApi.ts +0 -27
- package/src/api-sdk-v1/ConsumptionScheduleApi.ts +0 -27
- package/src/api-sdk-v1/ContactApi.ts +343 -19
- package/src/api-sdk-v1/ContactIdentityApi.ts +0 -27
- package/src/api-sdk-v1/FileApi.ts +1310 -19
- package/src/api-sdk-v1/InvoiceItemApi.ts +0 -27
- package/src/api-sdk-v1/LeadApi.ts +100 -19
- package/src/api-sdk-v1/MilestoneApi.ts +0 -27
- package/src/api-sdk-v1/NoteApi.ts +7 -12
- package/src/api-sdk-v1/OfferApi.ts +0 -27
- package/src/api-sdk-v1/OrderApi.ts +23 -28
- package/src/api-sdk-v1/OrderItemApi.ts +0 -27
- package/src/api-sdk-v1/OrganizationApi.ts +0 -27
- package/src/api-sdk-v1/ProductApi.ts +0 -31
- package/src/api-sdk-v1/ProductComponentApi.ts +0 -27
- package/src/api-sdk-v1/RestrictionApi.ts +0 -27
- package/src/api-sdk-v1/ServiceApi.ts +0 -27
- package/src/api-sdk-v1/ServiceAppointmentConfigApi.ts +44 -0
- package/src/api-sdk-v1/SplitOrderApi.ts +17 -22
- package/src/api-sdk-v1/TransactionApi.ts +0 -27
- package/src/api-sdk-v1/UserApi.ts +66 -0
- package/src/api-sdk-v1/WorkOrderApi.ts +178 -21
- package/src/db-sdk-v1/BillingRequestDb.ts +0 -35
- package/src/db-sdk-v1/CaseDb.ts +0 -35
- package/src/db-sdk-v1/ConsumptionRateDb.ts +0 -35
- package/src/db-sdk-v1/ConsumptionScheduleDb.ts +0 -35
- package/src/db-sdk-v1/ContactDb.ts +443 -23
- package/src/db-sdk-v1/ContactIdentityDb.ts +0 -35
- package/src/db-sdk-v1/FileDb.ts +1698 -23
- package/src/db-sdk-v1/InvoiceItemDb.ts +0 -35
- package/src/db-sdk-v1/LeadDb.ts +128 -23
- package/src/db-sdk-v1/MilestoneDb.ts +0 -35
- package/src/db-sdk-v1/NoteDb.ts +7 -12
- package/src/db-sdk-v1/OfferDb.ts +0 -35
- package/src/db-sdk-v1/OrderDb.ts +31 -36
- package/src/db-sdk-v1/OrderItemDb.ts +0 -35
- package/src/db-sdk-v1/OrganizationDb.ts +0 -35
- package/src/db-sdk-v1/ProductComponentDb.ts +0 -35
- package/src/db-sdk-v1/ProductDb.ts +0 -39
- package/src/db-sdk-v1/RestrictionDb.ts +0 -35
- package/src/db-sdk-v1/ServiceAppointmentConfigDb.ts +60 -0
- package/src/db-sdk-v1/ServiceDb.ts +0 -35
- package/src/db-sdk-v1/SplitOrderDb.ts +20 -25
- package/src/db-sdk-v1/TransactionDb.ts +0 -35
- package/src/db-sdk-v1/UserDb.ts +90 -0
- package/src/db-sdk-v1/WorkOrderDb.ts +229 -24
- package/src/generators/runner.ts +2 -3
|
@@ -101,31 +101,4 @@
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
// Use this function when you want to return a single record
|
|
105
|
-
public async getInvoiceItems(invoiceItemId: string) {
|
|
106
|
-
return await this._getLinks(this.moduleName, this.entityName, invoiceItemId, 'InvoiceItem');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
public async linkInvoiceItemInvoiceItems(invoiceItemId: string, invoiceItemIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
110
|
-
|
|
111
|
-
const associationDtos = [];
|
|
112
|
-
for(const param of invoiceItemIds){
|
|
113
|
-
associationDtos.push({
|
|
114
|
-
entity: 'BillingModule:InvoiceItem',
|
|
115
|
-
recordId: param.id,
|
|
116
|
-
linkType: 'InvoiceItem__InvoiceItem',
|
|
117
|
-
relationType: param?.relationType,
|
|
118
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return await this._createLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
public async unLinkInvoiceItemInvoiceItems(invoiceItemId: string, linkedInvoiceItemId: string) {
|
|
126
|
-
|
|
127
|
-
return await this._deleteLinks(this.moduleName, this.entityName, invoiceItemId, linkedInvoiceItemId);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
104
|
}
|
|
@@ -317,32 +317,59 @@
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
// Use this function when you want to return a single record
|
|
321
|
+
public async getWorkOrders(leadId: string) {
|
|
322
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'WorkOrder');
|
|
323
|
+
}
|
|
324
324
|
|
|
325
|
-
public async linkWorkOrderLeads(leadId: string,
|
|
325
|
+
public async linkWorkOrderLeads(leadId: string, workOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
326
326
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
327
|
+
const associationDtos = [];
|
|
328
|
+
for(const param of workOrderIds){
|
|
329
|
+
associationDtos.push({
|
|
330
|
+
entity: 'FieldServiceModule:WorkOrder',
|
|
331
|
+
recordId: param.id,
|
|
332
|
+
linkType: 'WorkOrder__Lead',
|
|
333
|
+
relationType: param?.relationType,
|
|
334
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
public async unLinkWorkOrderLeads(leadId: string, linkedWorkOrderId: string) {
|
|
342
|
+
|
|
343
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, linkedWorkOrderId);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
// Use this function when you want to return a single record
|
|
348
|
+
public async getCrmDatasets(leadId: string) {
|
|
349
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'CrmDataset');
|
|
339
350
|
}
|
|
351
|
+
|
|
352
|
+
public async linkCrmDatasetLeads(leadId: string, crmDatasetIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
340
353
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
354
|
+
const associationDtos = [];
|
|
355
|
+
for(const param of crmDatasetIds){
|
|
356
|
+
associationDtos.push({
|
|
357
|
+
entity: 'CrmModule:CrmDataset',
|
|
358
|
+
recordId: param.id,
|
|
359
|
+
linkType: 'CrmDataset__Lead',
|
|
360
|
+
relationType: param?.relationType,
|
|
361
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
362
|
+
});
|
|
344
363
|
}
|
|
345
364
|
|
|
365
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
public async unLinkCrmDatasetLeads(leadId: string, linkedCrmDatasetId: string) {
|
|
369
|
+
|
|
370
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, linkedCrmDatasetId);
|
|
371
|
+
}
|
|
372
|
+
|
|
346
373
|
|
|
347
374
|
// Use this function when you want to return a single record
|
|
348
375
|
public async getOrders(leadId: string) {
|
|
@@ -425,4 +452,58 @@
|
|
|
425
452
|
}
|
|
426
453
|
|
|
427
454
|
|
|
455
|
+
// Use this function when you want to return a single record
|
|
456
|
+
public async getCalls(leadId: string) {
|
|
457
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'Call');
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
public async linkCallLeads(leadId: string, callIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
461
|
+
|
|
462
|
+
const associationDtos = [];
|
|
463
|
+
for(const param of callIds){
|
|
464
|
+
associationDtos.push({
|
|
465
|
+
entity: 'NotificationModule:Call',
|
|
466
|
+
recordId: param.id,
|
|
467
|
+
linkType: 'Call__Lead',
|
|
468
|
+
relationType: param?.relationType,
|
|
469
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
public async unLinkCallLeads(leadId: string, linkedCallId: string) {
|
|
477
|
+
|
|
478
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, linkedCallId);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
// Use this function when you want to return a single record
|
|
483
|
+
public async getFingerprints(leadId: string) {
|
|
484
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'Fingerprint');
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
public async linkFingerprintLeads(leadId: string, fingerprintIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
488
|
+
|
|
489
|
+
const associationDtos = [];
|
|
490
|
+
for(const param of fingerprintIds){
|
|
491
|
+
associationDtos.push({
|
|
492
|
+
entity: 'CrmModule:Fingerprint',
|
|
493
|
+
recordId: param.id,
|
|
494
|
+
linkType: 'Fingerprint__Lead',
|
|
495
|
+
relationType: param?.relationType,
|
|
496
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
public async unLinkFingerprintLeads(leadId: string, linkedFingerprintId: string) {
|
|
504
|
+
|
|
505
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, linkedFingerprintId);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
|
|
428
509
|
}
|
|
@@ -128,33 +128,6 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
// Use this function when you want to return a single record
|
|
132
|
-
public async getMilestones(milestoneId: string) {
|
|
133
|
-
return await this._getLinks(this.moduleName, this.entityName, milestoneId, 'Milestone');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
public async linkMilestoneMilestones(milestoneId: string, milestoneIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
137
|
-
|
|
138
|
-
const associationDtos = [];
|
|
139
|
-
for(const param of milestoneIds){
|
|
140
|
-
associationDtos.push({
|
|
141
|
-
entity: 'ProjectModule:Milestone',
|
|
142
|
-
recordId: param.id,
|
|
143
|
-
linkType: 'Milestone__Milestone',
|
|
144
|
-
relationType: param?.relationType,
|
|
145
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return await this._createLinks(this.moduleName, this.entityName, milestoneId, associationDtos);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
public async unLinkMilestoneMilestones(milestoneId: string, linkedMilestoneId: string) {
|
|
153
|
-
|
|
154
|
-
return await this._deleteLinks(this.moduleName, this.entityName, milestoneId, linkedMilestoneId);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
131
|
// Use this function when you want to return a single record
|
|
159
132
|
public async getNotes(milestoneId: string) {
|
|
160
133
|
return await this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
|
|
@@ -669,7 +669,7 @@
|
|
|
669
669
|
|
|
670
670
|
|
|
671
671
|
// Use this function when you want to return a single record
|
|
672
|
-
public async
|
|
672
|
+
public async getPicRequests(noteId: string) {
|
|
673
673
|
return await this._getLinks(this.moduleName, this.entityName, noteId, 'PICRequest');
|
|
674
674
|
}
|
|
675
675
|
|
|
@@ -1343,19 +1343,14 @@
|
|
|
1343
1343
|
}
|
|
1344
1344
|
|
|
1345
1345
|
|
|
1346
|
-
|
|
1347
|
-
public async getNotes(noteId: string) {
|
|
1348
|
-
return await this._getLinks(this.moduleName, this.entityName, noteId, 'Note');
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
public async linkNoteNotes(noteId: string, noteIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1346
|
+
public async linkNoteFiles(noteId: string, fileIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1352
1347
|
|
|
1353
1348
|
const associationDtos = [];
|
|
1354
|
-
for(const param of
|
|
1349
|
+
for(const param of fileIds){
|
|
1355
1350
|
associationDtos.push({
|
|
1356
|
-
entity: '
|
|
1351
|
+
entity: 'SchemaModule:File',
|
|
1357
1352
|
recordId: param.id,
|
|
1358
|
-
linkType: '
|
|
1353
|
+
linkType: 'Note__File',
|
|
1359
1354
|
relationType: param?.relationType,
|
|
1360
1355
|
relatedAssociationId: param?.relatedAssociationId
|
|
1361
1356
|
});
|
|
@@ -1364,9 +1359,9 @@
|
|
|
1364
1359
|
return await this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
|
|
1365
1360
|
}
|
|
1366
1361
|
|
|
1367
|
-
public async
|
|
1362
|
+
public async unLinkNoteFiles(noteId: string, linkedFileId: string) {
|
|
1368
1363
|
|
|
1369
|
-
return await this._deleteLinks(this.moduleName, this.entityName, noteId,
|
|
1364
|
+
return await this._deleteLinks(this.moduleName, this.entityName, noteId, linkedFileId);
|
|
1370
1365
|
}
|
|
1371
1366
|
|
|
1372
1367
|
|
|
@@ -155,33 +155,6 @@
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
// Use this function when you want to return a single record
|
|
159
|
-
public async getOffers(offerId: string) {
|
|
160
|
-
return await this._getLinks(this.moduleName, this.entityName, offerId, 'Offer');
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
public async linkOfferOffers(offerId: string, offerIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
164
|
-
|
|
165
|
-
const associationDtos = [];
|
|
166
|
-
for(const param of offerIds){
|
|
167
|
-
associationDtos.push({
|
|
168
|
-
entity: 'ProductModule:Offer',
|
|
169
|
-
recordId: param.id,
|
|
170
|
-
linkType: 'Offer__Offer',
|
|
171
|
-
relationType: param?.relationType,
|
|
172
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return await this._createLinks(this.moduleName, this.entityName, offerId, associationDtos);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
public async unLinkOfferOffers(offerId: string, linkedOfferId: string) {
|
|
180
|
-
|
|
181
|
-
return await this._deleteLinks(this.moduleName, this.entityName, offerId, linkedOfferId);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
158
|
// Use this function when you want to return a single record
|
|
186
159
|
public async getDiscounts(offerId: string) {
|
|
187
160
|
return await this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
|
|
@@ -456,35 +456,8 @@
|
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
|
|
459
|
-
// Use this function when you want to return a single record
|
|
460
|
-
public async getOrders(orderId: string) {
|
|
461
|
-
return await this._getLinks(this.moduleName, this.entityName, orderId, 'Order');
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
public async linkOrderOrders(orderId: string, orderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
465
|
-
|
|
466
|
-
const associationDtos = [];
|
|
467
|
-
for(const param of orderIds){
|
|
468
|
-
associationDtos.push({
|
|
469
|
-
entity: 'OrderModule:Order',
|
|
470
|
-
recordId: param.id,
|
|
471
|
-
linkType: 'Order__Order',
|
|
472
|
-
relationType: param?.relationType,
|
|
473
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
return await this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
public async unLinkOrderOrders(orderId: string, linkedOrderId: string) {
|
|
481
|
-
|
|
482
|
-
return await this._deleteLinks(this.moduleName, this.entityName, orderId, linkedOrderId);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
|
|
486
459
|
// Use this function when you want to return a single record
|
|
487
|
-
public async
|
|
460
|
+
public async getPicRequests(orderId: string) {
|
|
488
461
|
return await this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
|
|
489
462
|
}
|
|
490
463
|
|
|
@@ -861,6 +834,28 @@
|
|
|
861
834
|
}
|
|
862
835
|
|
|
863
836
|
|
|
837
|
+
public async linkOrderSplitOrders(orderId: string, splitOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
838
|
+
|
|
839
|
+
const associationDtos = [];
|
|
840
|
+
for(const param of splitOrderIds){
|
|
841
|
+
associationDtos.push({
|
|
842
|
+
entity: 'OrderModule:SplitOrder',
|
|
843
|
+
recordId: param.id,
|
|
844
|
+
linkType: 'Order__SplitOrder',
|
|
845
|
+
relationType: param?.relationType,
|
|
846
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
return await this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
public async unLinkOrderSplitOrders(orderId: string, linkedSplitOrderId: string) {
|
|
854
|
+
|
|
855
|
+
return await this._deleteLinks(this.moduleName, this.entityName, orderId, linkedSplitOrderId);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
|
|
864
859
|
// Use this function when you want to return a single record
|
|
865
860
|
public async getPhoneNumbers(orderId: string) {
|
|
866
861
|
return await this._getLinks(this.moduleName, this.entityName, orderId, 'PhoneNumber');
|
|
@@ -398,33 +398,6 @@
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
|
|
401
|
-
// Use this function when you want to return a single record
|
|
402
|
-
public async getOrderItems(orderItemId: string) {
|
|
403
|
-
return await this._getLinks(this.moduleName, this.entityName, orderItemId, 'OrderItem');
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
public async linkOrderItemOrderItems(orderItemId: string, orderItemIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
407
|
-
|
|
408
|
-
const associationDtos = [];
|
|
409
|
-
for(const param of orderItemIds){
|
|
410
|
-
associationDtos.push({
|
|
411
|
-
entity: 'OrderModule:OrderItem',
|
|
412
|
-
recordId: param.id,
|
|
413
|
-
linkType: 'OrderItem__OrderItem',
|
|
414
|
-
relationType: param?.relationType,
|
|
415
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
return await this._createLinks(this.moduleName, this.entityName, orderItemId, associationDtos);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
public async unLinkOrderItemOrderItems(orderItemId: string, linkedOrderItemId: string) {
|
|
423
|
-
|
|
424
|
-
return await this._deleteLinks(this.moduleName, this.entityName, orderItemId, linkedOrderItemId);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
|
|
428
401
|
// Use this function when you want to return a single record
|
|
429
402
|
public async getVoiceConfigurations(orderItemId: string) {
|
|
430
403
|
return await this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
|
|
@@ -155,31 +155,4 @@
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
// Use this function when you want to return a single record
|
|
159
|
-
public async getOrganizations(organizationId: string) {
|
|
160
|
-
return await this._getLinks(this.moduleName, this.entityName, organizationId, 'Organization');
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
public async linkOrganizationOrganizations(organizationId: string, organizationIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
164
|
-
|
|
165
|
-
const associationDtos = [];
|
|
166
|
-
for(const param of organizationIds){
|
|
167
|
-
associationDtos.push({
|
|
168
|
-
entity: 'CrmModule:Organization',
|
|
169
|
-
recordId: param.id,
|
|
170
|
-
linkType: 'Organization__Organization',
|
|
171
|
-
relationType: param?.relationType,
|
|
172
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return await this._createLinks(this.moduleName, this.entityName, organizationId, associationDtos);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
public async unLinkOrganizationOrganizations(organizationId: string, linkedOrganizationId: string) {
|
|
180
|
-
|
|
181
|
-
return await this._deleteLinks(this.moduleName, this.entityName, organizationId, linkedOrganizationId);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
158
|
}
|
|
@@ -317,35 +317,4 @@
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
// Use this function when you want to return a single record
|
|
321
|
-
public async getProducts(productId: string) {
|
|
322
|
-
return await this._getLinks(this.moduleName, this.entityName, productId, 'Product');
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
public async linkProductProducts(productId: string, productIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
326
|
-
|
|
327
|
-
const associationDtos = [];
|
|
328
|
-
for(const param of productIds){
|
|
329
|
-
associationDtos.push({
|
|
330
|
-
entity: 'ProductModule:Product',
|
|
331
|
-
recordId: param.id,
|
|
332
|
-
linkType: 'Product__Product',
|
|
333
|
-
relationType: param?.relationType,
|
|
334
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
return await this._createLinks(this.moduleName, this.entityName, productId, associationDtos);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
public async unLinkProductProducts(productId: string, linkedProductId: string) {
|
|
342
|
-
|
|
343
|
-
return await this._deleteLinks(this.moduleName, this.entityName, productId, linkedProductId);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
public async addProductProductLinkProperties(productId: string, dbRecordAssociationId: string, updateDto: OdinLinkedRecordUpdateDto) {
|
|
348
|
-
|
|
349
|
-
return await this._updateLinkProperties('ProductModule', 'Product', productId, dbRecordAssociationId, updateDto);
|
|
350
|
-
}
|
|
351
320
|
}
|
|
@@ -128,31 +128,4 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
// Use this function when you want to return a single record
|
|
132
|
-
public async getProductComponents(productComponentId: string) {
|
|
133
|
-
return await this._getLinks(this.moduleName, this.entityName, productComponentId, 'ProductComponent');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
public async linkProductComponentProductComponents(productComponentId: string, productComponentIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
137
|
-
|
|
138
|
-
const associationDtos = [];
|
|
139
|
-
for(const param of productComponentIds){
|
|
140
|
-
associationDtos.push({
|
|
141
|
-
entity: 'ProductModule:ProductComponent',
|
|
142
|
-
recordId: param.id,
|
|
143
|
-
linkType: 'ProductComponent__ProductComponent',
|
|
144
|
-
relationType: param?.relationType,
|
|
145
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return await this._createLinks(this.moduleName, this.entityName, productComponentId, associationDtos);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
public async unLinkProductComponentProductComponents(productComponentId: string, linkedProductComponentId: string) {
|
|
153
|
-
|
|
154
|
-
return await this._deleteLinks(this.moduleName, this.entityName, productComponentId, linkedProductComponentId);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
131
|
}
|
|
@@ -128,31 +128,4 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
// Use this function when you want to return a single record
|
|
132
|
-
public async getRestrictions(restrictionId: string) {
|
|
133
|
-
return await this._getLinks(this.moduleName, this.entityName, restrictionId, 'Restriction');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
public async linkRestrictionRestrictions(restrictionId: string, restrictionIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
137
|
-
|
|
138
|
-
const associationDtos = [];
|
|
139
|
-
for(const param of restrictionIds){
|
|
140
|
-
associationDtos.push({
|
|
141
|
-
entity: 'ProductModule:Restriction',
|
|
142
|
-
recordId: param.id,
|
|
143
|
-
linkType: 'Restriction__Restriction',
|
|
144
|
-
relationType: param?.relationType,
|
|
145
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return await this._createLinks(this.moduleName, this.entityName, restrictionId, associationDtos);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
public async unLinkRestrictionRestrictions(restrictionId: string, linkedRestrictionId: string) {
|
|
153
|
-
|
|
154
|
-
return await this._deleteLinks(this.moduleName, this.entityName, restrictionId, linkedRestrictionId);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
131
|
}
|
|
@@ -101,31 +101,4 @@
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
// Use this function when you want to return a single record
|
|
105
|
-
public async getServices(serviceId: string) {
|
|
106
|
-
return await this._getLinks(this.moduleName, this.entityName, serviceId, 'Service');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
public async linkServiceServices(serviceId: string, serviceIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
110
|
-
|
|
111
|
-
const associationDtos = [];
|
|
112
|
-
for(const param of serviceIds){
|
|
113
|
-
associationDtos.push({
|
|
114
|
-
entity: 'ServiceModule:Service',
|
|
115
|
-
recordId: param.id,
|
|
116
|
-
linkType: 'Service__Service',
|
|
117
|
-
relationType: param?.relationType,
|
|
118
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return await this._createLinks(this.moduleName, this.entityName, serviceId, associationDtos);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
public async unLinkServiceServices(serviceId: string, linkedServiceId: string) {
|
|
126
|
-
|
|
127
|
-
return await this._deleteLinks(this.moduleName, this.entityName, serviceId, linkedServiceId);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
104
|
}
|
|
@@ -263,4 +263,48 @@
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
|
|
266
|
+
public async linkManagers(serviceAppointmentConfigId: string, userIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
267
|
+
|
|
268
|
+
const associationDtos = [];
|
|
269
|
+
for(const param of userIds){
|
|
270
|
+
associationDtos.push({
|
|
271
|
+
entity: 'IdentityModule:User',
|
|
272
|
+
recordId: param.id,
|
|
273
|
+
linkType: 'Manager',
|
|
274
|
+
relationType: param?.relationType,
|
|
275
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return await this._createLinks(this.moduleName, this.entityName, serviceAppointmentConfigId, associationDtos);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
public async unLinkManagers(serviceAppointmentConfigId: string, linkedUserId: string) {
|
|
283
|
+
|
|
284
|
+
return await this._deleteLinks(this.moduleName, this.entityName, serviceAppointmentConfigId, linkedUserId);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
public async linkSupervisors(serviceAppointmentConfigId: string, userIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
289
|
+
|
|
290
|
+
const associationDtos = [];
|
|
291
|
+
for(const param of userIds){
|
|
292
|
+
associationDtos.push({
|
|
293
|
+
entity: 'IdentityModule:User',
|
|
294
|
+
recordId: param.id,
|
|
295
|
+
linkType: 'Supervisor',
|
|
296
|
+
relationType: param?.relationType,
|
|
297
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return await this._createLinks(this.moduleName, this.entityName, serviceAppointmentConfigId, associationDtos);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
public async unLinkSupervisors(serviceAppointmentConfigId: string, linkedUserId: string) {
|
|
305
|
+
|
|
306
|
+
return await this._deleteLinks(this.moduleName, this.entityName, serviceAppointmentConfigId, linkedUserId);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
266
310
|
}
|
|
@@ -128,31 +128,26 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
public async getSplitOrders(splitOrderId: string) {
|
|
133
|
-
return await this._getLinks(this.moduleName, this.entityName, splitOrderId, 'SplitOrder');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
public async linkSplitOrderSplitOrders(splitOrderId: string, splitOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
137
|
-
|
|
138
|
-
const associationDtos = [];
|
|
139
|
-
for(const param of splitOrderIds){
|
|
140
|
-
associationDtos.push({
|
|
141
|
-
entity: 'OrderModule:SplitOrder',
|
|
142
|
-
recordId: param.id,
|
|
143
|
-
linkType: 'SplitOrder__SplitOrder',
|
|
144
|
-
relationType: param?.relationType,
|
|
145
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
146
|
-
});
|
|
147
|
-
}
|
|
131
|
+
public async linkOrderSplitOrders(splitOrderId: string, orderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
148
132
|
|
|
149
|
-
|
|
133
|
+
const associationDtos = [];
|
|
134
|
+
for(const param of orderIds){
|
|
135
|
+
associationDtos.push({
|
|
136
|
+
entity: 'OrderModule:Order',
|
|
137
|
+
recordId: param.id,
|
|
138
|
+
linkType: 'Order__SplitOrder',
|
|
139
|
+
relationType: param?.relationType,
|
|
140
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
141
|
+
});
|
|
150
142
|
}
|
|
151
143
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
return await this._createLinks(this.moduleName, this.entityName, splitOrderId, associationDtos);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public async unLinkOrderSplitOrders(splitOrderId: string, linkedOrderId: string) {
|
|
148
|
+
|
|
149
|
+
return await this._deleteLinks(this.moduleName, this.entityName, splitOrderId, linkedOrderId);
|
|
150
|
+
}
|
|
156
151
|
|
|
157
152
|
|
|
158
153
|
}
|