@veriforms/webapp-sdk 0.0.0-stage → 0.1.1
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/LICENSE +8 -0
- package/README.md +238 -2
- package/config.schema.json +564 -0
- package/dist/index.d.ts +419 -0
- package/dist/index.js +203 -0
- package/dist/server.d.ts +190 -0
- package/dist/server.js +49 -0
- package/dist/serverClient.d.ts +117 -0
- package/dist/serverClient.js +201 -0
- package/dist/serverRoute.d.ts +19 -0
- package/dist/serverRoute.js +31 -0
- package/package.json +49 -4
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://www.veriforms.net/schemas/webapp-config.schema.json",
|
|
4
|
+
"title": "VeriForms web app config.json",
|
|
5
|
+
"description": "The private data-source manifest of a VeriForms web app. Editor help only: the gateway validates config.json on every save and its answer is the one that counts. Keys starting with _ are notes.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The app's name."
|
|
11
|
+
},
|
|
12
|
+
"dataSources": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "The sources the page may call, by key.",
|
|
15
|
+
"propertyNames": {
|
|
16
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}$"
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"description": "One data source the page may call by its key. Enforced by the gateway on every call.",
|
|
21
|
+
"required": [
|
|
22
|
+
"type"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"type": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "What the source is.",
|
|
28
|
+
"enum": [
|
|
29
|
+
"demo",
|
|
30
|
+
"http",
|
|
31
|
+
"webhook",
|
|
32
|
+
"veriforms-submission",
|
|
33
|
+
"veriforms-data",
|
|
34
|
+
"veriforms-payment",
|
|
35
|
+
"veriflow",
|
|
36
|
+
"customdb",
|
|
37
|
+
"customdb-write",
|
|
38
|
+
"workflow",
|
|
39
|
+
"veriforms-roles"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"veriflowId": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "veriflow: the Automation to run (owned by the app's account)."
|
|
45
|
+
},
|
|
46
|
+
"workflowId": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "workflow: the trigger workflow to start."
|
|
49
|
+
},
|
|
50
|
+
"staticParams": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"description": "workflow: trigger values fixed by the author, never overridable by the page."
|
|
56
|
+
},
|
|
57
|
+
"flowId": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Old spelling of veriflowId; still read, normalised away."
|
|
60
|
+
},
|
|
61
|
+
"table": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "customdb / customdb-write: the table."
|
|
64
|
+
},
|
|
65
|
+
"savedQuery": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "customdb: read through a saved query instead of table/select/join/where/orderBy."
|
|
68
|
+
},
|
|
69
|
+
"savedQueryVersion": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"description": "Stamped by publish; never written by an author."
|
|
72
|
+
},
|
|
73
|
+
"savedQuerySpecHash": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Stamped by publish; never written by an author."
|
|
76
|
+
},
|
|
77
|
+
"join": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "customdb: [{\"relation\", \"select\": [...]}] along declared relations; joined columns come back as <relation>_<column>.",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"where": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"description": "customdb: [{\"field\", \"op\", \"value\"}], always sent as parameters.",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "object"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"orderBy": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"description": "customdb: [{\"field\", \"direction\"}].",
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "object"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"limit": {
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"description": "customdb: rows per page.",
|
|
101
|
+
"minimum": 1
|
|
102
|
+
},
|
|
103
|
+
"instanceColumn": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "Instance apps: the column holding the instance; every read is filtered to it."
|
|
106
|
+
},
|
|
107
|
+
"scope": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "customdb / customdb-write: \"app\" reads every instance's rows. veriforms-data: \"mine\" — only the visitor's own submissions.",
|
|
110
|
+
"enum": [
|
|
111
|
+
"app",
|
|
112
|
+
"mine"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"stampedFilters": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
},
|
|
120
|
+
"description": "Instance apps: {\"column\": \"<share value>\"}, filled from the instance's share, never by the page."
|
|
121
|
+
},
|
|
122
|
+
"mode": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "customdb-write: insert, upsert or update (one row, by its _id).",
|
|
125
|
+
"enum": [
|
|
126
|
+
"insert",
|
|
127
|
+
"upsert",
|
|
128
|
+
"update"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"keyColumns": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"description": "customdb-write upsert: the declared fields a row is matched on."
|
|
137
|
+
},
|
|
138
|
+
"updateRows": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "customdb-write update on an app without instances: whose rows it may change.",
|
|
141
|
+
"enum": [
|
|
142
|
+
"own",
|
|
143
|
+
"any"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"data": {
|
|
147
|
+
"description": "demo: the JSON returned, as written."
|
|
148
|
+
},
|
|
149
|
+
"previewData": {
|
|
150
|
+
"description": "What the builder preview shows instead of calling the source. Never reaches a real visitor."
|
|
151
|
+
},
|
|
152
|
+
"url": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "http / webhook: the upstream address (withheld when the config is read back)."
|
|
155
|
+
},
|
|
156
|
+
"method": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "http / webhook: the HTTP method."
|
|
159
|
+
},
|
|
160
|
+
"query": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"description": "http: query parameters sent upstream."
|
|
166
|
+
},
|
|
167
|
+
"headers": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"additionalProperties": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
"description": "http / webhook: headers sent upstream (withheld when read back)."
|
|
173
|
+
},
|
|
174
|
+
"allowClientParams": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"description": "The params the page may set — the only part of the call the visitor controls."
|
|
180
|
+
},
|
|
181
|
+
"cacheSeconds": {
|
|
182
|
+
"type": "integer",
|
|
183
|
+
"description": "How long a read answer is kept.",
|
|
184
|
+
"minimum": 0
|
|
185
|
+
},
|
|
186
|
+
"rateLimit": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"description": "Throttle in front of the upstream: {\"enabled\", \"perSecond\", \"perMinute\", \"perHour\", \"perDay\", \"group\", \"maxWaitMs\"}."
|
|
189
|
+
},
|
|
190
|
+
"visitorLimit": {
|
|
191
|
+
"description": "Per-visitor limit on a public app, within the platform ceiling, or off with a stated reason."
|
|
192
|
+
},
|
|
193
|
+
"botCheck": {
|
|
194
|
+
"description": "Proof of work before a public app's messaging call."
|
|
195
|
+
},
|
|
196
|
+
"staticPayload": {
|
|
197
|
+
"description": "webhook: JSON sent with every call."
|
|
198
|
+
},
|
|
199
|
+
"forwardBody": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"description": "webhook: forward the page's body."
|
|
202
|
+
},
|
|
203
|
+
"fields": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"description": "veriforms-submission / customdb-write: the fields the page may send, by name.",
|
|
206
|
+
"propertyNames": {
|
|
207
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}$"
|
|
208
|
+
},
|
|
209
|
+
"additionalProperties": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"description": "One field the page may send. A key the source does not declare is refused, never dropped.",
|
|
212
|
+
"properties": {
|
|
213
|
+
"type": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "Value type. Submissions: string, number, boolean, date, server-timestamp, server-instance, server-user. Tables: string, number, boolean, date, server-timestamp, server-user. server-* are stamped by the server, never sent by the page.",
|
|
216
|
+
"enum": [
|
|
217
|
+
"string",
|
|
218
|
+
"number",
|
|
219
|
+
"boolean",
|
|
220
|
+
"date",
|
|
221
|
+
"server-timestamp",
|
|
222
|
+
"server-instance",
|
|
223
|
+
"server-user"
|
|
224
|
+
],
|
|
225
|
+
"default": "string"
|
|
226
|
+
},
|
|
227
|
+
"required": {
|
|
228
|
+
"type": "boolean",
|
|
229
|
+
"description": "Every submission must carry it (a named checkpoint may omit it)."
|
|
230
|
+
},
|
|
231
|
+
"maxLength": {
|
|
232
|
+
"type": "integer",
|
|
233
|
+
"description": "Longest text accepted.",
|
|
234
|
+
"minimum": 0
|
|
235
|
+
},
|
|
236
|
+
"enum": {
|
|
237
|
+
"type": "array",
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"description": "The only values accepted."
|
|
242
|
+
},
|
|
243
|
+
"pattern": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "A regular expression the text must match."
|
|
246
|
+
},
|
|
247
|
+
"min": {
|
|
248
|
+
"type": "number",
|
|
249
|
+
"description": "Smallest number accepted."
|
|
250
|
+
},
|
|
251
|
+
"max": {
|
|
252
|
+
"type": "number",
|
|
253
|
+
"description": "Largest number accepted."
|
|
254
|
+
},
|
|
255
|
+
"minField": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Another field of the same row this value may not be below."
|
|
258
|
+
},
|
|
259
|
+
"maxField": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"description": "Another field of the same row this value may not exceed."
|
|
262
|
+
},
|
|
263
|
+
"requiredWhen": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"description": "Required only when another field has a value: {\"field\": \"…\", \"equals\": …} or {\"field\": \"…\", \"in\": […]}.",
|
|
266
|
+
"properties": {
|
|
267
|
+
"field": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"description": "The other field."
|
|
270
|
+
},
|
|
271
|
+
"equals": {
|
|
272
|
+
"description": "The value that makes this field required."
|
|
273
|
+
},
|
|
274
|
+
"in": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"description": "Any of these values makes this field required."
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"required": [
|
|
280
|
+
"field"
|
|
281
|
+
],
|
|
282
|
+
"additionalProperties": false
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"patternProperties": {
|
|
286
|
+
"^_": {
|
|
287
|
+
"description": "A note; ignored."
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"additionalProperties": false
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"maxRowsPerCall": {
|
|
294
|
+
"type": "integer",
|
|
295
|
+
"description": "Most rows one write may carry.",
|
|
296
|
+
"minimum": 1
|
|
297
|
+
},
|
|
298
|
+
"days": {
|
|
299
|
+
"type": "integer",
|
|
300
|
+
"minimum": 1,
|
|
301
|
+
"maximum": 365,
|
|
302
|
+
"description": "veriforms-data: read window in days (default 90, at most 365)."
|
|
303
|
+
},
|
|
304
|
+
"select": {
|
|
305
|
+
"type": "array",
|
|
306
|
+
"items": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
},
|
|
309
|
+
"description": "customdb: exactly the columns returned; veriforms-data: only these data fields are returned."
|
|
310
|
+
},
|
|
311
|
+
"includeCheckpoints": {
|
|
312
|
+
"type": "boolean",
|
|
313
|
+
"description": "veriforms-data: include partial (checkpoint) submissions."
|
|
314
|
+
},
|
|
315
|
+
"includeCase": {
|
|
316
|
+
"type": "boolean",
|
|
317
|
+
"description": "veriforms-data: include each submission's case state."
|
|
318
|
+
},
|
|
319
|
+
"caseWorkflowId": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"description": "veriforms-data: the workflow whose case state is included."
|
|
322
|
+
},
|
|
323
|
+
"callableFrom": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"enum": ["server"],
|
|
326
|
+
"description": "\"server\": only the app's server functions may call this source, not the page directly (server functions are in a pilot: only platform administrators push and release them). Absent = page and server functions."
|
|
327
|
+
},
|
|
328
|
+
"anyoneMayRun": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"description": "veriflow: on an app anyone can open, the stated reason (at least 10 characters) why anyone may run an Automation that changes data; otherwise the source needs minLevel, roles or signedIn."
|
|
331
|
+
},
|
|
332
|
+
"amount": {
|
|
333
|
+
"type": "integer",
|
|
334
|
+
"description": "veriforms-payment: the amount in the smallest currency unit."
|
|
335
|
+
},
|
|
336
|
+
"currency": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "veriforms-payment: ISO currency code."
|
|
339
|
+
},
|
|
340
|
+
"description": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "veriforms-payment: what the payment is for."
|
|
343
|
+
},
|
|
344
|
+
"allowClientAmount": {
|
|
345
|
+
"type": "boolean",
|
|
346
|
+
"description": "veriforms-payment: the page may set the amount (between minAmount and maxAmount)."
|
|
347
|
+
},
|
|
348
|
+
"minAmount": {
|
|
349
|
+
"type": "integer",
|
|
350
|
+
"description": "veriforms-payment: smallest amount the page may set."
|
|
351
|
+
},
|
|
352
|
+
"maxAmount": {
|
|
353
|
+
"type": "integer",
|
|
354
|
+
"description": "veriforms-payment: largest amount the page may set."
|
|
355
|
+
},
|
|
356
|
+
"sellsToConsumers": {
|
|
357
|
+
"type": "boolean",
|
|
358
|
+
"description": "veriforms-payment: consumer sale (needs the owner's legal pages)."
|
|
359
|
+
},
|
|
360
|
+
"collectTaxId": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"description": "veriforms-payment: ask the buyer for a tax id."
|
|
363
|
+
},
|
|
364
|
+
"bindRow": {
|
|
365
|
+
"type": "object",
|
|
366
|
+
"description": "veriforms-payment: pay for one table row; the amount is read from the row and the outcome written back."
|
|
367
|
+
},
|
|
368
|
+
"auth": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"description": "http / webhook: {\"vault\": \"<entryId>\"} — the Vault entry that authenticates the call. config.json holds the id only.",
|
|
371
|
+
"properties": {
|
|
372
|
+
"vault": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"description": "The Vault entry's id."
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"additionalProperties": false
|
|
378
|
+
},
|
|
379
|
+
"minLevel": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"enum": [
|
|
382
|
+
"read",
|
|
383
|
+
"write",
|
|
384
|
+
"admin"
|
|
385
|
+
],
|
|
386
|
+
"description": "The lowest access level a visitor needs to call it: \"write\" or \"admin\" (\"read\" changes nothing). A write source always needs write."
|
|
387
|
+
},
|
|
388
|
+
"signedIn": {
|
|
389
|
+
"type": "boolean",
|
|
390
|
+
"description": "Only a signed-in visitor may call it (anonymous calls get 401 sign_in_required). \"roles\" and \"rowRules\" imply it."
|
|
391
|
+
},
|
|
392
|
+
"roles": {
|
|
393
|
+
"type": "array",
|
|
394
|
+
"items": {
|
|
395
|
+
"type": "string"
|
|
396
|
+
},
|
|
397
|
+
"description": "Only these roles may call it."
|
|
398
|
+
},
|
|
399
|
+
"rowRules": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"description": "Per role: which rows it reaches — \"all\", \"mine\" or {\"column\", \"equals\": \"$visitor.…\"}. Every key is a role declared under \"roles\" at the top of config.json — there is no key for 'every signed-in visitor'. For 'each signed-in visitor sees their own rows': declare a role (e.g. \"member\"), write {\"member\": {\"column\": \"booked_by\", \"equals\": \"$visitor.email\"}}, and give that role to the people (the app's Access tab, assign_cwa_roles, or a permission table under \"roleSource\"; a tester of the test version needs it too). A signed-in visitor who holds no role with a rule is refused (403 row_rule_missing), never shown every row.",
|
|
402
|
+
"additionalProperties": {
|
|
403
|
+
"oneOf": [
|
|
404
|
+
{
|
|
405
|
+
"type": "string",
|
|
406
|
+
"enum": [
|
|
407
|
+
"all",
|
|
408
|
+
"mine"
|
|
409
|
+
],
|
|
410
|
+
"description": "all: every row. mine: the visitor's own submissions (veriforms-data only)."
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"type": "object",
|
|
414
|
+
"properties": {
|
|
415
|
+
"column": {
|
|
416
|
+
"type": "string",
|
|
417
|
+
"description": "The column compared."
|
|
418
|
+
},
|
|
419
|
+
"equals": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"description": "$visitor.email or $visitor.<attribute> — never a value from the page.",
|
|
422
|
+
"pattern": "^\\$visitor\\."
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"required": [
|
|
426
|
+
"column",
|
|
427
|
+
"equals"
|
|
428
|
+
],
|
|
429
|
+
"additionalProperties": false
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"visitorSet": {
|
|
435
|
+
"type": "object",
|
|
436
|
+
"description": "Guarded columns (approval, status, role, paid …) a page may write on a source anyone can call, each with the author's reason (at least 10 characters): {\"status\": \"a member marks their own booking cancelled\"}.",
|
|
437
|
+
"additionalProperties": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"minLength": 10
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
"patternProperties": {
|
|
444
|
+
"^_": {
|
|
445
|
+
"description": "A note; ignored."
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"additionalProperties": false
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"adminPaths": {
|
|
452
|
+
"type": "array",
|
|
453
|
+
"items": {
|
|
454
|
+
"type": "string"
|
|
455
|
+
},
|
|
456
|
+
"description": "Page paths only admins may open, e.g. \"/admin\" or \"/files\"."
|
|
457
|
+
},
|
|
458
|
+
"signInAreas": {
|
|
459
|
+
"type": "array",
|
|
460
|
+
"items": {
|
|
461
|
+
"type": "string"
|
|
462
|
+
},
|
|
463
|
+
"description": "Page paths only signed-in visitors may open, e.g. \"/konto\"."
|
|
464
|
+
},
|
|
465
|
+
"linkHosts": {
|
|
466
|
+
"type": "array",
|
|
467
|
+
"items": {
|
|
468
|
+
"type": "string"
|
|
469
|
+
},
|
|
470
|
+
"description": "Foreign hosts the page may link to (nothing is ever loaded from them).",
|
|
471
|
+
"maxItems": 20
|
|
472
|
+
},
|
|
473
|
+
"values": {
|
|
474
|
+
"type": "array",
|
|
475
|
+
"items": {
|
|
476
|
+
"type": "string"
|
|
477
|
+
},
|
|
478
|
+
"description": "Space values (Definitions) the page may read, e.g. \"company.iban\"."
|
|
479
|
+
},
|
|
480
|
+
"roles": {
|
|
481
|
+
"type": "object",
|
|
482
|
+
"description": "The app's named roles: {\"treasurer\": {\"label\": {\"de\": \"Kassenwart\", \"en\": \"Treasurer\"}, \"level\": \"write\"}}.",
|
|
483
|
+
"additionalProperties": {
|
|
484
|
+
"type": "object"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"roleAreas": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"description": "Page paths only some roles may open: {\"/kasse\": [\"treasurer\"]}.",
|
|
490
|
+
"additionalProperties": {
|
|
491
|
+
"type": "array",
|
|
492
|
+
"items": {
|
|
493
|
+
"type": "string"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"roleSource": {
|
|
498
|
+
"type": "object",
|
|
499
|
+
"description": "The permission table that says who holds which role.",
|
|
500
|
+
"properties": {
|
|
501
|
+
"type": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"description": "Where the roles come from."
|
|
504
|
+
},
|
|
505
|
+
"table": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"description": "The table."
|
|
508
|
+
},
|
|
509
|
+
"match": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"description": "What a row is matched on."
|
|
512
|
+
},
|
|
513
|
+
"matchColumn": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"description": "The column matched."
|
|
516
|
+
},
|
|
517
|
+
"roleColumn": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"description": "The column holding the role."
|
|
520
|
+
},
|
|
521
|
+
"activeColumn": {
|
|
522
|
+
"type": "string",
|
|
523
|
+
"description": "The column that switches a row off."
|
|
524
|
+
},
|
|
525
|
+
"attributeColumns": {
|
|
526
|
+
"type": "array",
|
|
527
|
+
"items": {
|
|
528
|
+
"type": "string"
|
|
529
|
+
},
|
|
530
|
+
"description": "Columns read as $visitor.<attribute>."
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"additionalProperties": false
|
|
534
|
+
},
|
|
535
|
+
"legal": {
|
|
536
|
+
"type": "object",
|
|
537
|
+
"description": "The app's privacy notice and imprint, shown on every page.",
|
|
538
|
+
"properties": {
|
|
539
|
+
"privacyUrl": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"description": "Privacy notice address.",
|
|
542
|
+
"format": "uri"
|
|
543
|
+
},
|
|
544
|
+
"imprintUrl": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"description": "Imprint address.",
|
|
547
|
+
"format": "uri"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"additionalProperties": false
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"patternProperties": {
|
|
554
|
+
"^_": {
|
|
555
|
+
"description": "A note; ignored."
|
|
556
|
+
},
|
|
557
|
+
"^serverFunctions$": {
|
|
558
|
+
"not": {},
|
|
559
|
+
"description": "Reserved for server functions of web apps built in code, which are not enabled yet. The gateway refuses a config.json that has this key (like every key it does not know), so the build is not uploaded. Server code lives in the build's src/server/ folder once the feature exists; until then that folder is refused too.",
|
|
560
|
+
"errorMessage": "serverFunctions is reserved: server functions are not enabled yet, and the gateway refuses this key."
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"additionalProperties": false
|
|
564
|
+
}
|