@adminiumjs/manifest 0.3.26 → 0.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/app-grants.d.ts +134 -0
  2. package/dist/app-grants.d.ts.map +1 -0
  3. package/dist/app-grants.js +263 -0
  4. package/dist/app-grants.js.map +1 -0
  5. package/dist/automations.d.ts +2172 -56
  6. package/dist/automations.d.ts.map +1 -1
  7. package/dist/automations.js +438 -25
  8. package/dist/automations.js.map +1 -1
  9. package/dist/compose.d.ts.map +1 -1
  10. package/dist/compose.js +3 -0
  11. package/dist/compose.js.map +1 -1
  12. package/dist/documents.d.ts +1 -0
  13. package/dist/documents.d.ts.map +1 -1
  14. package/dist/documents.js +2 -0
  15. package/dist/documents.js.map +1 -1
  16. package/dist/index.d.ts +11 -5
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +10 -4
  19. package/dist/index.js.map +1 -1
  20. package/dist/ledgers.d.ts.map +1 -1
  21. package/dist/ledgers.js +2 -0
  22. package/dist/ledgers.js.map +1 -1
  23. package/dist/modules.d.ts +93 -0
  24. package/dist/modules.d.ts.map +1 -0
  25. package/dist/modules.js +489 -0
  26. package/dist/modules.js.map +1 -0
  27. package/dist/occupies.d.ts +50 -0
  28. package/dist/occupies.d.ts.map +1 -0
  29. package/dist/occupies.js +123 -0
  30. package/dist/occupies.js.map +1 -0
  31. package/dist/outbox.d.ts +223 -17
  32. package/dist/outbox.d.ts.map +1 -1
  33. package/dist/outbox.js +125 -13
  34. package/dist/outbox.js.map +1 -1
  35. package/dist/page-board.d.ts +144 -0
  36. package/dist/page-board.d.ts.map +1 -0
  37. package/dist/page-board.js +280 -0
  38. package/dist/page-board.js.map +1 -0
  39. package/dist/public-access.d.ts +6 -0
  40. package/dist/public-access.d.ts.map +1 -1
  41. package/dist/public-access.js +74 -0
  42. package/dist/public-access.js.map +1 -1
  43. package/dist/rail.d.ts +50 -0
  44. package/dist/rail.d.ts.map +1 -0
  45. package/dist/rail.js +122 -0
  46. package/dist/rail.js.map +1 -0
  47. package/dist/roles.d.ts +647 -1
  48. package/dist/roles.d.ts.map +1 -1
  49. package/dist/roles.js +459 -3
  50. package/dist/roles.js.map +1 -1
  51. package/dist/sample.d.ts +62 -0
  52. package/dist/sample.d.ts.map +1 -1
  53. package/dist/sample.js +203 -4
  54. package/dist/sample.js.map +1 -1
  55. package/dist/schema.d.ts +4277 -169
  56. package/dist/schema.d.ts.map +1 -1
  57. package/dist/schema.js +539 -40
  58. package/dist/schema.js.map +1 -1
  59. package/dist/shapes.d.ts +3 -2
  60. package/dist/shapes.d.ts.map +1 -1
  61. package/dist/shapes.js +76 -7
  62. package/dist/shapes.js.map +1 -1
  63. package/dist/state-actions.d.ts +4 -0
  64. package/dist/state-actions.d.ts.map +1 -1
  65. package/dist/state-actions.js +7 -0
  66. package/dist/state-actions.js.map +1 -1
  67. package/dist/states.d.ts +20 -1
  68. package/dist/states.d.ts.map +1 -1
  69. package/dist/states.js +47 -5
  70. package/dist/states.js.map +1 -1
  71. package/dist/validate.d.ts.map +1 -1
  72. package/dist/validate.js +41 -0
  73. package/dist/validate.js.map +1 -1
  74. package/dist/words.d.ts +1 -1
  75. package/dist/words.d.ts.map +1 -1
  76. package/dist/words.js +328 -1
  77. package/dist/words.js.map +1 -1
  78. package/package.json +2 -2
@@ -0,0 +1,123 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ /**
3
+ * `table.occupies` — a row takes a resource for a time: a room for an hour,
4
+ * a van for a morning, a crew for a day. The plain rule beside `booking`.
5
+ *
6
+ * `booking` books people for kinds of visit, with who does what, a grid of
7
+ * start times, a practice's hours and a window. This asks one thing or two:
8
+ *
9
+ * - no two counted rows of one resource overlap (left out with `shared`:
10
+ * a crew does several jobs a day);
11
+ * - with `hours`, the resource has hours that weekday, and a timed row lies
12
+ * inside them. A resource with no row for a weekday does not work it;
13
+ * one with no rows at all keeps no week and is held to none.
14
+ *
15
+ * The time is a start with its minutes or its end, or a whole `day`. A row
16
+ * with no resource, or no time yet, takes nothing and is not judged.
17
+ *
18
+ * A `day` with `until` is a span of whole days, both ends counted: a cover
19
+ * from the 10th until the 14th and one from the 14th on overlap. An empty
20
+ * `until` is a span with no end ("until further notice"). A span is judged
21
+ * for overlap alone, so it has no `hours` and is never `shared`.
22
+ *
23
+ * Every table the rule names sits under a key called `table`, so the
24
+ * installer maps it to the real table.
25
+ */
26
+ import { z } from 'zod';
27
+ import { BOOKING_WEEKDAYS } from './booking.js';
28
+ import { refSchema, valueFits } from './refs.js';
29
+ export const occupiesSchema = z
30
+ .object({
31
+ /** What is taken: a link to the resource's row, or any column that names it. */
32
+ resource: refSchema,
33
+ /** When the row starts: a `timestamptz`, read in the venue's zone. With `minutes` or `end`. */
34
+ start: refSchema.optional(),
35
+ /** How long it lasts: an int column of the row. */
36
+ minutes: refSchema.optional(),
37
+ /** When it ends: a `timestamptz` of the row. */
38
+ end: refSchema.optional(),
39
+ /** Or the whole day it takes: a `date`. */
40
+ day: refSchema.optional(),
41
+ /** With `day`: the last day it takes, a `date` (counted too). Empty in a row: it has no end. */
42
+ until: refSchema.optional(),
43
+ /** Only rows whose column holds one of these take the resource (a cancelled booking takes nothing). */
44
+ countWhere: z.object({ column: refSchema, values: z.array(z.string().min(1)).min(1) }).strict().optional(),
45
+ /** Rows may share the resource's time: only its hours are judged. */
46
+ shared: z.literal(true).optional(),
47
+ /** The resource's week: one row per weekday it works, with `HH:MM` texts when the day has an opening and a closing time. */
48
+ hours: z.object({ table: refSchema, resource: refSchema, weekday: refSchema, opens: refSchema.optional(), closes: refSchema.optional() }).strict().optional(),
49
+ })
50
+ .strict()
51
+ .refine((rule) => (rule.start === undefined) !== (rule.day === undefined), { message: 'the time is a `start` or a whole `day`, one of the two' })
52
+ .refine((rule) => rule.start === undefined || (rule.minutes === undefined) !== (rule.end === undefined), { message: 'a `start` comes with its `minutes` or its `end`, one of the two' })
53
+ .refine((rule) => rule.day === undefined || (rule.minutes === undefined && rule.end === undefined), { message: 'a whole `day` takes no `minutes` and no `end`' })
54
+ .refine((rule) => rule.until === undefined || rule.day !== undefined, { message: '`until` is the last day of a span that starts on a `day`: name the `day`' })
55
+ .refine((rule) => rule.until === undefined || (rule.hours === undefined && rule.shared === undefined), { message: 'a span of days (`until`) is judged for overlap alone: it has no `hours` and is not `shared`' })
56
+ .refine((rule) => rule.shared !== true || rule.hours !== undefined, { message: 'rows that share the time are judged by the resource\'s `hours` alone: name them' })
57
+ .refine((rule) => rule.hours === undefined || (rule.hours.opens === undefined) === (rule.hours.closes === undefined), { message: 'hours name both when the day opens and when it closes, or neither' });
58
+ /** Everything in a table's rule that names something the manifest does not declare, or a column of the wrong kind. */
59
+ export function occupiesIssues(table, rule, index, at) {
60
+ const out = [];
61
+ const here = (...rest) => at('occupies', ...rest);
62
+ const want = (tableRef, column, types, path, what) => {
63
+ if (index.table(tableRef) === undefined) {
64
+ out.push({ path, message: `"${tableRef}" is not a table of this app` });
65
+ return undefined;
66
+ }
67
+ const found = index.column(tableRef, column);
68
+ if (found === undefined) {
69
+ out.push({ path, message: `"${tableRef}" has no column "${column}"` });
70
+ return undefined;
71
+ }
72
+ if (types !== null && !types.includes(found.type)) {
73
+ out.push({ path, message: `"${tableRef}.${column}" must be ${what}` });
74
+ return undefined;
75
+ }
76
+ return found;
77
+ };
78
+ const resource = want(table.ref, rule.resource, null, here('resource'), '');
79
+ if (rule.start !== undefined)
80
+ want(table.ref, rule.start, ['timestamptz'], here('start'), 'a timestamptz');
81
+ if (rule.minutes !== undefined)
82
+ want(table.ref, rule.minutes, ['int', 'bigint'], here('minutes'), 'an int');
83
+ if (rule.end !== undefined)
84
+ want(table.ref, rule.end, ['timestamptz'], here('end'), 'a timestamptz');
85
+ if (rule.day !== undefined)
86
+ want(table.ref, rule.day, ['date'], here('day'), 'a date');
87
+ if (rule.until !== undefined) {
88
+ want(table.ref, rule.until, ['date'], here('until'), 'a date');
89
+ if (rule.until === rule.day)
90
+ out.push({ path: here('until'), message: 'a span\'s last day is kept in a column of its own' });
91
+ }
92
+ if (rule.countWhere !== undefined) {
93
+ const counted = index.column(table.ref, rule.countWhere.column);
94
+ if (counted === undefined)
95
+ out.push({ path: here('countWhere', 'column'), message: `"${table.ref}" has no column "${rule.countWhere.column}"` });
96
+ else
97
+ for (const value of rule.countWhere.values)
98
+ if (!valueFits(counted, value))
99
+ out.push({ path: here('countWhere', 'values'), message: `"${value}" is not a value of "${table.ref}.${counted.ref}"` });
100
+ }
101
+ const hours = rule.hours;
102
+ if (hours !== undefined) {
103
+ const theirs = want(hours.table, hours.resource, null, here('hours', 'resource'), '');
104
+ // The two name the same thing: both links to one table, or two plain columns of one type.
105
+ if (resource !== undefined && theirs !== undefined) {
106
+ const same = resource.type === 'fk' || theirs.type === 'fk' ? resource.type === theirs.type && resource.references === theirs.references : resource.type === theirs.type;
107
+ if (!same)
108
+ out.push({ path: here('hours', 'resource'), message: `"${hours.table}.${hours.resource}" does not name what "${table.ref}.${rule.resource}" names` });
109
+ }
110
+ const weekday = want(hours.table, hours.weekday, ['enum'], here('hours', 'weekday'), `an enum of ${BOOKING_WEEKDAYS.join(', ')}`);
111
+ if (weekday !== undefined && (weekday.enum ?? []).join(',') !== BOOKING_WEEKDAYS.join(','))
112
+ out.push({ path: here('hours', 'weekday'), message: `"${hours.table}.${hours.weekday}" must be an enum of ${BOOKING_WEEKDAYS.join(', ')}` });
113
+ for (const name of ['opens', 'closes']) {
114
+ const column = hours[name];
115
+ if (column !== undefined)
116
+ want(hours.table, column, ['text'], here('hours', name), 'a text column holding HH:MM');
117
+ }
118
+ if (hours.table === table.ref)
119
+ out.push({ path: here('hours', 'table'), message: 'a resource\'s hours are kept in a table of their own' });
120
+ }
121
+ return out;
122
+ }
123
+ //# sourceMappingURL=occupies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occupies.js","sourceRoot":"","sources":["../src/occupies.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;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CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,6BAA6B,CAAC,CAAC;QACpH,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,GAAG;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,sDAAsD,EAAE,CAAC,CAAC;IAC7I,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/dist/outbox.d.ts CHANGED
@@ -9,8 +9,8 @@
9
9
  * a kind already there for the same source is what stops a second send.
10
10
  *
11
11
  * Producers queue rows by themselves: when a row is created, when a column
12
- * changes to a value, or a lead time before a timestamp (a reminder at the
13
- * time each patient chose).
12
+ * changes to a value, when a row is removed, or a lead time before a timestamp
13
+ * (a reminder at the time each patient chose).
14
14
  *
15
15
  * Templates are stored with the app as their owner. An operator who edits
16
16
  * one keeps the edit across the app's updates.
@@ -60,6 +60,7 @@ export declare const outboxProducerSchema: z.ZodUnion<readonly [z.ZodObject<{
60
60
  column: z.ZodString;
61
61
  }, z.core.$strict>;
62
62
  }, z.core.$strict>]>>;
63
+ module: z.ZodOptional<z.ZodString>;
63
64
  optIn: z.ZodOptional<z.ZodLiteral<true>>;
64
65
  hold: z.ZodOptional<z.ZodLiteral<true>>;
65
66
  due: z.ZodOptional<z.ZodObject<{
@@ -107,6 +108,9 @@ export declare const outboxProducerSchema: z.ZodUnion<readonly [z.ZodObject<{
107
108
  name: z.ZodOptional<z.ZodString>;
108
109
  language: z.ZodOptional<z.ZodString>;
109
110
  }, z.core.$strict>]>>;
111
+ replyTo: z.ZodOptional<z.ZodObject<{
112
+ staff: z.ZodString;
113
+ }, z.core.$strict>>;
110
114
  batchMinutes: z.ZodOptional<z.ZodNumber>;
111
115
  holdSeconds: z.ZodOptional<z.ZodNumber>;
112
116
  repeatBy: z.ZodOptional<z.ZodString>;
@@ -157,6 +161,7 @@ export declare const outboxProducerSchema: z.ZodUnion<readonly [z.ZodObject<{
157
161
  column: z.ZodString;
158
162
  }, z.core.$strict>;
159
163
  }, z.core.$strict>]>>;
164
+ module: z.ZodOptional<z.ZodString>;
160
165
  optIn: z.ZodOptional<z.ZodLiteral<true>>;
161
166
  hold: z.ZodOptional<z.ZodLiteral<true>>;
162
167
  due: z.ZodOptional<z.ZodObject<{
@@ -204,6 +209,96 @@ export declare const outboxProducerSchema: z.ZodUnion<readonly [z.ZodObject<{
204
209
  name: z.ZodOptional<z.ZodString>;
205
210
  language: z.ZodOptional<z.ZodString>;
206
211
  }, z.core.$strict>]>>;
212
+ replyTo: z.ZodOptional<z.ZodObject<{
213
+ staff: z.ZodString;
214
+ }, z.core.$strict>>;
215
+ batchMinutes: z.ZodOptional<z.ZodNumber>;
216
+ holdSeconds: z.ZodOptional<z.ZodNumber>;
217
+ repeatBy: z.ZodOptional<z.ZodString>;
218
+ repeat: z.ZodOptional<z.ZodLiteral<true>>;
219
+ was: z.ZodOptional<z.ZodArray<z.ZodString>>;
220
+ onSent: z.ZodOptional<z.ZodObject<{
221
+ table: z.ZodString;
222
+ via: z.ZodOptional<z.ZodString>;
223
+ set: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>>;
224
+ }, z.core.$strict>>;
225
+ }, z.core.$strict>, z.ZodObject<{
226
+ onDelete: z.ZodObject<{
227
+ table: z.ZodString;
228
+ where: z.ZodOptional<z.ZodObject<{
229
+ column: z.ZodString;
230
+ eq: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
231
+ in: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
232
+ isNull: z.ZodOptional<z.ZodBoolean>;
233
+ }, z.core.$strict>>;
234
+ }, z.core.$strict>;
235
+ kind: z.ZodString;
236
+ link: z.ZodString;
237
+ gate: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodObject<{
238
+ setting: z.ZodObject<{
239
+ table: z.ZodString;
240
+ column: z.ZodString;
241
+ }, z.core.$strict>;
242
+ }, z.core.$strict>, z.ZodObject<{
243
+ feature: z.ZodString;
244
+ }, z.core.$strict>, z.ZodObject<{
245
+ feature: z.ZodString;
246
+ setting: z.ZodObject<{
247
+ table: z.ZodString;
248
+ column: z.ZodString;
249
+ }, z.core.$strict>;
250
+ }, z.core.$strict>]>>;
251
+ module: z.ZodOptional<z.ZodString>;
252
+ optIn: z.ZodOptional<z.ZodLiteral<true>>;
253
+ hold: z.ZodOptional<z.ZodLiteral<true>>;
254
+ due: z.ZodOptional<z.ZodObject<{
255
+ date: z.ZodString;
256
+ days: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
257
+ byColumn: z.ZodString;
258
+ values: z.ZodRecord<z.ZodString, z.ZodNumber>;
259
+ }, z.core.$strict>, z.ZodObject<{
260
+ setting: z.ZodUnion<readonly [z.ZodObject<{
261
+ table: z.ZodString;
262
+ column: z.ZodString;
263
+ }, z.core.$strict>, z.ZodObject<{
264
+ addOn: z.ZodString;
265
+ setting: z.ZodString;
266
+ }, z.core.$strict>]>;
267
+ byColumn: z.ZodOptional<z.ZodString>;
268
+ index: z.ZodOptional<z.ZodNumber>;
269
+ }, z.core.$strict>]>;
270
+ at: z.ZodOptional<z.ZodString>;
271
+ }, z.core.$strict>>;
272
+ supersede: z.ZodOptional<z.ZodString>;
273
+ dropWhen: z.ZodOptional<z.ZodArray<z.ZodObject<{
274
+ column: z.ZodString;
275
+ eq: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
276
+ in: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
277
+ isNull: z.ZodOptional<z.ZodBoolean>;
278
+ lte: z.ZodOptional<z.ZodNumber>;
279
+ gte: z.ZodOptional<z.ZodNumber>;
280
+ reason: z.ZodEnum<{
281
+ void: "void";
282
+ paid: "paid";
283
+ "no-longer-needed": "no-longer-needed";
284
+ }>;
285
+ }, z.core.$strict>>>;
286
+ recipient: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
287
+ setting: z.ZodUnion<readonly [z.ZodObject<{
288
+ table: z.ZodString;
289
+ column: z.ZodString;
290
+ }, z.core.$strict>, z.ZodObject<{
291
+ addOn: z.ZodString;
292
+ setting: z.ZodString;
293
+ }, z.core.$strict>]>;
294
+ }, z.core.$strict>, z.ZodObject<{
295
+ column: z.ZodString;
296
+ name: z.ZodOptional<z.ZodString>;
297
+ language: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strict>]>>;
299
+ replyTo: z.ZodOptional<z.ZodObject<{
300
+ staff: z.ZodString;
301
+ }, z.core.$strict>>;
207
302
  batchMinutes: z.ZodOptional<z.ZodNumber>;
208
303
  holdSeconds: z.ZodOptional<z.ZodNumber>;
209
304
  repeatBy: z.ZodOptional<z.ZodString>;
@@ -252,6 +347,7 @@ export declare const outboxProducerSchema: z.ZodUnion<readonly [z.ZodObject<{
252
347
  column: z.ZodString;
253
348
  }, z.core.$strict>;
254
349
  }, z.core.$strict>]>>;
350
+ module: z.ZodOptional<z.ZodString>;
255
351
  optIn: z.ZodOptional<z.ZodLiteral<true>>;
256
352
  hold: z.ZodOptional<z.ZodLiteral<true>>;
257
353
  due: z.ZodOptional<z.ZodObject<{
@@ -299,6 +395,9 @@ export declare const outboxProducerSchema: z.ZodUnion<readonly [z.ZodObject<{
299
395
  name: z.ZodOptional<z.ZodString>;
300
396
  language: z.ZodOptional<z.ZodString>;
301
397
  }, z.core.$strict>]>>;
398
+ replyTo: z.ZodOptional<z.ZodObject<{
399
+ staff: z.ZodString;
400
+ }, z.core.$strict>>;
302
401
  batchMinutes: z.ZodOptional<z.ZodNumber>;
303
402
  holdSeconds: z.ZodOptional<z.ZodNumber>;
304
403
  repeatBy: z.ZodOptional<z.ZodString>;
@@ -387,6 +486,7 @@ export declare const outboxSchema: z.ZodObject<{
387
486
  column: z.ZodString;
388
487
  }, z.core.$strict>;
389
488
  }, z.core.$strict>]>>;
489
+ module: z.ZodOptional<z.ZodString>;
390
490
  optIn: z.ZodOptional<z.ZodLiteral<true>>;
391
491
  hold: z.ZodOptional<z.ZodLiteral<true>>;
392
492
  due: z.ZodOptional<z.ZodObject<{
@@ -434,6 +534,9 @@ export declare const outboxSchema: z.ZodObject<{
434
534
  name: z.ZodOptional<z.ZodString>;
435
535
  language: z.ZodOptional<z.ZodString>;
436
536
  }, z.core.$strict>]>>;
537
+ replyTo: z.ZodOptional<z.ZodObject<{
538
+ staff: z.ZodString;
539
+ }, z.core.$strict>>;
437
540
  batchMinutes: z.ZodOptional<z.ZodNumber>;
438
541
  holdSeconds: z.ZodOptional<z.ZodNumber>;
439
542
  repeatBy: z.ZodOptional<z.ZodString>;
@@ -484,6 +587,94 @@ export declare const outboxSchema: z.ZodObject<{
484
587
  column: z.ZodString;
485
588
  }, z.core.$strict>;
486
589
  }, z.core.$strict>]>>;
590
+ module: z.ZodOptional<z.ZodString>;
591
+ optIn: z.ZodOptional<z.ZodLiteral<true>>;
592
+ hold: z.ZodOptional<z.ZodLiteral<true>>;
593
+ due: z.ZodOptional<z.ZodObject<{
594
+ date: z.ZodString;
595
+ days: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
596
+ byColumn: z.ZodString;
597
+ values: z.ZodRecord<z.ZodString, z.ZodNumber>;
598
+ }, z.core.$strict>, z.ZodObject<{
599
+ setting: z.ZodUnion<readonly [z.ZodObject<{
600
+ table: z.ZodString;
601
+ column: z.ZodString;
602
+ }, z.core.$strict>, z.ZodObject<{
603
+ addOn: z.ZodString;
604
+ setting: z.ZodString;
605
+ }, z.core.$strict>]>;
606
+ byColumn: z.ZodOptional<z.ZodString>;
607
+ index: z.ZodOptional<z.ZodNumber>;
608
+ }, z.core.$strict>]>;
609
+ at: z.ZodOptional<z.ZodString>;
610
+ }, z.core.$strict>>;
611
+ supersede: z.ZodOptional<z.ZodString>;
612
+ dropWhen: z.ZodOptional<z.ZodArray<z.ZodObject<{
613
+ column: z.ZodString;
614
+ eq: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
615
+ in: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
616
+ isNull: z.ZodOptional<z.ZodBoolean>;
617
+ lte: z.ZodOptional<z.ZodNumber>;
618
+ gte: z.ZodOptional<z.ZodNumber>;
619
+ reason: z.ZodEnum<{
620
+ void: "void";
621
+ paid: "paid";
622
+ "no-longer-needed": "no-longer-needed";
623
+ }>;
624
+ }, z.core.$strict>>>;
625
+ recipient: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
626
+ setting: z.ZodUnion<readonly [z.ZodObject<{
627
+ table: z.ZodString;
628
+ column: z.ZodString;
629
+ }, z.core.$strict>, z.ZodObject<{
630
+ addOn: z.ZodString;
631
+ setting: z.ZodString;
632
+ }, z.core.$strict>]>;
633
+ }, z.core.$strict>, z.ZodObject<{
634
+ column: z.ZodString;
635
+ name: z.ZodOptional<z.ZodString>;
636
+ language: z.ZodOptional<z.ZodString>;
637
+ }, z.core.$strict>]>>;
638
+ replyTo: z.ZodOptional<z.ZodObject<{
639
+ staff: z.ZodString;
640
+ }, z.core.$strict>>;
641
+ batchMinutes: z.ZodOptional<z.ZodNumber>;
642
+ holdSeconds: z.ZodOptional<z.ZodNumber>;
643
+ repeatBy: z.ZodOptional<z.ZodString>;
644
+ repeat: z.ZodOptional<z.ZodLiteral<true>>;
645
+ was: z.ZodOptional<z.ZodArray<z.ZodString>>;
646
+ onSent: z.ZodOptional<z.ZodObject<{
647
+ table: z.ZodString;
648
+ via: z.ZodOptional<z.ZodString>;
649
+ set: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>>;
650
+ }, z.core.$strict>>;
651
+ }, z.core.$strict>, z.ZodObject<{
652
+ onDelete: z.ZodObject<{
653
+ table: z.ZodString;
654
+ where: z.ZodOptional<z.ZodObject<{
655
+ column: z.ZodString;
656
+ eq: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
657
+ in: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
658
+ isNull: z.ZodOptional<z.ZodBoolean>;
659
+ }, z.core.$strict>>;
660
+ }, z.core.$strict>;
661
+ kind: z.ZodString;
662
+ link: z.ZodString;
663
+ gate: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"enabled">, z.ZodObject<{
664
+ setting: z.ZodObject<{
665
+ table: z.ZodString;
666
+ column: z.ZodString;
667
+ }, z.core.$strict>;
668
+ }, z.core.$strict>, z.ZodObject<{
669
+ feature: z.ZodString;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ feature: z.ZodString;
672
+ setting: z.ZodObject<{
673
+ table: z.ZodString;
674
+ column: z.ZodString;
675
+ }, z.core.$strict>;
676
+ }, z.core.$strict>]>>;
677
+ module: z.ZodOptional<z.ZodString>;
487
678
  optIn: z.ZodOptional<z.ZodLiteral<true>>;
488
679
  hold: z.ZodOptional<z.ZodLiteral<true>>;
489
680
  due: z.ZodOptional<z.ZodObject<{
@@ -531,6 +722,9 @@ export declare const outboxSchema: z.ZodObject<{
531
722
  name: z.ZodOptional<z.ZodString>;
532
723
  language: z.ZodOptional<z.ZodString>;
533
724
  }, z.core.$strict>]>>;
725
+ replyTo: z.ZodOptional<z.ZodObject<{
726
+ staff: z.ZodString;
727
+ }, z.core.$strict>>;
534
728
  batchMinutes: z.ZodOptional<z.ZodNumber>;
535
729
  holdSeconds: z.ZodOptional<z.ZodNumber>;
536
730
  repeatBy: z.ZodOptional<z.ZodString>;
@@ -579,6 +773,7 @@ export declare const outboxSchema: z.ZodObject<{
579
773
  column: z.ZodString;
580
774
  }, z.core.$strict>;
581
775
  }, z.core.$strict>]>>;
776
+ module: z.ZodOptional<z.ZodString>;
582
777
  optIn: z.ZodOptional<z.ZodLiteral<true>>;
583
778
  hold: z.ZodOptional<z.ZodLiteral<true>>;
584
779
  due: z.ZodOptional<z.ZodObject<{
@@ -626,6 +821,9 @@ export declare const outboxSchema: z.ZodObject<{
626
821
  name: z.ZodOptional<z.ZodString>;
627
822
  language: z.ZodOptional<z.ZodString>;
628
823
  }, z.core.$strict>]>>;
824
+ replyTo: z.ZodOptional<z.ZodObject<{
825
+ staff: z.ZodString;
826
+ }, z.core.$strict>>;
629
827
  batchMinutes: z.ZodOptional<z.ZodNumber>;
630
828
  holdSeconds: z.ZodOptional<z.ZodNumber>;
631
829
  repeatBy: z.ZodOptional<z.ZodString>;
@@ -665,6 +863,14 @@ export declare const emailTemplateSchema: z.ZodObject<{
665
863
  }, z.core.$strict>>;
666
864
  }, z.core.$strict>;
667
865
  export type EmailTemplate = z.infer<typeof emailTemplateSchema>;
866
+ /**
867
+ * What a producer of a removal (`onDelete`) does not take: each reads the row
868
+ * again after the message is written (to date it, drop it, overtake it, hold
869
+ * it for a person, change it, or find who a reply goes to), and the row is gone.
870
+ */
871
+ export declare const NOT_ON_REMOVAL: readonly ["hold", "due", "batchMinutes", "holdSeconds", "dropWhen", "supersede", "repeatBy", "onSent", "replyTo"];
872
+ /** The table whose rows' removal a producer announces, or undefined for any other producer. */
873
+ export declare function removalTableOf(producer: OutboxProducer): string | undefined;
668
874
  /** How long a `repeatKey` is: a SHA-256 digest in base64url. */
669
875
  export declare const REPEAT_KEY_LENGTH = 43;
670
876
  /** The fewest characters a bounded `was` column holds: the columns a message keeps, as they were. */
@@ -709,19 +915,7 @@ export declare function outboxIssues(m: {
709
915
  /** `add-on` when the outbox is an add-on's own: it links into its apps' pages, and has no guest side of its own. */
710
916
  kind?: string | undefined;
711
917
  } & Parameters<typeof unlistedColumn>[0], index: TableIndex): ReferenceIssue[];
712
- /**
713
- * `email.rows`: the rows of a child table that link to the row an outbox link
714
- * names, one line each (an order's tickets, with a QR code each). `from` is
715
- * the documents' collection spelling: the link, the child table, the child's
716
- * link back, its order, a filter and a bool that leaves a row out, and at
717
- * most 50 rows. `joins` gathers up to two child lists of each row into one
718
- * text (a dish's options). `row` is each line's text, reading `{{row.<column>}}`
719
- * (`{{row.<link>.<column>}}` through one of the row's own links, and a join by
720
- * its name); `image` is a QR code of a code column (`{{row.code.qr}}`) and
721
- * nothing else. `empty` is said when there are no rows; without it the block
722
- * is left out.
723
- */
724
- export declare const emailRowsDataSchema: z.ZodObject<{
918
+ export declare const emailRowsDataSchema: z.ZodUnion<readonly [z.ZodObject<{
725
919
  from: z.ZodUnion<readonly [z.ZodObject<{
726
920
  link: z.ZodString;
727
921
  table: z.ZodString;
@@ -764,7 +958,16 @@ export declare const emailRowsDataSchema: z.ZodObject<{
764
958
  image: z.ZodOptional<z.ZodString>;
765
959
  }, z.core.$strict>;
766
960
  empty: z.ZodOptional<z.ZodString>;
767
- }, z.core.$strict>;
961
+ }, z.core.$strict>, z.ZodObject<{
962
+ section: z.ZodString;
963
+ row: z.ZodObject<{
964
+ title: z.ZodOptional<z.ZodString>;
965
+ meta: z.ZodOptional<z.ZodString>;
966
+ amount: z.ZodOptional<z.ZodString>;
967
+ note: z.ZodOptional<z.ZodString>;
968
+ }, z.core.$strict>;
969
+ empty: z.ZodOptional<z.ZodString>;
970
+ }, z.core.$strict>]>;
768
971
  export type EmailRowsData = z.infer<typeof emailRowsDataSchema>;
769
972
  /** The most characters a time of day kept as text takes: `09:30:00`. */
770
973
  export declare const CLOCK_TEXT_MAX = 8;
@@ -803,10 +1006,13 @@ export declare function isCodeColumn(column: {
803
1006
  code?: unknown;
804
1007
  } | undefined;
805
1008
  }): boolean;
806
- /** The forms a row's column may be read in: its type's, a text column's `time` only when it keeps a time of day, and a code's groups. */
1009
+ /** The form of a staff column that is the person it names, by the name the people list gives them (`{{visit.rep_id.name}}`). */
1010
+ export declare const STAFF_NAME_FORM = "name";
1011
+ /** The forms a row's column may be read in: its type's, a text column's `time` only when it keeps a time of day, a code's groups, and a staff column's person by name. */
807
1012
  export declare function rowFormsOf(column: Parameters<typeof clockShaped>[0] & {
808
1013
  rules?: {
809
1014
  code?: unknown;
1015
+ staff?: unknown;
810
1016
  } | undefined;
811
1017
  }): readonly string[];
812
1018
  //# sourceMappingURL=outbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"outbox.d.ts","sourceRoot":"","sources":["../src/outbox.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAkB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAQL,KAAK,cAAc,EAEnB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAEnB,+DAA+D;AAC/D,eAAO,MAAM,eAAe,kDAAmD,CAAC;AAEhF,mEAAmE;AACnE,eAAO,MAAM,WAAW,SAAS,CAAC;AAElC,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,uEAAwE,CAAC;AA0IzG,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAgE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO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