@chronary/sdk 0.10.0 → 0.11.0
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/CHANGELOG.md +6 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 = {
|
|
@@ -1830,7 +1871,7 @@ declare class BillingClient {
|
|
|
1830
1871
|
declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
|
|
1831
1872
|
declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
1832
1873
|
|
|
1833
|
-
declare const VERSION = "0.
|
|
1874
|
+
declare const VERSION = "0.11.0";
|
|
1834
1875
|
|
|
1835
1876
|
declare class ChronaryError extends Error {
|
|
1836
1877
|
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 = {
|
|
@@ -1830,7 +1871,7 @@ declare class BillingClient {
|
|
|
1830
1871
|
declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
|
|
1831
1872
|
declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
1832
1873
|
|
|
1833
|
-
declare const VERSION = "0.
|
|
1874
|
+
declare const VERSION = "0.11.0";
|
|
1834
1875
|
|
|
1835
1876
|
declare class ChronaryError extends Error {
|
|
1836
1877
|
readonly status: number;
|
package/dist/index.js
CHANGED