@chronary/sdk 0.10.0 → 0.11.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/index.d.cts CHANGED
@@ -173,6 +173,7 @@ interface ListAgentsParams {
173
173
  /** Add `calendar_count` and `scoped_key_count` to each agent. */
174
174
  include_counts?: boolean;
175
175
  limit?: number;
176
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
176
177
  offset?: number;
177
178
  }
178
179
  interface Calendar {
@@ -214,6 +215,7 @@ interface ListCalendarsParams {
214
215
  /** Case-insensitive substring of the calendar name, or an exact calendar id. Org-wide list only (not with `agentId`). */
215
216
  q?: string;
216
217
  limit?: number;
218
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
217
219
  offset?: number;
218
220
  }
219
221
  interface BookingPage {
@@ -263,6 +265,7 @@ interface UpdateBookingPageParams {
263
265
  }
264
266
  interface ListBookingPagesParams {
265
267
  limit?: number;
268
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
266
269
  offset?: number;
267
270
  /** Only pages bound to this calendar. */
268
271
  calendar_id?: string;
@@ -348,10 +351,25 @@ interface CalendarEvent {
348
351
  recurrenceRule: string | null;
349
352
  /** ISO 8601 starts of individually cancelled occurrences (EXDATE). */
350
353
  recurrenceExdates: string[];
354
+ /** IANA time zone the recurring series repeats in (e.g. "America/Los_Angeles"). null = UTC. */
355
+ timezone: string | null;
351
356
  /** Present only on expanded instances (`expand: true` lists): id of the recurring series master this instance belongs to. */
352
357
  recurringEventId?: string;
353
358
  /** Present only on expanded instances: the occurrence start this instance was generated for. */
354
359
  originalStartTime?: string;
360
+ /** Present only on expanded instances: local start in the series' time zone (`YYYY-MM-DDTHH:mm:ss`, no offset). */
361
+ startLocal?: string;
362
+ /** Present only on expanded instances: UTC offset of `startLocal` (e.g. "-08:00"). */
363
+ utcOffset?: string;
364
+ /** Present only on expanded instances: `"gap"` when a DST gap moved the local start forward, else null. */
365
+ dstAdjusted?: 'gap' | null;
366
+ /**
367
+ * Present only on update responses that moved a recurring series (changed
368
+ * `start_time`, `recurrence_rule` or `timezone`): cancelled occurrences
369
+ * (exdates) with no occurrence left on the same local date, so they were
370
+ * dropped. Ask the user and re-cancel with `occurrence_start` if needed.
371
+ */
372
+ droppedExdates?: string[];
355
373
  holdExpiresAt: string | null;
356
374
  /** Hold conflict priority (0-100). Never null: 0 unless set on a hold. */
357
375
  holdPriority: number;
@@ -382,6 +400,13 @@ interface CreateEventParams {
382
400
  * or ends more than 90 days out on the free plan (Pro allows unbounded).
383
401
  */
384
402
  recurrence_rule?: string;
403
+ /**
404
+ * IANA time zone the recurring series repeats in, e.g. "America/Los_Angeles".
405
+ * The pattern repeats on local wall time (a weekly 16:00 stays 16:00 across
406
+ * daylight-saving changes); BYDAY and a date-only UNTIL are read in this
407
+ * zone. Omit for UTC. All-day events ignore it.
408
+ */
409
+ timezone?: string;
385
410
  }
386
411
  interface UpdateEventParams {
387
412
  title?: string;
@@ -404,6 +429,15 @@ interface UpdateEventParams {
404
429
  * unbounded).
405
430
  */
406
431
  recurrence_rule?: string | null;
432
+ /**
433
+ * Set or change the IANA time zone the series repeats in, or null for UTC.
434
+ * Validated together with `recurrence_rule` and `start_time` on the merged
435
+ * event, so a UTC series can move to local time in one call. Changing
436
+ * `start_time`, `recurrence_rule` or `timezone` keeps each cancelled
437
+ * occurrence on its local date; any with no match come back in
438
+ * `droppedExdates`.
439
+ */
440
+ timezone?: string | null;
407
441
  }
408
442
  interface ListEventsParams {
409
443
  calendarId?: string;
@@ -413,6 +447,7 @@ interface ListEventsParams {
413
447
  status?: EventStatus;
414
448
  source?: 'internal' | 'external_ical';
415
449
  limit?: number;
450
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
416
451
  offset?: number;
417
452
  /**
418
453
  * Expand recurring series into individual occurrence instances within the
@@ -442,6 +477,7 @@ interface ListOrgEventsParams {
442
477
  expand?: boolean;
443
478
  /** Page size, at most 100. */
444
479
  limit?: number;
480
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
445
481
  offset?: number;
446
482
  }
447
483
  /** Options for event delete calls — `RequestOptions` plus recurrence controls. */
@@ -469,6 +505,7 @@ interface BusyBlock {
469
505
  }
470
506
  interface AvailabilityParams {
471
507
  start: string;
508
+ /** At most the plan's max date range after `start` (30 days on Free); longer is a `ValidationError`. */
472
509
  end: string;
473
510
  /** Requested slot length. Preferred over `slot_duration`. */
474
511
  duration?: SlotDuration;
@@ -486,6 +523,7 @@ interface CrossAgentAvailabilityParams {
486
523
  duration?: SlotDuration;
487
524
  /** @deprecated Use `duration` instead. */
488
525
  slot_duration?: SlotDuration;
526
+ /** Extra calendars whose busy time also blocks slots, at most 50. */
489
527
  calendars?: string[];
490
528
  include_busy?: boolean;
491
529
  /** Return slots from usable stale human-calendar cache. Defaults false (fail closed). */
@@ -627,6 +665,7 @@ interface UpdateWebhookParams {
627
665
  }
628
666
  interface ListWebhooksParams {
629
667
  limit?: number;
668
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
630
669
  offset?: number;
631
670
  }
632
671
  /**
@@ -756,6 +795,7 @@ interface ListICalSubscriptionsParams {
756
795
  agentId?: string;
757
796
  status?: 'active' | 'error' | 'paused';
758
797
  limit?: number;
798
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
759
799
  offset?: number;
760
800
  }
761
801
  /**
@@ -821,6 +861,7 @@ interface ListProposalsParams {
821
861
  status?: ProposalStatus;
822
862
  organizer_agent_id?: string;
823
863
  limit?: number;
864
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
824
865
  offset?: number;
825
866
  }
826
867
  type ResolveProposalResponse = {
@@ -1150,6 +1191,11 @@ interface WaitlistJoinParams {
1150
1191
  tos_version?: string;
1151
1192
  /** Optional "what are you building?" note, up to 200 characters. */
1152
1193
  intent?: string;
1194
+ /**
1195
+ * Human-verification token from the console waitlist form's widget (#2103).
1196
+ * Only a browser can obtain one; SDK callers leave it unset.
1197
+ */
1198
+ turnstile_token?: string;
1153
1199
  }
1154
1200
  /**
1155
1201
  * @deprecated The waitlist join no longer returns the entry; see
@@ -1698,6 +1744,10 @@ declare class WaitlistClient {
1698
1744
  * `tos_version` doesn't match the currently-published version.
1699
1745
  * @throws ChronaryError (429 `rate_limit_error`) on the per-IP / per-email
1700
1746
  * waitlist limiter.
1747
+ * @throws ChronaryError (400 `challenge_failed`) while the human check on the
1748
+ * console waitlist form is switched on (#2103). It applies only to that human
1749
+ * form, and an SDK client cannot solve it: an agent signs up with
1750
+ * `agentAuth.signUp` (`POST /v1/agent/sign-up`), which is never challenged.
1701
1751
  */
1702
1752
  join(params: WaitlistJoinParams, options?: RequestOptions): APIPromise<WaitlistJoinResponse>;
1703
1753
  }
@@ -1830,7 +1880,7 @@ declare class BillingClient {
1830
1880
  declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
1831
1881
  declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
1832
1882
 
1833
- declare const VERSION = "0.10.0";
1883
+ declare const VERSION = "0.11.1";
1834
1884
 
1835
1885
  declare class ChronaryError extends Error {
1836
1886
  readonly status: number;
package/dist/index.d.ts CHANGED
@@ -173,6 +173,7 @@ interface ListAgentsParams {
173
173
  /** Add `calendar_count` and `scoped_key_count` to each agent. */
174
174
  include_counts?: boolean;
175
175
  limit?: number;
176
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
176
177
  offset?: number;
177
178
  }
178
179
  interface Calendar {
@@ -214,6 +215,7 @@ interface ListCalendarsParams {
214
215
  /** Case-insensitive substring of the calendar name, or an exact calendar id. Org-wide list only (not with `agentId`). */
215
216
  q?: string;
216
217
  limit?: number;
218
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
217
219
  offset?: number;
218
220
  }
219
221
  interface BookingPage {
@@ -263,6 +265,7 @@ interface UpdateBookingPageParams {
263
265
  }
264
266
  interface ListBookingPagesParams {
265
267
  limit?: number;
268
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
266
269
  offset?: number;
267
270
  /** Only pages bound to this calendar. */
268
271
  calendar_id?: string;
@@ -348,10 +351,25 @@ interface CalendarEvent {
348
351
  recurrenceRule: string | null;
349
352
  /** ISO 8601 starts of individually cancelled occurrences (EXDATE). */
350
353
  recurrenceExdates: string[];
354
+ /** IANA time zone the recurring series repeats in (e.g. "America/Los_Angeles"). null = UTC. */
355
+ timezone: string | null;
351
356
  /** Present only on expanded instances (`expand: true` lists): id of the recurring series master this instance belongs to. */
352
357
  recurringEventId?: string;
353
358
  /** Present only on expanded instances: the occurrence start this instance was generated for. */
354
359
  originalStartTime?: string;
360
+ /** Present only on expanded instances: local start in the series' time zone (`YYYY-MM-DDTHH:mm:ss`, no offset). */
361
+ startLocal?: string;
362
+ /** Present only on expanded instances: UTC offset of `startLocal` (e.g. "-08:00"). */
363
+ utcOffset?: string;
364
+ /** Present only on expanded instances: `"gap"` when a DST gap moved the local start forward, else null. */
365
+ dstAdjusted?: 'gap' | null;
366
+ /**
367
+ * Present only on update responses that moved a recurring series (changed
368
+ * `start_time`, `recurrence_rule` or `timezone`): cancelled occurrences
369
+ * (exdates) with no occurrence left on the same local date, so they were
370
+ * dropped. Ask the user and re-cancel with `occurrence_start` if needed.
371
+ */
372
+ droppedExdates?: string[];
355
373
  holdExpiresAt: string | null;
356
374
  /** Hold conflict priority (0-100). Never null: 0 unless set on a hold. */
357
375
  holdPriority: number;
@@ -382,6 +400,13 @@ interface CreateEventParams {
382
400
  * or ends more than 90 days out on the free plan (Pro allows unbounded).
383
401
  */
384
402
  recurrence_rule?: string;
403
+ /**
404
+ * IANA time zone the recurring series repeats in, e.g. "America/Los_Angeles".
405
+ * The pattern repeats on local wall time (a weekly 16:00 stays 16:00 across
406
+ * daylight-saving changes); BYDAY and a date-only UNTIL are read in this
407
+ * zone. Omit for UTC. All-day events ignore it.
408
+ */
409
+ timezone?: string;
385
410
  }
386
411
  interface UpdateEventParams {
387
412
  title?: string;
@@ -404,6 +429,15 @@ interface UpdateEventParams {
404
429
  * unbounded).
405
430
  */
406
431
  recurrence_rule?: string | null;
432
+ /**
433
+ * Set or change the IANA time zone the series repeats in, or null for UTC.
434
+ * Validated together with `recurrence_rule` and `start_time` on the merged
435
+ * event, so a UTC series can move to local time in one call. Changing
436
+ * `start_time`, `recurrence_rule` or `timezone` keeps each cancelled
437
+ * occurrence on its local date; any with no match come back in
438
+ * `droppedExdates`.
439
+ */
440
+ timezone?: string | null;
407
441
  }
408
442
  interface ListEventsParams {
409
443
  calendarId?: string;
@@ -413,6 +447,7 @@ interface ListEventsParams {
413
447
  status?: EventStatus;
414
448
  source?: 'internal' | 'external_ical';
415
449
  limit?: number;
450
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
416
451
  offset?: number;
417
452
  /**
418
453
  * Expand recurring series into individual occurrence instances within the
@@ -442,6 +477,7 @@ interface ListOrgEventsParams {
442
477
  expand?: boolean;
443
478
  /** Page size, at most 100. */
444
479
  limit?: number;
480
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
445
481
  offset?: number;
446
482
  }
447
483
  /** Options for event delete calls — `RequestOptions` plus recurrence controls. */
@@ -469,6 +505,7 @@ interface BusyBlock {
469
505
  }
470
506
  interface AvailabilityParams {
471
507
  start: string;
508
+ /** At most the plan's max date range after `start` (30 days on Free); longer is a `ValidationError`. */
472
509
  end: string;
473
510
  /** Requested slot length. Preferred over `slot_duration`. */
474
511
  duration?: SlotDuration;
@@ -486,6 +523,7 @@ interface CrossAgentAvailabilityParams {
486
523
  duration?: SlotDuration;
487
524
  /** @deprecated Use `duration` instead. */
488
525
  slot_duration?: SlotDuration;
526
+ /** Extra calendars whose busy time also blocks slots, at most 50. */
489
527
  calendars?: string[];
490
528
  include_busy?: boolean;
491
529
  /** Return slots from usable stale human-calendar cache. Defaults false (fail closed). */
@@ -627,6 +665,7 @@ interface UpdateWebhookParams {
627
665
  }
628
666
  interface ListWebhooksParams {
629
667
  limit?: number;
668
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
630
669
  offset?: number;
631
670
  }
632
671
  /**
@@ -756,6 +795,7 @@ interface ListICalSubscriptionsParams {
756
795
  agentId?: string;
757
796
  status?: 'active' | 'error' | 'paused';
758
797
  limit?: number;
798
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
759
799
  offset?: number;
760
800
  }
761
801
  /**
@@ -821,6 +861,7 @@ interface ListProposalsParams {
821
861
  status?: ProposalStatus;
822
862
  organizer_agent_id?: string;
823
863
  limit?: number;
864
+ /** Rows to skip, at most 10000; page deeper with `cursor` where the list has it. */
824
865
  offset?: number;
825
866
  }
826
867
  type ResolveProposalResponse = {
@@ -1150,6 +1191,11 @@ interface WaitlistJoinParams {
1150
1191
  tos_version?: string;
1151
1192
  /** Optional "what are you building?" note, up to 200 characters. */
1152
1193
  intent?: string;
1194
+ /**
1195
+ * Human-verification token from the console waitlist form's widget (#2103).
1196
+ * Only a browser can obtain one; SDK callers leave it unset.
1197
+ */
1198
+ turnstile_token?: string;
1153
1199
  }
1154
1200
  /**
1155
1201
  * @deprecated The waitlist join no longer returns the entry; see
@@ -1698,6 +1744,10 @@ declare class WaitlistClient {
1698
1744
  * `tos_version` doesn't match the currently-published version.
1699
1745
  * @throws ChronaryError (429 `rate_limit_error`) on the per-IP / per-email
1700
1746
  * waitlist limiter.
1747
+ * @throws ChronaryError (400 `challenge_failed`) while the human check on the
1748
+ * console waitlist form is switched on (#2103). It applies only to that human
1749
+ * form, and an SDK client cannot solve it: an agent signs up with
1750
+ * `agentAuth.signUp` (`POST /v1/agent/sign-up`), which is never challenged.
1701
1751
  */
1702
1752
  join(params: WaitlistJoinParams, options?: RequestOptions): APIPromise<WaitlistJoinResponse>;
1703
1753
  }
@@ -1830,7 +1880,7 @@ declare class BillingClient {
1830
1880
  declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
1831
1881
  declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
1832
1882
 
1833
- declare const VERSION = "0.10.0";
1883
+ declare const VERSION = "0.11.1";
1834
1884
 
1835
1885
  declare class ChronaryError extends Error {
1836
1886
  readonly status: number;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.10.0";
2
+ var VERSION = "0.11.1";
3
3
 
4
4
  // src/error.ts
5
5
  function str(body, key) {
@@ -1274,6 +1274,10 @@ var WaitlistClient = class {
1274
1274
  * `tos_version` doesn't match the currently-published version.
1275
1275
  * @throws ChronaryError (429 `rate_limit_error`) on the per-IP / per-email
1276
1276
  * waitlist limiter.
1277
+ * @throws ChronaryError (400 `challenge_failed`) while the human check on the
1278
+ * console waitlist form is switched on (#2103). It applies only to that human
1279
+ * form, and an SDK client cannot solve it: an agent signs up with
1280
+ * `agentAuth.signUp` (`POST /v1/agent/sign-up`), which is never challenged.
1277
1281
  */
1278
1282
  join(params, options) {
1279
1283
  return this.client.request(