@ordinatio/scheduling-api 0.5.1 → 0.7.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/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 StaffResolver, e as StaffContext } from './routes-CM-ezlv2.js';
2
- export { f as ActivityEntry, g as ActivityLog, h as AppointmentEventSink, i as BookingClientResolver, j as BookingPolicy, k as BrandSettings, C as CacheOptions, l as CalendarConnectOutcome, m as CalendarConnector, n as CalendarConnectors, o as CalendarVisibility, I as InternalAccess, N as NoShowPolicy, p as PrivacySettings, q as PublicBookingContext, r as PublicBookingKind, s as PublicOrganization, t as ResolvedHost, u as RouteContext, v as RouteHandler, w as RoutingFormSettings, x as StaffDirectory, W as WaitlistSettings, y as WebhookSettings, z as WorkerCommands } from './routes-CM-ezlv2.js';
3
- import { SchedulingDb, PaymentAdapter, 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, UpdateAppointmentCategoryInput, UpdateAppointmentCategorySchema, UpdateAppointmentTypeInput, UpdateAppointmentTypeSchema, UpdateBookingPageInput, UpdateBookingPageSchema, UpdateCalendarInput, UpdateCalendarSchema, UpdateCouponCodeInput, UpdateCouponCodeSchema, UpdateNotificationTemplateInput, UpdateNotificationTemplateSchema, UpdatePackagePurchaseInput, UpdatePackagePurchaseSchema, UpdateRoutingFormInput, UpdateRoutingFormSchema, UpdateServicePackageInput, UpdateServicePackageSchema } from './schemas/index.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-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';
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';
5
5
  import { IncomingMessage, ServerResponse } from 'node:http';
6
6
  import 'zod';
7
7
 
@@ -88,6 +88,229 @@ declare class UnverifiedPaymentError extends Error {
88
88
  constructor(paymentId: string, cause: unknown);
89
89
  }
90
90
 
91
+ /** The slice of the Stripe client this adapter uses, so tests can supply a fake. */
92
+ interface StripeLike {
93
+ paymentIntents: {
94
+ create(params: {
95
+ amount: number;
96
+ currency: string;
97
+ metadata?: Record<string, string>;
98
+ }, options?: {
99
+ idempotencyKey?: string;
100
+ }): Promise<StripeIntent>;
101
+ retrieve(id: string, params?: {
102
+ expand?: string[];
103
+ }): Promise<StripeIntent>;
104
+ };
105
+ refunds: {
106
+ create(params: {
107
+ payment_intent: string;
108
+ amount?: number;
109
+ }, options?: {
110
+ idempotencyKey?: string;
111
+ }): Promise<{
112
+ id: string;
113
+ amount: number;
114
+ status: string | null;
115
+ currency?: string;
116
+ }>;
117
+ };
118
+ }
119
+ interface StripeIntent {
120
+ id: string;
121
+ amount: number;
122
+ currency: string;
123
+ status: string;
124
+ client_secret?: string | null;
125
+ metadata?: Record<string, string> | null;
126
+ latest_charge?: string | {
127
+ amount_refunded?: number;
128
+ } | null;
129
+ }
130
+ declare function isSupportedCurrency(currency: string | undefined): boolean;
131
+ declare function createStripePaymentAdapter(client: StripeLike): PaymentAdapter;
132
+
133
+ /** Returns the key when it is a Stripe test-mode secret key. A live key must never reach a script that creates and refunds payments. */
134
+ declare function assertStripeTestKey(raw: string | undefined): string;
135
+
136
+ interface SendingDomainVerifierConfig {
137
+ /**
138
+ * The records your mail provider asks for. Their values are provider-specific, so the host lists them. Records that are
139
+ * the same for every domain only prove the provider was set up at the domain, not who is claiming it: when your provider
140
+ * issues a token per domain or organization, pass a function that returns that domain's records.
141
+ */
142
+ records: SendingDomainRecords;
143
+ resolver: DnsResolver;
144
+ }
145
+ interface SendingDomainVerifier {
146
+ /** Pass to `saveBrand`: true only when every required record is published. */
147
+ isSendingDomainVerified(domain: string): Promise<boolean>;
148
+ /** The same check with a status and a plain sentence for each record. */
149
+ check(domain: string): Promise<SendingDomainCheck>;
150
+ /** What a business must add at its domain host, with the full name for each record. Empty for something that is not a domain. */
151
+ instructions(domain: string): Array<{
152
+ record: SendingDomainRecord;
153
+ host: string;
154
+ }>;
155
+ }
156
+ declare function createSendingDomainVerifier(config: SendingDomainVerifierConfig): SendingDomainVerifier;
157
+
158
+ /**
159
+ * Thrown when a provider did not confirm the message. `retryable` is true when trying again may work.
160
+ * `outcomeUnknown` is true when the text may already have been sent (timeout, network failure, server error),
161
+ * so a retry can duplicate it.
162
+ */
163
+ declare class SmsSendError extends Error {
164
+ readonly retryable: boolean;
165
+ readonly outcomeUnknown: boolean;
166
+ readonly status?: number | undefined;
167
+ readonly code?: string | undefined;
168
+ constructor(message: string, retryable: boolean, outcomeUnknown: boolean, status?: number | undefined, code?: string | undefined);
169
+ }
170
+ /**
171
+ * Returns the number in international format, or null when it cannot be one. Ten digits are read as a US
172
+ * number; anything else must already start with a plus and country code.
173
+ */
174
+ declare function normalizePhoneNumber(raw: string): string | null;
175
+ /** What a provider's webhook means, in the same words for every provider. */
176
+ type SmsInboundEvent = {
177
+ type: 'reply';
178
+ id: string;
179
+ from: string;
180
+ to: string;
181
+ text: string;
182
+ } | {
183
+ type: 'opt-out';
184
+ id: string;
185
+ from: string;
186
+ to: string;
187
+ text: string;
188
+ } | {
189
+ type: 'opt-in';
190
+ id: string;
191
+ from: string;
192
+ to: string;
193
+ text: string;
194
+ } | {
195
+ type: 'delivery';
196
+ id: string;
197
+ status: 'delivered' | 'failed';
198
+ to: string;
199
+ errorCode?: string;
200
+ } | {
201
+ type: 'ignored';
202
+ eventType: string;
203
+ };
204
+ type SmsWebhookResult = {
205
+ ok: true;
206
+ event: SmsInboundEvent;
207
+ } | {
208
+ ok: false;
209
+ status: 400 | 401;
210
+ reason: string;
211
+ };
212
+ /** Plain header record (Node, Express) or a web `Headers` object (Fetch-style routes). */
213
+ type WebhookHeaders = Record<string, string | string[] | undefined> | {
214
+ get(name: string): string | null;
215
+ };
216
+ /** A message that is only a stop or start word counts as an opt-out or opt-in; anything else is a reply. */
217
+ declare function classifyReply(text: string): 'reply' | 'opt-out' | 'opt-in';
218
+
219
+ interface TelnyxSmsConfig {
220
+ apiKey: string;
221
+ /** The sending number in international format, such as +13135550100. */
222
+ from?: string;
223
+ /** A Telnyx messaging profile id. Used when no sending number is given, or alongside one. */
224
+ messagingProfileId?: string;
225
+ /** Replaces the global fetch, for tests. */
226
+ fetch?: typeof fetch;
227
+ timeoutMs?: number;
228
+ }
229
+
230
+ declare function createTelnyxSmsAdapter(config: TelnyxSmsConfig): NotificationAdapter;
231
+
232
+ type TelnyxInboundEvent = SmsInboundEvent;
233
+ type TelnyxWebhookResult = SmsWebhookResult;
234
+ interface TelnyxWebhookOptions {
235
+ /** The webhook public key from the Telnyx portal (base64). */
236
+ publicKey: string;
237
+ /** Replaces the clock, for tests. */
238
+ now?: () => Date;
239
+ toleranceSeconds?: number;
240
+ }
241
+ /** True when the body was signed by Telnyx's key and the timestamp is recent. */
242
+ declare function verifyTelnyxSignature(rawBody: string, headers: WebhookHeaders, options: TelnyxWebhookOptions): boolean;
243
+ /** Checks the signature and reads the event. Call it with the raw request body, exactly as received. */
244
+ declare function handleTelnyxWebhook(rawBody: string, headers: WebhookHeaders, options: TelnyxWebhookOptions): TelnyxWebhookResult;
245
+
246
+ interface TwilioSmsConfig {
247
+ accountSid: string;
248
+ authToken: string;
249
+ /** The sending number in international format, such as +13135550100. */
250
+ from?: string;
251
+ /** A Twilio messaging service SID. Used when no sending number is given. */
252
+ messagingServiceSid?: string;
253
+ /** Replaces the global fetch, for tests. */
254
+ fetch?: typeof fetch;
255
+ timeoutMs?: number;
256
+ }
257
+ declare function createTwilioSmsAdapter(config: TwilioSmsConfig): NotificationAdapter;
258
+
259
+ interface TwilioWebhookOptions {
260
+ /** The Twilio auth token of the account that sends the webhooks. */
261
+ authToken: string;
262
+ /** The exact public address Twilio was told to call, including https and any query string. */
263
+ url: string;
264
+ }
265
+ /** True when the form body was signed by Twilio for this address. Twilio sends no timestamp, so there is no age check. */
266
+ declare function verifyTwilioSignature(rawBody: string, headers: WebhookHeaders, options: TwilioWebhookOptions): boolean;
267
+ /** Checks the signature and reads the event. Pass the raw form body exactly as received. */
268
+ declare function handleTwilioWebhook(rawBody: string, headers: WebhookHeaders, options: TwilioWebhookOptions): SmsWebhookResult;
269
+
270
+ interface PerBusinessSmsOptions {
271
+ /**
272
+ * Returns the adapter for one business, or null when it has no text number. Build it with createTelnyxSmsAdapter or
273
+ * createTwilioSmsAdapter. The answer is reused until it expires, so a changed number is picked up within `adapterTtlMs`
274
+ * (or at once with `forget`) in every worker.
275
+ */
276
+ resolve(organizationId: string): Promise<NotificationAdapter | null> | NotificationAdapter | null;
277
+ /** How long an adapter is reused. Default 5 minutes. */
278
+ adapterTtlMs?: number;
279
+ /** How long "no number" is reused, so a business that adds a number starts sending soon. Default 1 minute. */
280
+ noNumberTtlMs?: number;
281
+ /** Replaces the clock, for tests. */
282
+ now?: () => number;
283
+ }
284
+ interface PerBusinessSmsAdapter extends NotificationAdapter {
285
+ /** Drops the kept answer for a business, for when its number or provider changed. */
286
+ forget(organizationId: string): void;
287
+ }
288
+ declare function createPerBusinessSmsAdapter(options: PerBusinessSmsOptions): PerBusinessSmsAdapter;
289
+
290
+ interface TextSettingsResolverOptions {
291
+ /** The database that holds the organization's settings. */
292
+ db(organizationId: string): Promise<SchedulingDb> | SchedulingDb;
293
+ /** The host's Telnyx account. Leave out when the server has none: a business that chose Telnyx then sends nothing. */
294
+ telnyx?: {
295
+ apiKey: string;
296
+ messagingProfileId?: string;
297
+ };
298
+ /** The host's Twilio account. Leave out when the server has none. */
299
+ twilio?: {
300
+ accountSid: string;
301
+ authToken: string;
302
+ };
303
+ /** Replaces the global fetch, for tests. */
304
+ fetch?: typeof fetch;
305
+ }
306
+ /**
307
+ * Returns `resolve(organizationId)`: the adapter for the business's saved provider and number, or null when it has no
308
+ * settings, has paused texting, or chose a provider this server has no account for. Pass it to createPerBusinessSmsAdapter,
309
+ * which keeps each answer for `adapterTtlMs` (5 minutes by default): a pause or a changed number reaches every worker within
310
+ * that time, or at once for the worker where `forget(organizationId)` is called. Use a short `adapterTtlMs` where a pause must be quick.
311
+ */
312
+ declare function createTextSettingsResolver(options: TextSettingsResolverOptions): (organizationId: string) => Promise<NotificationAdapter | null>;
313
+
91
314
  /**
92
315
  * Converts a Prisma Decimal (or anything Number() can coerce) to integer cents, rounded to the nearest cent.
93
316
  * Throws SchedulingValidationError (SCHED_406) instead of returning NaN: a null or non-numeric value almost
@@ -235,6 +458,50 @@ declare const BALANCE_APPOINTMENT_SELECT: {
235
458
  };
236
459
  };
237
460
 
461
+ interface OutlookSyncConfig {
462
+ /**
463
+ * The database of the one organization whose calendars are synced. Appointments and calendars are found by id and
464
+ * no organization check is made, so a host with a database per organization builds one sync per organization.
465
+ */
466
+ db: SchedulingDb;
467
+ /** The Azure app's id and secret. Surrounding whitespace is removed: a pasted dashboard value often carries a newline. */
468
+ clientId: string;
469
+ clientSecret: string;
470
+ /** Defaults to the global fetch. */
471
+ fetch?: typeof fetch;
472
+ now?: () => Date;
473
+ /** Receives anything that failed but was handled, so the host can log it. Nothing is logged by default. */
474
+ onProblem?: (message: string, context: Record<string, unknown>) => void;
475
+ }
476
+
477
+ interface OutlookPullHooks {
478
+ /**
479
+ * Called when an appointment's Outlook event was deleted. Return true once the appointment is cancelled. If it
480
+ * throws or returns false, the pull stops without saving its place and the next run tries again.
481
+ */
482
+ cancelAppointment(appointmentId: string): Promise<boolean>;
483
+ /**
484
+ * Called when an appointment's time was changed in Outlook, before the new time is saved. If it throws, the pull
485
+ * stops without saving its place and the next run calls it again, so it can be called more than once for one change.
486
+ */
487
+ onAppointmentMoved?(change: {
488
+ appointmentId: string;
489
+ organizationId: string | null;
490
+ startTime: Date;
491
+ endTime: Date;
492
+ }): Promise<void>;
493
+ }
494
+
495
+ interface OutlookCalendarSync {
496
+ /** Plug into SchedulingHost.calendarSync. */
497
+ adapter: CalendarSyncAdapter;
498
+ /** Run on a schedule for each connected calendar. */
499
+ pull(calendarId: string): Promise<{
500
+ synced: number;
501
+ }>;
502
+ }
503
+ declare function createOutlookCalendarSync(config: OutlookSyncConfig, hooks: OutlookPullHooks): OutlookCalendarSync;
504
+
238
505
  type NonBlockingResult = {
239
506
  queued: boolean;
240
507
  ref?: string;
@@ -271,6 +538,42 @@ interface BearerStaffResolverInput {
271
538
  /** Signs in a request from its `Authorization: Bearer <token>` header; the host decides what a token means. */
272
539
  declare function createBearerStaffResolver(input: BearerStaffResolverInput): StaffResolver;
273
540
 
541
+ type StaffScope = {
542
+ mode: 'unrestricted';
543
+ } | {
544
+ mode: 'restricted';
545
+ visibleUserIds: string[];
546
+ };
547
+ /**
548
+ * A calendar with no staff member linked to it is visible to everyone, in either mode: until someone links a
549
+ * calendar to a person it is not part of any team's data.
550
+ */
551
+ declare function isCalendarVisibleInScope(calendarUserId: string | null, scope: StaffScope): boolean;
552
+ /** A filter that narrows a calendar or appointment query to what the scope allows, or undefined when nothing is hidden. */
553
+ declare function calendarVisibilityFilter(scope: StaffScope): {
554
+ OR: [{
555
+ userId: {
556
+ in: string[];
557
+ };
558
+ }, {
559
+ userId: null;
560
+ }];
561
+ } | undefined;
562
+ /**
563
+ * The ids of the calendars linked to a visible staff member, or undefined when nothing is hidden. Unlinked calendars
564
+ * are not in the list; a caller that wants them adds `userId: null` itself, as calendarVisibilityFilter does.
565
+ */
566
+ declare function visibleCalendarIdsInScope(db: Pick<SchedulingDb, 'schedulingCalendar'>, scope: StaffScope): Promise<string[] | undefined>;
567
+ /**
568
+ * Whether the scope lets this person see the calendar. A calendar that does not exist is not visible, so a hidden one
569
+ * and a missing one look the same. Pass the scope as a promise to look the calendar up while the scope is worked out.
570
+ */
571
+ declare function canSeeCalendarInScope(db: Pick<SchedulingDb, 'schedulingCalendar'>, calendarId: string, scope: StaffScope | Promise<StaffScope>): Promise<boolean>;
572
+ /** Whether the scope lets this person see the appointment, by the calendar it is on. False when it does not exist. */
573
+ declare function canSeeAppointmentInScope(db: Pick<SchedulingDb, 'appointment'>, appointmentId: string, scope: StaffScope | Promise<StaffScope>): Promise<boolean>;
574
+ /** The visibility half of a StaffContext, for a host that works out the scope itself. `getScope` runs on every question. */
575
+ declare function createScopedVisibility(db: SchedulingDb, getScope: () => Promise<StaffScope>): Pick<StaffContext, 'visibleCalendars' | 'visibleCalendarIds' | 'canSeeCalendar' | 'canSeeAppointment'>;
576
+
274
577
  interface NodeListenerOptions {
275
578
  /** The address this server is reached at from outside, such as https://api.example.com. */
276
579
  publicUrl: string;
@@ -288,4 +591,4 @@ declare function createNodeListener(api: {
288
591
  handle(request: Request): Promise<Response>;
289
592
  }, options: NodeListenerOptions): (incoming: IncomingMessage, outgoing: ServerResponse) => void;
290
593
 
291
- 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, HttpMethod, type NodeListenerOptions, type Pagination, PublicBookingResolver, PublicOrganizationResolver, RETRYABLE_REFUND_STATUSES, RateLimitTier, RefundOutcomePersistenceError, Route, type SchedulingApi, type SchedulingApiConfig, SchedulingCache, SchedulingHost, type SchedulingServiceError, type SignedInPerson, StaffContext, type StaffContextInput, StaffResolver, TERMINAL_SUCCESS_STATUSES, TOKEN_TTL_DAYS, UnverifiedPaymentError, attemptLegRefund, createBalanceIntent, createBearerStaffResolver, createMemoryAvailabilityCache, createMemoryCache, createMemoryRateLimiter, createNoBalancePaymentControl, createNoPaymentAdapter, createNodeListener, createSchedulingApi, createSingleOrganizationDirectory, createSingleOrganizationResolver, createStaffContext, decimalToCents, defaultCorsHeaders, getErrorCode, getErrorMessage, getErrorRef, isSchedulingServiceError, isTokenExpired, parsePagination, persistRefundOutcome, recordBalanceIntent, runCalendarRemoveWithoutBlocking, runCalendarSyncWithoutBlocking };
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 };