@bisondesk/website-commons-sdk 1.0.35 → 1.0.37

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.
@@ -4,6 +4,7 @@ export enum FieldTypes {
4
4
  chip = 'chip',
5
5
  boolean = 'boolean',
6
6
  country = 'country',
7
+ color = 'color',
7
8
  }
8
9
 
9
10
  //
@@ -64,6 +65,7 @@ type BaseNumberMeta = {
64
65
  | {
65
66
  style: 'unit';
66
67
  unit: NumberUnit;
68
+ unitDisplay?: 'long' | 'short' | 'narrow';
67
69
  }
68
70
  | {
69
71
  style?: 'currency' | 'decimal' | 'percent';
@@ -102,6 +102,7 @@ export type TermAggregation<T = string> = {
102
102
  type: AggregationType.term;
103
103
  fieldType: FieldTypes;
104
104
  orderBy?: 'count' | 'field';
105
+ format?: NumberMeta;
105
106
  };
106
107
 
107
108
  export type Range =
@@ -18,7 +18,7 @@ const BaseUserSearch = z
18
18
  type BaseUserSearch = z.infer<typeof BaseUserSearch>;
19
19
 
20
20
  export const UserSearch = BaseUserSearch.extend({
21
- id: z.string().uuid(),
21
+ id: z.uuidv7(),
22
22
  createdBy: z.string(),
23
23
  createdAt: z.string(),
24
24
  });
package/src/types/user.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { z } from 'zod';
2
1
  import { MarketingChannel } from './index.js';
3
2
 
4
3
  export type AuthRequest = {
@@ -11,29 +10,20 @@ export enum FleetSize {
11
10
  Large = '6+',
12
11
  }
13
12
 
14
- export const UserDetails = z.object({
15
- firstName: z.string().optional(),
16
- lastName: z.string().optional(),
17
- phone: z.string().optional(),
18
- preferredLanguage: z.string().optional(),
19
- fleetSize: z.nativeEnum(FleetSize).optional(),
20
- trader: z.boolean().optional(),
21
- email: z.string().email().optional(),
22
- company: z.object({
23
- country: z.string().optional(),
24
- city: z.string().optional(),
25
- name: z.string().optional(),
26
- vat: z.string().optional(),
27
- postalCode: z.string().optional(),
28
- }),
29
- marketingChannels: z.array(z.nativeEnum(MarketingChannel)),
30
- });
31
-
32
- export type UserDetails = z.infer<typeof UserDetails>;
33
-
34
- export const UserDetailsRequest = z.object({
35
- subsribeToNewsletter: z.boolean().optional(),
36
- data: UserDetails,
37
- });
38
-
39
- export type UserDetailsRequest = z.infer<typeof UserDetailsRequest>;
13
+ export type UserDetails = {
14
+ firstName?: string;
15
+ lastName?: string;
16
+ phone?: string;
17
+ preferredLanguage?: string;
18
+ fleetSize?: FleetSize;
19
+ trader?: boolean;
20
+ email?: string;
21
+ company: {
22
+ country?: string;
23
+ city?: string | undefined;
24
+ name?: string | undefined;
25
+ vat?: string | undefined;
26
+ postalCode?: string | undefined;
27
+ };
28
+ marketingChannels: MarketingChannel[];
29
+ };
@@ -40,10 +40,20 @@ export type VehicleExternalInfo = {
40
40
  width?: number;
41
41
  };
42
42
  doorCount?: number;
43
+ fifthWheelHeight?: number;
44
+ internalDimensions?: {
45
+ height?: number;
46
+ length?: number;
47
+ width?: number;
48
+ };
43
49
  interior?: {
44
50
  bedCount?: number;
45
51
  seatCount?: number;
46
52
  };
53
+ kingpin?: {
54
+ size?: number;
55
+ capacity?: number;
56
+ };
47
57
  };
48
58
  mainPicture?: AttachmentValue;
49
59
  pictures?: AttachmentValue[];
@@ -58,6 +68,9 @@ export type VehicleExternalInfo = {
58
68
  general: {
59
69
  bodystyle?: string;
60
70
  category: string;
71
+ color?: {
72
+ mainColorHex?: string;
73
+ };
61
74
  make?: string;
62
75
  model?: string;
63
76
  modelName?: string;
@@ -116,6 +129,12 @@ export type VehicleExternalInfo = {
116
129
  };
117
130
  };
118
131
  superstructure?: VehicleSuperstructure;
132
+ trailers?: {
133
+ cooler?: {
134
+ hasCooler?: boolean;
135
+ make?: string;
136
+ };
137
+ };
119
138
  weights?: {
120
139
  gvw?: number;
121
140
  massEmpty?: number;
@@ -181,6 +200,7 @@ export type VehicleAxlesInfo = {
181
200
  details?: VehicleAxle[];
182
201
  configuration?: string;
183
202
  count?: number;
203
+ loadCapacity?: number;
184
204
  poweredAxlesCount?: number;
185
205
  wheelbase?: number;
186
206
  suspension?: 'Air' | 'Air/Steel' | 'Steel';
@@ -198,6 +218,7 @@ export type VehicleAxle = {
198
218
  powered?: boolean;
199
219
  reduction?: string;
200
220
  steering?: boolean;
221
+ steeringType?: 'fixed' | 'self_steering' | 'hydraulic';
201
222
  suspension?: 'Steel' | 'Air' | 'Hydraulic';
202
223
  twinWheels?: boolean;
203
224
  tyreSize?: string;