@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
|
@@ -116,5 +116,31 @@ class InvoiceItemApi extends api_provider_1.ApiProvider {
|
|
|
116
116
|
return yield this._deleteLinks(this.moduleName, this.entityName, invoiceItemId, linkedInvoiceId);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
+
// Use this function when you want to return a single record
|
|
120
|
+
getInvoiceItems(invoiceItemId) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
return yield this._getLinks(this.moduleName, this.entityName, invoiceItemId, 'InvoiceItem');
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
linkInvoiceItemInvoiceItems(invoiceItemId, invoiceItemIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const associationDtos = [];
|
|
128
|
+
for (const param of invoiceItemIds) {
|
|
129
|
+
associationDtos.push({
|
|
130
|
+
entity: 'BillingModule:InvoiceItem',
|
|
131
|
+
recordId: param.id,
|
|
132
|
+
linkType: 'InvoiceItem__InvoiceItem',
|
|
133
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
134
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return yield this._createLinks(this.moduleName, this.entityName, invoiceItemId, associationDtos);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
unLinkInvoiceItemInvoiceItems(invoiceItemId, linkedInvoiceItemId) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, invoiceItemId, linkedInvoiceItemId);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
119
145
|
}
|
|
120
146
|
exports.InvoiceItemApi = InvoiceItemApi;
|
|
@@ -41,6 +41,13 @@ export declare class MilestoneApi extends ApiProvider {
|
|
|
41
41
|
relatedAssociationId?: string;
|
|
42
42
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
43
|
unLinkMilestoneTasks(milestoneId: string, linkedTaskId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
|
+
getMilestones(milestoneId: string): Promise<any>;
|
|
45
|
+
linkMilestoneMilestones(milestoneId: string, milestoneIds: {
|
|
46
|
+
id: string;
|
|
47
|
+
relationType?: RelationTypeEnum;
|
|
48
|
+
relatedAssociationId?: string;
|
|
49
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
50
|
+
unLinkMilestoneMilestones(milestoneId: string, linkedMilestoneId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
51
|
getNotes(milestoneId: string): Promise<any>;
|
|
45
52
|
linkMilestoneNotes(milestoneId: string, noteIds: {
|
|
46
53
|
id: string;
|
|
@@ -143,6 +143,32 @@ class MilestoneApi extends api_provider_1.ApiProvider {
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
// Use this function when you want to return a single record
|
|
146
|
+
getMilestones(milestoneId) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return yield this._getLinks(this.moduleName, this.entityName, milestoneId, 'Milestone');
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
linkMilestoneMilestones(milestoneId, milestoneIds) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const associationDtos = [];
|
|
154
|
+
for (const param of milestoneIds) {
|
|
155
|
+
associationDtos.push({
|
|
156
|
+
entity: 'ProjectModule:Milestone',
|
|
157
|
+
recordId: param.id,
|
|
158
|
+
linkType: 'Milestone__Milestone',
|
|
159
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
160
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return yield this._createLinks(this.moduleName, this.entityName, milestoneId, associationDtos);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
unLinkMilestoneMilestones(milestoneId, linkedMilestoneId) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, milestoneId, linkedMilestoneId);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// Use this function when you want to return a single record
|
|
146
172
|
getNotes(milestoneId) {
|
|
147
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
174
|
return yield this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
|
|
@@ -356,6 +356,13 @@ export declare class NoteApi extends ApiProvider {
|
|
|
356
356
|
relatedAssociationId?: string;
|
|
357
357
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
358
358
|
unLinkSmsMessageNotes(noteId: string, linkedSmsMessageId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
359
|
+
getNotes(noteId: string): Promise<any>;
|
|
360
|
+
linkNoteNotes(noteId: string, noteIds: {
|
|
361
|
+
id: string;
|
|
362
|
+
relationType?: RelationTypeEnum;
|
|
363
|
+
relatedAssociationId?: string;
|
|
364
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
365
|
+
unLinkNoteNotes(noteId: string, linkedNoteId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
359
366
|
linkNoteFiles(noteId: string, fileIds: {
|
|
360
367
|
id: string;
|
|
361
368
|
relationType?: RelationTypeEnum;
|
|
@@ -1312,6 +1312,32 @@ class NoteApi extends api_provider_1.ApiProvider {
|
|
|
1312
1312
|
return yield this._deleteLinks(this.moduleName, this.entityName, noteId, linkedSmsMessageId);
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
|
+
// Use this function when you want to return a single record
|
|
1316
|
+
getNotes(noteId) {
|
|
1317
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1318
|
+
return yield this._getLinks(this.moduleName, this.entityName, noteId, 'Note');
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
linkNoteNotes(noteId, noteIds) {
|
|
1322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1323
|
+
const associationDtos = [];
|
|
1324
|
+
for (const param of noteIds) {
|
|
1325
|
+
associationDtos.push({
|
|
1326
|
+
entity: 'SupportModule:Note',
|
|
1327
|
+
recordId: param.id,
|
|
1328
|
+
linkType: 'Note__Note',
|
|
1329
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
1330
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
return yield this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
unLinkNoteNotes(noteId, linkedNoteId) {
|
|
1337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1338
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, noteId, linkedNoteId);
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1315
1341
|
linkNoteFiles(noteId, fileIds) {
|
|
1316
1342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1317
1343
|
const associationDtos = [];
|
|
@@ -48,6 +48,13 @@ export declare class OfferApi extends ApiProvider {
|
|
|
48
48
|
relatedAssociationId?: string;
|
|
49
49
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
50
50
|
unLinkOrderItemOffers(offerId: string, linkedOrderItemId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
51
|
+
getOffers(offerId: string): Promise<any>;
|
|
52
|
+
linkOfferOffers(offerId: string, offerIds: {
|
|
53
|
+
id: string;
|
|
54
|
+
relationType?: RelationTypeEnum;
|
|
55
|
+
relatedAssociationId?: string;
|
|
56
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
57
|
+
unLinkOfferOffers(offerId: string, linkedOfferId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
51
58
|
getDiscounts(offerId: string): Promise<any>;
|
|
52
59
|
linkOfferDiscounts(offerId: string, discountIds: {
|
|
53
60
|
id: string;
|
|
@@ -169,6 +169,32 @@ class OfferApi extends api_provider_1.ApiProvider {
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
// Use this function when you want to return a single record
|
|
172
|
+
getOffers(offerId) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
return yield this._getLinks(this.moduleName, this.entityName, offerId, 'Offer');
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
linkOfferOffers(offerId, offerIds) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
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 === null || param === void 0 ? void 0 : param.relationType,
|
|
186
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
return yield this._createLinks(this.moduleName, this.entityName, offerId, associationDtos);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
unLinkOfferOffers(offerId, linkedOfferId) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, offerId, linkedOfferId);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
// Use this function when you want to return a single record
|
|
172
198
|
getDiscounts(offerId) {
|
|
173
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
174
200
|
return yield this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
|
|
@@ -126,6 +126,13 @@ export declare class OrderApi extends ApiProvider {
|
|
|
126
126
|
relatedAssociationId?: string;
|
|
127
127
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
128
128
|
unLinkOrderActivitys(orderId: string, linkedActivityId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
129
|
+
getOrders(orderId: string): Promise<any>;
|
|
130
|
+
linkOrderOrders(orderId: string, orderIds: {
|
|
131
|
+
id: string;
|
|
132
|
+
relationType?: RelationTypeEnum;
|
|
133
|
+
relatedAssociationId?: string;
|
|
134
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
135
|
+
unLinkOrderOrders(orderId: string, linkedOrderId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
129
136
|
getPicRequests(orderId: string): Promise<any>;
|
|
130
137
|
linkPicRequestOrders(orderId: string, picRequestIds: {
|
|
131
138
|
id: string;
|
|
@@ -460,6 +460,32 @@ class OrderApi extends api_provider_1.ApiProvider {
|
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
// Use this function when you want to return a single record
|
|
463
|
+
getOrders(orderId) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
+
return yield this._getLinks(this.moduleName, this.entityName, orderId, 'Order');
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
linkOrderOrders(orderId, orderIds) {
|
|
469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
470
|
+
const associationDtos = [];
|
|
471
|
+
for (const param of orderIds) {
|
|
472
|
+
associationDtos.push({
|
|
473
|
+
entity: 'OrderModule:Order',
|
|
474
|
+
recordId: param.id,
|
|
475
|
+
linkType: 'Order__Order',
|
|
476
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
477
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
return yield this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
unLinkOrderOrders(orderId, linkedOrderId) {
|
|
484
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
485
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, orderId, linkedOrderId);
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
// Use this function when you want to return a single record
|
|
463
489
|
getPicRequests(orderId) {
|
|
464
490
|
return __awaiter(this, void 0, void 0, function* () {
|
|
465
491
|
return yield this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
|
|
@@ -111,6 +111,13 @@ export declare class OrderItemApi extends ApiProvider {
|
|
|
111
111
|
relatedAssociationId?: string;
|
|
112
112
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
113
113
|
unLinkOrderItemActivitys(orderItemId: string, linkedActivityId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
114
|
+
getOrderItems(orderItemId: string): Promise<any>;
|
|
115
|
+
linkOrderItemOrderItems(orderItemId: string, orderItemIds: {
|
|
116
|
+
id: string;
|
|
117
|
+
relationType?: RelationTypeEnum;
|
|
118
|
+
relatedAssociationId?: string;
|
|
119
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
120
|
+
unLinkOrderItemOrderItems(orderItemId: string, linkedOrderItemId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
114
121
|
getVoiceConfigurations(orderItemId: string): Promise<any>;
|
|
115
122
|
linkOrderItemVoiceConfigurations(orderItemId: string, voiceConfigurationIds: {
|
|
116
123
|
id: string;
|
|
@@ -403,6 +403,32 @@ class OrderItemApi extends api_provider_1.ApiProvider {
|
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
// Use this function when you want to return a single record
|
|
406
|
+
getOrderItems(orderItemId) {
|
|
407
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
408
|
+
return yield this._getLinks(this.moduleName, this.entityName, orderItemId, 'OrderItem');
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
linkOrderItemOrderItems(orderItemId, orderItemIds) {
|
|
412
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
413
|
+
const associationDtos = [];
|
|
414
|
+
for (const param of orderItemIds) {
|
|
415
|
+
associationDtos.push({
|
|
416
|
+
entity: 'OrderModule:OrderItem',
|
|
417
|
+
recordId: param.id,
|
|
418
|
+
linkType: 'OrderItem__OrderItem',
|
|
419
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
420
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
return yield this._createLinks(this.moduleName, this.entityName, orderItemId, associationDtos);
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
unLinkOrderItemOrderItems(orderItemId, linkedOrderItemId) {
|
|
427
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
428
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, orderItemId, linkedOrderItemId);
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
// Use this function when you want to return a single record
|
|
406
432
|
getVoiceConfigurations(orderItemId) {
|
|
407
433
|
return __awaiter(this, void 0, void 0, function* () {
|
|
408
434
|
return yield this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
|
|
@@ -48,4 +48,11 @@ export declare class OrganizationApi extends ApiProvider {
|
|
|
48
48
|
relatedAssociationId?: string;
|
|
49
49
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
50
50
|
unLinkLeadOrganizations(organizationId: string, linkedLeadId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
51
|
+
getOrganizations(organizationId: string): Promise<any>;
|
|
52
|
+
linkOrganizationOrganizations(organizationId: string, organizationIds: {
|
|
53
|
+
id: string;
|
|
54
|
+
relationType?: RelationTypeEnum;
|
|
55
|
+
relatedAssociationId?: string;
|
|
56
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
57
|
+
unLinkOrganizationOrganizations(organizationId: string, linkedOrganizationId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
51
58
|
}
|
|
@@ -168,5 +168,31 @@ class OrganizationApi extends api_provider_1.ApiProvider {
|
|
|
168
168
|
return yield this._deleteLinks(this.moduleName, this.entityName, organizationId, linkedLeadId);
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
+
// Use this function when you want to return a single record
|
|
172
|
+
getOrganizations(organizationId) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
return yield this._getLinks(this.moduleName, this.entityName, organizationId, 'Organization');
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
linkOrganizationOrganizations(organizationId, organizationIds) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
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 === null || param === void 0 ? void 0 : param.relationType,
|
|
186
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
return yield this._createLinks(this.moduleName, this.entityName, organizationId, associationDtos);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
unLinkOrganizationOrganizations(organizationId, linkedOrganizationId) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, organizationId, linkedOrganizationId);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
171
197
|
}
|
|
172
198
|
exports.OrganizationApi = OrganizationApi;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OauthParams } from '@d19n/odin-sdk-generator/dist/api.interfaces';
|
|
2
2
|
import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
|
|
3
3
|
import { OdinSearchV2 } from '@d19n/odin-types/dist/interfaces/v2.db.interfaces';
|
|
4
|
-
import { OdinRecordCreateDto, OdinRecordUpdateDto, RelationTypeEnum } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto, OdinLinkedRecordUpdateDto, RelationTypeEnum } from '@d19n/odin-types/dist/dtos/odin.dtos';
|
|
5
5
|
export declare class ProductApi extends ApiProvider {
|
|
6
6
|
protected readonly authParams: OauthParams;
|
|
7
7
|
protected readonly authToken?: string;
|
|
@@ -90,4 +90,12 @@ export declare class ProductApi extends ApiProvider {
|
|
|
90
90
|
relatedAssociationId?: string;
|
|
91
91
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
92
92
|
unLinkOrderItemProducts(productId: string, linkedOrderItemId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
93
|
+
getProducts(productId: string): Promise<any>;
|
|
94
|
+
linkProductProducts(productId: string, productIds: {
|
|
95
|
+
id: string;
|
|
96
|
+
relationType?: RelationTypeEnum;
|
|
97
|
+
relatedAssociationId?: string;
|
|
98
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
99
|
+
unLinkProductProducts(productId: string, linkedProductId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
100
|
+
addProductProductLinkProperties(productId: string, dbRecordAssociationId: string, updateDto: OdinLinkedRecordUpdateDto): Promise<import("@d19n/odin-types/dist/types/odin.types").LinkedOdinRecord<{}>>;
|
|
93
101
|
}
|
|
@@ -324,5 +324,36 @@ class ProductApi extends api_provider_1.ApiProvider {
|
|
|
324
324
|
return yield this._deleteLinks(this.moduleName, this.entityName, productId, linkedOrderItemId);
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
+
// Use this function when you want to return a single record
|
|
328
|
+
getProducts(productId) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
return yield this._getLinks(this.moduleName, this.entityName, productId, 'Product');
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
linkProductProducts(productId, productIds) {
|
|
334
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
335
|
+
const associationDtos = [];
|
|
336
|
+
for (const param of productIds) {
|
|
337
|
+
associationDtos.push({
|
|
338
|
+
entity: 'ProductModule:Product',
|
|
339
|
+
recordId: param.id,
|
|
340
|
+
linkType: 'Product__Product',
|
|
341
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
342
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return yield this._createLinks(this.moduleName, this.entityName, productId, associationDtos);
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
unLinkProductProducts(productId, linkedProductId) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, productId, linkedProductId);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
addProductProductLinkProperties(productId, dbRecordAssociationId, updateDto) {
|
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
return yield this._updateLinkProperties('ProductModule', 'Product', productId, dbRecordAssociationId, updateDto);
|
|
356
|
+
});
|
|
357
|
+
}
|
|
327
358
|
}
|
|
328
359
|
exports.ProductApi = ProductApi;
|
|
@@ -41,4 +41,11 @@ export declare class ProductComponentApi extends ApiProvider {
|
|
|
41
41
|
relatedAssociationId?: string;
|
|
42
42
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
43
|
unLinkProductProductComponents(productComponentId: string, linkedProductId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
|
+
getProductComponents(productComponentId: string): Promise<any>;
|
|
45
|
+
linkProductComponentProductComponents(productComponentId: string, productComponentIds: {
|
|
46
|
+
id: string;
|
|
47
|
+
relationType?: RelationTypeEnum;
|
|
48
|
+
relatedAssociationId?: string;
|
|
49
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
50
|
+
unLinkProductComponentProductComponents(productComponentId: string, linkedProductComponentId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
51
|
}
|
|
@@ -142,5 +142,31 @@ class ProductComponentApi extends api_provider_1.ApiProvider {
|
|
|
142
142
|
return yield this._deleteLinks(this.moduleName, this.entityName, productComponentId, linkedProductId);
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
+
// Use this function when you want to return a single record
|
|
146
|
+
getProductComponents(productComponentId) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return yield this._getLinks(this.moduleName, this.entityName, productComponentId, 'ProductComponent');
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
linkProductComponentProductComponents(productComponentId, productComponentIds) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const associationDtos = [];
|
|
154
|
+
for (const param of productComponentIds) {
|
|
155
|
+
associationDtos.push({
|
|
156
|
+
entity: 'ProductModule:ProductComponent',
|
|
157
|
+
recordId: param.id,
|
|
158
|
+
linkType: 'ProductComponent__ProductComponent',
|
|
159
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
160
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return yield this._createLinks(this.moduleName, this.entityName, productComponentId, associationDtos);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
unLinkProductComponentProductComponents(productComponentId, linkedProductComponentId) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, productComponentId, linkedProductComponentId);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
145
171
|
}
|
|
146
172
|
exports.ProductComponentApi = ProductComponentApi;
|
|
@@ -41,4 +41,11 @@ export declare class RestrictionApi extends ApiProvider {
|
|
|
41
41
|
relatedAssociationId?: string;
|
|
42
42
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
43
|
unLinkProductComponentRestrictions(restrictionId: string, linkedProductComponentId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
|
+
getRestrictions(restrictionId: string): Promise<any>;
|
|
45
|
+
linkRestrictionRestrictions(restrictionId: string, restrictionIds: {
|
|
46
|
+
id: string;
|
|
47
|
+
relationType?: RelationTypeEnum;
|
|
48
|
+
relatedAssociationId?: string;
|
|
49
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
50
|
+
unLinkRestrictionRestrictions(restrictionId: string, linkedRestrictionId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
51
|
}
|
|
@@ -142,5 +142,31 @@ class RestrictionApi extends api_provider_1.ApiProvider {
|
|
|
142
142
|
return yield this._deleteLinks(this.moduleName, this.entityName, restrictionId, linkedProductComponentId);
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
+
// Use this function when you want to return a single record
|
|
146
|
+
getRestrictions(restrictionId) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return yield this._getLinks(this.moduleName, this.entityName, restrictionId, 'Restriction');
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
linkRestrictionRestrictions(restrictionId, restrictionIds) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const associationDtos = [];
|
|
154
|
+
for (const param of restrictionIds) {
|
|
155
|
+
associationDtos.push({
|
|
156
|
+
entity: 'ProductModule:Restriction',
|
|
157
|
+
recordId: param.id,
|
|
158
|
+
linkType: 'Restriction__Restriction',
|
|
159
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
160
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return yield this._createLinks(this.moduleName, this.entityName, restrictionId, associationDtos);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
unLinkRestrictionRestrictions(restrictionId, linkedRestrictionId) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, restrictionId, linkedRestrictionId);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
145
171
|
}
|
|
146
172
|
exports.RestrictionApi = RestrictionApi;
|
|
@@ -34,4 +34,11 @@ export declare class ServiceApi extends ApiProvider {
|
|
|
34
34
|
relatedAssociationId?: string;
|
|
35
35
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
36
36
|
unLinkProductServices(serviceId: string, linkedProductId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
37
|
+
getServices(serviceId: string): Promise<any>;
|
|
38
|
+
linkServiceServices(serviceId: string, serviceIds: {
|
|
39
|
+
id: string;
|
|
40
|
+
relationType?: RelationTypeEnum;
|
|
41
|
+
relatedAssociationId?: string;
|
|
42
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
|
+
unLinkServiceServices(serviceId: string, linkedServiceId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
37
44
|
}
|
|
@@ -116,5 +116,31 @@ class ServiceApi extends api_provider_1.ApiProvider {
|
|
|
116
116
|
return yield this._deleteLinks(this.moduleName, this.entityName, serviceId, linkedProductId);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
+
// Use this function when you want to return a single record
|
|
120
|
+
getServices(serviceId) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
return yield this._getLinks(this.moduleName, this.entityName, serviceId, 'Service');
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
linkServiceServices(serviceId, serviceIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const associationDtos = [];
|
|
128
|
+
for (const param of serviceIds) {
|
|
129
|
+
associationDtos.push({
|
|
130
|
+
entity: 'ServiceModule:Service',
|
|
131
|
+
recordId: param.id,
|
|
132
|
+
linkType: 'Service__Service',
|
|
133
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
134
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return yield this._createLinks(this.moduleName, this.entityName, serviceId, associationDtos);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
unLinkServiceServices(serviceId, linkedServiceId) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, serviceId, linkedServiceId);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
119
145
|
}
|
|
120
146
|
exports.ServiceApi = ServiceApi;
|
|
@@ -41,6 +41,13 @@ export declare class SplitOrderApi extends ApiProvider {
|
|
|
41
41
|
relatedAssociationId?: string;
|
|
42
42
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
43
|
unLinkSplitOrderOrders(splitOrderId: string, linkedOrderId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
|
+
getSplitOrders(splitOrderId: string): Promise<any>;
|
|
45
|
+
linkSplitOrderSplitOrders(splitOrderId: string, splitOrderIds: {
|
|
46
|
+
id: string;
|
|
47
|
+
relationType?: RelationTypeEnum;
|
|
48
|
+
relatedAssociationId?: string;
|
|
49
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
50
|
+
unLinkSplitOrderSplitOrders(splitOrderId: string, linkedSplitOrderId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
51
|
linkOrderSplitOrders(splitOrderId: string, orderIds: {
|
|
45
52
|
id: string;
|
|
46
53
|
relationType?: RelationTypeEnum;
|
|
@@ -142,6 +142,32 @@ class SplitOrderApi extends api_provider_1.ApiProvider {
|
|
|
142
142
|
return yield this._deleteLinks(this.moduleName, this.entityName, splitOrderId, linkedOrderId);
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
+
// Use this function when you want to return a single record
|
|
146
|
+
getSplitOrders(splitOrderId) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return yield this._getLinks(this.moduleName, this.entityName, splitOrderId, 'SplitOrder');
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
linkSplitOrderSplitOrders(splitOrderId, splitOrderIds) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const associationDtos = [];
|
|
154
|
+
for (const param of splitOrderIds) {
|
|
155
|
+
associationDtos.push({
|
|
156
|
+
entity: 'OrderModule:SplitOrder',
|
|
157
|
+
recordId: param.id,
|
|
158
|
+
linkType: 'SplitOrder__SplitOrder',
|
|
159
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
160
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return yield this._createLinks(this.moduleName, this.entityName, splitOrderId, associationDtos);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
unLinkSplitOrderSplitOrders(splitOrderId, linkedSplitOrderId) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, splitOrderId, linkedSplitOrderId);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
145
171
|
linkOrderSplitOrders(splitOrderId, orderIds) {
|
|
146
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
173
|
const associationDtos = [];
|
|
@@ -34,6 +34,13 @@ export declare class TransactionApi extends ApiProvider {
|
|
|
34
34
|
relatedAssociationId?: string;
|
|
35
35
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
36
36
|
unLinkTransactionPaymentMethods(transactionId: string, linkedPaymentMethodId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
37
|
+
getTransactions(transactionId: string): Promise<any>;
|
|
38
|
+
linkTransactionTransactions(transactionId: string, transactionIds: {
|
|
39
|
+
id: string;
|
|
40
|
+
relationType?: RelationTypeEnum;
|
|
41
|
+
relatedAssociationId?: string;
|
|
42
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
|
+
unLinkTransactionTransactions(transactionId: string, linkedTransactionId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
37
44
|
getInvoices(transactionId: string): Promise<any>;
|
|
38
45
|
linkInvoiceTransactions(transactionId: string, invoiceIds: {
|
|
39
46
|
id: string;
|
|
@@ -117,6 +117,32 @@ class TransactionApi extends api_provider_1.ApiProvider {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
// Use this function when you want to return a single record
|
|
120
|
+
getTransactions(transactionId) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
return yield this._getLinks(this.moduleName, this.entityName, transactionId, 'Transaction');
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
linkTransactionTransactions(transactionId, transactionIds) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
const associationDtos = [];
|
|
128
|
+
for (const param of transactionIds) {
|
|
129
|
+
associationDtos.push({
|
|
130
|
+
entity: 'BillingModule:Transaction',
|
|
131
|
+
recordId: param.id,
|
|
132
|
+
linkType: 'Transaction__Transaction',
|
|
133
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
134
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return yield this._createLinks(this.moduleName, this.entityName, transactionId, associationDtos);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
unLinkTransactionTransactions(transactionId, linkedTransactionId) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, transactionId, linkedTransactionId);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
// Use this function when you want to return a single record
|
|
120
146
|
getInvoices(transactionId) {
|
|
121
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
148
|
return yield this._getLinks(this.moduleName, this.entityName, transactionId, 'Invoice');
|