@chronary/schemas 0.1.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.
@@ -0,0 +1,1478 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const CreateAgentSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ type: z.ZodEnum<["ai", "human", "resource"]>;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ type: "ai" | "human" | "resource";
10
+ name: string;
11
+ description?: string | undefined;
12
+ metadata?: Record<string, unknown> | undefined;
13
+ }, {
14
+ type: "ai" | "human" | "resource";
15
+ name: string;
16
+ description?: string | undefined;
17
+ metadata?: Record<string, unknown> | undefined;
18
+ }>;
19
+ declare const UpdateAgentSchema: z.ZodEffects<z.ZodObject<{
20
+ name: z.ZodOptional<z.ZodString>;
21
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
23
+ status: z.ZodOptional<z.ZodEnum<["active", "paused"]>>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ status?: "active" | "paused" | undefined;
26
+ name?: string | undefined;
27
+ description?: string | null | undefined;
28
+ metadata?: Record<string, unknown> | undefined;
29
+ }, {
30
+ status?: "active" | "paused" | undefined;
31
+ name?: string | undefined;
32
+ description?: string | null | undefined;
33
+ metadata?: Record<string, unknown> | undefined;
34
+ }>, {
35
+ status?: "active" | "paused" | undefined;
36
+ name?: string | undefined;
37
+ description?: string | null | undefined;
38
+ metadata?: Record<string, unknown> | undefined;
39
+ }, {
40
+ status?: "active" | "paused" | undefined;
41
+ name?: string | undefined;
42
+ description?: string | null | undefined;
43
+ metadata?: Record<string, unknown> | undefined;
44
+ }>;
45
+ declare const ListAgentsQuerySchema: z.ZodObject<{
46
+ type: z.ZodOptional<z.ZodEnum<["ai", "human", "resource"]>>;
47
+ status: z.ZodOptional<z.ZodEnum<["active", "paused", "decommissioned"]>>;
48
+ limit: z.ZodDefault<z.ZodNumber>;
49
+ offset: z.ZodDefault<z.ZodNumber>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ limit: number;
52
+ offset: number;
53
+ type?: "ai" | "human" | "resource" | undefined;
54
+ status?: "active" | "paused" | "decommissioned" | undefined;
55
+ }, {
56
+ type?: "ai" | "human" | "resource" | undefined;
57
+ status?: "active" | "paused" | "decommissioned" | undefined;
58
+ limit?: number | undefined;
59
+ offset?: number | undefined;
60
+ }>;
61
+ declare const CreateCalendarSchema: z.ZodObject<{
62
+ name: z.ZodString;
63
+ timezone: z.ZodString;
64
+ agent_status: z.ZodOptional<z.ZodEnum<["idle", "working", "waiting", "error"]>>;
65
+ metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ name: string;
68
+ timezone: string;
69
+ metadata?: Record<string, unknown> | undefined;
70
+ agent_status?: "error" | "idle" | "working" | "waiting" | undefined;
71
+ }, {
72
+ name: string;
73
+ timezone: string;
74
+ metadata?: Record<string, unknown> | undefined;
75
+ agent_status?: "error" | "idle" | "working" | "waiting" | undefined;
76
+ }>;
77
+ declare const UpdateCalendarSchema: z.ZodEffects<z.ZodObject<{
78
+ name: z.ZodOptional<z.ZodString>;
79
+ timezone: z.ZodOptional<z.ZodString>;
80
+ agent_status: z.ZodOptional<z.ZodEnum<["idle", "working", "waiting", "error"]>>;
81
+ metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ name?: string | undefined;
84
+ metadata?: Record<string, unknown> | undefined;
85
+ timezone?: string | undefined;
86
+ agent_status?: "error" | "idle" | "working" | "waiting" | undefined;
87
+ }, {
88
+ name?: string | undefined;
89
+ metadata?: Record<string, unknown> | undefined;
90
+ timezone?: string | undefined;
91
+ agent_status?: "error" | "idle" | "working" | "waiting" | undefined;
92
+ }>, {
93
+ name?: string | undefined;
94
+ metadata?: Record<string, unknown> | undefined;
95
+ timezone?: string | undefined;
96
+ agent_status?: "error" | "idle" | "working" | "waiting" | undefined;
97
+ }, {
98
+ name?: string | undefined;
99
+ metadata?: Record<string, unknown> | undefined;
100
+ timezone?: string | undefined;
101
+ agent_status?: "error" | "idle" | "working" | "waiting" | undefined;
102
+ }>;
103
+ declare const ListCalendarsQuerySchema: z.ZodObject<{
104
+ include: z.ZodOptional<z.ZodEnum<["all"]>>;
105
+ limit: z.ZodDefault<z.ZodNumber>;
106
+ offset: z.ZodDefault<z.ZodNumber>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ limit: number;
109
+ offset: number;
110
+ include?: "all" | undefined;
111
+ }, {
112
+ limit?: number | undefined;
113
+ offset?: number | undefined;
114
+ include?: "all" | undefined;
115
+ }>;
116
+ declare const EVENT_STATUSES: readonly ["confirmed", "tentative", "cancelled", "hold"];
117
+ type EventStatus = (typeof EVENT_STATUSES)[number];
118
+ declare const CreateEventSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
119
+ title: z.ZodString;
120
+ start_time: z.ZodString;
121
+ end_time: z.ZodString;
122
+ description: z.ZodOptional<z.ZodString>;
123
+ all_day: z.ZodDefault<z.ZodBoolean>;
124
+ status: z.ZodDefault<z.ZodEnum<["confirmed", "tentative", "cancelled", "hold"]>>;
125
+ metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
126
+ hold_expires_at: z.ZodOptional<z.ZodString>;
127
+ hold_priority: z.ZodOptional<z.ZodNumber>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ status: "confirmed" | "tentative" | "cancelled" | "hold";
130
+ title: string;
131
+ start_time: string;
132
+ end_time: string;
133
+ all_day: boolean;
134
+ description?: string | undefined;
135
+ metadata?: Record<string, unknown> | undefined;
136
+ hold_expires_at?: string | undefined;
137
+ hold_priority?: number | undefined;
138
+ }, {
139
+ title: string;
140
+ start_time: string;
141
+ end_time: string;
142
+ status?: "confirmed" | "tentative" | "cancelled" | "hold" | undefined;
143
+ description?: string | undefined;
144
+ metadata?: Record<string, unknown> | undefined;
145
+ all_day?: boolean | undefined;
146
+ hold_expires_at?: string | undefined;
147
+ hold_priority?: number | undefined;
148
+ }>, {
149
+ status: "confirmed" | "tentative" | "cancelled" | "hold";
150
+ title: string;
151
+ start_time: string;
152
+ end_time: string;
153
+ all_day: boolean;
154
+ description?: string | undefined;
155
+ metadata?: Record<string, unknown> | undefined;
156
+ hold_expires_at?: string | undefined;
157
+ hold_priority?: number | undefined;
158
+ }, {
159
+ title: string;
160
+ start_time: string;
161
+ end_time: string;
162
+ status?: "confirmed" | "tentative" | "cancelled" | "hold" | undefined;
163
+ description?: string | undefined;
164
+ metadata?: Record<string, unknown> | undefined;
165
+ all_day?: boolean | undefined;
166
+ hold_expires_at?: string | undefined;
167
+ hold_priority?: number | undefined;
168
+ }>, {
169
+ status: "confirmed" | "tentative" | "cancelled" | "hold";
170
+ title: string;
171
+ start_time: string;
172
+ end_time: string;
173
+ all_day: boolean;
174
+ description?: string | undefined;
175
+ metadata?: Record<string, unknown> | undefined;
176
+ hold_expires_at?: string | undefined;
177
+ hold_priority?: number | undefined;
178
+ }, {
179
+ title: string;
180
+ start_time: string;
181
+ end_time: string;
182
+ status?: "confirmed" | "tentative" | "cancelled" | "hold" | undefined;
183
+ description?: string | undefined;
184
+ metadata?: Record<string, unknown> | undefined;
185
+ all_day?: boolean | undefined;
186
+ hold_expires_at?: string | undefined;
187
+ hold_priority?: number | undefined;
188
+ }>;
189
+ declare const UpdateEventSchema: z.ZodEffects<z.ZodObject<{
190
+ title: z.ZodOptional<z.ZodString>;
191
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ start_time: z.ZodOptional<z.ZodString>;
193
+ end_time: z.ZodOptional<z.ZodString>;
194
+ all_day: z.ZodOptional<z.ZodBoolean>;
195
+ status: z.ZodOptional<z.ZodEnum<["confirmed", "tentative", "cancelled"]>>;
196
+ metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ status?: "confirmed" | "tentative" | "cancelled" | undefined;
199
+ title?: string | undefined;
200
+ start_time?: string | undefined;
201
+ end_time?: string | undefined;
202
+ description?: string | null | undefined;
203
+ metadata?: Record<string, unknown> | undefined;
204
+ all_day?: boolean | undefined;
205
+ }, {
206
+ status?: "confirmed" | "tentative" | "cancelled" | undefined;
207
+ title?: string | undefined;
208
+ start_time?: string | undefined;
209
+ end_time?: string | undefined;
210
+ description?: string | null | undefined;
211
+ metadata?: Record<string, unknown> | undefined;
212
+ all_day?: boolean | undefined;
213
+ }>, {
214
+ status?: "confirmed" | "tentative" | "cancelled" | undefined;
215
+ title?: string | undefined;
216
+ start_time?: string | undefined;
217
+ end_time?: string | undefined;
218
+ description?: string | null | undefined;
219
+ metadata?: Record<string, unknown> | undefined;
220
+ all_day?: boolean | undefined;
221
+ }, {
222
+ status?: "confirmed" | "tentative" | "cancelled" | undefined;
223
+ title?: string | undefined;
224
+ start_time?: string | undefined;
225
+ end_time?: string | undefined;
226
+ description?: string | null | undefined;
227
+ metadata?: Record<string, unknown> | undefined;
228
+ all_day?: boolean | undefined;
229
+ }>;
230
+ declare const ListEventsQuerySchema: z.ZodObject<{
231
+ start_after: z.ZodOptional<z.ZodString>;
232
+ start_before: z.ZodOptional<z.ZodString>;
233
+ status: z.ZodOptional<z.ZodEnum<["confirmed", "tentative", "cancelled", "hold"]>>;
234
+ source: z.ZodOptional<z.ZodEnum<["internal", "external_ical"]>>;
235
+ limit: z.ZodDefault<z.ZodNumber>;
236
+ offset: z.ZodDefault<z.ZodNumber>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ limit: number;
239
+ offset: number;
240
+ status?: "confirmed" | "tentative" | "cancelled" | "hold" | undefined;
241
+ start_after?: string | undefined;
242
+ start_before?: string | undefined;
243
+ source?: "internal" | "external_ical" | undefined;
244
+ }, {
245
+ status?: "confirmed" | "tentative" | "cancelled" | "hold" | undefined;
246
+ limit?: number | undefined;
247
+ offset?: number | undefined;
248
+ start_after?: string | undefined;
249
+ start_before?: string | undefined;
250
+ source?: "internal" | "external_ical" | undefined;
251
+ }>;
252
+ declare const WorkingHoursSchema: z.ZodEffects<z.ZodObject<{
253
+ mon: z.ZodOptional<z.ZodEffects<z.ZodObject<{
254
+ start: z.ZodString;
255
+ end: z.ZodString;
256
+ }, "strip", z.ZodTypeAny, {
257
+ start: string;
258
+ end: string;
259
+ }, {
260
+ start: string;
261
+ end: string;
262
+ }>, {
263
+ start: string;
264
+ end: string;
265
+ }, {
266
+ start: string;
267
+ end: string;
268
+ }>>;
269
+ tue: z.ZodOptional<z.ZodEffects<z.ZodObject<{
270
+ start: z.ZodString;
271
+ end: z.ZodString;
272
+ }, "strip", z.ZodTypeAny, {
273
+ start: string;
274
+ end: string;
275
+ }, {
276
+ start: string;
277
+ end: string;
278
+ }>, {
279
+ start: string;
280
+ end: string;
281
+ }, {
282
+ start: string;
283
+ end: string;
284
+ }>>;
285
+ wed: z.ZodOptional<z.ZodEffects<z.ZodObject<{
286
+ start: z.ZodString;
287
+ end: z.ZodString;
288
+ }, "strip", z.ZodTypeAny, {
289
+ start: string;
290
+ end: string;
291
+ }, {
292
+ start: string;
293
+ end: string;
294
+ }>, {
295
+ start: string;
296
+ end: string;
297
+ }, {
298
+ start: string;
299
+ end: string;
300
+ }>>;
301
+ thu: z.ZodOptional<z.ZodEffects<z.ZodObject<{
302
+ start: z.ZodString;
303
+ end: z.ZodString;
304
+ }, "strip", z.ZodTypeAny, {
305
+ start: string;
306
+ end: string;
307
+ }, {
308
+ start: string;
309
+ end: string;
310
+ }>, {
311
+ start: string;
312
+ end: string;
313
+ }, {
314
+ start: string;
315
+ end: string;
316
+ }>>;
317
+ fri: z.ZodOptional<z.ZodEffects<z.ZodObject<{
318
+ start: z.ZodString;
319
+ end: z.ZodString;
320
+ }, "strip", z.ZodTypeAny, {
321
+ start: string;
322
+ end: string;
323
+ }, {
324
+ start: string;
325
+ end: string;
326
+ }>, {
327
+ start: string;
328
+ end: string;
329
+ }, {
330
+ start: string;
331
+ end: string;
332
+ }>>;
333
+ sat: z.ZodOptional<z.ZodEffects<z.ZodObject<{
334
+ start: z.ZodString;
335
+ end: z.ZodString;
336
+ }, "strip", z.ZodTypeAny, {
337
+ start: string;
338
+ end: string;
339
+ }, {
340
+ start: string;
341
+ end: string;
342
+ }>, {
343
+ start: string;
344
+ end: string;
345
+ }, {
346
+ start: string;
347
+ end: string;
348
+ }>>;
349
+ sun: z.ZodOptional<z.ZodEffects<z.ZodObject<{
350
+ start: z.ZodString;
351
+ end: z.ZodString;
352
+ }, "strip", z.ZodTypeAny, {
353
+ start: string;
354
+ end: string;
355
+ }, {
356
+ start: string;
357
+ end: string;
358
+ }>, {
359
+ start: string;
360
+ end: string;
361
+ }, {
362
+ start: string;
363
+ end: string;
364
+ }>>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ mon?: {
367
+ start: string;
368
+ end: string;
369
+ } | undefined;
370
+ tue?: {
371
+ start: string;
372
+ end: string;
373
+ } | undefined;
374
+ wed?: {
375
+ start: string;
376
+ end: string;
377
+ } | undefined;
378
+ thu?: {
379
+ start: string;
380
+ end: string;
381
+ } | undefined;
382
+ fri?: {
383
+ start: string;
384
+ end: string;
385
+ } | undefined;
386
+ sat?: {
387
+ start: string;
388
+ end: string;
389
+ } | undefined;
390
+ sun?: {
391
+ start: string;
392
+ end: string;
393
+ } | undefined;
394
+ }, {
395
+ mon?: {
396
+ start: string;
397
+ end: string;
398
+ } | undefined;
399
+ tue?: {
400
+ start: string;
401
+ end: string;
402
+ } | undefined;
403
+ wed?: {
404
+ start: string;
405
+ end: string;
406
+ } | undefined;
407
+ thu?: {
408
+ start: string;
409
+ end: string;
410
+ } | undefined;
411
+ fri?: {
412
+ start: string;
413
+ end: string;
414
+ } | undefined;
415
+ sat?: {
416
+ start: string;
417
+ end: string;
418
+ } | undefined;
419
+ sun?: {
420
+ start: string;
421
+ end: string;
422
+ } | undefined;
423
+ }>, {
424
+ mon?: {
425
+ start: string;
426
+ end: string;
427
+ } | undefined;
428
+ tue?: {
429
+ start: string;
430
+ end: string;
431
+ } | undefined;
432
+ wed?: {
433
+ start: string;
434
+ end: string;
435
+ } | undefined;
436
+ thu?: {
437
+ start: string;
438
+ end: string;
439
+ } | undefined;
440
+ fri?: {
441
+ start: string;
442
+ end: string;
443
+ } | undefined;
444
+ sat?: {
445
+ start: string;
446
+ end: string;
447
+ } | undefined;
448
+ sun?: {
449
+ start: string;
450
+ end: string;
451
+ } | undefined;
452
+ }, {
453
+ mon?: {
454
+ start: string;
455
+ end: string;
456
+ } | undefined;
457
+ tue?: {
458
+ start: string;
459
+ end: string;
460
+ } | undefined;
461
+ wed?: {
462
+ start: string;
463
+ end: string;
464
+ } | undefined;
465
+ thu?: {
466
+ start: string;
467
+ end: string;
468
+ } | undefined;
469
+ fri?: {
470
+ start: string;
471
+ end: string;
472
+ } | undefined;
473
+ sat?: {
474
+ start: string;
475
+ end: string;
476
+ } | undefined;
477
+ sun?: {
478
+ start: string;
479
+ end: string;
480
+ } | undefined;
481
+ }>;
482
+ declare const UpdateAvailabilityRulesSchema: z.ZodObject<{
483
+ buffer_before_minutes: z.ZodDefault<z.ZodNumber>;
484
+ buffer_after_minutes: z.ZodDefault<z.ZodNumber>;
485
+ working_hours: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
486
+ mon: z.ZodOptional<z.ZodEffects<z.ZodObject<{
487
+ start: z.ZodString;
488
+ end: z.ZodString;
489
+ }, "strip", z.ZodTypeAny, {
490
+ start: string;
491
+ end: string;
492
+ }, {
493
+ start: string;
494
+ end: string;
495
+ }>, {
496
+ start: string;
497
+ end: string;
498
+ }, {
499
+ start: string;
500
+ end: string;
501
+ }>>;
502
+ tue: z.ZodOptional<z.ZodEffects<z.ZodObject<{
503
+ start: z.ZodString;
504
+ end: z.ZodString;
505
+ }, "strip", z.ZodTypeAny, {
506
+ start: string;
507
+ end: string;
508
+ }, {
509
+ start: string;
510
+ end: string;
511
+ }>, {
512
+ start: string;
513
+ end: string;
514
+ }, {
515
+ start: string;
516
+ end: string;
517
+ }>>;
518
+ wed: z.ZodOptional<z.ZodEffects<z.ZodObject<{
519
+ start: z.ZodString;
520
+ end: z.ZodString;
521
+ }, "strip", z.ZodTypeAny, {
522
+ start: string;
523
+ end: string;
524
+ }, {
525
+ start: string;
526
+ end: string;
527
+ }>, {
528
+ start: string;
529
+ end: string;
530
+ }, {
531
+ start: string;
532
+ end: string;
533
+ }>>;
534
+ thu: z.ZodOptional<z.ZodEffects<z.ZodObject<{
535
+ start: z.ZodString;
536
+ end: z.ZodString;
537
+ }, "strip", z.ZodTypeAny, {
538
+ start: string;
539
+ end: string;
540
+ }, {
541
+ start: string;
542
+ end: string;
543
+ }>, {
544
+ start: string;
545
+ end: string;
546
+ }, {
547
+ start: string;
548
+ end: string;
549
+ }>>;
550
+ fri: z.ZodOptional<z.ZodEffects<z.ZodObject<{
551
+ start: z.ZodString;
552
+ end: z.ZodString;
553
+ }, "strip", z.ZodTypeAny, {
554
+ start: string;
555
+ end: string;
556
+ }, {
557
+ start: string;
558
+ end: string;
559
+ }>, {
560
+ start: string;
561
+ end: string;
562
+ }, {
563
+ start: string;
564
+ end: string;
565
+ }>>;
566
+ sat: z.ZodOptional<z.ZodEffects<z.ZodObject<{
567
+ start: z.ZodString;
568
+ end: z.ZodString;
569
+ }, "strip", z.ZodTypeAny, {
570
+ start: string;
571
+ end: string;
572
+ }, {
573
+ start: string;
574
+ end: string;
575
+ }>, {
576
+ start: string;
577
+ end: string;
578
+ }, {
579
+ start: string;
580
+ end: string;
581
+ }>>;
582
+ sun: z.ZodOptional<z.ZodEffects<z.ZodObject<{
583
+ start: z.ZodString;
584
+ end: z.ZodString;
585
+ }, "strip", z.ZodTypeAny, {
586
+ start: string;
587
+ end: string;
588
+ }, {
589
+ start: string;
590
+ end: string;
591
+ }>, {
592
+ start: string;
593
+ end: string;
594
+ }, {
595
+ start: string;
596
+ end: string;
597
+ }>>;
598
+ }, "strip", z.ZodTypeAny, {
599
+ mon?: {
600
+ start: string;
601
+ end: string;
602
+ } | undefined;
603
+ tue?: {
604
+ start: string;
605
+ end: string;
606
+ } | undefined;
607
+ wed?: {
608
+ start: string;
609
+ end: string;
610
+ } | undefined;
611
+ thu?: {
612
+ start: string;
613
+ end: string;
614
+ } | undefined;
615
+ fri?: {
616
+ start: string;
617
+ end: string;
618
+ } | undefined;
619
+ sat?: {
620
+ start: string;
621
+ end: string;
622
+ } | undefined;
623
+ sun?: {
624
+ start: string;
625
+ end: string;
626
+ } | undefined;
627
+ }, {
628
+ mon?: {
629
+ start: string;
630
+ end: string;
631
+ } | undefined;
632
+ tue?: {
633
+ start: string;
634
+ end: string;
635
+ } | undefined;
636
+ wed?: {
637
+ start: string;
638
+ end: string;
639
+ } | undefined;
640
+ thu?: {
641
+ start: string;
642
+ end: string;
643
+ } | undefined;
644
+ fri?: {
645
+ start: string;
646
+ end: string;
647
+ } | undefined;
648
+ sat?: {
649
+ start: string;
650
+ end: string;
651
+ } | undefined;
652
+ sun?: {
653
+ start: string;
654
+ end: string;
655
+ } | undefined;
656
+ }>, {
657
+ mon?: {
658
+ start: string;
659
+ end: string;
660
+ } | undefined;
661
+ tue?: {
662
+ start: string;
663
+ end: string;
664
+ } | undefined;
665
+ wed?: {
666
+ start: string;
667
+ end: string;
668
+ } | undefined;
669
+ thu?: {
670
+ start: string;
671
+ end: string;
672
+ } | undefined;
673
+ fri?: {
674
+ start: string;
675
+ end: string;
676
+ } | undefined;
677
+ sat?: {
678
+ start: string;
679
+ end: string;
680
+ } | undefined;
681
+ sun?: {
682
+ start: string;
683
+ end: string;
684
+ } | undefined;
685
+ }, {
686
+ mon?: {
687
+ start: string;
688
+ end: string;
689
+ } | undefined;
690
+ tue?: {
691
+ start: string;
692
+ end: string;
693
+ } | undefined;
694
+ wed?: {
695
+ start: string;
696
+ end: string;
697
+ } | undefined;
698
+ thu?: {
699
+ start: string;
700
+ end: string;
701
+ } | undefined;
702
+ fri?: {
703
+ start: string;
704
+ end: string;
705
+ } | undefined;
706
+ sat?: {
707
+ start: string;
708
+ end: string;
709
+ } | undefined;
710
+ sun?: {
711
+ start: string;
712
+ end: string;
713
+ } | undefined;
714
+ }>>>;
715
+ timezone: z.ZodDefault<z.ZodString>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ timezone: string;
718
+ buffer_before_minutes: number;
719
+ buffer_after_minutes: number;
720
+ working_hours: {
721
+ mon?: {
722
+ start: string;
723
+ end: string;
724
+ } | undefined;
725
+ tue?: {
726
+ start: string;
727
+ end: string;
728
+ } | undefined;
729
+ wed?: {
730
+ start: string;
731
+ end: string;
732
+ } | undefined;
733
+ thu?: {
734
+ start: string;
735
+ end: string;
736
+ } | undefined;
737
+ fri?: {
738
+ start: string;
739
+ end: string;
740
+ } | undefined;
741
+ sat?: {
742
+ start: string;
743
+ end: string;
744
+ } | undefined;
745
+ sun?: {
746
+ start: string;
747
+ end: string;
748
+ } | undefined;
749
+ } | null;
750
+ }, {
751
+ timezone?: string | undefined;
752
+ buffer_before_minutes?: number | undefined;
753
+ buffer_after_minutes?: number | undefined;
754
+ working_hours?: {
755
+ mon?: {
756
+ start: string;
757
+ end: string;
758
+ } | undefined;
759
+ tue?: {
760
+ start: string;
761
+ end: string;
762
+ } | undefined;
763
+ wed?: {
764
+ start: string;
765
+ end: string;
766
+ } | undefined;
767
+ thu?: {
768
+ start: string;
769
+ end: string;
770
+ } | undefined;
771
+ fri?: {
772
+ start: string;
773
+ end: string;
774
+ } | undefined;
775
+ sat?: {
776
+ start: string;
777
+ end: string;
778
+ } | undefined;
779
+ sun?: {
780
+ start: string;
781
+ end: string;
782
+ } | undefined;
783
+ } | null | undefined;
784
+ }>;
785
+ declare const AvailabilityQuerySchema: z.ZodEffects<z.ZodObject<{
786
+ start: z.ZodString;
787
+ end: z.ZodString;
788
+ slot_duration: z.ZodDefault<z.ZodEnum<["15m", "30m", "45m", "1h", "2h"]>>;
789
+ include_busy: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "true" | "false" | undefined>;
790
+ }, "strip", z.ZodTypeAny, {
791
+ start: string;
792
+ end: string;
793
+ slot_duration: "15m" | "30m" | "45m" | "1h" | "2h";
794
+ include_busy: boolean;
795
+ }, {
796
+ start: string;
797
+ end: string;
798
+ slot_duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
799
+ include_busy?: "true" | "false" | undefined;
800
+ }>, {
801
+ start: string;
802
+ end: string;
803
+ slot_duration: "15m" | "30m" | "45m" | "1h" | "2h";
804
+ include_busy: boolean;
805
+ }, {
806
+ start: string;
807
+ end: string;
808
+ slot_duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
809
+ include_busy?: "true" | "false" | undefined;
810
+ }>;
811
+ declare const CrossAgentAvailabilityQuerySchema: z.ZodEffects<z.ZodObject<{
812
+ agents: z.ZodEffects<z.ZodString, string[], string>;
813
+ start: z.ZodString;
814
+ end: z.ZodString;
815
+ slot_duration: z.ZodDefault<z.ZodEnum<["15m", "30m", "45m", "1h", "2h"]>>;
816
+ calendars: z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>;
817
+ include_busy: z.ZodEffects<z.ZodDefault<z.ZodEnum<["true", "false"]>>, boolean, "true" | "false" | undefined>;
818
+ }, "strip", z.ZodTypeAny, {
819
+ start: string;
820
+ end: string;
821
+ slot_duration: "15m" | "30m" | "45m" | "1h" | "2h";
822
+ include_busy: boolean;
823
+ agents: string[];
824
+ calendars?: string[] | undefined;
825
+ }, {
826
+ start: string;
827
+ end: string;
828
+ agents: string;
829
+ slot_duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
830
+ include_busy?: "true" | "false" | undefined;
831
+ calendars?: string | undefined;
832
+ }>, {
833
+ start: string;
834
+ end: string;
835
+ slot_duration: "15m" | "30m" | "45m" | "1h" | "2h";
836
+ include_busy: boolean;
837
+ agents: string[];
838
+ calendars?: string[] | undefined;
839
+ }, {
840
+ start: string;
841
+ end: string;
842
+ agents: string;
843
+ slot_duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
844
+ include_busy?: "true" | "false" | undefined;
845
+ calendars?: string | undefined;
846
+ }>;
847
+ declare const WEBHOOK_EVENT_TYPES: readonly ["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated"];
848
+ type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
849
+ declare const CreateWebhookSchema: z.ZodObject<{
850
+ url: z.ZodString;
851
+ events: z.ZodArray<z.ZodEnum<["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated"]>, "many">;
852
+ }, "strip", z.ZodTypeAny, {
853
+ url: string;
854
+ events: ("agent.created" | "agent.updated" | "event.created" | "event.updated" | "event.deleted" | "event.started" | "event.ended" | "event.hold_created" | "event.hold_expired" | "event.hold_released" | "event.hold_confirmed" | "proposal.created" | "proposal.responded" | "proposal.confirmed" | "proposal.expired" | "proposal.cancelled" | "webhook.deactivated")[];
855
+ }, {
856
+ url: string;
857
+ events: ("agent.created" | "agent.updated" | "event.created" | "event.updated" | "event.deleted" | "event.started" | "event.ended" | "event.hold_created" | "event.hold_expired" | "event.hold_released" | "event.hold_confirmed" | "proposal.created" | "proposal.responded" | "proposal.confirmed" | "proposal.expired" | "proposal.cancelled" | "webhook.deactivated")[];
858
+ }>;
859
+ declare const UpdateWebhookSchema: z.ZodObject<{
860
+ url: z.ZodOptional<z.ZodString>;
861
+ events: z.ZodOptional<z.ZodArray<z.ZodEnum<["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated"]>, "many">>;
862
+ active: z.ZodOptional<z.ZodBoolean>;
863
+ }, "strip", z.ZodTypeAny, {
864
+ url?: string | undefined;
865
+ active?: boolean | undefined;
866
+ events?: ("agent.created" | "agent.updated" | "event.created" | "event.updated" | "event.deleted" | "event.started" | "event.ended" | "event.hold_created" | "event.hold_expired" | "event.hold_released" | "event.hold_confirmed" | "proposal.created" | "proposal.responded" | "proposal.confirmed" | "proposal.expired" | "proposal.cancelled" | "webhook.deactivated")[] | undefined;
867
+ }, {
868
+ url?: string | undefined;
869
+ active?: boolean | undefined;
870
+ events?: ("agent.created" | "agent.updated" | "event.created" | "event.updated" | "event.deleted" | "event.started" | "event.ended" | "event.hold_created" | "event.hold_expired" | "event.hold_released" | "event.hold_confirmed" | "proposal.created" | "proposal.responded" | "proposal.confirmed" | "proposal.expired" | "proposal.cancelled" | "webhook.deactivated")[] | undefined;
871
+ }>;
872
+ declare const ListWebhooksQuerySchema: z.ZodObject<{
873
+ limit: z.ZodDefault<z.ZodNumber>;
874
+ offset: z.ZodDefault<z.ZodNumber>;
875
+ }, "strip", z.ZodTypeAny, {
876
+ limit: number;
877
+ offset: number;
878
+ }, {
879
+ limit?: number | undefined;
880
+ offset?: number | undefined;
881
+ }>;
882
+ declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed"];
883
+ declare const WebhookDeliveryStatusSchema: z.ZodEnum<["pending", "delivered", "failed"]>;
884
+ declare const ListDeliveriesQuerySchema: z.ZodObject<{
885
+ limit: z.ZodDefault<z.ZodNumber>;
886
+ offset: z.ZodDefault<z.ZodNumber>;
887
+ status: z.ZodOptional<z.ZodEnum<["pending", "delivered", "failed"]>>;
888
+ include_payload: z.ZodEffects<z.ZodOptional<z.ZodEnum<["true", "false"]>>, boolean, "true" | "false" | undefined>;
889
+ }, "strip", z.ZodTypeAny, {
890
+ limit: number;
891
+ offset: number;
892
+ include_payload: boolean;
893
+ status?: "pending" | "delivered" | "failed" | undefined;
894
+ }, {
895
+ status?: "pending" | "delivered" | "failed" | undefined;
896
+ limit?: number | undefined;
897
+ offset?: number | undefined;
898
+ include_payload?: "true" | "false" | undefined;
899
+ }>;
900
+ declare const CreateICalSubscriptionSchema: z.ZodObject<{
901
+ calendar_id: z.ZodString;
902
+ url: z.ZodString;
903
+ label: z.ZodOptional<z.ZodString>;
904
+ }, "strip", z.ZodTypeAny, {
905
+ calendar_id: string;
906
+ url: string;
907
+ label?: string | undefined;
908
+ }, {
909
+ calendar_id: string;
910
+ url: string;
911
+ label?: string | undefined;
912
+ }>;
913
+ declare const UpdateICalSubscriptionSchema: z.ZodEffects<z.ZodObject<{
914
+ label: z.ZodOptional<z.ZodString>;
915
+ url: z.ZodOptional<z.ZodString>;
916
+ }, "strip", z.ZodTypeAny, {
917
+ url?: string | undefined;
918
+ label?: string | undefined;
919
+ }, {
920
+ url?: string | undefined;
921
+ label?: string | undefined;
922
+ }>, {
923
+ url?: string | undefined;
924
+ label?: string | undefined;
925
+ }, {
926
+ url?: string | undefined;
927
+ label?: string | undefined;
928
+ }>;
929
+ declare const ListICalSubscriptionsQuerySchema: z.ZodObject<{
930
+ status: z.ZodOptional<z.ZodEnum<["active", "error", "paused"]>>;
931
+ limit: z.ZodDefault<z.ZodNumber>;
932
+ offset: z.ZodDefault<z.ZodNumber>;
933
+ }, "strip", z.ZodTypeAny, {
934
+ limit: number;
935
+ offset: number;
936
+ status?: "error" | "active" | "paused" | undefined;
937
+ }, {
938
+ status?: "error" | "active" | "paused" | undefined;
939
+ limit?: number | undefined;
940
+ offset?: number | undefined;
941
+ }>;
942
+ declare const CreateProposalSchema: z.ZodObject<{
943
+ title: z.ZodString;
944
+ description: z.ZodOptional<z.ZodString>;
945
+ organizer_agent_id: z.ZodString;
946
+ participant_agent_ids: z.ZodArray<z.ZodString, "many">;
947
+ calendar_id: z.ZodString;
948
+ slots: z.ZodArray<z.ZodObject<{
949
+ start_time: z.ZodString;
950
+ end_time: z.ZodString;
951
+ weight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
952
+ calendar_id: z.ZodOptional<z.ZodString>;
953
+ }, "strip", z.ZodTypeAny, {
954
+ start_time: string;
955
+ end_time: string;
956
+ calendar_id?: string | undefined;
957
+ weight?: number | undefined;
958
+ }, {
959
+ start_time: string;
960
+ end_time: string;
961
+ calendar_id?: string | undefined;
962
+ weight?: number | undefined;
963
+ }>, "many">;
964
+ expires_at: z.ZodOptional<z.ZodString>;
965
+ metadata: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>>;
966
+ }, "strip", z.ZodTypeAny, {
967
+ calendar_id: string;
968
+ title: string;
969
+ metadata: Record<string, unknown>;
970
+ organizer_agent_id: string;
971
+ participant_agent_ids: string[];
972
+ slots: {
973
+ start_time: string;
974
+ end_time: string;
975
+ calendar_id?: string | undefined;
976
+ weight?: number | undefined;
977
+ }[];
978
+ description?: string | undefined;
979
+ expires_at?: string | undefined;
980
+ }, {
981
+ calendar_id: string;
982
+ title: string;
983
+ organizer_agent_id: string;
984
+ participant_agent_ids: string[];
985
+ slots: {
986
+ start_time: string;
987
+ end_time: string;
988
+ calendar_id?: string | undefined;
989
+ weight?: number | undefined;
990
+ }[];
991
+ description?: string | undefined;
992
+ metadata?: Record<string, unknown> | undefined;
993
+ expires_at?: string | undefined;
994
+ }>;
995
+ declare const RespondToProposalSchema: z.ZodEffects<z.ZodObject<{
996
+ agent_id: z.ZodString;
997
+ response: z.ZodEnum<["accept", "decline", "counter"]>;
998
+ selected_slot_id: z.ZodOptional<z.ZodString>;
999
+ counter_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
1000
+ start_time: z.ZodString;
1001
+ end_time: z.ZodString;
1002
+ weight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1003
+ calendar_id: z.ZodOptional<z.ZodString>;
1004
+ }, "strip", z.ZodTypeAny, {
1005
+ start_time: string;
1006
+ end_time: string;
1007
+ calendar_id?: string | undefined;
1008
+ weight?: number | undefined;
1009
+ }, {
1010
+ start_time: string;
1011
+ end_time: string;
1012
+ calendar_id?: string | undefined;
1013
+ weight?: number | undefined;
1014
+ }>, "many">>;
1015
+ message: z.ZodOptional<z.ZodString>;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ agent_id: string;
1018
+ response: "accept" | "decline" | "counter";
1019
+ message?: string | undefined;
1020
+ selected_slot_id?: string | undefined;
1021
+ counter_slots?: {
1022
+ start_time: string;
1023
+ end_time: string;
1024
+ calendar_id?: string | undefined;
1025
+ weight?: number | undefined;
1026
+ }[] | undefined;
1027
+ }, {
1028
+ agent_id: string;
1029
+ response: "accept" | "decline" | "counter";
1030
+ message?: string | undefined;
1031
+ selected_slot_id?: string | undefined;
1032
+ counter_slots?: {
1033
+ start_time: string;
1034
+ end_time: string;
1035
+ calendar_id?: string | undefined;
1036
+ weight?: number | undefined;
1037
+ }[] | undefined;
1038
+ }>, {
1039
+ agent_id: string;
1040
+ response: "accept" | "decline" | "counter";
1041
+ message?: string | undefined;
1042
+ selected_slot_id?: string | undefined;
1043
+ counter_slots?: {
1044
+ start_time: string;
1045
+ end_time: string;
1046
+ calendar_id?: string | undefined;
1047
+ weight?: number | undefined;
1048
+ }[] | undefined;
1049
+ }, {
1050
+ agent_id: string;
1051
+ response: "accept" | "decline" | "counter";
1052
+ message?: string | undefined;
1053
+ selected_slot_id?: string | undefined;
1054
+ counter_slots?: {
1055
+ start_time: string;
1056
+ end_time: string;
1057
+ calendar_id?: string | undefined;
1058
+ weight?: number | undefined;
1059
+ }[] | undefined;
1060
+ }>;
1061
+ type CreateAgentInput = z.infer<typeof CreateAgentSchema>;
1062
+ type UpdateAgentInput = z.infer<typeof UpdateAgentSchema>;
1063
+ type ListAgentsQuery = z.infer<typeof ListAgentsQuerySchema>;
1064
+ type CreateCalendarInput = z.infer<typeof CreateCalendarSchema>;
1065
+ type UpdateCalendarInput = z.infer<typeof UpdateCalendarSchema>;
1066
+ type ListCalendarsQuery = z.infer<typeof ListCalendarsQuerySchema>;
1067
+ type CreateEventInput = z.infer<typeof CreateEventSchema>;
1068
+ type UpdateEventInput = z.infer<typeof UpdateEventSchema>;
1069
+ type ListEventsQuery = z.infer<typeof ListEventsQuerySchema>;
1070
+ type WorkingHours = z.infer<typeof WorkingHoursSchema>;
1071
+ type UpdateAvailabilityRules = z.infer<typeof UpdateAvailabilityRulesSchema>;
1072
+ type AvailabilityQuery = z.infer<typeof AvailabilityQuerySchema>;
1073
+ type CrossAgentAvailabilityQuery = z.infer<typeof CrossAgentAvailabilityQuerySchema>;
1074
+ type CreateWebhookInput = z.infer<typeof CreateWebhookSchema>;
1075
+ type UpdateWebhookInput = z.infer<typeof UpdateWebhookSchema>;
1076
+ type ListWebhooksQuery = z.infer<typeof ListWebhooksQuerySchema>;
1077
+ type ListDeliveriesQuery = z.infer<typeof ListDeliveriesQuerySchema>;
1078
+ type WebhookDeliveryStatus = z.infer<typeof WebhookDeliveryStatusSchema>;
1079
+ type CreateICalSubscriptionInput = z.infer<typeof CreateICalSubscriptionSchema>;
1080
+ type UpdateICalSubscriptionInput = z.infer<typeof UpdateICalSubscriptionSchema>;
1081
+ type ListICalSubscriptionsQuery = z.infer<typeof ListICalSubscriptionsQuerySchema>;
1082
+ type CreateProposalInput = z.infer<typeof CreateProposalSchema>;
1083
+ type RespondToProposalInput = z.infer<typeof RespondToProposalSchema>;
1084
+
1085
+ /**
1086
+ * Webhook event payload schemas and discriminator.
1087
+ *
1088
+ * The Chronary webhook wire format puts the event type in the
1089
+ * `X-Chronary-Event-Type` header and a raw payload object in the body.
1090
+ * Use {@link parseWebhookEvent} to combine the two into a typed,
1091
+ * discriminated object.
1092
+ */
1093
+
1094
+ declare const AgentCreatedPayloadSchema: z.ZodObject<{
1095
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1096
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1097
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1098
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1099
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1100
+ }, z.ZodTypeAny, "passthrough">>;
1101
+ declare const AgentUpdatedPayloadSchema: z.ZodObject<{
1102
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1103
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1104
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1105
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1106
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1107
+ }, z.ZodTypeAny, "passthrough">>;
1108
+ declare const EventCreatedPayloadSchema: z.ZodObject<{
1109
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1110
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1111
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1112
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1113
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1114
+ }, z.ZodTypeAny, "passthrough">>;
1115
+ declare const EventUpdatedPayloadSchema: z.ZodObject<{
1116
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1117
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1118
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1119
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1120
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1121
+ }, z.ZodTypeAny, "passthrough">>;
1122
+ declare const EventDeletedPayloadSchema: z.ZodObject<{
1123
+ event_id: z.ZodString;
1124
+ calendar_id: z.ZodString;
1125
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1126
+ event_id: z.ZodString;
1127
+ calendar_id: z.ZodString;
1128
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1129
+ event_id: z.ZodString;
1130
+ calendar_id: z.ZodString;
1131
+ }, z.ZodTypeAny, "passthrough">>;
1132
+ declare const EventHoldCreatedPayloadSchema: z.ZodObject<{
1133
+ event_id: z.ZodString;
1134
+ calendar_id: z.ZodString;
1135
+ title: z.ZodString;
1136
+ start_time: z.ZodString;
1137
+ end_time: z.ZodString;
1138
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1139
+ event_id: z.ZodString;
1140
+ calendar_id: z.ZodString;
1141
+ title: z.ZodString;
1142
+ start_time: z.ZodString;
1143
+ end_time: z.ZodString;
1144
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1145
+ event_id: z.ZodString;
1146
+ calendar_id: z.ZodString;
1147
+ title: z.ZodString;
1148
+ start_time: z.ZodString;
1149
+ end_time: z.ZodString;
1150
+ }, z.ZodTypeAny, "passthrough">>;
1151
+ declare const EventStartedPayloadSchema: z.ZodObject<{
1152
+ event_id: z.ZodString;
1153
+ calendar_id: z.ZodString;
1154
+ title: z.ZodString;
1155
+ start_time: z.ZodString;
1156
+ end_time: z.ZodString;
1157
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1158
+ event_id: z.ZodString;
1159
+ calendar_id: z.ZodString;
1160
+ title: z.ZodString;
1161
+ start_time: z.ZodString;
1162
+ end_time: z.ZodString;
1163
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1164
+ event_id: z.ZodString;
1165
+ calendar_id: z.ZodString;
1166
+ title: z.ZodString;
1167
+ start_time: z.ZodString;
1168
+ end_time: z.ZodString;
1169
+ }, z.ZodTypeAny, "passthrough">>;
1170
+ declare const EventEndedPayloadSchema: z.ZodObject<{
1171
+ event_id: z.ZodString;
1172
+ calendar_id: z.ZodString;
1173
+ title: z.ZodString;
1174
+ start_time: z.ZodString;
1175
+ end_time: z.ZodString;
1176
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1177
+ event_id: z.ZodString;
1178
+ calendar_id: z.ZodString;
1179
+ title: z.ZodString;
1180
+ start_time: z.ZodString;
1181
+ end_time: z.ZodString;
1182
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1183
+ event_id: z.ZodString;
1184
+ calendar_id: z.ZodString;
1185
+ title: z.ZodString;
1186
+ start_time: z.ZodString;
1187
+ end_time: z.ZodString;
1188
+ }, z.ZodTypeAny, "passthrough">>;
1189
+ declare const EventHoldExpiredPayloadSchema: z.ZodObject<{
1190
+ event_id: z.ZodString;
1191
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1192
+ event_id: z.ZodString;
1193
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1194
+ event_id: z.ZodString;
1195
+ }, z.ZodTypeAny, "passthrough">>;
1196
+ declare const EventHoldReleasedPayloadSchema: z.ZodObject<{
1197
+ event_id: z.ZodString;
1198
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1199
+ event_id: z.ZodString;
1200
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1201
+ event_id: z.ZodString;
1202
+ }, z.ZodTypeAny, "passthrough">>;
1203
+ declare const EventHoldConfirmedPayloadSchema: z.ZodObject<{
1204
+ event_id: z.ZodString;
1205
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1206
+ event_id: z.ZodString;
1207
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1208
+ event_id: z.ZodString;
1209
+ }, z.ZodTypeAny, "passthrough">>;
1210
+ declare const ProposalCreatedPayloadSchema: z.ZodObject<{
1211
+ proposal: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1212
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1213
+ proposal: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1214
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1215
+ proposal: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1216
+ }, z.ZodTypeAny, "passthrough">>;
1217
+ declare const ProposalRespondedPayloadSchema: z.ZodObject<{
1218
+ proposal_id: z.ZodString;
1219
+ agent_id: z.ZodString;
1220
+ response: z.ZodString;
1221
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1222
+ proposal_id: z.ZodString;
1223
+ agent_id: z.ZodString;
1224
+ response: z.ZodString;
1225
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1226
+ proposal_id: z.ZodString;
1227
+ agent_id: z.ZodString;
1228
+ response: z.ZodString;
1229
+ }, z.ZodTypeAny, "passthrough">>;
1230
+ declare const ProposalConfirmedPayloadSchema: z.ZodObject<{
1231
+ proposal_id: z.ZodString;
1232
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1233
+ proposal_id: z.ZodString;
1234
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1235
+ proposal_id: z.ZodString;
1236
+ }, z.ZodTypeAny, "passthrough">>;
1237
+ declare const ProposalCancelledPayloadSchema: z.ZodObject<{
1238
+ proposal_id: z.ZodString;
1239
+ reason: z.ZodOptional<z.ZodString>;
1240
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1241
+ proposal_id: z.ZodString;
1242
+ reason: z.ZodOptional<z.ZodString>;
1243
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1244
+ proposal_id: z.ZodString;
1245
+ reason: z.ZodOptional<z.ZodString>;
1246
+ }, z.ZodTypeAny, "passthrough">>;
1247
+ declare const ProposalExpiredPayloadSchema: z.ZodObject<{
1248
+ proposal_id: z.ZodString;
1249
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1250
+ proposal_id: z.ZodString;
1251
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1252
+ proposal_id: z.ZodString;
1253
+ }, z.ZodTypeAny, "passthrough">>;
1254
+ declare const WebhookDeactivatedPayloadSchema: z.ZodObject<{
1255
+ webhook_id: z.ZodString;
1256
+ url: z.ZodString;
1257
+ reason: z.ZodString;
1258
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1259
+ webhook_id: z.ZodString;
1260
+ url: z.ZodString;
1261
+ reason: z.ZodString;
1262
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1263
+ webhook_id: z.ZodString;
1264
+ url: z.ZodString;
1265
+ reason: z.ZodString;
1266
+ }, z.ZodTypeAny, "passthrough">>;
1267
+ declare const PAYLOAD_SCHEMAS: {
1268
+ 'agent.created': z.ZodObject<{
1269
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1270
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1271
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1272
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1273
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1274
+ }, z.ZodTypeAny, "passthrough">>;
1275
+ 'agent.updated': z.ZodObject<{
1276
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1277
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1278
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1279
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1280
+ agent: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1281
+ }, z.ZodTypeAny, "passthrough">>;
1282
+ 'event.created': z.ZodObject<{
1283
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1284
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1285
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1286
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1287
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1288
+ }, z.ZodTypeAny, "passthrough">>;
1289
+ 'event.updated': z.ZodObject<{
1290
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1291
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1292
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1293
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1294
+ event: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1295
+ }, z.ZodTypeAny, "passthrough">>;
1296
+ 'event.deleted': z.ZodObject<{
1297
+ event_id: z.ZodString;
1298
+ calendar_id: z.ZodString;
1299
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1300
+ event_id: z.ZodString;
1301
+ calendar_id: z.ZodString;
1302
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1303
+ event_id: z.ZodString;
1304
+ calendar_id: z.ZodString;
1305
+ }, z.ZodTypeAny, "passthrough">>;
1306
+ 'event.started': z.ZodObject<{
1307
+ event_id: z.ZodString;
1308
+ calendar_id: z.ZodString;
1309
+ title: z.ZodString;
1310
+ start_time: z.ZodString;
1311
+ end_time: z.ZodString;
1312
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1313
+ event_id: z.ZodString;
1314
+ calendar_id: z.ZodString;
1315
+ title: z.ZodString;
1316
+ start_time: z.ZodString;
1317
+ end_time: z.ZodString;
1318
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1319
+ event_id: z.ZodString;
1320
+ calendar_id: z.ZodString;
1321
+ title: z.ZodString;
1322
+ start_time: z.ZodString;
1323
+ end_time: z.ZodString;
1324
+ }, z.ZodTypeAny, "passthrough">>;
1325
+ 'event.ended': z.ZodObject<{
1326
+ event_id: z.ZodString;
1327
+ calendar_id: z.ZodString;
1328
+ title: z.ZodString;
1329
+ start_time: z.ZodString;
1330
+ end_time: z.ZodString;
1331
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1332
+ event_id: z.ZodString;
1333
+ calendar_id: z.ZodString;
1334
+ title: z.ZodString;
1335
+ start_time: z.ZodString;
1336
+ end_time: z.ZodString;
1337
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1338
+ event_id: z.ZodString;
1339
+ calendar_id: z.ZodString;
1340
+ title: z.ZodString;
1341
+ start_time: z.ZodString;
1342
+ end_time: z.ZodString;
1343
+ }, z.ZodTypeAny, "passthrough">>;
1344
+ 'event.hold_created': z.ZodObject<{
1345
+ event_id: z.ZodString;
1346
+ calendar_id: z.ZodString;
1347
+ title: z.ZodString;
1348
+ start_time: z.ZodString;
1349
+ end_time: z.ZodString;
1350
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1351
+ event_id: z.ZodString;
1352
+ calendar_id: z.ZodString;
1353
+ title: z.ZodString;
1354
+ start_time: z.ZodString;
1355
+ end_time: z.ZodString;
1356
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1357
+ event_id: z.ZodString;
1358
+ calendar_id: z.ZodString;
1359
+ title: z.ZodString;
1360
+ start_time: z.ZodString;
1361
+ end_time: z.ZodString;
1362
+ }, z.ZodTypeAny, "passthrough">>;
1363
+ 'event.hold_expired': z.ZodObject<{
1364
+ event_id: z.ZodString;
1365
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1366
+ event_id: z.ZodString;
1367
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1368
+ event_id: z.ZodString;
1369
+ }, z.ZodTypeAny, "passthrough">>;
1370
+ 'event.hold_released': z.ZodObject<{
1371
+ event_id: z.ZodString;
1372
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1373
+ event_id: z.ZodString;
1374
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1375
+ event_id: z.ZodString;
1376
+ }, z.ZodTypeAny, "passthrough">>;
1377
+ 'event.hold_confirmed': z.ZodObject<{
1378
+ event_id: z.ZodString;
1379
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1380
+ event_id: z.ZodString;
1381
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1382
+ event_id: z.ZodString;
1383
+ }, z.ZodTypeAny, "passthrough">>;
1384
+ 'proposal.created': z.ZodObject<{
1385
+ proposal: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1386
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1387
+ proposal: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1388
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1389
+ proposal: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
1390
+ }, z.ZodTypeAny, "passthrough">>;
1391
+ 'proposal.responded': z.ZodObject<{
1392
+ proposal_id: z.ZodString;
1393
+ agent_id: z.ZodString;
1394
+ response: z.ZodString;
1395
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1396
+ proposal_id: z.ZodString;
1397
+ agent_id: z.ZodString;
1398
+ response: z.ZodString;
1399
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1400
+ proposal_id: z.ZodString;
1401
+ agent_id: z.ZodString;
1402
+ response: z.ZodString;
1403
+ }, z.ZodTypeAny, "passthrough">>;
1404
+ 'proposal.confirmed': z.ZodObject<{
1405
+ proposal_id: z.ZodString;
1406
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1407
+ proposal_id: z.ZodString;
1408
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1409
+ proposal_id: z.ZodString;
1410
+ }, z.ZodTypeAny, "passthrough">>;
1411
+ 'proposal.expired': z.ZodObject<{
1412
+ proposal_id: z.ZodString;
1413
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1414
+ proposal_id: z.ZodString;
1415
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1416
+ proposal_id: z.ZodString;
1417
+ }, z.ZodTypeAny, "passthrough">>;
1418
+ 'proposal.cancelled': z.ZodObject<{
1419
+ proposal_id: z.ZodString;
1420
+ reason: z.ZodOptional<z.ZodString>;
1421
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1422
+ proposal_id: z.ZodString;
1423
+ reason: z.ZodOptional<z.ZodString>;
1424
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1425
+ proposal_id: z.ZodString;
1426
+ reason: z.ZodOptional<z.ZodString>;
1427
+ }, z.ZodTypeAny, "passthrough">>;
1428
+ 'webhook.deactivated': z.ZodObject<{
1429
+ webhook_id: z.ZodString;
1430
+ url: z.ZodString;
1431
+ reason: z.ZodString;
1432
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1433
+ webhook_id: z.ZodString;
1434
+ url: z.ZodString;
1435
+ reason: z.ZodString;
1436
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1437
+ webhook_id: z.ZodString;
1438
+ url: z.ZodString;
1439
+ reason: z.ZodString;
1440
+ }, z.ZodTypeAny, "passthrough">>;
1441
+ };
1442
+
1443
+ /**
1444
+ * A webhook event combines the event type (from the
1445
+ * `X-Chronary-Event-Type` header) with the parsed payload body.
1446
+ *
1447
+ * Use discriminated narrowing on `type`:
1448
+ * ```ts
1449
+ * const event = parseWebhookEvent(
1450
+ * req.header('x-chronary-event-type'),
1451
+ * req.body,
1452
+ * );
1453
+ * if (event.type === 'event.created') {
1454
+ * // ^ narrowed to { type: 'event.created'; data: EventCreatedPayload }
1455
+ * }
1456
+ * ```
1457
+ */
1458
+ type WebhookEvent = {
1459
+ [K in WebhookEventType]: {
1460
+ type: K;
1461
+ data: z.infer<(typeof PAYLOAD_SCHEMAS)[K]>;
1462
+ };
1463
+ }[WebhookEventType];
1464
+ /**
1465
+ * Parse an incoming webhook into a typed, discriminated event.
1466
+ *
1467
+ * Returns a Zod-style `SafeParseReturnType`-shaped object for ergonomic
1468
+ * handling of unknown event types + invalid payloads.
1469
+ */
1470
+ declare function parseWebhookEvent(eventType: string | null | undefined, body: unknown): {
1471
+ success: true;
1472
+ event: WebhookEvent;
1473
+ } | {
1474
+ success: false;
1475
+ error: string;
1476
+ };
1477
+
1478
+ export { type AvailabilityQuery as A, AgentCreatedPayloadSchema, AgentUpdatedPayloadSchema, RespondToProposalSchema as B, type CreateAgentInput as C, UpdateAgentSchema as D, EVENT_STATUSES as E, EventCreatedPayloadSchema, EventDeletedPayloadSchema, EventEndedPayloadSchema, EventHoldConfirmedPayloadSchema, EventHoldCreatedPayloadSchema, EventHoldExpiredPayloadSchema, EventHoldReleasedPayloadSchema, EventStartedPayloadSchema, EventUpdatedPayloadSchema, type UpdateAvailabilityRules as F, UpdateAvailabilityRulesSchema as G, type UpdateCalendarInput as H, UpdateCalendarSchema as I, type UpdateEventInput as J, UpdateEventSchema as K, type ListAgentsQuery as L, type UpdateICalSubscriptionInput as M, UpdateICalSubscriptionSchema as N, type UpdateWebhookInput as O, UpdateWebhookSchema as P, ProposalCancelledPayloadSchema, ProposalConfirmedPayloadSchema, ProposalCreatedPayloadSchema, ProposalExpiredPayloadSchema, ProposalRespondedPayloadSchema, type WebhookDeliveryStatus as Q, type RespondToProposalInput as R, WebhookDeliveryStatusSchema as S, type WorkingHours as T, type UpdateAgentInput as U, WorkingHoursSchema as V, WEBHOOK_DELIVERY_STATUSES as W, WEBHOOK_EVENT_TYPES, WebhookDeactivatedPayloadSchema, type WebhookEvent, type WebhookEventType, AvailabilityQuerySchema as a, CreateAgentSchema as b, type CreateCalendarInput as c, CreateCalendarSchema as d, type CreateEventInput as e, CreateEventSchema as f, type CreateICalSubscriptionInput as g, CreateICalSubscriptionSchema as h, type CreateProposalInput as i, CreateProposalSchema as j, type CreateWebhookInput as k, CreateWebhookSchema as l, type CrossAgentAvailabilityQuery as m, CrossAgentAvailabilityQuerySchema as n, type EventStatus as o, ListAgentsQuerySchema as p, parseWebhookEvent, type ListCalendarsQuery as q, ListCalendarsQuerySchema as r, type ListDeliveriesQuery as s, ListDeliveriesQuerySchema as t, type ListEventsQuery as u, ListEventsQuerySchema as v, type ListICalSubscriptionsQuery as w, ListICalSubscriptionsQuerySchema as x, type ListWebhooksQuery as y, ListWebhooksQuerySchema as z };