@venulog/phasing-engine-schemas 0.2.0-alpha.0 → 0.2.0-alpha.2
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/dist/enums/phaseSlotScheduleType.d.ts +4 -0
- package/dist/enums/phaseSlotScheduleType.js +5 -0
- package/dist/event.d.ts +18 -0
- package/dist/event.js +40 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/phaseBooking.d.ts +224 -358
- package/dist/phaseBooking.js +318 -452
- package/dist/phaseSlot.d.ts +60 -57
- package/dist/phaseSlot.js +187 -55
- package/package.json +5 -1
- package/dist/enums/slotStatus.d.ts +0 -5
- package/dist/enums/slotStatus.js +0 -6
package/dist/event.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Query parameters for getting event by code
|
|
4
|
+
*/
|
|
5
|
+
export declare const getEventByCodeQuerySchema: z.ZodObject<{
|
|
6
|
+
event_code: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type GetEventByCodeQuery = z.infer<typeof getEventByCodeQuerySchema>;
|
|
9
|
+
/**
|
|
10
|
+
* Response schema for event information
|
|
11
|
+
*/
|
|
12
|
+
export declare const eventInfoResponseSchema: z.ZodObject<{
|
|
13
|
+
event_id: z.ZodNumber;
|
|
14
|
+
event_code: z.ZodString;
|
|
15
|
+
event_name: z.ZodString;
|
|
16
|
+
venue_name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type EventInfoResponse = z.infer<typeof eventInfoResponseSchema>;
|
package/dist/event.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
|
3
|
+
extendZodWithOpenApi(z);
|
|
4
|
+
/**
|
|
5
|
+
* Query parameters for getting event by code
|
|
6
|
+
*/
|
|
7
|
+
export const getEventByCodeQuerySchema = z
|
|
8
|
+
.object({
|
|
9
|
+
event_code: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1, 'Event code is required')
|
|
12
|
+
.describe('The unique code identifying the event')
|
|
13
|
+
.openapi({ example: 'COEC2025' })
|
|
14
|
+
})
|
|
15
|
+
.openapi('GetEventByCodeQuery');
|
|
16
|
+
/**
|
|
17
|
+
* Response schema for event information
|
|
18
|
+
*/
|
|
19
|
+
export const eventInfoResponseSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
event_id: z
|
|
22
|
+
.number()
|
|
23
|
+
.int()
|
|
24
|
+
.positive()
|
|
25
|
+
.describe('The unique identifier of the event')
|
|
26
|
+
.openapi({ example: 1 }),
|
|
27
|
+
event_code: z
|
|
28
|
+
.string()
|
|
29
|
+
.describe('The unique code of the event')
|
|
30
|
+
.openapi({ example: 'COEC2025' }),
|
|
31
|
+
event_name: z
|
|
32
|
+
.string()
|
|
33
|
+
.describe('The name of the event')
|
|
34
|
+
.openapi({ example: 'Convention of Events and Conferences 2025' }),
|
|
35
|
+
venue_name: z
|
|
36
|
+
.string()
|
|
37
|
+
.describe('The name of the venue where the event takes place')
|
|
38
|
+
.openapi({ example: 'Paris Expo Porte de Versailles' })
|
|
39
|
+
})
|
|
40
|
+
.openapi('EventInfoResponse');
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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 './event.js';
|
|
6
7
|
export * from './enums/bookingStatus.js';
|
|
7
|
-
export * from './enums/
|
|
8
|
+
export * from './enums/phaseSlotScheduleType.js';
|
|
8
9
|
export { z } from './zod.js';
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,9 @@ export * from './pagination.js';
|
|
|
4
4
|
export * from './auth.js';
|
|
5
5
|
export * from './phaseBooking.js';
|
|
6
6
|
export * from './phaseSlot.js';
|
|
7
|
+
export * from './event.js';
|
|
7
8
|
// Enum exports
|
|
8
9
|
export * from './enums/bookingStatus.js';
|
|
9
|
-
export * from './enums/
|
|
10
|
+
export * from './enums/phaseSlotScheduleType.js';
|
|
10
11
|
// Zod re-export for convenience
|
|
11
12
|
export { z } from './zod.js';
|