@d19n/youfibre-odin-sdk 1.0.21 → 1.0.23
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 +7 -0
- package/dist/api-sdk-v1/BillingRequestApi.js +26 -0
- package/dist/api-sdk-v1/CaseApi.d.ts +7 -0
- package/dist/api-sdk-v1/CaseApi.js +26 -0
- package/dist/api-sdk-v1/ConsumptionRateApi.d.ts +7 -0
- package/dist/api-sdk-v1/ConsumptionRateApi.js +26 -0
- package/dist/api-sdk-v1/ConsumptionScheduleApi.d.ts +7 -0
- package/dist/api-sdk-v1/ConsumptionScheduleApi.js +26 -0
- package/dist/api-sdk-v1/ContactApi.d.ts +7 -0
- package/dist/api-sdk-v1/ContactApi.js +26 -0
- package/dist/api-sdk-v1/ContactIdentityApi.d.ts +7 -0
- package/dist/api-sdk-v1/ContactIdentityApi.js +26 -0
- package/dist/api-sdk-v1/CustomerDeviceOntRemovalApi.d.ts +7 -0
- package/dist/api-sdk-v1/CustomerDeviceOntRemovalApi.js +26 -0
- package/dist/api-sdk-v1/FileApi.d.ts +0 -49
- package/dist/api-sdk-v1/FileApi.js +0 -182
- package/dist/api-sdk-v1/InvoiceItemApi.d.ts +7 -0
- package/dist/api-sdk-v1/InvoiceItemApi.js +26 -0
- package/dist/api-sdk-v1/MilestoneApi.d.ts +7 -0
- package/dist/api-sdk-v1/MilestoneApi.js +26 -0
- package/dist/api-sdk-v1/NoteApi.d.ts +7 -0
- package/dist/api-sdk-v1/NoteApi.js +26 -0
- package/dist/api-sdk-v1/OfferApi.d.ts +7 -0
- package/dist/api-sdk-v1/OfferApi.js +26 -0
- package/dist/api-sdk-v1/OrderApi.d.ts +7 -0
- package/dist/api-sdk-v1/OrderApi.js +26 -0
- package/dist/api-sdk-v1/OrderItemApi.d.ts +7 -0
- package/dist/api-sdk-v1/OrderItemApi.js +26 -0
- package/dist/api-sdk-v1/OrganizationApi.d.ts +7 -0
- package/dist/api-sdk-v1/OrganizationApi.js +26 -0
- package/dist/api-sdk-v1/ProductApi.d.ts +9 -1
- package/dist/api-sdk-v1/ProductApi.js +31 -0
- package/dist/api-sdk-v1/ProductComponentApi.d.ts +7 -0
- package/dist/api-sdk-v1/ProductComponentApi.js +26 -0
- package/dist/api-sdk-v1/RestrictionApi.d.ts +7 -0
- package/dist/api-sdk-v1/RestrictionApi.js +26 -0
- package/dist/api-sdk-v1/ServiceApi.d.ts +7 -0
- package/dist/api-sdk-v1/ServiceApi.js +26 -0
- package/dist/api-sdk-v1/SplitOrderApi.d.ts +7 -0
- package/dist/api-sdk-v1/SplitOrderApi.js +26 -0
- package/dist/api-sdk-v1/TransactionApi.d.ts +7 -0
- package/dist/api-sdk-v1/TransactionApi.js +26 -0
- package/dist/api-sdk-v1/WorkOrderApi.d.ts +14 -0
- package/dist/api-sdk-v1/WorkOrderApi.js +52 -0
- package/dist/db-sdk-v1/BillingRequestDb.d.ts +7 -0
- package/dist/db-sdk-v1/BillingRequestDb.js +33 -0
- package/dist/db-sdk-v1/CaseDb.d.ts +7 -0
- package/dist/db-sdk-v1/CaseDb.js +33 -0
- package/dist/db-sdk-v1/ConsumptionRateDb.d.ts +7 -0
- package/dist/db-sdk-v1/ConsumptionRateDb.js +33 -0
- package/dist/db-sdk-v1/ConsumptionScheduleDb.d.ts +7 -0
- package/dist/db-sdk-v1/ConsumptionScheduleDb.js +33 -0
- package/dist/db-sdk-v1/ContactDb.d.ts +7 -0
- package/dist/db-sdk-v1/ContactDb.js +33 -0
- package/dist/db-sdk-v1/ContactIdentityDb.d.ts +7 -0
- package/dist/db-sdk-v1/ContactIdentityDb.js +33 -0
- package/dist/db-sdk-v1/FileDb.d.ts +0 -49
- package/dist/db-sdk-v1/FileDb.js +0 -231
- package/dist/db-sdk-v1/InvoiceItemDb.d.ts +7 -0
- package/dist/db-sdk-v1/InvoiceItemDb.js +33 -0
- package/dist/db-sdk-v1/MilestoneDb.d.ts +7 -0
- package/dist/db-sdk-v1/MilestoneDb.js +33 -0
- package/dist/db-sdk-v1/NoteDb.d.ts +7 -0
- package/dist/db-sdk-v1/NoteDb.js +33 -0
- package/dist/db-sdk-v1/OfferDb.d.ts +7 -0
- package/dist/db-sdk-v1/OfferDb.js +33 -0
- package/dist/db-sdk-v1/OrderDb.d.ts +7 -0
- package/dist/db-sdk-v1/OrderDb.js +33 -0
- package/dist/db-sdk-v1/OrderItemDb.d.ts +7 -0
- package/dist/db-sdk-v1/OrderItemDb.js +33 -0
- package/dist/db-sdk-v1/OrganizationDb.d.ts +7 -0
- package/dist/db-sdk-v1/OrganizationDb.js +33 -0
- package/dist/db-sdk-v1/ProductComponentDb.d.ts +7 -0
- package/dist/db-sdk-v1/ProductComponentDb.js +33 -0
- package/dist/db-sdk-v1/ProductDb.d.ts +9 -1
- package/dist/db-sdk-v1/ProductDb.js +38 -0
- package/dist/db-sdk-v1/RestrictionDb.d.ts +7 -0
- package/dist/db-sdk-v1/RestrictionDb.js +33 -0
- package/dist/db-sdk-v1/ServiceDb.d.ts +7 -0
- package/dist/db-sdk-v1/ServiceDb.js +33 -0
- package/dist/db-sdk-v1/SplitOrderDb.d.ts +7 -0
- package/dist/db-sdk-v1/SplitOrderDb.js +33 -0
- package/dist/db-sdk-v1/TransactionDb.d.ts +7 -0
- package/dist/db-sdk-v1/TransactionDb.js +33 -0
- package/dist/db-sdk-v1/WorkOrderDb.d.ts +14 -0
- package/dist/db-sdk-v1/WorkOrderDb.js +66 -0
- package/package.json +2 -2
- package/src/api-sdk-v1/BillingRequestApi.ts +27 -0
- package/src/api-sdk-v1/CaseApi.ts +27 -0
- package/src/api-sdk-v1/ConsumptionRateApi.ts +27 -0
- package/src/api-sdk-v1/ConsumptionScheduleApi.ts +27 -0
- package/src/api-sdk-v1/ContactApi.ts +27 -0
- package/src/api-sdk-v1/ContactIdentityApi.ts +27 -0
- package/src/api-sdk-v1/CustomerDeviceOntRemovalApi.ts +27 -0
- package/src/api-sdk-v1/FileApi.ts +0 -189
- package/src/api-sdk-v1/InvoiceItemApi.ts +27 -0
- package/src/api-sdk-v1/MilestoneApi.ts +27 -0
- package/src/api-sdk-v1/NoteApi.ts +27 -0
- package/src/api-sdk-v1/OfferApi.ts +27 -0
- package/src/api-sdk-v1/OrderApi.ts +27 -0
- package/src/api-sdk-v1/OrderItemApi.ts +27 -0
- package/src/api-sdk-v1/OrganizationApi.ts +27 -0
- package/src/api-sdk-v1/ProductApi.ts +31 -0
- package/src/api-sdk-v1/ProductComponentApi.ts +27 -0
- package/src/api-sdk-v1/RestrictionApi.ts +27 -0
- package/src/api-sdk-v1/ServiceApi.ts +27 -0
- package/src/api-sdk-v1/SplitOrderApi.ts +27 -0
- package/src/api-sdk-v1/TransactionApi.ts +27 -0
- package/src/api-sdk-v1/WorkOrderApi.ts +54 -0
- package/src/db-sdk-v1/BillingRequestDb.ts +35 -0
- package/src/db-sdk-v1/CaseDb.ts +35 -0
- package/src/db-sdk-v1/ConsumptionRateDb.ts +35 -0
- package/src/db-sdk-v1/ConsumptionScheduleDb.ts +35 -0
- package/src/db-sdk-v1/ContactDb.ts +35 -0
- package/src/db-sdk-v1/ContactIdentityDb.ts +35 -0
- package/src/db-sdk-v1/FileDb.ts +0 -245
- package/src/db-sdk-v1/InvoiceItemDb.ts +35 -0
- package/src/db-sdk-v1/MilestoneDb.ts +35 -0
- package/src/db-sdk-v1/NoteDb.ts +35 -0
- package/src/db-sdk-v1/OfferDb.ts +35 -0
- package/src/db-sdk-v1/OrderDb.ts +35 -0
- package/src/db-sdk-v1/OrderItemDb.ts +35 -0
- package/src/db-sdk-v1/OrganizationDb.ts +35 -0
- package/src/db-sdk-v1/ProductComponentDb.ts +35 -0
- package/src/db-sdk-v1/ProductDb.ts +39 -0
- package/src/db-sdk-v1/RestrictionDb.ts +35 -0
- package/src/db-sdk-v1/ServiceDb.ts +35 -0
- package/src/db-sdk-v1/SplitOrderDb.ts +35 -0
- package/src/db-sdk-v1/TransactionDb.ts +35 -0
- package/src/db-sdk-v1/WorkOrderDb.ts +70 -0
|
@@ -134,6 +134,41 @@
|
|
|
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
|
+
|
|
137
172
|
// Use this function when you want to return a single record
|
|
138
173
|
public async getNotes(milestoneId: string) {
|
|
139
174
|
return await this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
|
package/src/db-sdk-v1/NoteDb.ts
CHANGED
|
@@ -1709,6 +1709,41 @@
|
|
|
1709
1709
|
}
|
|
1710
1710
|
|
|
1711
1711
|
|
|
1712
|
+
// Use this function when you want to return a single record
|
|
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}[]) {
|
|
1718
|
+
|
|
1719
|
+
const associationDtos = [];
|
|
1720
|
+
for(const param of noteIds){
|
|
1721
|
+
associationDtos.push({
|
|
1722
|
+
entity: 'SupportModule:Note',
|
|
1723
|
+
recordId: param.id,
|
|
1724
|
+
linkType: 'Note__Note',
|
|
1725
|
+
relationType: param?.relationType,
|
|
1726
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
return await this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
public async unlinkNoteNotes(noteId: string, linkedNoteIds: string[]) {
|
|
1734
|
+
|
|
1735
|
+
const associationDtos = [];
|
|
1736
|
+
for(const pk of linkedNoteIds){
|
|
1737
|
+
associationDtos.push({
|
|
1738
|
+
primaryKey: noteId,
|
|
1739
|
+
linkedRecordPrimaryKey: pk,
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
return await this._deleteLinks(this.moduleName, this.entityName, noteId, associationDtos);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
|
|
1712
1747
|
public async linkNoteFiles(noteId: string, fileIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1713
1748
|
|
|
1714
1749
|
const associationDtos = [];
|
package/src/db-sdk-v1/OfferDb.ts
CHANGED
|
@@ -169,6 +169,41 @@
|
|
|
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
|
+
|
|
172
207
|
// Use this function when you want to return a single record
|
|
173
208
|
public async getDiscounts(offerId: string) {
|
|
174
209
|
return await this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
|
package/src/db-sdk-v1/OrderDb.ts
CHANGED
|
@@ -558,6 +558,41 @@
|
|
|
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
|
+
|
|
561
596
|
// Use this function when you want to return a single record
|
|
562
597
|
public async getPicRequests(orderId: string) {
|
|
563
598
|
return await this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
|
|
@@ -484,6 +484,41 @@
|
|
|
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
|
+
|
|
487
522
|
// Use this function when you want to return a single record
|
|
488
523
|
public async getVoiceConfigurations(orderItemId: string) {
|
|
489
524
|
return await this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
|
|
@@ -169,4 +169,39 @@
|
|
|
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
|
+
|
|
172
207
|
}
|
|
@@ -134,4 +134,39 @@
|
|
|
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
|
+
|
|
137
172
|
}
|
|
@@ -379,4 +379,43 @@
|
|
|
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
|
+
}
|
|
382
421
|
}
|
|
@@ -134,4 +134,39 @@
|
|
|
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
|
+
|
|
137
172
|
}
|
|
@@ -99,4 +99,39 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
// Use this function when you want to return a single record
|
|
103
|
+
public async getServices(serviceId: string) {
|
|
104
|
+
return await this._getLinks(this.moduleName, this.entityName, serviceId, 'Service');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public async linkServiceServices(serviceId: string, serviceIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
108
|
+
|
|
109
|
+
const associationDtos = [];
|
|
110
|
+
for(const param of serviceIds){
|
|
111
|
+
associationDtos.push({
|
|
112
|
+
entity: 'ServiceModule:Service',
|
|
113
|
+
recordId: param.id,
|
|
114
|
+
linkType: 'Service__Service',
|
|
115
|
+
relationType: param?.relationType,
|
|
116
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return await this._createLinks(this.moduleName, this.entityName, serviceId, associationDtos);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public async unlinkServiceServices(serviceId: string, linkedServiceIds: string[]) {
|
|
124
|
+
|
|
125
|
+
const associationDtos = [];
|
|
126
|
+
for(const pk of linkedServiceIds){
|
|
127
|
+
associationDtos.push({
|
|
128
|
+
primaryKey: serviceId,
|
|
129
|
+
linkedRecordPrimaryKey: pk,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return await this._deleteLinks(this.moduleName, this.entityName, serviceId, associationDtos);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
102
137
|
}
|
|
@@ -134,6 +134,41 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
|
|
137
|
+
// Use this function when you want to return a single record
|
|
138
|
+
public async getSplitOrders(splitOrderId: string) {
|
|
139
|
+
return await this._getLinks(this.moduleName, this.entityName, splitOrderId, 'SplitOrder');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
public async linkSplitOrderSplitOrders(splitOrderId: string, splitOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
143
|
+
|
|
144
|
+
const associationDtos = [];
|
|
145
|
+
for(const param of splitOrderIds){
|
|
146
|
+
associationDtos.push({
|
|
147
|
+
entity: 'OrderModule:SplitOrder',
|
|
148
|
+
recordId: param.id,
|
|
149
|
+
linkType: 'SplitOrder__SplitOrder',
|
|
150
|
+
relationType: param?.relationType,
|
|
151
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return await this._createLinks(this.moduleName, this.entityName, splitOrderId, associationDtos);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public async unlinkSplitOrderSplitOrders(splitOrderId: string, linkedSplitOrderIds: string[]) {
|
|
159
|
+
|
|
160
|
+
const associationDtos = [];
|
|
161
|
+
for(const pk of linkedSplitOrderIds){
|
|
162
|
+
associationDtos.push({
|
|
163
|
+
primaryKey: splitOrderId,
|
|
164
|
+
linkedRecordPrimaryKey: pk,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return await this._deleteLinks(this.moduleName, this.entityName, splitOrderId, associationDtos);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
137
172
|
public async linkOrderSplitOrders(splitOrderId: string, orderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
138
173
|
|
|
139
174
|
const associationDtos = [];
|
|
@@ -99,6 +99,41 @@
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
// Use this function when you want to return a single record
|
|
103
|
+
public async getTransactions(transactionId: string) {
|
|
104
|
+
return await this._getLinks(this.moduleName, this.entityName, transactionId, 'Transaction');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public async linkTransactionTransactions(transactionId: string, transactionIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
108
|
+
|
|
109
|
+
const associationDtos = [];
|
|
110
|
+
for(const param of transactionIds){
|
|
111
|
+
associationDtos.push({
|
|
112
|
+
entity: 'BillingModule:Transaction',
|
|
113
|
+
recordId: param.id,
|
|
114
|
+
linkType: 'Transaction__Transaction',
|
|
115
|
+
relationType: param?.relationType,
|
|
116
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return await this._createLinks(this.moduleName, this.entityName, transactionId, associationDtos);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public async unlinkTransactionTransactions(transactionId: string, linkedTransactionIds: string[]) {
|
|
124
|
+
|
|
125
|
+
const associationDtos = [];
|
|
126
|
+
for(const pk of linkedTransactionIds){
|
|
127
|
+
associationDtos.push({
|
|
128
|
+
primaryKey: transactionId,
|
|
129
|
+
linkedRecordPrimaryKey: pk,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return await this._deleteLinks(this.moduleName, this.entityName, transactionId, associationDtos);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
102
137
|
// Use this function when you want to return a single record
|
|
103
138
|
public async getInvoices(transactionId: string) {
|
|
104
139
|
return await this._getLinks(this.moduleName, this.entityName, transactionId, 'Invoice');
|
|
@@ -729,6 +729,41 @@
|
|
|
729
729
|
}
|
|
730
730
|
|
|
731
731
|
|
|
732
|
+
// Use this function when you want to return a single record
|
|
733
|
+
public async getCustomerDeviceOntRemovals(workOrderId: string) {
|
|
734
|
+
return await this._getLinks(this.moduleName, this.entityName, workOrderId, 'CustomerDeviceOntRemoval');
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
public async linkWorkOrderCustomerDeviceOntRemovals(workOrderId: string, customerDeviceOntRemovalIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
738
|
+
|
|
739
|
+
const associationDtos = [];
|
|
740
|
+
for(const param of customerDeviceOntRemovalIds){
|
|
741
|
+
associationDtos.push({
|
|
742
|
+
entity: 'ServiceModule:CustomerDeviceOntRemoval',
|
|
743
|
+
recordId: param.id,
|
|
744
|
+
linkType: 'WorkOrder_CustomerDeviceOntRemoval',
|
|
745
|
+
relationType: param?.relationType,
|
|
746
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
return await this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
public async unlinkWorkOrderCustomerDeviceOntRemovals(workOrderId: string, linkedCustomerDeviceOntRemovalIds: string[]) {
|
|
754
|
+
|
|
755
|
+
const associationDtos = [];
|
|
756
|
+
for(const pk of linkedCustomerDeviceOntRemovalIds){
|
|
757
|
+
associationDtos.push({
|
|
758
|
+
primaryKey: workOrderId,
|
|
759
|
+
linkedRecordPrimaryKey: pk,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
return await this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
|
|
732
767
|
// Use this function when you want to return a single record
|
|
733
768
|
public async getYfEquipmentCollections(workOrderId: string) {
|
|
734
769
|
return await this._getLinks(this.moduleName, this.entityName, workOrderId, 'YfEquipmentCollection');
|
|
@@ -1184,6 +1219,41 @@
|
|
|
1184
1219
|
}
|
|
1185
1220
|
|
|
1186
1221
|
|
|
1222
|
+
// Use this function when you want to return a single record
|
|
1223
|
+
public async getWorkOrders(workOrderId: string) {
|
|
1224
|
+
return await this._getLinks(this.moduleName, this.entityName, workOrderId, 'WorkOrder');
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
public async linkWorkOrderWorkOrders(workOrderId: string, workOrderIds: {id: string, relationType?: RelationTypeEnum, relatedAssociationId?: string}[]) {
|
|
1228
|
+
|
|
1229
|
+
const associationDtos = [];
|
|
1230
|
+
for(const param of workOrderIds){
|
|
1231
|
+
associationDtos.push({
|
|
1232
|
+
entity: 'FieldServiceModule:WorkOrder',
|
|
1233
|
+
recordId: param.id,
|
|
1234
|
+
linkType: 'WorkOrder__WorkOrder',
|
|
1235
|
+
relationType: param?.relationType,
|
|
1236
|
+
relatedAssociationId: param?.relatedAssociationId
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
return await this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
public async unlinkWorkOrderWorkOrders(workOrderId: string, linkedWorkOrderIds: string[]) {
|
|
1244
|
+
|
|
1245
|
+
const associationDtos = [];
|
|
1246
|
+
for(const pk of linkedWorkOrderIds){
|
|
1247
|
+
associationDtos.push({
|
|
1248
|
+
primaryKey: workOrderId,
|
|
1249
|
+
linkedRecordPrimaryKey: pk,
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
return await this._deleteLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
|
|
1187
1257
|
// Use this function when you want to return a single record
|
|
1188
1258
|
public async getOhAuditOfInstallations(workOrderId: string) {
|
|
1189
1259
|
return await this._getLinks(this.moduleName, this.entityName, workOrderId, 'OhAuditOfInstallation');
|