api-arreya-types 1.0.21 → 1.0.22
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/schedule.type.d.ts +263 -38
- package/dist/schedule.type.js +32 -16
- package/package.json +1 -1
package/dist/schedule.type.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const BaseSchedule: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
projectId: z.ZodString;
|
|
5
5
|
presentationId: z.ZodString;
|
|
6
6
|
title: z.ZodString;
|
|
7
7
|
color: z.ZodString;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
end: z.ZodDate;
|
|
8
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
9
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
11
10
|
timezone: z.ZodString;
|
|
12
|
-
useDeviceTime: z.ZodBoolean
|
|
13
|
-
|
|
14
|
-
recurExpires: z.ZodNullable<z.ZodDate>;
|
|
15
|
-
recurInterval: z.ZodNullable<z.ZodNumber>;
|
|
16
|
-
recurType: z.ZodNullable<z.ZodString>;
|
|
11
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
17
13
|
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
18
14
|
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
19
15
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -24,15 +20,11 @@ export declare const Schedule: z.ZodObject<{
|
|
|
24
20
|
presentationId: string;
|
|
25
21
|
title: string;
|
|
26
22
|
color: string;
|
|
27
|
-
priority: boolean;
|
|
28
23
|
start: Date;
|
|
29
24
|
end: Date;
|
|
30
25
|
timezone: string;
|
|
31
26
|
useDeviceTime: boolean;
|
|
32
|
-
|
|
33
|
-
recurExpires: Date | null;
|
|
34
|
-
recurInterval: number | null;
|
|
35
|
-
recurType: string | null;
|
|
27
|
+
priority: boolean;
|
|
36
28
|
}, {
|
|
37
29
|
id: string;
|
|
38
30
|
createdAt: string | Date;
|
|
@@ -41,16 +33,249 @@ export declare const Schedule: z.ZodObject<{
|
|
|
41
33
|
presentationId: string;
|
|
42
34
|
title: string;
|
|
43
35
|
color: string;
|
|
36
|
+
start: string | Date;
|
|
37
|
+
end: string | Date;
|
|
38
|
+
timezone: string;
|
|
39
|
+
useDeviceTime?: boolean | undefined;
|
|
40
|
+
priority?: boolean | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const RecurSchedule: z.ZodObject<z.objectUtil.extendShape<{
|
|
43
|
+
recur: z.ZodLiteral<true>;
|
|
44
|
+
recurExpires: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
45
|
+
recurInterval: z.ZodNumber;
|
|
46
|
+
recurType: z.ZodString;
|
|
47
|
+
}, {
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
projectId: z.ZodString;
|
|
50
|
+
presentationId: z.ZodString;
|
|
51
|
+
title: z.ZodString;
|
|
52
|
+
color: z.ZodString;
|
|
53
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
54
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
55
|
+
timezone: z.ZodString;
|
|
56
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
57
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
59
|
+
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
60
|
+
}>, "strip", z.ZodTypeAny, {
|
|
61
|
+
id: string;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
projectId: string;
|
|
65
|
+
presentationId: string;
|
|
66
|
+
title: string;
|
|
67
|
+
color: string;
|
|
68
|
+
start: Date;
|
|
69
|
+
end: Date;
|
|
70
|
+
timezone: string;
|
|
71
|
+
useDeviceTime: boolean;
|
|
44
72
|
priority: boolean;
|
|
73
|
+
recur: true;
|
|
74
|
+
recurExpires: Date;
|
|
75
|
+
recurInterval: number;
|
|
76
|
+
recurType: string;
|
|
77
|
+
}, {
|
|
78
|
+
id: string;
|
|
79
|
+
createdAt: string | Date;
|
|
80
|
+
updatedAt: string | Date;
|
|
81
|
+
projectId: string;
|
|
82
|
+
presentationId: string;
|
|
83
|
+
title: string;
|
|
84
|
+
color: string;
|
|
85
|
+
start: string | Date;
|
|
86
|
+
end: string | Date;
|
|
87
|
+
timezone: string;
|
|
88
|
+
recur: true;
|
|
89
|
+
recurExpires: string | Date;
|
|
90
|
+
recurInterval: number;
|
|
91
|
+
recurType: string;
|
|
92
|
+
useDeviceTime?: boolean | undefined;
|
|
93
|
+
priority?: boolean | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const NonRecurSchedule: z.ZodObject<z.objectUtil.extendShape<{
|
|
96
|
+
recur: z.ZodLiteral<false>;
|
|
97
|
+
recurExpires: z.ZodNull;
|
|
98
|
+
recurInterval: z.ZodNull;
|
|
99
|
+
recurType: z.ZodNull;
|
|
100
|
+
}, {
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
projectId: z.ZodString;
|
|
103
|
+
presentationId: z.ZodString;
|
|
104
|
+
title: z.ZodString;
|
|
105
|
+
color: z.ZodString;
|
|
106
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
107
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
108
|
+
timezone: z.ZodString;
|
|
109
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
110
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
111
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
112
|
+
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
113
|
+
}>, "strip", z.ZodTypeAny, {
|
|
114
|
+
id: string;
|
|
115
|
+
createdAt: Date;
|
|
116
|
+
updatedAt: Date;
|
|
117
|
+
projectId: string;
|
|
118
|
+
presentationId: string;
|
|
119
|
+
title: string;
|
|
120
|
+
color: string;
|
|
45
121
|
start: Date;
|
|
46
122
|
end: Date;
|
|
47
123
|
timezone: string;
|
|
48
124
|
useDeviceTime: boolean;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
125
|
+
priority: boolean;
|
|
126
|
+
recur: false;
|
|
127
|
+
recurExpires: null;
|
|
128
|
+
recurInterval: null;
|
|
129
|
+
recurType: null;
|
|
130
|
+
}, {
|
|
131
|
+
id: string;
|
|
132
|
+
createdAt: string | Date;
|
|
133
|
+
updatedAt: string | Date;
|
|
134
|
+
projectId: string;
|
|
135
|
+
presentationId: string;
|
|
136
|
+
title: string;
|
|
137
|
+
color: string;
|
|
138
|
+
start: string | Date;
|
|
139
|
+
end: string | Date;
|
|
140
|
+
timezone: string;
|
|
141
|
+
recur: false;
|
|
142
|
+
recurExpires: null;
|
|
143
|
+
recurInterval: null;
|
|
144
|
+
recurType: null;
|
|
145
|
+
useDeviceTime?: boolean | undefined;
|
|
146
|
+
priority?: boolean | undefined;
|
|
53
147
|
}>;
|
|
148
|
+
export declare const Schedule: z.ZodDiscriminatedUnion<"recur", [z.ZodObject<z.objectUtil.extendShape<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
projectId: z.ZodString;
|
|
151
|
+
presentationId: z.ZodString;
|
|
152
|
+
title: z.ZodString;
|
|
153
|
+
color: z.ZodString;
|
|
154
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
155
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
156
|
+
timezone: z.ZodString;
|
|
157
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
158
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
159
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
160
|
+
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
161
|
+
}, z.objectUtil.extendShape<{
|
|
162
|
+
recur: z.ZodLiteral<true>;
|
|
163
|
+
recurExpires: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
164
|
+
recurInterval: z.ZodNumber;
|
|
165
|
+
recurType: z.ZodString;
|
|
166
|
+
}, {
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
projectId: z.ZodString;
|
|
169
|
+
presentationId: z.ZodString;
|
|
170
|
+
title: z.ZodString;
|
|
171
|
+
color: z.ZodString;
|
|
172
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
173
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
174
|
+
timezone: z.ZodString;
|
|
175
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
177
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
178
|
+
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
179
|
+
}>>, "strip", z.ZodTypeAny, {
|
|
180
|
+
id: string;
|
|
181
|
+
createdAt: Date;
|
|
182
|
+
updatedAt: Date;
|
|
183
|
+
projectId: string;
|
|
184
|
+
presentationId: string;
|
|
185
|
+
title: string;
|
|
186
|
+
color: string;
|
|
187
|
+
start: Date;
|
|
188
|
+
end: Date;
|
|
189
|
+
timezone: string;
|
|
190
|
+
useDeviceTime: boolean;
|
|
191
|
+
priority: boolean;
|
|
192
|
+
recur: true;
|
|
193
|
+
recurExpires: Date;
|
|
194
|
+
recurInterval: number;
|
|
195
|
+
recurType: string;
|
|
196
|
+
}, {
|
|
197
|
+
id: string;
|
|
198
|
+
createdAt: string | Date;
|
|
199
|
+
updatedAt: string | Date;
|
|
200
|
+
projectId: string;
|
|
201
|
+
presentationId: string;
|
|
202
|
+
title: string;
|
|
203
|
+
color: string;
|
|
204
|
+
start: string | Date;
|
|
205
|
+
end: string | Date;
|
|
206
|
+
timezone: string;
|
|
207
|
+
recur: true;
|
|
208
|
+
recurExpires: string | Date;
|
|
209
|
+
recurInterval: number;
|
|
210
|
+
recurType: string;
|
|
211
|
+
useDeviceTime?: boolean | undefined;
|
|
212
|
+
priority?: boolean | undefined;
|
|
213
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
214
|
+
id: z.ZodString;
|
|
215
|
+
projectId: z.ZodString;
|
|
216
|
+
presentationId: z.ZodString;
|
|
217
|
+
title: z.ZodString;
|
|
218
|
+
color: z.ZodString;
|
|
219
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
220
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
221
|
+
timezone: z.ZodString;
|
|
222
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
223
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
224
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
225
|
+
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
226
|
+
}, z.objectUtil.extendShape<{
|
|
227
|
+
recur: z.ZodLiteral<false>;
|
|
228
|
+
recurExpires: z.ZodNull;
|
|
229
|
+
recurInterval: z.ZodNull;
|
|
230
|
+
recurType: z.ZodNull;
|
|
231
|
+
}, {
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
projectId: z.ZodString;
|
|
234
|
+
presentationId: z.ZodString;
|
|
235
|
+
title: z.ZodString;
|
|
236
|
+
color: z.ZodString;
|
|
237
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
238
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
239
|
+
timezone: z.ZodString;
|
|
240
|
+
useDeviceTime: z.ZodDefault<z.ZodBoolean>;
|
|
241
|
+
priority: z.ZodDefault<z.ZodBoolean>;
|
|
242
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
243
|
+
updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
244
|
+
}>>, "strip", z.ZodTypeAny, {
|
|
245
|
+
id: string;
|
|
246
|
+
createdAt: Date;
|
|
247
|
+
updatedAt: Date;
|
|
248
|
+
projectId: string;
|
|
249
|
+
presentationId: string;
|
|
250
|
+
title: string;
|
|
251
|
+
color: string;
|
|
252
|
+
start: Date;
|
|
253
|
+
end: Date;
|
|
254
|
+
timezone: string;
|
|
255
|
+
useDeviceTime: boolean;
|
|
256
|
+
priority: boolean;
|
|
257
|
+
recur: false;
|
|
258
|
+
recurExpires: null;
|
|
259
|
+
recurInterval: null;
|
|
260
|
+
recurType: null;
|
|
261
|
+
}, {
|
|
262
|
+
id: string;
|
|
263
|
+
createdAt: string | Date;
|
|
264
|
+
updatedAt: string | Date;
|
|
265
|
+
projectId: string;
|
|
266
|
+
presentationId: string;
|
|
267
|
+
title: string;
|
|
268
|
+
color: string;
|
|
269
|
+
start: string | Date;
|
|
270
|
+
end: string | Date;
|
|
271
|
+
timezone: string;
|
|
272
|
+
recur: false;
|
|
273
|
+
recurExpires: null;
|
|
274
|
+
recurInterval: null;
|
|
275
|
+
recurType: null;
|
|
276
|
+
useDeviceTime?: boolean | undefined;
|
|
277
|
+
priority?: boolean | undefined;
|
|
278
|
+
}>]>;
|
|
54
279
|
export declare const CreateSchedule: z.ZodObject<{
|
|
55
280
|
projectId: z.ZodString;
|
|
56
281
|
presentationId: z.ZodString;
|
|
@@ -70,11 +295,11 @@ export declare const CreateSchedule: z.ZodObject<{
|
|
|
70
295
|
presentationId: string;
|
|
71
296
|
title: string;
|
|
72
297
|
color: string;
|
|
73
|
-
priority: boolean;
|
|
74
298
|
start: Date;
|
|
75
299
|
end: Date;
|
|
76
300
|
timezone: string;
|
|
77
301
|
useDeviceTime: boolean;
|
|
302
|
+
priority: boolean;
|
|
78
303
|
recur: boolean;
|
|
79
304
|
recurExpires: Date | null;
|
|
80
305
|
recurInterval: number | null;
|
|
@@ -84,11 +309,11 @@ export declare const CreateSchedule: z.ZodObject<{
|
|
|
84
309
|
presentationId: string;
|
|
85
310
|
title: string;
|
|
86
311
|
color: string;
|
|
87
|
-
priority: boolean;
|
|
88
312
|
start: Date;
|
|
89
313
|
end: Date;
|
|
90
314
|
timezone: string;
|
|
91
315
|
useDeviceTime: boolean;
|
|
316
|
+
priority: boolean;
|
|
92
317
|
recur?: boolean | undefined;
|
|
93
318
|
recurExpires?: Date | null | undefined;
|
|
94
319
|
recurInterval?: number | null | undefined;
|
|
@@ -115,11 +340,11 @@ export declare const UpdateSchedule: z.ZodObject<{
|
|
|
115
340
|
presentationId?: string | undefined;
|
|
116
341
|
title?: string | undefined;
|
|
117
342
|
color?: string | undefined;
|
|
118
|
-
priority?: boolean | undefined;
|
|
119
343
|
start?: Date | undefined;
|
|
120
344
|
end?: Date | undefined;
|
|
121
345
|
timezone?: string | undefined;
|
|
122
346
|
useDeviceTime?: boolean | undefined;
|
|
347
|
+
priority?: boolean | undefined;
|
|
123
348
|
recur?: boolean | undefined;
|
|
124
349
|
recurExpires?: Date | null | undefined;
|
|
125
350
|
recurInterval?: number | null | undefined;
|
|
@@ -130,11 +355,11 @@ export declare const UpdateSchedule: z.ZodObject<{
|
|
|
130
355
|
presentationId?: string | undefined;
|
|
131
356
|
title?: string | undefined;
|
|
132
357
|
color?: string | undefined;
|
|
133
|
-
priority?: boolean | undefined;
|
|
134
358
|
start?: Date | undefined;
|
|
135
359
|
end?: Date | undefined;
|
|
136
360
|
timezone?: string | undefined;
|
|
137
361
|
useDeviceTime?: boolean | undefined;
|
|
362
|
+
priority?: boolean | undefined;
|
|
138
363
|
recur?: boolean | undefined;
|
|
139
364
|
recurExpires?: Date | null | undefined;
|
|
140
365
|
recurInterval?: number | null | undefined;
|
|
@@ -156,12 +381,12 @@ export declare const CreateScheduleRequestBody: z.ZodObject<{
|
|
|
156
381
|
title: z.ZodString;
|
|
157
382
|
color: z.ZodString;
|
|
158
383
|
priority: z.ZodBoolean;
|
|
159
|
-
start: z.ZodEffects<z.ZodString, Date, string>;
|
|
160
|
-
end: z.ZodEffects<z.ZodString, Date, string>;
|
|
384
|
+
start: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
385
|
+
end: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
|
|
161
386
|
timezone: z.ZodString;
|
|
162
387
|
useDeviceTime: z.ZodBoolean;
|
|
163
388
|
recur: z.ZodDefault<z.ZodBoolean>;
|
|
164
|
-
recurExpires: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>>;
|
|
389
|
+
recurExpires: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>>>;
|
|
165
390
|
recurInterval: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
166
391
|
recurType: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
167
392
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -169,11 +394,11 @@ export declare const CreateScheduleRequestBody: z.ZodObject<{
|
|
|
169
394
|
presentationId: string;
|
|
170
395
|
title: string;
|
|
171
396
|
color: string;
|
|
172
|
-
priority: boolean;
|
|
173
397
|
start: Date;
|
|
174
398
|
end: Date;
|
|
175
399
|
timezone: string;
|
|
176
400
|
useDeviceTime: boolean;
|
|
401
|
+
priority: boolean;
|
|
177
402
|
recur: boolean;
|
|
178
403
|
recurExpires: Date | null;
|
|
179
404
|
recurInterval: number | null;
|
|
@@ -183,13 +408,13 @@ export declare const CreateScheduleRequestBody: z.ZodObject<{
|
|
|
183
408
|
presentationId: string;
|
|
184
409
|
title: string;
|
|
185
410
|
color: string;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
end: string;
|
|
411
|
+
start: string | Date;
|
|
412
|
+
end: string | Date;
|
|
189
413
|
timezone: string;
|
|
190
414
|
useDeviceTime: boolean;
|
|
415
|
+
priority: boolean;
|
|
191
416
|
recur?: boolean | undefined;
|
|
192
|
-
recurExpires?: string | null | undefined;
|
|
417
|
+
recurExpires?: string | Date | null | undefined;
|
|
193
418
|
recurInterval?: number | null | undefined;
|
|
194
419
|
recurType?: string | null | undefined;
|
|
195
420
|
}>;
|
|
@@ -200,12 +425,12 @@ export declare const UpdateScheduleRequestBody: z.ZodObject<{
|
|
|
200
425
|
title: z.ZodOptional<z.ZodString>;
|
|
201
426
|
color: z.ZodOptional<z.ZodString>;
|
|
202
427
|
priority: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
-
start: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
|
|
204
|
-
end: z.ZodOptional<z.ZodEffects<z.ZodString, Date, string>>;
|
|
428
|
+
start: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>>;
|
|
429
|
+
end: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>>;
|
|
205
430
|
timezone: z.ZodOptional<z.ZodString>;
|
|
206
431
|
useDeviceTime: z.ZodOptional<z.ZodBoolean>;
|
|
207
432
|
recur: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
-
recurExpires: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>>;
|
|
433
|
+
recurExpires: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>>>;
|
|
209
434
|
recurInterval: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
210
435
|
recurType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
211
436
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -213,11 +438,11 @@ export declare const UpdateScheduleRequestBody: z.ZodObject<{
|
|
|
213
438
|
presentationId?: string | undefined;
|
|
214
439
|
title?: string | undefined;
|
|
215
440
|
color?: string | undefined;
|
|
216
|
-
priority?: boolean | undefined;
|
|
217
441
|
start?: Date | undefined;
|
|
218
442
|
end?: Date | undefined;
|
|
219
443
|
timezone?: string | undefined;
|
|
220
444
|
useDeviceTime?: boolean | undefined;
|
|
445
|
+
priority?: boolean | undefined;
|
|
221
446
|
recur?: boolean | undefined;
|
|
222
447
|
recurExpires?: Date | null | undefined;
|
|
223
448
|
recurInterval?: number | null | undefined;
|
|
@@ -227,13 +452,13 @@ export declare const UpdateScheduleRequestBody: z.ZodObject<{
|
|
|
227
452
|
presentationId?: string | undefined;
|
|
228
453
|
title?: string | undefined;
|
|
229
454
|
color?: string | undefined;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
end?: string | undefined;
|
|
455
|
+
start?: string | Date | undefined;
|
|
456
|
+
end?: string | Date | undefined;
|
|
233
457
|
timezone?: string | undefined;
|
|
234
458
|
useDeviceTime?: boolean | undefined;
|
|
459
|
+
priority?: boolean | undefined;
|
|
235
460
|
recur?: boolean | undefined;
|
|
236
|
-
recurExpires?: string | null | undefined;
|
|
461
|
+
recurExpires?: string | Date | null | undefined;
|
|
237
462
|
recurInterval?: number | null | undefined;
|
|
238
463
|
recurType?: string | null | undefined;
|
|
239
464
|
}>;
|
package/dist/schedule.type.js
CHANGED
|
@@ -1,26 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateScheduleRequestBody = exports.CreateScheduleRequestBody = exports.ScheduleIdRequestParams = exports.UpdateSchedule = exports.CreateSchedule = exports.Schedule = void 0;
|
|
3
|
+
exports.UpdateScheduleRequestBody = exports.CreateScheduleRequestBody = exports.ScheduleIdRequestParams = exports.UpdateSchedule = exports.CreateSchedule = exports.Schedule = exports.NonRecurSchedule = exports.RecurSchedule = exports.BaseSchedule = void 0;
|
|
4
4
|
var zod_1 = require("zod");
|
|
5
5
|
var zod_utils_1 = require("./zod-utils");
|
|
6
|
-
exports.
|
|
6
|
+
exports.BaseSchedule = zod_1.z.object({
|
|
7
7
|
id: zod_1.z.string(),
|
|
8
8
|
projectId: zod_1.z.string(),
|
|
9
9
|
presentationId: zod_1.z.string(),
|
|
10
10
|
title: zod_1.z.string(),
|
|
11
11
|
color: zod_1.z.string(),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end: zod_1.z.date(),
|
|
12
|
+
start: zod_utils_1.zodDate,
|
|
13
|
+
end: zod_utils_1.zodDate,
|
|
15
14
|
timezone: zod_1.z.string(),
|
|
16
|
-
useDeviceTime: zod_1.z.boolean(),
|
|
17
|
-
|
|
18
|
-
recurExpires: zod_1.z.date().nullable(),
|
|
19
|
-
recurInterval: zod_1.z.number().nullable(),
|
|
20
|
-
recurType: zod_1.z.string().nullable(),
|
|
15
|
+
useDeviceTime: zod_1.z.boolean().default(false),
|
|
16
|
+
priority: zod_1.z.boolean().default(false),
|
|
21
17
|
createdAt: zod_utils_1.zodDate,
|
|
22
18
|
updatedAt: zod_utils_1.zodDate,
|
|
23
19
|
});
|
|
20
|
+
exports.RecurSchedule = zod_1.z
|
|
21
|
+
.object({
|
|
22
|
+
recur: zod_1.z.literal(true),
|
|
23
|
+
recurExpires: zod_utils_1.zodDate,
|
|
24
|
+
recurInterval: zod_1.z.number(),
|
|
25
|
+
recurType: zod_1.z.string(),
|
|
26
|
+
})
|
|
27
|
+
.merge(exports.BaseSchedule);
|
|
28
|
+
exports.NonRecurSchedule = zod_1.z
|
|
29
|
+
.object({
|
|
30
|
+
recur: zod_1.z.literal(false),
|
|
31
|
+
recurExpires: zod_1.z.null(),
|
|
32
|
+
recurInterval: zod_1.z.null(),
|
|
33
|
+
recurType: zod_1.z.null(),
|
|
34
|
+
})
|
|
35
|
+
.merge(exports.BaseSchedule);
|
|
36
|
+
exports.Schedule = zod_1.z.discriminatedUnion('recur', [
|
|
37
|
+
exports.BaseSchedule.merge(exports.RecurSchedule),
|
|
38
|
+
exports.BaseSchedule.merge(exports.NonRecurSchedule),
|
|
39
|
+
]);
|
|
24
40
|
exports.CreateSchedule = zod_1.z.object({
|
|
25
41
|
projectId: zod_1.z.string(),
|
|
26
42
|
presentationId: zod_1.z.string(),
|
|
@@ -63,12 +79,12 @@ exports.CreateScheduleRequestBody = zod_1.z.object({
|
|
|
63
79
|
title: zod_1.z.string(),
|
|
64
80
|
color: zod_1.z.string(),
|
|
65
81
|
priority: zod_1.z.boolean(),
|
|
66
|
-
start: zod_utils_1.
|
|
67
|
-
end: zod_utils_1.
|
|
82
|
+
start: zod_utils_1.zodDate,
|
|
83
|
+
end: zod_utils_1.zodDate,
|
|
68
84
|
timezone: zod_1.z.string(),
|
|
69
85
|
useDeviceTime: zod_1.z.boolean(),
|
|
70
86
|
recur: zod_1.z.boolean().default(false),
|
|
71
|
-
recurExpires: zod_utils_1.
|
|
87
|
+
recurExpires: zod_utils_1.zodDate.nullable().default(null),
|
|
72
88
|
recurInterval: zod_1.z.number().nullable().default(null),
|
|
73
89
|
recurType: zod_1.z.string().nullable().default(null),
|
|
74
90
|
});
|
|
@@ -79,12 +95,12 @@ exports.UpdateScheduleRequestBody = zod_1.z.object({
|
|
|
79
95
|
title: zod_1.z.string().optional(),
|
|
80
96
|
color: zod_1.z.string().optional(),
|
|
81
97
|
priority: zod_1.z.boolean().optional(),
|
|
82
|
-
start: zod_utils_1.
|
|
83
|
-
end: zod_utils_1.
|
|
98
|
+
start: zod_utils_1.zodDate.optional(),
|
|
99
|
+
end: zod_utils_1.zodDate.optional(),
|
|
84
100
|
timezone: zod_1.z.string().optional(),
|
|
85
101
|
useDeviceTime: zod_1.z.boolean().optional(),
|
|
86
102
|
recur: zod_1.z.boolean().optional(),
|
|
87
|
-
recurExpires: zod_utils_1.
|
|
103
|
+
recurExpires: zod_utils_1.zodDate.nullable().optional(),
|
|
88
104
|
recurInterval: zod_1.z.number().nullable().optional(),
|
|
89
105
|
recurType: zod_1.z.string().nullable().optional(),
|
|
90
106
|
});
|