balendar 0.0.7 → 0.0.9
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/lib/client.d.ts +214 -209
- package/dist/lib/models.d.ts +3 -2
- package/dist/lib/models.js +12 -12
- package/dist/src/modules/availability-rules/availability-rules.domain.d.ts +574 -0
- package/dist/src/modules/calendar-mappings/calendar-mappings.domain.d.ts +184 -0
- package/dist/src/modules/event-mappings/event-mappings.domain.d.ts +122 -0
- package/dist/src/modules/events/events.domain.d.ts +165 -0
- package/dist/src/orchestrators/availability/availability.domain.d.ts +143 -0
- package/dist/src/shared/schemas/audit.models.d.ts +6 -0
- package/dist/src/shared/schemas/date-time.models.d.ts +28 -0
- package/dist/src/shared/schemas/external-providers.models.d.ts +14 -0
- package/dist/src/shared/schemas/id.models.d.ts +9 -0
- package/dist/src/shared/schemas/pagination.models.d.ts +13 -0
- package/package.json +3 -2
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Calendar Mapping Status
|
|
4
|
+
*/
|
|
5
|
+
export declare const CalendarMappingStatuses: readonly ["active", "expired", "revoked", "error"];
|
|
6
|
+
export declare const CalendarMappingStatusSchema: z.ZodEnum<{
|
|
7
|
+
error: "error";
|
|
8
|
+
active: "active";
|
|
9
|
+
expired: "expired";
|
|
10
|
+
revoked: "revoked";
|
|
11
|
+
}>;
|
|
12
|
+
export type CalendarMappingStatus = z.infer<typeof CalendarMappingStatusSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* Create Calendar Mapping Input
|
|
15
|
+
*/
|
|
16
|
+
export declare const CreateCalendarMappingInputSchema: z.ZodObject<{
|
|
17
|
+
userId: z.ZodNumber;
|
|
18
|
+
externalProvider: z.ZodEnum<{
|
|
19
|
+
apple: "apple";
|
|
20
|
+
google: "google";
|
|
21
|
+
microsoft: "microsoft";
|
|
22
|
+
}>;
|
|
23
|
+
connectionId: z.ZodString;
|
|
24
|
+
accessToken: z.ZodString;
|
|
25
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
26
|
+
expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type CreateCalendarMappingInput = z.infer<typeof CreateCalendarMappingInputSchema>;
|
|
29
|
+
/**
|
|
30
|
+
* Calendar Mapping
|
|
31
|
+
*/
|
|
32
|
+
export declare const CalendarMappingSchema: z.ZodObject<{
|
|
33
|
+
userId: z.ZodNumber;
|
|
34
|
+
externalProvider: z.ZodEnum<{
|
|
35
|
+
apple: "apple";
|
|
36
|
+
google: "google";
|
|
37
|
+
microsoft: "microsoft";
|
|
38
|
+
}>;
|
|
39
|
+
connectionId: z.ZodString;
|
|
40
|
+
accessToken: z.ZodString;
|
|
41
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
42
|
+
expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
43
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
44
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
45
|
+
calendarMappingId: z.ZodNumber;
|
|
46
|
+
status: z.ZodEnum<{
|
|
47
|
+
error: "error";
|
|
48
|
+
active: "active";
|
|
49
|
+
expired: "expired";
|
|
50
|
+
revoked: "revoked";
|
|
51
|
+
}>;
|
|
52
|
+
syncToken: z.ZodNullable<z.ZodString>;
|
|
53
|
+
webhookId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
webhookResourceId: z.ZodNullable<z.ZodString>;
|
|
55
|
+
webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type CalendarMapping = z.infer<typeof CalendarMappingSchema>;
|
|
58
|
+
export declare const CalendarMappingsSchema: z.ZodArray<z.ZodObject<{
|
|
59
|
+
userId: z.ZodNumber;
|
|
60
|
+
externalProvider: z.ZodEnum<{
|
|
61
|
+
apple: "apple";
|
|
62
|
+
google: "google";
|
|
63
|
+
microsoft: "microsoft";
|
|
64
|
+
}>;
|
|
65
|
+
connectionId: z.ZodString;
|
|
66
|
+
accessToken: z.ZodString;
|
|
67
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
68
|
+
expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
69
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
70
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
71
|
+
calendarMappingId: z.ZodNumber;
|
|
72
|
+
status: z.ZodEnum<{
|
|
73
|
+
error: "error";
|
|
74
|
+
active: "active";
|
|
75
|
+
expired: "expired";
|
|
76
|
+
revoked: "revoked";
|
|
77
|
+
}>;
|
|
78
|
+
syncToken: z.ZodNullable<z.ZodString>;
|
|
79
|
+
webhookId: z.ZodNullable<z.ZodString>;
|
|
80
|
+
webhookResourceId: z.ZodNullable<z.ZodString>;
|
|
81
|
+
webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
export type CalendarMappings = z.infer<typeof CalendarMappingsSchema>;
|
|
84
|
+
/**
|
|
85
|
+
* Update Calendar Mapping Input
|
|
86
|
+
*/
|
|
87
|
+
export declare const UpdateCalendarMappingInputSchema: z.ZodObject<{
|
|
88
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
expiresAt: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
90
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
91
|
+
refreshToken: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
92
|
+
syncToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
webhookId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
webhookResourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
webhookExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export type UpdateCalendarMappingInput = z.infer<typeof UpdateCalendarMappingInputSchema>;
|
|
98
|
+
/**
|
|
99
|
+
* PaginatedCalendarMappings
|
|
100
|
+
*/
|
|
101
|
+
export declare const PaginatedCalendarMappingsSchema: z.ZodObject<{
|
|
102
|
+
items: z.ZodArray<z.ZodObject<{
|
|
103
|
+
userId: z.ZodNumber;
|
|
104
|
+
externalProvider: z.ZodEnum<{
|
|
105
|
+
apple: "apple";
|
|
106
|
+
google: "google";
|
|
107
|
+
microsoft: "microsoft";
|
|
108
|
+
}>;
|
|
109
|
+
connectionId: z.ZodString;
|
|
110
|
+
accessToken: z.ZodString;
|
|
111
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
112
|
+
expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
113
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
114
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
115
|
+
calendarMappingId: z.ZodNumber;
|
|
116
|
+
status: z.ZodEnum<{
|
|
117
|
+
error: "error";
|
|
118
|
+
active: "active";
|
|
119
|
+
expired: "expired";
|
|
120
|
+
revoked: "revoked";
|
|
121
|
+
}>;
|
|
122
|
+
syncToken: z.ZodNullable<z.ZodString>;
|
|
123
|
+
webhookId: z.ZodNullable<z.ZodString>;
|
|
124
|
+
webhookResourceId: z.ZodNullable<z.ZodString>;
|
|
125
|
+
webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
pagination: z.ZodObject<{
|
|
128
|
+
total: z.ZodCoercedNumber<unknown>;
|
|
129
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
130
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
131
|
+
hasMore: z.ZodBoolean;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
export type PaginatedCalendarMappings = z.infer<typeof PaginatedCalendarMappingsSchema>;
|
|
135
|
+
/**
|
|
136
|
+
* SearchCalendarMappingsInput
|
|
137
|
+
*/
|
|
138
|
+
export declare const SearchCalendarMappingsInputSchema: z.ZodObject<{
|
|
139
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
webhookResourceId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
pagination: z.ZodDefault<z.ZodObject<{
|
|
143
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
144
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type SearchCalendarMappingsInput = z.infer<typeof SearchCalendarMappingsInputSchema>;
|
|
148
|
+
/**
|
|
149
|
+
* SearchCalendarMappingsOutput
|
|
150
|
+
*/
|
|
151
|
+
export declare const SearchCalendarMappingsOutputSchema: z.ZodObject<{
|
|
152
|
+
items: z.ZodArray<z.ZodObject<{
|
|
153
|
+
userId: z.ZodNumber;
|
|
154
|
+
externalProvider: z.ZodEnum<{
|
|
155
|
+
apple: "apple";
|
|
156
|
+
google: "google";
|
|
157
|
+
microsoft: "microsoft";
|
|
158
|
+
}>;
|
|
159
|
+
connectionId: z.ZodString;
|
|
160
|
+
accessToken: z.ZodString;
|
|
161
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
162
|
+
expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
163
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
164
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
165
|
+
calendarMappingId: z.ZodNumber;
|
|
166
|
+
status: z.ZodEnum<{
|
|
167
|
+
error: "error";
|
|
168
|
+
active: "active";
|
|
169
|
+
expired: "expired";
|
|
170
|
+
revoked: "revoked";
|
|
171
|
+
}>;
|
|
172
|
+
syncToken: z.ZodNullable<z.ZodString>;
|
|
173
|
+
webhookId: z.ZodNullable<z.ZodString>;
|
|
174
|
+
webhookResourceId: z.ZodNullable<z.ZodString>;
|
|
175
|
+
webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
pagination: z.ZodObject<{
|
|
178
|
+
total: z.ZodCoercedNumber<unknown>;
|
|
179
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
180
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
181
|
+
hasMore: z.ZodBoolean;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export type SearchCalendarMappingsOutput = z.infer<typeof SearchCalendarMappingsOutputSchema>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Create event mapping input schema
|
|
4
|
+
*/
|
|
5
|
+
export declare const CreateEventMappingInputSchema: z.ZodObject<{
|
|
6
|
+
eventId: z.ZodNumber;
|
|
7
|
+
calendarConnectionId: z.ZodString;
|
|
8
|
+
externalId: z.ZodNullable<z.ZodString>;
|
|
9
|
+
externalProvider: z.ZodEnum<{
|
|
10
|
+
apple: "apple";
|
|
11
|
+
google: "google";
|
|
12
|
+
microsoft: "microsoft";
|
|
13
|
+
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type CreateEventMappingInput = z.infer<typeof CreateEventMappingInputSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* Event mapping schema
|
|
18
|
+
*/
|
|
19
|
+
export declare const EventMappingSchema: z.ZodObject<{
|
|
20
|
+
eventId: z.ZodNumber;
|
|
21
|
+
calendarConnectionId: z.ZodString;
|
|
22
|
+
externalId: z.ZodNullable<z.ZodString>;
|
|
23
|
+
externalProvider: z.ZodEnum<{
|
|
24
|
+
apple: "apple";
|
|
25
|
+
google: "google";
|
|
26
|
+
microsoft: "microsoft";
|
|
27
|
+
}>;
|
|
28
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
29
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
30
|
+
eventMappingId: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const EventMappingsSchema: z.ZodArray<z.ZodObject<{
|
|
33
|
+
eventId: z.ZodNumber;
|
|
34
|
+
calendarConnectionId: z.ZodString;
|
|
35
|
+
externalId: z.ZodNullable<z.ZodString>;
|
|
36
|
+
externalProvider: z.ZodEnum<{
|
|
37
|
+
apple: "apple";
|
|
38
|
+
google: "google";
|
|
39
|
+
microsoft: "microsoft";
|
|
40
|
+
}>;
|
|
41
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
42
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
43
|
+
eventMappingId: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
export type EventMapping = z.infer<typeof EventMappingSchema>;
|
|
46
|
+
export type EventMappings = z.infer<typeof EventMappingsSchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Update event mapping input schema
|
|
49
|
+
*/
|
|
50
|
+
export declare const UpdateEventMappingInputSchema: z.ZodObject<{
|
|
51
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type UpdateEventMappingInput = z.infer<typeof UpdateEventMappingInputSchema>;
|
|
54
|
+
/**
|
|
55
|
+
* Paginated event mappings schema
|
|
56
|
+
*/
|
|
57
|
+
export declare const PaginatedEventMappingsSchema: z.ZodObject<{
|
|
58
|
+
items: z.ZodArray<z.ZodObject<{
|
|
59
|
+
eventId: z.ZodNumber;
|
|
60
|
+
calendarConnectionId: z.ZodString;
|
|
61
|
+
externalId: z.ZodNullable<z.ZodString>;
|
|
62
|
+
externalProvider: z.ZodEnum<{
|
|
63
|
+
apple: "apple";
|
|
64
|
+
google: "google";
|
|
65
|
+
microsoft: "microsoft";
|
|
66
|
+
}>;
|
|
67
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
68
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
69
|
+
eventMappingId: z.ZodNumber;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
pagination: z.ZodObject<{
|
|
72
|
+
total: z.ZodCoercedNumber<unknown>;
|
|
73
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
74
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
75
|
+
hasMore: z.ZodBoolean;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type PaginatedEventMappings = z.infer<typeof PaginatedEventMappingsSchema>;
|
|
79
|
+
/**
|
|
80
|
+
* SearchEventMappingsInput
|
|
81
|
+
*/
|
|
82
|
+
export declare const SearchEventMappingsInputSchema: z.ZodObject<{
|
|
83
|
+
eventId: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
eventMappingId: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
calendarConnectionId: z.ZodOptional<z.ZodString>;
|
|
86
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
87
|
+
externalProvider: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
apple: "apple";
|
|
89
|
+
google: "google";
|
|
90
|
+
microsoft: "microsoft";
|
|
91
|
+
}>>;
|
|
92
|
+
pagination: z.ZodDefault<z.ZodObject<{
|
|
93
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
94
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export type SearchEventMappingsInput = z.infer<typeof SearchEventMappingsInputSchema>;
|
|
98
|
+
/**
|
|
99
|
+
* SearchEventMappingsOutput
|
|
100
|
+
*/
|
|
101
|
+
export declare const SearchEventMappingsOutputSchema: z.ZodObject<{
|
|
102
|
+
items: z.ZodArray<z.ZodObject<{
|
|
103
|
+
eventId: z.ZodNumber;
|
|
104
|
+
calendarConnectionId: z.ZodString;
|
|
105
|
+
externalId: z.ZodNullable<z.ZodString>;
|
|
106
|
+
externalProvider: z.ZodEnum<{
|
|
107
|
+
apple: "apple";
|
|
108
|
+
google: "google";
|
|
109
|
+
microsoft: "microsoft";
|
|
110
|
+
}>;
|
|
111
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
112
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
113
|
+
eventMappingId: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
pagination: z.ZodObject<{
|
|
116
|
+
total: z.ZodCoercedNumber<unknown>;
|
|
117
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
118
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
119
|
+
hasMore: z.ZodBoolean;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type SearchEventMappingsOutput = z.infer<typeof SearchEventMappingsOutputSchema>;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const Title: z.ZodString;
|
|
3
|
+
export declare const Description: z.ZodString;
|
|
4
|
+
export declare const Location: z.ZodString;
|
|
5
|
+
/**
|
|
6
|
+
* EventStatus
|
|
7
|
+
*/
|
|
8
|
+
export declare const EventStatuses: readonly ["confirmed", "cancelled", "tentative"];
|
|
9
|
+
export declare const EventStatusesSchema: z.ZodEnum<{
|
|
10
|
+
confirmed: "confirmed";
|
|
11
|
+
cancelled: "cancelled";
|
|
12
|
+
tentative: "tentative";
|
|
13
|
+
}>;
|
|
14
|
+
export type EventStatus = z.infer<typeof EventStatusesSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* EventBusyStatus
|
|
17
|
+
*/
|
|
18
|
+
export declare const EventBusyStatuses: readonly ["busy", "free"];
|
|
19
|
+
export declare const EventBusyStatusesSchema: z.ZodEnum<{
|
|
20
|
+
busy: "busy";
|
|
21
|
+
free: "free";
|
|
22
|
+
}>;
|
|
23
|
+
export type EventBusyStatus = z.infer<typeof EventBusyStatusesSchema>;
|
|
24
|
+
export declare const CreateEventInputSchema: z.ZodObject<{
|
|
25
|
+
userId: z.ZodNumber;
|
|
26
|
+
bookingId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
29
|
+
location: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
30
|
+
startTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
31
|
+
endTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
32
|
+
status: z.ZodEnum<{
|
|
33
|
+
confirmed: "confirmed";
|
|
34
|
+
cancelled: "cancelled";
|
|
35
|
+
tentative: "tentative";
|
|
36
|
+
}>;
|
|
37
|
+
busyStatus: z.ZodDefault<z.ZodEnum<{
|
|
38
|
+
busy: "busy";
|
|
39
|
+
free: "free";
|
|
40
|
+
}>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type CreateEventInput = z.infer<typeof CreateEventInputSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* Event
|
|
45
|
+
*/
|
|
46
|
+
export declare const EventSchema: z.ZodObject<{
|
|
47
|
+
userId: z.ZodNumber;
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
startTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
50
|
+
endTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
51
|
+
status: z.ZodEnum<{
|
|
52
|
+
confirmed: "confirmed";
|
|
53
|
+
cancelled: "cancelled";
|
|
54
|
+
tentative: "tentative";
|
|
55
|
+
}>;
|
|
56
|
+
busyStatus: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
busy: "busy";
|
|
58
|
+
free: "free";
|
|
59
|
+
}>>;
|
|
60
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
61
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
62
|
+
eventId: z.ZodNumber;
|
|
63
|
+
bookingId: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
description: z.ZodNullable<z.ZodString>;
|
|
65
|
+
location: z.ZodNullable<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export declare const EventsSchema: z.ZodArray<z.ZodObject<{
|
|
68
|
+
userId: z.ZodNumber;
|
|
69
|
+
title: z.ZodString;
|
|
70
|
+
startTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
71
|
+
endTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
72
|
+
status: z.ZodEnum<{
|
|
73
|
+
confirmed: "confirmed";
|
|
74
|
+
cancelled: "cancelled";
|
|
75
|
+
tentative: "tentative";
|
|
76
|
+
}>;
|
|
77
|
+
busyStatus: z.ZodDefault<z.ZodEnum<{
|
|
78
|
+
busy: "busy";
|
|
79
|
+
free: "free";
|
|
80
|
+
}>>;
|
|
81
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
82
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
83
|
+
eventId: z.ZodNumber;
|
|
84
|
+
bookingId: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
description: z.ZodNullable<z.ZodString>;
|
|
86
|
+
location: z.ZodNullable<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
export type Event = z.infer<typeof EventSchema>;
|
|
89
|
+
export type Events = z.infer<typeof EventsSchema>;
|
|
90
|
+
/**
|
|
91
|
+
* UpdateEventInput
|
|
92
|
+
*/
|
|
93
|
+
export declare const UpdateEventInputSchema: z.ZodObject<{
|
|
94
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
96
|
+
confirmed: "confirmed";
|
|
97
|
+
cancelled: "cancelled";
|
|
98
|
+
tentative: "tentative";
|
|
99
|
+
}>>;
|
|
100
|
+
title: z.ZodOptional<z.ZodString>;
|
|
101
|
+
description: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
102
|
+
startTime: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
103
|
+
endTime: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
|
|
104
|
+
location: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
105
|
+
busyStatus: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
106
|
+
busy: "busy";
|
|
107
|
+
free: "free";
|
|
108
|
+
}>>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type UpdateEventInput = z.infer<typeof UpdateEventInputSchema>;
|
|
111
|
+
/**
|
|
112
|
+
* SearchEventsInput
|
|
113
|
+
*/
|
|
114
|
+
export declare const SearchEventsInputSchema: z.ZodObject<{
|
|
115
|
+
userId: z.ZodNumber;
|
|
116
|
+
startDate: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
117
|
+
endDate: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
118
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
confirmed: "confirmed";
|
|
120
|
+
cancelled: "cancelled";
|
|
121
|
+
tentative: "tentative";
|
|
122
|
+
}>>;
|
|
123
|
+
busyStatus: z.ZodOptional<z.ZodEnum<{
|
|
124
|
+
busy: "busy";
|
|
125
|
+
free: "free";
|
|
126
|
+
}>>;
|
|
127
|
+
pagination: z.ZodDefault<z.ZodObject<{
|
|
128
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
129
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export type SearchEventsInput = z.infer<typeof SearchEventsInputSchema>;
|
|
133
|
+
/**
|
|
134
|
+
* SearchEventsOutput
|
|
135
|
+
*/
|
|
136
|
+
export declare const SearchEventsOutputSchema: z.ZodObject<{
|
|
137
|
+
items: z.ZodArray<z.ZodObject<{
|
|
138
|
+
userId: z.ZodNumber;
|
|
139
|
+
title: z.ZodString;
|
|
140
|
+
startTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
141
|
+
endTime: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
142
|
+
status: z.ZodEnum<{
|
|
143
|
+
confirmed: "confirmed";
|
|
144
|
+
cancelled: "cancelled";
|
|
145
|
+
tentative: "tentative";
|
|
146
|
+
}>;
|
|
147
|
+
busyStatus: z.ZodDefault<z.ZodEnum<{
|
|
148
|
+
busy: "busy";
|
|
149
|
+
free: "free";
|
|
150
|
+
}>>;
|
|
151
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
152
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
153
|
+
eventId: z.ZodNumber;
|
|
154
|
+
bookingId: z.ZodNullable<z.ZodNumber>;
|
|
155
|
+
description: z.ZodNullable<z.ZodString>;
|
|
156
|
+
location: z.ZodNullable<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
pagination: z.ZodObject<{
|
|
159
|
+
total: z.ZodCoercedNumber<unknown>;
|
|
160
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
161
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
162
|
+
hasMore: z.ZodBoolean;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type SearchEventsOutput = z.infer<typeof SearchEventsOutputSchema>;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const TimeSlotsSchema: z.ZodArray<z.ZodObject<{
|
|
3
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
4
|
+
time: z.ZodArray<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>>;
|
|
6
|
+
export type TimeSlots = z.infer<typeof TimeSlotsSchema>;
|
|
7
|
+
/**
|
|
8
|
+
* BookingLocationFilter
|
|
9
|
+
*/
|
|
10
|
+
declare const BookingLocationFilterSchema: z.ZodObject<{
|
|
11
|
+
bookingLocationId: z.ZodNumber;
|
|
12
|
+
bufferMinutes: z.ZodNumber;
|
|
13
|
+
leadMinutes: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type BookingLocationFilter = z.infer<typeof BookingLocationFilterSchema>;
|
|
16
|
+
declare const BookingLocationsAvailabilitySchema: z.ZodArray<z.ZodObject<{
|
|
17
|
+
bookingLocationId: z.ZodNumber;
|
|
18
|
+
timeSlotCount: z.ZodNumber;
|
|
19
|
+
timeSlots: z.ZodArray<z.ZodObject<{
|
|
20
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
21
|
+
time: z.ZodArray<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
export type BookingLocationsAvailability = z.infer<typeof BookingLocationsAvailabilitySchema>;
|
|
25
|
+
/**
|
|
26
|
+
* BaseAvailabilitySearchFilters
|
|
27
|
+
* Shared filters applied to all users in multi-user searches
|
|
28
|
+
*/
|
|
29
|
+
export declare const BaseAvailabilitySearchFiltersSchema: z.ZodObject<{
|
|
30
|
+
dateFrom: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
31
|
+
dateTo: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
32
|
+
timeFrom: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
33
|
+
timeTo: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type BaseAvailabilitySearchFilters = z.infer<typeof BaseAvailabilitySearchFiltersSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* PerUserAvailabilitySearchFilters
|
|
38
|
+
* Per-user filters that extend the base filters
|
|
39
|
+
*/
|
|
40
|
+
declare const PerUserAvailabilitySearchFiltersSchema: z.ZodObject<{
|
|
41
|
+
userId: z.ZodNumber;
|
|
42
|
+
bookingLocations: z.ZodArray<z.ZodObject<{
|
|
43
|
+
bookingLocationId: z.ZodNumber;
|
|
44
|
+
bufferMinutes: z.ZodNumber;
|
|
45
|
+
leadMinutes: z.ZodNumber;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
bookingDurationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
slotGapMinutes: z.ZodDefault<z.ZodNumber>;
|
|
49
|
+
timeZone: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type PerUserAvailabilitySearchFilters = z.infer<typeof PerUserAvailabilitySearchFiltersSchema>;
|
|
52
|
+
export declare const UserAvailabilitySearchInputSchema: z.ZodObject<{
|
|
53
|
+
filters: z.ZodObject<{
|
|
54
|
+
dateFrom: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
55
|
+
dateTo: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
56
|
+
timeFrom: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
57
|
+
timeTo: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
58
|
+
userId: z.ZodNumber;
|
|
59
|
+
bookingLocations: z.ZodArray<z.ZodObject<{
|
|
60
|
+
bookingLocationId: z.ZodNumber;
|
|
61
|
+
bufferMinutes: z.ZodNumber;
|
|
62
|
+
leadMinutes: z.ZodNumber;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
bookingDurationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
65
|
+
slotGapMinutes: z.ZodDefault<z.ZodNumber>;
|
|
66
|
+
timeZone: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type UserAvailabilitySearchInput = z.infer<typeof UserAvailabilitySearchInputSchema>;
|
|
70
|
+
export declare const UserAvailabilitySchema: z.ZodObject<{
|
|
71
|
+
userId: z.ZodNumber;
|
|
72
|
+
timeZone: z.ZodString;
|
|
73
|
+
bookingLocationAvailability: z.ZodArray<z.ZodObject<{
|
|
74
|
+
bookingLocationId: z.ZodNumber;
|
|
75
|
+
timeSlotCount: z.ZodNumber;
|
|
76
|
+
timeSlots: z.ZodArray<z.ZodObject<{
|
|
77
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
78
|
+
time: z.ZodArray<z.ZodString>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type UserAvailability = z.infer<typeof UserAvailabilitySchema>;
|
|
83
|
+
/**
|
|
84
|
+
* MultiUserAvailabilitySearchInput
|
|
85
|
+
* Search for availability across multiple users
|
|
86
|
+
*/
|
|
87
|
+
export declare const MultiUserAvailabilitySearchInputSchema: z.ZodObject<{
|
|
88
|
+
baseFilters: z.ZodObject<{
|
|
89
|
+
dateFrom: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
90
|
+
dateTo: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
91
|
+
timeFrom: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
92
|
+
timeTo: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
userFilters: z.ZodArray<z.ZodObject<{
|
|
95
|
+
userId: z.ZodNumber;
|
|
96
|
+
bookingLocations: z.ZodArray<z.ZodObject<{
|
|
97
|
+
bookingLocationId: z.ZodNumber;
|
|
98
|
+
bufferMinutes: z.ZodNumber;
|
|
99
|
+
leadMinutes: z.ZodNumber;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
bookingDurationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
102
|
+
slotGapMinutes: z.ZodDefault<z.ZodNumber>;
|
|
103
|
+
timeZone: z.ZodString;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type MultiUserAvailabilitySearchInput = z.infer<typeof MultiUserAvailabilitySearchInputSchema>;
|
|
107
|
+
/**
|
|
108
|
+
* MultiUserAvailability
|
|
109
|
+
* Output for multi-user availability search, sorted by availability
|
|
110
|
+
*/
|
|
111
|
+
export declare const MultiUserAvailabilitySchema: z.ZodArray<z.ZodObject<{
|
|
112
|
+
userId: z.ZodNumber;
|
|
113
|
+
timeZone: z.ZodString;
|
|
114
|
+
bookingLocationAvailability: z.ZodArray<z.ZodObject<{
|
|
115
|
+
bookingLocationId: z.ZodNumber;
|
|
116
|
+
timeSlotCount: z.ZodNumber;
|
|
117
|
+
timeSlots: z.ZodArray<z.ZodObject<{
|
|
118
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
119
|
+
time: z.ZodArray<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
export type MultiUserAvailability = z.infer<typeof MultiUserAvailabilitySchema>;
|
|
124
|
+
/**
|
|
125
|
+
* UserDateCheckOutput
|
|
126
|
+
* The output schema for a high level availability check for a user.
|
|
127
|
+
* This is used for quickly checking the availability of a user for a given date/date range.
|
|
128
|
+
*
|
|
129
|
+
* Example: We have a calendar picker UI where the user can select a date to check the availability for.
|
|
130
|
+
* We want to indicate whether a specific date has any availability or not.
|
|
131
|
+
* We don't need to know the exact availability times, just whether it's available or not.
|
|
132
|
+
*/
|
|
133
|
+
export declare const UserDateCheckOutputSchema: z.ZodObject<{
|
|
134
|
+
userId: z.ZodNumber;
|
|
135
|
+
timeZone: z.ZodString;
|
|
136
|
+
anyAvailability: z.ZodBoolean;
|
|
137
|
+
availability: z.ZodObject<{
|
|
138
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
139
|
+
isAvailable: z.ZodBoolean;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
bookingLocationId: z.ZodNumber;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AuditColumnsSchema: z.ZodObject<{
|
|
3
|
+
createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
4
|
+
updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type AuditColumns = z.infer<typeof AuditColumnsSchema>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* DateTime in ISO 8601 format
|
|
4
|
+
* Used for all rule types to specify date and time
|
|
5
|
+
* Examples: "2025-01-01T09:00:00Z", "2025-01-01T17:30:00Z"
|
|
6
|
+
*/
|
|
7
|
+
export declare const DateTimeSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
8
|
+
export type DateTime = z.infer<typeof DateTimeSchema>;
|
|
9
|
+
/**
|
|
10
|
+
* Date only in YYYY-MM-DD format
|
|
11
|
+
* Used for all rule types to specify date
|
|
12
|
+
* Examples: "2025-01-01", "2025-12-31"
|
|
13
|
+
*/
|
|
14
|
+
export declare const DateOnlySchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
15
|
+
export type DateOnly = z.infer<typeof DateOnlySchema>;
|
|
16
|
+
/**
|
|
17
|
+
* Time of day in 24-hour format (HH:mm)
|
|
18
|
+
* Used for all rule types to specify daily time windows
|
|
19
|
+
* Examples: "09:00", "17:30", "00:00"
|
|
20
|
+
*/
|
|
21
|
+
export declare const Time24HourSchema: z.ZodString;
|
|
22
|
+
export type Time24Hour = z.infer<typeof Time24HourSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* TimeZone
|
|
25
|
+
* TODO: Implement time zone validation. Static list?
|
|
26
|
+
*/
|
|
27
|
+
export declare const TimeZoneSchema: z.ZodString;
|
|
28
|
+
export type TimeZone = z.infer<typeof TimeZoneSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* External providers
|
|
4
|
+
*/
|
|
5
|
+
export declare const APPLE = "apple";
|
|
6
|
+
export declare const GOOGLE = "google";
|
|
7
|
+
export declare const MICROSOFT = "microsoft";
|
|
8
|
+
export declare const ExternalProviders: readonly ["apple", "google", "microsoft"];
|
|
9
|
+
export declare const ExternalProvidersSchema: z.ZodEnum<{
|
|
10
|
+
apple: "apple";
|
|
11
|
+
google: "google";
|
|
12
|
+
microsoft: "microsoft";
|
|
13
|
+
}>;
|
|
14
|
+
export type ExternalProvider = z.infer<typeof ExternalProvidersSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const IDSchema: z.ZodNumber;
|
|
3
|
+
export type ID = z.infer<typeof IDSchema>;
|
|
4
|
+
export declare const IDsSchema: z.ZodArray<z.ZodNumber>;
|
|
5
|
+
export type IDs = z.infer<typeof IDsSchema>;
|
|
6
|
+
export declare const IDParamSchema: z.ZodCoercedNumber<unknown>;
|
|
7
|
+
export type IDParam = z.infer<typeof IDParamSchema>;
|
|
8
|
+
export declare const ExternalIDSchema: z.ZodString;
|
|
9
|
+
export type ExternalID = z.infer<typeof ExternalIDSchema>;
|