@bisondesk/core-sdk 1.0.240 → 1.0.242
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/lib/cjs/apis/opportunities.js +19 -29
- package/lib/cjs/apis/opportunities.js.map +1 -1
- package/lib/cjs/apis/vehicles.js +17 -1
- package/lib/cjs/apis/vehicles.js.map +1 -1
- package/lib/cjs/constants.js +2 -1
- package/lib/cjs/constants.js.map +1 -1
- package/lib/cjs/types/crm.js.map +1 -1
- package/lib/cjs/types/leasing-settings.js.map +1 -1
- package/lib/cjs/types/opportunities.js.map +1 -1
- package/lib/cjs/types/quotes.js +2 -2
- package/lib/cjs/types/quotes.js.map +1 -1
- package/lib/cjs/types/templates.js +0 -6
- package/lib/cjs/types/templates.js.map +1 -1
- package/lib/cjs/types/vehicles.js.map +1 -1
- package/lib/cjs/utils/tenants.js +6 -1
- package/lib/cjs/utils/tenants.js.map +1 -1
- package/lib/esm/apis/opportunities.js +17 -25
- package/lib/esm/apis/opportunities.js.map +1 -1
- package/lib/esm/apis/vehicles.js +15 -0
- package/lib/esm/apis/vehicles.js.map +1 -1
- package/lib/esm/constants.js +1 -0
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/types/crm.js.map +1 -1
- package/lib/esm/types/leasing-settings.js.map +1 -1
- package/lib/esm/types/opportunities.js.map +1 -1
- package/lib/esm/types/quotes.js +2 -2
- package/lib/esm/types/quotes.js.map +1 -1
- package/lib/esm/types/templates.js +1 -5
- package/lib/esm/types/templates.js.map +1 -1
- package/lib/esm/types/vehicles.js.map +1 -1
- package/lib/esm/utils/tenants.js +4 -0
- package/lib/esm/utils/tenants.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/apis/opportunities.d.ts +2 -0
- package/lib/types/apis/opportunities.d.ts.map +1 -1
- package/lib/types/apis/vehicles.d.ts +6 -0
- package/lib/types/apis/vehicles.d.ts.map +1 -1
- package/lib/types/constants.d.ts +1 -0
- package/lib/types/constants.d.ts.map +1 -1
- package/lib/types/types/crm.d.ts +1 -0
- package/lib/types/types/crm.d.ts.map +1 -1
- package/lib/types/types/leasing-debtors.d.ts +3 -0
- package/lib/types/types/leasing-debtors.d.ts.map +1 -1
- package/lib/types/types/leasing-settings.d.ts +6 -3
- package/lib/types/types/leasing-settings.d.ts.map +1 -1
- package/lib/types/types/opportunities.d.ts +6 -10
- package/lib/types/types/opportunities.d.ts.map +1 -1
- package/lib/types/types/quotes.d.ts +5 -4
- package/lib/types/types/quotes.d.ts.map +1 -1
- package/lib/types/types/templates.d.ts +7 -9
- package/lib/types/types/templates.d.ts.map +1 -1
- package/lib/types/types/vehicles.d.ts +7 -0
- package/lib/types/types/vehicles.d.ts.map +1 -1
- package/lib/types/utils/tenants.d.ts +1 -0
- package/lib/types/utils/tenants.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/apis/opportunities.ts +47 -55
- package/src/apis/vehicles.ts +26 -0
- package/src/constants.ts +3 -0
- package/src/types/crm.ts +1 -0
- package/src/types/leasing-debtors.ts +3 -0
- package/src/types/leasing-settings.ts +6 -4
- package/src/types/leasing.ts +1 -1
- package/src/types/opportunities.ts +3 -7
- package/src/types/quotes.ts +5 -4
- package/src/types/templates.ts +16 -19
- package/src/types/vehicles.ts +8 -0
- package/src/utils/tenants.ts +5 -0
package/src/types/quotes.ts
CHANGED
|
@@ -26,8 +26,8 @@ export enum QuoteStatus {
|
|
|
26
26
|
ACCEPTED = 'accepted',
|
|
27
27
|
REJECTED = 'rejected',
|
|
28
28
|
CANCELLED = 'cancelled',
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
MANAGER_REJECTED = 'commercialReviewRejected',
|
|
30
|
+
MANAGER_ACCEPTED = 'commercialReviewAccepted',
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export enum QuoteMetricsScore {
|
|
@@ -282,8 +282,8 @@ export type Quote = BaseQuote & {
|
|
|
282
282
|
cancelledAt?: string;
|
|
283
283
|
customerFeedbackAt?: string;
|
|
284
284
|
customerFeedbackBy?: string;
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
managerFeedbackAt?: string;
|
|
286
|
+
managerFeedbackBy?: string;
|
|
287
287
|
version: number;
|
|
288
288
|
status: QuoteStatus;
|
|
289
289
|
proformaPdf?: AttachmentValue;
|
|
@@ -314,6 +314,7 @@ export type UsedVehiclesSalesParams = {
|
|
|
314
314
|
countryCode: 'be';
|
|
315
315
|
name: string;
|
|
316
316
|
profitabilityDealGap: string;
|
|
317
|
+
conglomerateProfitabilityDealGap: string;
|
|
317
318
|
exaDocumentCosts: string;
|
|
318
319
|
delivery?: DeliveryParams;
|
|
319
320
|
};
|
package/src/types/templates.ts
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type: TemplateType.Email;
|
|
9
|
-
subject: string;
|
|
10
|
-
content: {
|
|
11
|
-
html: string;
|
|
12
|
-
design: any;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
| {
|
|
16
|
-
type: TemplateType.Sms;
|
|
17
|
-
content: string;
|
|
18
|
-
};
|
|
1
|
+
export type TemplateContent = {
|
|
2
|
+
subject: string;
|
|
3
|
+
content: {
|
|
4
|
+
html: string;
|
|
5
|
+
design: any;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
19
8
|
|
|
20
9
|
export type NewTemplateRequest = {
|
|
21
10
|
id?: string;
|
|
22
11
|
country: string;
|
|
12
|
+
tags?: any;
|
|
23
13
|
name: string;
|
|
24
14
|
} & TemplateContent;
|
|
25
15
|
|
|
@@ -27,6 +17,8 @@ export type Template = {
|
|
|
27
17
|
id: string;
|
|
28
18
|
modifiedAt: string;
|
|
29
19
|
modifiedBy: string;
|
|
20
|
+
tags?: any;
|
|
21
|
+
|
|
30
22
|
country: string;
|
|
31
23
|
name: string;
|
|
32
24
|
} & TemplateContent;
|
|
@@ -36,5 +28,10 @@ export type TemplateInfo = {
|
|
|
36
28
|
countries: string[];
|
|
37
29
|
modifiedAt: string;
|
|
38
30
|
name: string;
|
|
39
|
-
|
|
31
|
+
tags?: any;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type UpdateTemplateInfoRequest = {
|
|
35
|
+
name: string;
|
|
36
|
+
tags?: any;
|
|
40
37
|
};
|
package/src/types/vehicles.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EmailDestination } from '@bisondesk/commons-sdk/messages';
|
|
1
2
|
import {
|
|
2
3
|
AttachmentValue,
|
|
3
4
|
Document,
|
|
@@ -594,3 +595,10 @@ export enum VehicleActions {
|
|
|
594
595
|
ViewLeads = 'view_leads',
|
|
595
596
|
ViewSimilarOnline = 'view_similar_online',
|
|
596
597
|
}
|
|
598
|
+
|
|
599
|
+
export type VehicleShareEmailRequest = {
|
|
600
|
+
country: string; // Lowercase ISO 3166-1 alpha-2 code, e.g. 'be'
|
|
601
|
+
to: EmailDestination[];
|
|
602
|
+
message: string;
|
|
603
|
+
pictures: AttachmentValue[];
|
|
604
|
+
};
|
package/src/utils/tenants.ts
CHANGED
|
@@ -12,3 +12,8 @@ export const getBranch = (tenant: Tenant, branchId: string): Branch => {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const getDefaultBranch = (tenant: Tenant): Branch => first(tenant.branches)!;
|
|
15
|
+
|
|
16
|
+
export const getBranchStandardVatRate = (tenant: Tenant, branchId: string): string => {
|
|
17
|
+
const branch: Branch = getBranch(tenant, branchId);
|
|
18
|
+
return branch.vatRates.standard;
|
|
19
|
+
};
|