@mwam/sdk 0.0.0-stage → 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.
@@ -0,0 +1,2351 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const publicSessionSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ /**
6
+ * ISO 8601 **with the event's offset**: `2026-11-19T18:30:00-05:00`.
7
+ *
8
+ * One field, not two, and that is the point. `new Date(…)` of it is the right instant, and
9
+ * copying it into JSON-LD's `startDate` is the right local time with the right offset. A
10
+ * bare `…Z` would be correct and useless — every consumer would have to re-derive the
11
+ * offset, and deriving it is exactly where this goes wrong.
12
+ */
13
+ startsAt: z.ZodString;
14
+ endsAt: z.ZodString;
15
+ status: z.ZodEnum<[
16
+ "SCHEDULED",
17
+ "CANCELLED",
18
+ "POSTPONED",
19
+ "RESCHEDULED",
20
+ "MOVED_ONLINE"
21
+ ]>;
22
+ statusNote: z.ZodNullable<z.ZodString>;
23
+ place: z.ZodObject<{
24
+ name: z.ZodNullable<z.ZodString>;
25
+ streetAddress: z.ZodNullable<z.ZodString>;
26
+ locality: z.ZodNullable<z.ZodString>;
27
+ region: z.ZodNullable<z.ZodString>;
28
+ postalCode: z.ZodNullable<z.ZodString>;
29
+ country: z.ZodNullable<z.ZodString>;
30
+ onlineUrl: z.ZodNullable<z.ZodString>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ streetAddress: string | null;
33
+ locality: string | null;
34
+ region: string | null;
35
+ postalCode: string | null;
36
+ country: string | null;
37
+ onlineUrl: string | null;
38
+ name: string | null;
39
+ }, {
40
+ streetAddress: string | null;
41
+ locality: string | null;
42
+ region: string | null;
43
+ postalCode: string | null;
44
+ country: string | null;
45
+ onlineUrl: string | null;
46
+ name: string | null;
47
+ }>;
48
+ capacity: z.ZodNullable<z.ZodNumber>;
49
+ /**
50
+ * Seats still free, or null when the date takes everybody. With `capacity` it is what
51
+ * "8 of 100 registered" is made of — and it is the only number here that changes between
52
+ * one request and the next, which is why the list carries a short cache and an ETag.
53
+ */
54
+ seatsLeft: z.ZodNullable<z.ZodNumber>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
57
+ startsAt: string;
58
+ endsAt: string;
59
+ statusNote: string | null;
60
+ capacity: number | null;
61
+ id: string;
62
+ place: {
63
+ streetAddress: string | null;
64
+ locality: string | null;
65
+ region: string | null;
66
+ postalCode: string | null;
67
+ country: string | null;
68
+ onlineUrl: string | null;
69
+ name: string | null;
70
+ };
71
+ seatsLeft: number | null;
72
+ }, {
73
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
74
+ startsAt: string;
75
+ endsAt: string;
76
+ statusNote: string | null;
77
+ capacity: number | null;
78
+ id: string;
79
+ place: {
80
+ streetAddress: string | null;
81
+ locality: string | null;
82
+ region: string | null;
83
+ postalCode: string | null;
84
+ country: string | null;
85
+ onlineUrl: string | null;
86
+ name: string | null;
87
+ };
88
+ seatsLeft: number | null;
89
+ }>;
90
+ declare const publicSessionRowSchema: z.ZodObject<z.objectUtil.extendShape<{
91
+ id: z.ZodString;
92
+ /**
93
+ * ISO 8601 **with the event's offset**: `2026-11-19T18:30:00-05:00`.
94
+ *
95
+ * One field, not two, and that is the point. `new Date(…)` of it is the right instant, and
96
+ * copying it into JSON-LD's `startDate` is the right local time with the right offset. A
97
+ * bare `…Z` would be correct and useless — every consumer would have to re-derive the
98
+ * offset, and deriving it is exactly where this goes wrong.
99
+ */
100
+ startsAt: z.ZodString;
101
+ endsAt: z.ZodString;
102
+ status: z.ZodEnum<[
103
+ "SCHEDULED",
104
+ "CANCELLED",
105
+ "POSTPONED",
106
+ "RESCHEDULED",
107
+ "MOVED_ONLINE"
108
+ ]>;
109
+ statusNote: z.ZodNullable<z.ZodString>;
110
+ place: z.ZodObject<{
111
+ name: z.ZodNullable<z.ZodString>;
112
+ streetAddress: z.ZodNullable<z.ZodString>;
113
+ locality: z.ZodNullable<z.ZodString>;
114
+ region: z.ZodNullable<z.ZodString>;
115
+ postalCode: z.ZodNullable<z.ZodString>;
116
+ country: z.ZodNullable<z.ZodString>;
117
+ onlineUrl: z.ZodNullable<z.ZodString>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ streetAddress: string | null;
120
+ locality: string | null;
121
+ region: string | null;
122
+ postalCode: string | null;
123
+ country: string | null;
124
+ onlineUrl: string | null;
125
+ name: string | null;
126
+ }, {
127
+ streetAddress: string | null;
128
+ locality: string | null;
129
+ region: string | null;
130
+ postalCode: string | null;
131
+ country: string | null;
132
+ onlineUrl: string | null;
133
+ name: string | null;
134
+ }>;
135
+ capacity: z.ZodNullable<z.ZodNumber>;
136
+ /**
137
+ * Seats still free, or null when the date takes everybody. With `capacity` it is what
138
+ * "8 of 100 registered" is made of — and it is the only number here that changes between
139
+ * one request and the next, which is why the list carries a short cache and an ETag.
140
+ */
141
+ seatsLeft: z.ZodNullable<z.ZodNumber>;
142
+ }, {
143
+ event: z.ZodObject<{
144
+ slug: z.ZodString;
145
+ title: z.ZodString;
146
+ summary: z.ZodNullable<z.ZodString>;
147
+ category: z.ZodEnum<[
148
+ "MEDITATION",
149
+ "RETREAT",
150
+ "DHAMMA_CLASS",
151
+ "CEREMONY",
152
+ "OTHER"
153
+ ]>;
154
+ attendance: z.ZodEnum<[
155
+ "OFFLINE",
156
+ "ONLINE",
157
+ "MIXED"
158
+ ]>;
159
+ timezone: z.ZodString;
160
+ recurrenceLabel: z.ZodNullable<z.ZodString>;
161
+ priceCents: z.ZodNumber;
162
+ priceCurrency: z.ZodString;
163
+ registration: z.ZodEnum<[
164
+ "NONE",
165
+ "EXTERNAL",
166
+ "OURS"
167
+ ]>;
168
+ /**
169
+ * EACH_DATE: a place is booked a date at a time. ALL_DATES: people sign up once for every date
170
+ * (`signUp` in the SDK), and each date's `capacity` and `seatsLeft` are the event's.
171
+ */
172
+ signUp: z.ZodDefault<z.ZodEnum<[
173
+ "EACH_DATE",
174
+ "ALL_DATES"
175
+ ]>>;
176
+ /**
177
+ * DONATION: booking a date takes a donation by card of at least `priceCents` a place —
178
+ * `register` with `card` and `amountCents`, the card box started with what `giving()`
179
+ * answers as `card`. FREE: nothing is taken, whatever `priceCents` shows.
180
+ */
181
+ pricing: z.ZodDefault<z.ZodEnum<[
182
+ "FREE",
183
+ "DONATION"
184
+ ]>>;
185
+ /** Where a DONATION's amount starts; null starts at `priceCents`. */
186
+ suggestedCents: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
187
+ /** Where registering happens when `registration` is EXTERNAL. Null otherwise. */
188
+ registrationUrl: z.ZodNullable<z.ZodString>;
189
+ series: z.ZodNullable<z.ZodObject<{
190
+ slug: z.ZodString;
191
+ name: z.ZodString;
192
+ }, "strip", z.ZodTypeAny, {
193
+ slug: string;
194
+ name: string;
195
+ }, {
196
+ slug: string;
197
+ name: string;
198
+ }>>;
199
+ /**
200
+ * The picture a schedule shows beside the event and its page above it, null when none was
201
+ * chosen. The same shape as a post's: `url` absolute, `alt` "" when it has no description.
202
+ */
203
+ cover: z.ZodNullable<z.ZodObject<Omit<{
204
+ url: z.ZodString;
205
+ alt: z.ZodString;
206
+ caption: z.ZodNullable<z.ZodString>;
207
+ width: z.ZodNumber;
208
+ height: z.ZodNumber;
209
+ }, "caption">, "strip", z.ZodTypeAny, {
210
+ alt: string;
211
+ url: string;
212
+ width: number;
213
+ height: number;
214
+ }, {
215
+ alt: string;
216
+ url: string;
217
+ width: number;
218
+ height: number;
219
+ }>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ slug: string;
222
+ title: string;
223
+ summary: string | null;
224
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
225
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
226
+ timezone: string;
227
+ recurrenceLabel: string | null;
228
+ priceCents: number;
229
+ priceCurrency: string;
230
+ registration: "NONE" | "EXTERNAL" | "OURS";
231
+ signUp: "EACH_DATE" | "ALL_DATES";
232
+ pricing: "FREE" | "DONATION";
233
+ suggestedCents: number | null;
234
+ cover: {
235
+ alt: string;
236
+ url: string;
237
+ width: number;
238
+ height: number;
239
+ } | null;
240
+ registrationUrl: string | null;
241
+ series: {
242
+ slug: string;
243
+ name: string;
244
+ } | null;
245
+ }, {
246
+ slug: string;
247
+ title: string;
248
+ summary: string | null;
249
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
250
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
251
+ timezone: string;
252
+ recurrenceLabel: string | null;
253
+ priceCents: number;
254
+ priceCurrency: string;
255
+ registration: "NONE" | "EXTERNAL" | "OURS";
256
+ cover: {
257
+ alt: string;
258
+ url: string;
259
+ width: number;
260
+ height: number;
261
+ } | null;
262
+ registrationUrl: string | null;
263
+ series: {
264
+ slug: string;
265
+ name: string;
266
+ } | null;
267
+ signUp?: "EACH_DATE" | "ALL_DATES" | undefined;
268
+ pricing?: "FREE" | "DONATION" | undefined;
269
+ suggestedCents?: number | null | undefined;
270
+ }>;
271
+ }>, "strip", z.ZodTypeAny, {
272
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
273
+ startsAt: string;
274
+ endsAt: string;
275
+ statusNote: string | null;
276
+ capacity: number | null;
277
+ event: {
278
+ slug: string;
279
+ title: string;
280
+ summary: string | null;
281
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
282
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
283
+ timezone: string;
284
+ recurrenceLabel: string | null;
285
+ priceCents: number;
286
+ priceCurrency: string;
287
+ registration: "NONE" | "EXTERNAL" | "OURS";
288
+ signUp: "EACH_DATE" | "ALL_DATES";
289
+ pricing: "FREE" | "DONATION";
290
+ suggestedCents: number | null;
291
+ cover: {
292
+ alt: string;
293
+ url: string;
294
+ width: number;
295
+ height: number;
296
+ } | null;
297
+ registrationUrl: string | null;
298
+ series: {
299
+ slug: string;
300
+ name: string;
301
+ } | null;
302
+ };
303
+ id: string;
304
+ place: {
305
+ streetAddress: string | null;
306
+ locality: string | null;
307
+ region: string | null;
308
+ postalCode: string | null;
309
+ country: string | null;
310
+ onlineUrl: string | null;
311
+ name: string | null;
312
+ };
313
+ seatsLeft: number | null;
314
+ }, {
315
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
316
+ startsAt: string;
317
+ endsAt: string;
318
+ statusNote: string | null;
319
+ capacity: number | null;
320
+ event: {
321
+ slug: string;
322
+ title: string;
323
+ summary: string | null;
324
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
325
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
326
+ timezone: string;
327
+ recurrenceLabel: string | null;
328
+ priceCents: number;
329
+ priceCurrency: string;
330
+ registration: "NONE" | "EXTERNAL" | "OURS";
331
+ cover: {
332
+ alt: string;
333
+ url: string;
334
+ width: number;
335
+ height: number;
336
+ } | null;
337
+ registrationUrl: string | null;
338
+ series: {
339
+ slug: string;
340
+ name: string;
341
+ } | null;
342
+ signUp?: "EACH_DATE" | "ALL_DATES" | undefined;
343
+ pricing?: "FREE" | "DONATION" | undefined;
344
+ suggestedCents?: number | null | undefined;
345
+ };
346
+ id: string;
347
+ place: {
348
+ streetAddress: string | null;
349
+ locality: string | null;
350
+ region: string | null;
351
+ postalCode: string | null;
352
+ country: string | null;
353
+ onlineUrl: string | null;
354
+ name: string | null;
355
+ };
356
+ seatsLeft: number | null;
357
+ }>;
358
+ declare const publicEventDetailSchema: z.ZodObject<z.objectUtil.extendShape<{
359
+ slug: z.ZodString;
360
+ title: z.ZodString;
361
+ summary: z.ZodNullable<z.ZodString>;
362
+ category: z.ZodEnum<[
363
+ "MEDITATION",
364
+ "RETREAT",
365
+ "DHAMMA_CLASS",
366
+ "CEREMONY",
367
+ "OTHER"
368
+ ]>;
369
+ attendance: z.ZodEnum<[
370
+ "OFFLINE",
371
+ "ONLINE",
372
+ "MIXED"
373
+ ]>;
374
+ timezone: z.ZodString;
375
+ recurrenceLabel: z.ZodNullable<z.ZodString>;
376
+ priceCents: z.ZodNumber;
377
+ priceCurrency: z.ZodString;
378
+ registration: z.ZodEnum<[
379
+ "NONE",
380
+ "EXTERNAL",
381
+ "OURS"
382
+ ]>;
383
+ /**
384
+ * EACH_DATE: a place is booked a date at a time. ALL_DATES: people sign up once for every date
385
+ * (`signUp` in the SDK), and each date's `capacity` and `seatsLeft` are the event's.
386
+ */
387
+ signUp: z.ZodDefault<z.ZodEnum<[
388
+ "EACH_DATE",
389
+ "ALL_DATES"
390
+ ]>>;
391
+ /**
392
+ * DONATION: booking a date takes a donation by card of at least `priceCents` a place —
393
+ * `register` with `card` and `amountCents`, the card box started with what `giving()`
394
+ * answers as `card`. FREE: nothing is taken, whatever `priceCents` shows.
395
+ */
396
+ pricing: z.ZodDefault<z.ZodEnum<[
397
+ "FREE",
398
+ "DONATION"
399
+ ]>>;
400
+ /** Where a DONATION's amount starts; null starts at `priceCents`. */
401
+ suggestedCents: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
402
+ /** Where registering happens when `registration` is EXTERNAL. Null otherwise. */
403
+ registrationUrl: z.ZodNullable<z.ZodString>;
404
+ series: z.ZodNullable<z.ZodObject<{
405
+ slug: z.ZodString;
406
+ name: z.ZodString;
407
+ }, "strip", z.ZodTypeAny, {
408
+ slug: string;
409
+ name: string;
410
+ }, {
411
+ slug: string;
412
+ name: string;
413
+ }>>;
414
+ /**
415
+ * The picture a schedule shows beside the event and its page above it, null when none was
416
+ * chosen. The same shape as a post's: `url` absolute, `alt` "" when it has no description.
417
+ */
418
+ cover: z.ZodNullable<z.ZodObject<Omit<{
419
+ url: z.ZodString;
420
+ alt: z.ZodString;
421
+ caption: z.ZodNullable<z.ZodString>;
422
+ width: z.ZodNumber;
423
+ height: z.ZodNumber;
424
+ }, "caption">, "strip", z.ZodTypeAny, {
425
+ alt: string;
426
+ url: string;
427
+ width: number;
428
+ height: number;
429
+ }, {
430
+ alt: string;
431
+ url: string;
432
+ width: number;
433
+ height: number;
434
+ }>>;
435
+ }, {
436
+ bodyHtml: z.ZodString;
437
+ teacherName: z.ZodNullable<z.ZodString>;
438
+ teacherBio: z.ZodNullable<z.ZodString>;
439
+ whatToBring: z.ZodNullable<z.ZodString>;
440
+ sessions: z.ZodArray<z.ZodObject<{
441
+ id: z.ZodString;
442
+ /**
443
+ * ISO 8601 **with the event's offset**: `2026-11-19T18:30:00-05:00`.
444
+ *
445
+ * One field, not two, and that is the point. `new Date(…)` of it is the right instant, and
446
+ * copying it into JSON-LD's `startDate` is the right local time with the right offset. A
447
+ * bare `…Z` would be correct and useless — every consumer would have to re-derive the
448
+ * offset, and deriving it is exactly where this goes wrong.
449
+ */
450
+ startsAt: z.ZodString;
451
+ endsAt: z.ZodString;
452
+ status: z.ZodEnum<[
453
+ "SCHEDULED",
454
+ "CANCELLED",
455
+ "POSTPONED",
456
+ "RESCHEDULED",
457
+ "MOVED_ONLINE"
458
+ ]>;
459
+ statusNote: z.ZodNullable<z.ZodString>;
460
+ place: z.ZodObject<{
461
+ name: z.ZodNullable<z.ZodString>;
462
+ streetAddress: z.ZodNullable<z.ZodString>;
463
+ locality: z.ZodNullable<z.ZodString>;
464
+ region: z.ZodNullable<z.ZodString>;
465
+ postalCode: z.ZodNullable<z.ZodString>;
466
+ country: z.ZodNullable<z.ZodString>;
467
+ onlineUrl: z.ZodNullable<z.ZodString>;
468
+ }, "strip", z.ZodTypeAny, {
469
+ streetAddress: string | null;
470
+ locality: string | null;
471
+ region: string | null;
472
+ postalCode: string | null;
473
+ country: string | null;
474
+ onlineUrl: string | null;
475
+ name: string | null;
476
+ }, {
477
+ streetAddress: string | null;
478
+ locality: string | null;
479
+ region: string | null;
480
+ postalCode: string | null;
481
+ country: string | null;
482
+ onlineUrl: string | null;
483
+ name: string | null;
484
+ }>;
485
+ capacity: z.ZodNullable<z.ZodNumber>;
486
+ /**
487
+ * Seats still free, or null when the date takes everybody. With `capacity` it is what
488
+ * "8 of 100 registered" is made of — and it is the only number here that changes between
489
+ * one request and the next, which is why the list carries a short cache and an ETag.
490
+ */
491
+ seatsLeft: z.ZodNullable<z.ZodNumber>;
492
+ }, "strip", z.ZodTypeAny, {
493
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
494
+ startsAt: string;
495
+ endsAt: string;
496
+ statusNote: string | null;
497
+ capacity: number | null;
498
+ id: string;
499
+ place: {
500
+ streetAddress: string | null;
501
+ locality: string | null;
502
+ region: string | null;
503
+ postalCode: string | null;
504
+ country: string | null;
505
+ onlineUrl: string | null;
506
+ name: string | null;
507
+ };
508
+ seatsLeft: number | null;
509
+ }, {
510
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
511
+ startsAt: string;
512
+ endsAt: string;
513
+ statusNote: string | null;
514
+ capacity: number | null;
515
+ id: string;
516
+ place: {
517
+ streetAddress: string | null;
518
+ locality: string | null;
519
+ region: string | null;
520
+ postalCode: string | null;
521
+ country: string | null;
522
+ onlineUrl: string | null;
523
+ name: string | null;
524
+ };
525
+ seatsLeft: number | null;
526
+ }>, "many">;
527
+ /** Minutes from the session's start — the running order, not clock times. */
528
+ segments: z.ZodArray<z.ZodObject<{
529
+ startsMinute: z.ZodNumber;
530
+ endsMinute: z.ZodNumber;
531
+ label: z.ZodString;
532
+ }, "strip", z.ZodTypeAny, {
533
+ startsMinute: number;
534
+ endsMinute: number;
535
+ label: string;
536
+ }, {
537
+ startsMinute: number;
538
+ endsMinute: number;
539
+ label: string;
540
+ }>, "many">;
541
+ /** Galleries linked to this event in the CRM, published ones only, newest first. */
542
+ galleries: z.ZodArray<z.ZodObject<Omit<z.objectUtil.extendShape<{
543
+ slug: z.ZodString;
544
+ title: z.ZodString;
545
+ summary: z.ZodNullable<z.ZodString>;
546
+ cover: z.ZodNullable<z.ZodObject<{
547
+ url: z.ZodString;
548
+ alt: z.ZodString;
549
+ caption: z.ZodNullable<z.ZodString>;
550
+ width: z.ZodNumber;
551
+ height: z.ZodNumber;
552
+ }, "strip", z.ZodTypeAny, {
553
+ alt: string;
554
+ caption: string | null;
555
+ url: string;
556
+ width: number;
557
+ height: number;
558
+ }, {
559
+ alt: string;
560
+ caption: string | null;
561
+ url: string;
562
+ width: number;
563
+ height: number;
564
+ }>>;
565
+ pictureCount: z.ZodNumber;
566
+ publishedAt: z.ZodNullable<z.ZodString>;
567
+ }, {
568
+ pictures: z.ZodArray<z.ZodObject<{
569
+ url: z.ZodString;
570
+ alt: z.ZodString;
571
+ caption: z.ZodNullable<z.ZodString>;
572
+ width: z.ZodNumber;
573
+ height: z.ZodNumber;
574
+ }, "strip", z.ZodTypeAny, {
575
+ alt: string;
576
+ caption: string | null;
577
+ url: string;
578
+ width: number;
579
+ height: number;
580
+ }, {
581
+ alt: string;
582
+ caption: string | null;
583
+ url: string;
584
+ width: number;
585
+ height: number;
586
+ }>, "many">;
587
+ event: z.ZodNullable<z.ZodObject<{
588
+ slug: z.ZodString;
589
+ title: z.ZodString;
590
+ }, "strip", z.ZodTypeAny, {
591
+ slug: string;
592
+ title: string;
593
+ }, {
594
+ slug: string;
595
+ title: string;
596
+ }>>;
597
+ }>, "event">, "strip", z.ZodTypeAny, {
598
+ slug: string;
599
+ title: string;
600
+ summary: string | null;
601
+ cover: {
602
+ alt: string;
603
+ caption: string | null;
604
+ url: string;
605
+ width: number;
606
+ height: number;
607
+ } | null;
608
+ pictureCount: number;
609
+ publishedAt: string | null;
610
+ pictures: {
611
+ alt: string;
612
+ caption: string | null;
613
+ url: string;
614
+ width: number;
615
+ height: number;
616
+ }[];
617
+ }, {
618
+ slug: string;
619
+ title: string;
620
+ summary: string | null;
621
+ cover: {
622
+ alt: string;
623
+ caption: string | null;
624
+ url: string;
625
+ width: number;
626
+ height: number;
627
+ } | null;
628
+ pictureCount: number;
629
+ publishedAt: string | null;
630
+ pictures: {
631
+ alt: string;
632
+ caption: string | null;
633
+ url: string;
634
+ width: number;
635
+ height: number;
636
+ }[];
637
+ }>, "many">;
638
+ }>, "strip", z.ZodTypeAny, {
639
+ sessions: {
640
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
641
+ startsAt: string;
642
+ endsAt: string;
643
+ statusNote: string | null;
644
+ capacity: number | null;
645
+ id: string;
646
+ place: {
647
+ streetAddress: string | null;
648
+ locality: string | null;
649
+ region: string | null;
650
+ postalCode: string | null;
651
+ country: string | null;
652
+ onlineUrl: string | null;
653
+ name: string | null;
654
+ };
655
+ seatsLeft: number | null;
656
+ }[];
657
+ slug: string;
658
+ title: string;
659
+ summary: string | null;
660
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
661
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
662
+ timezone: string;
663
+ recurrenceLabel: string | null;
664
+ teacherName: string | null;
665
+ teacherBio: string | null;
666
+ whatToBring: string | null;
667
+ priceCents: number;
668
+ priceCurrency: string;
669
+ registration: "NONE" | "EXTERNAL" | "OURS";
670
+ signUp: "EACH_DATE" | "ALL_DATES";
671
+ pricing: "FREE" | "DONATION";
672
+ suggestedCents: number | null;
673
+ segments: {
674
+ startsMinute: number;
675
+ endsMinute: number;
676
+ label: string;
677
+ }[];
678
+ cover: {
679
+ alt: string;
680
+ url: string;
681
+ width: number;
682
+ height: number;
683
+ } | null;
684
+ galleries: {
685
+ slug: string;
686
+ title: string;
687
+ summary: string | null;
688
+ cover: {
689
+ alt: string;
690
+ caption: string | null;
691
+ url: string;
692
+ width: number;
693
+ height: number;
694
+ } | null;
695
+ pictureCount: number;
696
+ publishedAt: string | null;
697
+ pictures: {
698
+ alt: string;
699
+ caption: string | null;
700
+ url: string;
701
+ width: number;
702
+ height: number;
703
+ }[];
704
+ }[];
705
+ registrationUrl: string | null;
706
+ series: {
707
+ slug: string;
708
+ name: string;
709
+ } | null;
710
+ bodyHtml: string;
711
+ }, {
712
+ sessions: {
713
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
714
+ startsAt: string;
715
+ endsAt: string;
716
+ statusNote: string | null;
717
+ capacity: number | null;
718
+ id: string;
719
+ place: {
720
+ streetAddress: string | null;
721
+ locality: string | null;
722
+ region: string | null;
723
+ postalCode: string | null;
724
+ country: string | null;
725
+ onlineUrl: string | null;
726
+ name: string | null;
727
+ };
728
+ seatsLeft: number | null;
729
+ }[];
730
+ slug: string;
731
+ title: string;
732
+ summary: string | null;
733
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
734
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
735
+ timezone: string;
736
+ recurrenceLabel: string | null;
737
+ teacherName: string | null;
738
+ teacherBio: string | null;
739
+ whatToBring: string | null;
740
+ priceCents: number;
741
+ priceCurrency: string;
742
+ registration: "NONE" | "EXTERNAL" | "OURS";
743
+ segments: {
744
+ startsMinute: number;
745
+ endsMinute: number;
746
+ label: string;
747
+ }[];
748
+ cover: {
749
+ alt: string;
750
+ url: string;
751
+ width: number;
752
+ height: number;
753
+ } | null;
754
+ galleries: {
755
+ slug: string;
756
+ title: string;
757
+ summary: string | null;
758
+ cover: {
759
+ alt: string;
760
+ caption: string | null;
761
+ url: string;
762
+ width: number;
763
+ height: number;
764
+ } | null;
765
+ pictureCount: number;
766
+ publishedAt: string | null;
767
+ pictures: {
768
+ alt: string;
769
+ caption: string | null;
770
+ url: string;
771
+ width: number;
772
+ height: number;
773
+ }[];
774
+ }[];
775
+ registrationUrl: string | null;
776
+ series: {
777
+ slug: string;
778
+ name: string;
779
+ } | null;
780
+ bodyHtml: string;
781
+ signUp?: "EACH_DATE" | "ALL_DATES" | undefined;
782
+ pricing?: "FREE" | "DONATION" | undefined;
783
+ suggestedCents?: number | null | undefined;
784
+ }>;
785
+ declare const publicSeriesSchema: z.ZodObject<z.objectUtil.extendShape<{
786
+ slug: z.ZodString;
787
+ name: z.ZodString;
788
+ }, {
789
+ summary: z.ZodNullable<z.ZodString>;
790
+ events: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
791
+ slug: z.ZodString;
792
+ title: z.ZodString;
793
+ summary: z.ZodNullable<z.ZodString>;
794
+ category: z.ZodEnum<[
795
+ "MEDITATION",
796
+ "RETREAT",
797
+ "DHAMMA_CLASS",
798
+ "CEREMONY",
799
+ "OTHER"
800
+ ]>;
801
+ attendance: z.ZodEnum<[
802
+ "OFFLINE",
803
+ "ONLINE",
804
+ "MIXED"
805
+ ]>;
806
+ timezone: z.ZodString;
807
+ recurrenceLabel: z.ZodNullable<z.ZodString>;
808
+ priceCents: z.ZodNumber;
809
+ priceCurrency: z.ZodString;
810
+ registration: z.ZodEnum<[
811
+ "NONE",
812
+ "EXTERNAL",
813
+ "OURS"
814
+ ]>;
815
+ /**
816
+ * EACH_DATE: a place is booked a date at a time. ALL_DATES: people sign up once for every date
817
+ * (`signUp` in the SDK), and each date's `capacity` and `seatsLeft` are the event's.
818
+ */
819
+ signUp: z.ZodDefault<z.ZodEnum<[
820
+ "EACH_DATE",
821
+ "ALL_DATES"
822
+ ]>>;
823
+ /**
824
+ * DONATION: booking a date takes a donation by card of at least `priceCents` a place —
825
+ * `register` with `card` and `amountCents`, the card box started with what `giving()`
826
+ * answers as `card`. FREE: nothing is taken, whatever `priceCents` shows.
827
+ */
828
+ pricing: z.ZodDefault<z.ZodEnum<[
829
+ "FREE",
830
+ "DONATION"
831
+ ]>>;
832
+ /** Where a DONATION's amount starts; null starts at `priceCents`. */
833
+ suggestedCents: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
834
+ /** Where registering happens when `registration` is EXTERNAL. Null otherwise. */
835
+ registrationUrl: z.ZodNullable<z.ZodString>;
836
+ series: z.ZodNullable<z.ZodObject<{
837
+ slug: z.ZodString;
838
+ name: z.ZodString;
839
+ }, "strip", z.ZodTypeAny, {
840
+ slug: string;
841
+ name: string;
842
+ }, {
843
+ slug: string;
844
+ name: string;
845
+ }>>;
846
+ /**
847
+ * The picture a schedule shows beside the event and its page above it, null when none was
848
+ * chosen. The same shape as a post's: `url` absolute, `alt` "" when it has no description.
849
+ */
850
+ cover: z.ZodNullable<z.ZodObject<Omit<{
851
+ url: z.ZodString;
852
+ alt: z.ZodString;
853
+ caption: z.ZodNullable<z.ZodString>;
854
+ width: z.ZodNumber;
855
+ height: z.ZodNumber;
856
+ }, "caption">, "strip", z.ZodTypeAny, {
857
+ alt: string;
858
+ url: string;
859
+ width: number;
860
+ height: number;
861
+ }, {
862
+ alt: string;
863
+ url: string;
864
+ width: number;
865
+ height: number;
866
+ }>>;
867
+ }, {
868
+ /** The soonest date still to come, or null when they have all passed. */
869
+ nextSession: z.ZodNullable<z.ZodObject<{
870
+ id: z.ZodString;
871
+ /**
872
+ * ISO 8601 **with the event's offset**: `2026-11-19T18:30:00-05:00`.
873
+ *
874
+ * One field, not two, and that is the point. `new Date(…)` of it is the right instant, and
875
+ * copying it into JSON-LD's `startDate` is the right local time with the right offset. A
876
+ * bare `…Z` would be correct and useless — every consumer would have to re-derive the
877
+ * offset, and deriving it is exactly where this goes wrong.
878
+ */
879
+ startsAt: z.ZodString;
880
+ endsAt: z.ZodString;
881
+ status: z.ZodEnum<[
882
+ "SCHEDULED",
883
+ "CANCELLED",
884
+ "POSTPONED",
885
+ "RESCHEDULED",
886
+ "MOVED_ONLINE"
887
+ ]>;
888
+ statusNote: z.ZodNullable<z.ZodString>;
889
+ place: z.ZodObject<{
890
+ name: z.ZodNullable<z.ZodString>;
891
+ streetAddress: z.ZodNullable<z.ZodString>;
892
+ locality: z.ZodNullable<z.ZodString>;
893
+ region: z.ZodNullable<z.ZodString>;
894
+ postalCode: z.ZodNullable<z.ZodString>;
895
+ country: z.ZodNullable<z.ZodString>;
896
+ onlineUrl: z.ZodNullable<z.ZodString>;
897
+ }, "strip", z.ZodTypeAny, {
898
+ streetAddress: string | null;
899
+ locality: string | null;
900
+ region: string | null;
901
+ postalCode: string | null;
902
+ country: string | null;
903
+ onlineUrl: string | null;
904
+ name: string | null;
905
+ }, {
906
+ streetAddress: string | null;
907
+ locality: string | null;
908
+ region: string | null;
909
+ postalCode: string | null;
910
+ country: string | null;
911
+ onlineUrl: string | null;
912
+ name: string | null;
913
+ }>;
914
+ capacity: z.ZodNullable<z.ZodNumber>;
915
+ /**
916
+ * Seats still free, or null when the date takes everybody. With `capacity` it is what
917
+ * "8 of 100 registered" is made of — and it is the only number here that changes between
918
+ * one request and the next, which is why the list carries a short cache and an ETag.
919
+ */
920
+ seatsLeft: z.ZodNullable<z.ZodNumber>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
923
+ startsAt: string;
924
+ endsAt: string;
925
+ statusNote: string | null;
926
+ capacity: number | null;
927
+ id: string;
928
+ place: {
929
+ streetAddress: string | null;
930
+ locality: string | null;
931
+ region: string | null;
932
+ postalCode: string | null;
933
+ country: string | null;
934
+ onlineUrl: string | null;
935
+ name: string | null;
936
+ };
937
+ seatsLeft: number | null;
938
+ }, {
939
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
940
+ startsAt: string;
941
+ endsAt: string;
942
+ statusNote: string | null;
943
+ capacity: number | null;
944
+ id: string;
945
+ place: {
946
+ streetAddress: string | null;
947
+ locality: string | null;
948
+ region: string | null;
949
+ postalCode: string | null;
950
+ country: string | null;
951
+ onlineUrl: string | null;
952
+ name: string | null;
953
+ };
954
+ seatsLeft: number | null;
955
+ }>>;
956
+ }>, "strip", z.ZodTypeAny, {
957
+ slug: string;
958
+ title: string;
959
+ summary: string | null;
960
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
961
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
962
+ timezone: string;
963
+ recurrenceLabel: string | null;
964
+ priceCents: number;
965
+ priceCurrency: string;
966
+ registration: "NONE" | "EXTERNAL" | "OURS";
967
+ signUp: "EACH_DATE" | "ALL_DATES";
968
+ pricing: "FREE" | "DONATION";
969
+ suggestedCents: number | null;
970
+ cover: {
971
+ alt: string;
972
+ url: string;
973
+ width: number;
974
+ height: number;
975
+ } | null;
976
+ registrationUrl: string | null;
977
+ series: {
978
+ slug: string;
979
+ name: string;
980
+ } | null;
981
+ nextSession: {
982
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
983
+ startsAt: string;
984
+ endsAt: string;
985
+ statusNote: string | null;
986
+ capacity: number | null;
987
+ id: string;
988
+ place: {
989
+ streetAddress: string | null;
990
+ locality: string | null;
991
+ region: string | null;
992
+ postalCode: string | null;
993
+ country: string | null;
994
+ onlineUrl: string | null;
995
+ name: string | null;
996
+ };
997
+ seatsLeft: number | null;
998
+ } | null;
999
+ }, {
1000
+ slug: string;
1001
+ title: string;
1002
+ summary: string | null;
1003
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
1004
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
1005
+ timezone: string;
1006
+ recurrenceLabel: string | null;
1007
+ priceCents: number;
1008
+ priceCurrency: string;
1009
+ registration: "NONE" | "EXTERNAL" | "OURS";
1010
+ cover: {
1011
+ alt: string;
1012
+ url: string;
1013
+ width: number;
1014
+ height: number;
1015
+ } | null;
1016
+ registrationUrl: string | null;
1017
+ series: {
1018
+ slug: string;
1019
+ name: string;
1020
+ } | null;
1021
+ nextSession: {
1022
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
1023
+ startsAt: string;
1024
+ endsAt: string;
1025
+ statusNote: string | null;
1026
+ capacity: number | null;
1027
+ id: string;
1028
+ place: {
1029
+ streetAddress: string | null;
1030
+ locality: string | null;
1031
+ region: string | null;
1032
+ postalCode: string | null;
1033
+ country: string | null;
1034
+ onlineUrl: string | null;
1035
+ name: string | null;
1036
+ };
1037
+ seatsLeft: number | null;
1038
+ } | null;
1039
+ signUp?: "EACH_DATE" | "ALL_DATES" | undefined;
1040
+ pricing?: "FREE" | "DONATION" | undefined;
1041
+ suggestedCents?: number | null | undefined;
1042
+ }>, "many">;
1043
+ }>, "strip", z.ZodTypeAny, {
1044
+ slug: string;
1045
+ summary: string | null;
1046
+ name: string;
1047
+ events: {
1048
+ slug: string;
1049
+ title: string;
1050
+ summary: string | null;
1051
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
1052
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
1053
+ timezone: string;
1054
+ recurrenceLabel: string | null;
1055
+ priceCents: number;
1056
+ priceCurrency: string;
1057
+ registration: "NONE" | "EXTERNAL" | "OURS";
1058
+ signUp: "EACH_DATE" | "ALL_DATES";
1059
+ pricing: "FREE" | "DONATION";
1060
+ suggestedCents: number | null;
1061
+ cover: {
1062
+ alt: string;
1063
+ url: string;
1064
+ width: number;
1065
+ height: number;
1066
+ } | null;
1067
+ registrationUrl: string | null;
1068
+ series: {
1069
+ slug: string;
1070
+ name: string;
1071
+ } | null;
1072
+ nextSession: {
1073
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
1074
+ startsAt: string;
1075
+ endsAt: string;
1076
+ statusNote: string | null;
1077
+ capacity: number | null;
1078
+ id: string;
1079
+ place: {
1080
+ streetAddress: string | null;
1081
+ locality: string | null;
1082
+ region: string | null;
1083
+ postalCode: string | null;
1084
+ country: string | null;
1085
+ onlineUrl: string | null;
1086
+ name: string | null;
1087
+ };
1088
+ seatsLeft: number | null;
1089
+ } | null;
1090
+ }[];
1091
+ }, {
1092
+ slug: string;
1093
+ summary: string | null;
1094
+ name: string;
1095
+ events: {
1096
+ slug: string;
1097
+ title: string;
1098
+ summary: string | null;
1099
+ category: "MEDITATION" | "RETREAT" | "DHAMMA_CLASS" | "CEREMONY" | "OTHER";
1100
+ attendance: "OFFLINE" | "ONLINE" | "MIXED";
1101
+ timezone: string;
1102
+ recurrenceLabel: string | null;
1103
+ priceCents: number;
1104
+ priceCurrency: string;
1105
+ registration: "NONE" | "EXTERNAL" | "OURS";
1106
+ cover: {
1107
+ alt: string;
1108
+ url: string;
1109
+ width: number;
1110
+ height: number;
1111
+ } | null;
1112
+ registrationUrl: string | null;
1113
+ series: {
1114
+ slug: string;
1115
+ name: string;
1116
+ } | null;
1117
+ nextSession: {
1118
+ status: "SCHEDULED" | "CANCELLED" | "POSTPONED" | "RESCHEDULED" | "MOVED_ONLINE";
1119
+ startsAt: string;
1120
+ endsAt: string;
1121
+ statusNote: string | null;
1122
+ capacity: number | null;
1123
+ id: string;
1124
+ place: {
1125
+ streetAddress: string | null;
1126
+ locality: string | null;
1127
+ region: string | null;
1128
+ postalCode: string | null;
1129
+ country: string | null;
1130
+ onlineUrl: string | null;
1131
+ name: string | null;
1132
+ };
1133
+ seatsLeft: number | null;
1134
+ } | null;
1135
+ signUp?: "EACH_DATE" | "ALL_DATES" | undefined;
1136
+ pricing?: "FREE" | "DONATION" | undefined;
1137
+ suggestedCents?: number | null | undefined;
1138
+ }[];
1139
+ }>;
1140
+ declare const publicSeriesListSchema: z.ZodObject<{
1141
+ series: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
1142
+ slug: z.ZodString;
1143
+ name: z.ZodString;
1144
+ }, {
1145
+ summary: z.ZodNullable<z.ZodString>;
1146
+ eventCount: z.ZodNumber;
1147
+ }>, "strip", z.ZodTypeAny, {
1148
+ slug: string;
1149
+ summary: string | null;
1150
+ name: string;
1151
+ eventCount: number;
1152
+ }, {
1153
+ slug: string;
1154
+ summary: string | null;
1155
+ name: string;
1156
+ eventCount: number;
1157
+ }>, "many">;
1158
+ }, "strip", z.ZodTypeAny, {
1159
+ series: {
1160
+ slug: string;
1161
+ summary: string | null;
1162
+ name: string;
1163
+ eventCount: number;
1164
+ }[];
1165
+ }, {
1166
+ series: {
1167
+ slug: string;
1168
+ summary: string | null;
1169
+ name: string;
1170
+ eventCount: number;
1171
+ }[];
1172
+ }>;
1173
+ export type PublicSeries = z.infer<typeof publicSeriesSchema>;
1174
+ export type PublicSeriesList = z.infer<typeof publicSeriesListSchema>;
1175
+ export type PublicSession = z.infer<typeof publicSessionSchema>;
1176
+ export type PublicSessionRow = z.infer<typeof publicSessionRowSchema>;
1177
+ export type PublicEventDetail = z.infer<typeof publicEventDetailSchema>;
1178
+ declare const signedUpSchema: z.ZodObject<{
1179
+ status: z.ZodEnum<[
1180
+ "CONFIRMED",
1181
+ "WAITLISTED"
1182
+ ]>;
1183
+ }, "strip", z.ZodTypeAny, {
1184
+ status: "CONFIRMED" | "WAITLISTED";
1185
+ }, {
1186
+ status: "CONFIRMED" | "WAITLISTED";
1187
+ }>;
1188
+ declare const bookingSchema: z.ZodObject<{
1189
+ status: z.ZodEnum<[
1190
+ "CONFIRMED",
1191
+ "WAITLISTED",
1192
+ "CANCELLED"
1193
+ ]>;
1194
+ seats: z.ZodNumber;
1195
+ event: z.ZodObject<{
1196
+ title: z.ZodString;
1197
+ slug: z.ZodString;
1198
+ }, "strip", z.ZodTypeAny, {
1199
+ slug: string;
1200
+ title: string;
1201
+ }, {
1202
+ slug: string;
1203
+ title: string;
1204
+ }>;
1205
+ session: z.ZodObject<{
1206
+ startsAt: z.ZodString;
1207
+ endsAt: z.ZodString;
1208
+ venueName: z.ZodNullable<z.ZodString>;
1209
+ }, "strip", z.ZodTypeAny, {
1210
+ venueName: string | null;
1211
+ startsAt: string;
1212
+ endsAt: string;
1213
+ }, {
1214
+ venueName: string | null;
1215
+ startsAt: string;
1216
+ endsAt: string;
1217
+ }>;
1218
+ }, "strip", z.ZodTypeAny, {
1219
+ status: "CANCELLED" | "CONFIRMED" | "WAITLISTED";
1220
+ event: {
1221
+ slug: string;
1222
+ title: string;
1223
+ };
1224
+ seats: number;
1225
+ session: {
1226
+ venueName: string | null;
1227
+ startsAt: string;
1228
+ endsAt: string;
1229
+ };
1230
+ }, {
1231
+ status: "CANCELLED" | "CONFIRMED" | "WAITLISTED";
1232
+ event: {
1233
+ slug: string;
1234
+ title: string;
1235
+ };
1236
+ seats: number;
1237
+ session: {
1238
+ venueName: string | null;
1239
+ startsAt: string;
1240
+ endsAt: string;
1241
+ };
1242
+ }>;
1243
+ export type Booking = z.infer<typeof bookingSchema>;
1244
+ declare const publicPictureSchema: z.ZodObject<{
1245
+ url: z.ZodString;
1246
+ alt: z.ZodString;
1247
+ caption: z.ZodNullable<z.ZodString>;
1248
+ width: z.ZodNumber;
1249
+ height: z.ZodNumber;
1250
+ }, "strip", z.ZodTypeAny, {
1251
+ alt: string;
1252
+ caption: string | null;
1253
+ url: string;
1254
+ width: number;
1255
+ height: number;
1256
+ }, {
1257
+ alt: string;
1258
+ caption: string | null;
1259
+ url: string;
1260
+ width: number;
1261
+ height: number;
1262
+ }>;
1263
+ declare const publicGallerySummarySchema: z.ZodObject<{
1264
+ slug: z.ZodString;
1265
+ title: z.ZodString;
1266
+ summary: z.ZodNullable<z.ZodString>;
1267
+ /** The chosen cover, or the first picture. */
1268
+ cover: z.ZodNullable<z.ZodObject<{
1269
+ url: z.ZodString;
1270
+ alt: z.ZodString;
1271
+ caption: z.ZodNullable<z.ZodString>;
1272
+ width: z.ZodNumber;
1273
+ height: z.ZodNumber;
1274
+ }, "strip", z.ZodTypeAny, {
1275
+ alt: string;
1276
+ caption: string | null;
1277
+ url: string;
1278
+ width: number;
1279
+ height: number;
1280
+ }, {
1281
+ alt: string;
1282
+ caption: string | null;
1283
+ url: string;
1284
+ width: number;
1285
+ height: number;
1286
+ }>>;
1287
+ pictureCount: z.ZodNumber;
1288
+ publishedAt: z.ZodNullable<z.ZodString>;
1289
+ }, "strip", z.ZodTypeAny, {
1290
+ slug: string;
1291
+ title: string;
1292
+ summary: string | null;
1293
+ cover: {
1294
+ alt: string;
1295
+ caption: string | null;
1296
+ url: string;
1297
+ width: number;
1298
+ height: number;
1299
+ } | null;
1300
+ pictureCount: number;
1301
+ publishedAt: string | null;
1302
+ }, {
1303
+ slug: string;
1304
+ title: string;
1305
+ summary: string | null;
1306
+ cover: {
1307
+ alt: string;
1308
+ caption: string | null;
1309
+ url: string;
1310
+ width: number;
1311
+ height: number;
1312
+ } | null;
1313
+ pictureCount: number;
1314
+ publishedAt: string | null;
1315
+ }>;
1316
+ declare const publicGallerySchema: z.ZodObject<z.objectUtil.extendShape<{
1317
+ slug: z.ZodString;
1318
+ title: z.ZodString;
1319
+ summary: z.ZodNullable<z.ZodString>;
1320
+ /** The chosen cover, or the first picture. */
1321
+ cover: z.ZodNullable<z.ZodObject<{
1322
+ url: z.ZodString;
1323
+ alt: z.ZodString;
1324
+ caption: z.ZodNullable<z.ZodString>;
1325
+ width: z.ZodNumber;
1326
+ height: z.ZodNumber;
1327
+ }, "strip", z.ZodTypeAny, {
1328
+ alt: string;
1329
+ caption: string | null;
1330
+ url: string;
1331
+ width: number;
1332
+ height: number;
1333
+ }, {
1334
+ alt: string;
1335
+ caption: string | null;
1336
+ url: string;
1337
+ width: number;
1338
+ height: number;
1339
+ }>>;
1340
+ pictureCount: z.ZodNumber;
1341
+ publishedAt: z.ZodNullable<z.ZodString>;
1342
+ }, {
1343
+ pictures: z.ZodArray<z.ZodObject<{
1344
+ url: z.ZodString;
1345
+ alt: z.ZodString;
1346
+ caption: z.ZodNullable<z.ZodString>;
1347
+ width: z.ZodNumber;
1348
+ height: z.ZodNumber;
1349
+ }, "strip", z.ZodTypeAny, {
1350
+ alt: string;
1351
+ caption: string | null;
1352
+ url: string;
1353
+ width: number;
1354
+ height: number;
1355
+ }, {
1356
+ alt: string;
1357
+ caption: string | null;
1358
+ url: string;
1359
+ width: number;
1360
+ height: number;
1361
+ }>, "many">;
1362
+ /** The occasion, while its event is itself on the site. */
1363
+ event: z.ZodNullable<z.ZodObject<{
1364
+ slug: z.ZodString;
1365
+ title: z.ZodString;
1366
+ }, "strip", z.ZodTypeAny, {
1367
+ slug: string;
1368
+ title: string;
1369
+ }, {
1370
+ slug: string;
1371
+ title: string;
1372
+ }>>;
1373
+ }>, "strip", z.ZodTypeAny, {
1374
+ slug: string;
1375
+ title: string;
1376
+ summary: string | null;
1377
+ cover: {
1378
+ alt: string;
1379
+ caption: string | null;
1380
+ url: string;
1381
+ width: number;
1382
+ height: number;
1383
+ } | null;
1384
+ pictureCount: number;
1385
+ publishedAt: string | null;
1386
+ pictures: {
1387
+ alt: string;
1388
+ caption: string | null;
1389
+ url: string;
1390
+ width: number;
1391
+ height: number;
1392
+ }[];
1393
+ event: {
1394
+ slug: string;
1395
+ title: string;
1396
+ } | null;
1397
+ }, {
1398
+ slug: string;
1399
+ title: string;
1400
+ summary: string | null;
1401
+ cover: {
1402
+ alt: string;
1403
+ caption: string | null;
1404
+ url: string;
1405
+ width: number;
1406
+ height: number;
1407
+ } | null;
1408
+ pictureCount: number;
1409
+ publishedAt: string | null;
1410
+ pictures: {
1411
+ alt: string;
1412
+ caption: string | null;
1413
+ url: string;
1414
+ width: number;
1415
+ height: number;
1416
+ }[];
1417
+ event: {
1418
+ slug: string;
1419
+ title: string;
1420
+ } | null;
1421
+ }>;
1422
+ export type PublicPicture = z.infer<typeof publicPictureSchema>;
1423
+ export type PublicGallerySummary = z.infer<typeof publicGallerySummarySchema>;
1424
+ export type PublicGallery = z.infer<typeof publicGallerySchema>;
1425
+ declare const donationInput: z.ZodObject<{
1426
+ amountCents: z.ZodNumber;
1427
+ currency: z.ZodOptional<z.ZodString>;
1428
+ name: z.ZodOptional<z.ZodString>;
1429
+ email: z.ZodOptional<z.ZodString>;
1430
+ /** Read out or written on a wall: "in memory of…". Never required. */
1431
+ dedication: z.ZodOptional<z.ZodString>;
1432
+ /**
1433
+ * A PATH on the monastery's own site, never a URL.
1434
+ *
1435
+ * The full address is built by the API from the monastery's own public base, so a caller
1436
+ * cannot name where the provider sends somebody afterwards. Taking a URL here would be an
1437
+ * open redirect wearing a payment page's clothes.
1438
+ */
1439
+ returnPath: z.ZodOptional<z.ZodString>;
1440
+ }, "strict", z.ZodTypeAny, {
1441
+ amountCents: number;
1442
+ name?: string | undefined;
1443
+ email?: string | undefined;
1444
+ currency?: string | undefined;
1445
+ dedication?: string | undefined;
1446
+ returnPath?: string | undefined;
1447
+ }, {
1448
+ amountCents: number;
1449
+ name?: string | undefined;
1450
+ email?: string | undefined;
1451
+ currency?: string | undefined;
1452
+ dedication?: string | undefined;
1453
+ returnPath?: string | undefined;
1454
+ }>;
1455
+ export type DonationInput = z.infer<typeof donationInput>;
1456
+ declare const givingAvailabilitySchema: z.ZodObject<{
1457
+ available: z.ZodBoolean;
1458
+ currency: z.ZodNullable<z.ZodString>;
1459
+ /**
1460
+ * What a site starts the provider's card box with, to take a gift on its own page
1461
+ * (`cardDonationInput`). Null when this monastery's gifts can only be taken on the
1462
+ * provider's page. Nothing in it is secret: the box needs both in the browser.
1463
+ */
1464
+ card: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1465
+ provider: z.ZodLiteral<"square">;
1466
+ /** This platform's Square application — the same for every monastery. */
1467
+ applicationId: z.ZodString;
1468
+ /** The monastery's own location: where the gift lands. */
1469
+ locationId: z.ZodString;
1470
+ environment: z.ZodEnum<[
1471
+ "production",
1472
+ "sandbox"
1473
+ ]>;
1474
+ }, "strip", z.ZodTypeAny, {
1475
+ provider: "square";
1476
+ applicationId: string;
1477
+ locationId: string;
1478
+ environment: "production" | "sandbox";
1479
+ }, {
1480
+ provider: "square";
1481
+ applicationId: string;
1482
+ locationId: string;
1483
+ environment: "production" | "sandbox";
1484
+ }>>>;
1485
+ /**
1486
+ * Whether a MONTHLY gift can be taken (`POST /orgs/{slug}/donations/monthly`): the monastery's
1487
+ * Square connection has agreed to keeping a card and charging it each month. False for a
1488
+ * connection made before monthly gifts existed, until an Admin connects again.
1489
+ */
1490
+ monthly: z.ZodDefault<z.ZodBoolean>;
1491
+ }, "strip", z.ZodTypeAny, {
1492
+ card: {
1493
+ provider: "square";
1494
+ applicationId: string;
1495
+ locationId: string;
1496
+ environment: "production" | "sandbox";
1497
+ } | null;
1498
+ currency: string | null;
1499
+ available: boolean;
1500
+ monthly: boolean;
1501
+ }, {
1502
+ currency: string | null;
1503
+ available: boolean;
1504
+ card?: {
1505
+ provider: "square";
1506
+ applicationId: string;
1507
+ locationId: string;
1508
+ environment: "production" | "sandbox";
1509
+ } | null | undefined;
1510
+ monthly?: boolean | undefined;
1511
+ }>;
1512
+ export type GivingAvailability = z.infer<typeof givingAvailabilitySchema>;
1513
+ declare const donationStartedSchema: z.ZodObject<{
1514
+ url: z.ZodString;
1515
+ donationId: z.ZodString;
1516
+ }, "strip", z.ZodTypeAny, {
1517
+ url: string;
1518
+ donationId: string;
1519
+ }, {
1520
+ url: string;
1521
+ donationId: string;
1522
+ }>;
1523
+ export type DonationStarted = z.infer<typeof donationStartedSchema>;
1524
+ declare const cardDonationInput: z.ZodObject<z.objectUtil.extendShape<Omit<{
1525
+ amountCents: z.ZodNumber;
1526
+ currency: z.ZodOptional<z.ZodString>;
1527
+ name: z.ZodOptional<z.ZodString>;
1528
+ email: z.ZodOptional<z.ZodString>;
1529
+ /** Read out or written on a wall: "in memory of…". Never required. */
1530
+ dedication: z.ZodOptional<z.ZodString>;
1531
+ /**
1532
+ * A PATH on the monastery's own site, never a URL.
1533
+ *
1534
+ * The full address is built by the API from the monastery's own public base, so a caller
1535
+ * cannot name where the provider sends somebody afterwards. Taking a URL here would be an
1536
+ * open redirect wearing a payment page's clothes.
1537
+ */
1538
+ returnPath: z.ZodOptional<z.ZodString>;
1539
+ }, "returnPath">, {
1540
+ /** The card box's token (Square's `cnon:…`): for one payment, never stored. */
1541
+ sourceId: z.ZodString;
1542
+ /**
1543
+ * The box's answer to the card's bank asking the buyer to confirm (Square's
1544
+ * `verifyBuyer`), where the bank asked. Passed through with the payment.
1545
+ */
1546
+ verificationToken: z.ZodOptional<z.ZodString>;
1547
+ }>, "strict", z.ZodTypeAny, {
1548
+ sourceId: string;
1549
+ amountCents: number;
1550
+ name?: string | undefined;
1551
+ email?: string | undefined;
1552
+ verificationToken?: string | undefined;
1553
+ currency?: string | undefined;
1554
+ dedication?: string | undefined;
1555
+ }, {
1556
+ sourceId: string;
1557
+ amountCents: number;
1558
+ name?: string | undefined;
1559
+ email?: string | undefined;
1560
+ verificationToken?: string | undefined;
1561
+ currency?: string | undefined;
1562
+ dedication?: string | undefined;
1563
+ }>;
1564
+ export type CardDonationInput = z.infer<typeof cardDonationInput>;
1565
+ declare const cardDonationSchema: z.ZodObject<{
1566
+ donationId: z.ZodString;
1567
+ status: z.ZodEnum<[
1568
+ "PAID",
1569
+ "PENDING"
1570
+ ]>;
1571
+ }, "strip", z.ZodTypeAny, {
1572
+ status: "PENDING" | "PAID";
1573
+ donationId: string;
1574
+ }, {
1575
+ status: "PENDING" | "PAID";
1576
+ donationId: string;
1577
+ }>;
1578
+ export type CardDonation = z.infer<typeof cardDonationSchema>;
1579
+ declare const monthlyDonationInput: z.ZodObject<z.objectUtil.extendShape<Omit<{
1580
+ amountCents: z.ZodNumber;
1581
+ currency: z.ZodOptional<z.ZodString>;
1582
+ name: z.ZodOptional<z.ZodString>;
1583
+ email: z.ZodOptional<z.ZodString>;
1584
+ /** Read out or written on a wall: "in memory of…". Never required. */
1585
+ dedication: z.ZodOptional<z.ZodString>;
1586
+ /**
1587
+ * A PATH on the monastery's own site, never a URL.
1588
+ *
1589
+ * The full address is built by the API from the monastery's own public base, so a caller
1590
+ * cannot name where the provider sends somebody afterwards. Taking a URL here would be an
1591
+ * open redirect wearing a payment page's clothes.
1592
+ */
1593
+ returnPath: z.ZodOptional<z.ZodString>;
1594
+ }, "name" | "email" | "returnPath">, {
1595
+ name: z.ZodString;
1596
+ email: z.ZodString;
1597
+ /** The card box's token (Square's `cnon:…`): kept by Square as the card on file, never here. */
1598
+ sourceId: z.ZodString;
1599
+ /** The box's `verifyBuyer` answer for keeping a card (intent STORE), where the bank asked. */
1600
+ verificationToken: z.ZodOptional<z.ZodString>;
1601
+ }>, "strict", z.ZodTypeAny, {
1602
+ name: string;
1603
+ email: string;
1604
+ sourceId: string;
1605
+ amountCents: number;
1606
+ verificationToken?: string | undefined;
1607
+ currency?: string | undefined;
1608
+ dedication?: string | undefined;
1609
+ }, {
1610
+ name: string;
1611
+ email: string;
1612
+ sourceId: string;
1613
+ amountCents: number;
1614
+ verificationToken?: string | undefined;
1615
+ currency?: string | undefined;
1616
+ dedication?: string | undefined;
1617
+ }>;
1618
+ export type MonthlyDonationInput = z.infer<typeof monthlyDonationInput>;
1619
+ declare const monthlyStartedSchema: z.ZodObject<{
1620
+ monthlyGiftId: z.ZodString;
1621
+ status: z.ZodLiteral<"ACTIVE">;
1622
+ }, "strip", z.ZodTypeAny, {
1623
+ status: "ACTIVE";
1624
+ monthlyGiftId: string;
1625
+ }, {
1626
+ status: "ACTIVE";
1627
+ monthlyGiftId: string;
1628
+ }>;
1629
+ export type MonthlyStarted = z.infer<typeof monthlyStartedSchema>;
1630
+ declare const monthlyGiftSchema: z.ZodObject<{
1631
+ status: z.ZodEnum<[
1632
+ "ACTIVE",
1633
+ "STOPPED"
1634
+ ]>;
1635
+ amountCents: z.ZodNumber;
1636
+ currency: z.ZodString;
1637
+ dedication: z.ZodNullable<z.ZodString>;
1638
+ monastery: z.ZodObject<{
1639
+ name: z.ZodString;
1640
+ slug: z.ZodString;
1641
+ }, "strip", z.ZodTypeAny, {
1642
+ slug: string;
1643
+ name: string;
1644
+ }, {
1645
+ slug: string;
1646
+ name: string;
1647
+ }>;
1648
+ startedAt: z.ZodNullable<z.ZodString>;
1649
+ stoppedAt: z.ZodNullable<z.ZodString>;
1650
+ }, "strip", z.ZodTypeAny, {
1651
+ status: "ACTIVE" | "STOPPED";
1652
+ amountCents: number;
1653
+ currency: string;
1654
+ dedication: string | null;
1655
+ monastery: {
1656
+ slug: string;
1657
+ name: string;
1658
+ };
1659
+ startedAt: string | null;
1660
+ stoppedAt: string | null;
1661
+ }, {
1662
+ status: "ACTIVE" | "STOPPED";
1663
+ amountCents: number;
1664
+ currency: string;
1665
+ dedication: string | null;
1666
+ monastery: {
1667
+ slug: string;
1668
+ name: string;
1669
+ };
1670
+ startedAt: string | null;
1671
+ stoppedAt: string | null;
1672
+ }>;
1673
+ export type MonthlyGift = z.infer<typeof monthlyGiftSchema>;
1674
+ declare const POST_BODY_FORMATS: readonly [
1675
+ "html",
1676
+ "json",
1677
+ "text"
1678
+ ];
1679
+ export type PostBodyFormat = (typeof POST_BODY_FORMATS)[number];
1680
+ declare const publicPostSourceSchema: z.ZodObject<{
1681
+ org: z.ZodString;
1682
+ author: z.ZodNullable<z.ZodString>;
1683
+ }, "strip", z.ZodTypeAny, {
1684
+ org: string;
1685
+ author: string | null;
1686
+ }, {
1687
+ org: string;
1688
+ author: string | null;
1689
+ }>;
1690
+ declare const publicCoverSchema: z.ZodObject<Omit<{
1691
+ url: z.ZodString;
1692
+ alt: z.ZodString;
1693
+ caption: z.ZodNullable<z.ZodString>;
1694
+ width: z.ZodNumber;
1695
+ height: z.ZodNumber;
1696
+ }, "caption">, "strip", z.ZodTypeAny, {
1697
+ alt: string;
1698
+ url: string;
1699
+ width: number;
1700
+ height: number;
1701
+ }, {
1702
+ alt: string;
1703
+ url: string;
1704
+ width: number;
1705
+ height: number;
1706
+ }>;
1707
+ declare const publicCategorySchema: z.ZodObject<{
1708
+ slug: z.ZodString;
1709
+ name: z.ZodString;
1710
+ }, "strip", z.ZodTypeAny, {
1711
+ slug: string;
1712
+ name: string;
1713
+ }, {
1714
+ slug: string;
1715
+ name: string;
1716
+ }>;
1717
+ declare const publicPostSummarySchema: z.ZodObject<{
1718
+ slug: z.ZodString;
1719
+ title: z.ZodString;
1720
+ summary: z.ZodNullable<z.ZodString>;
1721
+ publishedAt: z.ZodNullable<z.ZodString>;
1722
+ cover: z.ZodNullable<z.ZodObject<Omit<{
1723
+ url: z.ZodString;
1724
+ alt: z.ZodString;
1725
+ caption: z.ZodNullable<z.ZodString>;
1726
+ width: z.ZodNumber;
1727
+ height: z.ZodNumber;
1728
+ }, "caption">, "strip", z.ZodTypeAny, {
1729
+ alt: string;
1730
+ url: string;
1731
+ width: number;
1732
+ height: number;
1733
+ }, {
1734
+ alt: string;
1735
+ url: string;
1736
+ width: number;
1737
+ height: number;
1738
+ }>>;
1739
+ category: z.ZodNullable<z.ZodObject<{
1740
+ slug: z.ZodString;
1741
+ name: z.ZodString;
1742
+ }, "strip", z.ZodTypeAny, {
1743
+ slug: string;
1744
+ name: string;
1745
+ }, {
1746
+ slug: string;
1747
+ name: string;
1748
+ }>>;
1749
+ source: z.ZodOptional<z.ZodObject<{
1750
+ org: z.ZodString;
1751
+ author: z.ZodNullable<z.ZodString>;
1752
+ }, "strip", z.ZodTypeAny, {
1753
+ org: string;
1754
+ author: string | null;
1755
+ }, {
1756
+ org: string;
1757
+ author: string | null;
1758
+ }>>;
1759
+ }, "strip", z.ZodTypeAny, {
1760
+ slug: string;
1761
+ title: string;
1762
+ summary: string | null;
1763
+ category: {
1764
+ slug: string;
1765
+ name: string;
1766
+ } | null;
1767
+ cover: {
1768
+ alt: string;
1769
+ url: string;
1770
+ width: number;
1771
+ height: number;
1772
+ } | null;
1773
+ publishedAt: string | null;
1774
+ source?: {
1775
+ org: string;
1776
+ author: string | null;
1777
+ } | undefined;
1778
+ }, {
1779
+ slug: string;
1780
+ title: string;
1781
+ summary: string | null;
1782
+ category: {
1783
+ slug: string;
1784
+ name: string;
1785
+ } | null;
1786
+ cover: {
1787
+ alt: string;
1788
+ url: string;
1789
+ width: number;
1790
+ height: number;
1791
+ } | null;
1792
+ publishedAt: string | null;
1793
+ source?: {
1794
+ org: string;
1795
+ author: string | null;
1796
+ } | undefined;
1797
+ }>;
1798
+ declare const publicPostSchema: z.ZodObject<z.objectUtil.extendShape<{
1799
+ slug: z.ZodString;
1800
+ title: z.ZodString;
1801
+ summary: z.ZodNullable<z.ZodString>;
1802
+ publishedAt: z.ZodNullable<z.ZodString>;
1803
+ cover: z.ZodNullable<z.ZodObject<Omit<{
1804
+ url: z.ZodString;
1805
+ alt: z.ZodString;
1806
+ caption: z.ZodNullable<z.ZodString>;
1807
+ width: z.ZodNumber;
1808
+ height: z.ZodNumber;
1809
+ }, "caption">, "strip", z.ZodTypeAny, {
1810
+ alt: string;
1811
+ url: string;
1812
+ width: number;
1813
+ height: number;
1814
+ }, {
1815
+ alt: string;
1816
+ url: string;
1817
+ width: number;
1818
+ height: number;
1819
+ }>>;
1820
+ category: z.ZodNullable<z.ZodObject<{
1821
+ slug: z.ZodString;
1822
+ name: z.ZodString;
1823
+ }, "strip", z.ZodTypeAny, {
1824
+ slug: string;
1825
+ name: string;
1826
+ }, {
1827
+ slug: string;
1828
+ name: string;
1829
+ }>>;
1830
+ source: z.ZodOptional<z.ZodObject<{
1831
+ org: z.ZodString;
1832
+ author: z.ZodNullable<z.ZodString>;
1833
+ }, "strip", z.ZodTypeAny, {
1834
+ org: string;
1835
+ author: string | null;
1836
+ }, {
1837
+ org: string;
1838
+ author: string | null;
1839
+ }>>;
1840
+ }, {
1841
+ body: z.ZodObject<{
1842
+ html: z.ZodOptional<z.ZodString>;
1843
+ json: z.ZodOptional<z.ZodUnknown>;
1844
+ text: z.ZodOptional<z.ZodString>;
1845
+ }, "strip", z.ZodTypeAny, {
1846
+ text?: string | undefined;
1847
+ html?: string | undefined;
1848
+ json?: unknown;
1849
+ }, {
1850
+ text?: string | undefined;
1851
+ html?: string | undefined;
1852
+ json?: unknown;
1853
+ }>;
1854
+ }>, "strip", z.ZodTypeAny, {
1855
+ slug: string;
1856
+ title: string;
1857
+ summary: string | null;
1858
+ category: {
1859
+ slug: string;
1860
+ name: string;
1861
+ } | null;
1862
+ cover: {
1863
+ alt: string;
1864
+ url: string;
1865
+ width: number;
1866
+ height: number;
1867
+ } | null;
1868
+ publishedAt: string | null;
1869
+ body: {
1870
+ text?: string | undefined;
1871
+ html?: string | undefined;
1872
+ json?: unknown;
1873
+ };
1874
+ source?: {
1875
+ org: string;
1876
+ author: string | null;
1877
+ } | undefined;
1878
+ }, {
1879
+ slug: string;
1880
+ title: string;
1881
+ summary: string | null;
1882
+ category: {
1883
+ slug: string;
1884
+ name: string;
1885
+ } | null;
1886
+ cover: {
1887
+ alt: string;
1888
+ url: string;
1889
+ width: number;
1890
+ height: number;
1891
+ } | null;
1892
+ publishedAt: string | null;
1893
+ body: {
1894
+ text?: string | undefined;
1895
+ html?: string | undefined;
1896
+ json?: unknown;
1897
+ };
1898
+ source?: {
1899
+ org: string;
1900
+ author: string | null;
1901
+ } | undefined;
1902
+ }>;
1903
+ declare const publicPostListSchema: z.ZodObject<{
1904
+ posts: z.ZodArray<z.ZodObject<{
1905
+ slug: z.ZodString;
1906
+ title: z.ZodString;
1907
+ summary: z.ZodNullable<z.ZodString>;
1908
+ publishedAt: z.ZodNullable<z.ZodString>;
1909
+ cover: z.ZodNullable<z.ZodObject<Omit<{
1910
+ url: z.ZodString;
1911
+ alt: z.ZodString;
1912
+ caption: z.ZodNullable<z.ZodString>;
1913
+ width: z.ZodNumber;
1914
+ height: z.ZodNumber;
1915
+ }, "caption">, "strip", z.ZodTypeAny, {
1916
+ alt: string;
1917
+ url: string;
1918
+ width: number;
1919
+ height: number;
1920
+ }, {
1921
+ alt: string;
1922
+ url: string;
1923
+ width: number;
1924
+ height: number;
1925
+ }>>;
1926
+ category: z.ZodNullable<z.ZodObject<{
1927
+ slug: z.ZodString;
1928
+ name: z.ZodString;
1929
+ }, "strip", z.ZodTypeAny, {
1930
+ slug: string;
1931
+ name: string;
1932
+ }, {
1933
+ slug: string;
1934
+ name: string;
1935
+ }>>;
1936
+ source: z.ZodOptional<z.ZodObject<{
1937
+ org: z.ZodString;
1938
+ author: z.ZodNullable<z.ZodString>;
1939
+ }, "strip", z.ZodTypeAny, {
1940
+ org: string;
1941
+ author: string | null;
1942
+ }, {
1943
+ org: string;
1944
+ author: string | null;
1945
+ }>>;
1946
+ }, "strip", z.ZodTypeAny, {
1947
+ slug: string;
1948
+ title: string;
1949
+ summary: string | null;
1950
+ category: {
1951
+ slug: string;
1952
+ name: string;
1953
+ } | null;
1954
+ cover: {
1955
+ alt: string;
1956
+ url: string;
1957
+ width: number;
1958
+ height: number;
1959
+ } | null;
1960
+ publishedAt: string | null;
1961
+ source?: {
1962
+ org: string;
1963
+ author: string | null;
1964
+ } | undefined;
1965
+ }, {
1966
+ slug: string;
1967
+ title: string;
1968
+ summary: string | null;
1969
+ category: {
1970
+ slug: string;
1971
+ name: string;
1972
+ } | null;
1973
+ cover: {
1974
+ alt: string;
1975
+ url: string;
1976
+ width: number;
1977
+ height: number;
1978
+ } | null;
1979
+ publishedAt: string | null;
1980
+ source?: {
1981
+ org: string;
1982
+ author: string | null;
1983
+ } | undefined;
1984
+ }>, "many">;
1985
+ page: z.ZodNumber;
1986
+ pageCount: z.ZodNumber;
1987
+ total: z.ZodNumber;
1988
+ }, "strip", z.ZodTypeAny, {
1989
+ posts: {
1990
+ slug: string;
1991
+ title: string;
1992
+ summary: string | null;
1993
+ category: {
1994
+ slug: string;
1995
+ name: string;
1996
+ } | null;
1997
+ cover: {
1998
+ alt: string;
1999
+ url: string;
2000
+ width: number;
2001
+ height: number;
2002
+ } | null;
2003
+ publishedAt: string | null;
2004
+ source?: {
2005
+ org: string;
2006
+ author: string | null;
2007
+ } | undefined;
2008
+ }[];
2009
+ page: number;
2010
+ pageCount: number;
2011
+ total: number;
2012
+ }, {
2013
+ posts: {
2014
+ slug: string;
2015
+ title: string;
2016
+ summary: string | null;
2017
+ category: {
2018
+ slug: string;
2019
+ name: string;
2020
+ } | null;
2021
+ cover: {
2022
+ alt: string;
2023
+ url: string;
2024
+ width: number;
2025
+ height: number;
2026
+ } | null;
2027
+ publishedAt: string | null;
2028
+ source?: {
2029
+ org: string;
2030
+ author: string | null;
2031
+ } | undefined;
2032
+ }[];
2033
+ page: number;
2034
+ pageCount: number;
2035
+ total: number;
2036
+ }>;
2037
+ declare const publicCategoryListSchema: z.ZodObject<{
2038
+ categories: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
2039
+ slug: z.ZodString;
2040
+ name: z.ZodString;
2041
+ }, {
2042
+ postCount: z.ZodNumber;
2043
+ }>, "strip", z.ZodTypeAny, {
2044
+ slug: string;
2045
+ name: string;
2046
+ postCount: number;
2047
+ }, {
2048
+ slug: string;
2049
+ name: string;
2050
+ postCount: number;
2051
+ }>, "many">;
2052
+ }, "strip", z.ZodTypeAny, {
2053
+ categories: {
2054
+ slug: string;
2055
+ name: string;
2056
+ postCount: number;
2057
+ }[];
2058
+ }, {
2059
+ categories: {
2060
+ slug: string;
2061
+ name: string;
2062
+ postCount: number;
2063
+ }[];
2064
+ }>;
2065
+ export type PublicCover = z.infer<typeof publicCoverSchema>;
2066
+ export type PublicCategory = z.infer<typeof publicCategorySchema>;
2067
+ export type PublicCategoryList = z.infer<typeof publicCategoryListSchema>;
2068
+ export type PublicPostSource = z.infer<typeof publicPostSourceSchema>;
2069
+ export type PublicPostSummary = z.infer<typeof publicPostSummarySchema>;
2070
+ export type PublicPost = z.infer<typeof publicPostSchema>;
2071
+ export type PublicPostList = z.infer<typeof publicPostListSchema>;
2072
+ declare const publicSiteSchema: z.ZodObject<{
2073
+ slug: z.ZodString;
2074
+ name: z.ZodString;
2075
+ }, "strip", z.ZodTypeAny, {
2076
+ slug: string;
2077
+ name: string;
2078
+ }, {
2079
+ slug: string;
2080
+ name: string;
2081
+ }>;
2082
+ export type PublicSite = z.infer<typeof publicSiteSchema>;
2083
+ /**
2084
+ * The client a monastery's own site uses to read its blog, events and galleries, and to book
2085
+ * and give through.
2086
+ *
2087
+ * **Not generated from the OpenAPI document**, and that is deliberate. The document is itself
2088
+ * generated from the Zod schemas in `@mwam/schemas`; a generated client would be a copy of a
2089
+ * copy, with a build step to keep in step and a window where it is stale. This imports those
2090
+ * same schemas, so a change to the contract is a typecheck failure here rather than a runtime
2091
+ * surprise on somebody's site.
2092
+ *
2093
+ * It also **validates what comes back**. A consumer that renders unparsed JSON finds out
2094
+ * about a contract change as `undefined` deep inside a template, usually in production. Here
2095
+ * it is one error, at the boundary, naming the field.
2096
+ */
2097
+ export declare class MwamError extends Error {
2098
+ readonly code: string;
2099
+ readonly status?: number | undefined;
2100
+ constructor(code: string, message: string, status?: number | undefined, cause?: unknown);
2101
+ }
2102
+ /** Where mwam-apps' API lives. A client given no `baseUrl` talks to it. */
2103
+ export declare const DEFAULT_BASE_URL = "https://apps-api.meditatewithamonk.org";
2104
+ export interface ClientOptions {
2105
+ /**
2106
+ * Where the API lives. Defaults to {@link DEFAULT_BASE_URL}; set it only to point at another
2107
+ * copy, a local one say. A trailing slash is fine.
2108
+ */
2109
+ baseUrl?: string;
2110
+ /**
2111
+ * The monastery's slug — `winnipeg`, `wisdom-meditation`. Optional: a key is made for one
2112
+ * monastery, so when this is left out the client asks the API whose key it is
2113
+ * (`GET /v1/site`) on its first call and remembers the answer.
2114
+ */
2115
+ tenant?: string;
2116
+ /** Injected so a framework's own caching fetch can be used. Defaults to the global one. */
2117
+ fetch?: typeof globalThis.fetch;
2118
+ /** Seconds a response may be reused. Passed through as a Next.js-style revalidate hint. */
2119
+ revalidate?: number;
2120
+ /**
2121
+ * This website's key, made by an Admin in Monastery settings (`mwam_sk_…`). Sent on every
2122
+ * request as `Authorization: Bearer …`, and REQUIRED: a monastery's posts, events and
2123
+ * galleries are read by its own website and nobody else. **Server-side only**: a key in a
2124
+ * browser bundle is a key anybody has. It also lets `register` and `give` pass on who the
2125
+ * visitor is (`visitor`), so each visitor has their own rate limit rather than the whole
2126
+ * site sharing one. A missing, withdrawn or wrong key is refused on every call.
2127
+ */
2128
+ apiKey: string;
2129
+ }
2130
+ /** Who is booking or giving: the visitor's own address, as the site's server saw it. */
2131
+ export interface VisitorOptions {
2132
+ /** An IPv4 or IPv6 address, as the site's server saw the visitor. */
2133
+ visitor?: string;
2134
+ }
2135
+ export interface PostPageQuery {
2136
+ /** Which page, from 1 (the default). A page past the last is empty, with the true `total`. */
2137
+ page?: number;
2138
+ /** How many posts a page holds, at most 50 (the default). A larger number is reduced to 50. */
2139
+ limit?: number;
2140
+ /**
2141
+ * Words to find in the title, summary and body, as a reader types them: quotes for a
2142
+ * phrase, a leading minus to leave a word out. Results come best match first. An empty
2143
+ * string is no search.
2144
+ */
2145
+ q?: string;
2146
+ /** A category's `slug`, from `listCategories()`. */
2147
+ category?: string;
2148
+ /** Posts published at or after this instant. A string must carry its offset. */
2149
+ from?: Date | string;
2150
+ /** Posts published before this instant. */
2151
+ to?: Date | string;
2152
+ }
2153
+ export interface PostQuery {
2154
+ /**
2155
+ * Which representations of the body to fetch: `html` (the default), `text`, `json`. `text`
2156
+ * is what a search index or a meta description wants; `json` is the structured document,
2157
+ * for a site that renders it itself.
2158
+ */
2159
+ format?: readonly PostBodyFormat[];
2160
+ }
2161
+ export interface SessionQuery {
2162
+ /** Dates from this instant onwards. Defaults, server-side, to now. */
2163
+ from?: Date | string;
2164
+ limit?: number;
2165
+ category?: string;
2166
+ }
2167
+ export declare function createClient({ baseUrl, tenant, fetch: given, revalidate, apiKey }: ClientOptions): {
2168
+ /**
2169
+ * The monastery this client's key belongs to, `{ slug, name }`. The client asks for it on
2170
+ * its own when it was not given a `tenant`; a site can also use it for its name.
2171
+ */
2172
+ site: () => Promise<PublicSite>;
2173
+ /**
2174
+ * One page of the monastery's blog: its own posts and the posts other monasteries share
2175
+ * with it, newest first by the date it publishes each under — or best match first, when
2176
+ * searching. Each comes with its cover and category; no bodies — fetch a post to read it.
2177
+ *
2178
+ * `total` and `pageCount` count what was asked for, search and filters included, so a
2179
+ * pager can say "Page 2 of 4" of the search results themselves.
2180
+ */
2181
+ listPosts({ page, limit, q, category, from, to }?: PostPageQuery): Promise<PublicPostList>;
2182
+ /**
2183
+ * The categories the blog has published posts in, by name, each with how many — what a
2184
+ * filter offers. A category with nothing published is not in it.
2185
+ */
2186
+ listCategories(): Promise<PublicCategoryList["categories"]>;
2187
+ /**
2188
+ * One post, as this monastery publishes it: a post shared from elsewhere carries this
2189
+ * monastery's title, summary, address, date and cover, and `source` when its author's
2190
+ * monastery asked to be credited. `body.html` goes into a page as it is — the service rendered it
2191
+ * from a closed set of elements, escaped, with every picture's address absolute. Throws
2192
+ * `not_found` for a draft, a withdrawn post and an address nothing is at alike.
2193
+ */
2194
+ getPost(slug: string, { format }?: PostQuery): Promise<PublicPost>;
2195
+ /**
2196
+ * The monastery's dates, soonest first — what an /events index page is. SESSIONS, not
2197
+ * events: three dates are three rows even when two belong to one programme.
2198
+ */
2199
+ listSessions(query?: SessionQuery): Promise<PublicSessionRow[]>;
2200
+ /** One event, with every date it has. Throws `not_found` for an address nothing is at. */
2201
+ getEvent(slug: string): Promise<PublicEventDetail>;
2202
+ /**
2203
+ * The monastery's series that have something on the site — for a menu, or an index of
2204
+ * programmes. A series with nothing published is not in it.
2205
+ */
2206
+ listSeries(): Promise<PublicSeriesList["series"]>;
2207
+ /**
2208
+ * One series page — what the middle of `Home > Meditate With A Monk > Plainsboro` links
2209
+ * to — with each published event in it and that event's next date. Throws `not_found`
2210
+ * when nothing in it is published.
2211
+ */
2212
+ getSeries(slug: string): Promise<PublicSeries>;
2213
+ /** The monastery's published galleries, most recent first, each with its cover. */
2214
+ listGalleries(query?: {
2215
+ limit?: number;
2216
+ }): Promise<PublicGallerySummary[]>;
2217
+ /**
2218
+ * One gallery, every picture in order. Each `url` is absolute and each `alt` is present —
2219
+ * a gallery cannot be published until every picture is described — so an `<img>` needs
2220
+ * nothing added.
2221
+ */
2222
+ getGallery(slug: string): Promise<PublicGallery>;
2223
+ /**
2224
+ * Takes a place at one date.
2225
+ *
2226
+ * A full date answers WAITLISTED rather than throwing: it is a different outcome, not an
2227
+ * error, and a site that treated it as one would tell somebody their booking failed when
2228
+ * they are in fact next in line. **Check `status`.**
2229
+ *
2230
+ * The person's link to their booking reaches them by email, and only by email: the answer
2231
+ * carries no token (since 0.4.0). An address that had already booked the date is answered
2232
+ * as a newcomer would be — `status` is what a new booking gets now — and is sent an email
2233
+ * saying how things really stand, so this cannot be used to ask who has booked.
2234
+ *
2235
+ * A date whose event's `pricing` is DONATION takes `card` — the card box's token, the box
2236
+ * started with what `giving()` answers as `card` — and `amountCents`, at least the event's
2237
+ * `priceCents` for each place. The card is held, the place taken, and only then is the money
2238
+ * taken: a full date throws (`conflict`, 409) with nothing taken, never waitlisting; a
2239
+ * refused card throws `declined` (402) whose message is for the person. The confirmation
2240
+ * email is their receipt.
2241
+ */
2242
+ register(sessionId: string, who: {
2243
+ name: string;
2244
+ email: string;
2245
+ seats?: number;
2246
+ card?: {
2247
+ sourceId: string;
2248
+ verificationToken?: string;
2249
+ };
2250
+ amountCents?: number;
2251
+ }, { visitor }?: VisitorOptions): Promise<Taken>;
2252
+ /**
2253
+ * Signs somebody up once for every date of an event whose `signUp` is ALL_DATES — the
2254
+ * dates it has and any added later; booking one of its dates with `register` is refused.
2255
+ *
2256
+ * The same rules as `register`: WAITLISTED when it is full, **check `status`**; an address
2257
+ * already signed up is answered as a newcomer would be and emailed how things stand. The
2258
+ * email carries the person's own page, which is where they leave.
2259
+ */
2260
+ signUp(eventSlug: string, who: {
2261
+ name: string;
2262
+ email: string;
2263
+ }, { visitor }?: VisitorOptions): Promise<SignedUp>;
2264
+ /** One booking, by the token from its link. */
2265
+ booking(token: string): Promise<Booking>;
2266
+ /** Gives the place back. Whoever is next and fits is confirmed and written to at once. */
2267
+ cancelBooking(token: string): Promise<void>;
2268
+ /**
2269
+ * Whether the monastery can take a gift online right now, and the currency it takes one
2270
+ * in. Ask before drawing a gift form: a monastery whose Admin has not connected its
2271
+ * payment account yet answers `available: false`, and a form shown then could only fail.
2272
+ *
2273
+ * `card` is what to start Square's card box with to take the gift on your own page
2274
+ * (`giveByCard`): `Square.payments(card.applicationId, card.locationId)`, from
2275
+ * `web.squarecdn.com` — or `sandbox.web.squarecdn.com` when `card.environment` says so.
2276
+ * Null when only Square's own page can take a gift (`give`).
2277
+ */
2278
+ giving(): Promise<GivingAvailability>;
2279
+ /**
2280
+ * Starts a gift and answers with the provider's page to send the donor to. Nothing is
2281
+ * paid until the provider says so; the page the donor comes back to proves nothing.
2282
+ * `returnPath` is a path on the monastery's own site, never a URL.
2283
+ */
2284
+ give(gift: DonationInput, { visitor }?: VisitorOptions): Promise<DonationStarted>;
2285
+ /**
2286
+ * Takes a gift on your own page: nobody leaves it. Square's card box there, started with
2287
+ * `card` from `giving()`, turns the card into a one-use token (`sourceId`) — and
2288
+ * `verifyBuyer`'s answer, where the bank asked, is `verificationToken`. Send them from
2289
+ * YOUR SERVER, with the amount; the card number itself never reaches you or the API.
2290
+ *
2291
+ * Answers `PAID` — settled, the receipt has gone — or, rarely, `PENDING`: Square is still
2292
+ * deciding, and it settles itself. A refused card throws `MwamError` with code `declined`
2293
+ * and a message written for the donor; show it, and ask for the card again.
2294
+ *
2295
+ * Sending the same token again — after a timeout, say — never pays twice: it answers with
2296
+ * how the first try ended.
2297
+ */
2298
+ giveByCard(gift: CardDonationInput, { visitor }?: VisitorOptions): Promise<CardDonation>;
2299
+ /**
2300
+ * Starts a monthly gift, on your own page. Ask `giving()` first: `monthly` says whether the
2301
+ * monastery's Square connection can keep a card. The card box is started with `card` from
2302
+ * `giving()`, as for `giveByCard`; ask `verifyBuyer` with intent `STORE` and pass its token.
2303
+ * Square keeps the card in the monastery's own account and charges it each month; each
2304
+ * month is receipted like any gift, and the donor is emailed their own link to stop it —
2305
+ * your page at `/give/monthly/{token}` (see `monthlyGift` and `stopMonthlyGift`).
2306
+ *
2307
+ * A refused card throws `MwamError` with code `declined` and a message for the donor. The
2308
+ * same token sent again never starts a second gift.
2309
+ */
2310
+ giveMonthly(gift: MonthlyDonationInput, { visitor }?: VisitorOptions): Promise<MonthlyStarted>;
2311
+ /** A monthly gift, by the token in its donor's link — for your `/give/monthly/{token}` page. */
2312
+ monthlyGift(token: string): Promise<MonthlyGift>;
2313
+ /** Stops it: nothing more is taken after the month already paid, and the donor is told. */
2314
+ stopMonthlyGift(token: string): Promise<MonthlyGift>;
2315
+ };
2316
+ declare const takenSchema: z.ZodObject<{
2317
+ status: z.ZodEnum<[
2318
+ "CONFIRMED",
2319
+ "WAITLISTED"
2320
+ ]>;
2321
+ seats: z.ZodNumber;
2322
+ }, "strip", z.ZodTypeAny, {
2323
+ status: "CONFIRMED" | "WAITLISTED";
2324
+ seats: number;
2325
+ }, {
2326
+ status: "CONFIRMED" | "WAITLISTED";
2327
+ seats: number;
2328
+ }>;
2329
+ export type Taken = z.infer<typeof takenSchema>;
2330
+ export type SignedUp = z.infer<typeof signedUpSchema>;
2331
+ /**
2332
+ * One session as `schema.org/Event`, ready for a `<script type="application/ld+json">`.
2333
+ *
2334
+ * This is the whole reason the payload is shaped the way it is: every field here is copied,
2335
+ * none is computed. `startsAt` already carries its offset, and the address is already in
2336
+ * parts, so there is nothing to derive and therefore nothing to get wrong.
2337
+ *
2338
+ * It belongs on the TENANT's page and not on ours — Google must see it on the monastery's own
2339
+ * domain, which is exactly why events are served as JSON rather than as an embedded fragment.
2340
+ */
2341
+ export declare function eventJsonLd(session: PublicSession, event: Pick<PublicEventDetail, "title" | "summary" | "attendance" | "priceCents" | "priceCurrency" | "registrationUrl"> & Partial<Pick<PublicEventDetail, "series">>, opts?: {
2342
+ url: string;
2343
+ organizer?: {
2344
+ name: string;
2345
+ url: string;
2346
+ };
2347
+ /** Where the event's series page lives on the tenant's site. With it, the series is named as the `superEvent`. */
2348
+ seriesUrl?: string;
2349
+ }): Record<string, unknown>;
2350
+
2351
+ export {};