@chronary/schemas 0.4.1 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/events.d.cts CHANGED
@@ -73,8 +73,8 @@ declare const EVENT_STATUSES: readonly ["confirmed", "tentative", "cancelled", "
73
73
  type EventStatus = (typeof EVENT_STATUSES)[number];
74
74
  declare const CreateEventSchema: z.ZodObject<{
75
75
  title: z.ZodString;
76
- start_time: z.ZodString;
77
- end_time: z.ZodString;
76
+ start_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
77
+ end_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
78
78
  description: z.ZodOptional<z.ZodString>;
79
79
  all_day: z.ZodDefault<z.ZodBoolean>;
80
80
  status: z.ZodDefault<z.ZodEnum<{
@@ -85,14 +85,14 @@ declare const CreateEventSchema: z.ZodObject<{
85
85
  }>>;
86
86
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
87
87
  reminders: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodArray<z.ZodNumber>, z.ZodTransform<number[], number[]>>>>;
88
- hold_expires_at: z.ZodOptional<z.ZodString>;
88
+ hold_expires_at: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
89
89
  hold_priority: z.ZodOptional<z.ZodNumber>;
90
90
  }, z.core.$strip>;
91
91
  declare const UpdateEventSchema: z.ZodObject<{
92
92
  title: z.ZodOptional<z.ZodString>;
93
93
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
- start_time: z.ZodOptional<z.ZodString>;
95
- end_time: z.ZodOptional<z.ZodString>;
94
+ start_time: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
95
+ end_time: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
96
96
  all_day: z.ZodOptional<z.ZodBoolean>;
97
97
  status: z.ZodOptional<z.ZodEnum<{
98
98
  confirmed: "confirmed";
@@ -103,8 +103,8 @@ declare const UpdateEventSchema: z.ZodObject<{
103
103
  reminders: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodArray<z.ZodNumber>, z.ZodTransform<number[], number[]>>>>;
104
104
  }, z.core.$strip>;
105
105
  declare const ListEventsQuerySchema: z.ZodObject<{
106
- start_after: z.ZodOptional<z.ZodString>;
107
- start_before: z.ZodOptional<z.ZodString>;
106
+ start_after: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
107
+ start_before: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
108
108
  status: z.ZodOptional<z.ZodEnum<{
109
109
  confirmed: "confirmed";
110
110
  tentative: "tentative";
@@ -204,8 +204,8 @@ declare const AvailabilityQuerySchema: z.ZodPipe<z.ZodObject<{
204
204
  "1h": "1h";
205
205
  "2h": "2h";
206
206
  }>>;
207
- start: z.ZodString;
208
- end: z.ZodString;
207
+ start: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
208
+ end: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
209
209
  }, z.core.$strip>, z.ZodTransform<Omit<{
210
210
  include_busy: boolean;
211
211
  start: string;
@@ -242,8 +242,8 @@ declare const CrossAgentAvailabilityQuerySchema: z.ZodPipe<z.ZodObject<{
242
242
  "2h": "2h";
243
243
  }>>;
244
244
  agents: z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>;
245
- start: z.ZodString;
246
- end: z.ZodString;
245
+ start: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
246
+ end: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
247
247
  }, z.core.$strip>, z.ZodTransform<Omit<{
248
248
  include_busy: boolean;
249
249
  agents: string[];
@@ -263,7 +263,7 @@ declare const CrossAgentAvailabilityQuerySchema: z.ZodPipe<z.ZodObject<{
263
263
  duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
264
264
  slot_duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
265
265
  }>>;
266
- declare const WEBHOOK_EVENT_TYPES: readonly ["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.reminder", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated"];
266
+ declare const WEBHOOK_EVENT_TYPES: readonly ["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.reminder", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated", "org.plan_changed", "calendar_connection.reauthorization_required", "usage.threshold_crossed"];
267
267
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
268
268
  declare const CreateWebhookSchema: z.ZodObject<{
269
269
  url: z.ZodString;
@@ -286,6 +286,9 @@ declare const CreateWebhookSchema: z.ZodObject<{
286
286
  "proposal.expired": "proposal.expired";
287
287
  "proposal.cancelled": "proposal.cancelled";
288
288
  "webhook.deactivated": "webhook.deactivated";
289
+ "org.plan_changed": "org.plan_changed";
290
+ "calendar_connection.reauthorization_required": "calendar_connection.reauthorization_required";
291
+ "usage.threshold_crossed": "usage.threshold_crossed";
289
292
  }>>;
290
293
  }, z.core.$strip>;
291
294
  declare const UpdateWebhookSchema: z.ZodObject<{
@@ -309,6 +312,9 @@ declare const UpdateWebhookSchema: z.ZodObject<{
309
312
  "proposal.expired": "proposal.expired";
310
313
  "proposal.cancelled": "proposal.cancelled";
311
314
  "webhook.deactivated": "webhook.deactivated";
315
+ "org.plan_changed": "org.plan_changed";
316
+ "calendar_connection.reauthorization_required": "calendar_connection.reauthorization_required";
317
+ "usage.threshold_crossed": "usage.threshold_crossed";
312
318
  }>>>;
313
319
  active: z.ZodOptional<z.ZodBoolean>;
314
320
  }, z.core.$strip>;
@@ -316,11 +322,16 @@ declare const ListWebhooksQuerySchema: z.ZodObject<{
316
322
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
317
323
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
318
324
  }, z.core.$strip>;
319
- declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed"];
325
+ /**
326
+ * `dropped` is a Free-plan delivery the monthly limit stopped: never sent,
327
+ * counted or retried, with `last_error_code: 'quota_exceeded'`.
328
+ */
329
+ declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed", "dropped"];
320
330
  declare const WebhookDeliveryStatusSchema: z.ZodEnum<{
321
331
  pending: "pending";
322
332
  delivered: "delivered";
323
333
  failed: "failed";
334
+ dropped: "dropped";
324
335
  }>;
325
336
  declare const ListDeliveriesQuerySchema: z.ZodObject<{
326
337
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -329,11 +340,21 @@ declare const ListDeliveriesQuerySchema: z.ZodObject<{
329
340
  pending: "pending";
330
341
  delivered: "delivered";
331
342
  failed: "failed";
343
+ dropped: "dropped";
332
344
  }>>;
333
345
  include_payload: z.ZodPipe<z.ZodOptional<z.ZodEnum<{
334
346
  true: "true";
335
347
  false: "false";
336
348
  }>>, z.ZodTransform<boolean, "true" | "false" | undefined>>;
349
+ event_type: z.ZodOptional<z.ZodString>;
350
+ created_after: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
351
+ created_before: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
352
+ delivery_id: z.ZodOptional<z.ZodString>;
353
+ is_test: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
354
+ true: "true";
355
+ false: "false";
356
+ }>, z.ZodTransform<boolean, "true" | "false">>>;
357
+ cursor: z.ZodOptional<z.ZodString>;
337
358
  }, z.core.$strip>;
338
359
  declare const CreateICalSubscriptionSchema: z.ZodObject<{
339
360
  calendar_id: z.ZodString;
@@ -360,12 +381,12 @@ declare const CreateProposalSchema: z.ZodObject<{
360
381
  participant_agent_ids: z.ZodArray<z.ZodString>;
361
382
  calendar_id: z.ZodString;
362
383
  slots: z.ZodArray<z.ZodObject<{
363
- start_time: z.ZodString;
364
- end_time: z.ZodString;
384
+ start_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
385
+ end_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
365
386
  weight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
366
387
  calendar_id: z.ZodOptional<z.ZodString>;
367
388
  }, z.core.$strip>>;
368
- expires_at: z.ZodOptional<z.ZodString>;
389
+ expires_at: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
369
390
  metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
370
391
  }, z.core.$strip>;
371
392
  declare const RespondToProposalSchema: z.ZodObject<{
@@ -377,8 +398,8 @@ declare const RespondToProposalSchema: z.ZodObject<{
377
398
  }>;
378
399
  selected_slot_id: z.ZodOptional<z.ZodString>;
379
400
  counter_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
380
- start_time: z.ZodString;
381
- end_time: z.ZodString;
401
+ start_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
402
+ end_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
382
403
  weight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
383
404
  calendar_id: z.ZodOptional<z.ZodString>;
384
405
  }, z.core.$strip>>>;
@@ -494,9 +515,44 @@ declare const ProposalCancelledPayloadSchema: z.ZodObject<{
494
515
  declare const ProposalExpiredPayloadSchema: z.ZodObject<{
495
516
  proposal_id: z.ZodString;
496
517
  }, z.core.$loose>;
518
+ declare const OrgPlanChangedPayloadSchema: z.ZodObject<{
519
+ org_id: z.ZodString;
520
+ previous_plan: z.ZodString;
521
+ plan: z.ZodString;
522
+ source: z.ZodEnum<{
523
+ subscription: "subscription";
524
+ founding_expiry: "founding_expiry";
525
+ admin_override: "admin_override";
526
+ soft_launch_toggle: "soft_launch_toggle";
527
+ system: "system";
528
+ }>;
529
+ subscription_status: z.ZodNullable<z.ZodString>;
530
+ interval: z.ZodNullable<z.ZodEnum<{
531
+ month: "month";
532
+ year: "year";
533
+ }>>;
534
+ upgrade_request_id: z.ZodNullable<z.ZodString>;
535
+ }, z.core.$loose>;
536
+ declare const CalendarConnectionReauthorizationRequiredPayloadSchema: z.ZodObject<{
537
+ connection_id: z.ZodString;
538
+ provider: z.ZodString;
539
+ reauthorization_reason: z.ZodString;
540
+ impacted_agent_count: z.ZodNumber;
541
+ occurred_at: z.ZodString;
542
+ }, z.core.$loose>;
543
+ declare const UsageThresholdCrossedPayloadSchema: z.ZodObject<{
544
+ metric: z.ZodString;
545
+ used: z.ZodNumber;
546
+ limit: z.ZodNumber;
547
+ threshold_pct: z.ZodNumber;
548
+ period: z.ZodString;
549
+ resets_at: z.ZodString;
550
+ }, z.core.$loose>;
497
551
  declare const WebhookDeactivatedPayloadSchema: z.ZodObject<{
498
552
  webhook_id: z.ZodString;
499
- url: z.ZodString;
553
+ webhook_origin: z.ZodOptional<z.ZodString>;
554
+ webhook_path: z.ZodOptional<z.ZodString>;
555
+ url: z.ZodOptional<z.ZodString>;
500
556
  reason: z.ZodString;
501
557
  }, z.core.$loose>;
502
558
  declare const PAYLOAD_SCHEMAS: {
@@ -579,9 +635,44 @@ declare const PAYLOAD_SCHEMAS: {
579
635
  }, z.core.$loose>;
580
636
  'webhook.deactivated': z.ZodObject<{
581
637
  webhook_id: z.ZodString;
582
- url: z.ZodString;
638
+ webhook_origin: z.ZodOptional<z.ZodString>;
639
+ webhook_path: z.ZodOptional<z.ZodString>;
640
+ url: z.ZodOptional<z.ZodString>;
583
641
  reason: z.ZodString;
584
642
  }, z.core.$loose>;
643
+ 'org.plan_changed': z.ZodObject<{
644
+ org_id: z.ZodString;
645
+ previous_plan: z.ZodString;
646
+ plan: z.ZodString;
647
+ source: z.ZodEnum<{
648
+ subscription: "subscription";
649
+ founding_expiry: "founding_expiry";
650
+ admin_override: "admin_override";
651
+ soft_launch_toggle: "soft_launch_toggle";
652
+ system: "system";
653
+ }>;
654
+ subscription_status: z.ZodNullable<z.ZodString>;
655
+ interval: z.ZodNullable<z.ZodEnum<{
656
+ month: "month";
657
+ year: "year";
658
+ }>>;
659
+ upgrade_request_id: z.ZodNullable<z.ZodString>;
660
+ }, z.core.$loose>;
661
+ 'calendar_connection.reauthorization_required': z.ZodObject<{
662
+ connection_id: z.ZodString;
663
+ provider: z.ZodString;
664
+ reauthorization_reason: z.ZodString;
665
+ impacted_agent_count: z.ZodNumber;
666
+ occurred_at: z.ZodString;
667
+ }, z.core.$loose>;
668
+ 'usage.threshold_crossed': z.ZodObject<{
669
+ metric: z.ZodString;
670
+ used: z.ZodNumber;
671
+ limit: z.ZodNumber;
672
+ threshold_pct: z.ZodNumber;
673
+ period: z.ZodString;
674
+ resets_at: z.ZodString;
675
+ }, z.core.$loose>;
585
676
  };
586
677
 
587
678
  /**
@@ -619,4 +710,5 @@ declare function parseWebhookEvent(eventType: string | null | undefined, body: u
619
710
  error: string;
620
711
  };
621
712
 
622
- export { WorkingHoursSchema as $, type AvailabilityQuery as A, AgentCreatedPayloadSchema, AgentUpdatedPayloadSchema, REMINDER_MAX_MINUTES as B, type CreateAgentInput as C, DEFAULT_EVENT_REMINDERS as D, EVENT_STATUSES as E, EventCreatedPayloadSchema, EventDeletedPayloadSchema, EventEndedPayloadSchema, EventHoldConfirmedPayloadSchema, EventHoldCreatedPayloadSchema, EventHoldExpiredPayloadSchema, EventHoldReleasedPayloadSchema, EventReminderPayloadSchema, EventStartedPayloadSchema, EventUpdatedPayloadSchema, REMINDER_MIN_MINUTES as F, RemindersSchema as G, type RespondToProposalInput as H, RespondToProposalSchema as I, UpdateAgentSchema as J, type UpdateAvailabilityRules as K, type ListAgentsQuery as L, UpdateAvailabilityRulesSchema as M, type UpdateCalendarInput as N, UpdateCalendarSchema as O, type UpdateEventInput as P, ProposalCancelledPayloadSchema, ProposalConfirmedPayloadSchema, ProposalCreatedPayloadSchema, ProposalExpiredPayloadSchema, ProposalRespondedPayloadSchema, UpdateEventSchema as Q, REMINDER_MAX_COUNT as R, type UpdateICalSubscriptionInput as S, UpdateICalSubscriptionSchema as T, type UpdateAgentInput as U, type UpdateWebhookInput as V, UpdateWebhookSchema as W, WEBHOOK_EVENT_TYPES, WebhookDeactivatedPayloadSchema, type WebhookEvent, type WebhookEventType, WEBHOOK_DELIVERY_STATUSES as X, type WebhookDeliveryStatus as Y, WebhookDeliveryStatusSchema as Z, type WorkingHours as _, 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 };
713
+ export { WorkingHoursSchema as $, AgentCreatedPayloadSchema, AgentUpdatedPayloadSchema, REMINDER_MAX_MINUTES as B, CalendarConnectionReauthorizationRequiredPayloadSchema, DEFAULT_EVENT_REMINDERS as D, EVENT_STATUSES as E, EventCreatedPayloadSchema, EventDeletedPayloadSchema, EventEndedPayloadSchema, EventHoldConfirmedPayloadSchema, EventHoldCreatedPayloadSchema, EventHoldExpiredPayloadSchema, EventHoldReleasedPayloadSchema, EventReminderPayloadSchema, EventStartedPayloadSchema, EventUpdatedPayloadSchema, REMINDER_MIN_MINUTES as F, RemindersSchema as G, RespondToProposalSchema as I, UpdateAgentSchema as J, UpdateAvailabilityRulesSchema as M, UpdateCalendarSchema as O, OrgPlanChangedPayloadSchema, ProposalCancelledPayloadSchema, ProposalConfirmedPayloadSchema, ProposalCreatedPayloadSchema, ProposalExpiredPayloadSchema, ProposalRespondedPayloadSchema, UpdateEventSchema as Q, REMINDER_MAX_COUNT as R, UpdateICalSubscriptionSchema as T, UsageThresholdCrossedPayloadSchema, UpdateWebhookSchema as W, WEBHOOK_EVENT_TYPES, WebhookDeactivatedPayloadSchema, WEBHOOK_DELIVERY_STATUSES as X, WebhookDeliveryStatusSchema as Z, AvailabilityQuerySchema as a, CreateAgentSchema as b, CreateCalendarSchema as d, CreateEventSchema as f, CreateICalSubscriptionSchema as h, CreateProposalSchema as j, CreateWebhookSchema as l, CrossAgentAvailabilityQuerySchema as n, ListAgentsQuerySchema as p, parseWebhookEvent, ListCalendarsQuerySchema as r, ListDeliveriesQuerySchema as t, ListEventsQuerySchema as v, ListICalSubscriptionsQuerySchema as x, ListWebhooksQuerySchema as z };
714
+ export type { AvailabilityQuery as A, CreateAgentInput as C, RespondToProposalInput as H, UpdateAvailabilityRules as K, ListAgentsQuery as L, UpdateCalendarInput as N, UpdateEventInput as P, UpdateICalSubscriptionInput as S, UpdateAgentInput as U, UpdateWebhookInput as V, WebhookEvent, WebhookEventType, WebhookDeliveryStatus as Y, WorkingHours as _, CreateCalendarInput as c, CreateEventInput as e, CreateICalSubscriptionInput as g, CreateProposalInput as i, CreateWebhookInput as k, CrossAgentAvailabilityQuery as m, EventStatus as o, ListCalendarsQuery as q, ListDeliveriesQuery as s, ListEventsQuery as u, ListICalSubscriptionsQuery as w, ListWebhooksQuery as y };
package/dist/events.d.ts CHANGED
@@ -73,8 +73,8 @@ declare const EVENT_STATUSES: readonly ["confirmed", "tentative", "cancelled", "
73
73
  type EventStatus = (typeof EVENT_STATUSES)[number];
74
74
  declare const CreateEventSchema: z.ZodObject<{
75
75
  title: z.ZodString;
76
- start_time: z.ZodString;
77
- end_time: z.ZodString;
76
+ start_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
77
+ end_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
78
78
  description: z.ZodOptional<z.ZodString>;
79
79
  all_day: z.ZodDefault<z.ZodBoolean>;
80
80
  status: z.ZodDefault<z.ZodEnum<{
@@ -85,14 +85,14 @@ declare const CreateEventSchema: z.ZodObject<{
85
85
  }>>;
86
86
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
87
87
  reminders: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodArray<z.ZodNumber>, z.ZodTransform<number[], number[]>>>>;
88
- hold_expires_at: z.ZodOptional<z.ZodString>;
88
+ hold_expires_at: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
89
89
  hold_priority: z.ZodOptional<z.ZodNumber>;
90
90
  }, z.core.$strip>;
91
91
  declare const UpdateEventSchema: z.ZodObject<{
92
92
  title: z.ZodOptional<z.ZodString>;
93
93
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
- start_time: z.ZodOptional<z.ZodString>;
95
- end_time: z.ZodOptional<z.ZodString>;
94
+ start_time: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
95
+ end_time: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
96
96
  all_day: z.ZodOptional<z.ZodBoolean>;
97
97
  status: z.ZodOptional<z.ZodEnum<{
98
98
  confirmed: "confirmed";
@@ -103,8 +103,8 @@ declare const UpdateEventSchema: z.ZodObject<{
103
103
  reminders: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodArray<z.ZodNumber>, z.ZodTransform<number[], number[]>>>>;
104
104
  }, z.core.$strip>;
105
105
  declare const ListEventsQuerySchema: z.ZodObject<{
106
- start_after: z.ZodOptional<z.ZodString>;
107
- start_before: z.ZodOptional<z.ZodString>;
106
+ start_after: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
107
+ start_before: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
108
108
  status: z.ZodOptional<z.ZodEnum<{
109
109
  confirmed: "confirmed";
110
110
  tentative: "tentative";
@@ -204,8 +204,8 @@ declare const AvailabilityQuerySchema: z.ZodPipe<z.ZodObject<{
204
204
  "1h": "1h";
205
205
  "2h": "2h";
206
206
  }>>;
207
- start: z.ZodString;
208
- end: z.ZodString;
207
+ start: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
208
+ end: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
209
209
  }, z.core.$strip>, z.ZodTransform<Omit<{
210
210
  include_busy: boolean;
211
211
  start: string;
@@ -242,8 +242,8 @@ declare const CrossAgentAvailabilityQuerySchema: z.ZodPipe<z.ZodObject<{
242
242
  "2h": "2h";
243
243
  }>>;
244
244
  agents: z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>;
245
- start: z.ZodString;
246
- end: z.ZodString;
245
+ start: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
246
+ end: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
247
247
  }, z.core.$strip>, z.ZodTransform<Omit<{
248
248
  include_busy: boolean;
249
249
  agents: string[];
@@ -263,7 +263,7 @@ declare const CrossAgentAvailabilityQuerySchema: z.ZodPipe<z.ZodObject<{
263
263
  duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
264
264
  slot_duration?: "15m" | "30m" | "45m" | "1h" | "2h" | undefined;
265
265
  }>>;
266
- declare const WEBHOOK_EVENT_TYPES: readonly ["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.reminder", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated"];
266
+ declare const WEBHOOK_EVENT_TYPES: readonly ["agent.created", "agent.updated", "event.created", "event.updated", "event.deleted", "event.started", "event.ended", "event.reminder", "event.hold_created", "event.hold_expired", "event.hold_released", "event.hold_confirmed", "proposal.created", "proposal.responded", "proposal.confirmed", "proposal.expired", "proposal.cancelled", "webhook.deactivated", "org.plan_changed", "calendar_connection.reauthorization_required", "usage.threshold_crossed"];
267
267
  type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
268
268
  declare const CreateWebhookSchema: z.ZodObject<{
269
269
  url: z.ZodString;
@@ -286,6 +286,9 @@ declare const CreateWebhookSchema: z.ZodObject<{
286
286
  "proposal.expired": "proposal.expired";
287
287
  "proposal.cancelled": "proposal.cancelled";
288
288
  "webhook.deactivated": "webhook.deactivated";
289
+ "org.plan_changed": "org.plan_changed";
290
+ "calendar_connection.reauthorization_required": "calendar_connection.reauthorization_required";
291
+ "usage.threshold_crossed": "usage.threshold_crossed";
289
292
  }>>;
290
293
  }, z.core.$strip>;
291
294
  declare const UpdateWebhookSchema: z.ZodObject<{
@@ -309,6 +312,9 @@ declare const UpdateWebhookSchema: z.ZodObject<{
309
312
  "proposal.expired": "proposal.expired";
310
313
  "proposal.cancelled": "proposal.cancelled";
311
314
  "webhook.deactivated": "webhook.deactivated";
315
+ "org.plan_changed": "org.plan_changed";
316
+ "calendar_connection.reauthorization_required": "calendar_connection.reauthorization_required";
317
+ "usage.threshold_crossed": "usage.threshold_crossed";
312
318
  }>>>;
313
319
  active: z.ZodOptional<z.ZodBoolean>;
314
320
  }, z.core.$strip>;
@@ -316,11 +322,16 @@ declare const ListWebhooksQuerySchema: z.ZodObject<{
316
322
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
317
323
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
318
324
  }, z.core.$strip>;
319
- declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed"];
325
+ /**
326
+ * `dropped` is a Free-plan delivery the monthly limit stopped: never sent,
327
+ * counted or retried, with `last_error_code: 'quota_exceeded'`.
328
+ */
329
+ declare const WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "delivered", "failed", "dropped"];
320
330
  declare const WebhookDeliveryStatusSchema: z.ZodEnum<{
321
331
  pending: "pending";
322
332
  delivered: "delivered";
323
333
  failed: "failed";
334
+ dropped: "dropped";
324
335
  }>;
325
336
  declare const ListDeliveriesQuerySchema: z.ZodObject<{
326
337
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -329,11 +340,21 @@ declare const ListDeliveriesQuerySchema: z.ZodObject<{
329
340
  pending: "pending";
330
341
  delivered: "delivered";
331
342
  failed: "failed";
343
+ dropped: "dropped";
332
344
  }>>;
333
345
  include_payload: z.ZodPipe<z.ZodOptional<z.ZodEnum<{
334
346
  true: "true";
335
347
  false: "false";
336
348
  }>>, z.ZodTransform<boolean, "true" | "false" | undefined>>;
349
+ event_type: z.ZodOptional<z.ZodString>;
350
+ created_after: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
351
+ created_before: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
352
+ delivery_id: z.ZodOptional<z.ZodString>;
353
+ is_test: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
354
+ true: "true";
355
+ false: "false";
356
+ }>, z.ZodTransform<boolean, "true" | "false">>>;
357
+ cursor: z.ZodOptional<z.ZodString>;
337
358
  }, z.core.$strip>;
338
359
  declare const CreateICalSubscriptionSchema: z.ZodObject<{
339
360
  calendar_id: z.ZodString;
@@ -360,12 +381,12 @@ declare const CreateProposalSchema: z.ZodObject<{
360
381
  participant_agent_ids: z.ZodArray<z.ZodString>;
361
382
  calendar_id: z.ZodString;
362
383
  slots: z.ZodArray<z.ZodObject<{
363
- start_time: z.ZodString;
364
- end_time: z.ZodString;
384
+ start_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
385
+ end_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
365
386
  weight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
366
387
  calendar_id: z.ZodOptional<z.ZodString>;
367
388
  }, z.core.$strip>>;
368
- expires_at: z.ZodOptional<z.ZodString>;
389
+ expires_at: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
369
390
  metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
370
391
  }, z.core.$strip>;
371
392
  declare const RespondToProposalSchema: z.ZodObject<{
@@ -377,8 +398,8 @@ declare const RespondToProposalSchema: z.ZodObject<{
377
398
  }>;
378
399
  selected_slot_id: z.ZodOptional<z.ZodString>;
379
400
  counter_slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
380
- start_time: z.ZodString;
381
- end_time: z.ZodString;
401
+ start_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
402
+ end_time: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
382
403
  weight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
383
404
  calendar_id: z.ZodOptional<z.ZodString>;
384
405
  }, z.core.$strip>>>;
@@ -494,9 +515,44 @@ declare const ProposalCancelledPayloadSchema: z.ZodObject<{
494
515
  declare const ProposalExpiredPayloadSchema: z.ZodObject<{
495
516
  proposal_id: z.ZodString;
496
517
  }, z.core.$loose>;
518
+ declare const OrgPlanChangedPayloadSchema: z.ZodObject<{
519
+ org_id: z.ZodString;
520
+ previous_plan: z.ZodString;
521
+ plan: z.ZodString;
522
+ source: z.ZodEnum<{
523
+ subscription: "subscription";
524
+ founding_expiry: "founding_expiry";
525
+ admin_override: "admin_override";
526
+ soft_launch_toggle: "soft_launch_toggle";
527
+ system: "system";
528
+ }>;
529
+ subscription_status: z.ZodNullable<z.ZodString>;
530
+ interval: z.ZodNullable<z.ZodEnum<{
531
+ month: "month";
532
+ year: "year";
533
+ }>>;
534
+ upgrade_request_id: z.ZodNullable<z.ZodString>;
535
+ }, z.core.$loose>;
536
+ declare const CalendarConnectionReauthorizationRequiredPayloadSchema: z.ZodObject<{
537
+ connection_id: z.ZodString;
538
+ provider: z.ZodString;
539
+ reauthorization_reason: z.ZodString;
540
+ impacted_agent_count: z.ZodNumber;
541
+ occurred_at: z.ZodString;
542
+ }, z.core.$loose>;
543
+ declare const UsageThresholdCrossedPayloadSchema: z.ZodObject<{
544
+ metric: z.ZodString;
545
+ used: z.ZodNumber;
546
+ limit: z.ZodNumber;
547
+ threshold_pct: z.ZodNumber;
548
+ period: z.ZodString;
549
+ resets_at: z.ZodString;
550
+ }, z.core.$loose>;
497
551
  declare const WebhookDeactivatedPayloadSchema: z.ZodObject<{
498
552
  webhook_id: z.ZodString;
499
- url: z.ZodString;
553
+ webhook_origin: z.ZodOptional<z.ZodString>;
554
+ webhook_path: z.ZodOptional<z.ZodString>;
555
+ url: z.ZodOptional<z.ZodString>;
500
556
  reason: z.ZodString;
501
557
  }, z.core.$loose>;
502
558
  declare const PAYLOAD_SCHEMAS: {
@@ -579,9 +635,44 @@ declare const PAYLOAD_SCHEMAS: {
579
635
  }, z.core.$loose>;
580
636
  'webhook.deactivated': z.ZodObject<{
581
637
  webhook_id: z.ZodString;
582
- url: z.ZodString;
638
+ webhook_origin: z.ZodOptional<z.ZodString>;
639
+ webhook_path: z.ZodOptional<z.ZodString>;
640
+ url: z.ZodOptional<z.ZodString>;
583
641
  reason: z.ZodString;
584
642
  }, z.core.$loose>;
643
+ 'org.plan_changed': z.ZodObject<{
644
+ org_id: z.ZodString;
645
+ previous_plan: z.ZodString;
646
+ plan: z.ZodString;
647
+ source: z.ZodEnum<{
648
+ subscription: "subscription";
649
+ founding_expiry: "founding_expiry";
650
+ admin_override: "admin_override";
651
+ soft_launch_toggle: "soft_launch_toggle";
652
+ system: "system";
653
+ }>;
654
+ subscription_status: z.ZodNullable<z.ZodString>;
655
+ interval: z.ZodNullable<z.ZodEnum<{
656
+ month: "month";
657
+ year: "year";
658
+ }>>;
659
+ upgrade_request_id: z.ZodNullable<z.ZodString>;
660
+ }, z.core.$loose>;
661
+ 'calendar_connection.reauthorization_required': z.ZodObject<{
662
+ connection_id: z.ZodString;
663
+ provider: z.ZodString;
664
+ reauthorization_reason: z.ZodString;
665
+ impacted_agent_count: z.ZodNumber;
666
+ occurred_at: z.ZodString;
667
+ }, z.core.$loose>;
668
+ 'usage.threshold_crossed': z.ZodObject<{
669
+ metric: z.ZodString;
670
+ used: z.ZodNumber;
671
+ limit: z.ZodNumber;
672
+ threshold_pct: z.ZodNumber;
673
+ period: z.ZodString;
674
+ resets_at: z.ZodString;
675
+ }, z.core.$loose>;
585
676
  };
586
677
 
587
678
  /**
@@ -619,4 +710,5 @@ declare function parseWebhookEvent(eventType: string | null | undefined, body: u
619
710
  error: string;
620
711
  };
621
712
 
622
- export { WorkingHoursSchema as $, type AvailabilityQuery as A, AgentCreatedPayloadSchema, AgentUpdatedPayloadSchema, REMINDER_MAX_MINUTES as B, type CreateAgentInput as C, DEFAULT_EVENT_REMINDERS as D, EVENT_STATUSES as E, EventCreatedPayloadSchema, EventDeletedPayloadSchema, EventEndedPayloadSchema, EventHoldConfirmedPayloadSchema, EventHoldCreatedPayloadSchema, EventHoldExpiredPayloadSchema, EventHoldReleasedPayloadSchema, EventReminderPayloadSchema, EventStartedPayloadSchema, EventUpdatedPayloadSchema, REMINDER_MIN_MINUTES as F, RemindersSchema as G, type RespondToProposalInput as H, RespondToProposalSchema as I, UpdateAgentSchema as J, type UpdateAvailabilityRules as K, type ListAgentsQuery as L, UpdateAvailabilityRulesSchema as M, type UpdateCalendarInput as N, UpdateCalendarSchema as O, type UpdateEventInput as P, ProposalCancelledPayloadSchema, ProposalConfirmedPayloadSchema, ProposalCreatedPayloadSchema, ProposalExpiredPayloadSchema, ProposalRespondedPayloadSchema, UpdateEventSchema as Q, REMINDER_MAX_COUNT as R, type UpdateICalSubscriptionInput as S, UpdateICalSubscriptionSchema as T, type UpdateAgentInput as U, type UpdateWebhookInput as V, UpdateWebhookSchema as W, WEBHOOK_EVENT_TYPES, WebhookDeactivatedPayloadSchema, type WebhookEvent, type WebhookEventType, WEBHOOK_DELIVERY_STATUSES as X, type WebhookDeliveryStatus as Y, WebhookDeliveryStatusSchema as Z, type WorkingHours as _, 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 };
713
+ export { WorkingHoursSchema as $, AgentCreatedPayloadSchema, AgentUpdatedPayloadSchema, REMINDER_MAX_MINUTES as B, CalendarConnectionReauthorizationRequiredPayloadSchema, DEFAULT_EVENT_REMINDERS as D, EVENT_STATUSES as E, EventCreatedPayloadSchema, EventDeletedPayloadSchema, EventEndedPayloadSchema, EventHoldConfirmedPayloadSchema, EventHoldCreatedPayloadSchema, EventHoldExpiredPayloadSchema, EventHoldReleasedPayloadSchema, EventReminderPayloadSchema, EventStartedPayloadSchema, EventUpdatedPayloadSchema, REMINDER_MIN_MINUTES as F, RemindersSchema as G, RespondToProposalSchema as I, UpdateAgentSchema as J, UpdateAvailabilityRulesSchema as M, UpdateCalendarSchema as O, OrgPlanChangedPayloadSchema, ProposalCancelledPayloadSchema, ProposalConfirmedPayloadSchema, ProposalCreatedPayloadSchema, ProposalExpiredPayloadSchema, ProposalRespondedPayloadSchema, UpdateEventSchema as Q, REMINDER_MAX_COUNT as R, UpdateICalSubscriptionSchema as T, UsageThresholdCrossedPayloadSchema, UpdateWebhookSchema as W, WEBHOOK_EVENT_TYPES, WebhookDeactivatedPayloadSchema, WEBHOOK_DELIVERY_STATUSES as X, WebhookDeliveryStatusSchema as Z, AvailabilityQuerySchema as a, CreateAgentSchema as b, CreateCalendarSchema as d, CreateEventSchema as f, CreateICalSubscriptionSchema as h, CreateProposalSchema as j, CreateWebhookSchema as l, CrossAgentAvailabilityQuerySchema as n, ListAgentsQuerySchema as p, parseWebhookEvent, ListCalendarsQuerySchema as r, ListDeliveriesQuerySchema as t, ListEventsQuerySchema as v, ListICalSubscriptionsQuerySchema as x, ListWebhooksQuerySchema as z };
714
+ export type { AvailabilityQuery as A, CreateAgentInput as C, RespondToProposalInput as H, UpdateAvailabilityRules as K, ListAgentsQuery as L, UpdateCalendarInput as N, UpdateEventInput as P, UpdateICalSubscriptionInput as S, UpdateAgentInput as U, UpdateWebhookInput as V, WebhookEvent, WebhookEventType, WebhookDeliveryStatus as Y, WorkingHours as _, CreateCalendarInput as c, CreateEventInput as e, CreateICalSubscriptionInput as g, CreateProposalInput as i, CreateWebhookInput as k, CrossAgentAvailabilityQuery as m, EventStatus as o, ListCalendarsQuery as q, ListDeliveriesQuery as s, ListEventsQuery as u, ListICalSubscriptionsQuery as w, ListWebhooksQuery as y };