@trypattern/sdk 0.1.12 → 0.1.14

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.
Files changed (84) hide show
  1. package/README.md +73 -12
  2. package/dist/access.d.ts +0 -4
  3. package/dist/access.js +0 -5
  4. package/dist/api.d.ts +3 -1
  5. package/dist/api.js +5 -23
  6. package/dist/app.d.ts +20 -5
  7. package/dist/app.js +32 -2
  8. package/dist/blocks.d.ts +18 -0
  9. package/dist/blocks.js +36 -0
  10. package/dist/bookings.d.ts +400 -0
  11. package/dist/bookings.js +300 -0
  12. package/dist/bookingsMemory.d.ts +9 -0
  13. package/dist/bookingsMemory.js +79 -0
  14. package/dist/bookingsStore.d.ts +698 -0
  15. package/dist/bookingsStore.js +129 -0
  16. package/dist/cli/app.js +144 -59
  17. package/dist/cli/publishing.d.ts +3 -1
  18. package/dist/cli/publishing.js +45 -10
  19. package/dist/cli/starter.d.ts +17 -0
  20. package/dist/cli/starter.js +140 -0
  21. package/dist/components/Calendar.d.ts +20 -0
  22. package/dist/components/Calendar.js +195 -0
  23. package/dist/components/Card.d.ts +1 -1
  24. package/dist/components/Card.js +7 -29
  25. package/dist/components/Choice.js +27 -13
  26. package/dist/components/ChoiceGroup.d.ts +3 -1
  27. package/dist/components/ChoiceGroup.js +3 -4
  28. package/dist/components/Dialog.d.ts +1 -1
  29. package/dist/components/Dialog.js +3 -1
  30. package/dist/components/ListRow.js +2 -1
  31. package/dist/components/RadioDescribed.d.ts +4 -0
  32. package/dist/components/RadioDescribed.js +20 -0
  33. package/dist/components/RadioGroup.d.ts +4 -1
  34. package/dist/components/RadioGroup.js +28 -3
  35. package/dist/components/Text.d.ts +1 -1
  36. package/dist/components/Text.js +43 -2
  37. package/dist/components/calendarDates.d.ts +14 -0
  38. package/dist/components/calendarDates.js +84 -0
  39. package/dist/components/controlLook.js +11 -11
  40. package/dist/components/icons.d.ts +2 -0
  41. package/dist/components/icons.js +2 -0
  42. package/dist/components/interaction.d.ts +1 -1
  43. package/dist/flows/browser.d.ts +7 -1
  44. package/dist/flows/browser.js +25 -7
  45. package/dist/flows/flowBrowser.d.ts +2 -2
  46. package/dist/flows/flowBrowser.js +2 -2
  47. package/dist/flows/flows.js +8 -2
  48. package/dist/index.d.ts +4 -1
  49. package/dist/index.js +1 -0
  50. package/dist/media.d.ts +11 -1
  51. package/dist/patternAccess.d.ts +11 -2
  52. package/dist/patternAccess.js +8 -4
  53. package/dist/publishWire.d.ts +35 -2
  54. package/dist/publishWire.js +26 -3
  55. package/dist/react.d.ts +2 -0
  56. package/dist/react.js +1 -0
  57. package/dist/rules/checkAllFiles.js +16 -2
  58. package/dist/rules/lintPlugin.js +1 -0
  59. package/dist/schema.d.ts +3 -1
  60. package/dist/schema.js +1 -0
  61. package/dist/server/bookings.d.ts +12 -0
  62. package/dist/server/bookings.js +142 -0
  63. package/dist/server/createServer.d.ts +3 -2
  64. package/dist/server/createServer.js +13 -4
  65. package/dist/server/env.d.ts +8 -0
  66. package/dist/server/index.d.ts +3 -1
  67. package/dist/server/index.js +1 -0
  68. package/dist/server/media.d.ts +16 -3
  69. package/dist/server/media.js +72 -23
  70. package/dist/server/patternViewer.js +16 -10
  71. package/dist/server/tables.d.ts +2 -0
  72. package/dist/server/tables.js +17 -1
  73. package/dist/start.js +12 -0
  74. package/dist/table.js +9 -3
  75. package/dist/theme/scales.d.ts +1 -1
  76. package/dist/theme/scales.js +1 -0
  77. package/dist/theme/tokens.stylex.d.ts +18 -0
  78. package/dist/theme/tokens.stylex.js +19 -1
  79. package/dist/vite/localWorker.d.ts +2 -0
  80. package/dist/vite/localWorker.js +48 -3
  81. package/dist/vite/projectFile.d.ts +5 -0
  82. package/dist/vite/projectFile.js +19 -1
  83. package/dist/vite/vite.js +5 -1
  84. package/package.json +1 -1
@@ -0,0 +1,698 @@
1
+ import { z } from 'zod';
2
+ import type { WriteOutcome } from './access.ts';
3
+ import type { BookingRequestFields, BookingRules } from './bookings.ts';
4
+ import type { ServiceClient } from './services.ts';
5
+ declare const Bookings_base: import("./store.ts").StoreClass<{
6
+ days: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
7
+ date: z.ZodString;
8
+ state: z.ZodEnum<{
9
+ open: "open";
10
+ closed: "closed";
11
+ full: "full";
12
+ }>;
13
+ }, z.core.$strip>>>>;
14
+ windows: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ label: z.ZodString;
17
+ start: z.ZodString;
18
+ end: z.ZodString;
19
+ remaining: z.ZodNumber;
20
+ }, z.core.$strip>>>>;
21
+ requests: z.ZodDefault<z.ZodArray<z.ZodObject<{
22
+ id: z.ZodString;
23
+ createdAt: z.ZodString;
24
+ } & Record<never, never> & {
25
+ readonly offering: z.ZodString;
26
+ readonly date: z.ZodString;
27
+ readonly window: z.ZodString;
28
+ readonly name: z.ZodString;
29
+ readonly email: z.ZodEmail;
30
+ readonly phone: z.ZodString;
31
+ readonly address: z.ZodString;
32
+ readonly notes: z.ZodString;
33
+ readonly status: z.ZodEnum<{
34
+ requested: "requested";
35
+ accepted: "accepted";
36
+ declined: "declined";
37
+ cancelled: "cancelled";
38
+ }>;
39
+ }, z.core.$strip>>>;
40
+ requestsStatus: z.ZodDefault<z.ZodEnum<{
41
+ failed: "failed";
42
+ idle: "idle";
43
+ loading: "loading";
44
+ ready: "ready";
45
+ }>>;
46
+ rules: z.ZodDefault<z.ZodNullable<z.ZodObject<{
47
+ windows: z.ZodArray<z.ZodObject<{
48
+ weekday: z.ZodEnum<{
49
+ Sunday: "Sunday";
50
+ Monday: "Monday";
51
+ Tuesday: "Tuesday";
52
+ Wednesday: "Wednesday";
53
+ Thursday: "Thursday";
54
+ Friday: "Friday";
55
+ Saturday: "Saturday";
56
+ }>;
57
+ label: z.ZodString;
58
+ start: z.ZodString;
59
+ end: z.ZodString;
60
+ capacity: z.ZodNumber;
61
+ }, z.core.$strip>>;
62
+ leadTimeHours: z.ZodNumber;
63
+ daysAhead: z.ZodNumber;
64
+ autoAccept: z.ZodBoolean;
65
+ blackouts: z.ZodArray<z.ZodObject<{
66
+ date: z.ZodString;
67
+ reason: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>>>;
70
+ sent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
71
+ id: z.ZodString;
72
+ createdAt: z.ZodString;
73
+ } & Record<never, never> & {
74
+ readonly offering: z.ZodString;
75
+ readonly date: z.ZodString;
76
+ readonly window: z.ZodString;
77
+ readonly name: z.ZodString;
78
+ readonly email: z.ZodEmail;
79
+ readonly phone: z.ZodString;
80
+ readonly address: z.ZodString;
81
+ readonly notes: z.ZodString;
82
+ readonly status: z.ZodEnum<{
83
+ requested: "requested";
84
+ accepted: "accepted";
85
+ declined: "declined";
86
+ cancelled: "cancelled";
87
+ }>;
88
+ }, z.core.$strip>>>;
89
+ isSending: z.ZodDefault<z.ZodBoolean>;
90
+ }, [], ServiceClient<{
91
+ readonly bookings: {
92
+ readonly days: NoInfer<import("./services.ts").ServiceCall<"/bookings/days", {
93
+ month: z.ZodString;
94
+ }, z.ZodArray<z.ZodObject<{
95
+ date: z.ZodString;
96
+ state: z.ZodEnum<{
97
+ open: "open";
98
+ closed: "closed";
99
+ full: "full";
100
+ }>;
101
+ }, z.core.$strip>>>>;
102
+ readonly windows: NoInfer<import("./services.ts").ServiceCall<"/bookings/windows", {
103
+ date: z.ZodString;
104
+ }, z.ZodArray<z.ZodObject<{
105
+ id: z.ZodString;
106
+ label: z.ZodString;
107
+ start: z.ZodString;
108
+ end: z.ZodString;
109
+ remaining: z.ZodNumber;
110
+ }, z.core.$strip>>>>;
111
+ readonly request: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests", {
112
+ offering: z.ZodString;
113
+ date: z.ZodString;
114
+ window: z.ZodString;
115
+ name: z.ZodString;
116
+ email: z.ZodEmail;
117
+ phone: z.ZodOptional<z.ZodString>;
118
+ address: z.ZodOptional<z.ZodString>;
119
+ notes: z.ZodOptional<z.ZodString>;
120
+ }, z.ZodObject<{
121
+ id: z.ZodString;
122
+ createdAt: z.ZodString;
123
+ } & Record<never, never> & {
124
+ readonly offering: z.ZodString;
125
+ readonly date: z.ZodString;
126
+ readonly window: z.ZodString;
127
+ readonly name: z.ZodString;
128
+ readonly email: z.ZodEmail;
129
+ readonly phone: z.ZodString;
130
+ readonly address: z.ZodString;
131
+ readonly notes: z.ZodString;
132
+ readonly status: z.ZodEnum<{
133
+ requested: "requested";
134
+ accepted: "accepted";
135
+ declined: "declined";
136
+ cancelled: "cancelled";
137
+ }>;
138
+ }, z.core.$strip>>>;
139
+ readonly requests: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests", {}, z.ZodArray<z.ZodObject<{
140
+ id: z.ZodString;
141
+ createdAt: z.ZodString;
142
+ } & Record<never, never> & {
143
+ readonly offering: z.ZodString;
144
+ readonly date: z.ZodString;
145
+ readonly window: z.ZodString;
146
+ readonly name: z.ZodString;
147
+ readonly email: z.ZodEmail;
148
+ readonly phone: z.ZodString;
149
+ readonly address: z.ZodString;
150
+ readonly notes: z.ZodString;
151
+ readonly status: z.ZodEnum<{
152
+ requested: "requested";
153
+ accepted: "accepted";
154
+ declined: "declined";
155
+ cancelled: "cancelled";
156
+ }>;
157
+ }, z.core.$strip>>>>;
158
+ readonly accept: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests/:id/accept", {}, z.ZodObject<{
159
+ id: z.ZodString;
160
+ createdAt: z.ZodString;
161
+ } & Record<never, never> & {
162
+ readonly offering: z.ZodString;
163
+ readonly date: z.ZodString;
164
+ readonly window: z.ZodString;
165
+ readonly name: z.ZodString;
166
+ readonly email: z.ZodEmail;
167
+ readonly phone: z.ZodString;
168
+ readonly address: z.ZodString;
169
+ readonly notes: z.ZodString;
170
+ readonly status: z.ZodEnum<{
171
+ requested: "requested";
172
+ accepted: "accepted";
173
+ declined: "declined";
174
+ cancelled: "cancelled";
175
+ }>;
176
+ }, z.core.$strip>>>;
177
+ readonly decline: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests/:id/decline", {}, z.ZodObject<{
178
+ id: z.ZodString;
179
+ createdAt: z.ZodString;
180
+ } & Record<never, never> & {
181
+ readonly offering: z.ZodString;
182
+ readonly date: z.ZodString;
183
+ readonly window: z.ZodString;
184
+ readonly name: z.ZodString;
185
+ readonly email: z.ZodEmail;
186
+ readonly phone: z.ZodString;
187
+ readonly address: z.ZodString;
188
+ readonly notes: z.ZodString;
189
+ readonly status: z.ZodEnum<{
190
+ requested: "requested";
191
+ accepted: "accepted";
192
+ declined: "declined";
193
+ cancelled: "cancelled";
194
+ }>;
195
+ }, z.core.$strip>>>;
196
+ readonly rules: NoInfer<import("./services.ts").ServiceCall<"/bookings/rules", {}, z.ZodObject<{
197
+ windows: z.ZodArray<z.ZodObject<{
198
+ weekday: z.ZodEnum<{
199
+ Sunday: "Sunday";
200
+ Monday: "Monday";
201
+ Tuesday: "Tuesday";
202
+ Wednesday: "Wednesday";
203
+ Thursday: "Thursday";
204
+ Friday: "Friday";
205
+ Saturday: "Saturday";
206
+ }>;
207
+ label: z.ZodString;
208
+ start: z.ZodString;
209
+ end: z.ZodString;
210
+ capacity: z.ZodNumber;
211
+ }, z.core.$strip>>;
212
+ leadTimeHours: z.ZodNumber;
213
+ daysAhead: z.ZodNumber;
214
+ autoAccept: z.ZodBoolean;
215
+ blackouts: z.ZodArray<z.ZodObject<{
216
+ date: z.ZodString;
217
+ reason: z.ZodString;
218
+ }, z.core.$strip>>;
219
+ }, z.core.$strip>>>;
220
+ readonly saveRules: NoInfer<import("./services.ts").ServiceCall<"/bookings/rules", {
221
+ windows: z.ZodArray<z.ZodObject<{
222
+ weekday: z.ZodEnum<{
223
+ Sunday: "Sunday";
224
+ Monday: "Monday";
225
+ Tuesday: "Tuesday";
226
+ Wednesday: "Wednesday";
227
+ Thursday: "Thursday";
228
+ Friday: "Friday";
229
+ Saturday: "Saturday";
230
+ }>;
231
+ label: z.ZodString;
232
+ start: z.ZodString;
233
+ end: z.ZodString;
234
+ capacity: z.ZodNumber;
235
+ }, z.core.$strip>>;
236
+ leadTimeHours: z.ZodNumber;
237
+ daysAhead: z.ZodNumber;
238
+ autoAccept: z.ZodBoolean;
239
+ blackouts: z.ZodArray<z.ZodObject<{
240
+ date: z.ZodString;
241
+ reason: z.ZodString;
242
+ }, z.core.$strip>>;
243
+ }, z.ZodObject<{
244
+ windows: z.ZodArray<z.ZodObject<{
245
+ weekday: z.ZodEnum<{
246
+ Sunday: "Sunday";
247
+ Monday: "Monday";
248
+ Tuesday: "Tuesday";
249
+ Wednesday: "Wednesday";
250
+ Thursday: "Thursday";
251
+ Friday: "Friday";
252
+ Saturday: "Saturday";
253
+ }>;
254
+ label: z.ZodString;
255
+ start: z.ZodString;
256
+ end: z.ZodString;
257
+ capacity: z.ZodNumber;
258
+ }, z.core.$strip>>;
259
+ leadTimeHours: z.ZodNumber;
260
+ daysAhead: z.ZodNumber;
261
+ autoAccept: z.ZodBoolean;
262
+ blackouts: z.ZodArray<z.ZodObject<{
263
+ date: z.ZodString;
264
+ reason: z.ZodString;
265
+ }, z.core.$strip>>;
266
+ }, z.core.$strip>>>;
267
+ };
268
+ }>>;
269
+ export declare class Bookings extends Bookings_base {
270
+ #private;
271
+ loadDays(month: string): Promise<void>;
272
+ loadWindows(date: string): Promise<void>;
273
+ request(fields: BookingRequestFields): Promise<WriteOutcome>;
274
+ forgetSent(): void;
275
+ loadRequests(): Promise<void>;
276
+ accept(id: string): Promise<WriteOutcome>;
277
+ decline(id: string): Promise<WriteOutcome>;
278
+ loadRules(): Promise<void>;
279
+ saveRules(rules: BookingRules): Promise<WriteOutcome>;
280
+ }
281
+ export declare const bookings: {
282
+ readonly name: "bookings";
283
+ readonly tables: {
284
+ bookingRules: import("./table.ts").TableOf<"bookingRules", {
285
+ readonly columns: {
286
+ readonly windows: z.ZodString;
287
+ readonly leadTimeHours: z.ZodNumber;
288
+ readonly daysAhead: z.ZodNumber;
289
+ readonly autoAccept: z.ZodBoolean;
290
+ };
291
+ readonly access: {
292
+ readonly read: "server";
293
+ readonly create: "server";
294
+ readonly update: "server";
295
+ readonly delete: "server";
296
+ };
297
+ readonly writes: "confirmed";
298
+ }>;
299
+ bookingBlackouts: import("./table.ts").TableOf<"bookingBlackouts", {
300
+ readonly columns: {
301
+ readonly date: z.ZodString;
302
+ readonly reason: z.ZodString;
303
+ };
304
+ readonly access: {
305
+ readonly read: "server";
306
+ readonly create: "server";
307
+ readonly update: "server";
308
+ readonly delete: "server";
309
+ };
310
+ readonly writes: "confirmed";
311
+ }>;
312
+ bookingRequests: import("./table.ts").TableOf<"bookingRequests", {
313
+ readonly columns: {
314
+ readonly offering: z.ZodString;
315
+ readonly date: z.ZodString;
316
+ readonly window: z.ZodString;
317
+ readonly name: z.ZodString;
318
+ readonly email: z.ZodEmail;
319
+ readonly phone: z.ZodString;
320
+ readonly address: z.ZodString;
321
+ readonly notes: z.ZodString;
322
+ readonly status: z.ZodEnum<{
323
+ requested: "requested";
324
+ accepted: "accepted";
325
+ declined: "declined";
326
+ cancelled: "cancelled";
327
+ }>;
328
+ };
329
+ readonly access: {
330
+ readonly read: "server";
331
+ readonly create: "server";
332
+ readonly update: "server";
333
+ readonly delete: "server";
334
+ };
335
+ readonly writes: "confirmed";
336
+ }>;
337
+ };
338
+ readonly services: {
339
+ readonly bookings: {
340
+ readonly days: NoInfer<import("./services.ts").ServiceCall<"/bookings/days", {
341
+ month: z.ZodString;
342
+ }, z.ZodArray<z.ZodObject<{
343
+ date: z.ZodString;
344
+ state: z.ZodEnum<{
345
+ open: "open";
346
+ closed: "closed";
347
+ full: "full";
348
+ }>;
349
+ }, z.core.$strip>>>>;
350
+ readonly windows: NoInfer<import("./services.ts").ServiceCall<"/bookings/windows", {
351
+ date: z.ZodString;
352
+ }, z.ZodArray<z.ZodObject<{
353
+ id: z.ZodString;
354
+ label: z.ZodString;
355
+ start: z.ZodString;
356
+ end: z.ZodString;
357
+ remaining: z.ZodNumber;
358
+ }, z.core.$strip>>>>;
359
+ readonly request: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests", {
360
+ offering: z.ZodString;
361
+ date: z.ZodString;
362
+ window: z.ZodString;
363
+ name: z.ZodString;
364
+ email: z.ZodEmail;
365
+ phone: z.ZodOptional<z.ZodString>;
366
+ address: z.ZodOptional<z.ZodString>;
367
+ notes: z.ZodOptional<z.ZodString>;
368
+ }, z.ZodObject<{
369
+ id: z.ZodString;
370
+ createdAt: z.ZodString;
371
+ } & Record<never, never> & {
372
+ readonly offering: z.ZodString;
373
+ readonly date: z.ZodString;
374
+ readonly window: z.ZodString;
375
+ readonly name: z.ZodString;
376
+ readonly email: z.ZodEmail;
377
+ readonly phone: z.ZodString;
378
+ readonly address: z.ZodString;
379
+ readonly notes: z.ZodString;
380
+ readonly status: z.ZodEnum<{
381
+ requested: "requested";
382
+ accepted: "accepted";
383
+ declined: "declined";
384
+ cancelled: "cancelled";
385
+ }>;
386
+ }, z.core.$strip>>>;
387
+ readonly requests: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests", {}, z.ZodArray<z.ZodObject<{
388
+ id: z.ZodString;
389
+ createdAt: z.ZodString;
390
+ } & Record<never, never> & {
391
+ readonly offering: z.ZodString;
392
+ readonly date: z.ZodString;
393
+ readonly window: z.ZodString;
394
+ readonly name: z.ZodString;
395
+ readonly email: z.ZodEmail;
396
+ readonly phone: z.ZodString;
397
+ readonly address: z.ZodString;
398
+ readonly notes: z.ZodString;
399
+ readonly status: z.ZodEnum<{
400
+ requested: "requested";
401
+ accepted: "accepted";
402
+ declined: "declined";
403
+ cancelled: "cancelled";
404
+ }>;
405
+ }, z.core.$strip>>>>;
406
+ readonly accept: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests/:id/accept", {}, z.ZodObject<{
407
+ id: z.ZodString;
408
+ createdAt: z.ZodString;
409
+ } & Record<never, never> & {
410
+ readonly offering: z.ZodString;
411
+ readonly date: z.ZodString;
412
+ readonly window: z.ZodString;
413
+ readonly name: z.ZodString;
414
+ readonly email: z.ZodEmail;
415
+ readonly phone: z.ZodString;
416
+ readonly address: z.ZodString;
417
+ readonly notes: z.ZodString;
418
+ readonly status: z.ZodEnum<{
419
+ requested: "requested";
420
+ accepted: "accepted";
421
+ declined: "declined";
422
+ cancelled: "cancelled";
423
+ }>;
424
+ }, z.core.$strip>>>;
425
+ readonly decline: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests/:id/decline", {}, z.ZodObject<{
426
+ id: z.ZodString;
427
+ createdAt: z.ZodString;
428
+ } & Record<never, never> & {
429
+ readonly offering: z.ZodString;
430
+ readonly date: z.ZodString;
431
+ readonly window: z.ZodString;
432
+ readonly name: z.ZodString;
433
+ readonly email: z.ZodEmail;
434
+ readonly phone: z.ZodString;
435
+ readonly address: z.ZodString;
436
+ readonly notes: z.ZodString;
437
+ readonly status: z.ZodEnum<{
438
+ requested: "requested";
439
+ accepted: "accepted";
440
+ declined: "declined";
441
+ cancelled: "cancelled";
442
+ }>;
443
+ }, z.core.$strip>>>;
444
+ readonly rules: NoInfer<import("./services.ts").ServiceCall<"/bookings/rules", {}, z.ZodObject<{
445
+ windows: z.ZodArray<z.ZodObject<{
446
+ weekday: z.ZodEnum<{
447
+ Sunday: "Sunday";
448
+ Monday: "Monday";
449
+ Tuesday: "Tuesday";
450
+ Wednesday: "Wednesday";
451
+ Thursday: "Thursday";
452
+ Friday: "Friday";
453
+ Saturday: "Saturday";
454
+ }>;
455
+ label: z.ZodString;
456
+ start: z.ZodString;
457
+ end: z.ZodString;
458
+ capacity: z.ZodNumber;
459
+ }, z.core.$strip>>;
460
+ leadTimeHours: z.ZodNumber;
461
+ daysAhead: z.ZodNumber;
462
+ autoAccept: z.ZodBoolean;
463
+ blackouts: z.ZodArray<z.ZodObject<{
464
+ date: z.ZodString;
465
+ reason: z.ZodString;
466
+ }, z.core.$strip>>;
467
+ }, z.core.$strip>>>;
468
+ readonly saveRules: NoInfer<import("./services.ts").ServiceCall<"/bookings/rules", {
469
+ windows: z.ZodArray<z.ZodObject<{
470
+ weekday: z.ZodEnum<{
471
+ Sunday: "Sunday";
472
+ Monday: "Monday";
473
+ Tuesday: "Tuesday";
474
+ Wednesday: "Wednesday";
475
+ Thursday: "Thursday";
476
+ Friday: "Friday";
477
+ Saturday: "Saturday";
478
+ }>;
479
+ label: z.ZodString;
480
+ start: z.ZodString;
481
+ end: z.ZodString;
482
+ capacity: z.ZodNumber;
483
+ }, z.core.$strip>>;
484
+ leadTimeHours: z.ZodNumber;
485
+ daysAhead: z.ZodNumber;
486
+ autoAccept: z.ZodBoolean;
487
+ blackouts: z.ZodArray<z.ZodObject<{
488
+ date: z.ZodString;
489
+ reason: z.ZodString;
490
+ }, z.core.$strip>>;
491
+ }, z.ZodObject<{
492
+ windows: z.ZodArray<z.ZodObject<{
493
+ weekday: z.ZodEnum<{
494
+ Sunday: "Sunday";
495
+ Monday: "Monday";
496
+ Tuesday: "Tuesday";
497
+ Wednesday: "Wednesday";
498
+ Thursday: "Thursday";
499
+ Friday: "Friday";
500
+ Saturday: "Saturday";
501
+ }>;
502
+ label: z.ZodString;
503
+ start: z.ZodString;
504
+ end: z.ZodString;
505
+ capacity: z.ZodNumber;
506
+ }, z.core.$strip>>;
507
+ leadTimeHours: z.ZodNumber;
508
+ daysAhead: z.ZodNumber;
509
+ autoAccept: z.ZodBoolean;
510
+ blackouts: z.ZodArray<z.ZodObject<{
511
+ date: z.ZodString;
512
+ reason: z.ZodString;
513
+ }, z.core.$strip>>;
514
+ }, z.core.$strip>>>;
515
+ };
516
+ };
517
+ readonly memory: import("./services.ts").ServiceMemory<{
518
+ readonly bookings: {
519
+ readonly days: NoInfer<import("./services.ts").ServiceCall<"/bookings/days", {
520
+ month: z.ZodString;
521
+ }, z.ZodArray<z.ZodObject<{
522
+ date: z.ZodString;
523
+ state: z.ZodEnum<{
524
+ open: "open";
525
+ closed: "closed";
526
+ full: "full";
527
+ }>;
528
+ }, z.core.$strip>>>>;
529
+ readonly windows: NoInfer<import("./services.ts").ServiceCall<"/bookings/windows", {
530
+ date: z.ZodString;
531
+ }, z.ZodArray<z.ZodObject<{
532
+ id: z.ZodString;
533
+ label: z.ZodString;
534
+ start: z.ZodString;
535
+ end: z.ZodString;
536
+ remaining: z.ZodNumber;
537
+ }, z.core.$strip>>>>;
538
+ readonly request: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests", {
539
+ offering: z.ZodString;
540
+ date: z.ZodString;
541
+ window: z.ZodString;
542
+ name: z.ZodString;
543
+ email: z.ZodEmail;
544
+ phone: z.ZodOptional<z.ZodString>;
545
+ address: z.ZodOptional<z.ZodString>;
546
+ notes: z.ZodOptional<z.ZodString>;
547
+ }, z.ZodObject<{
548
+ id: z.ZodString;
549
+ createdAt: z.ZodString;
550
+ } & Record<never, never> & {
551
+ readonly offering: z.ZodString;
552
+ readonly date: z.ZodString;
553
+ readonly window: z.ZodString;
554
+ readonly name: z.ZodString;
555
+ readonly email: z.ZodEmail;
556
+ readonly phone: z.ZodString;
557
+ readonly address: z.ZodString;
558
+ readonly notes: z.ZodString;
559
+ readonly status: z.ZodEnum<{
560
+ requested: "requested";
561
+ accepted: "accepted";
562
+ declined: "declined";
563
+ cancelled: "cancelled";
564
+ }>;
565
+ }, z.core.$strip>>>;
566
+ readonly requests: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests", {}, z.ZodArray<z.ZodObject<{
567
+ id: z.ZodString;
568
+ createdAt: z.ZodString;
569
+ } & Record<never, never> & {
570
+ readonly offering: z.ZodString;
571
+ readonly date: z.ZodString;
572
+ readonly window: z.ZodString;
573
+ readonly name: z.ZodString;
574
+ readonly email: z.ZodEmail;
575
+ readonly phone: z.ZodString;
576
+ readonly address: z.ZodString;
577
+ readonly notes: z.ZodString;
578
+ readonly status: z.ZodEnum<{
579
+ requested: "requested";
580
+ accepted: "accepted";
581
+ declined: "declined";
582
+ cancelled: "cancelled";
583
+ }>;
584
+ }, z.core.$strip>>>>;
585
+ readonly accept: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests/:id/accept", {}, z.ZodObject<{
586
+ id: z.ZodString;
587
+ createdAt: z.ZodString;
588
+ } & Record<never, never> & {
589
+ readonly offering: z.ZodString;
590
+ readonly date: z.ZodString;
591
+ readonly window: z.ZodString;
592
+ readonly name: z.ZodString;
593
+ readonly email: z.ZodEmail;
594
+ readonly phone: z.ZodString;
595
+ readonly address: z.ZodString;
596
+ readonly notes: z.ZodString;
597
+ readonly status: z.ZodEnum<{
598
+ requested: "requested";
599
+ accepted: "accepted";
600
+ declined: "declined";
601
+ cancelled: "cancelled";
602
+ }>;
603
+ }, z.core.$strip>>>;
604
+ readonly decline: NoInfer<import("./services.ts").ServiceCall<"/bookings/requests/:id/decline", {}, z.ZodObject<{
605
+ id: z.ZodString;
606
+ createdAt: z.ZodString;
607
+ } & Record<never, never> & {
608
+ readonly offering: z.ZodString;
609
+ readonly date: z.ZodString;
610
+ readonly window: z.ZodString;
611
+ readonly name: z.ZodString;
612
+ readonly email: z.ZodEmail;
613
+ readonly phone: z.ZodString;
614
+ readonly address: z.ZodString;
615
+ readonly notes: z.ZodString;
616
+ readonly status: z.ZodEnum<{
617
+ requested: "requested";
618
+ accepted: "accepted";
619
+ declined: "declined";
620
+ cancelled: "cancelled";
621
+ }>;
622
+ }, z.core.$strip>>>;
623
+ readonly rules: NoInfer<import("./services.ts").ServiceCall<"/bookings/rules", {}, z.ZodObject<{
624
+ windows: z.ZodArray<z.ZodObject<{
625
+ weekday: z.ZodEnum<{
626
+ Sunday: "Sunday";
627
+ Monday: "Monday";
628
+ Tuesday: "Tuesday";
629
+ Wednesday: "Wednesday";
630
+ Thursday: "Thursday";
631
+ Friday: "Friday";
632
+ Saturday: "Saturday";
633
+ }>;
634
+ label: z.ZodString;
635
+ start: z.ZodString;
636
+ end: z.ZodString;
637
+ capacity: z.ZodNumber;
638
+ }, z.core.$strip>>;
639
+ leadTimeHours: z.ZodNumber;
640
+ daysAhead: z.ZodNumber;
641
+ autoAccept: z.ZodBoolean;
642
+ blackouts: z.ZodArray<z.ZodObject<{
643
+ date: z.ZodString;
644
+ reason: z.ZodString;
645
+ }, z.core.$strip>>;
646
+ }, z.core.$strip>>>;
647
+ readonly saveRules: NoInfer<import("./services.ts").ServiceCall<"/bookings/rules", {
648
+ windows: z.ZodArray<z.ZodObject<{
649
+ weekday: z.ZodEnum<{
650
+ Sunday: "Sunday";
651
+ Monday: "Monday";
652
+ Tuesday: "Tuesday";
653
+ Wednesday: "Wednesday";
654
+ Thursday: "Thursday";
655
+ Friday: "Friday";
656
+ Saturday: "Saturday";
657
+ }>;
658
+ label: z.ZodString;
659
+ start: z.ZodString;
660
+ end: z.ZodString;
661
+ capacity: z.ZodNumber;
662
+ }, z.core.$strip>>;
663
+ leadTimeHours: z.ZodNumber;
664
+ daysAhead: z.ZodNumber;
665
+ autoAccept: z.ZodBoolean;
666
+ blackouts: z.ZodArray<z.ZodObject<{
667
+ date: z.ZodString;
668
+ reason: z.ZodString;
669
+ }, z.core.$strip>>;
670
+ }, z.ZodObject<{
671
+ windows: z.ZodArray<z.ZodObject<{
672
+ weekday: z.ZodEnum<{
673
+ Sunday: "Sunday";
674
+ Monday: "Monday";
675
+ Tuesday: "Tuesday";
676
+ Wednesday: "Wednesday";
677
+ Thursday: "Thursday";
678
+ Friday: "Friday";
679
+ Saturday: "Saturday";
680
+ }>;
681
+ label: z.ZodString;
682
+ start: z.ZodString;
683
+ end: z.ZodString;
684
+ capacity: z.ZodNumber;
685
+ }, z.core.$strip>>;
686
+ leadTimeHours: z.ZodNumber;
687
+ daysAhead: z.ZodNumber;
688
+ autoAccept: z.ZodBoolean;
689
+ blackouts: z.ZodArray<z.ZodObject<{
690
+ date: z.ZodString;
691
+ reason: z.ZodString;
692
+ }, z.core.$strip>>;
693
+ }, z.core.$strip>>>;
694
+ };
695
+ }, unknown>;
696
+ readonly Store: typeof Bookings;
697
+ };
698
+ export {};