@bisondesk/core-sdk 1.0.23-B → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/lib/constants.d.ts +0 -77
  2. package/lib/constants.d.ts.map +1 -1
  3. package/lib/constants.js +1 -924
  4. package/lib/constants.js.map +1 -1
  5. package/lib/types/crm.d.ts +30 -103
  6. package/lib/types/crm.d.ts.map +1 -1
  7. package/lib/types/crm.js +0 -16
  8. package/lib/types/crm.js.map +1 -1
  9. package/lib/types/definitions.d.ts +13 -15
  10. package/lib/types/definitions.d.ts.map +1 -1
  11. package/lib/types/fields.d.ts +25 -26
  12. package/lib/types/fields.d.ts.map +1 -1
  13. package/lib/types/fields.js +0 -4
  14. package/lib/types/fields.js.map +1 -1
  15. package/lib/types/interests.d.ts +25 -0
  16. package/lib/types/interests.d.ts.map +1 -0
  17. package/lib/types/{settings.js → interests.js} +1 -1
  18. package/lib/types/interests.js.map +1 -0
  19. package/lib/types/picklists.d.ts +4 -15
  20. package/lib/types/picklists.d.ts.map +1 -1
  21. package/lib/types/search.d.ts +4 -26
  22. package/lib/types/search.d.ts.map +1 -1
  23. package/lib/types/search.js.map +1 -1
  24. package/lib/types/storage.d.ts +11 -1
  25. package/lib/types/storage.d.ts.map +1 -1
  26. package/lib/types/storage.js +0 -15
  27. package/lib/types/storage.js.map +1 -1
  28. package/lib/types/tenants.d.ts +9 -32
  29. package/lib/types/tenants.d.ts.map +1 -1
  30. package/lib/types/tenants.js +0 -11
  31. package/lib/types/tenants.js.map +1 -1
  32. package/lib/types/users.d.ts +3 -11
  33. package/lib/types/users.d.ts.map +1 -1
  34. package/lib/types/utils.d.ts +0 -20
  35. package/lib/types/utils.d.ts.map +1 -1
  36. package/lib/types/utils.js +0 -6
  37. package/lib/types/utils.js.map +1 -1
  38. package/lib/types/vehicles.d.ts +92 -406
  39. package/lib/types/vehicles.d.ts.map +1 -1
  40. package/lib/types/vehicles.js +1 -54
  41. package/lib/types/vehicles.js.map +1 -1
  42. package/package.json +6 -8
  43. package/src/constants.ts +1 -930
  44. package/src/types/crm.ts +30 -118
  45. package/src/types/definitions.ts +12 -19
  46. package/src/types/fields.ts +31 -72
  47. package/src/types/interests.ts +24 -0
  48. package/src/types/picklists.ts +7 -26
  49. package/src/types/search.ts +4 -34
  50. package/src/types/storage.ts +12 -1
  51. package/src/types/tenants.ts +11 -37
  52. package/src/types/users.ts +3 -17
  53. package/src/types/utils.ts +0 -25
  54. package/src/types/vehicles.ts +93 -461
  55. package/tsconfig.tsbuildinfo +2995 -1
  56. package/lib/apis/crm.d.ts +0 -39
  57. package/lib/apis/crm.d.ts.map +0 -1
  58. package/lib/apis/crm.js +0 -201
  59. package/lib/apis/crm.js.map +0 -1
  60. package/lib/apis/documents.d.ts +0 -4
  61. package/lib/apis/documents.d.ts.map +0 -1
  62. package/lib/apis/documents.js +0 -47
  63. package/lib/apis/documents.js.map +0 -1
  64. package/lib/apis/internet-vehicles.d.ts +0 -3
  65. package/lib/apis/internet-vehicles.d.ts.map +0 -1
  66. package/lib/apis/internet-vehicles.js +0 -27
  67. package/lib/apis/internet-vehicles.js.map +0 -1
  68. package/lib/apis/leasing-administration.d.ts +0 -8
  69. package/lib/apis/leasing-administration.d.ts.map +0 -1
  70. package/lib/apis/leasing-administration.js +0 -49
  71. package/lib/apis/leasing-administration.js.map +0 -1
  72. package/lib/apis/leasing.d.ts +0 -19
  73. package/lib/apis/leasing.d.ts.map +0 -1
  74. package/lib/apis/leasing.js +0 -168
  75. package/lib/apis/leasing.js.map +0 -1
  76. package/lib/apis/opportunities.d.ts +0 -9
  77. package/lib/apis/opportunities.d.ts.map +0 -1
  78. package/lib/apis/opportunities.js +0 -94
  79. package/lib/apis/opportunities.js.map +0 -1
  80. package/lib/apis/picklists.d.ts +0 -5
  81. package/lib/apis/picklists.d.ts.map +0 -1
  82. package/lib/apis/picklists.js +0 -44
  83. package/lib/apis/picklists.js.map +0 -1
  84. package/lib/apis/tenants.d.ts +0 -7
  85. package/lib/apis/tenants.d.ts.map +0 -1
  86. package/lib/apis/tenants.js +0 -80
  87. package/lib/apis/tenants.js.map +0 -1
  88. package/lib/apis/users.d.ts +0 -3
  89. package/lib/apis/users.d.ts.map +0 -1
  90. package/lib/apis/users.js +0 -26
  91. package/lib/apis/users.js.map +0 -1
  92. package/lib/apis/utils.d.ts +0 -9
  93. package/lib/apis/utils.d.ts.map +0 -1
  94. package/lib/apis/utils.js +0 -23
  95. package/lib/apis/utils.js.map +0 -1
  96. package/lib/apis/vehicles.d.ts +0 -18
  97. package/lib/apis/vehicles.d.ts.map +0 -1
  98. package/lib/apis/vehicles.js +0 -159
  99. package/lib/apis/vehicles.js.map +0 -1
  100. package/lib/ddb-entities.d.ts +0 -2
  101. package/lib/ddb-entities.d.ts.map +0 -1
  102. package/lib/ddb-entities.js +0 -5
  103. package/lib/ddb-entities.js.map +0 -1
  104. package/lib/types/activities.d.ts +0 -38
  105. package/lib/types/activities.d.ts.map +0 -1
  106. package/lib/types/activities.js +0 -16
  107. package/lib/types/activities.js.map +0 -1
  108. package/lib/types/documents.d.ts +0 -105
  109. package/lib/types/documents.d.ts.map +0 -1
  110. package/lib/types/documents.js +0 -3
  111. package/lib/types/documents.js.map +0 -1
  112. package/lib/types/internet-vehicles.d.ts +0 -64
  113. package/lib/types/internet-vehicles.d.ts.map +0 -1
  114. package/lib/types/internet-vehicles.js +0 -3
  115. package/lib/types/internet-vehicles.js.map +0 -1
  116. package/lib/types/leads.d.ts +0 -134
  117. package/lib/types/leads.d.ts.map +0 -1
  118. package/lib/types/leads.js +0 -3
  119. package/lib/types/leads.js.map +0 -1
  120. package/lib/types/leasing-administration.d.ts +0 -107
  121. package/lib/types/leasing-administration.d.ts.map +0 -1
  122. package/lib/types/leasing-administration.js +0 -3
  123. package/lib/types/leasing-administration.js.map +0 -1
  124. package/lib/types/leasing-search.d.ts +0 -22
  125. package/lib/types/leasing-search.d.ts.map +0 -1
  126. package/lib/types/leasing-search.js +0 -3
  127. package/lib/types/leasing-search.js.map +0 -1
  128. package/lib/types/leasing-settings.d.ts +0 -113
  129. package/lib/types/leasing-settings.d.ts.map +0 -1
  130. package/lib/types/leasing-settings.js +0 -10
  131. package/lib/types/leasing-settings.js.map +0 -1
  132. package/lib/types/leasing.d.ts +0 -322
  133. package/lib/types/leasing.d.ts.map +0 -1
  134. package/lib/types/leasing.js +0 -24
  135. package/lib/types/leasing.js.map +0 -1
  136. package/lib/types/machines.d.ts +0 -38
  137. package/lib/types/machines.d.ts.map +0 -1
  138. package/lib/types/machines.js +0 -3
  139. package/lib/types/machines.js.map +0 -1
  140. package/lib/types/opportunities.d.ts +0 -448
  141. package/lib/types/opportunities.d.ts.map +0 -1
  142. package/lib/types/opportunities.js +0 -68
  143. package/lib/types/opportunities.js.map +0 -1
  144. package/lib/types/payments.d.ts +0 -38
  145. package/lib/types/payments.d.ts.map +0 -1
  146. package/lib/types/payments.js +0 -9
  147. package/lib/types/payments.js.map +0 -1
  148. package/lib/types/quotes.d.ts +0 -173
  149. package/lib/types/quotes.d.ts.map +0 -1
  150. package/lib/types/quotes.js +0 -26
  151. package/lib/types/quotes.js.map +0 -1
  152. package/lib/types/recently-viewed.d.ts +0 -33
  153. package/lib/types/recently-viewed.d.ts.map +0 -1
  154. package/lib/types/recently-viewed.js +0 -3
  155. package/lib/types/recently-viewed.js.map +0 -1
  156. package/lib/types/saved-filters.d.ts +0 -20
  157. package/lib/types/saved-filters.d.ts.map +0 -1
  158. package/lib/types/saved-filters.js +0 -3
  159. package/lib/types/saved-filters.js.map +0 -1
  160. package/lib/types/settings.d.ts +0 -50
  161. package/lib/types/settings.d.ts.map +0 -1
  162. package/lib/types/settings.js.map +0 -1
  163. package/lib/types/templates.d.ts +0 -35
  164. package/lib/types/templates.d.ts.map +0 -1
  165. package/lib/types/templates.js +0 -9
  166. package/lib/types/templates.js.map +0 -1
  167. package/lib/types/website.d.ts +0 -24
  168. package/lib/types/website.d.ts.map +0 -1
  169. package/lib/types/website.js +0 -3
  170. package/lib/types/website.js.map +0 -1
  171. package/lib/utils/forms.d.ts +0 -6
  172. package/lib/utils/forms.d.ts.map +0 -1
  173. package/lib/utils/forms.js +0 -33
  174. package/lib/utils/forms.js.map +0 -1
  175. package/lib/utils/leasing.d.ts +0 -3
  176. package/lib/utils/leasing.d.ts.map +0 -1
  177. package/lib/utils/leasing.js +0 -10
  178. package/lib/utils/leasing.js.map +0 -1
  179. package/lib/utils/slug.d.ts +0 -3
  180. package/lib/utils/slug.d.ts.map +0 -1
  181. package/lib/utils/slug.js +0 -23
  182. package/lib/utils/slug.js.map +0 -1
  183. package/lib/utils/tenants.d.ts +0 -4
  184. package/lib/utils/tenants.d.ts.map +0 -1
  185. package/lib/utils/tenants.js +0 -16
  186. package/lib/utils/tenants.js.map +0 -1
  187. package/lib/utils/vehicles.d.ts +0 -12
  188. package/lib/utils/vehicles.d.ts.map +0 -1
  189. package/lib/utils/vehicles.js +0 -73
  190. package/lib/utils/vehicles.js.map +0 -1
  191. package/src/apis/crm.ts +0 -302
  192. package/src/apis/documents.ts +0 -54
  193. package/src/apis/internet-vehicles.ts +0 -23
  194. package/src/apis/leasing-administration.ts +0 -70
  195. package/src/apis/leasing.ts +0 -257
  196. package/src/apis/opportunities.ts +0 -133
  197. package/src/apis/picklists.ts +0 -50
  198. package/src/apis/tenants.ts +0 -100
  199. package/src/apis/users.ts +0 -22
  200. package/src/apis/utils.ts +0 -23
  201. package/src/apis/vehicles.ts +0 -229
  202. package/src/ddb-entities.ts +0 -1
  203. package/src/environment.d.ts +0 -6
  204. package/src/types/activities.ts +0 -41
  205. package/src/types/documents.ts +0 -110
  206. package/src/types/internet-vehicles.ts +0 -67
  207. package/src/types/leads.ts +0 -144
  208. package/src/types/leasing-administration.ts +0 -131
  209. package/src/types/leasing-search.ts +0 -24
  210. package/src/types/leasing-settings.ts +0 -111
  211. package/src/types/leasing.ts +0 -360
  212. package/src/types/machines.ts +0 -40
  213. package/src/types/opportunities.ts +0 -496
  214. package/src/types/payments.ts +0 -40
  215. package/src/types/quotes.ts +0 -186
  216. package/src/types/recently-viewed.ts +0 -45
  217. package/src/types/saved-filters.ts +0 -21
  218. package/src/types/settings.ts +0 -51
  219. package/src/types/templates.ts +0 -40
  220. package/src/types/website.ts +0 -28
  221. package/src/utils/forms.ts +0 -32
  222. package/src/utils/leasing.ts +0 -14
  223. package/src/utils/slug.ts +0 -19
  224. package/src/utils/tenants.ts +0 -14
  225. package/src/utils/vehicles.ts +0 -92
@@ -1,131 +0,0 @@
1
- import { AttachmentValue } from '@bisondesk/commons-sdk/lib/types';
2
- import { LeasingAdminUploadHandlers } from '../constants';
3
-
4
- export type LeasingAdminUploadStatus = 'success' | 'processing' | 'error';
5
-
6
- export type LeasingAdminUploadMetadata = { [key in string]?: unknown };
7
- export type LeasingAdminUploadAttachments = { [key in string]?: AttachmentValue };
8
-
9
- export type LeasingAdminUploadEvent<
10
- M extends LeasingAdminUploadMetadata = {},
11
- A extends LeasingAdminUploadAttachments = {}
12
- > = LeasingAdminUpload<M, A> & { tenantId: string };
13
-
14
- export type LeasingAdminUpload<
15
- M extends LeasingAdminUploadMetadata = {},
16
- A extends LeasingAdminUploadAttachments = {}
17
- > = {
18
- id: string;
19
- updatedAt: string;
20
- createdAt: string;
21
- createdBy: string;
22
-
23
- status: LeasingAdminUploadStatus;
24
- attachments: A;
25
- metadata: M;
26
- handlerId: LeasingAdminUploadHandlers;
27
- };
28
-
29
- export type NewLeasingAdminUploadRequest<
30
- M extends LeasingAdminUploadMetadata = {},
31
- A extends LeasingAdminUploadAttachments = {}
32
- > = {
33
- attachments: A;
34
- metadata: M;
35
- handlerId: LeasingAdminUploadHandlers;
36
- };
37
-
38
- export type DhondtAttachments = {
39
- json: AttachmentValue;
40
- };
41
-
42
- export type BelfiusAttachments = {
43
- xlsx: AttachmentValue;
44
- json?: AttachmentValue; // json version of the xlsx file
45
- };
46
-
47
- export type BelfiusMetadata = {
48
- totalLines: number;
49
- totalIncludingVat: string;
50
- };
51
-
52
- export type DhondtMetadata = {
53
- invoiceNumber: string;
54
- invoiceDate: string;
55
- };
56
-
57
- export type DhondtInvoiceLine = {
58
- BrutoPremie: number;
59
- Chassisnummer: string;
60
- Datum: string;
61
- NettoPremie: number;
62
- Plaatnummer: string;
63
- Taksen: number;
64
- VoertuigVlootNummer: string | undefined;
65
- };
66
-
67
- export type INGMetadata = {
68
- capital: string;
69
- emailId: string;
70
- interest: string;
71
- invoiceDate: string;
72
- invoiceNumber: string;
73
- pdfUrl: string;
74
- stockNumber: string;
75
- };
76
-
77
- export type INGAttachments = {
78
- email: AttachmentValue;
79
- };
80
-
81
- export type DiffableDhondtInvoiceLine = DhondtInvoiceLine;
82
-
83
- export type BelfiusRawInvoiceLine = {
84
- AMORTIZATION: number;
85
- AVENANT: number;
86
- CODE_DEVISE: string;
87
- CONTRACT: number;
88
- CUSTOMER: string;
89
- DATE_INVOICE: number;
90
- DESCRIPTION: string;
91
- DUE_DATE: number;
92
- INTEREST: number;
93
- INVOICE: number;
94
- RATE: number;
95
- RENTAL: number;
96
- REST_DESCIPT: string;
97
- VAT: number;
98
- 'VAT INCL': number;
99
- VAT_NUMBER: string;
100
- };
101
-
102
- export type BelfiusInvoiceLine = {
103
- capital: string;
104
- contractNr: string;
105
- interest: string;
106
- invoiceNr: string;
107
- invoiceDate: string;
108
- rentExcl: string;
109
- rentIncl: string;
110
- vatAmount: string;
111
- vehicleId: string;
112
- stockNumber: string;
113
- };
114
-
115
- export type DiffableBelfiusInvoiceLine = Omit<
116
- BelfiusInvoiceLine,
117
- 'invoiceNr' | 'invoiceDate' | 'capital' | 'interest'
118
- >;
119
-
120
- export type LineDiff<T> = {
121
- [Property in keyof T]: {
122
- value: T[Property];
123
- before: T[Property];
124
- };
125
- };
126
-
127
- export type Diff<T> = {
128
- added: T[];
129
- removed: T[];
130
- changed: LineDiff<T>[];
131
- };
@@ -1,24 +0,0 @@
1
- import { InsuranceEntry } from '@bisondesk/commons-sdk/lib/insurance';
2
- import { SearchPermissions } from '@bisondesk/commons-sdk/lib/types';
3
- import { Organization } from './crm';
4
- import { PublicSearchDefinition } from './definitions';
5
- import { LeasingContract } from './leasing';
6
- import { Vehicle } from './vehicles';
7
-
8
- export type LeasingPublicSearchDefinitions = {
9
- searchLeasingContract: PublicSearchDefinition;
10
- };
11
-
12
- export type SearchLeasingContract = {
13
- contract: LeasingContract;
14
- org: Organization;
15
- vehicle: Vehicle;
16
- custom: {
17
- active: boolean;
18
- insurance?: InsuranceEntry;
19
- };
20
- };
21
-
22
- export type InputSearchLeasingContract = SearchLeasingContract & {
23
- permissions: SearchPermissions;
24
- };
@@ -1,111 +0,0 @@
1
- import { MultiLangValue } from '@bisondesk/commons-sdk/lib/types';
2
- import { Categories, OpportunityType } from '../constants';
3
- import { SortFilter } from './search';
4
-
5
- export type LeasingQuoteParams = { id: string; name: string; modifiedAt: string } & {
6
- countryCode: 'be';
7
- insurance: {
8
- allRisksCost: string;
9
- allRisksTax: string;
10
- allRisksFees: string;
11
- allRisksMinimumCost: string;
12
- specialTechnicalInsuranceCost: string;
13
- specialTechnicalInsuranceTax: string;
14
- specialTechnicalInsuranceFees: string;
15
- civilLiabilitiesCost: string;
16
- civilLiabilitiesTax: string;
17
- civilLiabilitiesFees: string;
18
- roadAssistanceMonthlySalesPrice: string; // monthly Price
19
- roadAssistanceMonthlyCostPrice: string; // monthly Price
20
- margin: string;
21
- };
22
- leasing: {
23
- leasingInterestRate: string;
24
- leasingDuration: number;
25
- leasingStartupFeePercentage: string;
26
- leasingDepositPercentage: string;
27
- leasingResidualValuePercentage: string;
28
- };
29
- taxes: {
30
- oneTimeRoadTax: string;
31
- yearlyRoadTax: string;
32
- margin: string;
33
- };
34
- costs: {
35
- bankDepositPercentage: string;
36
- bankInterestRate: string;
37
- bankResidualValuePercentage: string;
38
- trackAndTrace24Cost: string;
39
- trackAndTrace36Cost: string;
40
- trackAndTrace48Cost: string;
41
- trackAndTraceMaxCost: string;
42
- };
43
- };
44
-
45
- type BaseLeasingQuoteExtraSettings = {
46
- referenceCode: string;
47
- active: boolean;
48
- costPrice: string;
49
- countryCode: string;
50
- deliveryPackage: boolean;
51
- displayByDefault: boolean;
52
- hint?: MultiLangValue;
53
- name: MultiLangValue;
54
- salesPrice: string;
55
- vehicleCategoryRestrictions: Categories[];
56
- departments: string[];
57
- departmentTitles?: { [department: string]: string };
58
- opportunityTypeRestrictions: OpportunityType[];
59
- };
60
-
61
- export type BaseLeasingQuoteExtraInput = {
62
- agreedPrice: string;
63
- costPrice: string;
64
- hint?: MultiLangValue;
65
- name: MultiLangValue;
66
- referenceCode: string;
67
- quantity: number;
68
- id: string;
69
- departments: string[];
70
- departmentTitles?: { [department: string]: string };
71
- };
72
-
73
- export type NewLeasingQuoteExtraSettings = BaseLeasingQuoteExtraSettings & {
74
- id?: undefined;
75
- };
76
-
77
- export type LeasingQuoteExtraSettings = BaseLeasingQuoteExtraSettings & {
78
- id: string;
79
- };
80
-
81
- export enum LeasingItemsPaymentSplit {
82
- Customer = 'customer',
83
- Split = 'split',
84
- Company = 'company',
85
- }
86
-
87
- export type LeasingDeliveryPackageInput = BaseLeasingQuoteExtraInput & { salesPrice: string };
88
-
89
- export type CustomLeasingQuoteExtraInput = BaseLeasingQuoteExtraInput & {
90
- paymentSplit: LeasingItemsPaymentSplit;
91
- leasingPercentage: string;
92
- };
93
-
94
- export type LeasingQuoteExtraInput = BaseLeasingQuoteExtraInput & {
95
- salesPrice: string;
96
- paymentSplit: LeasingItemsPaymentSplit;
97
- leasingPercentage: string;
98
- };
99
-
100
- export type LeasingQuoteExtrasRequest = {
101
- deliveryPackage?: boolean;
102
- displayByDefault?: boolean;
103
- vehicleCategory?: Categories;
104
- country: string;
105
- name?: string;
106
- active?: boolean;
107
- offset?: number;
108
- limit?: number;
109
- sortBy?: SortFilter;
110
- opportunityType?: OpportunityType;
111
- };
@@ -1,360 +0,0 @@
1
- import { EmailMessage } from '@bisondesk/commons-sdk/lib/messages';
2
- import {
3
- AttachmentValue,
4
- Document,
5
- LinkValue,
6
- PaginatedList,
7
- } from '@bisondesk/commons-sdk/lib/types';
8
- import { SortFilter } from './search';
9
- import { ReferenceData } from './utils';
10
-
11
- export type LeasingContractEvent = {
12
- id: string;
13
- action: 'create' | 'update' | 'delete';
14
- actionAt: string;
15
- userId: string;
16
- tenantId: string;
17
- contract: LeasingContract;
18
- };
19
-
20
- export type LeasingContractImportEvent = {
21
- tenantId: string;
22
- };
23
-
24
- export type LeasingConditionEvent = {
25
- id: string;
26
- action: 'create';
27
- actionAt: string;
28
- userId: string;
29
- tenantId: string;
30
- };
31
-
32
- export type OverdueDossier = {
33
- id: string;
34
- organizationId: string;
35
- organizationName: string;
36
- status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED';
37
- emails: EmailMessage[];
38
- createdAt: string;
39
- modifiedAt: string;
40
- completedAt?: string;
41
- nextActionAt: string;
42
- riskLevel: number;
43
- };
44
-
45
- export type LeasingContractClient = {
46
- organizationId: string;
47
- contactIds: string[];
48
- email?: string;
49
- since: string;
50
- takeoverId?: string;
51
- country: string;
52
- beEntityType?: 'Legal Person' | 'Natural Person';
53
- beForeignEntity?: boolean;
54
-
55
- /**
56
- * Used to overwrite the startDate in the context of a Becris declaration. This might be necessary
57
- * when due to some data-quality issue we do not report the contract at the right period and it is no
58
- * longer possible to resend the declaration for the corresponding month.
59
- */
60
- becrisStartDate?: string;
61
- };
62
-
63
- export enum LeasingContractSource {
64
- HYPERPORTAL = 'hyperportal',
65
- BISONDESK = 'bisondesk',
66
- }
67
-
68
- export enum LeasingContractStatus {
69
- DRAFT = 'draft',
70
- DISCARDED = 'discarded',
71
- PAUSED = 'paused',
72
- ACTIVE = 'active',
73
- ENDED = 'ended',
74
- }
75
-
76
- export type LeasingContractHyperportal = {
77
- source: LeasingContractSource.HYPERPORTAL;
78
- /** oldest first **/
79
- conditions: ConditionsRef[];
80
- opportunities?: undefined;
81
- };
82
-
83
- export type LeasingContractBisondesk = {
84
- source: LeasingContractSource.BISONDESK;
85
- conditions?: undefined;
86
- /** oldest first **/
87
- opportunities: OpportunityRef[];
88
- };
89
-
90
- export type LeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> = {
91
- id: string;
92
- createdAt: string;
93
- updatedAt: string;
94
- contractNumber?: string;
95
- startDate: string;
96
- deliveryDate?: string;
97
- endDate?: string;
98
- slbPartner?: string;
99
- links?: LinkValue[];
100
- accountManager?: string;
101
- clients: LeasingContractClient[];
102
- vehicle: {
103
- id: string;
104
- stockNumber: string;
105
- administrativeNumber?: string;
106
- };
107
- status: LeasingContractStatus;
108
- documents: Document[];
109
- } & T;
110
-
111
- type BaseRef = {
112
- id: string;
113
- depositAmount: string;
114
- durationInMonths: number;
115
- saleAmount: string; // includes the extras
116
- interestRate: string;
117
- residualAmount: string;
118
- leasingMonthlyAmount: string; //Value excluding VAT
119
- otherMonthlyAmounts: string; //Value excluding VAT
120
- totalMonthlyAmount: string; //Value excluding VAT
121
- };
122
-
123
- export type ConditionsRef = BaseRef & {
124
- validSince: string;
125
- };
126
-
127
- export type OpportunityRef = BaseRef & {
128
- createdAt: string;
129
- quoteId: string;
130
- //Since VAT is client specific and contracts can be transferred between clients, we always handle values without VAT
131
- };
132
-
133
- export type ListOverdueRemindersResponse = PaginatedList<OverdueDossier, ReferenceData>;
134
- export type ListOverdueRemindersRequest = {
135
- offset: number;
136
- limit: number;
137
- sortBy: SortFilter;
138
- };
139
-
140
- export type ListBecrisDeclarationsRequest = {
141
- offset: number;
142
- limit: number;
143
- };
144
-
145
- export type NewLeasingConditions = {
146
- parameters: {
147
- yearlyRoadTax: string;
148
- civilLiability: string;
149
- oneTimeRoadTax: string;
150
- specialInsurance: string;
151
- allRisksPercentage: string;
152
- allRisksTaxPercentage: string;
153
- };
154
-
155
- inputs: {
156
- deposit: string;
157
- salesPrice: string;
158
- bankDeposit: string;
159
- purchasePrice: string;
160
- residualValue: string;
161
- insuranceAmount: string;
162
- durationInMonths: number;
163
- includesAllRisks: boolean;
164
- marginPercentage: string;
165
- bankResidualValue: string;
166
- bankDurationInMonths: number;
167
- startupFeePercentage: string;
168
- includesYearlyRoadTax: boolean;
169
- includesCivilLiability: boolean;
170
- includesOneTimeRoadTax: boolean;
171
- interestRatePercentage: string;
172
- includesSpecialInsurance: boolean;
173
- monthlyAdministrationFee: string;
174
- bankInterestRatePercentage: string;
175
- };
176
-
177
- outputs: {
178
- ROI: string;
179
- ROITarget: string;
180
- ROIPerYear: string;
181
- cashDeficit: string;
182
- totalProfit: string;
183
- ROIDifference: string;
184
- leasingAmount: string;
185
- leasingProfit: string;
186
- vehicleProfit: string;
187
- oneTimeTaxCost: string;
188
- financingAmount: string;
189
- bankContractValue: string;
190
- bankLeasingAmount: string;
191
- totalMonthlyPayment: string;
192
- leasingContractValue: string;
193
- monthlyTaxRetailPrice: string;
194
- allRisksInsuranceAmount: string;
195
- };
196
-
197
- cashIn: Array<{
198
- time: string;
199
- cashIn: string;
200
- deposit: string;
201
- startupFee: string;
202
- taxPayment: string;
203
- residualValue: string;
204
- cumulativeCash: string;
205
- insurancePayment: string;
206
- monthlyAdministrationFee: string;
207
- leasingAmountWithoutAdminFee: string;
208
- }>;
209
-
210
- cashOut: Array<{
211
- time: string;
212
- cashOut: string;
213
- deposit: string;
214
- taxPayment: string;
215
- leasingAmount: string;
216
- residualValue: string;
217
- cumulativeCash: string;
218
- insurancePayment: string;
219
- }>;
220
- };
221
-
222
- export type LeasingConditions = NewLeasingConditions & {
223
- id: string;
224
- createdAt: string;
225
- createdBy: string;
226
- amortization: AmortizationTable;
227
- };
228
-
229
- export type AmortizationRow = {
230
- period: number;
231
- /* An estimate of the date in which the period will happen
232
- based on the contract start date. Empty for period zero. */
233
- expectedPeriodDate?: string;
234
- buyOff: string;
235
- payment: string;
236
- capital: string;
237
- interest: string;
238
- totalInterest: string;
239
- balance: string;
240
- };
241
-
242
- export type AmortizationTable = {
243
- annualInterestRate?: string;
244
- monthlyInterestRate?: string;
245
- rows: AmortizationRow[];
246
- };
247
-
248
- export type AmortizationDocsEvent = {
249
- contractId: string;
250
- changedDocumentIds: string[];
251
- actionAt: string;
252
- userId: string;
253
- tenantId: string;
254
- };
255
-
256
- export type AmortizationDocs = {
257
- contractId: string;
258
- period: number;
259
- documents: AmortizationDoc[];
260
- };
261
-
262
- export type AmortizationDoc = {
263
- amount: string;
264
- bookingNumber: string;
265
- branchId: string;
266
- documentId: string;
267
- issueDate: string;
268
- subtype: 'Invoice' | 'Credit Note';
269
- clientExternalId: number;
270
- };
271
-
272
- export type BecrisDeclaration = {
273
- createdAt: string;
274
- endDate: string;
275
- endingInstruments: number;
276
- existingInstruments: number;
277
- file: AttachmentValue;
278
- id: string;
279
- newInstruments: number;
280
- startDate: string;
281
- };
282
-
283
- export type LeasingReportingSettings = {
284
- active: boolean;
285
- branchId: string;
286
- tenantId: string;
287
- };
288
-
289
- export enum LeasingRemindersSortableColumns {
290
- NextActionAt = 'next_action_at',
291
- OrganizationName = 'organization_name',
292
- RemindersCount = 'reminders_count',
293
- Status = 'status',
294
- }
295
-
296
- export type AmortizationTableRequest = {
297
- leasingAmount: string; // monthly amount
298
- deposit: string;
299
- salesPrice: string;
300
- duration: number; // in months
301
- residual: string;
302
- monthlyInterestRate: string; // the annual interest rate divided by 12
303
- startDate?: string; // should be filled in if you want an amortization table with expected period dates
304
- };
305
-
306
- export type AmortizationTableTemplateData = {
307
- opportunity: {
308
- id: string;
309
- };
310
- v: {
311
- make: string;
312
- model: string;
313
- category: string;
314
- type?: string;
315
- vin: string;
316
- year?: string | number;
317
- stockNumber: string;
318
- };
319
- c: {
320
- clientNumber: number;
321
- company: string;
322
- fullName: string;
323
- vatNumber?: string;
324
- email?: string;
325
- phone?: string;
326
- address?: string;
327
- };
328
- leasing: {
329
- salesPrice: string;
330
- salesPriceVat: string;
331
- salesPriceExclVat: string;
332
- deposit: string;
333
- depositExclVat: string;
334
- depositVat: string;
335
- installment: string;
336
- installmentVat: string;
337
- installmentExclVat: string;
338
- duration: number;
339
- monthlyInsurance: string;
340
- monthlyTax: string;
341
- monthlyTaxesInsurance: string;
342
- residual: string;
343
- residualVat: string;
344
- residualExclVat: string;
345
- offerNumber: string;
346
- contractNumber: string;
347
- vatPercentage: string;
348
- };
349
- amortization: {
350
- period: number;
351
- periodStartDate: string;
352
- periodEndDate: string;
353
- deposit: string;
354
- startUpFee: string;
355
- monthlyAmount: string;
356
- insurance: string;
357
- expirationDate: string;
358
- total: string;
359
- }[];
360
- };
@@ -1,40 +0,0 @@
1
- export type Machine = {
2
- axlesConfiguration?: string;
3
- bodywork?: string;
4
- category: string;
5
- vin?: string;
6
- cocPvg?: string;
7
- emptyWeightKg?: number;
8
- euronorm?: string;
9
- firstRegistration?: string;
10
- gearbox?: string;
11
- kilometers?: number;
12
- make?: string;
13
- makeModel?: string;
14
- makeModelText?: string;
15
- makeModelType?: string;
16
- makeModelTypeText?: string;
17
- powerHp?: number;
18
- productionYear?: number;
19
- suspension?: string;
20
- totalWeightKg?: number;
21
- wheelbaseCm?: number;
22
-
23
- references: MachineReference[];
24
- id: string;
25
- };
26
-
27
- export type MachineReference = {
28
- administrativeNumber?: string;
29
- metaId: string;
30
- stockNumber: string;
31
- tenantId: string;
32
- vehicleId: string;
33
- };
34
-
35
- export type MachineEvent = {
36
- machine: Machine;
37
- action: 'upsert' | 'delete';
38
- actionAt: string;
39
- namespace: string;
40
- };