@adminiumjs/manifest 0.3.37 → 0.3.39
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/dist/automations.d.ts +55 -1
- package/dist/automations.d.ts.map +1 -1
- package/dist/automations.js +14 -1
- package/dist/automations.js.map +1 -1
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +1 -0
- package/dist/compose.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/mail-class.d.ts +74 -0
- package/dist/mail-class.d.ts.map +1 -0
- package/dist/mail-class.js +62 -0
- package/dist/mail-class.js.map +1 -0
- package/dist/mail-classes.d.ts +8 -0
- package/dist/mail-classes.d.ts.map +1 -0
- package/dist/mail-classes.js +8 -0
- package/dist/mail-classes.js.map +1 -0
- package/dist/modules.d.ts +2 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +50 -1
- package/dist/modules.js.map +1 -1
- package/dist/outbox.d.ts +4 -0
- package/dist/outbox.d.ts.map +1 -1
- package/dist/outbox.js +15 -0
- package/dist/outbox.js.map +1 -1
- package/dist/people.d.ts +304 -0
- package/dist/people.d.ts.map +1 -0
- package/dist/people.js +319 -0
- package/dist/people.js.map +1 -0
- package/dist/public-access.d.ts +12 -1
- package/dist/public-access.d.ts.map +1 -1
- package/dist/public-access.js +11 -0
- package/dist/public-access.js.map +1 -1
- package/dist/schema.d.ts +262 -4
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +17 -0
- package/dist/schema.js.map +1 -1
- package/dist/words.d.ts +1 -1
- package/dist/words.d.ts.map +1 -1
- package/dist/words.js +36 -0
- package/dist/words.js.map +1 -1
- package/package.json +2 -2
package/dist/people.js
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
/**
|
|
3
|
+
* THE PEOPLE AN APP KEEPS (`people`), AND THE TABLES THE LAW KEEPS (`keep`).
|
|
4
|
+
*
|
|
5
|
+
* `people` is one top-level list, an entry per table of the app that holds
|
|
6
|
+
* people (or companies): "this table is people; this column is the address,
|
|
7
|
+
* this the name, this the consent". E-mail to contacts, a person's data by
|
|
8
|
+
* address (find, export, erase), forms and chat all read it, so none of them
|
|
9
|
+
* names an app's tables. It is a list beside `outbox` and `publicAccess`
|
|
10
|
+
* rather than a word on the table because an entry reaches other tables too:
|
|
11
|
+
* the copies of a person kept on them.
|
|
12
|
+
*
|
|
13
|
+
* Much of it was said before, per feature: the outbox's `recipient` names its
|
|
14
|
+
* people table and that table's address column, and a public entry's claim
|
|
15
|
+
* names the address a person signs in with. The validator holds the three
|
|
16
|
+
* equal, so they cannot drift apart.
|
|
17
|
+
*
|
|
18
|
+
* An entry:
|
|
19
|
+
* - `table`, and `kind`: `people`, or `companies` (a company may have no
|
|
20
|
+
* address of its own; its people are mailed);
|
|
21
|
+
* - `email`: the address column (a `people` entry has one);
|
|
22
|
+
* - `name`: the column that names the person (default: the table's
|
|
23
|
+
* `keyField`, never the address column; a name kept in parts is joined
|
|
24
|
+
* by a formula column of the app's); `company`: a link to the company
|
|
25
|
+
* they work for;
|
|
26
|
+
* - `language`: a column of the table with the language they are written to
|
|
27
|
+
* in (a table that keeps it only on an order adds one, filled when the
|
|
28
|
+
* person is made), and
|
|
29
|
+
* `firstName`: a column, or `firstWordOfName` (the name's first word), for
|
|
30
|
+
* a mail's `{{first_name}}`;
|
|
31
|
+
* - `consent`: a yes/no column that mirrors one purpose of the consent log
|
|
32
|
+
* (`newsletter` or `surveys`). With none, the consent log alone holds it;
|
|
33
|
+
* - `copies`: columns on OTHER tables that hold this person's address, name or phone
|
|
34
|
+
* (a quote's recipient, a signer), each with the link back to the person
|
|
35
|
+
* when there is one. Found and exported with the person, and blanked when
|
|
36
|
+
* they are erased (but not on a table the law keeps);
|
|
37
|
+
* - `customer`: a yes/no or number column that says the person is a customer
|
|
38
|
+
* (a count of won deals), for "existing customers";
|
|
39
|
+
* - `optOutMark`: the moment the app's own screen showed the person the line
|
|
40
|
+
* "you can say no to our mail" where it took their address. Declaring it
|
|
41
|
+
* says the app's staff screens show that line; it is a strict stamp, so
|
|
42
|
+
* no writer can set it by hand: only a signed-in staff member's save on
|
|
43
|
+
* such a screen sets it (or the carry below), never a public page. Only marked rows may be mailed
|
|
44
|
+
* as existing customers. `{column, carryFrom: {table, column}}` also names
|
|
45
|
+
* the mark of the row a person is made from (a claimed enquiry's), copied
|
|
46
|
+
* in the save that makes them;
|
|
47
|
+
* - `carry`: what an app update carries over once (see `carrySchema`).
|
|
48
|
+
*
|
|
49
|
+
* The consent column is not the outbox's `recipient.optIn`: that is a switch
|
|
50
|
+
* for service mail (a reminder), and the two may differ.
|
|
51
|
+
*
|
|
52
|
+
* `keep` is a table word: `{law: <reason>}` says the law makes the business
|
|
53
|
+
* keep the table's rows (an invoice: tax law). An erasure leaves such rows as
|
|
54
|
+
* they are, the person's copies on them included, and lists them under
|
|
55
|
+
* "What stays" with the reason. It is not `states.noDelete`: that refuses a
|
|
56
|
+
* delete of a row in some states (a sent invoice is voided, not deleted) and
|
|
57
|
+
* says nothing of the law, nor of a row's other states.
|
|
58
|
+
*
|
|
59
|
+
* Pure.
|
|
60
|
+
*/
|
|
61
|
+
import { z } from 'zod';
|
|
62
|
+
import { bcp47TagSchema, refSchema } from './refs.js';
|
|
63
|
+
/** What a people entry holds. */
|
|
64
|
+
export const PEOPLE_KINDS = ['people', 'companies'];
|
|
65
|
+
/** The purposes a consent column may mirror: one each. */
|
|
66
|
+
export const CONSENT_PURPOSES = ['newsletter', 'surveys'];
|
|
67
|
+
/** A first name read as the first word of the name column. */
|
|
68
|
+
export const FIRST_WORD_OF_NAME = 'firstWordOfName';
|
|
69
|
+
/** What a copy of a person holds. */
|
|
70
|
+
export const COPY_HOLDS = ['email', 'name', 'phone'];
|
|
71
|
+
/** The most people tables one app declares, and copies one entry lists. */
|
|
72
|
+
export const PEOPLE_MAX = 8;
|
|
73
|
+
export const PEOPLE_COPIES_MAX = 32;
|
|
74
|
+
/** Why the law keeps a table's rows: each is a reason "What stays" names, in the reader's language. */
|
|
75
|
+
export const KEPT_BY_LAW_REASONS = ['tax', 'health', 'contract', 'safety'];
|
|
76
|
+
/** The longest consent sentence, in characters, and the highest version it may have. */
|
|
77
|
+
export const CONSENT_WORDING_MAX = 500;
|
|
78
|
+
/** A public entry's consent tick: the row's bool, the purpose, and the sentence shown with its version (see `public-access.ts`). */
|
|
79
|
+
export const publicConsentSchema = z
|
|
80
|
+
.object({
|
|
81
|
+
column: refSchema,
|
|
82
|
+
purpose: z.enum(CONSENT_PURPOSES),
|
|
83
|
+
wording: z
|
|
84
|
+
.object({
|
|
85
|
+
version: z.number().int().min(1).max(9999),
|
|
86
|
+
text: z
|
|
87
|
+
.record(bcp47TagSchema, z.string().min(1).max(CONSENT_WORDING_MAX))
|
|
88
|
+
.refine((texts) => texts['en-US'] !== undefined, { message: 'the wording is given in several languages, en-US among them' }),
|
|
89
|
+
})
|
|
90
|
+
.strict(),
|
|
91
|
+
})
|
|
92
|
+
.strict();
|
|
93
|
+
/** A table's `keep`: the law keeps its rows, for this reason. */
|
|
94
|
+
export const keepSchema = z.object({ law: z.enum(KEPT_BY_LAW_REASONS) }).strict();
|
|
95
|
+
/** The most one-time carries one entry lists. */
|
|
96
|
+
export const PEOPLE_CARRY_MAX = 4;
|
|
97
|
+
/**
|
|
98
|
+
* The opt-out mark with a second source: the mark of the row a person is made
|
|
99
|
+
* from (a claimed enquiry's, onto the contact made of it), which the server's
|
|
100
|
+
* door copies in the save that makes the person from that row.
|
|
101
|
+
*/
|
|
102
|
+
const optOutMarkSchema = z.object({ column: refSchema, carryFrom: z.object({ table: refSchema, column: refSchema }).strict().optional() }).strict();
|
|
103
|
+
/**
|
|
104
|
+
* What an app update carries over once, from what the app kept before the
|
|
105
|
+
* consent log and the do-not-email list:
|
|
106
|
+
* - `stopList`: every row whose column holds a value puts its address on the
|
|
107
|
+
* do-not-email list (an old "unsubscribed" mark);
|
|
108
|
+
* - `consent`: the newest answer each person gave on a linked table (an
|
|
109
|
+
* order's "news from the venue" tick, newest by `latest`) becomes their
|
|
110
|
+
* consent column's value, as a yes with no record, which the first send's
|
|
111
|
+
* review asks about.
|
|
112
|
+
* Each is run by the update and adds nothing a second time. The columns it
|
|
113
|
+
* reads are declared in the same manifest: an app keeps a column it carries
|
|
114
|
+
* from for one more release, and drops it in the next.
|
|
115
|
+
*/
|
|
116
|
+
const carrySchema = z.union([
|
|
117
|
+
z.object({ stopList: z.object({ column: refSchema }).strict() }).strict(),
|
|
118
|
+
z.object({ consent: z.object({ from: refSchema, via: refSchema, column: refSchema, latest: refSchema }).strict() }).strict(),
|
|
119
|
+
]);
|
|
120
|
+
const copySchema = z
|
|
121
|
+
.object({
|
|
122
|
+
table: refSchema,
|
|
123
|
+
column: refSchema,
|
|
124
|
+
holds: z.enum(COPY_HOLDS),
|
|
125
|
+
/** A link column of the copy's table back to the person, when it has one. */
|
|
126
|
+
via: refSchema.optional(),
|
|
127
|
+
})
|
|
128
|
+
.strict();
|
|
129
|
+
export const peopleEntrySchema = z
|
|
130
|
+
.object({
|
|
131
|
+
table: refSchema,
|
|
132
|
+
kind: z.enum(PEOPLE_KINDS),
|
|
133
|
+
email: refSchema.optional(),
|
|
134
|
+
name: refSchema.optional(),
|
|
135
|
+
company: refSchema.optional(),
|
|
136
|
+
language: refSchema.optional(),
|
|
137
|
+
firstName: z.union([z.object({ column: refSchema }).strict(), z.literal(FIRST_WORD_OF_NAME)]).optional(),
|
|
138
|
+
consent: z.object({ column: refSchema, purpose: z.enum(CONSENT_PURPOSES) }).strict().optional(),
|
|
139
|
+
copies: z.array(copySchema).max(PEOPLE_COPIES_MAX).optional(),
|
|
140
|
+
customer: refSchema.optional(),
|
|
141
|
+
optOutMark: z.union([refSchema, optOutMarkSchema]).optional(),
|
|
142
|
+
carry: z.array(carrySchema).min(1).max(PEOPLE_CARRY_MAX).optional(),
|
|
143
|
+
})
|
|
144
|
+
.strict()
|
|
145
|
+
.refine((entry) => entry.kind !== 'people' || entry.email !== undefined, { message: 'a people table names the column that holds the address ("email")', path: ['email'] });
|
|
146
|
+
/** The opt-out mark's column, however the entry writes it. */
|
|
147
|
+
export function optOutMarkColumn(entry) {
|
|
148
|
+
return typeof entry.optOutMark === 'object' ? entry.optOutMark.column : entry.optOutMark;
|
|
149
|
+
}
|
|
150
|
+
export const peopleSchema = z
|
|
151
|
+
.array(peopleEntrySchema)
|
|
152
|
+
.min(1)
|
|
153
|
+
.max(PEOPLE_MAX)
|
|
154
|
+
.refine((entries) => new Set(entries.map((entry) => entry.table)).size === entries.length, { message: 'a table is declared as people once' });
|
|
155
|
+
const NUMBERS = ['int', 'bigint', 'decimal', 'money', 'float'];
|
|
156
|
+
/**
|
|
157
|
+
* Everything wrong with an app's `people` that the manifest can see: a table
|
|
158
|
+
* or a column it lacks, a column of the wrong kind, and an address that is
|
|
159
|
+
* not the one its outbox or its sign-in already names for the same table.
|
|
160
|
+
*/
|
|
161
|
+
export function peopleIssues(m, index) {
|
|
162
|
+
const out = [];
|
|
163
|
+
(m.people ?? []).forEach((entry, e) => {
|
|
164
|
+
const at = (...rest) => ['people', e, ...rest];
|
|
165
|
+
if (index.table(entry.table) === undefined) {
|
|
166
|
+
out.push({ path: at('table'), message: `"${entry.table}" is not a table of this app` });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
/** A column of `table`, of one of `types`; said by name when it is missing or of another kind. */
|
|
170
|
+
const col = (table, ref, types, path, what) => {
|
|
171
|
+
const found = index.column(table, ref);
|
|
172
|
+
if (found === undefined)
|
|
173
|
+
out.push({ path, message: `"${table}" has no column "${ref}"` });
|
|
174
|
+
else if (!types.includes(found.type))
|
|
175
|
+
out.push({ path, message: `"${table}.${ref}" is not ${what}` });
|
|
176
|
+
return found;
|
|
177
|
+
};
|
|
178
|
+
if (entry.email !== undefined)
|
|
179
|
+
col(entry.table, entry.email, ['text'], at('email'), 'a text column (an address)');
|
|
180
|
+
const keyField = m.requiredSchema.tables.find((table) => table.ref === entry.table)?.keyField;
|
|
181
|
+
const name = entry.name ?? keyField;
|
|
182
|
+
if (name === undefined)
|
|
183
|
+
out.push({ path: at('name'), message: `"${entry.table}" has no keyField: name the column that names a person ("name")` });
|
|
184
|
+
else if (entry.name !== undefined)
|
|
185
|
+
col(entry.table, entry.name, ['text'], at('name'), 'a text column');
|
|
186
|
+
// A person is not named by their address: a table whose keyField is the address names the name column (a formula that joins two, when the name is kept in parts).
|
|
187
|
+
if (name !== undefined && name === entry.email)
|
|
188
|
+
out.push({ path: at('name'), message: `"${entry.table}" is named by its address ("${name}"${entry.name === undefined ? ', its keyField' : ''}): name the column that holds the person's name ("name"), a formula column when the name is kept in parts` });
|
|
189
|
+
if (entry.company !== undefined) {
|
|
190
|
+
const link = col(entry.table, entry.company, ['fk'], at('company'), 'a link to the company');
|
|
191
|
+
const target = link?.references === undefined ? undefined : (m.people ?? []).find((other) => other.table === link.references);
|
|
192
|
+
if (target !== undefined && target.kind !== 'companies')
|
|
193
|
+
out.push({ path: at('company'), message: `"${entry.table}.${entry.company}" links to "${target.table}", which is declared as people, not companies` });
|
|
194
|
+
}
|
|
195
|
+
if (entry.language !== undefined)
|
|
196
|
+
col(entry.table, entry.language, ['text'], at('language'), 'a text column (a language)');
|
|
197
|
+
if (typeof entry.firstName === 'object')
|
|
198
|
+
col(entry.table, entry.firstName.column, ['text'], at('firstName', 'column'), 'a text column');
|
|
199
|
+
else if (entry.firstName === FIRST_WORD_OF_NAME && name === undefined)
|
|
200
|
+
out.push({ path: at('firstName'), message: 'a first name read from the name needs a name column' });
|
|
201
|
+
// What is read only to mail a person: with no address, it says nothing.
|
|
202
|
+
for (const key of ['consent', 'customer', 'optOutMark', 'carry']) {
|
|
203
|
+
if (entry[key] !== undefined && entry.email === undefined)
|
|
204
|
+
out.push({ path: at(key), message: `"${key}" is read to mail the table's people, and this entry names no address ("email")` });
|
|
205
|
+
}
|
|
206
|
+
if (entry.consent !== undefined)
|
|
207
|
+
col(entry.table, entry.consent.column, ['bool'], at('consent', 'column'), 'a bool (a yes or no)');
|
|
208
|
+
if (entry.customer !== undefined)
|
|
209
|
+
col(entry.table, entry.customer, ['bool', ...NUMBERS], at('customer'), 'a bool or a number');
|
|
210
|
+
/** A mark: a moment no writer gives (a strict stamp). */
|
|
211
|
+
const markAt = (table, ref, path) => {
|
|
212
|
+
const mark = col(table, ref, ['timestamptz'], path, 'a moment (timestamptz)');
|
|
213
|
+
if (mark !== undefined && mark.type === 'timestamptz' && mark.rules?.stamp?.strict !== true) {
|
|
214
|
+
out.push({ path, message: `"${table}.${ref}" is set by the screen that shows the opt-out line, never by hand: make it a strict stamp (rules.stamp.strict)` });
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
const markColumn = optOutMarkColumn(entry);
|
|
218
|
+
if (markColumn !== undefined) {
|
|
219
|
+
const path = typeof entry.optOutMark === 'object' ? at('optOutMark', 'column') : at('optOutMark');
|
|
220
|
+
markAt(entry.table, markColumn, path);
|
|
221
|
+
const from = typeof entry.optOutMark === 'object' ? entry.optOutMark.carryFrom : undefined;
|
|
222
|
+
if (from !== undefined) {
|
|
223
|
+
if (from.table === entry.table)
|
|
224
|
+
out.push({ path: at('optOutMark', 'carryFrom', 'table'), message: 'a mark is carried from the row a person is made from, on another table' });
|
|
225
|
+
else if (index.table(from.table) === undefined)
|
|
226
|
+
out.push({ path: at('optOutMark', 'carryFrom', 'table'), message: `"${from.table}" is not a table of this app` });
|
|
227
|
+
else
|
|
228
|
+
markAt(from.table, from.column, at('optOutMark', 'carryFrom', 'column'));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
(entry.carry ?? []).forEach((carry, k) => {
|
|
232
|
+
const here = (...rest) => at('carry', k, ...rest);
|
|
233
|
+
if ('stopList' in carry) {
|
|
234
|
+
if (index.column(entry.table, carry.stopList.column) === undefined)
|
|
235
|
+
out.push({ path: here('stopList', 'column'), message: `"${entry.table}" has no column "${carry.stopList.column}": a carried column stays declared for the release that carries it` });
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const from = carry.consent;
|
|
239
|
+
if (entry.consent === undefined) {
|
|
240
|
+
out.push({ path: here('consent'), message: 'an answer is carried into the consent column: declare it ("consent")' });
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (index.table(from.from) === undefined) {
|
|
244
|
+
out.push({ path: here('consent', 'from'), message: `"${from.from}" is not a table of this app` });
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const via = col(from.from, from.via, ['fk'], here('consent', 'via'), `a link to "${entry.table}"`);
|
|
248
|
+
if (via?.type === 'fk' && via.references !== entry.table)
|
|
249
|
+
out.push({ path: here('consent', 'via'), message: `"${from.from}.${from.via}" links to "${via.references ?? ''}", not to "${entry.table}"` });
|
|
250
|
+
col(from.from, from.column, ['bool'], here('consent', 'column'), 'a bool (a yes or no)');
|
|
251
|
+
col(from.from, from.latest, ['date', 'timestamptz', ...NUMBERS], here('consent', 'latest'), 'a date, a moment or a number (what makes an answer the newest)');
|
|
252
|
+
});
|
|
253
|
+
const seen = new Set();
|
|
254
|
+
(entry.copies ?? []).forEach((copy, c) => {
|
|
255
|
+
const here = (...rest) => at('copies', c, ...rest);
|
|
256
|
+
if (copy.table === entry.table) {
|
|
257
|
+
out.push({ path: here('table'), message: `a copy is kept on another table: "${entry.table}.${copy.column}" is the person's own column` });
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
if (index.table(copy.table) === undefined) {
|
|
261
|
+
out.push({ path: here('table'), message: `"${copy.table}" is not a table of this app` });
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
const id = `${copy.table}.${copy.column}`;
|
|
265
|
+
if (seen.has(id))
|
|
266
|
+
out.push({ path: here('column'), message: `"${id}" is listed twice` });
|
|
267
|
+
seen.add(id);
|
|
268
|
+
col(copy.table, copy.column, ['text'], here('column'), `a text column (${copy.holds === 'email' ? 'an address' : copy.holds === 'phone' ? 'a phone number' : 'a name'})`);
|
|
269
|
+
if (copy.via !== undefined) {
|
|
270
|
+
const link = col(copy.table, copy.via, ['fk'], here('via'), `a link to "${entry.table}"`);
|
|
271
|
+
if (link?.type === 'fk' && link.references !== entry.table)
|
|
272
|
+
out.push({ path: here('via'), message: `"${copy.table}.${copy.via}" links to "${link.references ?? ''}", not to "${entry.table}"` });
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
// The same table's address, said three times, is one address.
|
|
276
|
+
const recipient = m.outbox?.recipient;
|
|
277
|
+
if (recipient !== undefined && recipient.table === entry.table && entry.email !== recipient.email) {
|
|
278
|
+
out.push({ path: at('email'), message: `the outbox writes to "${entry.table}.${recipient.email}" (outbox.recipient.email), so the people of "${entry.table}" have that address: name it here` });
|
|
279
|
+
}
|
|
280
|
+
(m.publicAccess ?? []).forEach((access, a) => {
|
|
281
|
+
const claimed = access.claim?.email;
|
|
282
|
+
if (access.table !== entry.table || typeof claimed !== 'string' || claimed === entry.email)
|
|
283
|
+
return;
|
|
284
|
+
out.push({ path: at('email'), message: `publicAccess ${String(a)} signs "${entry.table}" in by "${claimed}" (claim.email), so the people of "${entry.table}" have that address: name it here` });
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
return out;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Everything wrong with a public entry's consent tick: an entry that writes
|
|
291
|
+
* nothing, a column that is no bool the entry writes, and a tick kept for no
|
|
292
|
+
* person of the app's `people`. The person is the one the entry finds by
|
|
293
|
+
* address (`identity`), the claimed person whose rows it writes
|
|
294
|
+
* (`claimedBy`), or the row itself on a people table's own entry.
|
|
295
|
+
*/
|
|
296
|
+
export function publicConsentIssues(m, index) {
|
|
297
|
+
const out = [];
|
|
298
|
+
(m.publicAccess ?? []).forEach((entry, e) => {
|
|
299
|
+
const consent = entry.consent;
|
|
300
|
+
if (consent === undefined)
|
|
301
|
+
return;
|
|
302
|
+
const at = (...rest) => ['publicAccess', e, 'consent', ...rest];
|
|
303
|
+
if (!entry.methods.includes('POST') && !entry.methods.includes('PATCH'))
|
|
304
|
+
out.push({ path: at(), message: 'a tick is given on a create or a change: this entry writes nothing' });
|
|
305
|
+
const column = index.column(entry.table, consent.column);
|
|
306
|
+
if (column === undefined)
|
|
307
|
+
out.push({ path: at('column'), message: `"${entry.table}" has no column "${consent.column}"` });
|
|
308
|
+
else if (column.type !== 'bool')
|
|
309
|
+
out.push({ path: at('column'), message: `"${entry.table}.${consent.column}" is not a bool (a tick)` });
|
|
310
|
+
else if (!(entry.writable ?? []).includes(consent.column))
|
|
311
|
+
out.push({ path: at('column'), message: `"${entry.table}.${consent.column}" is not writable through this entry, so no tick reaches it` });
|
|
312
|
+
const person = entry.identity?.table ?? entry.claimedBy?.table ?? entry.table;
|
|
313
|
+
if (!(m.people ?? []).some((declared) => declared.table === person && declared.kind === 'people')) {
|
|
314
|
+
out.push({ path: at(), message: `a tick is kept for a person: "${person}" is not one of the app's people tables (people), and the entry finds no other (identity, claimedBy)` });
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
return out;
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=people.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"people.js","sourceRoot":"","sources":["../src/people.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAwC,MAAM,WAAW,CAAC;AAE5F,iCAAiC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAC;AAC7D,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,YAAY,EAAE,SAAS,CAAU,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
369
|
availability: "availability";
|
|
370
370
|
}>>;
|
|
371
371
|
methods: z.ZodArray<z.ZodEnum<{
|
|
372
|
-
GET: "GET";
|
|
373
372
|
POST: "POST";
|
|
374
373
|
PATCH: "PATCH";
|
|
374
|
+
GET: "GET";
|
|
375
375
|
}>>;
|
|
376
376
|
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
377
377
|
writable: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -433,6 +433,17 @@ export declare const publicAccessSchema: z.ZodObject<{
|
|
|
433
433
|
stamp: z.ZodOptional<z.ZodString>;
|
|
434
434
|
links: z.ZodOptional<z.ZodLiteral<true>>;
|
|
435
435
|
}, z.core.$strict>>;
|
|
436
|
+
consent: z.ZodOptional<z.ZodObject<{
|
|
437
|
+
column: z.ZodString;
|
|
438
|
+
purpose: z.ZodEnum<{
|
|
439
|
+
newsletter: "newsletter";
|
|
440
|
+
surveys: "surveys";
|
|
441
|
+
}>;
|
|
442
|
+
wording: z.ZodObject<{
|
|
443
|
+
version: z.ZodNumber;
|
|
444
|
+
text: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
445
|
+
}, z.core.$strict>;
|
|
446
|
+
}, z.core.$strict>>;
|
|
436
447
|
newLink: z.ZodOptional<z.ZodObject<{
|
|
437
448
|
column: z.ZodString;
|
|
438
449
|
kind: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-access.d.ts","sourceRoot":"","sources":["../src/public-access.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"public-access.d.ts","sourceRoot":"","sources":["../src/public-access.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAmB,KAAK,QAAQ,E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AIG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,SAAS,YAAY,EAAE,EACrC,MAAM,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,EAAE,CAAA;CAAE,EAAE,GACpH;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CA8BrC"}
|
package/dist/public-access.js
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* entry reaches the parent row: a draft's lines stay as hidden as the draft.
|
|
28
28
|
*/
|
|
29
29
|
import { z } from 'zod';
|
|
30
|
+
import { publicConsentSchema } from './people.js';
|
|
30
31
|
import { kindOf, rulesOf } from './capacity.js';
|
|
31
32
|
import { formulaColumns } from './formula.js';
|
|
32
33
|
import { refSchema, scalarSchema, settingRefSchema, valueFits, } from './refs.js';
|
|
@@ -466,6 +467,16 @@ export const publicAccessSchema = z
|
|
|
466
467
|
shareLink: refSchema.optional(),
|
|
467
468
|
/** On an identity entry: what "delete my details" empties. */
|
|
468
469
|
forget: forgetSchema.optional(),
|
|
470
|
+
/**
|
|
471
|
+
* A tick a stranger gives on this entry's create or change ("Email me
|
|
472
|
+
* about new shows"): `column` is the bool of the written row that carries
|
|
473
|
+
* it, `purpose` the consent it gives, and `wording` the sentence shown
|
|
474
|
+
* beside the box, with its version, so the consent log keeps what was
|
|
475
|
+
* shown and never a text from the request. Kept for the person the entry
|
|
476
|
+
* finds or works for (see `people.ts` `publicConsentIssues`). A box left
|
|
477
|
+
* unticked writes nothing: it takes back no earlier yes.
|
|
478
|
+
*/
|
|
479
|
+
consent: publicConsentSchema.optional(),
|
|
469
480
|
/** On a signed-in person's rows: "Make a new link" for a row's own link. */
|
|
470
481
|
newLink: newLinkSchema.optional(),
|
|
471
482
|
/**
|