@ordinatio/scheduling-api 0.6.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 +15 -0
- package/README.md +97 -1
- package/dist/agent/index.d.mts +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +79 -0
- package/dist/agent/index.mjs +79 -0
- package/dist/{chunk-WZ5KO7IW.mjs → chunk-X5BVCLX6.mjs} +18 -1
- package/dist/index.d.mts +230 -5
- package/dist/index.d.ts +230 -5
- package/dist/index.js +1240 -345
- package/dist/index.mjs +924 -61
- package/dist/{routes-CM-ezlv2.d.mts → routes-mii9tsbA.d.mts} +78 -2
- package/dist/{routes-CM-ezlv2.d.ts → routes-mii9tsbA.d.ts} +78 -2
- package/dist/schemas/index.d.mts +12 -1
- package/dist/schemas/index.d.ts +12 -1
- package/dist/schemas/index.js +19 -0
- package/dist/schemas/index.mjs +5 -1
- package/package.json +3 -3
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
|
|
2
|
-
export {
|
|
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.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
|
+
import { SchedulingDb, PaymentAdapter, NotificationAdapter, AppointmentStatus, CalendarSyncAdapter, CalendarEventRef, CalendarEvent } from '@ordinatio/scheduling';
|
|
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
|
|
|
@@ -133,6 +133,184 @@ declare function createStripePaymentAdapter(client: StripeLike): PaymentAdapter;
|
|
|
133
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
134
|
declare function assertStripeTestKey(raw: string | undefined): string;
|
|
135
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
|
+
|
|
136
314
|
/**
|
|
137
315
|
* Converts a Prisma Decimal (or anything Number() can coerce) to integer cents, rounded to the nearest cent.
|
|
138
316
|
* Throws SchedulingValidationError (SCHED_406) instead of returning NaN: a null or non-numeric value almost
|
|
@@ -280,6 +458,50 @@ declare const BALANCE_APPOINTMENT_SELECT: {
|
|
|
280
458
|
};
|
|
281
459
|
};
|
|
282
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
|
+
|
|
283
505
|
type NonBlockingResult = {
|
|
284
506
|
queued: boolean;
|
|
285
507
|
ref?: string;
|
|
@@ -369,4 +591,7 @@ declare function createNodeListener(api: {
|
|
|
369
591
|
handle(request: Request): Promise<Response>;
|
|
370
592
|
}, options: NodeListenerOptions): (incoming: IncomingMessage, outgoing: ServerResponse) => void;
|
|
371
593
|
|
|
372
|
-
|
|
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
|
|
2
|
-
export {
|
|
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-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
|
+
import { SchedulingDb, PaymentAdapter, NotificationAdapter, AppointmentStatus, CalendarSyncAdapter, CalendarEventRef, CalendarEvent } from '@ordinatio/scheduling';
|
|
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
|
|
|
@@ -133,6 +133,184 @@ declare function createStripePaymentAdapter(client: StripeLike): PaymentAdapter;
|
|
|
133
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
134
|
declare function assertStripeTestKey(raw: string | undefined): string;
|
|
135
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
|
+
|
|
136
314
|
/**
|
|
137
315
|
* Converts a Prisma Decimal (or anything Number() can coerce) to integer cents, rounded to the nearest cent.
|
|
138
316
|
* Throws SchedulingValidationError (SCHED_406) instead of returning NaN: a null or non-numeric value almost
|
|
@@ -280,6 +458,50 @@ declare const BALANCE_APPOINTMENT_SELECT: {
|
|
|
280
458
|
};
|
|
281
459
|
};
|
|
282
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
|
+
|
|
283
505
|
type NonBlockingResult = {
|
|
284
506
|
queued: boolean;
|
|
285
507
|
ref?: string;
|
|
@@ -369,4 +591,7 @@ declare function createNodeListener(api: {
|
|
|
369
591
|
handle(request: Request): Promise<Response>;
|
|
370
592
|
}, options: NodeListenerOptions): (incoming: IncomingMessage, outgoing: ServerResponse) => void;
|
|
371
593
|
|
|
372
|
-
|
|
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 };
|