@d19n/youfibre-odin-sdk 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-sdk-v1/BillingRequestApi.d.ts +0 -7
- package/dist/api-sdk-v1/BillingRequestApi.js +0 -26
- package/dist/api-sdk-v1/CaseApi.d.ts +0 -7
- package/dist/api-sdk-v1/CaseApi.js +0 -26
- package/dist/api-sdk-v1/ConsumptionRateApi.d.ts +0 -7
- package/dist/api-sdk-v1/ConsumptionRateApi.js +0 -26
- package/dist/api-sdk-v1/ConsumptionScheduleApi.d.ts +0 -7
- package/dist/api-sdk-v1/ConsumptionScheduleApi.js +0 -26
- package/dist/api-sdk-v1/ContactApi.d.ts +87 -3
- package/dist/api-sdk-v1/ContactApi.js +319 -7
- package/dist/api-sdk-v1/ContactIdentityApi.d.ts +0 -7
- package/dist/api-sdk-v1/ContactIdentityApi.js +0 -26
- package/dist/api-sdk-v1/FileApi.d.ts +338 -3
- package/dist/api-sdk-v1/FileApi.js +1249 -7
- package/dist/api-sdk-v1/InvoiceItemApi.d.ts +0 -7
- package/dist/api-sdk-v1/InvoiceItemApi.js +0 -26
- package/dist/api-sdk-v1/LeadApi.d.ts +24 -3
- package/dist/api-sdk-v1/LeadApi.js +85 -7
- package/dist/api-sdk-v1/MilestoneApi.d.ts +0 -7
- package/dist/api-sdk-v1/MilestoneApi.js +0 -26
- package/dist/api-sdk-v1/NoteApi.d.ts +3 -4
- package/dist/api-sdk-v1/NoteApi.js +7 -13
- package/dist/api-sdk-v1/OfferApi.d.ts +0 -7
- package/dist/api-sdk-v1/OfferApi.js +0 -26
- package/dist/api-sdk-v1/OrderApi.d.ts +7 -8
- package/dist/api-sdk-v1/OrderApi.js +21 -27
- package/dist/api-sdk-v1/OrderItemApi.d.ts +0 -7
- package/dist/api-sdk-v1/OrderItemApi.js +0 -26
- package/dist/api-sdk-v1/OrganizationApi.d.ts +0 -7
- package/dist/api-sdk-v1/OrganizationApi.js +0 -26
- package/dist/api-sdk-v1/ProductApi.d.ts +1 -9
- package/dist/api-sdk-v1/ProductApi.js +0 -31
- package/dist/api-sdk-v1/ProductComponentApi.d.ts +0 -7
- package/dist/api-sdk-v1/ProductComponentApi.js +0 -26
- package/dist/api-sdk-v1/RestrictionApi.d.ts +0 -7
- package/dist/api-sdk-v1/RestrictionApi.js +0 -26
- package/dist/api-sdk-v1/ServiceApi.d.ts +0 -7
- package/dist/api-sdk-v1/ServiceApi.js +0 -26
- package/dist/api-sdk-v1/ServiceAppointmentConfigApi.d.ts +12 -0
- package/dist/api-sdk-v1/ServiceAppointmentConfigApi.js +40 -0
- package/dist/api-sdk-v1/SplitOrderApi.d.ts +2 -3
- package/dist/api-sdk-v1/SplitOrderApi.js +6 -12
- package/dist/api-sdk-v1/TransactionApi.d.ts +0 -7
- package/dist/api-sdk-v1/TransactionApi.js +0 -26
- package/dist/api-sdk-v1/UserApi.d.ts +18 -0
- package/dist/api-sdk-v1/UserApi.js +60 -0
- package/dist/api-sdk-v1/WorkOrderApi.d.ts +44 -3
- package/dist/api-sdk-v1/WorkOrderApi.js +157 -7
- package/dist/db-sdk-v1/BillingRequestDb.d.ts +0 -7
- package/dist/db-sdk-v1/BillingRequestDb.js +0 -33
- package/dist/db-sdk-v1/CaseDb.d.ts +0 -7
- package/dist/db-sdk-v1/CaseDb.js +0 -33
- package/dist/db-sdk-v1/ConsumptionRateDb.d.ts +0 -7
- package/dist/db-sdk-v1/ConsumptionRateDb.js +0 -33
- package/dist/db-sdk-v1/ConsumptionScheduleDb.d.ts +0 -7
- package/dist/db-sdk-v1/ConsumptionScheduleDb.js +0 -33
- package/dist/db-sdk-v1/ContactDb.d.ts +87 -3
- package/dist/db-sdk-v1/ContactDb.js +403 -7
- package/dist/db-sdk-v1/ContactIdentityDb.d.ts +0 -7
- package/dist/db-sdk-v1/ContactIdentityDb.js +0 -33
- package/dist/db-sdk-v1/FileDb.d.ts +338 -3
- package/dist/db-sdk-v1/FileDb.js +1585 -7
- package/dist/db-sdk-v1/InvoiceItemDb.d.ts +0 -7
- package/dist/db-sdk-v1/InvoiceItemDb.js +0 -33
- package/dist/db-sdk-v1/LeadDb.d.ts +24 -3
- package/dist/db-sdk-v1/LeadDb.js +106 -7
- package/dist/db-sdk-v1/MilestoneDb.d.ts +0 -7
- package/dist/db-sdk-v1/MilestoneDb.js +0 -33
- package/dist/db-sdk-v1/NoteDb.d.ts +3 -4
- package/dist/db-sdk-v1/NoteDb.js +7 -13
- package/dist/db-sdk-v1/OfferDb.d.ts +0 -7
- package/dist/db-sdk-v1/OfferDb.js +0 -33
- package/dist/db-sdk-v1/OrderDb.d.ts +7 -8
- package/dist/db-sdk-v1/OrderDb.js +28 -34
- package/dist/db-sdk-v1/OrderItemDb.d.ts +0 -7
- package/dist/db-sdk-v1/OrderItemDb.js +0 -33
- package/dist/db-sdk-v1/OrganizationDb.d.ts +0 -7
- package/dist/db-sdk-v1/OrganizationDb.js +0 -33
- package/dist/db-sdk-v1/ProductComponentDb.d.ts +0 -7
- package/dist/db-sdk-v1/ProductComponentDb.js +0 -33
- package/dist/db-sdk-v1/ProductDb.d.ts +1 -9
- package/dist/db-sdk-v1/ProductDb.js +0 -38
- package/dist/db-sdk-v1/RestrictionDb.d.ts +0 -7
- package/dist/db-sdk-v1/RestrictionDb.js +0 -33
- package/dist/db-sdk-v1/ServiceAppointmentConfigDb.d.ts +12 -0
- package/dist/db-sdk-v1/ServiceAppointmentConfigDb.js +54 -0
- package/dist/db-sdk-v1/ServiceDb.d.ts +0 -7
- package/dist/db-sdk-v1/ServiceDb.js +0 -33
- package/dist/db-sdk-v1/SplitOrderDb.d.ts +2 -3
- package/dist/db-sdk-v1/SplitOrderDb.js +6 -12
- package/dist/db-sdk-v1/TransactionDb.d.ts +0 -7
- package/dist/db-sdk-v1/TransactionDb.js +0 -33
- package/dist/db-sdk-v1/UserDb.d.ts +18 -0
- package/dist/db-sdk-v1/UserDb.js +81 -0
- package/dist/db-sdk-v1/WorkOrderDb.d.ts +44 -3
- package/dist/db-sdk-v1/WorkOrderDb.js +199 -7
- package/package.json +2 -2
- package/src/api-sdk-v1/BillingRequestApi.ts +0 -27
- package/src/api-sdk-v1/CaseApi.ts +0 -27
- package/src/api-sdk-v1/ConsumptionRateApi.ts +0 -27
- package/src/api-sdk-v1/ConsumptionScheduleApi.ts +0 -27
- package/src/api-sdk-v1/ContactApi.ts +343 -19
- package/src/api-sdk-v1/ContactIdentityApi.ts +0 -27
- package/src/api-sdk-v1/FileApi.ts +1310 -19
- package/src/api-sdk-v1/InvoiceItemApi.ts +0 -27
- package/src/api-sdk-v1/LeadApi.ts +100 -19
- package/src/api-sdk-v1/MilestoneApi.ts +0 -27
- package/src/api-sdk-v1/NoteApi.ts +7 -12
- package/src/api-sdk-v1/OfferApi.ts +0 -27
- package/src/api-sdk-v1/OrderApi.ts +23 -28
- package/src/api-sdk-v1/OrderItemApi.ts +0 -27
- package/src/api-sdk-v1/OrganizationApi.ts +0 -27
- package/src/api-sdk-v1/ProductApi.ts +0 -31
- package/src/api-sdk-v1/ProductComponentApi.ts +0 -27
- package/src/api-sdk-v1/RestrictionApi.ts +0 -27
- package/src/api-sdk-v1/ServiceApi.ts +0 -27
- package/src/api-sdk-v1/ServiceAppointmentConfigApi.ts +44 -0
- package/src/api-sdk-v1/SplitOrderApi.ts +17 -22
- package/src/api-sdk-v1/TransactionApi.ts +0 -27
- package/src/api-sdk-v1/UserApi.ts +66 -0
- package/src/api-sdk-v1/WorkOrderApi.ts +178 -21
- package/src/db-sdk-v1/BillingRequestDb.ts +0 -35
- package/src/db-sdk-v1/CaseDb.ts +0 -35
- package/src/db-sdk-v1/ConsumptionRateDb.ts +0 -35
- package/src/db-sdk-v1/ConsumptionScheduleDb.ts +0 -35
- package/src/db-sdk-v1/ContactDb.ts +443 -23
- package/src/db-sdk-v1/ContactIdentityDb.ts +0 -35
- package/src/db-sdk-v1/FileDb.ts +1698 -23
- package/src/db-sdk-v1/InvoiceItemDb.ts +0 -35
- package/src/db-sdk-v1/LeadDb.ts +128 -23
- package/src/db-sdk-v1/MilestoneDb.ts +0 -35
- package/src/db-sdk-v1/NoteDb.ts +7 -12
- package/src/db-sdk-v1/OfferDb.ts +0 -35
- package/src/db-sdk-v1/OrderDb.ts +31 -36
- package/src/db-sdk-v1/OrderItemDb.ts +0 -35
- package/src/db-sdk-v1/OrganizationDb.ts +0 -35
- package/src/db-sdk-v1/ProductComponentDb.ts +0 -35
- package/src/db-sdk-v1/ProductDb.ts +0 -39
- package/src/db-sdk-v1/RestrictionDb.ts +0 -35
- package/src/db-sdk-v1/ServiceAppointmentConfigDb.ts +60 -0
- package/src/db-sdk-v1/ServiceDb.ts +0 -35
- package/src/db-sdk-v1/SplitOrderDb.ts +20 -25
- package/src/db-sdk-v1/TransactionDb.ts +0 -35
- package/src/db-sdk-v1/UserDb.ts +90 -0
- package/src/db-sdk-v1/WorkOrderDb.ts +229 -24
- package/src/generators/runner.ts +2 -3
|
@@ -34,11 +34,4 @@ export declare class InvoiceItemApi extends ApiProvider {
|
|
|
34
34
|
relatedAssociationId?: string;
|
|
35
35
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
36
36
|
unLinkInvoiceInvoiceItems(invoiceItemId: string, linkedInvoiceId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
37
|
-
getInvoiceItems(invoiceItemId: string): Promise<any>;
|
|
38
|
-
linkInvoiceItemInvoiceItems(invoiceItemId: string, invoiceItemIds: {
|
|
39
|
-
id: string;
|
|
40
|
-
relationType?: RelationTypeEnum;
|
|
41
|
-
relatedAssociationId?: string;
|
|
42
|
-
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
43
|
-
unLinkInvoiceItemInvoiceItems(invoiceItemId: string, linkedInvoiceItemId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
44
37
|
}
|
|
@@ -116,31 +116,5 @@ 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
|
-
}
|
|
145
119
|
}
|
|
146
120
|
exports.InvoiceItemApi = InvoiceItemApi;
|
|
@@ -90,13 +90,20 @@ export declare class LeadApi extends ApiProvider {
|
|
|
90
90
|
relatedAssociationId?: string;
|
|
91
91
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
92
92
|
unLinkLeadFiles(leadId: string, linkedFileId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
93
|
-
|
|
94
|
-
linkWorkOrderLeads(leadId: string,
|
|
93
|
+
getWorkOrders(leadId: string): Promise<any>;
|
|
94
|
+
linkWorkOrderLeads(leadId: string, workOrderIds: {
|
|
95
95
|
id: string;
|
|
96
96
|
relationType?: RelationTypeEnum;
|
|
97
97
|
relatedAssociationId?: string;
|
|
98
98
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
99
|
-
unLinkWorkOrderLeads(leadId: string,
|
|
99
|
+
unLinkWorkOrderLeads(leadId: string, linkedWorkOrderId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
100
|
+
getCrmDatasets(leadId: string): Promise<any>;
|
|
101
|
+
linkCrmDatasetLeads(leadId: string, crmDatasetIds: {
|
|
102
|
+
id: string;
|
|
103
|
+
relationType?: RelationTypeEnum;
|
|
104
|
+
relatedAssociationId?: string;
|
|
105
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
106
|
+
unLinkCrmDatasetLeads(leadId: string, linkedCrmDatasetId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
100
107
|
getOrders(leadId: string): Promise<any>;
|
|
101
108
|
linkLeadOrders(leadId: string, orderIds: {
|
|
102
109
|
id: string;
|
|
@@ -118,4 +125,18 @@ export declare class LeadApi extends ApiProvider {
|
|
|
118
125
|
relatedAssociationId?: string;
|
|
119
126
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
120
127
|
unLinkLeadAppointments(leadId: string, linkedAppointmentId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
128
|
+
getCalls(leadId: string): Promise<any>;
|
|
129
|
+
linkCallLeads(leadId: string, callIds: {
|
|
130
|
+
id: string;
|
|
131
|
+
relationType?: RelationTypeEnum;
|
|
132
|
+
relatedAssociationId?: string;
|
|
133
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
134
|
+
unLinkCallLeads(leadId: string, linkedCallId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
135
|
+
getFingerprints(leadId: string): Promise<any>;
|
|
136
|
+
linkFingerprintLeads(leadId: string, fingerprintIds: {
|
|
137
|
+
id: string;
|
|
138
|
+
relationType?: RelationTypeEnum;
|
|
139
|
+
relatedAssociationId?: string;
|
|
140
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
141
|
+
unLinkFingerprintLeads(leadId: string, linkedFingerprintId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
121
142
|
}
|
|
@@ -325,17 +325,17 @@ class LeadApi extends api_provider_1.ApiProvider {
|
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
// Use this function when you want to return a single record
|
|
328
|
-
|
|
328
|
+
getWorkOrders(leadId) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
-
return yield this._getLinks(this.moduleName, this.entityName, leadId, '
|
|
330
|
+
return yield this._getLinks(this.moduleName, this.entityName, leadId, 'WorkOrder');
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
linkWorkOrderLeads(leadId,
|
|
333
|
+
linkWorkOrderLeads(leadId, workOrderIds) {
|
|
334
334
|
return __awaiter(this, void 0, void 0, function* () {
|
|
335
335
|
const associationDtos = [];
|
|
336
|
-
for (const param of
|
|
336
|
+
for (const param of workOrderIds) {
|
|
337
337
|
associationDtos.push({
|
|
338
|
-
entity: '
|
|
338
|
+
entity: 'FieldServiceModule:WorkOrder',
|
|
339
339
|
recordId: param.id,
|
|
340
340
|
linkType: 'WorkOrder__Lead',
|
|
341
341
|
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
@@ -345,9 +345,35 @@ class LeadApi extends api_provider_1.ApiProvider {
|
|
|
345
345
|
return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
-
unLinkWorkOrderLeads(leadId,
|
|
348
|
+
unLinkWorkOrderLeads(leadId, linkedWorkOrderId) {
|
|
349
349
|
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
-
return yield this._deleteLinks(this.moduleName, this.entityName, leadId,
|
|
350
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, leadId, linkedWorkOrderId);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
// Use this function when you want to return a single record
|
|
354
|
+
getCrmDatasets(leadId) {
|
|
355
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
+
return yield this._getLinks(this.moduleName, this.entityName, leadId, 'CrmDataset');
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
linkCrmDatasetLeads(leadId, crmDatasetIds) {
|
|
360
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
361
|
+
const associationDtos = [];
|
|
362
|
+
for (const param of crmDatasetIds) {
|
|
363
|
+
associationDtos.push({
|
|
364
|
+
entity: 'CrmModule:CrmDataset',
|
|
365
|
+
recordId: param.id,
|
|
366
|
+
linkType: 'CrmDataset__Lead',
|
|
367
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
368
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
unLinkCrmDatasetLeads(leadId, linkedCrmDatasetId) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, leadId, linkedCrmDatasetId);
|
|
351
377
|
});
|
|
352
378
|
}
|
|
353
379
|
// Use this function when you want to return a single record
|
|
@@ -428,5 +454,57 @@ class LeadApi extends api_provider_1.ApiProvider {
|
|
|
428
454
|
return yield this._deleteLinks(this.moduleName, this.entityName, leadId, linkedAppointmentId);
|
|
429
455
|
});
|
|
430
456
|
}
|
|
457
|
+
// Use this function when you want to return a single record
|
|
458
|
+
getCalls(leadId) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
+
return yield this._getLinks(this.moduleName, this.entityName, leadId, 'Call');
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
linkCallLeads(leadId, callIds) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
+
const associationDtos = [];
|
|
466
|
+
for (const param of callIds) {
|
|
467
|
+
associationDtos.push({
|
|
468
|
+
entity: 'NotificationModule:Call',
|
|
469
|
+
recordId: param.id,
|
|
470
|
+
linkType: 'Call__Lead',
|
|
471
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
472
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
unLinkCallLeads(leadId, linkedCallId) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
480
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, leadId, linkedCallId);
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
// Use this function when you want to return a single record
|
|
484
|
+
getFingerprints(leadId) {
|
|
485
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
486
|
+
return yield this._getLinks(this.moduleName, this.entityName, leadId, 'Fingerprint');
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
linkFingerprintLeads(leadId, fingerprintIds) {
|
|
490
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
const associationDtos = [];
|
|
492
|
+
for (const param of fingerprintIds) {
|
|
493
|
+
associationDtos.push({
|
|
494
|
+
entity: 'CrmModule:Fingerprint',
|
|
495
|
+
recordId: param.id,
|
|
496
|
+
linkType: 'Fingerprint__Lead',
|
|
497
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
498
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
return yield this._createLinks(this.moduleName, this.entityName, leadId, associationDtos);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
unLinkFingerprintLeads(leadId, linkedFingerprintId) {
|
|
505
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
506
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, leadId, linkedFingerprintId);
|
|
507
|
+
});
|
|
508
|
+
}
|
|
431
509
|
}
|
|
432
510
|
exports.LeadApi = LeadApi;
|
|
@@ -41,13 +41,6 @@ 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[]>;
|
|
51
44
|
getNotes(milestoneId: string): Promise<any>;
|
|
52
45
|
linkMilestoneNotes(milestoneId: string, noteIds: {
|
|
53
46
|
id: string;
|
|
@@ -143,32 +143,6 @@ 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
|
|
172
146
|
getNotes(milestoneId) {
|
|
173
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
174
148
|
return yield this._getLinks(this.moduleName, this.entityName, milestoneId, 'Note');
|
|
@@ -181,7 +181,7 @@ export declare class NoteApi extends ApiProvider {
|
|
|
181
181
|
relatedAssociationId?: string;
|
|
182
182
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
183
183
|
unLinkChurnRequestNotes(noteId: string, linkedChurnRequestId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
184
|
-
|
|
184
|
+
getPicRequests(noteId: string): Promise<any>;
|
|
185
185
|
linkPicRequestNotes(noteId: string, picRequestIds: {
|
|
186
186
|
id: string;
|
|
187
187
|
relationType?: RelationTypeEnum;
|
|
@@ -356,13 +356,12 @@ 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
|
-
|
|
360
|
-
linkNoteNotes(noteId: string, noteIds: {
|
|
359
|
+
linkNoteFiles(noteId: string, fileIds: {
|
|
361
360
|
id: string;
|
|
362
361
|
relationType?: RelationTypeEnum;
|
|
363
362
|
relatedAssociationId?: string;
|
|
364
363
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
365
|
-
|
|
364
|
+
unLinkNoteFiles(noteId: string, linkedFileId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
366
365
|
getSweeperMaintenanceAudits(noteId: string): Promise<any>;
|
|
367
366
|
linkSweeperMaintenanceAuditNotes(noteId: string, sweeperMaintenanceAuditIds: {
|
|
368
367
|
id: string;
|
|
@@ -663,7 +663,7 @@ class NoteApi extends api_provider_1.ApiProvider {
|
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
665
|
// Use this function when you want to return a single record
|
|
666
|
-
|
|
666
|
+
getPicRequests(noteId) {
|
|
667
667
|
return __awaiter(this, void 0, void 0, function* () {
|
|
668
668
|
return yield this._getLinks(this.moduleName, this.entityName, noteId, 'PICRequest');
|
|
669
669
|
});
|
|
@@ -1312,20 +1312,14 @@ class NoteApi extends api_provider_1.ApiProvider {
|
|
|
1312
1312
|
return yield this._deleteLinks(this.moduleName, this.entityName, noteId, linkedSmsMessageId);
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
|
-
|
|
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) {
|
|
1315
|
+
linkNoteFiles(noteId, fileIds) {
|
|
1322
1316
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1323
1317
|
const associationDtos = [];
|
|
1324
|
-
for (const param of
|
|
1318
|
+
for (const param of fileIds) {
|
|
1325
1319
|
associationDtos.push({
|
|
1326
|
-
entity: '
|
|
1320
|
+
entity: 'SchemaModule:File',
|
|
1327
1321
|
recordId: param.id,
|
|
1328
|
-
linkType: '
|
|
1322
|
+
linkType: 'Note__File',
|
|
1329
1323
|
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
1330
1324
|
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
1331
1325
|
});
|
|
@@ -1333,9 +1327,9 @@ class NoteApi extends api_provider_1.ApiProvider {
|
|
|
1333
1327
|
return yield this._createLinks(this.moduleName, this.entityName, noteId, associationDtos);
|
|
1334
1328
|
});
|
|
1335
1329
|
}
|
|
1336
|
-
|
|
1330
|
+
unLinkNoteFiles(noteId, linkedFileId) {
|
|
1337
1331
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1338
|
-
return yield this._deleteLinks(this.moduleName, this.entityName, noteId,
|
|
1332
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, noteId, linkedFileId);
|
|
1339
1333
|
});
|
|
1340
1334
|
}
|
|
1341
1335
|
// Use this function when you want to return a single record
|
|
@@ -48,13 +48,6 @@ 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[]>;
|
|
58
51
|
getDiscounts(offerId: string): Promise<any>;
|
|
59
52
|
linkOfferDiscounts(offerId: string, discountIds: {
|
|
60
53
|
id: string;
|
|
@@ -169,32 +169,6 @@ 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
|
|
198
172
|
getDiscounts(offerId) {
|
|
199
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
174
|
return yield this._getLinks(this.moduleName, this.entityName, offerId, 'Discount');
|
|
@@ -126,14 +126,7 @@ 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
|
-
|
|
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[]>;
|
|
136
|
-
getPICRequests(orderId: string): Promise<any>;
|
|
129
|
+
getPicRequests(orderId: string): Promise<any>;
|
|
137
130
|
linkPicRequestOrders(orderId: string, picRequestIds: {
|
|
138
131
|
id: string;
|
|
139
132
|
relationType?: RelationTypeEnum;
|
|
@@ -231,6 +224,12 @@ export declare class OrderApi extends ApiProvider {
|
|
|
231
224
|
relatedAssociationId?: string;
|
|
232
225
|
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
233
226
|
unLinkOrderInvoices(orderId: string, linkedInvoiceId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
227
|
+
linkOrderSplitOrders(orderId: string, splitOrderIds: {
|
|
228
|
+
id: string;
|
|
229
|
+
relationType?: RelationTypeEnum;
|
|
230
|
+
relatedAssociationId?: string;
|
|
231
|
+
}[]): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinAssociationMetaData[]>;
|
|
232
|
+
unLinkOrderSplitOrders(orderId: string, linkedSplitOrderId: string): Promise<import("@d19n/odin-types/dist/types/odin.types").OdinLinkDeleteResponse[]>;
|
|
234
233
|
getPhoneNumbers(orderId: string): Promise<any>;
|
|
235
234
|
linkOrderPhoneNumbers(orderId: string, phoneNumberIds: {
|
|
236
235
|
id: string;
|
|
@@ -460,33 +460,7 @@ 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
|
-
|
|
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
|
|
489
|
-
getPICRequests(orderId) {
|
|
463
|
+
getPicRequests(orderId) {
|
|
490
464
|
return __awaiter(this, void 0, void 0, function* () {
|
|
491
465
|
return yield this._getLinks(this.moduleName, this.entityName, orderId, 'PICRequest');
|
|
492
466
|
});
|
|
@@ -849,6 +823,26 @@ class OrderApi extends api_provider_1.ApiProvider {
|
|
|
849
823
|
return yield this._deleteLinks(this.moduleName, this.entityName, orderId, linkedInvoiceId);
|
|
850
824
|
});
|
|
851
825
|
}
|
|
826
|
+
linkOrderSplitOrders(orderId, splitOrderIds) {
|
|
827
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
828
|
+
const associationDtos = [];
|
|
829
|
+
for (const param of splitOrderIds) {
|
|
830
|
+
associationDtos.push({
|
|
831
|
+
entity: 'OrderModule:SplitOrder',
|
|
832
|
+
recordId: param.id,
|
|
833
|
+
linkType: 'Order__SplitOrder',
|
|
834
|
+
relationType: param === null || param === void 0 ? void 0 : param.relationType,
|
|
835
|
+
relatedAssociationId: param === null || param === void 0 ? void 0 : param.relatedAssociationId
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
return yield this._createLinks(this.moduleName, this.entityName, orderId, associationDtos);
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
unLinkOrderSplitOrders(orderId, linkedSplitOrderId) {
|
|
842
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
843
|
+
return yield this._deleteLinks(this.moduleName, this.entityName, orderId, linkedSplitOrderId);
|
|
844
|
+
});
|
|
845
|
+
}
|
|
852
846
|
// Use this function when you want to return a single record
|
|
853
847
|
getPhoneNumbers(orderId) {
|
|
854
848
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -111,13 +111,6 @@ 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[]>;
|
|
121
114
|
getVoiceConfigurations(orderItemId: string): Promise<any>;
|
|
122
115
|
linkOrderItemVoiceConfigurations(orderItemId: string, voiceConfigurationIds: {
|
|
123
116
|
id: string;
|
|
@@ -403,32 +403,6 @@ 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
|
|
432
406
|
getVoiceConfigurations(orderItemId) {
|
|
433
407
|
return __awaiter(this, void 0, void 0, function* () {
|
|
434
408
|
return yield this._getLinks(this.moduleName, this.entityName, orderItemId, 'VoiceConfiguration');
|
|
@@ -48,11 +48,4 @@ 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[]>;
|
|
58
51
|
}
|
|
@@ -168,31 +168,5 @@ 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
|
-
}
|
|
197
171
|
}
|
|
198
172
|
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,
|
|
4
|
+
import { OdinRecordCreateDto, OdinRecordUpdateDto, 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,12 +90,4 @@ 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<{}>>;
|
|
101
93
|
}
|
|
@@ -324,36 +324,5 @@ 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
|
-
}
|
|
358
327
|
}
|
|
359
328
|
exports.ProductApi = ProductApi;
|
|
@@ -41,11 +41,4 @@ 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[]>;
|
|
51
44
|
}
|