@venulog/phasing-engine-schemas 0.1.0 → 0.2.0-alpha.1
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/README.md +3 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/phaseBooking.d.ts +100 -20
- package/dist/phaseBooking.js +75 -73
- package/package.json +1 -5
- package/dist/company.d.ts +0 -45
- package/dist/company.js +0 -120
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @phasing-engine
|
|
1
|
+
# @venulog/phasing-engine-schemas
|
|
2
2
|
|
|
3
3
|
Shared schemas and types for Phasing Engine API. Provides Zod validation schemas, TypeScript types, and OpenAPI documentation support.
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ Shared schemas and types for Phasing Engine API. Provides Zod validation schemas
|
|
|
7
7
|
This package is designed to be used as a local workspace package:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @phasing-engine
|
|
10
|
+
npm install @venulog/phasing-engine-schemas
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
PhaseBooking,
|
|
19
19
|
BookingStatus,
|
|
20
20
|
SlotStatus
|
|
21
|
-
} from '@phasing-engine
|
|
21
|
+
} from '@venulog/phasing-engine-schemas';
|
|
22
22
|
|
|
23
23
|
// Use schemas for validation
|
|
24
24
|
const booking = phaseBookingSchema.parse(data);
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './pagination.js';
|
|
|
3
3
|
export * from './auth.js';
|
|
4
4
|
export * from './phaseBooking.js';
|
|
5
5
|
export * from './phaseSlot.js';
|
|
6
|
-
export * from './company.js';
|
|
7
6
|
export * from './enums/bookingStatus.js';
|
|
8
7
|
export * from './enums/slotStatus.js';
|
|
9
8
|
export { z } from './zod.js';
|
package/dist/index.js
CHANGED
package/dist/phaseBooking.d.ts
CHANGED
|
@@ -30,6 +30,26 @@ export declare const vehicleTypeSchema: z.ZodObject<{
|
|
|
30
30
|
id: z.ZodNumber;
|
|
31
31
|
name: z.ZodString;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
|
+
export declare const phaseSlotAssemblySchema: z.ZodObject<{
|
|
34
|
+
id: z.ZodNumber;
|
|
35
|
+
date: z.ZodString;
|
|
36
|
+
start_time: z.ZodString;
|
|
37
|
+
end_time: z.ZodString;
|
|
38
|
+
duration: z.ZodNumber;
|
|
39
|
+
phase_slot_id: z.ZodNumber;
|
|
40
|
+
created_at: z.ZodString;
|
|
41
|
+
updated_at: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const phaseSlotDismantlingSchema: z.ZodObject<{
|
|
44
|
+
id: z.ZodNumber;
|
|
45
|
+
date: z.ZodString;
|
|
46
|
+
start_time: z.ZodString;
|
|
47
|
+
end_time: z.ZodString;
|
|
48
|
+
duration: z.ZodNumber;
|
|
49
|
+
phase_slot_id: z.ZodNumber;
|
|
50
|
+
created_at: z.ZodString;
|
|
51
|
+
updated_at: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
33
53
|
export declare const phaseSlotSchema: z.ZodObject<{
|
|
34
54
|
id: z.ZodNumber;
|
|
35
55
|
event_id: z.ZodNumber;
|
|
@@ -46,6 +66,26 @@ export declare const phaseSlotSchema: z.ZodObject<{
|
|
|
46
66
|
id: z.ZodNumber;
|
|
47
67
|
name: z.ZodString;
|
|
48
68
|
}, z.core.$strip>>>;
|
|
69
|
+
assembly: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
70
|
+
id: z.ZodNumber;
|
|
71
|
+
date: z.ZodString;
|
|
72
|
+
start_time: z.ZodString;
|
|
73
|
+
end_time: z.ZodString;
|
|
74
|
+
duration: z.ZodNumber;
|
|
75
|
+
phase_slot_id: z.ZodNumber;
|
|
76
|
+
created_at: z.ZodString;
|
|
77
|
+
updated_at: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>>;
|
|
79
|
+
dismantling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
80
|
+
id: z.ZodNumber;
|
|
81
|
+
date: z.ZodString;
|
|
82
|
+
start_time: z.ZodString;
|
|
83
|
+
end_time: z.ZodString;
|
|
84
|
+
duration: z.ZodNumber;
|
|
85
|
+
phase_slot_id: z.ZodNumber;
|
|
86
|
+
created_at: z.ZodString;
|
|
87
|
+
updated_at: z.ZodString;
|
|
88
|
+
}, z.core.$strip>>>;
|
|
49
89
|
}, z.core.$strip>;
|
|
50
90
|
export declare const companySchema: z.ZodObject<{
|
|
51
91
|
id: z.ZodNumber;
|
|
@@ -125,6 +165,26 @@ export declare const phaseBookingSchema: z.ZodObject<{
|
|
|
125
165
|
id: z.ZodNumber;
|
|
126
166
|
name: z.ZodString;
|
|
127
167
|
}, z.core.$strip>>>;
|
|
168
|
+
assembly: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
169
|
+
id: z.ZodNumber;
|
|
170
|
+
date: z.ZodString;
|
|
171
|
+
start_time: z.ZodString;
|
|
172
|
+
end_time: z.ZodString;
|
|
173
|
+
duration: z.ZodNumber;
|
|
174
|
+
phase_slot_id: z.ZodNumber;
|
|
175
|
+
created_at: z.ZodString;
|
|
176
|
+
updated_at: z.ZodString;
|
|
177
|
+
}, z.core.$strip>>>;
|
|
178
|
+
dismantling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
179
|
+
id: z.ZodNumber;
|
|
180
|
+
date: z.ZodString;
|
|
181
|
+
start_time: z.ZodString;
|
|
182
|
+
end_time: z.ZodString;
|
|
183
|
+
duration: z.ZodNumber;
|
|
184
|
+
phase_slot_id: z.ZodNumber;
|
|
185
|
+
created_at: z.ZodString;
|
|
186
|
+
updated_at: z.ZodString;
|
|
187
|
+
}, z.core.$strip>>>;
|
|
128
188
|
}, z.core.$strip>;
|
|
129
189
|
}, z.core.$strip>;
|
|
130
190
|
export declare const createBookingBodySchema: z.ZodObject<{
|
|
@@ -209,6 +269,26 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
|
|
|
209
269
|
id: z.ZodNumber;
|
|
210
270
|
name: z.ZodString;
|
|
211
271
|
}, z.core.$strip>>>;
|
|
272
|
+
assembly: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
273
|
+
id: z.ZodNumber;
|
|
274
|
+
date: z.ZodString;
|
|
275
|
+
start_time: z.ZodString;
|
|
276
|
+
end_time: z.ZodString;
|
|
277
|
+
duration: z.ZodNumber;
|
|
278
|
+
phase_slot_id: z.ZodNumber;
|
|
279
|
+
created_at: z.ZodString;
|
|
280
|
+
updated_at: z.ZodString;
|
|
281
|
+
}, z.core.$strip>>>;
|
|
282
|
+
dismantling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
283
|
+
id: z.ZodNumber;
|
|
284
|
+
date: z.ZodString;
|
|
285
|
+
start_time: z.ZodString;
|
|
286
|
+
end_time: z.ZodString;
|
|
287
|
+
duration: z.ZodNumber;
|
|
288
|
+
phase_slot_id: z.ZodNumber;
|
|
289
|
+
created_at: z.ZodString;
|
|
290
|
+
updated_at: z.ZodString;
|
|
291
|
+
}, z.core.$strip>>>;
|
|
212
292
|
}, z.core.$strip>;
|
|
213
293
|
}, z.core.$strip>>;
|
|
214
294
|
total_count: z.ZodNumber;
|
|
@@ -271,6 +351,26 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
|
|
|
271
351
|
id: z.ZodNumber;
|
|
272
352
|
name: z.ZodString;
|
|
273
353
|
}, z.core.$strip>>>;
|
|
354
|
+
assembly: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
355
|
+
id: z.ZodNumber;
|
|
356
|
+
date: z.ZodString;
|
|
357
|
+
start_time: z.ZodString;
|
|
358
|
+
end_time: z.ZodString;
|
|
359
|
+
duration: z.ZodNumber;
|
|
360
|
+
phase_slot_id: z.ZodNumber;
|
|
361
|
+
created_at: z.ZodString;
|
|
362
|
+
updated_at: z.ZodString;
|
|
363
|
+
}, z.core.$strip>>>;
|
|
364
|
+
dismantling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
365
|
+
id: z.ZodNumber;
|
|
366
|
+
date: z.ZodString;
|
|
367
|
+
start_time: z.ZodString;
|
|
368
|
+
end_time: z.ZodString;
|
|
369
|
+
duration: z.ZodNumber;
|
|
370
|
+
phase_slot_id: z.ZodNumber;
|
|
371
|
+
created_at: z.ZodString;
|
|
372
|
+
updated_at: z.ZodString;
|
|
373
|
+
}, z.core.$strip>>>;
|
|
274
374
|
}, z.core.$strip>;
|
|
275
375
|
}, z.core.$strip>>;
|
|
276
376
|
total_count: z.ZodNumber;
|
|
@@ -459,26 +559,6 @@ export declare const updatePhaseSlotResponseSchema: z.ZodObject<{
|
|
|
459
559
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
460
560
|
}, z.core.$strip>;
|
|
461
561
|
}, z.core.$strip>;
|
|
462
|
-
export declare const phaseSlotAssemblySchema: z.ZodObject<{
|
|
463
|
-
id: z.ZodNumber;
|
|
464
|
-
date: z.ZodString;
|
|
465
|
-
start_time: z.ZodString;
|
|
466
|
-
end_time: z.ZodString;
|
|
467
|
-
duration: z.ZodNumber;
|
|
468
|
-
phase_slot_id: z.ZodNumber;
|
|
469
|
-
created_at: z.ZodString;
|
|
470
|
-
updated_at: z.ZodString;
|
|
471
|
-
}, z.core.$strip>;
|
|
472
|
-
export declare const phaseSlotDismantlingSchema: z.ZodObject<{
|
|
473
|
-
id: z.ZodNumber;
|
|
474
|
-
date: z.ZodString;
|
|
475
|
-
start_time: z.ZodString;
|
|
476
|
-
end_time: z.ZodString;
|
|
477
|
-
duration: z.ZodNumber;
|
|
478
|
-
phase_slot_id: z.ZodNumber;
|
|
479
|
-
created_at: z.ZodString;
|
|
480
|
-
updated_at: z.ZodString;
|
|
481
|
-
}, z.core.$strip>;
|
|
482
562
|
export declare const upsertPhaseSlotAssemblySchema: z.ZodObject<{
|
|
483
563
|
date: z.ZodString;
|
|
484
564
|
start_time: z.ZodOptional<z.ZodString>;
|
package/dist/phaseBooking.js
CHANGED
|
@@ -80,6 +80,78 @@ export const vehicleTypeSchema = z.object({
|
|
|
80
80
|
id: z.number(),
|
|
81
81
|
name: z.string()
|
|
82
82
|
});
|
|
83
|
+
export const phaseSlotAssemblySchema = z
|
|
84
|
+
.object({
|
|
85
|
+
id: z.number().int().positive().openapi({
|
|
86
|
+
description: 'Unique identifier for the assembly',
|
|
87
|
+
example: 1
|
|
88
|
+
}),
|
|
89
|
+
date: z.string().openapi({
|
|
90
|
+
description: 'Date of the assembly (YYYY-MM-DD format)',
|
|
91
|
+
example: '2025-12-15'
|
|
92
|
+
}),
|
|
93
|
+
start_time: z.string().openapi({
|
|
94
|
+
description: 'Start time of the assembly (HH:MM format)',
|
|
95
|
+
example: '06:00'
|
|
96
|
+
}),
|
|
97
|
+
end_time: z.string().openapi({
|
|
98
|
+
description: 'End time of the assembly (HH:MM format)',
|
|
99
|
+
example: '09:00'
|
|
100
|
+
}),
|
|
101
|
+
duration: z.number().openapi({
|
|
102
|
+
description: 'Duration of the assembly in minutes',
|
|
103
|
+
example: 180
|
|
104
|
+
}),
|
|
105
|
+
phase_slot_id: z.number().int().positive().openapi({
|
|
106
|
+
description: 'ID of the associated phase slot',
|
|
107
|
+
example: 101
|
|
108
|
+
}),
|
|
109
|
+
created_at: z.string().openapi({
|
|
110
|
+
description: 'Timestamp when assembly was created',
|
|
111
|
+
example: '2025-12-09T10:00:00.000Z'
|
|
112
|
+
}),
|
|
113
|
+
updated_at: z.string().openapi({
|
|
114
|
+
description: 'Timestamp when assembly was updated',
|
|
115
|
+
example: '2025-12-09T10:30:00.000Z'
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
.openapi('PhaseSlotAssembly');
|
|
119
|
+
export const phaseSlotDismantlingSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
id: z.number().int().positive().openapi({
|
|
122
|
+
description: 'Unique identifier for the dismantling',
|
|
123
|
+
example: 1
|
|
124
|
+
}),
|
|
125
|
+
date: z.string().openapi({
|
|
126
|
+
description: 'Date of the dismantling (YYYY-MM-DD format)',
|
|
127
|
+
example: '2025-12-15'
|
|
128
|
+
}),
|
|
129
|
+
start_time: z.string().openapi({
|
|
130
|
+
description: 'Start time of the dismantling (HH:MM format)',
|
|
131
|
+
example: '06:00'
|
|
132
|
+
}),
|
|
133
|
+
end_time: z.string().openapi({
|
|
134
|
+
description: 'End time of the dismantling (HH:MM format)',
|
|
135
|
+
example: '09:00'
|
|
136
|
+
}),
|
|
137
|
+
duration: z.number().openapi({
|
|
138
|
+
description: 'Duration of the dismantling in minutes',
|
|
139
|
+
example: 180
|
|
140
|
+
}),
|
|
141
|
+
phase_slot_id: z.number().int().positive().openapi({
|
|
142
|
+
description: 'ID of the associated phase slot',
|
|
143
|
+
example: 101
|
|
144
|
+
}),
|
|
145
|
+
created_at: z.string().openapi({
|
|
146
|
+
description: 'Timestamp when dismantling was created',
|
|
147
|
+
example: '2025-12-09T10:00:00.000Z'
|
|
148
|
+
}),
|
|
149
|
+
updated_at: z.string().openapi({
|
|
150
|
+
description: 'Timestamp when dismantling was updated',
|
|
151
|
+
example: '2025-12-09T10:30:00.000Z'
|
|
152
|
+
})
|
|
153
|
+
})
|
|
154
|
+
.openapi('PhaseSlotDismantling');
|
|
83
155
|
export const phaseSlotSchema = z.object({
|
|
84
156
|
id: z.number(),
|
|
85
157
|
event_id: z.number(),
|
|
@@ -92,7 +164,9 @@ export const phaseSlotSchema = z.object({
|
|
|
92
164
|
updated_at: z.string(),
|
|
93
165
|
created_by: z.string().nullable(),
|
|
94
166
|
updated_by: z.string().nullable(),
|
|
95
|
-
vehicle_type: vehicleTypeSchema.nullable().optional()
|
|
167
|
+
vehicle_type: vehicleTypeSchema.nullable().optional(),
|
|
168
|
+
assembly: phaseSlotAssemblySchema.nullable().optional(),
|
|
169
|
+
dismantling: phaseSlotDismantlingSchema.nullable().optional()
|
|
96
170
|
});
|
|
97
171
|
export const companySchema = z.object({
|
|
98
172
|
id: z.number(),
|
|
@@ -547,78 +621,6 @@ export const updatePhaseSlotResponseSchema = createMessageDataResponseSchema(upd
|
|
|
547
621
|
// ------------------------------
|
|
548
622
|
// Phase Slot Assemblies & Dismantlings Schemas
|
|
549
623
|
// ------------------------------
|
|
550
|
-
export const phaseSlotAssemblySchema = z
|
|
551
|
-
.object({
|
|
552
|
-
id: z.number().int().positive().openapi({
|
|
553
|
-
description: 'Unique identifier for the assembly',
|
|
554
|
-
example: 1
|
|
555
|
-
}),
|
|
556
|
-
date: z.string().openapi({
|
|
557
|
-
description: 'Date of the assembly (YYYY-MM-DD format)',
|
|
558
|
-
example: '2025-12-15'
|
|
559
|
-
}),
|
|
560
|
-
start_time: z.string().openapi({
|
|
561
|
-
description: 'Start time of the assembly (HH:MM format)',
|
|
562
|
-
example: '06:00'
|
|
563
|
-
}),
|
|
564
|
-
end_time: z.string().openapi({
|
|
565
|
-
description: 'End time of the assembly (HH:MM format)',
|
|
566
|
-
example: '09:00'
|
|
567
|
-
}),
|
|
568
|
-
duration: z.number().openapi({
|
|
569
|
-
description: 'Duration of the assembly in minutes',
|
|
570
|
-
example: 180
|
|
571
|
-
}),
|
|
572
|
-
phase_slot_id: z.number().int().positive().openapi({
|
|
573
|
-
description: 'ID of the associated phase slot',
|
|
574
|
-
example: 101
|
|
575
|
-
}),
|
|
576
|
-
created_at: z.string().openapi({
|
|
577
|
-
description: 'Timestamp when assembly was created',
|
|
578
|
-
example: '2025-12-09T10:00:00.000Z'
|
|
579
|
-
}),
|
|
580
|
-
updated_at: z.string().openapi({
|
|
581
|
-
description: 'Timestamp when assembly was updated',
|
|
582
|
-
example: '2025-12-09T10:30:00.000Z'
|
|
583
|
-
})
|
|
584
|
-
})
|
|
585
|
-
.openapi('PhaseSlotAssembly');
|
|
586
|
-
export const phaseSlotDismantlingSchema = z
|
|
587
|
-
.object({
|
|
588
|
-
id: z.number().int().positive().openapi({
|
|
589
|
-
description: 'Unique identifier for the dismantling',
|
|
590
|
-
example: 1
|
|
591
|
-
}),
|
|
592
|
-
date: z.string().openapi({
|
|
593
|
-
description: 'Date of the dismantling (YYYY-MM-DD format)',
|
|
594
|
-
example: '2025-12-15'
|
|
595
|
-
}),
|
|
596
|
-
start_time: z.string().openapi({
|
|
597
|
-
description: 'Start time of the dismantling (HH:MM format)',
|
|
598
|
-
example: '06:00'
|
|
599
|
-
}),
|
|
600
|
-
end_time: z.string().openapi({
|
|
601
|
-
description: 'End time of the dismantling (HH:MM format)',
|
|
602
|
-
example: '09:00'
|
|
603
|
-
}),
|
|
604
|
-
duration: z.number().openapi({
|
|
605
|
-
description: 'Duration of the dismantling in minutes',
|
|
606
|
-
example: 180
|
|
607
|
-
}),
|
|
608
|
-
phase_slot_id: z.number().int().positive().openapi({
|
|
609
|
-
description: 'ID of the associated phase slot',
|
|
610
|
-
example: 101
|
|
611
|
-
}),
|
|
612
|
-
created_at: z.string().openapi({
|
|
613
|
-
description: 'Timestamp when dismantling was created',
|
|
614
|
-
example: '2025-12-09T10:00:00.000Z'
|
|
615
|
-
}),
|
|
616
|
-
updated_at: z.string().openapi({
|
|
617
|
-
description: 'Timestamp when dismantling was updated',
|
|
618
|
-
example: '2025-12-09T10:30:00.000Z'
|
|
619
|
-
})
|
|
620
|
-
})
|
|
621
|
-
.openapi('PhaseSlotDismantling');
|
|
622
624
|
export const upsertPhaseSlotAssemblySchema = z
|
|
623
625
|
.object({
|
|
624
626
|
date: z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venulog/phasing-engine-schemas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-alpha.1",
|
|
4
4
|
"description": "Shared schemas and types for Phasing Engine API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,10 +29,6 @@
|
|
|
29
29
|
"./phaseSlot": {
|
|
30
30
|
"types": "./dist/phaseSlot.d.ts",
|
|
31
31
|
"import": "./dist/phaseSlot.js"
|
|
32
|
-
},
|
|
33
|
-
"./company": {
|
|
34
|
-
"types": "./dist/company.d.ts",
|
|
35
|
-
"import": "./dist/company.js"
|
|
36
32
|
}
|
|
37
33
|
},
|
|
38
34
|
"files": [
|
package/dist/company.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from './zod.js';
|
|
2
|
-
export declare const fullCompanySchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodNumber;
|
|
4
|
-
company_name: z.ZodString;
|
|
5
|
-
vat_number: z.ZodNullable<z.ZodString>;
|
|
6
|
-
siret_code: z.ZodNullable<z.ZodString>;
|
|
7
|
-
tva_intracom: z.ZodNullable<z.ZodString>;
|
|
8
|
-
type: z.ZodString;
|
|
9
|
-
company_role: z.ZodNullable<z.ZodString>;
|
|
10
|
-
company_street: z.ZodNullable<z.ZodString>;
|
|
11
|
-
company_city: z.ZodNullable<z.ZodString>;
|
|
12
|
-
company_postal_code: z.ZodNullable<z.ZodString>;
|
|
13
|
-
company_country: z.ZodNullable<z.ZodString>;
|
|
14
|
-
company_address: z.ZodNullable<z.ZodString>;
|
|
15
|
-
contact_first_name: z.ZodNullable<z.ZodString>;
|
|
16
|
-
contact_last_name: z.ZodNullable<z.ZodString>;
|
|
17
|
-
contact_email: z.ZodNullable<z.ZodString>;
|
|
18
|
-
contact_phone: z.ZodNullable<z.ZodString>;
|
|
19
|
-
is_active: z.ZodBoolean;
|
|
20
|
-
created_at: z.ZodString;
|
|
21
|
-
updated_at: z.ZodString;
|
|
22
|
-
created_by: z.ZodNullable<z.ZodString>;
|
|
23
|
-
updated_by: z.ZodNullable<z.ZodString>;
|
|
24
|
-
company_id: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
export declare const companyRoleSchema: z.ZodObject<{
|
|
27
|
-
role: z.ZodString;
|
|
28
|
-
}, z.core.$strip>;
|
|
29
|
-
export declare const companyRolesDataSchema: z.ZodObject<{
|
|
30
|
-
roles: z.ZodArray<z.ZodObject<{
|
|
31
|
-
role: z.ZodString;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
}, z.core.$strip>;
|
|
34
|
-
export declare const getCompanyRolesResponseSchema: z.ZodObject<{
|
|
35
|
-
success: z.ZodBoolean;
|
|
36
|
-
data: z.ZodObject<{
|
|
37
|
-
roles: z.ZodArray<z.ZodObject<{
|
|
38
|
-
role: z.ZodString;
|
|
39
|
-
}, z.core.$strip>>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
export type FullCompany = z.infer<typeof fullCompanySchema>;
|
|
43
|
-
export type CompanyRole = z.infer<typeof companyRoleSchema>;
|
|
44
|
-
export type CompanyRolesData = z.infer<typeof companyRolesDataSchema>;
|
|
45
|
-
export type GetCompanyRolesResponse = z.infer<typeof getCompanyRolesResponseSchema>;
|
package/dist/company.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { z } from './zod.js';
|
|
2
|
-
import { createSuccessResponseSchema } from './common.js';
|
|
3
|
-
// ------------------------------
|
|
4
|
-
// Company schemas
|
|
5
|
-
// ------------------------------
|
|
6
|
-
export const fullCompanySchema = z
|
|
7
|
-
.object({
|
|
8
|
-
id: z.number().openapi({
|
|
9
|
-
description: 'Company unique identifier',
|
|
10
|
-
example: 1
|
|
11
|
-
}),
|
|
12
|
-
company_name: z.string().openapi({
|
|
13
|
-
description: 'Company name',
|
|
14
|
-
example: 'Acme Corporation'
|
|
15
|
-
}),
|
|
16
|
-
vat_number: z.string().nullable().openapi({
|
|
17
|
-
description: 'VAT number',
|
|
18
|
-
example: 'FR12345678901'
|
|
19
|
-
}),
|
|
20
|
-
siret_code: z.string().nullable().openapi({
|
|
21
|
-
description: 'SIRET code',
|
|
22
|
-
example: '12345678901234'
|
|
23
|
-
}),
|
|
24
|
-
tva_intracom: z.string().nullable().openapi({
|
|
25
|
-
description: 'Intra-community VAT number',
|
|
26
|
-
example: 'FR12345678901'
|
|
27
|
-
}),
|
|
28
|
-
type: z.string().openapi({
|
|
29
|
-
description: 'Company type',
|
|
30
|
-
example: 'corporate'
|
|
31
|
-
}),
|
|
32
|
-
company_role: z.string().nullable().openapi({
|
|
33
|
-
description: 'Company role in the system',
|
|
34
|
-
example: 'exhibitor'
|
|
35
|
-
}),
|
|
36
|
-
company_street: z.string().nullable().openapi({
|
|
37
|
-
description: 'Company street address',
|
|
38
|
-
example: '123 Business Street'
|
|
39
|
-
}),
|
|
40
|
-
company_city: z.string().nullable().openapi({
|
|
41
|
-
description: 'Company city',
|
|
42
|
-
example: 'Paris'
|
|
43
|
-
}),
|
|
44
|
-
company_postal_code: z.string().nullable().openapi({
|
|
45
|
-
description: 'Company postal code',
|
|
46
|
-
example: '75001'
|
|
47
|
-
}),
|
|
48
|
-
company_country: z.string().nullable().openapi({
|
|
49
|
-
description: 'Company country',
|
|
50
|
-
example: 'France'
|
|
51
|
-
}),
|
|
52
|
-
company_address: z.string().nullable().openapi({
|
|
53
|
-
description: 'Full company address',
|
|
54
|
-
example: '123 Business Street, 75001 Paris, France'
|
|
55
|
-
}),
|
|
56
|
-
contact_first_name: z.string().nullable().openapi({
|
|
57
|
-
description: 'Contact person first name',
|
|
58
|
-
example: 'John'
|
|
59
|
-
}),
|
|
60
|
-
contact_last_name: z.string().nullable().openapi({
|
|
61
|
-
description: 'Contact person last name',
|
|
62
|
-
example: 'Doe'
|
|
63
|
-
}),
|
|
64
|
-
contact_email: z.string().email().nullable().openapi({
|
|
65
|
-
description: 'Contact email address',
|
|
66
|
-
example: 'john.doe@acme.com'
|
|
67
|
-
}),
|
|
68
|
-
contact_phone: z.string().nullable().openapi({
|
|
69
|
-
description: 'Contact phone number',
|
|
70
|
-
example: '+33123456789'
|
|
71
|
-
}),
|
|
72
|
-
is_active: z.boolean().openapi({
|
|
73
|
-
description: 'Whether the company is active',
|
|
74
|
-
example: true
|
|
75
|
-
}),
|
|
76
|
-
created_at: z.string().openapi({
|
|
77
|
-
description: 'Timestamp when company was created',
|
|
78
|
-
example: '2025-12-04T10:30:00.000Z'
|
|
79
|
-
}),
|
|
80
|
-
updated_at: z.string().openapi({
|
|
81
|
-
description: 'Timestamp when company was last updated',
|
|
82
|
-
example: '2025-12-04T10:30:00.000Z'
|
|
83
|
-
}),
|
|
84
|
-
created_by: z.string().uuid().nullable().openapi({
|
|
85
|
-
description: 'User who created the company',
|
|
86
|
-
example: '123e4567-e89b-12d3-a456-426614174000'
|
|
87
|
-
}),
|
|
88
|
-
updated_by: z.string().uuid().nullable().openapi({
|
|
89
|
-
description: 'User who last updated the company',
|
|
90
|
-
example: '123e4567-e89b-12d3-a456-426614174000'
|
|
91
|
-
}),
|
|
92
|
-
company_id: z.number().nullable().openapi({
|
|
93
|
-
description: 'Parent company ID if this is a subsidiary',
|
|
94
|
-
example: null
|
|
95
|
-
})
|
|
96
|
-
})
|
|
97
|
-
.openapi('FullCompany');
|
|
98
|
-
// ------------------------------
|
|
99
|
-
// Company roles response schemas
|
|
100
|
-
// ------------------------------
|
|
101
|
-
export const companyRoleSchema = z
|
|
102
|
-
.object({
|
|
103
|
-
role: z.string().openapi({
|
|
104
|
-
description: 'Distinct company role',
|
|
105
|
-
example: 'exhibitor'
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
.openapi('CompanyRole');
|
|
109
|
-
export const companyRolesDataSchema = z
|
|
110
|
-
.object({
|
|
111
|
-
roles: z.array(companyRoleSchema).openapi({
|
|
112
|
-
description: 'List of distinct company roles',
|
|
113
|
-
example: [{ role: 'exhibitor' }, { role: 'sponsor' }, { role: 'visitor' }]
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
.openapi('CompanyRolesData');
|
|
117
|
-
// ------------------------------
|
|
118
|
-
// Response schemas
|
|
119
|
-
// ------------------------------
|
|
120
|
-
export const getCompanyRolesResponseSchema = createSuccessResponseSchema(companyRolesDataSchema, 'GetCompanyRolesResponse', 'List of distinct company roles with counts');
|