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