@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
|
@@ -99,39 +99,4 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
// Use this function when you want to return a single record
|
|
103
|
-
public async getInvoiceItems(invoiceItemId: string) {
|
|
104
|
-
return await this._getLinks(this.moduleName, this.entityName, invoiceItemId, 'InvoiceItem');
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
public async linkInvoiceItemInvoiceItems(invoiceItemId: string, invoiceItemIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
108
|
-
|
|
109
|
-
const associationDtos = [];
|
|
110
|
-
for(const param of invoiceItemIds){
|
|
111
|
-
associationDtos.push({
|
|
112
|
-
entity: 'BillingModule:InvoiceItem',
|
|
113
|
-
recordId: param.id,
|
|
114
|
-
linkType: 'InvoiceItem__InvoiceItem',
|
|
115
|
-
relationType: param?.relationType,
|
|
116
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return await this._createLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
public async unlinkInvoiceItemInvoiceItems(invoiceItemId: string, linkedInvoiceItemIds: string[]) {
|
|
124
|
-
|
|
125
|
-
const associationDtos = [];
|
|
126
|
-
for(const pk of linkedInvoiceItemIds){
|
|
127
|
-
associationDtos.push({
|
|
128
|
-
primaryKey: invoiceItemId,
|
|
129
|
-
linkedRecordPrimaryKey: pk,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return await this._deleteLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
102
|
}
|
package/src/db-sdk-v1/LeadDb.ts
CHANGED
|
@@ -379,40 +379,75 @@
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
382
|
+
// Use this function when you want to return a single record
|
|
383
|
+
public async getWorkOrders(leadId: string) {
|
|
384
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'WorkOrder');
|
|
385
|
+
}
|
|
386
386
|
|
|
387
|
-
public async linkWorkOrderLeads(leadId: string,
|
|
387
|
+
public async linkWorkOrderLeads(leadId: string, workOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
388
388
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
389
|
+
const associationDtos = [];
|
|
390
|
+
for(const param of workOrderIds){
|
|
391
|
+
associationDtos.push({
|
|
392
|
+
entity: 'FieldServiceModule:WorkOrder',
|
|
393
|
+
recordId: param.id,
|
|
394
|
+
linkType: 'WorkOrder__Lead',
|
|
395
|
+
relationType: param?.relationType,
|
|
396
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
397
|
+
});
|
|
401
398
|
}
|
|
402
399
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
400
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
public async unlinkWorkOrderLeads(leadId: string, linkedWorkOrderIds: string[]) {
|
|
404
|
+
|
|
405
|
+
const associationDtos = [];
|
|
406
|
+
for(const pk of linkedWorkOrderIds){
|
|
407
407
|
associationDtos.push({
|
|
408
408
|
primaryKey: leadId,
|
|
409
409
|
linkedRecordPrimaryKey: pk,
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
|
|
413
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
// Use this function when you want to return a single record
|
|
418
|
+
public async getCrmDatasets(leadId: string) {
|
|
419
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'CrmDataset');
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
public async linkCrmDatasetLeads(leadId: string, crmDatasetIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
423
|
+
|
|
424
|
+
const associationDtos = [];
|
|
425
|
+
for(const param of crmDatasetIds){
|
|
426
|
+
associationDtos.push({
|
|
427
|
+
entity: 'CrmModule:CrmDataset',
|
|
428
|
+
recordId: param.id,
|
|
429
|
+
linkType: 'CrmDataset__Lead',
|
|
430
|
+
relationType: param?.relationType,
|
|
431
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
public async unlinkCrmDatasetLeads(leadId: string, linkedCrmDatasetIds: string[]) {
|
|
439
|
+
|
|
440
|
+
const associationDtos = [];
|
|
441
|
+
for(const pk of linkedCrmDatasetIds){
|
|
442
|
+
associationDtos.push({
|
|
443
|
+
primaryKey: leadId,
|
|
444
|
+
linkedRecordPrimaryKey: pk,
|
|
445
|
+
});
|
|
414
446
|
}
|
|
415
447
|
|
|
448
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
449
|
+
}
|
|
450
|
+
|
|
416
451
|
|
|
417
452
|
// Use this function when you want to return a single record
|
|
418
453
|
public async getOrders(leadId: string) {
|
|
@@ -519,4 +554,74 @@
|
|
|
519
554
|
}
|
|
520
555
|
|
|
521
556
|
|
|
557
|
+
// Use this function when you want to return a single record
|
|
558
|
+
public async getCalls(leadId: string) {
|
|
559
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'Call');
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
public async linkCallLeads(leadId: string, callIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
563
|
+
|
|
564
|
+
const associationDtos = [];
|
|
565
|
+
for(const param of callIds){
|
|
566
|
+
associationDtos.push({
|
|
567
|
+
entity: 'NotificationModule:Call',
|
|
568
|
+
recordId: param.id,
|
|
569
|
+
linkType: 'Call__Lead',
|
|
570
|
+
relationType: param?.relationType,
|
|
571
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
public async unlinkCallLeads(leadId: string, linkedCallIds: string[]) {
|
|
579
|
+
|
|
580
|
+
const associationDtos = [];
|
|
581
|
+
for(const pk of linkedCallIds){
|
|
582
|
+
associationDtos.push({
|
|
583
|
+
primaryKey: leadId,
|
|
584
|
+
linkedRecordPrimaryKey: pk,
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
// Use this function when you want to return a single record
|
|
593
|
+
public async getFingerprints(leadId: string) {
|
|
594
|
+
return await this._getLinks(this.moduleName, this.entityName, leadId, 'Fingerprint');
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
public async linkFingerprintLeads(leadId: string, fingerprintIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
598
|
+
|
|
599
|
+
const associationDtos = [];
|
|
600
|
+
for(const param of fingerprintIds){
|
|
601
|
+
associationDtos.push({
|
|
602
|
+
entity: 'CrmModule:Fingerprint',
|
|
603
|
+
recordId: param.id,
|
|
604
|
+
linkType: 'Fingerprint__Lead',
|
|
605
|
+
relationType: param?.relationType,
|
|
606
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
return await this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
public async unlinkFingerprintLeads(leadId: string, linkedFingerprintIds: string[]) {
|
|
614
|
+
|
|
615
|
+
const associationDtos = [];
|
|
616
|
+
for(const pk of linkedFingerprintIds){
|
|
617
|
+
associationDtos.push({
|
|
618
|
+
primaryKey: leadId,
|
|
619
|
+
linkedRecordPrimaryKey: pk,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return await this._deleteLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
|
|
522
627
|
}
|
|
@@ -134,41 +134,6 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
// Use this function when you want to return a single record
|
|
138
|
-
public async getMilestones(milestoneId: string) {
|
|
139
|
-
return await this._getLinks(this.moduleName, this.entityName, milestoneId, 'Milestone');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
public async linkMilestoneMilestones(milestoneId: string, milestoneIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
143
|
-
|
|
144
|
-
const associationDtos = [];
|
|
145
|
-
for(const param of milestoneIds){
|
|
146
|
-
associationDtos.push({
|
|
147
|
-
entity: 'ProjectModule:Milestone',
|
|
148
|
-
recordId: param.id,
|
|
149
|
-
linkType: 'Milestone__Milestone',
|
|
150
|
-
relationType: param?.relationType,
|
|
151
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return await this._createLinks(this.moduleName, this.entityName, milestoneId, associationDtos);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
public async unlinkMilestoneMilestones(milestoneId: string, linkedMilestoneIds: string[]) {
|
|
159
|
-
|
|
160
|
-
const associationDtos = [];
|
|
161
|
-
for(const pk of linkedMilestoneIds){
|
|
162
|
-
associationDtos.push({
|
|
163
|
-
primaryKey: milestoneId,
|
|
164
|
-
linkedRecordPrimaryKey: pk,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return await this._deleteLinks(this.moduleName, this.entityName, milestoneId, associationDtos);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
137
|
// Use this function when you want to return a single record
|
|
173
138
|
public async getNotes(milestoneId: string) {
|
|
174
139
|
return await this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
|
package/src/db-sdk-v1/NoteDb.ts
CHANGED
|
@@ -835,7 +835,7 @@
|
|
|
835
835
|
|
|
836
836
|
|
|
837
837
|
// Use this function when you want to return a single record
|
|
838
|
-
public async
|
|
838
|
+
public async getPicRequests(noteId: string) {
|
|
839
839
|
return await this._getLinks(this.moduleName, this.entityName, noteId, 'PICRequest');
|
|
840
840
|
}
|
|
841
841
|
|
|
@@ -1709,19 +1709,14 @@
|
|
|
1709
1709
|
}
|
|
1710
1710
|
|
|
1711
1711
|
|
|
1712
|
-
|
|
1713
|
-
public async getNotes(noteId: string) {
|
|
1714
|
-
return await this._getLinks(this.moduleName, this.entityName, noteId, 'Note');
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
public async linkNoteNotes(noteId: string, noteIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1712
|
+
public async linkNoteFiles(noteId: string, fileIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1718
1713
|
|
|
1719
1714
|
const associationDtos = [];
|
|
1720
|
-
for(const param of
|
|
1715
|
+
for(const param of fileIds){
|
|
1721
1716
|
associationDtos.push({
|
|
1722
|
-
entity: '
|
|
1717
|
+
entity: 'SchemaModule:File',
|
|
1723
1718
|
recordId: param.id,
|
|
1724
|
-
linkType: '
|
|
1719
|
+
linkType: 'Note__File',
|
|
1725
1720
|
relationType: param?.relationType,
|
|
1726
1721
|
relatedAssociationId: param?.relatedAssociationId
|
|
1727
1722
|
});
|
|
@@ -1730,10 +1725,10 @@
|
|
|
1730
1725
|
return await this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
|
|
1731
1726
|
}
|
|
1732
1727
|
|
|
1733
|
-
public async
|
|
1728
|
+
public async unlinkNoteFiles(noteId: string, linkedFileIds: string[]) {
|
|
1734
1729
|
|
|
1735
1730
|
const associationDtos = [];
|
|
1736
|
-
for(const pk of
|
|
1731
|
+
for(const pk of linkedFileIds){
|
|
1737
1732
|
associationDtos.push({
|
|
1738
1733
|
primaryKey: noteId,
|
|
1739
1734
|
linkedRecordPrimaryKey: pk,
|
package/src/db-sdk-v1/OfferDb.ts
CHANGED
|
@@ -169,41 +169,6 @@
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
|
|
172
|
-
// Use this function when you want to return a single record
|
|
173
|
-
public async getOffers(offerId: string) {
|
|
174
|
-
return await this._getLinks(this.moduleName, this.entityName, offerId, 'Offer');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
public async linkOfferOffers(offerId: string, offerIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
178
|
-
|
|
179
|
-
const associationDtos = [];
|
|
180
|
-
for(const param of offerIds){
|
|
181
|
-
associationDtos.push({
|
|
182
|
-
entity: 'ProductModule:Offer',
|
|
183
|
-
recordId: param.id,
|
|
184
|
-
linkType: 'Offer__Offer',
|
|
185
|
-
relationType: param?.relationType,
|
|
186
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return await this._createLinks(this.moduleName, this.entityName, offerId, associationDtos);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
public async unlinkOfferOffers(offerId: string, linkedOfferIds: string[]) {
|
|
194
|
-
|
|
195
|
-
const associationDtos = [];
|
|
196
|
-
for(const pk of linkedOfferIds){
|
|
197
|
-
associationDtos.push({
|
|
198
|
-
primaryKey: offerId,
|
|
199
|
-
linkedRecordPrimaryKey: pk,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return await this._deleteLinks(this.moduleName, this.entityName, offerId, associationDtos);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
172
|
// Use this function when you want to return a single record
|
|
208
173
|
public async getDiscounts(offerId: string) {
|
|
209
174
|
return await this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
|
package/src/db-sdk-v1/OrderDb.ts
CHANGED
|
@@ -558,43 +558,8 @@
|
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
|
|
561
|
-
// Use this function when you want to return a single record
|
|
562
|
-
public async getOrders(orderId: string) {
|
|
563
|
-
return await this._getLinks(this.moduleName, this.entityName, orderId, 'Order');
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
public async linkOrderOrders(orderId: string, orderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
567
|
-
|
|
568
|
-
const associationDtos = [];
|
|
569
|
-
for(const param of orderIds){
|
|
570
|
-
associationDtos.push({
|
|
571
|
-
entity: 'OrderModule:Order',
|
|
572
|
-
recordId: param.id,
|
|
573
|
-
linkType: 'Order__Order',
|
|
574
|
-
relationType: param?.relationType,
|
|
575
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
return await this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
public async unlinkOrderOrders(orderId: string, linkedOrderIds: string[]) {
|
|
583
|
-
|
|
584
|
-
const associationDtos = [];
|
|
585
|
-
for(const pk of linkedOrderIds){
|
|
586
|
-
associationDtos.push({
|
|
587
|
-
primaryKey: orderId,
|
|
588
|
-
linkedRecordPrimaryKey: pk,
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
return await this._deleteLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
561
|
// Use this function when you want to return a single record
|
|
597
|
-
public async
|
|
562
|
+
public async getPicRequests(orderId: string) {
|
|
598
563
|
return await this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
|
|
599
564
|
}
|
|
600
565
|
|
|
@@ -1083,6 +1048,36 @@
|
|
|
1083
1048
|
}
|
|
1084
1049
|
|
|
1085
1050
|
|
|
1051
|
+
public async linkOrderSplitOrders(orderId: string, splitOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1052
|
+
|
|
1053
|
+
const associationDtos = [];
|
|
1054
|
+
for(const param of splitOrderIds){
|
|
1055
|
+
associationDtos.push({
|
|
1056
|
+
entity: 'OrderModule:SplitOrder',
|
|
1057
|
+
recordId: param.id,
|
|
1058
|
+
linkType: 'Order__SplitOrder',
|
|
1059
|
+
relationType: param?.relationType,
|
|
1060
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
return await this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
public async unlinkOrderSplitOrders(orderId: string, linkedSplitOrderIds: string[]) {
|
|
1068
|
+
|
|
1069
|
+
const associationDtos = [];
|
|
1070
|
+
for(const pk of linkedSplitOrderIds){
|
|
1071
|
+
associationDtos.push({
|
|
1072
|
+
primaryKey: orderId,
|
|
1073
|
+
linkedRecordPrimaryKey: pk,
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
return await this._deleteLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
|
|
1086
1081
|
// Use this function when you want to return a single record
|
|
1087
1082
|
public async getPhoneNumbers(orderId: string) {
|
|
1088
1083
|
return await this._getLinks(this.moduleName, this.entityName, orderId, 'PhoneNumber');
|
|
@@ -484,41 +484,6 @@
|
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
|
|
487
|
-
// Use this function when you want to return a single record
|
|
488
|
-
public async getOrderItems(orderItemId: string) {
|
|
489
|
-
return await this._getLinks(this.moduleName, this.entityName, orderItemId, 'OrderItem');
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
public async linkOrderItemOrderItems(orderItemId: string, orderItemIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
493
|
-
|
|
494
|
-
const associationDtos = [];
|
|
495
|
-
for(const param of orderItemIds){
|
|
496
|
-
associationDtos.push({
|
|
497
|
-
entity: 'OrderModule:OrderItem',
|
|
498
|
-
recordId: param.id,
|
|
499
|
-
linkType: 'OrderItem__OrderItem',
|
|
500
|
-
relationType: param?.relationType,
|
|
501
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
return await this._createLinks(this.moduleName, this.entityName, orderItemId, associationDtos);
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
public async unlinkOrderItemOrderItems(orderItemId: string, linkedOrderItemIds: string[]) {
|
|
509
|
-
|
|
510
|
-
const associationDtos = [];
|
|
511
|
-
for(const pk of linkedOrderItemIds){
|
|
512
|
-
associationDtos.push({
|
|
513
|
-
primaryKey: orderItemId,
|
|
514
|
-
linkedRecordPrimaryKey: pk,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return await this._deleteLinks(this.moduleName, this.entityName, orderItemId, associationDtos);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
|
|
522
487
|
// Use this function when you want to return a single record
|
|
523
488
|
public async getVoiceConfigurations(orderItemId: string) {
|
|
524
489
|
return await this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
|
|
@@ -169,39 +169,4 @@
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
|
|
172
|
-
// Use this function when you want to return a single record
|
|
173
|
-
public async getOrganizations(organizationId: string) {
|
|
174
|
-
return await this._getLinks(this.moduleName, this.entityName, organizationId, 'Organization');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
public async linkOrganizationOrganizations(organizationId: string, organizationIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
178
|
-
|
|
179
|
-
const associationDtos = [];
|
|
180
|
-
for(const param of organizationIds){
|
|
181
|
-
associationDtos.push({
|
|
182
|
-
entity: 'CrmModule:Organization',
|
|
183
|
-
recordId: param.id,
|
|
184
|
-
linkType: 'Organization__Organization',
|
|
185
|
-
relationType: param?.relationType,
|
|
186
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return await this._createLinks(this.moduleName, this.entityName, organizationId, associationDtos);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
public async unlinkOrganizationOrganizations(organizationId: string, linkedOrganizationIds: string[]) {
|
|
194
|
-
|
|
195
|
-
const associationDtos = [];
|
|
196
|
-
for(const pk of linkedOrganizationIds){
|
|
197
|
-
associationDtos.push({
|
|
198
|
-
primaryKey: organizationId,
|
|
199
|
-
linkedRecordPrimaryKey: pk,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return await this._deleteLinks(this.moduleName, this.entityName, organizationId, associationDtos);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
172
|
}
|
|
@@ -134,39 +134,4 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
// Use this function when you want to return a single record
|
|
138
|
-
public async getProductComponents(productComponentId: string) {
|
|
139
|
-
return await this._getLinks(this.moduleName, this.entityName, productComponentId, 'ProductComponent');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
public async linkProductComponentProductComponents(productComponentId: string, productComponentIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
143
|
-
|
|
144
|
-
const associationDtos = [];
|
|
145
|
-
for(const param of productComponentIds){
|
|
146
|
-
associationDtos.push({
|
|
147
|
-
entity: 'ProductModule:ProductComponent',
|
|
148
|
-
recordId: param.id,
|
|
149
|
-
linkType: 'ProductComponent__ProductComponent',
|
|
150
|
-
relationType: param?.relationType,
|
|
151
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return await this._createLinks(this.moduleName, this.entityName, productComponentId, associationDtos);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
public async unlinkProductComponentProductComponents(productComponentId: string, linkedProductComponentIds: string[]) {
|
|
159
|
-
|
|
160
|
-
const associationDtos = [];
|
|
161
|
-
for(const pk of linkedProductComponentIds){
|
|
162
|
-
associationDtos.push({
|
|
163
|
-
primaryKey: productComponentId,
|
|
164
|
-
linkedRecordPrimaryKey: pk,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return await this._deleteLinks(this.moduleName, this.entityName, productComponentId, associationDtos);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
137
|
}
|
|
@@ -379,43 +379,4 @@
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
|
|
382
|
-
// Use this function when you want to return a single record
|
|
383
|
-
public async getProducts(productId: string) {
|
|
384
|
-
return await this._getLinks(this.moduleName, this.entityName, productId, 'Product');
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
public async linkProductProducts(productId: string, productIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
388
|
-
|
|
389
|
-
const associationDtos = [];
|
|
390
|
-
for(const param of productIds){
|
|
391
|
-
associationDtos.push({
|
|
392
|
-
entity: 'ProductModule:Product',
|
|
393
|
-
recordId: param.id,
|
|
394
|
-
linkType: 'Product__Product',
|
|
395
|
-
relationType: param?.relationType,
|
|
396
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
return await this._createLinks(this.moduleName, this.entityName, productId, associationDtos);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
public async unlinkProductProducts(productId: string, linkedProductIds: string[]) {
|
|
404
|
-
|
|
405
|
-
const associationDtos = [];
|
|
406
|
-
for(const pk of linkedProductIds){
|
|
407
|
-
associationDtos.push({
|
|
408
|
-
primaryKey: productId,
|
|
409
|
-
linkedRecordPrimaryKey: pk,
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
return await this._deleteLinks(this.moduleName, this.entityName, productId, associationDtos);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
public async updateProductProductLinkProperties(productId: string, dbRecordAssociationId: string, updateDto: OdinLinkedRecordUpdateDto) {
|
|
418
|
-
|
|
419
|
-
return await this._updateLinkProperties('ProductModule', 'Product', productId, dbRecordAssociationId, updateDto);
|
|
420
|
-
}
|
|
421
382
|
}
|
|
@@ -134,39 +134,4 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
// Use this function when you want to return a single record
|
|
138
|
-
public async getRestrictions(restrictionId: string) {
|
|
139
|
-
return await this._getLinks(this.moduleName, this.entityName, restrictionId, 'Restriction');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
public async linkRestrictionRestrictions(restrictionId: string, restrictionIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
143
|
-
|
|
144
|
-
const associationDtos = [];
|
|
145
|
-
for(const param of restrictionIds){
|
|
146
|
-
associationDtos.push({
|
|
147
|
-
entity: 'ProductModule:Restriction',
|
|
148
|
-
recordId: param.id,
|
|
149
|
-
linkType: 'Restriction__Restriction',
|
|
150
|
-
relationType: param?.relationType,
|
|
151
|
-
relatedAssociationId: param?.relatedAssociationId
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return await this._createLinks(this.moduleName, this.entityName, restrictionId, associationDtos);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
public async unlinkRestrictionRestrictions(restrictionId: string, linkedRestrictionIds: string[]) {
|
|
159
|
-
|
|
160
|
-
const associationDtos = [];
|
|
161
|
-
for(const pk of linkedRestrictionIds){
|
|
162
|
-
associationDtos.push({
|
|
163
|
-
primaryKey: restrictionId,
|
|
164
|
-
linkedRecordPrimaryKey: pk,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return await this._deleteLinks(this.moduleName, this.entityName, restrictionId, associationDtos);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
137
|
}
|