@ordinatio/scheduling 0.3.0 → 0.4.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 +38 -0
- package/README.md +179 -2
- package/dist/index.d.mts +624 -5
- package/dist/index.d.ts +624 -5
- package/dist/index.js +1682 -33
- package/dist/index.mjs +1634 -33
- package/package.json +1 -1
- package/prisma/migrations/20261027100000_waitlist/migration.sql +51 -0
- package/prisma/migrations/20261027200000_routing_forms/migration.sql +26 -0
- package/prisma/migrations/20261027300000_privacy_requests/migration.sql +18 -0
- package/prisma/migrations/20261027400000_organization_brand/migration.sql +26 -0
- package/prisma/schema.prisma +96 -0
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as _prisma_client from '@prisma/client';
|
|
|
2
2
|
import { PrismaClient, Prisma } from '@prisma/client';
|
|
3
3
|
import * as _ordinatio_errors from '@ordinatio/errors';
|
|
4
4
|
import { ErrorRegistry } from '@ordinatio/errors';
|
|
5
|
+
import * as _prisma_client_runtime_client from '@prisma/client/runtime/client';
|
|
5
6
|
|
|
6
7
|
/** Minimal Prisma interface for scheduling operations.
|
|
7
8
|
*
|
|
@@ -10,7 +11,7 @@ import { ErrorRegistry } from '@ordinatio/errors';
|
|
|
10
11
|
* interface (minus $transaction itself) so code inside transactions
|
|
11
12
|
* is fully typed without `as any` casts.
|
|
12
13
|
*/
|
|
13
|
-
type SchedulingDb = Pick<PrismaClient, 'schedulingCalendar' | 'availabilityRule' | 'appointmentType' | 'appointmentTypeCalendar' | 'appointmentCategory' | 'appointment' | 'scheduledNotification' | 'notificationTemplate' | 'servicePackage' | 'packagePurchase' | 'couponCode' | 'recurringSeries' | 'roundRobinState' | 'webhookEndpoint' | 'webhookDelivery' | 'webhookAttempt' | 'organization' | '$transaction' | '$executeRaw' | '$queryRaw'>;
|
|
14
|
+
type SchedulingDb = Pick<PrismaClient, 'schedulingCalendar' | 'availabilityRule' | 'appointmentType' | 'appointmentTypeCalendar' | 'appointmentCategory' | 'appointment' | 'scheduledNotification' | 'notificationTemplate' | 'servicePackage' | 'packagePurchase' | 'couponCode' | 'recurringSeries' | 'roundRobinState' | 'webhookEndpoint' | 'webhookDelivery' | 'webhookAttempt' | 'waitlistEntry' | 'routingForm' | 'dataSubjectRequest' | 'organizationBrand' | 'organization' | '$transaction' | '$executeRaw' | '$queryRaw'>;
|
|
14
15
|
/**
|
|
15
16
|
* Branded subtype of SchedulingDb for transaction clients produced by withTransaction().
|
|
16
17
|
* selectCalendarForBooking() requires this type to enforce that its RoundRobinState
|
|
@@ -375,10 +376,21 @@ interface RetryConfig {
|
|
|
375
376
|
/** Base backoff in minutes — doubles each retry: 5, 10, 20 (default: 5) */
|
|
376
377
|
baseBackoffMinutes?: number;
|
|
377
378
|
}
|
|
379
|
+
/** Who a message should appear to come from. The sender may ignore what its provider cannot do. */
|
|
380
|
+
interface SenderIdentity {
|
|
381
|
+
/** The display name. */
|
|
382
|
+
name?: string;
|
|
383
|
+
/** The sending address, on a domain the host has confirmed. When absent, send from the provider's default address. */
|
|
384
|
+
email?: string;
|
|
385
|
+
/** Where replies go. */
|
|
386
|
+
replyTo?: string;
|
|
387
|
+
}
|
|
378
388
|
/** Context passed to the sender with each notification */
|
|
379
389
|
interface NotificationSenderContext {
|
|
380
390
|
/** The scheduling trigger that produced this notification */
|
|
381
391
|
trigger?: NotificationTrigger;
|
|
392
|
+
/** The organization's own sender identity, when branding is on and one is set. */
|
|
393
|
+
from?: SenderIdentity;
|
|
382
394
|
}
|
|
383
395
|
/**
|
|
384
396
|
* Returned by the sender when it deliberately does not deliver the notification.
|
|
@@ -1382,6 +1394,8 @@ interface OutboundMessage {
|
|
|
1382
1394
|
subject: string;
|
|
1383
1395
|
body: string;
|
|
1384
1396
|
trigger?: NotificationTrigger;
|
|
1397
|
+
/** The organization's own sender identity, when it has one. An adapter that cannot send as it uses its default sender. */
|
|
1398
|
+
from?: SenderIdentity;
|
|
1385
1399
|
}
|
|
1386
1400
|
type SendResult = {
|
|
1387
1401
|
status: 'SENT';
|
|
@@ -1609,6 +1623,8 @@ declare function processPendingNotifications(db: SchedulingDb, sender: Notificat
|
|
|
1609
1623
|
maxOverdueMs?: number;
|
|
1610
1624
|
/** Queue a `reminder.sent` webhook for each reminder that was sent. Off by default; needs the webhook tables. */
|
|
1611
1625
|
webhooks?: boolean;
|
|
1626
|
+
/** Send each message with its organization's sender identity (name, address, reply-to). Off by default; needs the brand table. */
|
|
1627
|
+
brand?: boolean;
|
|
1612
1628
|
}): Promise<{
|
|
1613
1629
|
sent: number;
|
|
1614
1630
|
failed: number;
|
|
@@ -1622,6 +1638,7 @@ declare function processPendingNotifications(db: SchedulingDb, sender: Notificat
|
|
|
1622
1638
|
*/
|
|
1623
1639
|
declare function scheduleNotifications(db: SchedulingDb, appointmentId: string, baseUrl?: string, options?: {
|
|
1624
1640
|
excludeTriggers?: NotificationTrigger[];
|
|
1641
|
+
brand?: boolean;
|
|
1625
1642
|
}): Promise<number | undefined>;
|
|
1626
1643
|
/**
|
|
1627
1644
|
* Cancel all pending notifications for an appointment.
|
|
@@ -1638,14 +1655,18 @@ declare function cancelPendingNotifications(db: SchedulingDb, appointmentId: str
|
|
|
1638
1655
|
* Previously called sendImmediateNotification — renamed to make the
|
|
1639
1656
|
* async queue-based behavior explicit.
|
|
1640
1657
|
*/
|
|
1641
|
-
declare function queueImmediateNotification(db: SchedulingDb, appointmentId: string, trigger: NotificationTrigger, baseUrl?: string
|
|
1658
|
+
declare function queueImmediateNotification(db: SchedulingDb, appointmentId: string, trigger: NotificationTrigger, baseUrl?: string, options?: {
|
|
1659
|
+
brand?: boolean;
|
|
1660
|
+
}): Promise<void>;
|
|
1642
1661
|
/**
|
|
1643
1662
|
* Queue an immediate email notification to the calendar's staff member.
|
|
1644
1663
|
* Silently skips if: appointment not found, no staffEmail on the calendar,
|
|
1645
1664
|
* or no active STAFF templates exist for the trigger.
|
|
1646
1665
|
* Failure must NEVER block the caller — always wrap call sites in try/catch.
|
|
1647
1666
|
*/
|
|
1648
|
-
declare function queueStaffNotification(db: SchedulingDb, appointmentId: string, trigger: NotificationTrigger, baseUrl?: string
|
|
1667
|
+
declare function queueStaffNotification(db: SchedulingDb, appointmentId: string, trigger: NotificationTrigger, baseUrl?: string, options?: {
|
|
1668
|
+
brand?: boolean;
|
|
1669
|
+
}): Promise<void>;
|
|
1649
1670
|
|
|
1650
1671
|
/**
|
|
1651
1672
|
* List all notification templates for an org, sorted by channel then trigger.
|
|
@@ -1900,7 +1921,7 @@ declare function getTeamAvailableSlots(db: SchedulingDb, query: TeamAvailability
|
|
|
1900
1921
|
*/
|
|
1901
1922
|
declare function localToUTC(dateStr: string, timeStr: string, tz: string): Date;
|
|
1902
1923
|
|
|
1903
|
-
declare const WEBHOOK_EVENT_TYPES: readonly ["appointment.booked", "appointment.rescheduled", "appointment.cancelled", "appointment.no_show", "reminder.sent"];
|
|
1924
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["appointment.booked", "appointment.rescheduled", "appointment.cancelled", "appointment.no_show", "reminder.sent", "waitlist.offered"];
|
|
1904
1925
|
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
1905
1926
|
/** Sent only by the "test" action; no endpoint subscribes to it. */
|
|
1906
1927
|
declare const WEBHOOK_TEST_EVENT = "webhook.test";
|
|
@@ -2092,4 +2113,602 @@ declare function listWebhookDeliveries(db: SchedulingDb, input: {
|
|
|
2092
2113
|
/** Puts a dead-lettered delivery back in the queue with a fresh set of tries. The log of earlier tries stays. */
|
|
2093
2114
|
declare function retryWebhookDelivery(db: SchedulingDb, organizationId: string, deliveryId: string, now?: Date): Promise<void>;
|
|
2094
2115
|
|
|
2095
|
-
|
|
2116
|
+
interface WaitlistEntryView {
|
|
2117
|
+
id: string;
|
|
2118
|
+
typeId: string;
|
|
2119
|
+
calendarId: string | null;
|
|
2120
|
+
day: string;
|
|
2121
|
+
slotStart: Date | null;
|
|
2122
|
+
clientName: string;
|
|
2123
|
+
clientEmail: string;
|
|
2124
|
+
clientPhone: string | null;
|
|
2125
|
+
status: string;
|
|
2126
|
+
offerSlotStart: Date | null;
|
|
2127
|
+
offerExpiresAt: Date | null;
|
|
2128
|
+
createdAt: Date;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
declare const MAX_WAITING_PER_TYPE_DAY = 50;
|
|
2132
|
+
interface JoinWaitlistInput {
|
|
2133
|
+
organizationId: string;
|
|
2134
|
+
typeId: string;
|
|
2135
|
+
/** Leave out to wait for any calendar that offers the type. */
|
|
2136
|
+
calendarId?: string;
|
|
2137
|
+
/** The day, YYYY-MM-DD in the calendar's timezone. */
|
|
2138
|
+
day: string;
|
|
2139
|
+
/** Leave out to wait for any time that day. */
|
|
2140
|
+
slotStart?: Date;
|
|
2141
|
+
clientName: string;
|
|
2142
|
+
clientEmail: string;
|
|
2143
|
+
clientPhone?: string | null;
|
|
2144
|
+
}
|
|
2145
|
+
declare function joinWaitlist(db: SchedulingDb, input: JoinWaitlistInput, now?: Date): Promise<{
|
|
2146
|
+
entry: WaitlistEntryView;
|
|
2147
|
+
token: string;
|
|
2148
|
+
}>;
|
|
2149
|
+
|
|
2150
|
+
declare const DEFAULT_OFFER_MINUTES = 30;
|
|
2151
|
+
interface WaitlistOffer {
|
|
2152
|
+
entry: WaitlistEntryView;
|
|
2153
|
+
/** The client's own handle; the host puts it in the link it sends. */
|
|
2154
|
+
token: string;
|
|
2155
|
+
calendarId: string;
|
|
2156
|
+
calendarName: string;
|
|
2157
|
+
typeName: string;
|
|
2158
|
+
startTime: Date;
|
|
2159
|
+
/** The timezone the client chose when they joined, for writing the time in their message. */
|
|
2160
|
+
timezone: string;
|
|
2161
|
+
expiresAt: Date;
|
|
2162
|
+
}
|
|
2163
|
+
/**
|
|
2164
|
+
* Offers the slot to the longest-waiting entry that fits it: same day, a calendar and type that match, the slot still
|
|
2165
|
+
* free. Returns null when nobody fits or the slot already has a live offer. The offer lasts `offerMinutes`, and never
|
|
2166
|
+
* past the start of the slot. Two callers freeing the same slot cannot both offer it: the database holds one live
|
|
2167
|
+
* offer per slot.
|
|
2168
|
+
*/
|
|
2169
|
+
declare function offerFreedSlot(db: SchedulingDb, input: {
|
|
2170
|
+
organizationId: string;
|
|
2171
|
+
calendarId: string;
|
|
2172
|
+
startTime: Date;
|
|
2173
|
+
offerMinutes?: number;
|
|
2174
|
+
now?: Date;
|
|
2175
|
+
}): Promise<WaitlistOffer | null>;
|
|
2176
|
+
/** As offerFreedSlot, but never throws: the cancellation that freed the slot is already saved. Logs a reference. */
|
|
2177
|
+
declare function tryOfferFreedSlot(db: SchedulingDb, input: Parameters<typeof offerFreedSlot>[1]): Promise<WaitlistOffer | null>;
|
|
2178
|
+
/**
|
|
2179
|
+
* Ends offers whose time ran out, and sorts out an accept that started and never finished. An accept whose booking was
|
|
2180
|
+
* saved becomes BOOKED; one whose booking never happened goes back in line. Returns the slots that came free either way
|
|
2181
|
+
* (a lapsed offer, or an accept that never booked), so the caller can offer each to the next person.
|
|
2182
|
+
*/
|
|
2183
|
+
declare function expireWaitlistOffers(db: SchedulingDb, options?: {
|
|
2184
|
+
now?: Date;
|
|
2185
|
+
acceptTimeoutMs?: number;
|
|
2186
|
+
}): Promise<{
|
|
2187
|
+
lapsed: Array<{
|
|
2188
|
+
organizationId: string;
|
|
2189
|
+
calendarId: string;
|
|
2190
|
+
startTime: Date;
|
|
2191
|
+
}>;
|
|
2192
|
+
released: number;
|
|
2193
|
+
booked: number;
|
|
2194
|
+
}>;
|
|
2195
|
+
|
|
2196
|
+
/** A slot that someone was holding an offer for and no longer is. The caller offers it to the next person. */
|
|
2197
|
+
interface FreedSlot {
|
|
2198
|
+
organizationId: string;
|
|
2199
|
+
calendarId: string;
|
|
2200
|
+
startTime: Date;
|
|
2201
|
+
}
|
|
2202
|
+
declare function listWaitlist(db: SchedulingDb, input: {
|
|
2203
|
+
organizationId: string;
|
|
2204
|
+
status?: string;
|
|
2205
|
+
limit?: number;
|
|
2206
|
+
offset?: number;
|
|
2207
|
+
}): Promise<{
|
|
2208
|
+
entries: WaitlistEntryView[];
|
|
2209
|
+
total: number;
|
|
2210
|
+
}>;
|
|
2211
|
+
/**
|
|
2212
|
+
* Removes an entry that is not mid-accept. When it held a live offer, the slot it held is returned so the caller can
|
|
2213
|
+
* offer it to the next person.
|
|
2214
|
+
*/
|
|
2215
|
+
declare function removeWaitlistEntry(db: SchedulingDb, organizationId: string, entryId: string): Promise<FreedSlot | null>;
|
|
2216
|
+
/** The client leaves by their own link. Only an entry that is waiting or holding an offer can leave; a held slot is returned. */
|
|
2217
|
+
declare function leaveWaitlist(db: SchedulingDb, token: string): Promise<FreedSlot | null>;
|
|
2218
|
+
|
|
2219
|
+
interface OfferDetails {
|
|
2220
|
+
entryId: string;
|
|
2221
|
+
organizationId: string;
|
|
2222
|
+
typeId: string;
|
|
2223
|
+
typeName: string;
|
|
2224
|
+
calendarId: string;
|
|
2225
|
+
calendarName: string;
|
|
2226
|
+
startTime: Date;
|
|
2227
|
+
timezone: string;
|
|
2228
|
+
expiresAt: Date;
|
|
2229
|
+
clientName: string;
|
|
2230
|
+
clientEmail: string;
|
|
2231
|
+
clientPhone: string | null;
|
|
2232
|
+
}
|
|
2233
|
+
/** What the offer is, for the page the client opens. Throws SCHED_1106 when there is none and SCHED_1107 when it lapsed. */
|
|
2234
|
+
declare function getWaitlistOffer(db: SchedulingDb, token: string, now?: Date): Promise<OfferDetails>;
|
|
2235
|
+
/** Claims the offer so it can be accepted once. Two clicks at the same moment: one wins, the other gets SCHED_1106. */
|
|
2236
|
+
declare function beginWaitlistAccept(db: SchedulingDb, token: string, now?: Date): Promise<OfferDetails>;
|
|
2237
|
+
declare function completeWaitlistAccept(db: SchedulingDb, entryId: string, appointmentId: string): Promise<void>;
|
|
2238
|
+
/**
|
|
2239
|
+
* What to do with an accept whose booking did not happen.
|
|
2240
|
+
* KEEP_OFFER: a temporary failure (busy, server error): the offer stays open until it expires.
|
|
2241
|
+
* BACK_IN_LINE: the slot was taken: the client keeps their place and waits for another opening.
|
|
2242
|
+
* DROP: the booking can never go through for this client (a booking rule refuses them): they come off the list and the
|
|
2243
|
+
* slot is returned, so the caller can offer it to the next person.
|
|
2244
|
+
*/
|
|
2245
|
+
type AcceptRelease = 'KEEP_OFFER' | 'BACK_IN_LINE' | 'DROP';
|
|
2246
|
+
declare function releaseWaitlistAccept(db: SchedulingDb, entryId: string, outcome?: AcceptRelease): Promise<FreedSlot | null>;
|
|
2247
|
+
interface SettledBooking {
|
|
2248
|
+
id: string;
|
|
2249
|
+
status: string;
|
|
2250
|
+
startTime: Date;
|
|
2251
|
+
endTime: Date;
|
|
2252
|
+
manageToken: string | null;
|
|
2253
|
+
clientName: string;
|
|
2254
|
+
clientEmail: string;
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Call this when an accept looks like it failed. A booking can be saved and a later step (messages, calendar sync) still
|
|
2258
|
+
* fail, so the client may already hold the slot. When they do, the entry is marked BOOKED and the booking is returned;
|
|
2259
|
+
* when they do not, this returns null and the caller releases the accept.
|
|
2260
|
+
*/
|
|
2261
|
+
declare function settleBookedAccept(db: SchedulingDb, entryId: string): Promise<SettledBooking | null>;
|
|
2262
|
+
|
|
2263
|
+
/** The calendar day an instant falls on in `timeZone`. */
|
|
2264
|
+
declare function localDay(instant: Date, timeZone: string): string;
|
|
2265
|
+
|
|
2266
|
+
type QuestionType = 'select' | 'radio' | 'checkbox' | 'text' | 'number';
|
|
2267
|
+
interface RoutingQuestion {
|
|
2268
|
+
id: string;
|
|
2269
|
+
label: string;
|
|
2270
|
+
type: QuestionType;
|
|
2271
|
+
required: boolean;
|
|
2272
|
+
/** The choices of a select, radio or checkbox question. */
|
|
2273
|
+
options?: string[];
|
|
2274
|
+
}
|
|
2275
|
+
type RoutingOperator = 'equals' | 'not_equals' | 'in' | 'contains' | 'not_contains' | 'gt' | 'gte' | 'lt' | 'lte' | 'is_answered' | 'is_empty';
|
|
2276
|
+
interface RoutingCondition {
|
|
2277
|
+
questionId: string;
|
|
2278
|
+
operator: RoutingOperator;
|
|
2279
|
+
/** A text, a number or a list of choices, depending on the operator. Not used by is_answered and is_empty. */
|
|
2280
|
+
value?: string | number | string[];
|
|
2281
|
+
}
|
|
2282
|
+
/** Where to send the client: an appointment type, a calendar, or a type on a given calendar. At least one is set. */
|
|
2283
|
+
interface RoutingDestination {
|
|
2284
|
+
typeId?: string;
|
|
2285
|
+
calendarId?: string;
|
|
2286
|
+
}
|
|
2287
|
+
interface RoutingRule {
|
|
2288
|
+
id: string;
|
|
2289
|
+
label?: string;
|
|
2290
|
+
/** `all`: every condition must hold. `any`: one is enough. */
|
|
2291
|
+
match: 'all' | 'any';
|
|
2292
|
+
conditions: RoutingCondition[];
|
|
2293
|
+
destination: RoutingDestination;
|
|
2294
|
+
}
|
|
2295
|
+
/** What happens when no rule matches: send the client somewhere anyway, or show a message. */
|
|
2296
|
+
type RoutingFallback = {
|
|
2297
|
+
kind: 'DESTINATION';
|
|
2298
|
+
destination: RoutingDestination;
|
|
2299
|
+
} | {
|
|
2300
|
+
kind: 'MESSAGE';
|
|
2301
|
+
message: string;
|
|
2302
|
+
};
|
|
2303
|
+
interface RoutingFormDefinition {
|
|
2304
|
+
questions: RoutingQuestion[];
|
|
2305
|
+
rules: RoutingRule[];
|
|
2306
|
+
fallback: RoutingFallback;
|
|
2307
|
+
}
|
|
2308
|
+
type RoutingAnswers = Record<string, string | number | string[]>;
|
|
2309
|
+
interface RoutingProblem {
|
|
2310
|
+
/** Where in the form, such as `rules[2].conditions[0].value`. */
|
|
2311
|
+
path: string;
|
|
2312
|
+
message: string;
|
|
2313
|
+
}
|
|
2314
|
+
declare const LIMITS: {
|
|
2315
|
+
readonly questions: 20;
|
|
2316
|
+
readonly rules: 50;
|
|
2317
|
+
readonly conditionsPerRule: 10;
|
|
2318
|
+
readonly options: 50;
|
|
2319
|
+
readonly label: 200;
|
|
2320
|
+
readonly option: 100;
|
|
2321
|
+
readonly message: 500;
|
|
2322
|
+
readonly textAnswer: 1000;
|
|
2323
|
+
readonly problems: 50;
|
|
2324
|
+
readonly formsPerOrganization: 50;
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2327
|
+
/** Which operators each kind of question allows. */
|
|
2328
|
+
declare const OPERATORS_BY_TYPE: Record<QuestionType, RoutingOperator[]>;
|
|
2329
|
+
type StructureResult = {
|
|
2330
|
+
ok: true;
|
|
2331
|
+
value: RoutingFormDefinition;
|
|
2332
|
+
} | {
|
|
2333
|
+
ok: false;
|
|
2334
|
+
problems: RoutingProblem[];
|
|
2335
|
+
};
|
|
2336
|
+
declare function validateRoutingStructure(input: unknown): StructureResult;
|
|
2337
|
+
|
|
2338
|
+
declare function validateRoutingDestinations(db: SchedulingDb, organizationId: string, definition: RoutingFormDefinition): Promise<RoutingProblem[]>;
|
|
2339
|
+
|
|
2340
|
+
type AnswerCheck = {
|
|
2341
|
+
ok: true;
|
|
2342
|
+
answers: RoutingAnswers;
|
|
2343
|
+
} | {
|
|
2344
|
+
ok: false;
|
|
2345
|
+
problems: RoutingProblem[];
|
|
2346
|
+
};
|
|
2347
|
+
/** Checks the answers fit the questions: required ones present, choices among the options, nothing the form did not ask. */
|
|
2348
|
+
declare function checkAnswers(questions: RoutingQuestion[], input: unknown): AnswerCheck;
|
|
2349
|
+
/** Every rule the answers satisfy, in the order the rules are listed. The first is the one that wins. */
|
|
2350
|
+
declare function matchingRules(definition: Pick<RoutingFormDefinition, 'rules'>, answers: RoutingAnswers): RoutingRule[];
|
|
2351
|
+
|
|
2352
|
+
interface RoutingFormView extends RoutingFormDefinition {
|
|
2353
|
+
id: string;
|
|
2354
|
+
name: string;
|
|
2355
|
+
slug: string;
|
|
2356
|
+
description: string | null;
|
|
2357
|
+
isActive: boolean;
|
|
2358
|
+
createdAt: Date;
|
|
2359
|
+
updatedAt: Date;
|
|
2360
|
+
}
|
|
2361
|
+
interface RoutingFormSummary {
|
|
2362
|
+
id: string;
|
|
2363
|
+
name: string;
|
|
2364
|
+
slug: string;
|
|
2365
|
+
description: string | null;
|
|
2366
|
+
isActive: boolean;
|
|
2367
|
+
updatedAt: Date;
|
|
2368
|
+
}
|
|
2369
|
+
interface RoutingFormInput {
|
|
2370
|
+
name: string;
|
|
2371
|
+
slug: string;
|
|
2372
|
+
description?: string | null;
|
|
2373
|
+
isActive?: boolean;
|
|
2374
|
+
questions: unknown;
|
|
2375
|
+
rules: unknown;
|
|
2376
|
+
fallback: unknown;
|
|
2377
|
+
}
|
|
2378
|
+
declare function createRoutingForm(db: SchedulingDb, organizationId: string, input: RoutingFormInput): Promise<RoutingFormView>;
|
|
2379
|
+
declare function getRoutingForm(db: SchedulingDb, organizationId: string, id: string): Promise<RoutingFormView>;
|
|
2380
|
+
declare function listRoutingForms(db: SchedulingDb, organizationId: string): Promise<RoutingFormSummary[]>;
|
|
2381
|
+
/** Changes the given fields and checks the whole result again, since a changed question can break an existing rule. */
|
|
2382
|
+
declare function updateRoutingForm(db: SchedulingDb, organizationId: string, id: string, patch: Partial<RoutingFormInput>): Promise<RoutingFormView>;
|
|
2383
|
+
declare function deleteRoutingForm(db: SchedulingDb, organizationId: string, id: string): Promise<void>;
|
|
2384
|
+
|
|
2385
|
+
interface PublicRoutingForm {
|
|
2386
|
+
name: string;
|
|
2387
|
+
slug: string;
|
|
2388
|
+
description: string | null;
|
|
2389
|
+
questions: RoutingQuestion[];
|
|
2390
|
+
}
|
|
2391
|
+
interface ResolvedDestination {
|
|
2392
|
+
typeId: string | null;
|
|
2393
|
+
typeSlug: string | null;
|
|
2394
|
+
typeName: string | null;
|
|
2395
|
+
calendarId: string | null;
|
|
2396
|
+
calendarSlug: string | null;
|
|
2397
|
+
calendarName: string | null;
|
|
2398
|
+
}
|
|
2399
|
+
interface RoutingOutcome {
|
|
2400
|
+
/** Where to send the client, or null when the form says to show `message` instead. */
|
|
2401
|
+
destination: ResolvedDestination | null;
|
|
2402
|
+
message: string | null;
|
|
2403
|
+
/** The rule that decided it, or null when the fallback did. */
|
|
2404
|
+
matchedRuleId: string | null;
|
|
2405
|
+
usedFallback: boolean;
|
|
2406
|
+
}
|
|
2407
|
+
/** The questions only. The rules and the fallback stay on the server. */
|
|
2408
|
+
declare function getPublicRoutingForm(db: SchedulingDb, input: {
|
|
2409
|
+
organizationId: string | null;
|
|
2410
|
+
slug: string;
|
|
2411
|
+
}): Promise<PublicRoutingForm>;
|
|
2412
|
+
/** Looks the destination up now: a type or calendar switched off since the form was saved is not sent to. */
|
|
2413
|
+
declare function resolveDestination(db: SchedulingDb, organizationId: string, destination: RoutingDestination): Promise<ResolvedDestination | null>;
|
|
2414
|
+
/**
|
|
2415
|
+
* Sends a client on. The first matching rule whose destination is still live wins; if none is, the fallback decides.
|
|
2416
|
+
* A form whose fallback destination is also gone tells the client to get in touch.
|
|
2417
|
+
*/
|
|
2418
|
+
declare function routeClient(db: SchedulingDb, input: {
|
|
2419
|
+
organizationId: string | null;
|
|
2420
|
+
slug: string;
|
|
2421
|
+
answers: unknown;
|
|
2422
|
+
}): Promise<RoutingOutcome>;
|
|
2423
|
+
/** Staff trying a form with sample answers. Works on a form that is switched off, and lists every rule that matched. */
|
|
2424
|
+
declare function testRoutingForm(db: SchedulingDb, input: {
|
|
2425
|
+
organizationId: string;
|
|
2426
|
+
id: string;
|
|
2427
|
+
answers: unknown;
|
|
2428
|
+
}): Promise<RoutingOutcome & {
|
|
2429
|
+
allMatchedRuleIds: string[];
|
|
2430
|
+
}>;
|
|
2431
|
+
|
|
2432
|
+
interface ParsedSubject {
|
|
2433
|
+
email: string | null;
|
|
2434
|
+
clientId: string | null;
|
|
2435
|
+
}
|
|
2436
|
+
interface ResolvedSubject {
|
|
2437
|
+
/** Lower-case addresses, without repeats. */
|
|
2438
|
+
emails: string[];
|
|
2439
|
+
clientId: string | null;
|
|
2440
|
+
}
|
|
2441
|
+
/** Checks the request names somebody, and in a way that cannot match more than that person. */
|
|
2442
|
+
declare function parseSubject(input: {
|
|
2443
|
+
email?: unknown;
|
|
2444
|
+
clientId?: unknown;
|
|
2445
|
+
}): ParsedSubject;
|
|
2446
|
+
/** One digest per identifier, tied to the organization. The request record keeps these instead of the address itself. */
|
|
2447
|
+
declare function subjectHashes(organizationId: string, subject: ResolvedSubject): string[];
|
|
2448
|
+
/** Adds the addresses a client id stands for: those on the client's bookings and series in this organization. */
|
|
2449
|
+
declare function resolveSubject(db: SchedulingDb, organizationId: string, parsed: ParsedSubject): Promise<ResolvedSubject>;
|
|
2450
|
+
|
|
2451
|
+
declare function collectSubjectRows(db: SchedulingDb, organizationId: string, subject: ResolvedSubject): Promise<{
|
|
2452
|
+
appointments: {
|
|
2453
|
+
couponCode: string | null;
|
|
2454
|
+
startTime: Date;
|
|
2455
|
+
cancelledAt: Date | null;
|
|
2456
|
+
cancelledBy: string | null;
|
|
2457
|
+
id: string;
|
|
2458
|
+
type: {
|
|
2459
|
+
name: string;
|
|
2460
|
+
};
|
|
2461
|
+
timezone: string;
|
|
2462
|
+
location: string | null;
|
|
2463
|
+
createdAt: Date;
|
|
2464
|
+
updatedAt: Date;
|
|
2465
|
+
calendar: {
|
|
2466
|
+
name: string;
|
|
2467
|
+
};
|
|
2468
|
+
endTime: Date;
|
|
2469
|
+
duration: number;
|
|
2470
|
+
clientName: string;
|
|
2471
|
+
clientEmail: string;
|
|
2472
|
+
clientPhone: string | null;
|
|
2473
|
+
clientId: string | null;
|
|
2474
|
+
status: _prisma_client.$Enums.AppointmentStatus;
|
|
2475
|
+
cancelReason: string | null;
|
|
2476
|
+
rescheduledFrom: Date | null;
|
|
2477
|
+
rescheduleCount: number;
|
|
2478
|
+
intakeResponses: _prisma_client_runtime_client.JsonValue;
|
|
2479
|
+
paymentStatus: string | null;
|
|
2480
|
+
paymentAmount: _prisma_client_runtime_client.Decimal | null;
|
|
2481
|
+
depositAmount: _prisma_client_runtime_client.Decimal | null;
|
|
2482
|
+
tipAmount: _prisma_client_runtime_client.Decimal | null;
|
|
2483
|
+
paymentProvider: string | null;
|
|
2484
|
+
paymentId: string | null;
|
|
2485
|
+
balancePaymentId: string | null;
|
|
2486
|
+
discountAmount: _prisma_client_runtime_client.Decimal | null;
|
|
2487
|
+
cancellationFeeAmount: _prisma_client_runtime_client.Decimal | null;
|
|
2488
|
+
refundAmount: _prisma_client_runtime_client.Decimal | null;
|
|
2489
|
+
refundStatus: _prisma_client.$Enums.RefundStatus | null;
|
|
2490
|
+
isGroup: boolean;
|
|
2491
|
+
notes: string | null;
|
|
2492
|
+
staffNotes: string | null;
|
|
2493
|
+
meetingUrl: string | null;
|
|
2494
|
+
recurringId: string | null;
|
|
2495
|
+
recurringIndex: number | null;
|
|
2496
|
+
packagePurchaseId: string | null;
|
|
2497
|
+
}[];
|
|
2498
|
+
notifications: never[] | {
|
|
2499
|
+
id: string;
|
|
2500
|
+
createdAt: Date;
|
|
2501
|
+
status: string;
|
|
2502
|
+
appointmentId: string;
|
|
2503
|
+
channel: string;
|
|
2504
|
+
trigger: string;
|
|
2505
|
+
recipient: string;
|
|
2506
|
+
subject: string | null;
|
|
2507
|
+
body: string;
|
|
2508
|
+
scheduledFor: Date;
|
|
2509
|
+
sentAt: Date | null;
|
|
2510
|
+
}[];
|
|
2511
|
+
waitlistEntries: never[] | {
|
|
2512
|
+
id: string;
|
|
2513
|
+
timezone: string;
|
|
2514
|
+
createdAt: Date;
|
|
2515
|
+
calendarId: string | null;
|
|
2516
|
+
day: string;
|
|
2517
|
+
typeId: string;
|
|
2518
|
+
clientName: string;
|
|
2519
|
+
clientEmail: string;
|
|
2520
|
+
clientPhone: string | null;
|
|
2521
|
+
status: string;
|
|
2522
|
+
slotStart: Date | null;
|
|
2523
|
+
offerSlotStart: Date | null;
|
|
2524
|
+
offerExpiresAt: Date | null;
|
|
2525
|
+
offeredAt: Date | null;
|
|
2526
|
+
bookedAppointmentId: string | null;
|
|
2527
|
+
}[];
|
|
2528
|
+
packagePurchases: never[] | {
|
|
2529
|
+
id: string;
|
|
2530
|
+
createdAt: Date;
|
|
2531
|
+
clientName: string | null;
|
|
2532
|
+
clientEmail: string;
|
|
2533
|
+
status: _prisma_client.$Enums.PackagePurchaseStatus;
|
|
2534
|
+
paymentId: string | null;
|
|
2535
|
+
notes: string | null;
|
|
2536
|
+
expiresAt: Date | null;
|
|
2537
|
+
packageId: string;
|
|
2538
|
+
sessionsTotal: number;
|
|
2539
|
+
sessionsUsed: number;
|
|
2540
|
+
purchasedAt: Date;
|
|
2541
|
+
pricePaidCents: number | null;
|
|
2542
|
+
}[];
|
|
2543
|
+
recurringSeries: never[] | {
|
|
2544
|
+
id: string;
|
|
2545
|
+
timezone: string;
|
|
2546
|
+
createdAt: Date;
|
|
2547
|
+
calendarId: string;
|
|
2548
|
+
typeId: string;
|
|
2549
|
+
clientName: string;
|
|
2550
|
+
clientEmail: string;
|
|
2551
|
+
clientPhone: string | null;
|
|
2552
|
+
clientId: string | null;
|
|
2553
|
+
status: _prisma_client.$Enums.RecurringSeriesStatus;
|
|
2554
|
+
notes: string | null;
|
|
2555
|
+
frequency: _prisma_client.$Enums.RecurringFrequency;
|
|
2556
|
+
occurrences: number;
|
|
2557
|
+
startTimeLocal: string;
|
|
2558
|
+
durationMins: number;
|
|
2559
|
+
endsAt: Date | null;
|
|
2560
|
+
}[];
|
|
2561
|
+
webhookDeliveries: {
|
|
2562
|
+
id: string;
|
|
2563
|
+
eventId: string;
|
|
2564
|
+
eventType: string;
|
|
2565
|
+
body: string;
|
|
2566
|
+
status: string;
|
|
2567
|
+
createdAt: Date;
|
|
2568
|
+
}[];
|
|
2569
|
+
}>;
|
|
2570
|
+
type SubjectRows = Awaited<ReturnType<typeof collectSubjectRows>>;
|
|
2571
|
+
interface SubjectCounts {
|
|
2572
|
+
appointments: number;
|
|
2573
|
+
notifications: number;
|
|
2574
|
+
waitlistEntries: number;
|
|
2575
|
+
packagePurchases: number;
|
|
2576
|
+
recurringSeries: number;
|
|
2577
|
+
webhookDeliveries: number;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
interface SubjectExport {
|
|
2581
|
+
format: 'ordinatio-scheduling-subject-export';
|
|
2582
|
+
version: 1;
|
|
2583
|
+
exportedAt: string;
|
|
2584
|
+
organizationId: string;
|
|
2585
|
+
subject: {
|
|
2586
|
+
emails: string[];
|
|
2587
|
+
clientId: string | null;
|
|
2588
|
+
};
|
|
2589
|
+
counts: SubjectCounts;
|
|
2590
|
+
appointments: Array<Omit<SubjectRows['appointments'][number], 'calendar' | 'type'> & {
|
|
2591
|
+
calendarName: string;
|
|
2592
|
+
typeName: string;
|
|
2593
|
+
}>;
|
|
2594
|
+
notifications: SubjectRows['notifications'];
|
|
2595
|
+
waitlistEntries: SubjectRows['waitlistEntries'];
|
|
2596
|
+
packagePurchases: SubjectRows['packagePurchases'];
|
|
2597
|
+
recurringSeries: SubjectRows['recurringSeries'];
|
|
2598
|
+
webhookDeliveries: SubjectRows['webhookDeliveries'];
|
|
2599
|
+
}
|
|
2600
|
+
declare function exportSubject(db: SchedulingDb, input: {
|
|
2601
|
+
organizationId: string;
|
|
2602
|
+
requestedBy: string;
|
|
2603
|
+
email?: unknown;
|
|
2604
|
+
clientId?: unknown;
|
|
2605
|
+
now?: Date;
|
|
2606
|
+
}): Promise<SubjectExport>;
|
|
2607
|
+
|
|
2608
|
+
declare const ERASED_NAME = "Erased client";
|
|
2609
|
+
declare const ERASED_EMAIL = "erased@erased.invalid";
|
|
2610
|
+
interface EraseBlockers {
|
|
2611
|
+
upcomingAppointments: number;
|
|
2612
|
+
liveWaitlistEntries: number;
|
|
2613
|
+
}
|
|
2614
|
+
interface ErasePreview {
|
|
2615
|
+
counts: SubjectCounts;
|
|
2616
|
+
blockers: EraseBlockers;
|
|
2617
|
+
canErase: boolean;
|
|
2618
|
+
warnings: string[];
|
|
2619
|
+
}
|
|
2620
|
+
/** What an erasure would remove and whether anything stops it. Changes and records nothing. */
|
|
2621
|
+
declare function previewErase(db: SchedulingDb, input: {
|
|
2622
|
+
organizationId: string;
|
|
2623
|
+
email?: unknown;
|
|
2624
|
+
clientId?: unknown;
|
|
2625
|
+
now?: Date;
|
|
2626
|
+
}): Promise<ErasePreview>;
|
|
2627
|
+
declare function eraseSubject(db: SchedulingDb, input: {
|
|
2628
|
+
organizationId: string;
|
|
2629
|
+
requestedBy: string;
|
|
2630
|
+
email?: unknown;
|
|
2631
|
+
clientId?: unknown;
|
|
2632
|
+
now?: Date;
|
|
2633
|
+
}): Promise<{
|
|
2634
|
+
counts: SubjectCounts;
|
|
2635
|
+
}>;
|
|
2636
|
+
|
|
2637
|
+
type PrivacyRequestKind = 'EXPORT' | 'ERASE';
|
|
2638
|
+
interface PrivacyRequestView {
|
|
2639
|
+
id: string;
|
|
2640
|
+
kind: string;
|
|
2641
|
+
requestedBy: string;
|
|
2642
|
+
counts: unknown;
|
|
2643
|
+
createdAt: Date;
|
|
2644
|
+
}
|
|
2645
|
+
declare function listPrivacyRequests(db: SchedulingDb, input: {
|
|
2646
|
+
organizationId: string;
|
|
2647
|
+
limit?: number;
|
|
2648
|
+
offset?: number;
|
|
2649
|
+
}): Promise<{
|
|
2650
|
+
requests: PrivacyRequestView[];
|
|
2651
|
+
total: number;
|
|
2652
|
+
}>;
|
|
2653
|
+
|
|
2654
|
+
interface BrandFields {
|
|
2655
|
+
displayName: string;
|
|
2656
|
+
logoUrl: string | null;
|
|
2657
|
+
primaryColor: string | null;
|
|
2658
|
+
accentColor: string | null;
|
|
2659
|
+
backgroundColor: string | null;
|
|
2660
|
+
textColor: string | null;
|
|
2661
|
+
fontFamily: string | null;
|
|
2662
|
+
footerText: string | null;
|
|
2663
|
+
replyToEmail: string | null;
|
|
2664
|
+
fromName: string | null;
|
|
2665
|
+
fromEmail: string | null;
|
|
2666
|
+
}
|
|
2667
|
+
interface BrandView extends BrandFields {
|
|
2668
|
+
updatedAt: Date;
|
|
2669
|
+
}
|
|
2670
|
+
/** What a visitor of the booking page may see: no email addresses. */
|
|
2671
|
+
interface PublicBrand {
|
|
2672
|
+
displayName: string;
|
|
2673
|
+
logoUrl: string | null;
|
|
2674
|
+
primaryColor: string | null;
|
|
2675
|
+
accentColor: string | null;
|
|
2676
|
+
backgroundColor: string | null;
|
|
2677
|
+
textColor: string | null;
|
|
2678
|
+
fontFamily: string | null;
|
|
2679
|
+
footerText: string | null;
|
|
2680
|
+
}
|
|
2681
|
+
interface BrandProblem {
|
|
2682
|
+
path: string;
|
|
2683
|
+
message: string;
|
|
2684
|
+
}
|
|
2685
|
+
declare const BRAND_FIELDS: readonly ["displayName", "logoUrl", "primaryColor", "accentColor", "backgroundColor", "textColor", "fontFamily", "footerText", "replyToEmail", "fromName", "fromEmail"];
|
|
2686
|
+
|
|
2687
|
+
interface ValidateBrandOptions {
|
|
2688
|
+
/**
|
|
2689
|
+
* Says whether the host may send mail from this domain (lower case). Without it no sending address is accepted: an
|
|
2690
|
+
* organization must not be able to send as a domain it does not control.
|
|
2691
|
+
*/
|
|
2692
|
+
isSendingDomainVerified?: (domain: string) => Promise<boolean>;
|
|
2693
|
+
}
|
|
2694
|
+
/** The stored form of the settings, or a SCHED_1400 error listing every problem. */
|
|
2695
|
+
declare function validateBrand(input: unknown, options: ValidateBrandOptions): Promise<BrandFields>;
|
|
2696
|
+
|
|
2697
|
+
declare function getBrand(db: SchedulingDb, organizationId: string): Promise<BrandView | null>;
|
|
2698
|
+
/**
|
|
2699
|
+
* What the booking page may show. With no organization named (a server with one organization) it is the brand of the
|
|
2700
|
+
* only organization that has one; with several, none is chosen for the visitor.
|
|
2701
|
+
*/
|
|
2702
|
+
declare function getPublicBrand(db: SchedulingDb, organizationId: string | null): Promise<PublicBrand | null>;
|
|
2703
|
+
/** Saves the whole brand, replacing what was there. Throws SCHED_1400 listing every problem. */
|
|
2704
|
+
declare function saveBrand(db: SchedulingDb, organizationId: string, input: unknown, options: ValidateBrandOptions): Promise<BrandView>;
|
|
2705
|
+
/** Removes the brand. True when there was one. */
|
|
2706
|
+
declare function deleteBrand(db: SchedulingDb, organizationId: string): Promise<boolean>;
|
|
2707
|
+
|
|
2708
|
+
/** The sender of an organization's messages, or null when there is no brand. Only what is set is included. */
|
|
2709
|
+
declare function senderIdentity(brand: BrandFields | null): SenderIdentity | null;
|
|
2710
|
+
/** Values for `{{brandName}}`, `{{brandLogoUrl}}`, `{{brandColor}}` and `{{brandFooter}}`; empty text when not set. */
|
|
2711
|
+
declare function brandTemplateFields(brand: BrandFields | null): Record<string, string>;
|
|
2712
|
+
declare function toPublicBrand(brand: BrandFields): PublicBrand;
|
|
2713
|
+
|
|
2714
|
+
export { type AcceptRelease, type AddTimeBlockInput, type AppointmentDashboardData, type AppointmentDashboardItem, type AppointmentDashboardStats, type AppointmentLocationType, type AppointmentStatus, type AppointmentWithDetails, type AssignmentStrategy, type AttemptOptions, type AuthAdapter, type AuthContext, type AvailabilityQuery, type AvailabilityResult, type AvailabilityRuleInput, BRAND_FIELDS, BlockedTargetError, type BookAppointmentInput, type BookingAnalytics, type BrandFields, type BrandProblem, type BrandView, type CalendarEvent, type CalendarEventRef, type CalendarSyncAdapter, type CalendarType, type CancelInput, type CancelRecurringScope, type CancellationFeeConfig, type CancellationFeeResult, type ChargeRequest, type ChargeResult, type Clock, type CreateAppointmentTypeInput, type CreateCalendarInput, DEFAULT_BACKOFF_SECONDS, DEFAULT_OFFER_MINUTES, type DashboardQuery, type DayAppointment, type DeliverOptions, type DeliverSummary, ERASED_EMAIL, ERASED_NAME, type EraseBlockers, type ErasePreview, type FreedSlot, type GroupCapacityResult, type GroupSession, type GroupSessionAttendee, type InMemoryClockControl, type InMemoryOptions, type InMemoryRecords, type IntakeFormField, type JoinWaitlistInput, LIMITS, MAX_ENDPOINTS_PER_ORGANIZATION, MAX_WAITING_PER_TYPE_DAY, type MarkNoShowInput, type NotificationAdapter, type NotificationChannel, type NotificationContext, type NotificationSender, type NotificationTrigger, OPERATORS_BY_TYPE, type OfferDetails, type OrgCancellationPolicy, type OutboundMessage, type ParsedSubject, type PaymentAdapter, type PaymentCheck, type PaymentContractOptions, type PaymentProcessor, type PaymentResult, type PrivacyRequestKind, type PrivacyRequestView, type PublicBrand, type PublicRoutingForm, type QuestionType, RECURRING_MAX_OCCURRENCES, LIMITS as ROUTING_LIMITS, type RecurringFrequency, type RefundOptions, type RefundResult, type RescheduleInput, type ResolvedDestination, type ResolvedSubject, type RetryConfig, type RoutingAnswers, type RoutingCondition, type RoutingDestination, type RoutingFallback, type RoutingFormDefinition, type RoutingFormInput, type RoutingFormSummary, type RoutingFormView, type RoutingOperator, type RoutingOutcome, type RoutingProblem, type RoutingQuestion, type RoutingRule, SCHEDULING_ERRORS, SIGNATURE_HEADER, type SchedulingAdapters, type SchedulingCallbacks, type SchedulingDb, SchedulingNotFoundError, SchedulingValidationError, type SendResult, type SettledBooking, type SubjectCounts, type SubjectExport, type TeamAvailabilityQuery, type TeamAvailabilityResult, type TestSendResult, type TimeSlot, type TransportRequest, USER_DAY_LIMIT, type UpdateCalendarInput, type UrlCheckOptions, type UserDayInput, type UserDayResult, type ValidateBrandOptions, WEBHOOK_EVENT_TYPES, WEBHOOK_TEST_EVENT, type WaitlistEntryView, type WaitlistOffer, type WebhookDeliveryView, type WebhookEndpointView, type WebhookEnvelope, type WebhookEventType, type WebhookTransport, adaptersToCallbacks, addDateOverride, addTimeBlock, appointmentWebhookData, archiveCalendar, beginWaitlistAccept, bookAppointment, brandTemplateFields, buildJitsiUrl, buildNotificationContext, buildOccurrenceStartTime, buildRecurringSlots, calculateCancellationFee, cancelAppointment, cancelPendingNotifications, checkAnswers, checkAuthContract, checkCalendarSyncContract, checkClockContract, checkNotificationContract, checkPaymentContract, checkWebhookUrl, completeWaitlistAccept, createAppointmentType, createCalendar, createInMemoryAdapters, createNodeTransport, createNotificationTemplate, createRoutingForm, createWebhookEndpoint, deleteBrand, deleteCalendar, deleteNotificationTemplate, deleteRoutingForm, deleteWebhookEndpoint, deliverDueWebhooks, enqueueAppointmentWebhook, enqueueReminderSent, enqueueWebhookEvent, eraseSubject, expireWaitlistOffers, exportSubject, generateOccurrenceDates, generateWebhookSecret, getAppointment, getAppointmentDashboard, getAppointmentType, getAppointmentsForRange, getAvailableDates, getAvailableSlots, getBookingAnalytics, getBrand, getCalendar, getGroupCapacity, getGroupSessions, getNotificationTemplate, getPublicBrand, getPublicRoutingForm, getRoutingForm, getTeamAvailableSlots, getUserDayAppointments, getWaitlistOffer, isPrivateAddress, isSlotAvailable, isVirtualMeeting, joinWaitlist, leaveWaitlist, listAppointmentTypes, listAppointments, listAvailabilityRules, listCalendars, listNotificationTemplates, listPrivacyRequests, listRoutingForms, listWaitlist, listWebhookDeliveries, listWebhookEndpoints, localDay, localToUTC, markNoShow, matchingRules, offerFreedSlot, parseSubject, parseTimeLocal, previewErase, processPendingNotifications, queueImmediateNotification, queueStaffNotification, releaseWaitlistAccept, removeDateOverride, removeWaitlistEntry, renderTemplate, rescheduleAppointment, resolveDestination, resolveLocation, resolveSubject, retryWebhookDelivery, routeClient, saveBrand, schedError, scheduleNotifications, selectCalendarForBooking, sendTestWebhook, senderIdentity, setWeeklyAvailability, settleBookedAccept, signWebhook, subjectHashes, testRoutingForm, toPublicBrand, tryOfferFreedSlot, updateAppointmentType, updateCalendar, updateNotificationTemplate, updateRoutingForm, validateBrand, validateRoutingDestinations, validateRoutingStructure, verifyWebhookSignature, withCalendarVisibility };
|