@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.
Files changed (69) hide show
  1. package/lib/cjs/apis/opportunities.js +19 -29
  2. package/lib/cjs/apis/opportunities.js.map +1 -1
  3. package/lib/cjs/apis/vehicles.js +17 -1
  4. package/lib/cjs/apis/vehicles.js.map +1 -1
  5. package/lib/cjs/constants.js +2 -1
  6. package/lib/cjs/constants.js.map +1 -1
  7. package/lib/cjs/types/crm.js.map +1 -1
  8. package/lib/cjs/types/leasing-settings.js.map +1 -1
  9. package/lib/cjs/types/opportunities.js.map +1 -1
  10. package/lib/cjs/types/quotes.js +2 -2
  11. package/lib/cjs/types/quotes.js.map +1 -1
  12. package/lib/cjs/types/templates.js +0 -6
  13. package/lib/cjs/types/templates.js.map +1 -1
  14. package/lib/cjs/types/vehicles.js.map +1 -1
  15. package/lib/cjs/utils/tenants.js +6 -1
  16. package/lib/cjs/utils/tenants.js.map +1 -1
  17. package/lib/esm/apis/opportunities.js +17 -25
  18. package/lib/esm/apis/opportunities.js.map +1 -1
  19. package/lib/esm/apis/vehicles.js +15 -0
  20. package/lib/esm/apis/vehicles.js.map +1 -1
  21. package/lib/esm/constants.js +1 -0
  22. package/lib/esm/constants.js.map +1 -1
  23. package/lib/esm/types/crm.js.map +1 -1
  24. package/lib/esm/types/leasing-settings.js.map +1 -1
  25. package/lib/esm/types/opportunities.js.map +1 -1
  26. package/lib/esm/types/quotes.js +2 -2
  27. package/lib/esm/types/quotes.js.map +1 -1
  28. package/lib/esm/types/templates.js +1 -5
  29. package/lib/esm/types/templates.js.map +1 -1
  30. package/lib/esm/types/vehicles.js.map +1 -1
  31. package/lib/esm/utils/tenants.js +4 -0
  32. package/lib/esm/utils/tenants.js.map +1 -1
  33. package/lib/tsconfig.cjs.tsbuildinfo +1 -1
  34. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  35. package/lib/types/apis/opportunities.d.ts +2 -0
  36. package/lib/types/apis/opportunities.d.ts.map +1 -1
  37. package/lib/types/apis/vehicles.d.ts +6 -0
  38. package/lib/types/apis/vehicles.d.ts.map +1 -1
  39. package/lib/types/constants.d.ts +1 -0
  40. package/lib/types/constants.d.ts.map +1 -1
  41. package/lib/types/types/crm.d.ts +1 -0
  42. package/lib/types/types/crm.d.ts.map +1 -1
  43. package/lib/types/types/leasing-debtors.d.ts +3 -0
  44. package/lib/types/types/leasing-debtors.d.ts.map +1 -1
  45. package/lib/types/types/leasing-settings.d.ts +6 -3
  46. package/lib/types/types/leasing-settings.d.ts.map +1 -1
  47. package/lib/types/types/opportunities.d.ts +6 -10
  48. package/lib/types/types/opportunities.d.ts.map +1 -1
  49. package/lib/types/types/quotes.d.ts +5 -4
  50. package/lib/types/types/quotes.d.ts.map +1 -1
  51. package/lib/types/types/templates.d.ts +7 -9
  52. package/lib/types/types/templates.d.ts.map +1 -1
  53. package/lib/types/types/vehicles.d.ts +7 -0
  54. package/lib/types/types/vehicles.d.ts.map +1 -1
  55. package/lib/types/utils/tenants.d.ts +1 -0
  56. package/lib/types/utils/tenants.d.ts.map +1 -1
  57. package/package.json +2 -2
  58. package/src/apis/opportunities.ts +47 -55
  59. package/src/apis/vehicles.ts +26 -0
  60. package/src/constants.ts +3 -0
  61. package/src/types/crm.ts +1 -0
  62. package/src/types/leasing-debtors.ts +3 -0
  63. package/src/types/leasing-settings.ts +6 -4
  64. package/src/types/leasing.ts +1 -1
  65. package/src/types/opportunities.ts +3 -7
  66. package/src/types/quotes.ts +5 -4
  67. package/src/types/templates.ts +16 -19
  68. package/src/types/vehicles.ts +8 -0
  69. package/src/utils/tenants.ts +5 -0
@@ -26,8 +26,8 @@ export enum QuoteStatus {
26
26
  ACCEPTED = 'accepted',
27
27
  REJECTED = 'rejected',
28
28
  CANCELLED = 'cancelled',
29
- COMMERCIAL_REVIEW_REJECTED = 'commercialReviewRejected',
30
- COMMERCIAL_REVIEW_ACCEPTED = 'commercialReviewAccepted',
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
- commercialReviewAt?: string;
286
- commercialReviewBy?: string;
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
  };
@@ -1,25 +1,15 @@
1
- export enum TemplateType {
2
- Email = 'email',
3
- Sms = 'sms',
4
- }
5
-
6
- export type TemplateContent =
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
- type: TemplateType;
31
+ tags?: any;
32
+ };
33
+
34
+ export type UpdateTemplateInfoRequest = {
35
+ name: string;
36
+ tags?: any;
40
37
  };
@@ -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
+ };
@@ -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
+ };