@ordinatio/scheduling-api 0.7.0 → 0.8.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 CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 (prepared 2026-11-18)
4
+
5
+ - **New: API keys for outside tools.** `host.apiKeys: { db }` lets a request carry `Authorization: Bearer osk_...` and act as that key's business: the router checks the key before any route runs, makes it the request's staff (counted against the key's own rate limit, not the person's), refuses a `READ` key for anything but `GET` with 403, refuses every key on the routes that need a person at a browser (the calendar-connect routes, marked `personOnly` in the route table) with 403, never looks at a key on a public route, and answers 401 for a revoked or unknown key. A header that does not start `osk_` is left to your own sign-in. New admin routes `GET` and `POST /admin/api-keys` and `DELETE /admin/api-keys/[id]` (the secret is in the answer to `POST` once, with `Cache-Control: no-store`; the activity log records the key's id and access, never the secret). A request made with a key cannot manage keys. The three routes have no agent tools, on purpose. Needs the `OrganizationApiKey` table and `@ordinatio/scheduling` 0.7.0 (now the required version). `bearerKeyOf` and the `ApiKeySettings` type are exported. `host.apiKeys.db()` must be the database your staff context uses, because keys are made through that one and looked up before the business is known.
3
6
  ## 0.7.0 (prepared 2026-11-17)
4
7
 
5
8
  - **New route: `GET /admin/brand/sending-domain?domain=...`.** Admins get the record-by-record check of a sending domain (found, missing, wrong or unknown, with the exact name and a plain sentence for each) so a setup screen can show what to fix. It is rate limited as a settings action and has no agent tool (it makes the server look up names under a domain the caller chooses). The host turns it on with `brand.checkSendingDomain` (pass the verifier's `check`); without it the route answers 501. A value that is not a domain answers 400 before any lookup. It changes nothing.
package/README.md CHANGED
@@ -432,6 +432,14 @@ It returns `reply`, `opt-out`, `opt-in`, `delivery` or `ignored`; saving them is
432
432
  For Twilio, pass the raw form body, the headers and the exact address Twilio calls:
433
433
  `handleTwilioWebhook(rawBody, request.headers, { authToken, url: 'https://your.app/hooks/sms' })`.
434
434
 
435
+ ## API keys for outside tools
436
+
437
+ Let an automation service, a script or an AI assistant act for one business without a person signing in. Switch it on with `host.apiKeys: { db: async () => db }`, where `db` is the database that holds the engine's `OrganizationApiKey` table (run its migration first). It must be the same database your staff context points at, because the key routes make keys through that one. Without `host.apiKeys` a Bearer key is ignored and the key routes answer 501.
438
+
439
+ Admins then get `GET /admin/api-keys`, `POST /admin/api-keys` (`{ name, access }`) and `DELETE /admin/api-keys/[id]`. `access` is `READ` (look things up only) or `FULL`. The secret, which starts `osk_`, is in the answer to `POST` once and cannot be read again; only a hash is stored. A business may have 25 live keys.
440
+
441
+ A tool sends `Authorization: Bearer osk_...` and the request runs as that business's admin, counted against the key's own rate limit. A request with a `READ` key is refused with 403 unless it is a `GET`, whatever the route. The calendar-connect routes (`/calendars/connect-google`, `/calendars/connect-outlook` and their callbacks) need a person at a browser, so they refuse every API key, `FULL` too; a route marks itself like that with `personOnly: true`. Public routes never look at a key. A revoked or unknown key is a 401. A request made with a key cannot manage keys, so a key cannot make more keys. A header that does not start `osk_` is left for your own sign-in. Rows a key writes name the key (`api-key:<id>`) as the person, so a column that must point at a real user needs your own handling. The key routes have no agent tools: an agent should never handle credentials.
442
+
435
443
  ## Agent tools
436
444
 
437
445
  An AI agent can run scheduling through the same routes. Import the tool descriptions and hand them to any agent runner:
@@ -1,4 +1,4 @@
1
- import { H as HttpMethod } from '../routes-LaFljBCF.mjs';
1
+ import { H as HttpMethod } from '../routes-mii9tsbA.mjs';
2
2
  import '@ordinatio/scheduling';
3
3
 
4
4
  interface SchedulingToolParam {
@@ -1,4 +1,4 @@
1
- import { H as HttpMethod } from '../routes-LaFljBCF.js';
1
+ import { H as HttpMethod } from '../routes-mii9tsbA.js';
2
2
  import '@ordinatio/scheduling';
3
3
 
4
4
  interface SchedulingToolParam {
@@ -2361,6 +2361,9 @@ var WEBHOOK_TOOLS = [
2361
2361
 
2362
2362
  // src/agent/coverage.ts
2363
2363
  var SCHEDULING_AGENT_EXCLUDED = {
2364
+ "GET /admin/api-keys": "Lists credentials. Agents do not handle API keys; the owner manages them in the dashboard.",
2365
+ "POST /admin/api-keys": "Makes a credential whose secret would be shown in the agent's own transcript. The owner makes keys in the dashboard.",
2366
+ "DELETE /admin/api-keys/[id]": "Credential management is left to the owner in the dashboard, not to an agent.",
2364
2367
  "POST /coupons/validate": "Advisory price check for a visitor's booking page. It changes nothing but is a POST, and only GET tools run without approval; staff read a coupon's terms with the coupon list tool.",
2365
2368
  "POST /waitlist": "A client joining the waitlist for themselves; the answer holds their own private link token, which an agent should never be handed.",
2366
2369
  "DELETE /waitlist": "A client leaving the waitlist from their own private link; staff remove an entry with the remove-waitlist-entry tool.",
@@ -2332,6 +2332,9 @@ var WEBHOOK_TOOLS = [
2332
2332
 
2333
2333
  // src/agent/coverage.ts
2334
2334
  var SCHEDULING_AGENT_EXCLUDED = {
2335
+ "GET /admin/api-keys": "Lists credentials. Agents do not handle API keys; the owner manages them in the dashboard.",
2336
+ "POST /admin/api-keys": "Makes a credential whose secret would be shown in the agent's own transcript. The owner makes keys in the dashboard.",
2337
+ "DELETE /admin/api-keys/[id]": "Credential management is left to the owner in the dashboard, not to an agent.",
2335
2338
  "POST /coupons/validate": "Advisory price check for a visitor's booking page. It changes nothing but is a POST, and only GET tools run without approval; staff read a coupon's terms with the coupon list tool.",
2336
2339
  "POST /waitlist": "A client joining the waitlist for themselves; the answer holds their own private link token, which an agent should never be handed.",
2337
2340
  "DELETE /waitlist": "A client leaving the waitlist from their own private link; staff remove an entry with the remove-waitlist-entry tool.",
@@ -437,6 +437,13 @@ var TextSettingsSchema = z9.object({
437
437
  enabled: z9.boolean().optional()
438
438
  }).strict();
439
439
 
440
+ // src/schemas/api-key.schema.ts
441
+ import { z as z10 } from "zod";
442
+ var ApiKeySchema = z10.object({
443
+ name: z10.string().max(200),
444
+ access: z10.string().max(20)
445
+ }).strict();
446
+
440
447
  export {
441
448
  IntakeFormFieldSchema,
442
449
  CreateAppointmentTypeSchema,
@@ -476,5 +483,6 @@ export {
476
483
  PrivacySubjectSchema,
477
484
  PrivacyEraseSchema,
478
485
  BrandSchema,
479
- TextSettingsSchema
486
+ TextSettingsSchema,
487
+ ApiKeySchema
480
488
  };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { S as SchedulingHost, R as Route, H as HttpMethod, a as RateLimitTier, b as SchedulingCache, P as PublicBookingResolver, c as PublicOrganizationResolver, A as AvailabilityCache, B as BalancePaymentControl, d as SendingDomainCheck, e as SendingDomainRecord, f as SendingDomainRecords, D as DnsResolver, g as StaffResolver, h as StaffContext } from './routes-LaFljBCF.mjs';
2
- export { i as ActivityEntry, j as ActivityLog, k as AppointmentEventSink, l as BookingClientResolver, m as BookingPolicy, n as BrandSettings, C as CacheOptions, o as CalendarConnectOutcome, p as CalendarConnector, q as CalendarConnectors, r as CalendarVisibility, I as InternalAccess, N as NoShowPolicy, s as PrivacySettings, t as PublicBookingContext, u as PublicBookingKind, v as PublicOrganization, w as RecordCheck, x as RecordStatus, y as ResolvedHost, z as RouteContext, E as RouteHandler, F as RoutingFormSettings, G as StaffDirectory, W as WaitlistSettings, J as WebhookSettings, K as WorkerCommands, L as checkSendingDomain, M as normalizeSendingDomain } from './routes-LaFljBCF.mjs';
1
+ import { S as SchedulingHost, R as Route, H as HttpMethod, a as RateLimitTier, b as SchedulingCache, P as PublicBookingResolver, c as PublicOrganizationResolver, A as AvailabilityCache, B as BalancePaymentControl, d as SendingDomainCheck, e as SendingDomainRecord, f as SendingDomainRecords, D as DnsResolver, g as StaffResolver, h as StaffContext } from './routes-mii9tsbA.mjs';
2
+ export { i as ActivityEntry, j as ActivityLog, k as ApiKeySettings, l as AppointmentEventSink, m as BookingClientResolver, n as BookingPolicy, o as BrandSettings, C as CacheOptions, p as CalendarConnectOutcome, q as CalendarConnector, r as CalendarConnectors, s as CalendarVisibility, I as InternalAccess, N as NoShowPolicy, t as PrivacySettings, u as PublicBookingContext, v as PublicBookingKind, w as PublicOrganization, x as RecordCheck, y as RecordStatus, z as ResolvedHost, E as RouteContext, F as RouteHandler, G as RoutingFormSettings, J as StaffDirectory, W as WaitlistSettings, K as WebhookSettings, L as WorkerCommands, M as checkSendingDomain, O as normalizeSendingDomain } from './routes-mii9tsbA.mjs';
3
3
  import { SchedulingDb, PaymentAdapter, NotificationAdapter, AppointmentStatus, CalendarSyncAdapter, CalendarEventRef, CalendarEvent } from '@ordinatio/scheduling';
4
- export { BookingPageConfig, BookingPageConfigSchema, BookingPageTheme, BookingPageThemeSchema, BrandSchema, CancelRecurringScopeSchema, CancelRecurringSeriesInput, CancelRecurringSeriesSchema, CreateAppointmentCategoryInput, CreateAppointmentCategorySchema, CreateAppointmentTypeInput, CreateAppointmentTypeSchema, CreateAvailabilityRuleInput, CreateAvailabilityRuleSchema, CreateCalendarInput, CreateCalendarSchema, CreateCouponCodeInput, CreateCouponCodeSchema, CreateNotificationTemplateInput, CreateNotificationTemplateSchema, CreatePackagePurchaseInput, CreatePackagePurchaseSchema, CreateRecurringSeriesInput, CreateRecurringSeriesSchema, CreateRoutingFormInput, CreateRoutingFormSchema, CreateServicePackageInput, CreateServicePackageSchema, CreateWebhookEndpointInput, CreateWebhookEndpointSchema, DEFAULT_CANCELLATION_POLICY, IntakeFormFieldSchema, NoShowPrevention, NoShowPreventionAction, NoShowPreventionActionSchema, NotificationChannelSchema, NotificationTriggerSchema, OrgCancellationPolicy, OrgCancellationPolicySchema, PrivacyEraseSchema, PrivacySubjectSchema, RecurringFrequencySchema, RouteClientSchema, SLOT_GRANULARITY_DEFAULT, SLOT_GRANULARITY_OPTIONS, SlotGranularityMinutes, TestRoutingFormSchema, TextSettingsSchema, UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, UpdateBookingPageInput, UpdateBookingPageSchema, UpdateCalendarInput, UpdateCalendarSchema, UpdateCouponCodeInput, UpdateCouponCodeSchema, UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, UpdateRoutingFormInput, UpdateRoutingFormSchema, UpdateServicePackageInput, UpdateServicePackageSchema } from './schemas/index.mjs';
4
+ export { ApiKeySchema, BookingPageConfig, BookingPageConfigSchema, BookingPageTheme, BookingPageThemeSchema, BrandSchema, CancelRecurringScopeSchema, CancelRecurringSeriesInput, CancelRecurringSeriesSchema, CreateAppointmentCategoryInput, CreateAppointmentCategorySchema, CreateAppointmentTypeInput, CreateAppointmentTypeSchema, CreateAvailabilityRuleInput, CreateAvailabilityRuleSchema, CreateCalendarInput, CreateCalendarSchema, CreateCouponCodeInput, CreateCouponCodeSchema, CreateNotificationTemplateInput, CreateNotificationTemplateSchema, CreatePackagePurchaseInput, CreatePackagePurchaseSchema, CreateRecurringSeriesInput, CreateRecurringSeriesSchema, CreateRoutingFormInput, CreateRoutingFormSchema, CreateServicePackageInput, CreateServicePackageSchema, CreateWebhookEndpointInput, CreateWebhookEndpointSchema, DEFAULT_CANCELLATION_POLICY, IntakeFormFieldSchema, NoShowPrevention, NoShowPreventionAction, NoShowPreventionActionSchema, NotificationChannelSchema, NotificationTriggerSchema, OrgCancellationPolicy, OrgCancellationPolicySchema, PrivacyEraseSchema, PrivacySubjectSchema, RecurringFrequencySchema, RouteClientSchema, SLOT_GRANULARITY_DEFAULT, SLOT_GRANULARITY_OPTIONS, SlotGranularityMinutes, TestRoutingFormSchema, TextSettingsSchema, UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, UpdateBookingPageInput, UpdateBookingPageSchema, UpdateCalendarInput, UpdateCalendarSchema, UpdateCouponCodeInput, UpdateCouponCodeSchema, UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, UpdateRoutingFormInput, UpdateRoutingFormSchema, UpdateServicePackageInput, UpdateServicePackageSchema } from './schemas/index.mjs';
5
5
  import { IncomingMessage, ServerResponse } from 'node:http';
6
6
  import 'zod';
7
7
 
@@ -591,4 +591,7 @@ declare function createNodeListener(api: {
591
591
  handle(request: Request): Promise<Response>;
592
592
  }, options: NodeListenerOptions): (incoming: IncomingMessage, outgoing: ServerResponse) => void;
593
593
 
594
- export { ALL_REFUND_STATUSES, AvailabilityCache, BALANCE_APPOINTMENT_SELECT, BALANCE_BLOCKED_APPOINTMENT_STATUS, BALANCE_REQUIRED_PAYMENT_STATUS, BALANCE_REQUIRED_REFUND_STATUS, BalanceIntentGenerationsExhaustedError, BalancePaymentControl, BalanceRequestInProgressError, type BearerStaffResolverInput, DnsResolver, HttpMethod, type NodeListenerOptions, type OutlookCalendarSync, type OutlookPullHooks, type OutlookSyncConfig, type Pagination, type PerBusinessSmsAdapter, type PerBusinessSmsOptions, PublicBookingResolver, PublicOrganizationResolver, RETRYABLE_REFUND_STATUSES, RateLimitTier, RefundOutcomePersistenceError, Route, type SchedulingApi, type SchedulingApiConfig, SchedulingCache, SchedulingHost, type SchedulingServiceError, SendingDomainCheck, SendingDomainRecord, SendingDomainRecords, type SendingDomainVerifier, type SendingDomainVerifierConfig, type SignedInPerson, type SmsInboundEvent, SmsSendError, type SmsWebhookResult, StaffContext, type StaffContextInput, StaffResolver, type StaffScope, type StripeLike, TERMINAL_SUCCESS_STATUSES, TOKEN_TTL_DAYS, type TelnyxInboundEvent, SmsSendError as TelnyxSendError, type TelnyxSmsConfig, type TelnyxWebhookOptions, type TelnyxWebhookResult, type TextSettingsResolverOptions, type TwilioSmsConfig, type TwilioWebhookOptions, UnverifiedPaymentError, type WebhookHeaders, assertStripeTestKey, attemptLegRefund, calendarVisibilityFilter, canSeeAppointmentInScope, canSeeCalendarInScope, classifyReply, createBalanceIntent, createBearerStaffResolver, createMemoryAvailabilityCache, createMemoryCache, createMemoryRateLimiter, createNoBalancePaymentControl, createNoPaymentAdapter, createNodeListener, createOutlookCalendarSync, createPerBusinessSmsAdapter, createSchedulingApi, createScopedVisibility, createSendingDomainVerifier, createSingleOrganizationDirectory, createSingleOrganizationResolver, createStaffContext, createStripePaymentAdapter, createTelnyxSmsAdapter, createTextSettingsResolver, createTwilioSmsAdapter, decimalToCents, defaultCorsHeaders, getErrorCode, getErrorMessage, getErrorRef, handleTelnyxWebhook, handleTwilioWebhook, isCalendarVisibleInScope, isSchedulingServiceError, isSupportedCurrency, isTokenExpired, normalizePhoneNumber, parsePagination, persistRefundOutcome, recordBalanceIntent, runCalendarRemoveWithoutBlocking, runCalendarSyncWithoutBlocking, verifyTelnyxSignature, verifyTwilioSignature, visibleCalendarIdsInScope };
594
+ /** The key text in an `Authorization: Bearer ...` header, or null when the request carries no such header. */
595
+ declare function bearerKeyOf(request: Request): string | null;
596
+
597
+ export { ALL_REFUND_STATUSES, AvailabilityCache, BALANCE_APPOINTMENT_SELECT, BALANCE_BLOCKED_APPOINTMENT_STATUS, BALANCE_REQUIRED_PAYMENT_STATUS, BALANCE_REQUIRED_REFUND_STATUS, BalanceIntentGenerationsExhaustedError, BalancePaymentControl, BalanceRequestInProgressError, type BearerStaffResolverInput, DnsResolver, HttpMethod, type NodeListenerOptions, type OutlookCalendarSync, type OutlookPullHooks, type OutlookSyncConfig, type Pagination, type PerBusinessSmsAdapter, type PerBusinessSmsOptions, PublicBookingResolver, PublicOrganizationResolver, RETRYABLE_REFUND_STATUSES, RateLimitTier, RefundOutcomePersistenceError, Route, type SchedulingApi, type SchedulingApiConfig, SchedulingCache, SchedulingHost, type SchedulingServiceError, SendingDomainCheck, SendingDomainRecord, SendingDomainRecords, type SendingDomainVerifier, type SendingDomainVerifierConfig, type SignedInPerson, type SmsInboundEvent, SmsSendError, type SmsWebhookResult, StaffContext, type StaffContextInput, StaffResolver, type StaffScope, type StripeLike, TERMINAL_SUCCESS_STATUSES, TOKEN_TTL_DAYS, type TelnyxInboundEvent, SmsSendError as TelnyxSendError, type TelnyxSmsConfig, type TelnyxWebhookOptions, type TelnyxWebhookResult, type TextSettingsResolverOptions, type TwilioSmsConfig, type TwilioWebhookOptions, UnverifiedPaymentError, type WebhookHeaders, assertStripeTestKey, attemptLegRefund, bearerKeyOf, calendarVisibilityFilter, canSeeAppointmentInScope, canSeeCalendarInScope, classifyReply, createBalanceIntent, createBearerStaffResolver, createMemoryAvailabilityCache, createMemoryCache, createMemoryRateLimiter, createNoBalancePaymentControl, createNoPaymentAdapter, createNodeListener, createOutlookCalendarSync, createPerBusinessSmsAdapter, createSchedulingApi, createScopedVisibility, createSendingDomainVerifier, createSingleOrganizationDirectory, createSingleOrganizationResolver, createStaffContext, createStripePaymentAdapter, createTelnyxSmsAdapter, createTextSettingsResolver, createTwilioSmsAdapter, decimalToCents, defaultCorsHeaders, getErrorCode, getErrorMessage, getErrorRef, handleTelnyxWebhook, handleTwilioWebhook, isCalendarVisibleInScope, isSchedulingServiceError, isSupportedCurrency, isTokenExpired, normalizePhoneNumber, parsePagination, persistRefundOutcome, recordBalanceIntent, runCalendarRemoveWithoutBlocking, runCalendarSyncWithoutBlocking, verifyTelnyxSignature, verifyTwilioSignature, visibleCalendarIdsInScope };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { S as SchedulingHost, R as Route, H as HttpMethod, a as RateLimitTier, b as SchedulingCache, P as PublicBookingResolver, c as PublicOrganizationResolver, A as AvailabilityCache, B as BalancePaymentControl, d as SendingDomainCheck, e as SendingDomainRecord, f as SendingDomainRecords, D as DnsResolver, g as StaffResolver, h as StaffContext } from './routes-LaFljBCF.js';
2
- export { i as ActivityEntry, j as ActivityLog, k as AppointmentEventSink, l as BookingClientResolver, m as BookingPolicy, n as BrandSettings, C as CacheOptions, o as CalendarConnectOutcome, p as CalendarConnector, q as CalendarConnectors, r as CalendarVisibility, I as InternalAccess, N as NoShowPolicy, s as PrivacySettings, t as PublicBookingContext, u as PublicBookingKind, v as PublicOrganization, w as RecordCheck, x as RecordStatus, y as ResolvedHost, z as RouteContext, E as RouteHandler, F as RoutingFormSettings, G as StaffDirectory, W as WaitlistSettings, J as WebhookSettings, K as WorkerCommands, L as checkSendingDomain, M as normalizeSendingDomain } from './routes-LaFljBCF.js';
1
+ import { S as SchedulingHost, R as Route, H as HttpMethod, a as RateLimitTier, b as SchedulingCache, P as PublicBookingResolver, c as PublicOrganizationResolver, A as AvailabilityCache, B as BalancePaymentControl, d as SendingDomainCheck, e as SendingDomainRecord, f as SendingDomainRecords, D as DnsResolver, g as StaffResolver, h as StaffContext } from './routes-mii9tsbA.js';
2
+ export { i as ActivityEntry, j as ActivityLog, k as ApiKeySettings, l as AppointmentEventSink, m as BookingClientResolver, n as BookingPolicy, o as BrandSettings, C as CacheOptions, p as CalendarConnectOutcome, q as CalendarConnector, r as CalendarConnectors, s as CalendarVisibility, I as InternalAccess, N as NoShowPolicy, t as PrivacySettings, u as PublicBookingContext, v as PublicBookingKind, w as PublicOrganization, x as RecordCheck, y as RecordStatus, z as ResolvedHost, E as RouteContext, F as RouteHandler, G as RoutingFormSettings, J as StaffDirectory, W as WaitlistSettings, K as WebhookSettings, L as WorkerCommands, M as checkSendingDomain, O as normalizeSendingDomain } from './routes-mii9tsbA.js';
3
3
  import { SchedulingDb, PaymentAdapter, NotificationAdapter, AppointmentStatus, CalendarSyncAdapter, CalendarEventRef, CalendarEvent } from '@ordinatio/scheduling';
4
- export { BookingPageConfig, BookingPageConfigSchema, BookingPageTheme, BookingPageThemeSchema, BrandSchema, CancelRecurringScopeSchema, CancelRecurringSeriesInput, CancelRecurringSeriesSchema, CreateAppointmentCategoryInput, CreateAppointmentCategorySchema, CreateAppointmentTypeInput, CreateAppointmentTypeSchema, CreateAvailabilityRuleInput, CreateAvailabilityRuleSchema, CreateCalendarInput, CreateCalendarSchema, CreateCouponCodeInput, CreateCouponCodeSchema, CreateNotificationTemplateInput, CreateNotificationTemplateSchema, CreatePackagePurchaseInput, CreatePackagePurchaseSchema, CreateRecurringSeriesInput, CreateRecurringSeriesSchema, CreateRoutingFormInput, CreateRoutingFormSchema, CreateServicePackageInput, CreateServicePackageSchema, CreateWebhookEndpointInput, CreateWebhookEndpointSchema, DEFAULT_CANCELLATION_POLICY, IntakeFormFieldSchema, NoShowPrevention, NoShowPreventionAction, NoShowPreventionActionSchema, NotificationChannelSchema, NotificationTriggerSchema, OrgCancellationPolicy, OrgCancellationPolicySchema, PrivacyEraseSchema, PrivacySubjectSchema, RecurringFrequencySchema, RouteClientSchema, SLOT_GRANULARITY_DEFAULT, SLOT_GRANULARITY_OPTIONS, SlotGranularityMinutes, TestRoutingFormSchema, TextSettingsSchema, UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, UpdateBookingPageInput, UpdateBookingPageSchema, UpdateCalendarInput, UpdateCalendarSchema, UpdateCouponCodeInput, UpdateCouponCodeSchema, UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, UpdateRoutingFormInput, UpdateRoutingFormSchema, UpdateServicePackageInput, UpdateServicePackageSchema } from './schemas/index.js';
4
+ export { ApiKeySchema, BookingPageConfig, BookingPageConfigSchema, BookingPageTheme, BookingPageThemeSchema, BrandSchema, CancelRecurringScopeSchema, CancelRecurringSeriesInput, CancelRecurringSeriesSchema, CreateAppointmentCategoryInput, CreateAppointmentCategorySchema, CreateAppointmentTypeInput, CreateAppointmentTypeSchema, CreateAvailabilityRuleInput, CreateAvailabilityRuleSchema, CreateCalendarInput, CreateCalendarSchema, CreateCouponCodeInput, CreateCouponCodeSchema, CreateNotificationTemplateInput, CreateNotificationTemplateSchema, CreatePackagePurchaseInput, CreatePackagePurchaseSchema, CreateRecurringSeriesInput, CreateRecurringSeriesSchema, CreateRoutingFormInput, CreateRoutingFormSchema, CreateServicePackageInput, CreateServicePackageSchema, CreateWebhookEndpointInput, CreateWebhookEndpointSchema, DEFAULT_CANCELLATION_POLICY, IntakeFormFieldSchema, NoShowPrevention, NoShowPreventionAction, NoShowPreventionActionSchema, NotificationChannelSchema, NotificationTriggerSchema, OrgCancellationPolicy, OrgCancellationPolicySchema, PrivacyEraseSchema, PrivacySubjectSchema, RecurringFrequencySchema, RouteClientSchema, SLOT_GRANULARITY_DEFAULT, SLOT_GRANULARITY_OPTIONS, SlotGranularityMinutes, TestRoutingFormSchema, TextSettingsSchema, UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, UpdateBookingPageInput, UpdateBookingPageSchema, UpdateCalendarInput, UpdateCalendarSchema, UpdateCouponCodeInput, UpdateCouponCodeSchema, UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, UpdateRoutingFormInput, UpdateRoutingFormSchema, UpdateServicePackageInput, UpdateServicePackageSchema } from './schemas/index.js';
5
5
  import { IncomingMessage, ServerResponse } from 'node:http';
6
6
  import 'zod';
7
7
 
@@ -591,4 +591,7 @@ declare function createNodeListener(api: {
591
591
  handle(request: Request): Promise<Response>;
592
592
  }, options: NodeListenerOptions): (incoming: IncomingMessage, outgoing: ServerResponse) => void;
593
593
 
594
- export { ALL_REFUND_STATUSES, AvailabilityCache, BALANCE_APPOINTMENT_SELECT, BALANCE_BLOCKED_APPOINTMENT_STATUS, BALANCE_REQUIRED_PAYMENT_STATUS, BALANCE_REQUIRED_REFUND_STATUS, BalanceIntentGenerationsExhaustedError, BalancePaymentControl, BalanceRequestInProgressError, type BearerStaffResolverInput, DnsResolver, HttpMethod, type NodeListenerOptions, type OutlookCalendarSync, type OutlookPullHooks, type OutlookSyncConfig, type Pagination, type PerBusinessSmsAdapter, type PerBusinessSmsOptions, PublicBookingResolver, PublicOrganizationResolver, RETRYABLE_REFUND_STATUSES, RateLimitTier, RefundOutcomePersistenceError, Route, type SchedulingApi, type SchedulingApiConfig, SchedulingCache, SchedulingHost, type SchedulingServiceError, SendingDomainCheck, SendingDomainRecord, SendingDomainRecords, type SendingDomainVerifier, type SendingDomainVerifierConfig, type SignedInPerson, type SmsInboundEvent, SmsSendError, type SmsWebhookResult, StaffContext, type StaffContextInput, StaffResolver, type StaffScope, type StripeLike, TERMINAL_SUCCESS_STATUSES, TOKEN_TTL_DAYS, type TelnyxInboundEvent, SmsSendError as TelnyxSendError, type TelnyxSmsConfig, type TelnyxWebhookOptions, type TelnyxWebhookResult, type TextSettingsResolverOptions, type TwilioSmsConfig, type TwilioWebhookOptions, UnverifiedPaymentError, type WebhookHeaders, assertStripeTestKey, attemptLegRefund, calendarVisibilityFilter, canSeeAppointmentInScope, canSeeCalendarInScope, classifyReply, createBalanceIntent, createBearerStaffResolver, createMemoryAvailabilityCache, createMemoryCache, createMemoryRateLimiter, createNoBalancePaymentControl, createNoPaymentAdapter, createNodeListener, createOutlookCalendarSync, createPerBusinessSmsAdapter, createSchedulingApi, createScopedVisibility, createSendingDomainVerifier, createSingleOrganizationDirectory, createSingleOrganizationResolver, createStaffContext, createStripePaymentAdapter, createTelnyxSmsAdapter, createTextSettingsResolver, createTwilioSmsAdapter, decimalToCents, defaultCorsHeaders, getErrorCode, getErrorMessage, getErrorRef, handleTelnyxWebhook, handleTwilioWebhook, isCalendarVisibleInScope, isSchedulingServiceError, isSupportedCurrency, isTokenExpired, normalizePhoneNumber, parsePagination, persistRefundOutcome, recordBalanceIntent, runCalendarRemoveWithoutBlocking, runCalendarSyncWithoutBlocking, verifyTelnyxSignature, verifyTwilioSignature, visibleCalendarIdsInScope };
594
+ /** The key text in an `Authorization: Bearer ...` header, or null when the request carries no such header. */
595
+ declare function bearerKeyOf(request: Request): string | null;
596
+
597
+ export { ALL_REFUND_STATUSES, AvailabilityCache, BALANCE_APPOINTMENT_SELECT, BALANCE_BLOCKED_APPOINTMENT_STATUS, BALANCE_REQUIRED_PAYMENT_STATUS, BALANCE_REQUIRED_REFUND_STATUS, BalanceIntentGenerationsExhaustedError, BalancePaymentControl, BalanceRequestInProgressError, type BearerStaffResolverInput, DnsResolver, HttpMethod, type NodeListenerOptions, type OutlookCalendarSync, type OutlookPullHooks, type OutlookSyncConfig, type Pagination, type PerBusinessSmsAdapter, type PerBusinessSmsOptions, PublicBookingResolver, PublicOrganizationResolver, RETRYABLE_REFUND_STATUSES, RateLimitTier, RefundOutcomePersistenceError, Route, type SchedulingApi, type SchedulingApiConfig, SchedulingCache, SchedulingHost, type SchedulingServiceError, SendingDomainCheck, SendingDomainRecord, SendingDomainRecords, type SendingDomainVerifier, type SendingDomainVerifierConfig, type SignedInPerson, type SmsInboundEvent, SmsSendError, type SmsWebhookResult, StaffContext, type StaffContextInput, StaffResolver, type StaffScope, type StripeLike, TERMINAL_SUCCESS_STATUSES, TOKEN_TTL_DAYS, type TelnyxInboundEvent, SmsSendError as TelnyxSendError, type TelnyxSmsConfig, type TelnyxWebhookOptions, type TelnyxWebhookResult, type TextSettingsResolverOptions, type TwilioSmsConfig, type TwilioWebhookOptions, UnverifiedPaymentError, type WebhookHeaders, assertStripeTestKey, attemptLegRefund, bearerKeyOf, calendarVisibilityFilter, canSeeAppointmentInScope, canSeeCalendarInScope, classifyReply, createBalanceIntent, createBearerStaffResolver, createMemoryAvailabilityCache, createMemoryCache, createMemoryRateLimiter, createNoBalancePaymentControl, createNoPaymentAdapter, createNodeListener, createOutlookCalendarSync, createPerBusinessSmsAdapter, createSchedulingApi, createScopedVisibility, createSendingDomainVerifier, createSingleOrganizationDirectory, createSingleOrganizationResolver, createStaffContext, createStripePaymentAdapter, createTelnyxSmsAdapter, createTextSettingsResolver, createTwilioSmsAdapter, decimalToCents, defaultCorsHeaders, getErrorCode, getErrorMessage, getErrorRef, handleTelnyxWebhook, handleTwilioWebhook, isCalendarVisibleInScope, isSchedulingServiceError, isSupportedCurrency, isTokenExpired, normalizePhoneNumber, parsePagination, persistRefundOutcome, recordBalanceIntent, runCalendarRemoveWithoutBlocking, runCalendarSyncWithoutBlocking, verifyTelnyxSignature, verifyTwilioSignature, visibleCalendarIdsInScope };