@aranova/tracking-next 0.20.2 → 0.22.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/README.md +80 -1
- package/dist/blog-server.js +12 -0
- package/dist/blog-server.js.map +1 -1
- package/dist/blog-server.mjs +12 -0
- package/dist/blog-server.mjs.map +1 -1
- package/dist/blog.js +7 -0
- package/dist/blog.js.map +1 -1
- package/dist/blog.mjs +7 -0
- package/dist/blog.mjs.map +1 -1
- package/dist/calendar-server.d.mts +53 -0
- package/dist/calendar-server.d.ts +53 -0
- package/dist/calendar-server.js +206 -0
- package/dist/calendar-server.js.map +1 -0
- package/dist/calendar-server.mjs +180 -0
- package/dist/calendar-server.mjs.map +1 -0
- package/dist/calendar.d.mts +112 -0
- package/dist/calendar.d.ts +112 -0
- package/dist/calendar.js +524 -0
- package/dist/calendar.js.map +1 -0
- package/dist/calendar.mjs +464 -0
- package/dist/calendar.mjs.map +1 -0
- package/dist/date-BHetnL7s.d.mts +26 -0
- package/dist/date-BHetnL7s.d.ts +26 -0
- package/dist/index.d.mts +62 -5
- package/dist/index.d.ts +62 -5
- package/dist/index.js +566 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +529 -21
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-B2vHJkNz.d.mts → phone-utils-BhWfNuPS.d.mts} +8 -0
- package/dist/{phone-utils-B2vHJkNz.d.ts → phone-utils-BhWfNuPS.d.ts} +8 -0
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/request-Doq36Rt0.d.mts +19 -0
- package/dist/request-Doq36Rt0.d.ts +19 -0
- package/dist/{sales-DrH6dY5F.d.mts → sales-C7tPnqbq.d.ts} +9 -48
- package/dist/{sales-DrH6dY5F.d.ts → sales-H_6bHrL-.d.mts} +9 -48
- package/dist/sales.d.mts +3 -1
- package/dist/sales.d.ts +3 -1
- package/dist/sales.js +29 -17
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +29 -17
- package/dist/sales.mjs.map +1 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/transport-C-_rFSR4.d.ts +721 -0
- package/dist/transport-yUF5Wize.d.mts +721 -0
- package/package.json +21 -1
|
@@ -0,0 +1,721 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { A as ApiTransportConfig } from './request-Doq36Rt0.mjs';
|
|
3
|
+
|
|
4
|
+
/** Bumped when the durable `metadata` payload changes shape. */
|
|
5
|
+
declare const CALENDAR_METADATA_SCHEMA_VERSION = 1;
|
|
6
|
+
declare const MAX_ATTENDEES = 20;
|
|
7
|
+
declare const MAX_REMINDER_OVERRIDES = 5;
|
|
8
|
+
/** Google's ceiling for `reminders.overrides[].minutes`: four weeks. */
|
|
9
|
+
declare const MAX_REMINDER_MINUTES = 40320;
|
|
10
|
+
declare const MAX_BOOKING_MINUTES = 1440;
|
|
11
|
+
declare const BOOKING_SOURCES: readonly ["website", "phone", "walk_in", "import", "operator"];
|
|
12
|
+
declare const BOOKING_STATUSES: readonly ["pending", "confirmed", "cancelled", "no_show"];
|
|
13
|
+
declare const GOOGLE_SYNC_STATES: readonly ["queued", "synced", "uncertain", "failed", "drifted"];
|
|
14
|
+
declare const CALENDAR_SYNC_STATUSES: readonly ["pending_invite", "awaiting_calendar_selection", "connected", "needs_reconnect", "revoked", "disabled"];
|
|
15
|
+
/** Every failure the calendar API can hand back, so a site can branch on it. */
|
|
16
|
+
declare const CALENDAR_ERROR_CODES: readonly ["slot_unavailable", "calendar_not_connected", "calendar_disconnected", "booking_not_found", "outside_booking_window", "rate_limited", "google_error"];
|
|
17
|
+
type CalendarErrorCode = (typeof CALENDAR_ERROR_CODES)[number];
|
|
18
|
+
type BookingStatus = (typeof BOOKING_STATUSES)[number];
|
|
19
|
+
type GoogleSyncState = (typeof GOOGLE_SYNC_STATES)[number];
|
|
20
|
+
type CalendarSyncStatus = (typeof CALENDAR_SYNC_STATUSES)[number];
|
|
21
|
+
type JsonScalar = string | number | boolean | null;
|
|
22
|
+
declare const bookingAttendeeSchema: z.ZodObject<{
|
|
23
|
+
email: z.ZodString;
|
|
24
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
}, "strict", z.ZodTypeAny, {
|
|
27
|
+
email: string;
|
|
28
|
+
optional: boolean;
|
|
29
|
+
display_name?: string | null | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
email: string;
|
|
32
|
+
display_name?: string | null | undefined;
|
|
33
|
+
optional?: boolean | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
declare const bookingReminderSchema: z.ZodObject<{
|
|
36
|
+
method: z.ZodEnum<["email", "popup"]>;
|
|
37
|
+
minutes_before: z.ZodNumber;
|
|
38
|
+
}, "strict", z.ZodTypeAny, {
|
|
39
|
+
method: "email" | "popup";
|
|
40
|
+
minutes_before: number;
|
|
41
|
+
}, {
|
|
42
|
+
method: "email" | "popup";
|
|
43
|
+
minutes_before: number;
|
|
44
|
+
}>;
|
|
45
|
+
declare const bookingRemindersSchema: z.ZodObject<{
|
|
46
|
+
use_calendar_defaults: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
overrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
48
|
+
method: z.ZodEnum<["email", "popup"]>;
|
|
49
|
+
minutes_before: z.ZodNumber;
|
|
50
|
+
}, "strict", z.ZodTypeAny, {
|
|
51
|
+
method: "email" | "popup";
|
|
52
|
+
minutes_before: number;
|
|
53
|
+
}, {
|
|
54
|
+
method: "email" | "popup";
|
|
55
|
+
minutes_before: number;
|
|
56
|
+
}>, "many">>;
|
|
57
|
+
}, "strict", z.ZodTypeAny, {
|
|
58
|
+
use_calendar_defaults: boolean;
|
|
59
|
+
overrides: {
|
|
60
|
+
method: "email" | "popup";
|
|
61
|
+
minutes_before: number;
|
|
62
|
+
}[];
|
|
63
|
+
}, {
|
|
64
|
+
use_calendar_defaults?: boolean | undefined;
|
|
65
|
+
overrides?: {
|
|
66
|
+
method: "email" | "popup";
|
|
67
|
+
minutes_before: number;
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
declare const bookingLocationSchema: z.ZodUnion<[z.ZodObject<{
|
|
71
|
+
kind: z.ZodLiteral<"google_meet">;
|
|
72
|
+
}, "strict", z.ZodTypeAny, {
|
|
73
|
+
kind: "google_meet";
|
|
74
|
+
}, {
|
|
75
|
+
kind: "google_meet";
|
|
76
|
+
}>, z.ZodObject<{
|
|
77
|
+
kind: z.ZodLiteral<"physical">;
|
|
78
|
+
address: z.ZodString;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
address: string;
|
|
81
|
+
kind: "physical";
|
|
82
|
+
}, {
|
|
83
|
+
address: string;
|
|
84
|
+
kind: "physical";
|
|
85
|
+
}>, z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"phone">;
|
|
87
|
+
phone: z.ZodString;
|
|
88
|
+
}, "strict", z.ZodTypeAny, {
|
|
89
|
+
phone: string;
|
|
90
|
+
kind: "phone";
|
|
91
|
+
}, {
|
|
92
|
+
phone: string;
|
|
93
|
+
kind: "phone";
|
|
94
|
+
}>, z.ZodObject<{
|
|
95
|
+
kind: z.ZodLiteral<"custom">;
|
|
96
|
+
text: z.ZodString;
|
|
97
|
+
}, "strict", z.ZodTypeAny, {
|
|
98
|
+
text: string;
|
|
99
|
+
kind: "custom";
|
|
100
|
+
}, {
|
|
101
|
+
text: string;
|
|
102
|
+
kind: "custom";
|
|
103
|
+
}>]>;
|
|
104
|
+
/**
|
|
105
|
+
* The nullable form, flattened.
|
|
106
|
+
*
|
|
107
|
+
* `bookingLocationSchema.nullable()` would nest one `anyOf` inside another,
|
|
108
|
+
* while Pydantic's `BookingLocation | None` flattens to a single list — the
|
|
109
|
+
* drift snapshot compares structure, so both sides emit the flat shape.
|
|
110
|
+
*/
|
|
111
|
+
declare const bookingLocationNullableSchema: z.ZodUnion<[z.ZodObject<{
|
|
112
|
+
kind: z.ZodLiteral<"google_meet">;
|
|
113
|
+
}, "strict", z.ZodTypeAny, {
|
|
114
|
+
kind: "google_meet";
|
|
115
|
+
}, {
|
|
116
|
+
kind: "google_meet";
|
|
117
|
+
}>, z.ZodObject<{
|
|
118
|
+
kind: z.ZodLiteral<"physical">;
|
|
119
|
+
address: z.ZodString;
|
|
120
|
+
}, "strict", z.ZodTypeAny, {
|
|
121
|
+
address: string;
|
|
122
|
+
kind: "physical";
|
|
123
|
+
}, {
|
|
124
|
+
address: string;
|
|
125
|
+
kind: "physical";
|
|
126
|
+
}>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"phone">;
|
|
128
|
+
phone: z.ZodString;
|
|
129
|
+
}, "strict", z.ZodTypeAny, {
|
|
130
|
+
phone: string;
|
|
131
|
+
kind: "phone";
|
|
132
|
+
}, {
|
|
133
|
+
phone: string;
|
|
134
|
+
kind: "phone";
|
|
135
|
+
}>, z.ZodObject<{
|
|
136
|
+
kind: z.ZodLiteral<"custom">;
|
|
137
|
+
text: z.ZodString;
|
|
138
|
+
}, "strict", z.ZodTypeAny, {
|
|
139
|
+
text: string;
|
|
140
|
+
kind: "custom";
|
|
141
|
+
}, {
|
|
142
|
+
text: string;
|
|
143
|
+
kind: "custom";
|
|
144
|
+
}>, z.ZodNull]>;
|
|
145
|
+
declare const bookingCustomerSchema: z.ZodObject<{
|
|
146
|
+
email: z.ZodString;
|
|
147
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
sms_consent: z.ZodDefault<z.ZodBoolean>;
|
|
150
|
+
}, "strict", z.ZodTypeAny, {
|
|
151
|
+
email: string;
|
|
152
|
+
sms_consent: boolean;
|
|
153
|
+
name?: string | null | undefined;
|
|
154
|
+
phone?: string | null | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
email: string;
|
|
157
|
+
name?: string | null | undefined;
|
|
158
|
+
phone?: string | null | undefined;
|
|
159
|
+
sms_consent?: boolean | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
/**
|
|
162
|
+
* Named attribution keys plus a flat escape hatch.
|
|
163
|
+
*
|
|
164
|
+
* `custom` is flat and scalar-only on purpose: it mirrors trivially in Pydantic,
|
|
165
|
+
* stays JSONB-queryable, and bounds what a caller can push. Only `custom` is
|
|
166
|
+
* ever mirrored to Google's `extendedProperties`; the named keys stay in our
|
|
167
|
+
* database.
|
|
168
|
+
*/
|
|
169
|
+
declare const bookingMetadataSchema: z.ZodObject<{
|
|
170
|
+
schema_version: z.ZodDefault<z.ZodNumber>;
|
|
171
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodEnum<["website", "phone", "walk_in", "import", "operator"]>>>;
|
|
172
|
+
service: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
visitor_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
gclid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
176
|
+
fbclid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
utm_source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
|
+
utm_medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
+
utm_campaign: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
|
+
utm_term: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
181
|
+
utm_content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
182
|
+
landing_page: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
183
|
+
referrer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
+
custom: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>>;
|
|
186
|
+
}, "strict", z.ZodTypeAny, {
|
|
187
|
+
schema_version: number;
|
|
188
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
189
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
190
|
+
gclid?: string | null | undefined;
|
|
191
|
+
fbclid?: string | null | undefined;
|
|
192
|
+
utm_source?: string | null | undefined;
|
|
193
|
+
utm_medium?: string | null | undefined;
|
|
194
|
+
utm_campaign?: string | null | undefined;
|
|
195
|
+
utm_term?: string | null | undefined;
|
|
196
|
+
utm_content?: string | null | undefined;
|
|
197
|
+
session_id?: string | null | undefined;
|
|
198
|
+
service?: string | null | undefined;
|
|
199
|
+
referrer?: string | null | undefined;
|
|
200
|
+
visitor_id?: string | null | undefined;
|
|
201
|
+
landing_page?: string | null | undefined;
|
|
202
|
+
notes?: string | null | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
205
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
206
|
+
gclid?: string | null | undefined;
|
|
207
|
+
fbclid?: string | null | undefined;
|
|
208
|
+
utm_source?: string | null | undefined;
|
|
209
|
+
utm_medium?: string | null | undefined;
|
|
210
|
+
utm_campaign?: string | null | undefined;
|
|
211
|
+
utm_term?: string | null | undefined;
|
|
212
|
+
utm_content?: string | null | undefined;
|
|
213
|
+
session_id?: string | null | undefined;
|
|
214
|
+
schema_version?: number | undefined;
|
|
215
|
+
service?: string | null | undefined;
|
|
216
|
+
referrer?: string | null | undefined;
|
|
217
|
+
visitor_id?: string | null | undefined;
|
|
218
|
+
landing_page?: string | null | undefined;
|
|
219
|
+
notes?: string | null | undefined;
|
|
220
|
+
}>;
|
|
221
|
+
declare const bookingCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
222
|
+
calendar_key: z.ZodString;
|
|
223
|
+
appointment_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
start_at: z.ZodString;
|
|
225
|
+
end_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
227
|
+
/** The booker's zone — distinct from the business's and the calendar's. */
|
|
228
|
+
time_zone: z.ZodEffects<z.ZodString, string, string>;
|
|
229
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
location: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
232
|
+
kind: z.ZodLiteral<"google_meet">;
|
|
233
|
+
}, "strict", z.ZodTypeAny, {
|
|
234
|
+
kind: "google_meet";
|
|
235
|
+
}, {
|
|
236
|
+
kind: "google_meet";
|
|
237
|
+
}>, z.ZodObject<{
|
|
238
|
+
kind: z.ZodLiteral<"physical">;
|
|
239
|
+
address: z.ZodString;
|
|
240
|
+
}, "strict", z.ZodTypeAny, {
|
|
241
|
+
address: string;
|
|
242
|
+
kind: "physical";
|
|
243
|
+
}, {
|
|
244
|
+
address: string;
|
|
245
|
+
kind: "physical";
|
|
246
|
+
}>, z.ZodObject<{
|
|
247
|
+
kind: z.ZodLiteral<"phone">;
|
|
248
|
+
phone: z.ZodString;
|
|
249
|
+
}, "strict", z.ZodTypeAny, {
|
|
250
|
+
phone: string;
|
|
251
|
+
kind: "phone";
|
|
252
|
+
}, {
|
|
253
|
+
phone: string;
|
|
254
|
+
kind: "phone";
|
|
255
|
+
}>, z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"custom">;
|
|
257
|
+
text: z.ZodString;
|
|
258
|
+
}, "strict", z.ZodTypeAny, {
|
|
259
|
+
text: string;
|
|
260
|
+
kind: "custom";
|
|
261
|
+
}, {
|
|
262
|
+
text: string;
|
|
263
|
+
kind: "custom";
|
|
264
|
+
}>, z.ZodNull]>>;
|
|
265
|
+
customer: z.ZodObject<{
|
|
266
|
+
email: z.ZodString;
|
|
267
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
sms_consent: z.ZodDefault<z.ZodBoolean>;
|
|
270
|
+
}, "strict", z.ZodTypeAny, {
|
|
271
|
+
email: string;
|
|
272
|
+
sms_consent: boolean;
|
|
273
|
+
name?: string | null | undefined;
|
|
274
|
+
phone?: string | null | undefined;
|
|
275
|
+
}, {
|
|
276
|
+
email: string;
|
|
277
|
+
name?: string | null | undefined;
|
|
278
|
+
phone?: string | null | undefined;
|
|
279
|
+
sms_consent?: boolean | undefined;
|
|
280
|
+
}>;
|
|
281
|
+
attendees: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
282
|
+
email: z.ZodString;
|
|
283
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
optional: z.ZodDefault<z.ZodBoolean>;
|
|
285
|
+
}, "strict", z.ZodTypeAny, {
|
|
286
|
+
email: string;
|
|
287
|
+
optional: boolean;
|
|
288
|
+
display_name?: string | null | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
email: string;
|
|
291
|
+
display_name?: string | null | undefined;
|
|
292
|
+
optional?: boolean | undefined;
|
|
293
|
+
}>, "many">>;
|
|
294
|
+
send_invites: z.ZodDefault<z.ZodBoolean>;
|
|
295
|
+
reminders: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
296
|
+
use_calendar_defaults: z.ZodDefault<z.ZodBoolean>;
|
|
297
|
+
overrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
298
|
+
method: z.ZodEnum<["email", "popup"]>;
|
|
299
|
+
minutes_before: z.ZodNumber;
|
|
300
|
+
}, "strict", z.ZodTypeAny, {
|
|
301
|
+
method: "email" | "popup";
|
|
302
|
+
minutes_before: number;
|
|
303
|
+
}, {
|
|
304
|
+
method: "email" | "popup";
|
|
305
|
+
minutes_before: number;
|
|
306
|
+
}>, "many">>;
|
|
307
|
+
}, "strict", z.ZodTypeAny, {
|
|
308
|
+
use_calendar_defaults: boolean;
|
|
309
|
+
overrides: {
|
|
310
|
+
method: "email" | "popup";
|
|
311
|
+
minutes_before: number;
|
|
312
|
+
}[];
|
|
313
|
+
}, {
|
|
314
|
+
use_calendar_defaults?: boolean | undefined;
|
|
315
|
+
overrides?: {
|
|
316
|
+
method: "email" | "popup";
|
|
317
|
+
minutes_before: number;
|
|
318
|
+
}[] | undefined;
|
|
319
|
+
}>>>;
|
|
320
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
321
|
+
schema_version: z.ZodDefault<z.ZodNumber>;
|
|
322
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodEnum<["website", "phone", "walk_in", "import", "operator"]>>>;
|
|
323
|
+
service: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
|
+
visitor_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
|
+
session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
|
+
gclid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
+
fbclid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
328
|
+
utm_source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
329
|
+
utm_medium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
330
|
+
utm_campaign: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
331
|
+
utm_term: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
332
|
+
utm_content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
+
landing_page: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
referrer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
335
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
336
|
+
custom: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>>;
|
|
337
|
+
}, "strict", z.ZodTypeAny, {
|
|
338
|
+
schema_version: number;
|
|
339
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
340
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
341
|
+
gclid?: string | null | undefined;
|
|
342
|
+
fbclid?: string | null | undefined;
|
|
343
|
+
utm_source?: string | null | undefined;
|
|
344
|
+
utm_medium?: string | null | undefined;
|
|
345
|
+
utm_campaign?: string | null | undefined;
|
|
346
|
+
utm_term?: string | null | undefined;
|
|
347
|
+
utm_content?: string | null | undefined;
|
|
348
|
+
session_id?: string | null | undefined;
|
|
349
|
+
service?: string | null | undefined;
|
|
350
|
+
referrer?: string | null | undefined;
|
|
351
|
+
visitor_id?: string | null | undefined;
|
|
352
|
+
landing_page?: string | null | undefined;
|
|
353
|
+
notes?: string | null | undefined;
|
|
354
|
+
}, {
|
|
355
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
356
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
357
|
+
gclid?: string | null | undefined;
|
|
358
|
+
fbclid?: string | null | undefined;
|
|
359
|
+
utm_source?: string | null | undefined;
|
|
360
|
+
utm_medium?: string | null | undefined;
|
|
361
|
+
utm_campaign?: string | null | undefined;
|
|
362
|
+
utm_term?: string | null | undefined;
|
|
363
|
+
utm_content?: string | null | undefined;
|
|
364
|
+
session_id?: string | null | undefined;
|
|
365
|
+
schema_version?: number | undefined;
|
|
366
|
+
service?: string | null | undefined;
|
|
367
|
+
referrer?: string | null | undefined;
|
|
368
|
+
visitor_id?: string | null | undefined;
|
|
369
|
+
landing_page?: string | null | undefined;
|
|
370
|
+
notes?: string | null | undefined;
|
|
371
|
+
}>>>;
|
|
372
|
+
idempotency_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
373
|
+
buffer_before_minutes: z.ZodDefault<z.ZodNumber>;
|
|
374
|
+
buffer_after_minutes: z.ZodDefault<z.ZodNumber>;
|
|
375
|
+
}, "strict", z.ZodTypeAny, {
|
|
376
|
+
calendar_key: string;
|
|
377
|
+
start_at: string;
|
|
378
|
+
time_zone: string;
|
|
379
|
+
customer: {
|
|
380
|
+
email: string;
|
|
381
|
+
sms_consent: boolean;
|
|
382
|
+
name?: string | null | undefined;
|
|
383
|
+
phone?: string | null | undefined;
|
|
384
|
+
};
|
|
385
|
+
attendees: {
|
|
386
|
+
email: string;
|
|
387
|
+
optional: boolean;
|
|
388
|
+
display_name?: string | null | undefined;
|
|
389
|
+
}[];
|
|
390
|
+
send_invites: boolean;
|
|
391
|
+
buffer_before_minutes: number;
|
|
392
|
+
buffer_after_minutes: number;
|
|
393
|
+
title?: string | null | undefined;
|
|
394
|
+
metadata?: {
|
|
395
|
+
schema_version: number;
|
|
396
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
397
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
398
|
+
gclid?: string | null | undefined;
|
|
399
|
+
fbclid?: string | null | undefined;
|
|
400
|
+
utm_source?: string | null | undefined;
|
|
401
|
+
utm_medium?: string | null | undefined;
|
|
402
|
+
utm_campaign?: string | null | undefined;
|
|
403
|
+
utm_term?: string | null | undefined;
|
|
404
|
+
utm_content?: string | null | undefined;
|
|
405
|
+
session_id?: string | null | undefined;
|
|
406
|
+
service?: string | null | undefined;
|
|
407
|
+
referrer?: string | null | undefined;
|
|
408
|
+
visitor_id?: string | null | undefined;
|
|
409
|
+
landing_page?: string | null | undefined;
|
|
410
|
+
notes?: string | null | undefined;
|
|
411
|
+
} | null | undefined;
|
|
412
|
+
description?: string | null | undefined;
|
|
413
|
+
location?: {
|
|
414
|
+
kind: "google_meet";
|
|
415
|
+
} | {
|
|
416
|
+
address: string;
|
|
417
|
+
kind: "physical";
|
|
418
|
+
} | {
|
|
419
|
+
phone: string;
|
|
420
|
+
kind: "phone";
|
|
421
|
+
} | {
|
|
422
|
+
text: string;
|
|
423
|
+
kind: "custom";
|
|
424
|
+
} | null | undefined;
|
|
425
|
+
end_at?: string | null | undefined;
|
|
426
|
+
appointment_type?: string | null | undefined;
|
|
427
|
+
duration_minutes?: number | null | undefined;
|
|
428
|
+
reminders?: {
|
|
429
|
+
use_calendar_defaults: boolean;
|
|
430
|
+
overrides: {
|
|
431
|
+
method: "email" | "popup";
|
|
432
|
+
minutes_before: number;
|
|
433
|
+
}[];
|
|
434
|
+
} | null | undefined;
|
|
435
|
+
idempotency_key?: string | null | undefined;
|
|
436
|
+
}, {
|
|
437
|
+
calendar_key: string;
|
|
438
|
+
start_at: string;
|
|
439
|
+
time_zone: string;
|
|
440
|
+
customer: {
|
|
441
|
+
email: string;
|
|
442
|
+
name?: string | null | undefined;
|
|
443
|
+
phone?: string | null | undefined;
|
|
444
|
+
sms_consent?: boolean | undefined;
|
|
445
|
+
};
|
|
446
|
+
title?: string | null | undefined;
|
|
447
|
+
metadata?: {
|
|
448
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
449
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
450
|
+
gclid?: string | null | undefined;
|
|
451
|
+
fbclid?: string | null | undefined;
|
|
452
|
+
utm_source?: string | null | undefined;
|
|
453
|
+
utm_medium?: string | null | undefined;
|
|
454
|
+
utm_campaign?: string | null | undefined;
|
|
455
|
+
utm_term?: string | null | undefined;
|
|
456
|
+
utm_content?: string | null | undefined;
|
|
457
|
+
session_id?: string | null | undefined;
|
|
458
|
+
schema_version?: number | undefined;
|
|
459
|
+
service?: string | null | undefined;
|
|
460
|
+
referrer?: string | null | undefined;
|
|
461
|
+
visitor_id?: string | null | undefined;
|
|
462
|
+
landing_page?: string | null | undefined;
|
|
463
|
+
notes?: string | null | undefined;
|
|
464
|
+
} | null | undefined;
|
|
465
|
+
description?: string | null | undefined;
|
|
466
|
+
location?: {
|
|
467
|
+
kind: "google_meet";
|
|
468
|
+
} | {
|
|
469
|
+
address: string;
|
|
470
|
+
kind: "physical";
|
|
471
|
+
} | {
|
|
472
|
+
phone: string;
|
|
473
|
+
kind: "phone";
|
|
474
|
+
} | {
|
|
475
|
+
text: string;
|
|
476
|
+
kind: "custom";
|
|
477
|
+
} | null | undefined;
|
|
478
|
+
end_at?: string | null | undefined;
|
|
479
|
+
appointment_type?: string | null | undefined;
|
|
480
|
+
duration_minutes?: number | null | undefined;
|
|
481
|
+
attendees?: {
|
|
482
|
+
email: string;
|
|
483
|
+
display_name?: string | null | undefined;
|
|
484
|
+
optional?: boolean | undefined;
|
|
485
|
+
}[] | undefined;
|
|
486
|
+
send_invites?: boolean | undefined;
|
|
487
|
+
reminders?: {
|
|
488
|
+
use_calendar_defaults?: boolean | undefined;
|
|
489
|
+
overrides?: {
|
|
490
|
+
method: "email" | "popup";
|
|
491
|
+
minutes_before: number;
|
|
492
|
+
}[] | undefined;
|
|
493
|
+
} | null | undefined;
|
|
494
|
+
idempotency_key?: string | null | undefined;
|
|
495
|
+
buffer_before_minutes?: number | undefined;
|
|
496
|
+
buffer_after_minutes?: number | undefined;
|
|
497
|
+
}>, {
|
|
498
|
+
calendar_key: string;
|
|
499
|
+
start_at: string;
|
|
500
|
+
time_zone: string;
|
|
501
|
+
customer: {
|
|
502
|
+
email: string;
|
|
503
|
+
sms_consent: boolean;
|
|
504
|
+
name?: string | null | undefined;
|
|
505
|
+
phone?: string | null | undefined;
|
|
506
|
+
};
|
|
507
|
+
attendees: {
|
|
508
|
+
email: string;
|
|
509
|
+
optional: boolean;
|
|
510
|
+
display_name?: string | null | undefined;
|
|
511
|
+
}[];
|
|
512
|
+
send_invites: boolean;
|
|
513
|
+
buffer_before_minutes: number;
|
|
514
|
+
buffer_after_minutes: number;
|
|
515
|
+
title?: string | null | undefined;
|
|
516
|
+
metadata?: {
|
|
517
|
+
schema_version: number;
|
|
518
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
519
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
520
|
+
gclid?: string | null | undefined;
|
|
521
|
+
fbclid?: string | null | undefined;
|
|
522
|
+
utm_source?: string | null | undefined;
|
|
523
|
+
utm_medium?: string | null | undefined;
|
|
524
|
+
utm_campaign?: string | null | undefined;
|
|
525
|
+
utm_term?: string | null | undefined;
|
|
526
|
+
utm_content?: string | null | undefined;
|
|
527
|
+
session_id?: string | null | undefined;
|
|
528
|
+
service?: string | null | undefined;
|
|
529
|
+
referrer?: string | null | undefined;
|
|
530
|
+
visitor_id?: string | null | undefined;
|
|
531
|
+
landing_page?: string | null | undefined;
|
|
532
|
+
notes?: string | null | undefined;
|
|
533
|
+
} | null | undefined;
|
|
534
|
+
description?: string | null | undefined;
|
|
535
|
+
location?: {
|
|
536
|
+
kind: "google_meet";
|
|
537
|
+
} | {
|
|
538
|
+
address: string;
|
|
539
|
+
kind: "physical";
|
|
540
|
+
} | {
|
|
541
|
+
phone: string;
|
|
542
|
+
kind: "phone";
|
|
543
|
+
} | {
|
|
544
|
+
text: string;
|
|
545
|
+
kind: "custom";
|
|
546
|
+
} | null | undefined;
|
|
547
|
+
end_at?: string | null | undefined;
|
|
548
|
+
appointment_type?: string | null | undefined;
|
|
549
|
+
duration_minutes?: number | null | undefined;
|
|
550
|
+
reminders?: {
|
|
551
|
+
use_calendar_defaults: boolean;
|
|
552
|
+
overrides: {
|
|
553
|
+
method: "email" | "popup";
|
|
554
|
+
minutes_before: number;
|
|
555
|
+
}[];
|
|
556
|
+
} | null | undefined;
|
|
557
|
+
idempotency_key?: string | null | undefined;
|
|
558
|
+
}, {
|
|
559
|
+
calendar_key: string;
|
|
560
|
+
start_at: string;
|
|
561
|
+
time_zone: string;
|
|
562
|
+
customer: {
|
|
563
|
+
email: string;
|
|
564
|
+
name?: string | null | undefined;
|
|
565
|
+
phone?: string | null | undefined;
|
|
566
|
+
sms_consent?: boolean | undefined;
|
|
567
|
+
};
|
|
568
|
+
title?: string | null | undefined;
|
|
569
|
+
metadata?: {
|
|
570
|
+
custom?: Record<string, string | number | boolean | null> | null | undefined;
|
|
571
|
+
source?: "phone" | "website" | "walk_in" | "import" | "operator" | null | undefined;
|
|
572
|
+
gclid?: string | null | undefined;
|
|
573
|
+
fbclid?: string | null | undefined;
|
|
574
|
+
utm_source?: string | null | undefined;
|
|
575
|
+
utm_medium?: string | null | undefined;
|
|
576
|
+
utm_campaign?: string | null | undefined;
|
|
577
|
+
utm_term?: string | null | undefined;
|
|
578
|
+
utm_content?: string | null | undefined;
|
|
579
|
+
session_id?: string | null | undefined;
|
|
580
|
+
schema_version?: number | undefined;
|
|
581
|
+
service?: string | null | undefined;
|
|
582
|
+
referrer?: string | null | undefined;
|
|
583
|
+
visitor_id?: string | null | undefined;
|
|
584
|
+
landing_page?: string | null | undefined;
|
|
585
|
+
notes?: string | null | undefined;
|
|
586
|
+
} | null | undefined;
|
|
587
|
+
description?: string | null | undefined;
|
|
588
|
+
location?: {
|
|
589
|
+
kind: "google_meet";
|
|
590
|
+
} | {
|
|
591
|
+
address: string;
|
|
592
|
+
kind: "physical";
|
|
593
|
+
} | {
|
|
594
|
+
phone: string;
|
|
595
|
+
kind: "phone";
|
|
596
|
+
} | {
|
|
597
|
+
text: string;
|
|
598
|
+
kind: "custom";
|
|
599
|
+
} | null | undefined;
|
|
600
|
+
end_at?: string | null | undefined;
|
|
601
|
+
appointment_type?: string | null | undefined;
|
|
602
|
+
duration_minutes?: number | null | undefined;
|
|
603
|
+
attendees?: {
|
|
604
|
+
email: string;
|
|
605
|
+
display_name?: string | null | undefined;
|
|
606
|
+
optional?: boolean | undefined;
|
|
607
|
+
}[] | undefined;
|
|
608
|
+
send_invites?: boolean | undefined;
|
|
609
|
+
reminders?: {
|
|
610
|
+
use_calendar_defaults?: boolean | undefined;
|
|
611
|
+
overrides?: {
|
|
612
|
+
method: "email" | "popup";
|
|
613
|
+
minutes_before: number;
|
|
614
|
+
}[] | undefined;
|
|
615
|
+
} | null | undefined;
|
|
616
|
+
idempotency_key?: string | null | undefined;
|
|
617
|
+
buffer_before_minutes?: number | undefined;
|
|
618
|
+
buffer_after_minutes?: number | undefined;
|
|
619
|
+
}>;
|
|
620
|
+
declare const bookingRescheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
621
|
+
start_at: z.ZodString;
|
|
622
|
+
end_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
623
|
+
duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
624
|
+
time_zone: z.ZodEffects<z.ZodString, string, string>;
|
|
625
|
+
notify_attendees: z.ZodDefault<z.ZodBoolean>;
|
|
626
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
627
|
+
}, "strict", z.ZodTypeAny, {
|
|
628
|
+
start_at: string;
|
|
629
|
+
time_zone: string;
|
|
630
|
+
notify_attendees: boolean;
|
|
631
|
+
end_at?: string | null | undefined;
|
|
632
|
+
duration_minutes?: number | null | undefined;
|
|
633
|
+
reason?: string | null | undefined;
|
|
634
|
+
}, {
|
|
635
|
+
start_at: string;
|
|
636
|
+
time_zone: string;
|
|
637
|
+
end_at?: string | null | undefined;
|
|
638
|
+
duration_minutes?: number | null | undefined;
|
|
639
|
+
notify_attendees?: boolean | undefined;
|
|
640
|
+
reason?: string | null | undefined;
|
|
641
|
+
}>, {
|
|
642
|
+
start_at: string;
|
|
643
|
+
time_zone: string;
|
|
644
|
+
notify_attendees: boolean;
|
|
645
|
+
end_at?: string | null | undefined;
|
|
646
|
+
duration_minutes?: number | null | undefined;
|
|
647
|
+
reason?: string | null | undefined;
|
|
648
|
+
}, {
|
|
649
|
+
start_at: string;
|
|
650
|
+
time_zone: string;
|
|
651
|
+
end_at?: string | null | undefined;
|
|
652
|
+
duration_minutes?: number | null | undefined;
|
|
653
|
+
notify_attendees?: boolean | undefined;
|
|
654
|
+
reason?: string | null | undefined;
|
|
655
|
+
}>;
|
|
656
|
+
declare const bookingCancelSchema: z.ZodObject<{
|
|
657
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
658
|
+
notify_attendees: z.ZodDefault<z.ZodBoolean>;
|
|
659
|
+
}, "strict", z.ZodTypeAny, {
|
|
660
|
+
notify_attendees: boolean;
|
|
661
|
+
reason?: string | null | undefined;
|
|
662
|
+
}, {
|
|
663
|
+
notify_attendees?: boolean | undefined;
|
|
664
|
+
reason?: string | null | undefined;
|
|
665
|
+
}>;
|
|
666
|
+
type BookingCreateInput = z.input<typeof bookingCreateSchema>;
|
|
667
|
+
type BookingRescheduleInput = z.input<typeof bookingRescheduleSchema>;
|
|
668
|
+
type BookingCancelInput = z.input<typeof bookingCancelSchema>;
|
|
669
|
+
type BookingAttendee = z.input<typeof bookingAttendeeSchema>;
|
|
670
|
+
type BookingReminders = z.input<typeof bookingRemindersSchema>;
|
|
671
|
+
type BookingLocation = z.input<typeof bookingLocationSchema>;
|
|
672
|
+
type BookingCustomer = z.input<typeof bookingCustomerSchema>;
|
|
673
|
+
type BookingMetadata<TCustom extends Record<string, JsonScalar> = Record<string, JsonScalar>> = Omit<z.input<typeof bookingMetadataSchema>, "custom"> & {
|
|
674
|
+
custom?: TCustom | null;
|
|
675
|
+
};
|
|
676
|
+
interface CalendarSummary {
|
|
677
|
+
calendar_key: string;
|
|
678
|
+
label: string;
|
|
679
|
+
time_zone: string;
|
|
680
|
+
status: CalendarSyncStatus;
|
|
681
|
+
/** Secret-key only. A public key gets `null`: whose Google account is behind
|
|
682
|
+
* a calendar is a third party's identity, not the client site's business. */
|
|
683
|
+
google_account_email?: string | null;
|
|
684
|
+
granted_scopes?: string[] | null;
|
|
685
|
+
connected_at?: string | null;
|
|
686
|
+
}
|
|
687
|
+
interface BusyInterval {
|
|
688
|
+
start_at: string;
|
|
689
|
+
end_at: string;
|
|
690
|
+
source: "google" | "booking";
|
|
691
|
+
}
|
|
692
|
+
interface BusyResponse {
|
|
693
|
+
calendar_key: string;
|
|
694
|
+
time_zone: string;
|
|
695
|
+
window: {
|
|
696
|
+
since: string;
|
|
697
|
+
until: string;
|
|
698
|
+
};
|
|
699
|
+
busy: BusyInterval[];
|
|
700
|
+
generated_at: string;
|
|
701
|
+
}
|
|
702
|
+
interface Booking {
|
|
703
|
+
id: string;
|
|
704
|
+
calendar_key: string;
|
|
705
|
+
status: BookingStatus;
|
|
706
|
+
google_sync_state: GoogleSyncState;
|
|
707
|
+
start_at: string;
|
|
708
|
+
end_at: string;
|
|
709
|
+
time_zone: string;
|
|
710
|
+
appointment_type: string | null;
|
|
711
|
+
title: string;
|
|
712
|
+
customer: BookingCustomer;
|
|
713
|
+
google_html_link: string | null;
|
|
714
|
+
meet_url: string | null;
|
|
715
|
+
/** Returned only on create — the capability credential for manage links. */
|
|
716
|
+
manage_token?: string | null;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
type CalendarTransportConfig = ApiTransportConfig;
|
|
720
|
+
|
|
721
|
+
export { bookingCustomerSchema as A, type BookingCreateInput as B, type CalendarTransportConfig as C, bookingLocationNullableSchema as D, bookingLocationSchema as E, bookingMetadataSchema as F, GOOGLE_SYNC_STATES as G, bookingReminderSchema as H, bookingRemindersSchema as I, type JsonScalar as J, bookingRescheduleSchema as K, MAX_ATTENDEES as M, type Booking as a, type BookingRescheduleInput as b, type BookingCancelInput as c, type BusyInterval as d, BOOKING_SOURCES as e, BOOKING_STATUSES as f, type BookingAttendee as g, type BookingCustomer as h, type BookingLocation as i, type BookingMetadata as j, type BookingReminders as k, type BookingStatus as l, type BusyResponse as m, CALENDAR_ERROR_CODES as n, CALENDAR_METADATA_SCHEMA_VERSION as o, CALENDAR_SYNC_STATUSES as p, type CalendarErrorCode as q, type CalendarSummary as r, type CalendarSyncStatus as s, type GoogleSyncState as t, MAX_BOOKING_MINUTES as u, MAX_REMINDER_MINUTES as v, MAX_REMINDER_OVERRIDES as w, bookingAttendeeSchema as x, bookingCancelSchema as y, bookingCreateSchema as z };
|