@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,260 +1,15 @@
1
- import {
2
- AttachmentValue,
3
- Document,
4
- LocationValue,
5
- MultiLangValue,
6
- SearchPermissions,
7
- } from '@bisondesk/commons-sdk/lib/types';
8
-
9
- type BaseVehicleEvent = {
10
- id: string;
11
- actionAt: string;
12
- userId: string;
13
- tenantId: string;
14
- };
15
-
16
- type VehicleSuperstructure = {
17
- carCapacity?: number;
18
- compartmentCount?: number;
19
- counter?: boolean;
20
- crane?: {
21
- make?: string;
22
- model?: string;
23
- position?: 'Behind the cabin' | 'Rear';
24
- present?: boolean;
25
- year?: number;
26
- };
27
- dimensions?: {
28
- height?: number;
29
- length?: number;
30
- width?: number;
31
- extended?: string; // L1, L2, ...
32
- heightened?: string; // H1, H2, ...
33
- };
34
- baseVehicle?: SuperstructureBaseVehicle;
35
- extendable?: boolean;
36
- highPressurePump?: boolean;
37
- loadingPlatformHeight?: number;
38
- pump?: boolean;
39
- slidingRoof?: boolean;
40
- tailgate?: {
41
- capacity?: number;
42
- make?: string;
43
- model?: string;
44
- present?: boolean;
45
- type?: 'slider_lift' | 'cantilever' | 'column_lift';
46
- };
47
- tank?: {
48
- capacity: number;
49
- };
50
- temperatureControl?: {
51
- engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';
52
- make?: string;
53
- runningHours?: {
54
- diesel?: number;
55
- electric?: number;
56
- };
57
- };
58
- tipper?: {
59
- tipsBack?: boolean;
60
- tipsLeft?: boolean;
61
- tipsRight?: boolean;
62
- };
63
- };
64
- export type NewVehicleRequest = {
65
- branch: string;
66
- count: number;
67
- specs: VehicleExternalInfo;
68
- description: {
69
- remarks?: string;
70
- technicalRemarks?: string;
71
- };
72
- logistics: {
73
- vehicleRole: VehicleInternalInfo['role'];
74
- parking: string;
75
- deliveryType: VehiclePurchaseDeliveryType;
76
- availableDate: string;
77
- pickupAddress?: LocationValue;
78
- };
79
- prices: {
80
- minimum?: string;
81
- premium?: string;
82
- internet?: string;
83
- };
84
- media: {
85
- pictures: AttachmentValue[];
86
- videos: AttachmentValue[];
87
- docs: Document[];
88
- engineeringDocs: Document[];
89
- };
90
- vinList?: string;
91
- deal: {
92
- stockNumber?: string;
93
- contactId: string;
94
- orgId: string;
95
- purchasedBy: string;
96
- dealStatus:
97
- | VehiclePurchaseDealStatus.PurchaseEvaluation
98
- | VehiclePurchaseDealStatus.PurchaseAgreed;
99
- costs: {
100
- purchase: string;
101
- purchaseVatPercentage: string;
102
- commission?: string;
103
- externalTransport?: string;
104
- internalTransport?: string;
105
- externalGarage?: string;
106
- internalGarage?: string;
107
- other?: string;
108
- };
109
- };
110
- };
111
-
112
- export type VehicleCreateEvent = BaseVehicleEvent & {
113
- action: 'create';
114
- vehicle: Vehicle;
115
- previousVehicle?: undefined;
116
- };
117
-
118
- export type VehicleUpdateEvent = BaseVehicleEvent & {
119
- action: 'update';
120
- vehicle: Vehicle;
121
- previousVehicle: Vehicle;
122
- };
123
-
124
- export type VehicleDeleteEvent = BaseVehicleEvent & {
125
- action: 'delete';
126
- vehicle?: undefined;
127
- previousVehicle: Vehicle;
128
- };
129
-
130
- export type VehicleEvent = VehicleCreateEvent | VehicleUpdateEvent | VehicleDeleteEvent;
131
-
132
- export type VehicleMarketingEvent = {
133
- actionAt: string;
134
- data: VehicleMarketing;
135
- tenantId: string;
136
- userId: string;
137
- vehicleId: string;
138
- };
139
-
140
- export type UpdateVehiclesPricesEvent = {
141
- id: string;
142
- actionAt: string;
143
- userId: string;
144
- tenantId: string;
145
- priceList: AttachmentValue;
146
- };
147
-
148
- export type PublicVehicle = Pick<Vehicle, 'external' | 'id'>;
149
-
150
- export type PublicSearchVehicle = {
151
- vehicle: PublicVehicle;
152
- };
1
+ // mostly inspired by the Hexon data model
153
2
 
154
- export enum CustomSearchState {
155
- Available = 'available',
156
- Expected = 'expected',
157
- Reserved = 'reserved',
158
- }
3
+ import { AttachmentValue } from './fields';
159
4
 
160
5
  export type SearchVehicle = {
161
- custom: {
162
- features: string[];
163
- state: CustomSearchState[];
164
- };
165
- purchase?: {
166
- supplierStockNumber?: string;
167
- };
168
- vehicle: Vehicle;
6
+ vehicle: Partial<Vehicle>;
169
7
  };
170
8
 
171
- export type InputSearchVehicle = SearchVehicle & {
172
- permissions: SearchPermissions;
173
- };
174
-
175
- export type VehicleInternalInfo = {
9
+ export type Vehicle = {
10
+ id: string;
176
11
  createdAt: string;
177
- description: {
178
- title: string;
179
- remarks?: string;
180
- technicalRemarks?: string;
181
- };
182
- parkingName?: string;
183
- identification: {
184
- administrativeNumber?: string;
185
- stockNumber: string;
186
- branch: string;
187
-
188
- /**
189
- * This ID is used to link different vehicle objects that represent the same real world asset.
190
- * Ideally the chassis number could be used, but in some cases it is not available yet.
191
- */
192
- metaId: string;
193
- };
194
- documents: Document[];
195
- engineeringDocs: Document[];
196
- pricing: {
197
- premium?: string;
198
- minimum?: string;
199
- currency?: string;
200
- };
201
- role: 'SALE' | 'OWN_USE' | 'RENTAL' | 'BUILD' | 'UNKNOWN';
202
- status: VehicleStatus;
203
12
  updatedAt: string;
204
- /* use this property to store additional terms that you want the vehicle to be found with when doing a full text search */
205
- keywords?: string[];
206
- };
207
-
208
- export type VehicleOriginalInfo = {
209
- tenantId: string;
210
- identification: {
211
- id: string;
212
- stockNumber: string;
213
- hyperdmsTenantId?: string;
214
- metaId?: string;
215
- };
216
- salesConditions: {
217
- leasing?: boolean;
218
- expected?: boolean;
219
- reserved?: boolean;
220
- price?: string;
221
- currency?: string;
222
- };
223
- };
224
-
225
- export type VehicleAxlesInfo = {
226
- details: VehicleAxle[];
227
- configuration?: string;
228
- count?: number;
229
- poweredAxlesCount?: number;
230
- wheelbase?: number;
231
- suspension?: 'Air' | 'Air/Steel' | 'Steel';
232
- };
233
-
234
- export type SuperstructureBaseVehicle = {
235
- category: string;
236
- make: string;
237
- model?: string;
238
- type?: string;
239
- axlesConfiguration?: string;
240
- emissionsClass?: string;
241
- transmissionType?: 'Automatic' | 'Manual' | 'Semi-Automatic';
242
- vin?: string;
243
- currentRegistration?: {
244
- country?: string;
245
- };
246
- suspension?: 'Air' | 'Air/Steel' | 'Steel';
247
- constructionYear?: number;
248
- firstRegistration?: string;
249
- odometerKm?: number;
250
- powerHp?: number;
251
- bodystyle?: string;
252
- accessories: VehicleExternalInfo['accessories'];
253
- superstructure?: Pick<VehicleSuperstructure, 'crane' | 'tailgate'>;
254
- };
255
-
256
- // mostly inspired by the Hexon data model
257
- export type VehicleExternalInfo = {
258
13
  body?: {
259
14
  cabin?: {
260
15
  type: 'Day' | 'Sleep / Small' | 'Sleep / Medium' | 'Sleep / Large';
@@ -274,7 +29,6 @@ export type VehicleExternalInfo = {
274
29
  };
275
30
  mainPicture?: AttachmentValue;
276
31
  pictures?: AttachmentValue[];
277
- videos?: AttachmentValue[];
278
32
  condition?: {
279
33
  damaged?: boolean;
280
34
  odometer?: {
@@ -282,14 +36,26 @@ export type VehicleExternalInfo = {
282
36
  };
283
37
  used?: boolean;
284
38
  };
39
+ description?: {
40
+ remarks?: {
41
+ [lang: string]: string;
42
+ };
43
+ internal_remarks?: {
44
+ [lang: string]: string;
45
+ };
46
+ internal_technical_remarks?: {
47
+ [lang: string]: string;
48
+ };
49
+ titles?: {
50
+ [lang: string]: string;
51
+ };
52
+ };
285
53
  general: {
286
- bodystyle?: string;
54
+ bodystyle: string;
287
55
  category: string;
288
- make?: string;
56
+ make: string;
289
57
  model?: string;
290
- modelName?: string;
291
58
  type?: string;
292
- typeName?: string;
293
59
  };
294
60
  history?: {
295
61
  advertisingYear?: number;
@@ -299,21 +65,29 @@ export type VehicleExternalInfo = {
299
65
  technicalInspectionEndDate?: string;
300
66
  };
301
67
  firstRegistration?: string;
302
- cocPvg?: string;
303
68
  };
304
- identification: {
69
+ identification?: {
70
+ administrativeNumber: string;
71
+ externalId?: string;
72
+ hdmsId: string;
73
+ hdmsOrg: string;
305
74
  licensePlate?: string;
306
- stockNumber?: string;
75
+ stockNumber: string;
307
76
  vin?: string;
308
- buildStockNumber?: string;
309
77
  };
310
78
  powertrain?: {
311
- axles?: VehicleAxlesInfo;
79
+ axles?: {
80
+ details?: VehicleAxle[];
81
+ configuration?: string;
82
+ count?: number;
83
+ poweredAxlesCount?: number;
84
+ wheelbase?: number;
85
+ suspension?: 'Air' | 'Air/Steel' | 'Steel';
86
+ };
312
87
  emissions?: {
313
88
  class?: string;
314
89
  };
315
90
  engine?: {
316
- cylinderCount?: number;
317
91
  energy?: string;
318
92
  power?: {
319
93
  hp?: number;
@@ -327,14 +101,65 @@ export type VehicleExternalInfo = {
327
101
  type?: 'Automatic' | 'Manual' | 'Semi-Automatic';
328
102
  };
329
103
  };
330
- salesConditions: {
104
+ salesConditions?: {
331
105
  leasing?: boolean;
332
106
  expected?: boolean;
333
107
  reserved?: boolean;
334
- price?: string | undefined;
335
- currency?: string | undefined;
108
+ pricing?: {
109
+ internet?: string;
110
+ premium?: string;
111
+ minimum?: string;
112
+ currency?: string;
113
+ };
114
+ };
115
+ superstructure?: {
116
+ carCapacity?: number;
117
+ compartmentCount?: number;
118
+ counter?: boolean;
119
+ crane?: {
120
+ make?: string;
121
+ model?: string;
122
+ position?: 'Behind the cabin' | 'Rear';
123
+ present?: boolean;
124
+ year?: number;
125
+ };
126
+ dimensions?: {
127
+ height?: number;
128
+ length?: number;
129
+ width?: number;
130
+ extended?: 'L1' | 'L2' | 'L3' | 'L4' | 'L5';
131
+ heightened?: 'H1' | 'H2' | 'H3';
132
+ };
133
+ extendable?: boolean;
134
+ highPressurePump?: boolean;
135
+ hoses?: boolean;
136
+ loadingPlatformHeight?: number;
137
+ pump?: boolean;
138
+ slidingRoof?: boolean;
139
+ tailgate?: {
140
+ capacity?: number;
141
+ make?: string;
142
+ model?: string;
143
+ present?: boolean;
144
+ type?: 'slider_lift' | 'cantilever' | 'column_lift';
145
+ };
146
+ tank?: {
147
+ capacity: number;
148
+ };
149
+ temperatureControl?: {
150
+ engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';
151
+ make?: string;
152
+ runningHours?: {
153
+ diesel?: number;
154
+ electric?: number;
155
+ };
156
+ };
157
+ tipper?: {
158
+ tipsBack?: boolean;
159
+ tipsLeft?: boolean;
160
+ tipsRight?: boolean;
161
+ };
336
162
  };
337
- superstructure?: VehicleSuperstructure;
338
163
  weights?: {
339
164
  gvw?: number;
340
165
  massEmpty?: number;
@@ -348,6 +173,7 @@ export type VehicleExternalInfo = {
348
173
  cdPlayer?: boolean;
349
174
  centralLocking?: boolean;
350
175
  centralLubrication?: boolean;
176
+ crane?: boolean;
351
177
  cruiseControl?: boolean;
352
178
  electricDoorMirrors?: boolean;
353
179
  electricWindows?: boolean;
@@ -381,34 +207,9 @@ export type VehicleExternalInfo = {
381
207
  };
382
208
  };
383
209
 
384
- type BaseVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = {
385
- internal: I;
386
- external: E;
387
- original?: VehicleOriginalInfo;
388
- };
389
-
390
- export type NewVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {
391
- id?: undefined;
392
- };
393
-
394
- export type Vehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {
395
- id: string;
396
- };
397
-
398
- export type VehiclesByChassisNumberRequest = {
399
- tenantIds: string[];
400
- chassisNumber: string;
401
- };
402
-
403
- export type VehiclesByMetaIdRequest = {
404
- tenantIds: string[];
405
- metaId: string;
406
- };
407
-
408
210
  export type VehicleAxle = {
409
- make?: string;
410
211
  alloyWheels?: boolean;
411
- brakes?: 'Disc' | 'Drum';
212
+ brakes?: string;
412
213
  differentialLock?: boolean;
413
214
  liftAxle?: boolean;
414
215
  maxLoad?: number;
@@ -417,7 +218,7 @@ export type VehicleAxle = {
417
218
  powered?: boolean;
418
219
  reduction?: string;
419
220
  steering?: boolean;
420
- suspension?: 'Steel' | 'Air' | 'Hydraulic';
221
+ suspension?: string;
421
222
  twinWheels?: boolean;
422
223
  tyreConditionPercLeftInside?: number;
423
224
  tyreConditionPercLeftOutside?: number;
@@ -425,172 +226,3 @@ export type VehicleAxle = {
425
226
  tyreConditionPercRightOutside?: number;
426
227
  tyreSize?: string;
427
228
  };
428
-
429
- export type VehicleMarketing = {
430
- titles: MultiLangValue;
431
- remarks?: MultiLangValue;
432
- marketingPlatforms: string[];
433
- pictures: AttachmentValue[];
434
- videos: AttachmentValue[];
435
- overrides?: {
436
- marketingPlatforms?: boolean;
437
- remarks?: boolean;
438
- titles?: boolean;
439
- pictures?: boolean;
440
- videos?: boolean;
441
- };
442
- };
443
-
444
- export enum VehicleSaleDealStatus {
445
- SaleAgreed = 'SALE_AGREED',
446
- FirstPaymentReceived = 'FIRST_PAYMENT_RECEIVED',
447
- FullPaymentReceived = 'FULL_PAYMENT_RECEIVED',
448
- NotSold = 'NOT_SOLD',
449
- }
450
-
451
- export enum VehiclePurchaseDealStatus {
452
- PurchaseEvaluation = 'PURCHASE_EVALUATION', // used for vehicle consignation
453
- PurchaseAgreed = 'PURCHASE_AGREED',
454
- FirstPaymentAllowed = 'FIRST_PAYMENT_ALLOWED',
455
- FirstPaymentSent = 'FIRST_PAYMENT_SENT',
456
- FullPaymentAllowed = 'FULL_PAYMENT_ALLOWED',
457
- FullPaymentSent = 'FULL_PAYMENT_SENT',
458
- }
459
-
460
- export enum VehicleSaleLogisticsStatus {
461
- AtOrigin = 'AT_ORIGIN',
462
- Delivered = 'DELIVERED',
463
- }
464
-
465
- export enum VehiclePurchaseLogisticsStatus {
466
- AtOrigin = 'AT_ORIGIN',
467
- Arrived = 'ARRIVED',
468
- CheckedIn = 'CHECKED_IN',
469
- }
470
-
471
- export enum VehiclePurchaseDeliveryType {
472
- PickUp = 'PICK_UP',
473
- DropOff = 'DROP_OFF',
474
- }
475
-
476
- export type VehicleStatus = {
477
- deleted?: boolean;
478
- option?: {
479
- id: string;
480
- expirationDate: number;
481
- };
482
- sale: {
483
- id?: string;
484
- dealStatus: VehicleSaleDealStatus;
485
- logisticsStatus?: VehicleSaleLogisticsStatus;
486
- };
487
- purchase: {
488
- purchasedBy?: string;
489
- dealStatus: VehiclePurchaseDealStatus;
490
- logisticsStatus: VehiclePurchaseLogisticsStatus;
491
- };
492
- };
493
-
494
- export type VehiclePriceList = {
495
- uploadedAt: string;
496
- uploadedBy: string;
497
- priceList: AttachmentValue;
498
- id: string;
499
- };
500
-
501
- export type UpdateVehiclesPricesRequest = {
502
- priceList: AttachmentValue;
503
- };
504
-
505
- export type VehiclePriceListLine = {
506
- reference: string;
507
- internet?: string;
508
- premium?: string;
509
- minimum?: string;
510
- };
511
-
512
- export type VehiclePriceUpdateError = {
513
- data: VehiclePriceListLine;
514
- line: number;
515
- error: {
516
- fieldId: keyof VehiclePriceListLine;
517
- msg: string;
518
- };
519
- };
520
-
521
- export type VehiclePriceUpdateResponse =
522
- | {
523
- success: true;
524
- }
525
- | {
526
- success: false;
527
- errors: VehiclePriceUpdateError[];
528
- };
529
-
530
- export type VehiclePurchase = {
531
- organizationId: string;
532
- contactId: string;
533
- supplierStockNumber?: string;
534
- purchasedBy: string;
535
-
536
- log: {
537
- evaluationStartedAt?: string;
538
- evaluationStartedBy?: string;
539
-
540
- purchaseAgreedAt?: string;
541
- purchaseAgreedBy?: string;
542
-
543
- firstPaymentAllowedAt?: string;
544
- firstPaymentAllowedBy?: string;
545
- firstPaymentSentAt?: string;
546
- firstPaymentSentBy?: string;
547
-
548
- fullPaymentAllowedAt?: string;
549
- fullPaymentAllowedBy?: string;
550
- fullPaymentSentAt?: string;
551
- fullPaymentSentBy?: string;
552
-
553
- arrivedAt?: string;
554
- arrivedBy?: string;
555
- checkedInAt?: string;
556
- checkedInBy?: string;
557
- };
558
-
559
- deal: {
560
- status: VehiclePurchaseDealStatus;
561
-
562
- askingPrice?: string;
563
- purchaseVatRate?: string;
564
- purchase?: string; // exclusive VAT
565
-
566
- commission?: string;
567
- externalTransport?: string;
568
- internalTransport?: string;
569
- externalGarage?: string;
570
- internalGarage?: string;
571
- other?: string;
572
- };
573
-
574
- logistics: {
575
- parkingName?: string;
576
- status: VehiclePurchaseLogisticsStatus;
577
- deliveryType?: VehiclePurchaseDeliveryType;
578
- pickupAddress?: LocationValue;
579
- availableWeek?: string; // ISOWEEK, e.g. 2016-W02
580
- };
581
- };
582
-
583
- export enum VehicleActions {
584
- EditAdminDocs = 'edit_admin_docs',
585
- EditEngineeringDocs = 'edit_engineering_docs',
586
- EditMarketing = 'edit_marketing',
587
- EditMedia = 'edit_media',
588
- EditPictures = 'edit_pictures',
589
- EditPrices = 'edit_prices',
590
- EditPurchaseDeal = 'edit_purchase_deal',
591
- EditPurchaseLogistics = 'edit_purchase_logistics',
592
- EditSpecs = 'edit_specs',
593
- EditVideos = 'edit_videos',
594
- ViewLeads = 'view_leads',
595
- ViewSimilarOnline = 'view_similar_online',
596
- }