@chronary/sdk 0.6.0 → 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/index.d.cts CHANGED
@@ -180,6 +180,90 @@ interface ListCalendarsParams {
180
180
  limit?: number;
181
181
  offset?: number;
182
182
  }
183
+ interface BookingPage {
184
+ id: string;
185
+ org_id: string;
186
+ calendar_id: string;
187
+ agent_id: string | null;
188
+ slug: string;
189
+ title: string;
190
+ description: string | null;
191
+ duration_minutes: number;
192
+ buffer_minutes: number;
193
+ window_days: number;
194
+ min_notice_minutes: number;
195
+ timezone: string;
196
+ /** Weekly working hours; null = any time inside the window (calendar events still block). */
197
+ availability_constraints: WorkingHours | null;
198
+ active: boolean;
199
+ bookings_count: number;
200
+ /** Public hosted URL to share with humans. */
201
+ booking_url: string;
202
+ created_at: string;
203
+ updated_at: string;
204
+ }
205
+ interface CreateBookingPageParams {
206
+ calendar_id: string;
207
+ title: string;
208
+ description?: string;
209
+ duration_minutes?: number;
210
+ buffer_minutes?: number;
211
+ window_days?: number;
212
+ min_notice_minutes?: number;
213
+ timezone?: string;
214
+ availability_constraints?: WorkingHours | null;
215
+ active?: boolean;
216
+ }
217
+ interface UpdateBookingPageParams {
218
+ title?: string;
219
+ description?: string | null;
220
+ duration_minutes?: number;
221
+ buffer_minutes?: number;
222
+ window_days?: number;
223
+ min_notice_minutes?: number;
224
+ timezone?: string;
225
+ availability_constraints?: WorkingHours | null;
226
+ active?: boolean;
227
+ }
228
+ interface ListBookingPagesParams {
229
+ limit?: number;
230
+ offset?: number;
231
+ }
232
+ /** A single bookable slot returned by the public slots endpoint. */
233
+ interface BookingSlot {
234
+ start: string;
235
+ end: string;
236
+ }
237
+ interface BookingSlotsResponse {
238
+ booking_page: {
239
+ slug: string;
240
+ title: string;
241
+ description: string | null;
242
+ duration_minutes: number;
243
+ timezone: string;
244
+ };
245
+ slots: BookingSlot[];
246
+ }
247
+ interface SubmitBookingParams {
248
+ name: string;
249
+ email: string;
250
+ notes?: string;
251
+ start: string;
252
+ }
253
+ /** Minimal event confirmation returned by the public booking endpoint. The
254
+ * full event (with tenant identifiers) is available to the owning agent via
255
+ * the authenticated events API and the `event.created` webhook. */
256
+ interface BookingSubmissionEvent {
257
+ id: string;
258
+ title: string;
259
+ start_time: string;
260
+ end_time: string;
261
+ status: string;
262
+ }
263
+ interface BookingSubmissionResult {
264
+ booking_page_id: string;
265
+ event: BookingSubmissionEvent;
266
+ }
183
267
  type EventStatus = 'confirmed' | 'tentative' | 'cancelled' | 'hold';
184
268
  interface CalendarEvent {
185
269
  id: string;
@@ -593,6 +677,8 @@ interface Usage {
593
677
  proposals: UsageMetric;
594
678
  /** Active recurring series masters vs. the plan cap (free: 5, Pro: 250; null = unlimited). */
595
679
  recurring_events: UsageMetric;
680
+ /** Active booking pages vs. the plan cap (free: 1, Pro: 25; null = unlimited). */
681
+ booking_pages: UsageMetric;
596
682
  holds: HoldsUsage;
597
683
  cross_calendar_queries: CrossCalendarQueriesUsage;
598
684
  }
@@ -859,6 +945,31 @@ declare class CalendarsClient {
859
945
  deleteAvailabilityRules(id: string, options?: RequestOptions): Promise<void>;
860
946
  }
861
947
 
948
+ declare class BookingPagesClient {
949
+ private readonly client;
950
+ constructor(client: CoreClient);
951
+ create(params: CreateBookingPageParams, options?: RequestOptions): Promise<BookingPage>;
952
+ get(id: string, options?: RequestOptions): Promise<BookingPage>;
953
+ list(params?: ListBookingPagesParams): PageIterator<BookingPage>;
954
+ update(id: string, params: UpdateBookingPageParams, options?: RequestOptions): Promise<BookingPage>;
955
+ delete(id: string, options?: RequestOptions): Promise<void>;
956
+ /**
957
+ * Public: list available slots for a booking page by its slug. No API key is
958
+ * required for this endpoint (the slug is the credential); any key set on the
959
+ * client is simply ignored by the server.
960
+ */
961
+ listSlots(slug: string, params?: {
962
+ from?: string;
963
+ to?: string;
964
+ }, options?: RequestOptions): Promise<BookingSlotsResponse>;
965
+ /**
966
+ * Public: submit a booking against a page's slug. Creates a confirmed event
967
+ * on the underlying calendar and fires an `event.created` webhook with a
968
+ * `booking_page_id` correlation field.
969
+ */
970
+ submit(slug: string, params: SubmitBookingParams, options?: RequestOptions): Promise<BookingSubmissionResult>;
971
+ }
972
+
862
973
  declare class EventsClient {
863
974
  private readonly client;
864
975
  constructor(client: CoreClient);
@@ -1131,7 +1242,7 @@ declare class ConnectionLinksClient {
1131
1242
  declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
1132
1243
  declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
1133
1244
 
1134
- declare const VERSION = "0.6.0";
1245
+ declare const VERSION = "0.7.1";
1135
1246
 
1136
1247
  declare class ChronaryError extends Error {
1137
1248
  readonly status: number;
@@ -1166,6 +1277,7 @@ declare class ConnectionError extends ChronaryError {
1166
1277
  declare class Chronary {
1167
1278
  readonly agents: AgentsClient;
1168
1279
  readonly calendars: CalendarsClient;
1280
+ readonly bookingPages: BookingPagesClient;
1169
1281
  readonly events: EventsClient;
1170
1282
  readonly availability: AvailabilityClient;
1171
1283
  readonly webhooks: WebhooksClient;
@@ -1188,4 +1300,4 @@ declare class Chronary {
1188
1300
  };
1189
1301
  }
1190
1302
 
1191
- export { APIPromise, type AcceptTermsParams, type AcceptTermsResult, type Agent, type AgentSignUpExistingOrgResponse, type AgentSignUpNewOrgResponse, type AgentSignUpParams, type AgentSignUpResponse, type AgentStatus, type AgentVerifyParams, type AgentVerifyResponse, type AppInfo, type AuditLogEntry, type AuditLogResponse, AuthenticationError, type AvailabilityParams, type AvailabilityResponse, type AvailabilityRules, type AvailabilitySlot, type AvailabilitySourceState, type AvailabilitySources, type AvailabilityState, type AvailabilityWarning, type BusyBlock, type Calendar, type CalendarAvailabilityResponse, type CalendarContext, type CalendarEvent, type CancelProposalResponse, Chronary, type ChronaryConfig, ChronaryError, ConnectionError, type ConnectionLink, ConnectionLinksClient, CoreClient, type CreateAgentParams, type CreateCalendarParams, type CreateConnectionLinkParams, type CreateEventParams, type CreateICalSubscriptionParams, type CreateProposalParams, type CreateScopedApiKeyParams, type CreateWebhookParams, type CreatedScopedApiKey, type CrossAgentAvailabilityParams, type DataExport, type DeleteEventOptions, type FeedbackAcceptedResponse, type FeedbackType, type ICalSubscription, type ListAgentsParams, type ListAuditLogParams, type ListCalendarsParams, type ListEventsParams, type ListICalSubscriptionsParams, type ListProposalsParams, type ListWebhookDeliveriesParams, type ListWebhooksParams, type LogLevel, NotFoundError, type Page, PageIterator, type PageResponse, type Plan, type PlanId, type PlanLimits, type PlansListResponse, type Proposal, type ProposalResponse, type ProposalResponseAction, type ProposalSlot, type ProposalStatus, type ProposalSummary, QuotaExceededError, type QuotaSnapshot, RateLimitError, type RawResponse, type RequestOptions, type ResolveProposalResponse, type RespondToProposalParams, type ScopedApiKey, type SetAvailabilityRulesParams, type SlotDuration, type SubmitFeedbackParams, TimeoutError, type UpdateAgentParams, type UpdateCalendarParams, type UpdateEventParams, type UpdateICalSubscriptionParams, type UpdateWebhookParams, type Usage, type UsageMetric, VERSION, ValidationError, type VerifyOptions, type WaitlistJoinParams, type WaitlistJoinResponse, type WaitlistedOrg, type Webhook, type WebhookDelivery, type WebhookDeliveryListResponse, type WebhookDeliveryStats, type WebhookEvent, type WebhookEventType, type WithResponse, type WorkingHours, type WorkingHoursDay, constructEvent, Chronary as default, isAgentSignUpNewOrg, verifySignature };
1303
+ export { APIPromise, type AcceptTermsParams, type AcceptTermsResult, type Agent, type AgentSignUpExistingOrgResponse, type AgentSignUpNewOrgResponse, type AgentSignUpParams, type AgentSignUpResponse, type AgentStatus, type AgentVerifyParams, type AgentVerifyResponse, type AppInfo, type AuditLogEntry, type AuditLogResponse, AuthenticationError, type AvailabilityParams, type AvailabilityResponse, type AvailabilityRules, type AvailabilitySlot, type AvailabilitySourceState, type AvailabilitySources, type AvailabilityState, type AvailabilityWarning, type BookingPage, BookingPagesClient, type BookingSlot, type BookingSlotsResponse, type BookingSubmissionEvent, type BookingSubmissionResult, type BusyBlock, type Calendar, type CalendarAvailabilityResponse, type CalendarContext, type CalendarEvent, type CancelProposalResponse, Chronary, type ChronaryConfig, ChronaryError, ConnectionError, type ConnectionLink, ConnectionLinksClient, CoreClient, type CreateAgentParams, type CreateBookingPageParams, type CreateCalendarParams, type CreateConnectionLinkParams, type CreateEventParams, type CreateICalSubscriptionParams, type CreateProposalParams, type CreateScopedApiKeyParams, type CreateWebhookParams, type CreatedScopedApiKey, type CrossAgentAvailabilityParams, type DataExport, type DeleteEventOptions, type FeedbackAcceptedResponse, type FeedbackType, type ICalSubscription, type ListAgentsParams, type ListAuditLogParams, type ListBookingPagesParams, type ListCalendarsParams, type ListEventsParams, type ListICalSubscriptionsParams, type ListProposalsParams, type ListWebhookDeliveriesParams, type ListWebhooksParams, type LogLevel, NotFoundError, type Page, PageIterator, type PageResponse, type Plan, type PlanId, type PlanLimits, type PlansListResponse, type Proposal, type ProposalResponse, type ProposalResponseAction, type ProposalSlot, type ProposalStatus, type ProposalSummary, QuotaExceededError, type QuotaSnapshot, RateLimitError, type RawResponse, type RequestOptions, type ResolveProposalResponse, type RespondToProposalParams, type ScopedApiKey, type SetAvailabilityRulesParams, type SlotDuration, type SubmitBookingParams, type SubmitFeedbackParams, TimeoutError, type UpdateAgentParams, type UpdateBookingPageParams, type UpdateCalendarParams, type UpdateEventParams, type UpdateICalSubscriptionParams, type UpdateWebhookParams, type Usage, type UsageMetric, VERSION, ValidationError, type VerifyOptions, type WaitlistJoinParams, type WaitlistJoinResponse, type WaitlistedOrg, type Webhook, type WebhookDelivery, type WebhookDeliveryListResponse, type WebhookDeliveryStats, type WebhookEvent, type WebhookEventType, type WithResponse, type WorkingHours, type WorkingHoursDay, constructEvent, Chronary as default, isAgentSignUpNewOrg, verifySignature };
package/dist/index.d.ts CHANGED
@@ -180,6 +180,90 @@ interface ListCalendarsParams {
180
180
  limit?: number;
181
181
  offset?: number;
182
182
  }
183
+ interface BookingPage {
184
+ id: string;
185
+ org_id: string;
186
+ calendar_id: string;
187
+ agent_id: string | null;
188
+ slug: string;
189
+ title: string;
190
+ description: string | null;
191
+ duration_minutes: number;
192
+ buffer_minutes: number;
193
+ window_days: number;
194
+ min_notice_minutes: number;
195
+ timezone: string;
196
+ /** Weekly working hours; null = any time inside the window (calendar events still block). */
197
+ availability_constraints: WorkingHours | null;
198
+ active: boolean;
199
+ bookings_count: number;
200
+ /** Public hosted URL to share with humans. */
201
+ booking_url: string;
202
+ created_at: string;
203
+ updated_at: string;
204
+ }
205
+ interface CreateBookingPageParams {
206
+ calendar_id: string;
207
+ title: string;
208
+ description?: string;
209
+ duration_minutes?: number;
210
+ buffer_minutes?: number;
211
+ window_days?: number;
212
+ min_notice_minutes?: number;
213
+ timezone?: string;
214
+ availability_constraints?: WorkingHours | null;
215
+ active?: boolean;
216
+ }
217
+ interface UpdateBookingPageParams {
218
+ title?: string;
219
+ description?: string | null;
220
+ duration_minutes?: number;
221
+ buffer_minutes?: number;
222
+ window_days?: number;
223
+ min_notice_minutes?: number;
224
+ timezone?: string;
225
+ availability_constraints?: WorkingHours | null;
226
+ active?: boolean;
227
+ }
228
+ interface ListBookingPagesParams {
229
+ limit?: number;
230
+ offset?: number;
231
+ }
232
+ /** A single bookable slot returned by the public slots endpoint. */
233
+ interface BookingSlot {
234
+ start: string;
235
+ end: string;
236
+ }
237
+ interface BookingSlotsResponse {
238
+ booking_page: {
239
+ slug: string;
240
+ title: string;
241
+ description: string | null;
242
+ duration_minutes: number;
243
+ timezone: string;
244
+ };
245
+ slots: BookingSlot[];
246
+ }
247
+ interface SubmitBookingParams {
248
+ name: string;
249
+ email: string;
250
+ notes?: string;
251
+ start: string;
252
+ }
253
+ /** Minimal event confirmation returned by the public booking endpoint. The
254
+ * full event (with tenant identifiers) is available to the owning agent via
255
+ * the authenticated events API and the `event.created` webhook. */
256
+ interface BookingSubmissionEvent {
257
+ id: string;
258
+ title: string;
259
+ start_time: string;
260
+ end_time: string;
261
+ status: string;
262
+ }
263
+ interface BookingSubmissionResult {
264
+ booking_page_id: string;
265
+ event: BookingSubmissionEvent;
266
+ }
183
267
  type EventStatus = 'confirmed' | 'tentative' | 'cancelled' | 'hold';
184
268
  interface CalendarEvent {
185
269
  id: string;
@@ -593,6 +677,8 @@ interface Usage {
593
677
  proposals: UsageMetric;
594
678
  /** Active recurring series masters vs. the plan cap (free: 5, Pro: 250; null = unlimited). */
595
679
  recurring_events: UsageMetric;
680
+ /** Active booking pages vs. the plan cap (free: 1, Pro: 25; null = unlimited). */
681
+ booking_pages: UsageMetric;
596
682
  holds: HoldsUsage;
597
683
  cross_calendar_queries: CrossCalendarQueriesUsage;
598
684
  }
@@ -859,6 +945,31 @@ declare class CalendarsClient {
859
945
  deleteAvailabilityRules(id: string, options?: RequestOptions): Promise<void>;
860
946
  }
861
947
 
948
+ declare class BookingPagesClient {
949
+ private readonly client;
950
+ constructor(client: CoreClient);
951
+ create(params: CreateBookingPageParams, options?: RequestOptions): Promise<BookingPage>;
952
+ get(id: string, options?: RequestOptions): Promise<BookingPage>;
953
+ list(params?: ListBookingPagesParams): PageIterator<BookingPage>;
954
+ update(id: string, params: UpdateBookingPageParams, options?: RequestOptions): Promise<BookingPage>;
955
+ delete(id: string, options?: RequestOptions): Promise<void>;
956
+ /**
957
+ * Public: list available slots for a booking page by its slug. No API key is
958
+ * required for this endpoint (the slug is the credential); any key set on the
959
+ * client is simply ignored by the server.
960
+ */
961
+ listSlots(slug: string, params?: {
962
+ from?: string;
963
+ to?: string;
964
+ }, options?: RequestOptions): Promise<BookingSlotsResponse>;
965
+ /**
966
+ * Public: submit a booking against a page's slug. Creates a confirmed event
967
+ * on the underlying calendar and fires an `event.created` webhook with a
968
+ * `booking_page_id` correlation field.
969
+ */
970
+ submit(slug: string, params: SubmitBookingParams, options?: RequestOptions): Promise<BookingSubmissionResult>;
971
+ }
972
+
862
973
  declare class EventsClient {
863
974
  private readonly client;
864
975
  constructor(client: CoreClient);
@@ -1131,7 +1242,7 @@ declare class ConnectionLinksClient {
1131
1242
  declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
1132
1243
  declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
1133
1244
 
1134
- declare const VERSION = "0.6.0";
1245
+ declare const VERSION = "0.7.1";
1135
1246
 
1136
1247
  declare class ChronaryError extends Error {
1137
1248
  readonly status: number;
@@ -1166,6 +1277,7 @@ declare class ConnectionError extends ChronaryError {
1166
1277
  declare class Chronary {
1167
1278
  readonly agents: AgentsClient;
1168
1279
  readonly calendars: CalendarsClient;
1280
+ readonly bookingPages: BookingPagesClient;
1169
1281
  readonly events: EventsClient;
1170
1282
  readonly availability: AvailabilityClient;
1171
1283
  readonly webhooks: WebhooksClient;
@@ -1188,4 +1300,4 @@ declare class Chronary {
1188
1300
  };
1189
1301
  }
1190
1302
 
1191
- export { APIPromise, type AcceptTermsParams, type AcceptTermsResult, type Agent, type AgentSignUpExistingOrgResponse, type AgentSignUpNewOrgResponse, type AgentSignUpParams, type AgentSignUpResponse, type AgentStatus, type AgentVerifyParams, type AgentVerifyResponse, type AppInfo, type AuditLogEntry, type AuditLogResponse, AuthenticationError, type AvailabilityParams, type AvailabilityResponse, type AvailabilityRules, type AvailabilitySlot, type AvailabilitySourceState, type AvailabilitySources, type AvailabilityState, type AvailabilityWarning, type BusyBlock, type Calendar, type CalendarAvailabilityResponse, type CalendarContext, type CalendarEvent, type CancelProposalResponse, Chronary, type ChronaryConfig, ChronaryError, ConnectionError, type ConnectionLink, ConnectionLinksClient, CoreClient, type CreateAgentParams, type CreateCalendarParams, type CreateConnectionLinkParams, type CreateEventParams, type CreateICalSubscriptionParams, type CreateProposalParams, type CreateScopedApiKeyParams, type CreateWebhookParams, type CreatedScopedApiKey, type CrossAgentAvailabilityParams, type DataExport, type DeleteEventOptions, type FeedbackAcceptedResponse, type FeedbackType, type ICalSubscription, type ListAgentsParams, type ListAuditLogParams, type ListCalendarsParams, type ListEventsParams, type ListICalSubscriptionsParams, type ListProposalsParams, type ListWebhookDeliveriesParams, type ListWebhooksParams, type LogLevel, NotFoundError, type Page, PageIterator, type PageResponse, type Plan, type PlanId, type PlanLimits, type PlansListResponse, type Proposal, type ProposalResponse, type ProposalResponseAction, type ProposalSlot, type ProposalStatus, type ProposalSummary, QuotaExceededError, type QuotaSnapshot, RateLimitError, type RawResponse, type RequestOptions, type ResolveProposalResponse, type RespondToProposalParams, type ScopedApiKey, type SetAvailabilityRulesParams, type SlotDuration, type SubmitFeedbackParams, TimeoutError, type UpdateAgentParams, type UpdateCalendarParams, type UpdateEventParams, type UpdateICalSubscriptionParams, type UpdateWebhookParams, type Usage, type UsageMetric, VERSION, ValidationError, type VerifyOptions, type WaitlistJoinParams, type WaitlistJoinResponse, type WaitlistedOrg, type Webhook, type WebhookDelivery, type WebhookDeliveryListResponse, type WebhookDeliveryStats, type WebhookEvent, type WebhookEventType, type WithResponse, type WorkingHours, type WorkingHoursDay, constructEvent, Chronary as default, isAgentSignUpNewOrg, verifySignature };
1303
+ export { APIPromise, type AcceptTermsParams, type AcceptTermsResult, type Agent, type AgentSignUpExistingOrgResponse, type AgentSignUpNewOrgResponse, type AgentSignUpParams, type AgentSignUpResponse, type AgentStatus, type AgentVerifyParams, type AgentVerifyResponse, type AppInfo, type AuditLogEntry, type AuditLogResponse, AuthenticationError, type AvailabilityParams, type AvailabilityResponse, type AvailabilityRules, type AvailabilitySlot, type AvailabilitySourceState, type AvailabilitySources, type AvailabilityState, type AvailabilityWarning, type BookingPage, BookingPagesClient, type BookingSlot, type BookingSlotsResponse, type BookingSubmissionEvent, type BookingSubmissionResult, type BusyBlock, type Calendar, type CalendarAvailabilityResponse, type CalendarContext, type CalendarEvent, type CancelProposalResponse, Chronary, type ChronaryConfig, ChronaryError, ConnectionError, type ConnectionLink, ConnectionLinksClient, CoreClient, type CreateAgentParams, type CreateBookingPageParams, type CreateCalendarParams, type CreateConnectionLinkParams, type CreateEventParams, type CreateICalSubscriptionParams, type CreateProposalParams, type CreateScopedApiKeyParams, type CreateWebhookParams, type CreatedScopedApiKey, type CrossAgentAvailabilityParams, type DataExport, type DeleteEventOptions, type FeedbackAcceptedResponse, type FeedbackType, type ICalSubscription, type ListAgentsParams, type ListAuditLogParams, type ListBookingPagesParams, type ListCalendarsParams, type ListEventsParams, type ListICalSubscriptionsParams, type ListProposalsParams, type ListWebhookDeliveriesParams, type ListWebhooksParams, type LogLevel, NotFoundError, type Page, PageIterator, type PageResponse, type Plan, type PlanId, type PlanLimits, type PlansListResponse, type Proposal, type ProposalResponse, type ProposalResponseAction, type ProposalSlot, type ProposalStatus, type ProposalSummary, QuotaExceededError, type QuotaSnapshot, RateLimitError, type RawResponse, type RequestOptions, type ResolveProposalResponse, type RespondToProposalParams, type ScopedApiKey, type SetAvailabilityRulesParams, type SlotDuration, type SubmitBookingParams, type SubmitFeedbackParams, TimeoutError, type UpdateAgentParams, type UpdateBookingPageParams, type UpdateCalendarParams, type UpdateEventParams, type UpdateICalSubscriptionParams, type UpdateWebhookParams, type Usage, type UsageMetric, VERSION, ValidationError, type VerifyOptions, type WaitlistJoinParams, type WaitlistJoinResponse, type WaitlistedOrg, type Webhook, type WebhookDelivery, type WebhookDeliveryListResponse, type WebhookDeliveryStats, type WebhookEvent, type WebhookEventType, type WithResponse, type WorkingHours, type WorkingHoursDay, constructEvent, Chronary as default, isAgentSignUpNewOrg, verifySignature };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.6.0";
2
+ var VERSION = "0.7.1";
3
3
 
4
4
  // src/error.ts
5
5
  var ChronaryError = class extends Error {
@@ -488,6 +488,53 @@ var CalendarsClient = class {
488
488
  }
489
489
  };
490
490
 
491
+ // src/resources/booking-pages.ts
492
+ var BookingPagesClient = class {
493
+ constructor(client) {
494
+ this.client = client;
495
+ }
496
+ client;
497
+ async create(params, options) {
498
+ return this.client.request("POST", "/v1/booking-pages", params, void 0, options);
499
+ }
500
+ async get(id, options) {
501
+ return this.client.request("GET", `/v1/booking-pages/${id}`, void 0, void 0, options);
502
+ }
503
+ list(params = {}) {
504
+ const { limit = 50, offset = 0 } = params;
505
+ return new PageIterator(
506
+ (offset2, l) => this.client.request("GET", "/v1/booking-pages", void 0, {
507
+ limit: l,
508
+ offset: offset2
509
+ }),
510
+ limit,
511
+ offset
512
+ );
513
+ }
514
+ async update(id, params, options) {
515
+ return this.client.request("PATCH", `/v1/booking-pages/${id}`, params, void 0, options);
516
+ }
517
+ async delete(id, options) {
518
+ await this.client.request("DELETE", `/v1/booking-pages/${id}`, void 0, void 0, options);
519
+ }
520
+ /**
521
+ * Public: list available slots for a booking page by its slug. No API key is
522
+ * required for this endpoint (the slug is the credential); any key set on the
523
+ * client is simply ignored by the server.
524
+ */
525
+ async listSlots(slug, params = {}, options) {
526
+ return this.client.request("GET", `/book/${slug}/slots`, void 0, params, options);
527
+ }
528
+ /**
529
+ * Public: submit a booking against a page's slug. Creates a confirmed event
530
+ * on the underlying calendar and fires an `event.created` webhook with a
531
+ * `booking_page_id` correlation field.
532
+ */
533
+ async submit(slug, params, options) {
534
+ return this.client.request("POST", `/book/${slug}`, params, void 0, options);
535
+ }
536
+ };
537
+
491
538
  // src/resources/events.ts
492
539
  var EventsClient = class {
493
540
  constructor(client) {
@@ -1217,6 +1264,7 @@ async function constructEvent(rawBody, headers, secret, options) {
1217
1264
  var Chronary = class {
1218
1265
  agents;
1219
1266
  calendars;
1267
+ bookingPages;
1220
1268
  events;
1221
1269
  availability;
1222
1270
  webhooks;
@@ -1236,6 +1284,7 @@ var Chronary = class {
1236
1284
  const client = new CoreClient(config);
1237
1285
  this.agents = new AgentsClient(client);
1238
1286
  this.calendars = new CalendarsClient(client);
1287
+ this.bookingPages = new BookingPagesClient(client);
1239
1288
  this.events = new EventsClient(client);
1240
1289
  this.availability = new AvailabilityClient(client);
1241
1290
  this.webhooks = new WebhooksClient(client);
@@ -1261,6 +1310,7 @@ var index_default = Chronary;
1261
1310
  export {
1262
1311
  APIPromise,
1263
1312
  AuthenticationError,
1313
+ BookingPagesClient,
1264
1314
  Chronary,
1265
1315
  ChronaryError,
1266
1316
  ConnectionError,