@d19n/youfibre-odin-sdk 1.0.21 → 1.0.22
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/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 +7 -0
- package/dist/api-sdk-v1/WorkOrderApi.js +26 -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/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 +7 -0
- package/dist/db-sdk-v1/WorkOrderDb.js +33 -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/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 +27 -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/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 +35 -0
|
@@ -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');
|
|
@@ -251,6 +251,13 @@ export declare class WorkOrderApi extends ApiProvider {
|
|
|
251
251
|
relatedAssociationId?: string;
|
|
252
252
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
253
253
|
unLinkWorkOrderOhInstallationAudits(workOrderId: string, linkedOhInstallationAuditId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
254
|
+
getWorkOrders(workOrderId: string): Promise<any>;
|
|
255
|
+
linkWorkOrderWorkOrders(workOrderId: string, workOrderIds: {
|
|
256
|
+
id: string;
|
|
257
|
+
relationType?: RelationTypeEnum;
|
|
258
|
+
relatedAssociationId?: string;
|
|
259
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
260
|
+
unLinkWorkOrderWorkOrders(workOrderId: string, linkedWorkOrderId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
254
261
|
getOhAuditOfInstallations(workOrderId: string): Promise<any>;
|
|
255
262
|
linkWorkOrderOhAuditOfInstallations(workOrderId: string, ohAuditOfInstallationIds: {
|
|
256
263
|
id: string;
|
|
@@ -923,6 +923,32 @@ class WorkOrderApi extends api_provider_1.ApiProvider {
|
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
// Use this function when you want to return a single record
|
|
926
|
+
getWorkOrders(workOrderId) {
|
|
927
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
928
|
+
return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'WorkOrder');
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
linkWorkOrderWorkOrders(workOrderId, workOrderIds) {
|
|
932
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
933
|
+
const associationDtos = [];
|
|
934
|
+
for (const param of workOrderIds) {
|
|
935
|
+
associationDtos.push({
|
|
936
|
+
entity: 'FieldServiceModule:WorkOrder',
|
|
937
|
+
recordId: param.id,
|
|
938
|
+
linkType: 'WorkOrder__WorkOrder',
|
|
939
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
940
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
return yield this._createLinks(this.moduleName, this.entityName, workOrderId, associationDtos);
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
unLinkWorkOrderWorkOrders(workOrderId, linkedWorkOrderId) {
|
|
947
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
948
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, workOrderId, linkedWorkOrderId);
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
// Use this function when you want to return a single record
|
|
926
952
|
getOhAuditOfInstallations(workOrderId) {
|
|
927
953
|
return __awaiter(this, void 0, void 0, function* () {
|
|
928
954
|
return yield this._getLinks(this.moduleName, this.entityName, workOrderId, 'OhAuditOfInstallation');
|
|
@@ -24,6 +24,13 @@ export declare class BillingRequestDb extends DbProvider {
|
|
|
24
24
|
relatedAssociationId?: string;
|
|
25
25
|
}[]): Promise<any>;
|
|
26
26
|
unlinkContactBillingRequests(billingRequestId: string, linkedContactIds: string[]): Promise<any>;
|
|
27
|
+
getBillingRequests(billingRequestId: string): Promise<any>;
|
|
28
|
+
linkBillingRequestBillingRequests(billingRequestId: string, billingRequestIds: {
|
|
29
|
+
id: string;
|
|
30
|
+
relationType?: RelationTypeEnum;
|
|
31
|
+
relatedAssociationId?: string;
|
|
32
|
+
}[]): Promise<any>;
|
|
33
|
+
unlinkBillingRequestBillingRequests(billingRequestId: string, linkedBillingRequestIds: string[]): Promise<any>;
|
|
27
34
|
getFiles(billingRequestId: string): Promise<any>;
|
|
28
35
|
linkBillingRequestFiles(billingRequestId: string, fileIds: {
|
|
29
36
|
id: string;
|
|
@@ -113,6 +113,39 @@ class BillingRequestDb extends db_provider_1.DbProvider {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
// Use this function when you want to return a single record
|
|
116
|
+
getBillingRequests(billingRequestId) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return yield this._getLinks(this.moduleName, this.entityName, billingRequestId, 'BillingRequest');
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
linkBillingRequestBillingRequests(billingRequestId, billingRequestIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const associationDtos = [];
|
|
124
|
+
for (const param of billingRequestIds) {
|
|
125
|
+
associationDtos.push({
|
|
126
|
+
entity: 'BillingModule:BillingRequest',
|
|
127
|
+
recordId: param.id,
|
|
128
|
+
linkType: 'BillingRequest__BillingRequest',
|
|
129
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
130
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return yield this._createLinks(this.moduleName, this.entityName, billingRequestId, associationDtos);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
unlinkBillingRequestBillingRequests(billingRequestId, linkedBillingRequestIds) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const associationDtos = [];
|
|
139
|
+
for (const pk of linkedBillingRequestIds) {
|
|
140
|
+
associationDtos.push({
|
|
141
|
+
primaryKey: billingRequestId,
|
|
142
|
+
linkedRecordPrimaryKey: pk,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, billingRequestId, associationDtos);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// Use this function when you want to return a single record
|
|
116
149
|
getFiles(billingRequestId) {
|
|
117
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
118
151
|
return yield this._getLinks(this.moduleName, this.entityName, billingRequestId, 'File');
|
|
@@ -17,6 +17,13 @@ export declare class CaseDb extends DbProvider {
|
|
|
17
17
|
update(updateDtos: OdinRecordUpdateDto[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").IDbRecordCreateUpdateRes[]>;
|
|
18
18
|
delete(caseIds: string[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").DbRecordDeleted[]>;
|
|
19
19
|
restore(caseIds: string[]): Promise<import("@d19n/odin-types/dist/interfaces/v1.db.interfaces").DbRecordRestored[]>;
|
|
20
|
+
getCases(caseId: string): Promise<any>;
|
|
21
|
+
linkCaseCases(caseId: string, caseIds: {
|
|
22
|
+
id: string;
|
|
23
|
+
relationType?: RelationTypeEnum;
|
|
24
|
+
relatedAssociationId?: string;
|
|
25
|
+
}[]): Promise<any>;
|
|
26
|
+
unlinkCaseCases(caseId: string, linkedCaseIds: string[]): Promise<any>;
|
|
20
27
|
getFiles(caseId: string): Promise<any>;
|
|
21
28
|
linkCaseFiles(caseId: string, fileIds: {
|
|
22
29
|
id: string;
|
package/dist/db-sdk-v1/CaseDb.js
CHANGED
|
@@ -80,6 +80,39 @@ class CaseDb extends db_provider_1.DbProvider {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
// Use this function when you want to return a single record
|
|
83
|
+
getCases(caseId) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
return yield this._getLinks(this.moduleName, this.entityName, caseId, 'Case');
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
linkCaseCases(caseId, caseIds) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const associationDtos = [];
|
|
91
|
+
for (const param of caseIds) {
|
|
92
|
+
associationDtos.push({
|
|
93
|
+
entity: 'SupportModule:Case',
|
|
94
|
+
recordId: param.id,
|
|
95
|
+
linkType: 'Case__Case',
|
|
96
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
97
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return yield this._createLinks(this.moduleName, this.entityName, caseId, associationDtos);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
unlinkCaseCases(caseId, linkedCaseIds) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
const associationDtos = [];
|
|
106
|
+
for (const pk of linkedCaseIds) {
|
|
107
|
+
associationDtos.push({
|
|
108
|
+
primaryKey: caseId,
|
|
109
|
+
linkedRecordPrimaryKey: pk,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, caseId, associationDtos);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
// Use this function when you want to return a single record
|
|
83
116
|
getFiles(caseId) {
|
|
84
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
118
|
return yield this._getLinks(this.moduleName, this.entityName, caseId, 'File');
|
|
@@ -24,4 +24,11 @@ export declare class ConsumptionRateDb extends DbProvider {
|
|
|
24
24
|
relatedAssociationId?: string;
|
|
25
25
|
}[]): Promise<any>;
|
|
26
26
|
unlinkConsumptionScheduleConsumptionRates(consumptionRateId: string, linkedConsumptionScheduleIds: string[]): Promise<any>;
|
|
27
|
+
getConsumptionRates(consumptionRateId: string): Promise<any>;
|
|
28
|
+
linkConsumptionRateConsumptionRates(consumptionRateId: string, consumptionRateIds: {
|
|
29
|
+
id: string;
|
|
30
|
+
relationType?: RelationTypeEnum;
|
|
31
|
+
relatedAssociationId?: string;
|
|
32
|
+
}[]): Promise<any>;
|
|
33
|
+
unlinkConsumptionRateConsumptionRates(consumptionRateId: string, linkedConsumptionRateIds: string[]): Promise<any>;
|
|
27
34
|
}
|
|
@@ -112,5 +112,38 @@ class ConsumptionRateDb extends db_provider_1.DbProvider {
|
|
|
112
112
|
return yield this._deleteLinks(this.moduleName, this.entityName, consumptionRateId, associationDtos);
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
+
// Use this function when you want to return a single record
|
|
116
|
+
getConsumptionRates(consumptionRateId) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return yield this._getLinks(this.moduleName, this.entityName, consumptionRateId, 'ConsumptionRate');
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
linkConsumptionRateConsumptionRates(consumptionRateId, consumptionRateIds) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const associationDtos = [];
|
|
124
|
+
for (const param of consumptionRateIds) {
|
|
125
|
+
associationDtos.push({
|
|
126
|
+
entity: 'ProductModule:ConsumptionRate',
|
|
127
|
+
recordId: param.id,
|
|
128
|
+
linkType: 'ConsumptionRate__ConsumptionRate',
|
|
129
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
130
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return yield this._createLinks(this.moduleName, this.entityName, consumptionRateId, associationDtos);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
unlinkConsumptionRateConsumptionRates(consumptionRateId, linkedConsumptionRateIds) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const associationDtos = [];
|
|
139
|
+
for (const pk of linkedConsumptionRateIds) {
|
|
140
|
+
associationDtos.push({
|
|
141
|
+
primaryKey: consumptionRateId,
|
|
142
|
+
linkedRecordPrimaryKey: pk,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, consumptionRateId, associationDtos);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
115
148
|
}
|
|
116
149
|
exports.ConsumptionRateDb = ConsumptionRateDb;
|
|
@@ -31,4 +31,11 @@ export declare class ConsumptionScheduleDb extends DbProvider {
|
|
|
31
31
|
relatedAssociationId?: string;
|
|
32
32
|
}[]): Promise<any>;
|
|
33
33
|
unlinkProductConsumptionSchedules(consumptionScheduleId: string, linkedProductIds: string[]): Promise<any>;
|
|
34
|
+
getConsumptionSchedules(consumptionScheduleId: string): Promise<any>;
|
|
35
|
+
linkConsumptionScheduleConsumptionSchedules(consumptionScheduleId: string, consumptionScheduleIds: {
|
|
36
|
+
id: string;
|
|
37
|
+
relationType?: RelationTypeEnum;
|
|
38
|
+
relatedAssociationId?: string;
|
|
39
|
+
}[]): Promise<any>;
|
|
40
|
+
unlinkConsumptionScheduleConsumptionSchedules(consumptionScheduleId: string, linkedConsumptionScheduleIds: string[]): Promise<any>;
|
|
34
41
|
}
|
|
@@ -145,5 +145,38 @@ class ConsumptionScheduleDb extends db_provider_1.DbProvider {
|
|
|
145
145
|
return yield this._deleteLinks(this.moduleName, this.entityName, consumptionScheduleId, associationDtos);
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
+
// Use this function when you want to return a single record
|
|
149
|
+
getConsumptionSchedules(consumptionScheduleId) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return yield this._getLinks(this.moduleName, this.entityName, consumptionScheduleId, 'ConsumptionSchedule');
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
linkConsumptionScheduleConsumptionSchedules(consumptionScheduleId, consumptionScheduleIds) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
const associationDtos = [];
|
|
157
|
+
for (const param of consumptionScheduleIds) {
|
|
158
|
+
associationDtos.push({
|
|
159
|
+
entity: 'ProductModule:ConsumptionSchedule',
|
|
160
|
+
recordId: param.id,
|
|
161
|
+
linkType: 'ConsumptionSchedule__ConsumptionSchedule',
|
|
162
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
163
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return yield this._createLinks(this.moduleName, this.entityName, consumptionScheduleId, associationDtos);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
unlinkConsumptionScheduleConsumptionSchedules(consumptionScheduleId, linkedConsumptionScheduleIds) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
const associationDtos = [];
|
|
172
|
+
for (const pk of linkedConsumptionScheduleIds) {
|
|
173
|
+
associationDtos.push({
|
|
174
|
+
primaryKey: consumptionScheduleId,
|
|
175
|
+
linkedRecordPrimaryKey: pk,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, consumptionScheduleId, associationDtos);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
148
181
|
}
|
|
149
182
|
exports.ConsumptionScheduleDb = ConsumptionScheduleDb;
|
|
@@ -108,6 +108,13 @@ export declare class ContactDb extends DbProvider {
|
|
|
108
108
|
relatedAssociationId?: string;
|
|
109
109
|
}[]): Promise<any>;
|
|
110
110
|
unlinkCommissionContacts(contactId: string, linkedCommissionIds: string[]): Promise<any>;
|
|
111
|
+
getContacts(contactId: string): Promise<any>;
|
|
112
|
+
linkContactContacts(contactId: string, contactIds: {
|
|
113
|
+
id: string;
|
|
114
|
+
relationType?: RelationTypeEnum;
|
|
115
|
+
relatedAssociationId?: string;
|
|
116
|
+
}[]): Promise<any>;
|
|
117
|
+
unlinkContactContacts(contactId: string, linkedContactIds: string[]): Promise<any>;
|
|
111
118
|
getOneTouchSwitchs(contactId: string): Promise<any>;
|
|
112
119
|
linkOneTouchSwitchContacts(contactId: string, oneTouchSwitchIds: {
|
|
113
120
|
id: string;
|
|
@@ -509,6 +509,39 @@ class ContactDb extends db_provider_1.DbProvider {
|
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
// Use this function when you want to return a single record
|
|
512
|
+
getContacts(contactId) {
|
|
513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
514
|
+
return yield this._getLinks(this.moduleName, this.entityName, contactId, 'Contact');
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
linkContactContacts(contactId, contactIds) {
|
|
518
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
519
|
+
const associationDtos = [];
|
|
520
|
+
for (const param of contactIds) {
|
|
521
|
+
associationDtos.push({
|
|
522
|
+
entity: 'CrmModule:Contact',
|
|
523
|
+
recordId: param.id,
|
|
524
|
+
linkType: 'Contact__Contact',
|
|
525
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
526
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
return yield this._createLinks(this.moduleName, this.entityName, contactId, associationDtos);
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
unlinkContactContacts(contactId, linkedContactIds) {
|
|
533
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
534
|
+
const associationDtos = [];
|
|
535
|
+
for (const pk of linkedContactIds) {
|
|
536
|
+
associationDtos.push({
|
|
537
|
+
primaryKey: contactId,
|
|
538
|
+
linkedRecordPrimaryKey: pk,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, contactId, associationDtos);
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
// Use this function when you want to return a single record
|
|
512
545
|
getOneTouchSwitchs(contactId) {
|
|
513
546
|
return __awaiter(this, void 0, void 0, function* () {
|
|
514
547
|
return yield this._getLinks(this.moduleName, this.entityName, contactId, 'OneTouchSwitch');
|
|
@@ -24,6 +24,13 @@ export declare class ContactIdentityDb extends DbProvider {
|
|
|
24
24
|
relatedAssociationId?: string;
|
|
25
25
|
}[]): Promise<any>;
|
|
26
26
|
unlinkContactIdentityPaymentMethods(contactIdentityId: string, linkedPaymentMethodIds: string[]): Promise<any>;
|
|
27
|
+
getContactIdentitys(contactIdentityId: string): Promise<any>;
|
|
28
|
+
linkContactIdentityContactIdentitys(contactIdentityId: string, contactIdentityIds: {
|
|
29
|
+
id: string;
|
|
30
|
+
relationType?: RelationTypeEnum;
|
|
31
|
+
relatedAssociationId?: string;
|
|
32
|
+
}[]): Promise<any>;
|
|
33
|
+
unlinkContactIdentityContactIdentitys(contactIdentityId: string, linkedContactIdentityIds: string[]): Promise<any>;
|
|
27
34
|
getContacts(contactIdentityId: string): Promise<any>;
|
|
28
35
|
linkContactContactIdentitys(contactIdentityId: string, contactIds: {
|
|
29
36
|
id: string;
|