@adminiumjs/adminium 0.3.44 → 0.3.45
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/add-ons/bundled-pins.js +13 -13
- package/dist/apps/sample-data.d.ts +7 -0
- package/dist/apps/sample-data.d.ts.map +1 -1
- package/dist/apps/sample-data.js +9 -0
- package/dist/apps/sample-data.js.map +1 -1
- package/dist/apps/screens-only.d.ts +3 -1
- package/dist/apps/screens-only.d.ts.map +1 -1
- package/dist/apps/screens-only.js +6 -0
- package/dist/apps/screens-only.js.map +1 -1
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +4 -3
- package/dist/compose.js.map +1 -1
- package/dist/crud/code-lookup.d.ts.map +1 -1
- package/dist/crud/code-lookup.js +2 -1
- package/dist/crud/code-lookup.js.map +1 -1
- package/dist/crud/column-rules.d.ts +2 -0
- package/dist/crud/column-rules.d.ts.map +1 -1
- package/dist/crud/column-rules.js +1 -0
- package/dist/crud/column-rules.js.map +1 -1
- package/dist/crud/formulas.d.ts.map +1 -1
- package/dist/crud/formulas.js +6 -3
- package/dist/crud/formulas.js.map +1 -1
- package/dist/crud/unbuilt-rules.d.ts.map +1 -1
- package/dist/crud/unbuilt-rules.js +2 -0
- package/dist/crud/unbuilt-rules.js.map +1 -1
- package/dist/crud/write-service.d.ts.map +1 -1
- package/dist/crud/write-service.js +4 -7
- package/dist/crud/write-service.js.map +1 -1
- package/dist/email/document.d.ts.map +1 -1
- package/dist/email/document.js +18 -2
- package/dist/email/document.js.map +1 -1
- package/dist/email/file-reach.d.ts +0 -16
- package/dist/email/file-reach.d.ts.map +1 -1
- package/dist/email/file-reach.js +3 -1
- package/dist/email/file-reach.js.map +1 -1
- package/dist/email/render.d.ts +10 -1
- package/dist/email/render.d.ts.map +1 -1
- package/dist/email/render.js +12 -2
- package/dist/email/render.js.map +1 -1
- package/dist/email/send.d.ts +6 -0
- package/dist/email/send.d.ts.map +1 -1
- package/dist/email/send.js +9 -2
- package/dist/email/send.js.map +1 -1
- package/dist/email/types.d.ts +4 -1
- package/dist/email/types.d.ts.map +1 -1
- package/dist/jobs/email-send.d.ts.map +1 -1
- package/dist/jobs/email-send.js +18 -4
- package/dist/jobs/email-send.js.map +1 -1
- package/dist/outbox/row-pictures.d.ts +24 -0
- package/dist/outbox/row-pictures.d.ts.map +1 -0
- package/dist/outbox/row-pictures.js +99 -0
- package/dist/outbox/row-pictures.js.map +1 -0
- package/dist/outbox/sender.d.ts.map +1 -1
- package/dist/outbox/sender.js +15 -3
- package/dist/outbox/sender.js.map +1 -1
- package/dist/public-api/claim-code.d.ts.map +1 -1
- package/dist/public-api/claim-code.js +2 -1
- package/dist/public-api/claim-code.js.map +1 -1
- package/dist/routes/add-ons/index.d.ts.map +1 -1
- package/dist/routes/add-ons/index.js +4 -2
- package/dist/routes/add-ons/index.js.map +1 -1
- package/dist/routes/apps/index.d.ts.map +1 -1
- package/dist/routes/apps/index.js +4 -2
- package/dist/routes/apps/index.js.map +1 -1
- package/node_modules/@adminium/adapter-mysql/dist/index.d.ts +1 -1
- package/node_modules/@adminium/adapter-mysql/dist/index.d.ts.map +1 -1
- package/node_modules/@adminium/adapter-mysql/dist/index.js +1 -1
- package/node_modules/@adminium/adapter-mysql/dist/index.js.map +1 -1
- package/node_modules/@adminium/adapter-mysql/dist/introspect.d.ts +7 -0
- package/node_modules/@adminium/adapter-mysql/dist/introspect.d.ts.map +1 -1
- package/node_modules/@adminium/adapter-mysql/dist/introspect.js +53 -1
- package/node_modules/@adminium/adapter-mysql/dist/introspect.js.map +1 -1
- package/node_modules/@adminium/adapter-mysql/package.json +1 -1
- package/node_modules/@adminium/adapter-postgres/package.json +1 -1
- package/node_modules/@adminium/adapter-sqlite/package.json +1 -1
- package/node_modules/@adminium/add-on-contracts/package.json +1 -1
- package/node_modules/@adminium/engine/package.json +1 -1
- package/node_modules/@adminium/i18n/package.json +1 -1
- package/node_modules/@adminium/llm/package.json +1 -1
- package/node_modules/@adminium/manifest/dist/formula.d.ts +33 -1
- package/node_modules/@adminium/manifest/dist/formula.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/formula.js +40 -4
- package/node_modules/@adminium/manifest/dist/formula.js.map +1 -1
- package/node_modules/@adminium/manifest/dist/index.d.ts +3 -3
- package/node_modules/@adminium/manifest/dist/index.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/index.js +3 -3
- package/node_modules/@adminium/manifest/dist/index.js.map +1 -1
- package/node_modules/@adminium/manifest/dist/outbox.d.ts +8 -0
- package/node_modules/@adminium/manifest/dist/outbox.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/outbox.js +52 -1
- package/node_modules/@adminium/manifest/dist/outbox.js.map +1 -1
- package/node_modules/@adminium/manifest/dist/placeholders.d.ts +8 -0
- package/node_modules/@adminium/manifest/dist/placeholders.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/placeholders.js +14 -0
- package/node_modules/@adminium/manifest/dist/placeholders.js.map +1 -1
- package/node_modules/@adminium/manifest/dist/schema.d.ts +30 -30
- package/node_modules/@adminium/manifest/dist/words.d.ts +1 -1
- package/node_modules/@adminium/manifest/dist/words.d.ts.map +1 -1
- package/node_modules/@adminium/manifest/dist/words.js +6 -0
- package/node_modules/@adminium/manifest/dist/words.js.map +1 -1
- package/node_modules/@adminium/manifest/package.json +1 -1
- package/node_modules/@adminium/meta/package.json +1 -1
- package/node_modules/@adminium/schema-import/package.json +1 -1
- package/node_modules/@adminium/widgets/package.json +1 -1
- package/package.json +12 -12
- package/skills/adminium/references/cli/overview.md +1 -1
- package/skills/adminium/references/projects/folder--package-json.md +1 -1
- package/skills/adminium-add-ons/references/catalogue/add-ons.md +13 -13
- package/skills/adminium-add-ons/references/cli/overview.md +1 -1
- package/skills/adminium-add-ons/references/guides/INDEX.md +2 -2
- package/skills/adminium-add-ons/references/guides/emails--emails-that-list-rows.md +30 -0
- package/skills/adminium-add-ons/references/guides/emails--sending.md +1 -0
- package/skills/adminium-app/references/cli/overview.md +1 -1
- package/skills/adminium-app/references/guides/INDEX-2.md +2 -2
- package/skills/adminium-app/references/guides/INDEX.md +2 -2
- package/skills/adminium-app/references/guides/emails--emails-that-list-rows.md +30 -0
- package/skills/adminium-app/references/guides/emails--sending.md +1 -0
- package/skills/adminium-app/references/guides/roles-and-staff-access--people-who-only-use-the-app.md +5 -1
- package/skills/adminium-app/references/guides/sample-data--adding-it.md +5 -2
- package/skills/adminium-app/references/manifest/INDEX.md +6 -6
- package/skills/adminium-app/references/manifest/emails--emailtemplates-2.md +12 -0
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-10.md +26 -11
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-11.md +11 -25
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-12.md +25 -25
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-13.md +25 -0
- package/skills/adminium-app/references/manifest/requiredschema--column-rules-9.md +20 -26
- package/skills/adminium-app/references/manifest/requiredschema--column-rules.md +1 -1
- package/skills/adminium-design/references/cli/overview.md +1 -1
- package/skills/adminium-mobile/references/cli/overview.md +1 -1
- package/skills/adminium-project/references/cli/overview.md +1 -1
- package/skills/adminium-project/references/projects/deploy--docker.md +1 -1
- package/skills/adminium-project/references/projects/deploy--upgrading-adminium.md +2 -2
- package/skills/adminium-project/references/projects/folder--package-json.md +1 -1
- package/skills/adminium-project/references/projects/pull-and-check--check.md +1 -1
- package/skills/adminium-surface/references/cli/overview.md +1 -1
- package/skills/adminium-surface/references/guides/INDEX.md +1 -1
- package/skills/adminium-surface/references/guides/roles-and-staff-access--people-who-only-use-the-app.md +5 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"check": "adminium check",
|
|
12
12
|
"pull": "adminium pull"
|
|
13
13
|
},
|
|
14
|
-
"dependencies": { "@adminiumjs/adminium": "0.3.
|
|
14
|
+
"dependencies": { "@adminiumjs/adminium": "0.3.45" },
|
|
15
15
|
"devDependencies": { "esbuild": "^0.28.0", "@types/react": "^19.2.0" }
|
|
16
16
|
}
|
|
17
17
|
```
|
|
@@ -8,19 +8,19 @@ Workspace settings → Add-ons.
|
|
|
8
8
|
|
|
9
9
|
| Key | Version | Package | Fingerprint file |
|
|
10
10
|
|---|---|---|---|
|
|
11
|
-
| `barcode-labels` | 1.0.
|
|
12
|
-
| `customiser` | 1.0.
|
|
13
|
-
| `design-studio` | 1.0.
|
|
14
|
-
| `forms` | 1.0.
|
|
15
|
-
| `holiday-calendars` | 1.0.
|
|
16
|
-
| `import-canva` | 1.0.
|
|
17
|
-
| `inventory` | 1.0.
|
|
18
|
-
| `invoices` | 1.0.
|
|
19
|
-
| `offers` | 1.0.
|
|
20
|
-
| `payments-paypal` | 1.0.
|
|
21
|
-
| `payments-stripe` | 1.0.
|
|
22
|
-
| `personalizer` | 1.0.
|
|
23
|
-
| `shipping-dhl` | 1.0.
|
|
11
|
+
| `barcode-labels` | 1.0.17 | `https://downloads.adminium.dev/add-ons/barcode-labels/barcode-labels-1.0.17.tgz` | `barcode-labels-1.0.17.tgz.integrity` holding `sha512-wd+3864kt8AalTEOJP9ThLBuIpoSB54LjrazlKSh94YsKp6Qee8K9brnq7NF5/7bDFPIAHeFGO0gu86stVwadQ==` |
|
|
12
|
+
| `customiser` | 1.0.17 | `https://downloads.adminium.dev/add-ons/customiser/customiser-1.0.17.tgz` | `customiser-1.0.17.tgz.integrity` holding `sha512-G0fcoC6t663a7jlYb+S8ZYLfwntmCmaC0M9Thw015RaPxNERW3GtXCadjHWSzJaiIgNcxvs4ftLX/A69KcCt4Q==` |
|
|
13
|
+
| `design-studio` | 1.0.17 | `https://downloads.adminium.dev/add-ons/design-studio/design-studio-1.0.17.tgz` | `design-studio-1.0.17.tgz.integrity` holding `sha512-dXY4aC+uHXG1y6v4Jh7zplXxQXMG5DefQztEbEBgkVKg9IcMIj9tuQdEzPboMLSeuYBCfgTMAgd1zOgGuwlT4g==` |
|
|
14
|
+
| `forms` | 1.0.17 | `https://downloads.adminium.dev/add-ons/forms/forms-1.0.17.tgz` | `forms-1.0.17.tgz.integrity` holding `sha512-MSEW5VjcV6cvLEfhKmZzkXS9AoenvIsBKiGYTPulQ28wHjDols8C8DW9UngXAmaINcLwo8Mq/xOiHEsufnYVCw==` |
|
|
15
|
+
| `holiday-calendars` | 1.0.17 | `https://downloads.adminium.dev/add-ons/holiday-calendars/holiday-calendars-1.0.17.tgz` | `holiday-calendars-1.0.17.tgz.integrity` holding `sha512-egm51UBaXW8JcCsBkuThnXmXQvae5rP2zetLNE1rPnDem5JWAADV0/QJjxYisOVyaE1Yj6BRdLotyJF7pMUpaw==` |
|
|
16
|
+
| `import-canva` | 1.0.17 | `https://downloads.adminium.dev/add-ons/import-canva/import-canva-1.0.17.tgz` | `import-canva-1.0.17.tgz.integrity` holding `sha512-YKGFA482J2bnI56AdNzO8D2cvjCtbu0T5+RrxVWtKL0CYSqz/o+E0NShSAkGT94CGXxeoMKElLQoJAUTKhpKYQ==` |
|
|
17
|
+
| `inventory` | 1.0.17 | `https://downloads.adminium.dev/add-ons/inventory/inventory-1.0.17.tgz` | `inventory-1.0.17.tgz.integrity` holding `sha512-Eu4YH/1KZe0Ai11K8PJyU6rsB4FUg7ZbFIt6XW/1YLFcOFth97OJ2LXruciSucXs3l6j/5RURwNqcrcLrpTVGw==` |
|
|
18
|
+
| `invoices` | 1.0.17 | `https://downloads.adminium.dev/add-ons/invoices/invoices-1.0.17.tgz` | `invoices-1.0.17.tgz.integrity` holding `sha512-u6bFbBpBru1FK/9LBAT1GJTDjkJmGWBNgMqSB2ce1yz3B4Obp09pZAK7sb2RCNPMDrIGCSMuCqcMHEsBrf9FxA==` |
|
|
19
|
+
| `offers` | 1.0.17 | `https://downloads.adminium.dev/add-ons/offers/offers-1.0.17.tgz` | `offers-1.0.17.tgz.integrity` holding `sha512-+ABEAawIJ1HWfLLRbGCF3p/Lhm3JQS1r51s/jp/CWEUarn2DpRaitI2LGpHnEUHf8XkUjdRFBtOMDYqeZ4ckSg==` |
|
|
20
|
+
| `payments-paypal` | 1.0.17 | `https://downloads.adminium.dev/add-ons/payments-paypal/payments-paypal-1.0.17.tgz` | `payments-paypal-1.0.17.tgz.integrity` holding `sha512-pIuGC7IxXXZ0kMquZ6MaGsTLGFehTae+a6olZefOEHwM2oat176HGua0smFYtd2G767Nqe2l+cOEJJ0JRnxwFw==` |
|
|
21
|
+
| `payments-stripe` | 1.0.17 | `https://downloads.adminium.dev/add-ons/payments-stripe/payments-stripe-1.0.17.tgz` | `payments-stripe-1.0.17.tgz.integrity` holding `sha512-1ZV3zDYAyUZgGGVcCD7Xmq+02TO9nX64eFpaSCKf5O6OOO9bmgDC327x3H1hO17sJAPdeLtDsqOphFXjGw3FXw==` |
|
|
22
|
+
| `personalizer` | 1.0.17 | `https://downloads.adminium.dev/add-ons/personalizer/personalizer-1.0.17.tgz` | `personalizer-1.0.17.tgz.integrity` holding `sha512-yjqUnLK366g6zAaxA1gR3qsASrcp2e81yWNE0aiBT6SMgppnv2K3D3707RBTlhbzPLuQYCTmmWI7cvALO8HJ8A==` |
|
|
23
|
+
| `shipping-dhl` | 1.0.17 | `https://downloads.adminium.dev/add-ons/shipping-dhl/shipping-dhl-1.0.17.tgz` | `shipping-dhl-1.0.17.tgz.integrity` holding `sha512-01OKLiajWXt33TYLMaaQWPwMQHzxuL1zV/Xul2bOv3UgSPPHp/7zCOtGIxGLLEkihD7fwxXc61W16XqDzlpeWg==` |
|
|
24
24
|
|
|
25
25
|
The key is what an app writes in `manifest/add-ons.json`. To give `adminium app try` an add-on,
|
|
26
26
|
put its `.tgz` and a `.tgz.integrity` file holding the fingerprint above in one folder and pass
|
|
@@ -15,7 +15,7 @@ the only correct install spec (`npx @adminiumjs/adminium`); the binary it
|
|
|
15
15
|
installs is `adminium`. The unscoped npm name `adminium` is an unrelated
|
|
16
16
|
third-party package, so never run `npx adminium`.
|
|
17
17
|
|
|
18
|
-
On a server, add the version (`npx @adminiumjs/adminium@0.3.
|
|
18
|
+
On a server, add the version (`npx @adminiumjs/adminium@0.3.45 start`). Without
|
|
19
19
|
one, npx installs any newer release it finds, and with no terminal attached it
|
|
20
20
|
does so without asking. See
|
|
21
21
|
[A VPS without Docker](https://docs.adminium.dev/self-hosting/vps/) for a pinned install under systemd,
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
| `references/guides/emails--what-queues-a-row.md` | What queues a row | 6745 |
|
|
26
26
|
| `references/guides/emails--messages-about-changes.md` | Messages about changes | 4152 |
|
|
27
27
|
| `references/guides/emails--messages-about-a-row-that-is-removed.md` | Messages about a row that is removed | 4950 |
|
|
28
|
-
| `references/guides/emails--sending.md` | Sending |
|
|
28
|
+
| `references/guides/emails--sending.md` | Sending | 4391 |
|
|
29
29
|
| `references/guides/emails--held-messages.md` | Held messages | 1454 |
|
|
30
30
|
| `references/guides/emails--attachments.md` | Attachments | 1887 |
|
|
31
31
|
| `references/guides/emails--the-templates.md` | The templates | 1273 |
|
|
32
32
|
| `references/guides/emails--variables.md` | Variables | 7565 |
|
|
33
33
|
| `references/guides/emails--variables--the-person-a-staff-column-names.md` | Variables — The person a staff column names | 1053 |
|
|
34
|
-
| `references/guides/emails--emails-that-list-rows.md` | Emails that list rows |
|
|
34
|
+
| `references/guides/emails--emails-that-list-rows.md` | Emails that list rows | 7245 |
|
|
35
35
|
| `references/guides/emails--links.md` | Links | 850 |
|
|
36
36
|
| `references/guides/emails--upgrading.md` | Upgrading | 1762 |
|
|
37
37
|
| `references/guides/postings--overview.md` | Rows that post into an add-on's ledger | 874 |
|
|
@@ -105,3 +105,33 @@ empty draws no image.
|
|
|
105
105
|
A code is a door credential. Its text stays inside the sealed message while it waits in the mail
|
|
106
106
|
queue, never in the job's plain payload, and the rules for [codes](https://docs.adminium.dev/guides/apps/emails/#variables) hold for a QR code as
|
|
107
107
|
for any other value: one that opens a shared link goes only to the person it belongs to.
|
|
108
|
+
|
|
109
|
+
### Pictures from a row
|
|
110
|
+
|
|
111
|
+
An image may show the picture a row keeps in a [file column](https://docs.adminium.dev/reference/manifest/#files-in-a-column):
|
|
112
|
+
a repair's photo in the message about the repair. Its `fileId` is the column, as one placeholder
|
|
113
|
+
and nothing else, for a row the message reads through one of the outbox's links (or a row one of
|
|
114
|
+
them points at):
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{ "block": "email.image", "data": { "fileId": "{{job.photo}}", "alt": "Your repair" } }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The column is a `text` column with a `file` rule that takes pictures (`png`, `jpeg`, `gif` or
|
|
121
|
+
`webp`), holding one file. It is never a secret, personal or withheld column: those are refused
|
|
122
|
+
when the app is installed, as is a row the message does not read, a row of a list
|
|
123
|
+
(`{{row.photo}}`), and a placeholder beside other text or with a backup.
|
|
124
|
+
|
|
125
|
+
Each message checks its picture against the row it reads it through before it is queued. The file
|
|
126
|
+
must be an upload that row has claimed (not one waiting to be saved, not another row's, whatever
|
|
127
|
+
id the column holds), not in the bin, a png, jpeg, gif or webp, and at most **2 MB**. Only a
|
|
128
|
+
picture that passes travels with the message, as an image inside it (`cid:`), the way a picture
|
|
129
|
+
from Files does, and it is weighed again when the message is delivered: one grown past 2 MB since
|
|
130
|
+
is not sent.
|
|
131
|
+
|
|
132
|
+
A picture that does not pass is left out, and the message goes without it. With
|
|
133
|
+
`"required": true` the message is not sent instead, and says why: "Not sent: the picture
|
|
134
|
+
{{job.photo}} is not a file of this row" ("holds no picture", "is a file that is gone", "is not a
|
|
135
|
+
picture (png, jpeg, gif or webp)", "is larger than 2 MB", "is not shown to this reader"). A
|
|
136
|
+
message about no row at all fails as for any value: "Not sent: nothing fills {{job.photo}}".
|
|
137
|
+
Needs Adminium 0.3.45.
|
|
@@ -32,6 +32,7 @@ Then the row's status changes, with a sentence in its error column:
|
|
|
32
32
|
| `failed` | Email is not set up on this server | Set up email, then queue the row again. |
|
|
33
33
|
| `failed` | Not sent: the email lists rows from a table or link that is not there | A list's table, link or column is gone, for example renamed. See [Emails that list rows](https://docs.adminium.dev/guides/apps/emails/#emails-that-list-rows). |
|
|
34
34
|
| `failed` | Not sent: {{…}} holds more than a QR code carries (64 bytes) | A code drawn as a QR code is longer than one carries. See [QR codes](https://docs.adminium.dev/guides/apps/emails/#qr-codes). |
|
|
35
|
+
| `failed` | Not sent: the picture {{…}} *reason* | A `required` picture from a row could not be shown: no file in the column, another row's file, one in the bin, no picture, larger than 2 MB, or not shown to this reader. See [Pictures from a row](https://docs.adminium.dev/guides/apps/emails/#pictures-from-a-row). |
|
|
35
36
|
| `failed` | Not sent: the values before the change are more than the outbox keeps | See [Messages about changes](https://docs.adminium.dev/guides/apps/emails/#messages-about-changes). |
|
|
36
37
|
| `failed` | The email could not be prepared | Something else went wrong; the server log says what. |
|
|
37
38
|
| `failed` | Not delivered: *reason* | The mail server refused it for good, after its retries. |
|
|
@@ -15,7 +15,7 @@ the only correct install spec (`npx @adminiumjs/adminium`); the binary it
|
|
|
15
15
|
installs is `adminium`. The unscoped npm name `adminium` is an unrelated
|
|
16
16
|
third-party package, so never run `npx adminium`.
|
|
17
17
|
|
|
18
|
-
On a server, add the version (`npx @adminiumjs/adminium@0.3.
|
|
18
|
+
On a server, add the version (`npx @adminiumjs/adminium@0.3.45 start`). Without
|
|
19
19
|
one, npx installs any newer release it finds, and with no terminal attached it
|
|
20
20
|
does so without asking. See
|
|
21
21
|
[A VPS without Docker](https://docs.adminium.dev/self-hosting/vps/) for a pinned install under systemd,
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
| `references/guides/emails--what-queues-a-row.md` | What queues a row | 6745 |
|
|
63
63
|
| `references/guides/emails--messages-about-changes.md` | Messages about changes | 4152 |
|
|
64
64
|
| `references/guides/emails--messages-about-a-row-that-is-removed.md` | Messages about a row that is removed | 4950 |
|
|
65
|
-
| `references/guides/emails--sending.md` | Sending |
|
|
65
|
+
| `references/guides/emails--sending.md` | Sending | 4391 |
|
|
66
66
|
| `references/guides/emails--held-messages.md` | Held messages | 1454 |
|
|
67
67
|
| `references/guides/emails--attachments.md` | Attachments | 1887 |
|
|
68
68
|
| `references/guides/emails--the-templates.md` | The templates | 1273 |
|
|
69
69
|
| `references/guides/emails--variables.md` | Variables | 7565 |
|
|
70
70
|
| `references/guides/emails--variables--the-person-a-staff-column-names.md` | Variables — The person a staff column names | 1053 |
|
|
71
|
-
| `references/guides/emails--emails-that-list-rows.md` | Emails that list rows |
|
|
71
|
+
| `references/guides/emails--emails-that-list-rows.md` | Emails that list rows | 7245 |
|
|
72
72
|
| `references/guides/emails--links.md` | Links | 850 |
|
|
73
73
|
| `references/guides/emails--upgrading.md` | Upgrading | 1762 |
|
|
74
74
|
| `references/guides/public-access--overview.md` | An app's public access | 539 |
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| `references/guides/manifest-by-task--values-adminium-fills-in.md` | Values Adminium fills in | 2712 |
|
|
28
28
|
| `references/guides/manifest-by-task--things-a-manifest-cannot-do.md` | Things a manifest cannot do | 941 |
|
|
29
29
|
| `references/guides/sample-data--overview.md` | Sample data | 414 |
|
|
30
|
-
| `references/guides/sample-data--adding-it.md` | Adding it |
|
|
30
|
+
| `references/guides/sample-data--adding-it.md` | Adding it | 4036 |
|
|
31
31
|
| `references/guides/sample-data--sample-times-that-follow-the-calendar.md` | Sample times that follow the calendar | 2543 |
|
|
32
32
|
| `references/guides/sample-data--rows-for-an-add-on-the-app-names.md` | Rows for an add-on the app names | 4975 |
|
|
33
33
|
| `references/guides/sample-data--sample-people.md` | Sample people | 1893 |
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
| `references/guides/roles-and-staff-access--personal-data.md` | Personal data | 1375 |
|
|
41
41
|
| `references/guides/roles-and-staff-access--edits-limited-to-some-columns.md` | Edits limited to some columns | 2384 |
|
|
42
42
|
| `references/guides/roles-and-staff-access--reads-limited-to-some-columns.md` | Reads limited to some columns | 2210 |
|
|
43
|
-
| `references/guides/roles-and-staff-access--people-who-only-use-the-app.md` | People who only use the app |
|
|
43
|
+
| `references/guides/roles-and-staff-access--people-who-only-use-the-app.md` | People who only use the app | 2974 |
|
|
44
44
|
| `references/guides/roles-and-staff-access--someone-without-access.md` | Someone without access | 902 |
|
|
45
45
|
| `references/guides/roles-and-staff-access--signing-in-on-the-app-s-own-address.md` | Signing in on the app's own address | 1762 |
|
|
46
46
|
| `references/guides/settings--overview.md` | An app's settings page | 769 |
|
|
@@ -105,3 +105,33 @@ empty draws no image.
|
|
|
105
105
|
A code is a door credential. Its text stays inside the sealed message while it waits in the mail
|
|
106
106
|
queue, never in the job's plain payload, and the rules for [codes](https://docs.adminium.dev/guides/apps/emails/#variables) hold for a QR code as
|
|
107
107
|
for any other value: one that opens a shared link goes only to the person it belongs to.
|
|
108
|
+
|
|
109
|
+
### Pictures from a row
|
|
110
|
+
|
|
111
|
+
An image may show the picture a row keeps in a [file column](https://docs.adminium.dev/reference/manifest/#files-in-a-column):
|
|
112
|
+
a repair's photo in the message about the repair. Its `fileId` is the column, as one placeholder
|
|
113
|
+
and nothing else, for a row the message reads through one of the outbox's links (or a row one of
|
|
114
|
+
them points at):
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{ "block": "email.image", "data": { "fileId": "{{job.photo}}", "alt": "Your repair" } }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The column is a `text` column with a `file` rule that takes pictures (`png`, `jpeg`, `gif` or
|
|
121
|
+
`webp`), holding one file. It is never a secret, personal or withheld column: those are refused
|
|
122
|
+
when the app is installed, as is a row the message does not read, a row of a list
|
|
123
|
+
(`{{row.photo}}`), and a placeholder beside other text or with a backup.
|
|
124
|
+
|
|
125
|
+
Each message checks its picture against the row it reads it through before it is queued. The file
|
|
126
|
+
must be an upload that row has claimed (not one waiting to be saved, not another row's, whatever
|
|
127
|
+
id the column holds), not in the bin, a png, jpeg, gif or webp, and at most **2 MB**. Only a
|
|
128
|
+
picture that passes travels with the message, as an image inside it (`cid:`), the way a picture
|
|
129
|
+
from Files does, and it is weighed again when the message is delivered: one grown past 2 MB since
|
|
130
|
+
is not sent.
|
|
131
|
+
|
|
132
|
+
A picture that does not pass is left out, and the message goes without it. With
|
|
133
|
+
`"required": true` the message is not sent instead, and says why: "Not sent: the picture
|
|
134
|
+
{{job.photo}} is not a file of this row" ("holds no picture", "is a file that is gone", "is not a
|
|
135
|
+
picture (png, jpeg, gif or webp)", "is larger than 2 MB", "is not shown to this reader"). A
|
|
136
|
+
message about no row at all fails as for any value: "Not sent: nothing fills {{job.photo}}".
|
|
137
|
+
Needs Adminium 0.3.45.
|
|
@@ -32,6 +32,7 @@ Then the row's status changes, with a sentence in its error column:
|
|
|
32
32
|
| `failed` | Email is not set up on this server | Set up email, then queue the row again. |
|
|
33
33
|
| `failed` | Not sent: the email lists rows from a table or link that is not there | A list's table, link or column is gone, for example renamed. See [Emails that list rows](https://docs.adminium.dev/guides/apps/emails/#emails-that-list-rows). |
|
|
34
34
|
| `failed` | Not sent: {{…}} holds more than a QR code carries (64 bytes) | A code drawn as a QR code is longer than one carries. See [QR codes](https://docs.adminium.dev/guides/apps/emails/#qr-codes). |
|
|
35
|
+
| `failed` | Not sent: the picture {{…}} *reason* | A `required` picture from a row could not be shown: no file in the column, another row's file, one in the bin, no picture, larger than 2 MB, or not shown to this reader. See [Pictures from a row](https://docs.adminium.dev/guides/apps/emails/#pictures-from-a-row). |
|
|
35
36
|
| `failed` | Not sent: the values before the change are more than the outbox keeps | See [Messages about changes](https://docs.adminium.dev/guides/apps/emails/#messages-about-changes). |
|
|
36
37
|
| `failed` | The email could not be prepared | Something else went wrong; the server log says what. |
|
|
37
38
|
| `failed` | Not delivered: *reason* | The mail server refused it for good, after its retries. |
|
package/skills/adminium-app/references/guides/roles-and-staff-access--people-who-only-use-the-app.md
CHANGED
|
@@ -22,7 +22,11 @@ is sent to the app instead of the dashboard:
|
|
|
22
22
|
into such a column (`POST /api/v1/files/<id>/copy`: a photo a past order has, chosen again; judged
|
|
23
23
|
by the target table's own create or update, never by a files-wide right), read a file back with
|
|
24
24
|
the record that holds it, and throw away one of their own uploads no record holds yet; the list of
|
|
25
|
-
files and the rest of the file routes stay the dashboard's.
|
|
25
|
+
files and the rest of the file routes stay the dashboard's. A screen of their app may show an
|
|
26
|
+
add-on's [record panel](https://docs.adminium.dev/reference/manifest/#a-panel-on-another-tables-record) too (a design kit's panel on an order
|
|
27
|
+
line): its code (`GET /api/v1/add-ons/<add-on>/panels/<panel>/bundle`) is served for an add-on
|
|
28
|
+
connected to their app, and still only for a row they reach, with a grant on the panel's table
|
|
29
|
+
and the panel's own permission (`page:@<panel>:view` in the app's role). Needs Adminium 0.3.45.
|
|
26
30
|
- the [assistant](https://docs.adminium.dev/guides/llm-assist/milo/#on-an-apps-own-staff-address), when an administrator
|
|
27
31
|
has given their role the assistant permission: its button is on the app's staff screens, and it
|
|
28
32
|
answers about their app's data within what their roles read. An app's manifest cannot grant
|
|
@@ -48,5 +48,8 @@ What happens when you confirm:
|
|
|
48
48
|
its sample rows out once that table holds real ones. See
|
|
49
49
|
[A menu two apps share](https://docs.adminium.dev/guides/apps/shared-menu/#sample-data-on-a-shared-menu).
|
|
50
50
|
|
|
51
|
-
The card then reads **Loaded**, with the number of records and the date.
|
|
52
|
-
|
|
51
|
+
The card then reads **Loaded**, with the number of records and the date. It reads so only once the
|
|
52
|
+
whole add has finished, the samples of the add-ons added with it too:
|
|
53
|
+
`GET /api/v1/apps/<key>/sample-data` answers `loaded: false` while the add is queued or running,
|
|
54
|
+
however many records are in by then (Adminium 0.3.45 and later). An app's sample data can be loaded
|
|
55
|
+
once at a time: remove it before adding it again.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| `references/manifest/requiredschema--tables.md` | requiredSchema — Tables | 3445 |
|
|
17
17
|
| `references/manifest/requiredschema--columns.md` | requiredSchema — Columns | 7568 |
|
|
18
18
|
| `references/manifest/requiredschema--columns-2.md` | requiredSchema — Columns (part 2) | 2212 |
|
|
19
|
-
| `references/manifest/requiredschema--column-rules.md` | requiredSchema — Column rules |
|
|
19
|
+
| `references/manifest/requiredschema--column-rules.md` | requiredSchema — Column rules | 7394 |
|
|
20
20
|
| `references/manifest/requiredschema--column-rules-2.md` | requiredSchema — Column rules (part 2) | 7581 |
|
|
21
21
|
| `references/manifest/requiredschema--column-rules-3.md` | requiredSchema — Column rules (part 3) | 6333 |
|
|
22
22
|
| `references/manifest/requiredschema--column-rules-4.md` | requiredSchema — Column rules (part 4) | 7046 |
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
| `references/manifest/requiredschema--column-rules-6.md` | requiredSchema — Column rules (part 6) | 7818 |
|
|
25
25
|
| `references/manifest/requiredschema--column-rules-7.md` | requiredSchema — Column rules (part 7) | 6589 |
|
|
26
26
|
| `references/manifest/requiredschema--column-rules-8.md` | requiredSchema — Column rules (part 8) | 7742 |
|
|
27
|
-
| `references/manifest/requiredschema--column-rules-9.md` | requiredSchema — Column rules (part 9) |
|
|
28
|
-
| `references/manifest/requiredschema--column-rules-10.md` | requiredSchema — Column rules (part 10) |
|
|
29
|
-
| `references/manifest/requiredschema--column-rules-11.md` | requiredSchema — Column rules (part 11) |
|
|
27
|
+
| `references/manifest/requiredschema--column-rules-9.md` | requiredSchema — Column rules (part 9) | 7540 |
|
|
28
|
+
| `references/manifest/requiredschema--column-rules-10.md` | requiredSchema — Column rules (part 10) | 7006 |
|
|
29
|
+
| `references/manifest/requiredschema--column-rules-11.md` | requiredSchema — Column rules (part 11) | 7715 |
|
|
30
30
|
| `references/manifest/requiredschema--column-rules-12.md` | requiredSchema — Column rules (part 12) | 7788 |
|
|
31
|
-
| `references/manifest/requiredschema--column-rules-13.md` | requiredSchema — Column rules (part 13) |
|
|
31
|
+
| `references/manifest/requiredschema--column-rules-13.md` | requiredSchema — Column rules (part 13) | 6600 |
|
|
32
32
|
| `references/manifest/requiredschema--moments.md` | requiredSchema — Moments | 2748 |
|
|
33
33
|
| `references/manifest/requiredschema--capacity.md` | requiredSchema — Capacity | 7647 |
|
|
34
34
|
| `references/manifest/requiredschema--capacity-2.md` | requiredSchema — Capacity (part 2) | 5558 |
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
| `references/manifest/emails--a-survey-s-link.md` | Emails — A survey's link | 4389 |
|
|
82
82
|
| `references/manifest/emails--held-messages.md` | Emails — Held messages | 2873 |
|
|
83
83
|
| `references/manifest/emails--emailtemplates.md` | Emails — emailTemplates | 7062 |
|
|
84
|
-
| `references/manifest/emails--emailtemplates-2.md` | Emails — emailTemplates (part 2) |
|
|
84
|
+
| `references/manifest/emails--emailtemplates-2.md` | Emails — emailTemplates (part 2) | 5774 |
|
|
85
85
|
| `references/manifest/people.md` | People | 979 |
|
|
86
86
|
| `references/manifest/people-2.md` | People (part 2) | 7597 |
|
|
87
87
|
| `references/manifest/public-access.md` | Public access | 2014 |
|
|
@@ -21,6 +21,18 @@ message is delivered, only of a code column, and only for a code of at most 64 b
|
|
|
21
21
|
[withhold](https://docs.adminium.dev/reference/manifest/#withheld-columns) or share-code rules keep from the message's recipient is printed
|
|
22
22
|
empty, in every form, its QR code included.
|
|
23
23
|
|
|
24
|
+
An `email.image` block may show the picture a row keeps in a [file column](https://docs.adminium.dev/reference/manifest/#files-in-a-column):
|
|
25
|
+
`"fileId": "{{<link>.<column>}}"`, the whole value, for a row one of the outbox's links names (or
|
|
26
|
+
`<link>.<base>`, a row it points at). The column is a `text` column whose `file.accept` takes a
|
|
27
|
+
picture (`png`, `jpeg`, `gif`, `webp`), and is never secret, personal (marked, or guessed from its
|
|
28
|
+
name) or withheld; `{{row.…}}`, a placeholder beside other text or with a backup, and a row the
|
|
29
|
+
message does not read are refused. Each message checks the file against the row (an upload that
|
|
30
|
+
row has claimed, not in the bin, a picture, at most 2 MB) and sends only a file that passes, as an
|
|
31
|
+
inline image weighed again at delivery. One that does not is left out, or, with
|
|
32
|
+
`"required": true` on the image, the message fails and says why. See
|
|
33
|
+
[Pictures from a row](https://docs.adminium.dev/guides/apps/emails/#pictures-from-a-row). Needs Adminium 0.3.45
|
|
34
|
+
(`email.rowPicture`).
|
|
35
|
+
|
|
24
36
|
#### Blocks sent only with a value
|
|
25
37
|
|
|
26
38
|
A block's `data` may carry `onlyWith` or `onlyWithout`, the name of one variable the template
|
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
# Manifest spec: requiredSchema — Column rules
|
|
4
4
|
|
|
5
|
+
A `{ "table", "column" }` setting, wherever a rule reads one (a default, a limit's size, a move's
|
|
6
|
+
condition, a moment's time), names a table that holds **one row**: the outbox's
|
|
7
|
+
[`settings.table`](https://docs.adminium.dev/reference/manifest/#outbox), or a table that stands alone, with no foreign key of its own, none
|
|
8
|
+
pointing at it, and no states, limits or booking. Adminium reads that row when the rule runs. A
|
|
9
|
+
moment, a state condition or a stamp's amount that finds two rows there reads nothing rather than
|
|
10
|
+
guess which one is meant.
|
|
11
|
+
|
|
12
|
+
#### Copies that follow
|
|
13
|
+
|
|
14
|
+
A plain `copy` is taken when the row is written. With `"follow": true` it keeps in step: when the
|
|
15
|
+
row it copies from changes, every row that copies it takes the new value in the same write. A
|
|
16
|
+
hotel stay's extras copy the stay's nights and guests, so breakfast for two over three nights
|
|
17
|
+
becomes breakfast for three over four the moment the stay changes.
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{ "ref": "nights", "type": "int", "nullable": true,
|
|
21
|
+
"rules": { "copy": { "via": "stay_id", "from": "nights", "mode": "always", "follow": true } } }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The copy is written, then every formula over it, then the totals it moves are settled into the
|
|
25
|
+
row it follows (the stay's total, tax and balance), before the change commits; if any of that is
|
|
26
|
+
refused, nothing is kept. A paid stay whose balance would fall below zero is refused
|
|
27
|
+
`409` `BALANCE_EXCEEDED`.
|
|
28
|
+
|
|
29
|
+
The rules that keep a follow sound:
|
|
30
|
+
|
|
5
31
|
- it always wins (`mode: "always"`), and follows one level: the column it copies does not itself
|
|
6
32
|
follow another row;
|
|
7
33
|
- it never follows a total, a balance or a stamp, nor a formula over one: those change without a
|
|
@@ -73,14 +99,3 @@ code on a ticket. The browser never names the codes row itself; Adminium finds i
|
|
|
73
99
|
{ "column": "valid_until", "notBefore": "today", "orEmpty": true }],
|
|
74
100
|
"scope": [{ "column": "event_id", "equals": "event_id", "orEmpty": true }] } } }
|
|
75
101
|
```
|
|
76
|
-
|
|
77
|
-
| Field | Rule |
|
|
78
|
-
|---|---|
|
|
79
|
-
| `from` | The nullable `text` column of this row the code is typed into, up to 64 characters, with no rule of its own that decides it. |
|
|
80
|
-
| `table`, `column` | The codes table, and its `text` column the code is found by. The rule's own column is a nullable foreign key to `table`. `column` finds one row: it is `unique`, a [`code`](https://docs.adminium.dev/reference/manifest/#column-rules) column, or unique together with the `scope` columns in one of the table's [sets](https://docs.adminium.dev/reference/manifest/#columns-unique-together). It is compared as a code, so it has `normalize: "code"` unless it is a `code` column. Never the code a shared link opens its row with. |
|
|
81
|
-
| `where` | Up to 4 conditions on the codes row: `{ "column", "eq" }`; `{ "column", "notBefore": "now" or "today", "orEmpty"? }`, a date or time not yet past (`valid_until`); `{ "column", "notAfter": "now" or "today", "orEmpty"? }`, one already reached (`valid_from`). `orEmpty` lets an empty column pass. |
|
|
82
|
-
| `scope` | 1–2 `{ "column", "equals", "orEmpty"? }`: the codes row's `column` equals this row's `equals` column (this show's codes). With `orEmpty`, a codes row whose `column` is empty matches any (a code good for every show). |
|
|
83
|
-
|
|
84
|
-
A typed code is read the way codes are kept: upper case, spaces and dashes left out. A column
|
|
85
|
-
Adminium [makes codes in](https://docs.adminium.dev/reference/manifest/#column-rules) reads it as a claim does, its prefix put back, `O` as `0`,
|
|
86
|
-
`I` and `L` as `1`. Two stored codes that fold alike are told apart by the exact spelling.
|
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
# Manifest spec: requiredSchema — Column rules
|
|
4
4
|
|
|
5
|
+
| Field | Rule |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `from` | The nullable `text` column of this row the code is typed into, up to 64 characters, with no rule of its own that decides it. |
|
|
8
|
+
| `table`, `column` | The codes table, and its `text` column the code is found by. The rule's own column is a nullable foreign key to `table`. `column` finds one row: it is `unique`, a [`code`](https://docs.adminium.dev/reference/manifest/#column-rules) column, or unique together with the `scope` columns in one of the table's [sets](https://docs.adminium.dev/reference/manifest/#columns-unique-together). It is compared as a code, so it has `normalize: "code"` unless it is a `code` column. Never the code a shared link opens its row with. |
|
|
9
|
+
| `where` | Up to 4 conditions on the codes row: `{ "column", "eq" }`; `{ "column", "notBefore": "now" or "today", "orEmpty"? }`, a date or time not yet past (`valid_until`); `{ "column", "notAfter": "now" or "today", "orEmpty"? }`, one already reached (`valid_from`). `orEmpty` lets an empty column pass. |
|
|
10
|
+
| `scope` | 1–2 `{ "column", "equals", "orEmpty"? }`: the codes row's `column` equals this row's `equals` column (this show's codes). With `orEmpty`, a codes row whose `column` is empty matches any (a code good for every show). |
|
|
11
|
+
|
|
12
|
+
A typed code is read the way codes are kept: upper case, spaces and dashes left out. A column
|
|
13
|
+
Adminium [makes codes in](https://docs.adminium.dev/reference/manifest/#column-rules) reads it as a claim does, its prefix put back, `O` as `0`,
|
|
14
|
+
`I` and `L` as `1`. Two stored codes that fold alike are told apart by the exact spelling.
|
|
15
|
+
|
|
5
16
|
Every miss is one answer: no such code, a code switched off, expired, another show's, or two that
|
|
6
17
|
fold alike are all refused `422` `VALIDATION_FAILED` on the typed column with the code `unknown`
|
|
7
18
|
(through the public API, `PUBLIC_WRITE_REFUSED` with `reason: "unknown"`), so a guesser learns no
|
|
@@ -87,28 +98,3 @@ what makes a new code:
|
|
|
87
98
|
{ "ref": "code", "type": "text", "nullable": true,
|
|
88
99
|
"rules": { "code": { "length": 8, "renew": { "on": { "column": "holder_customer_id", "changed": true } } } } }
|
|
89
100
|
```
|
|
90
|
-
|
|
91
|
-
`on` is one trigger or a list of 2–3: `{ "column", "changed": true }`, any change of another
|
|
92
|
-
column of the row, or `{ "column", "values" }`, that column moving to one of 1–16 values (a
|
|
93
|
-
transfer accepted). The watched column is not a code itself, not `json` or `blob`, and a `changed`
|
|
94
|
-
trigger watches a column a person changes or a stamp writes (a holder stamped in as an offer is
|
|
95
|
-
taken renews too).
|
|
96
|
-
|
|
97
|
-
The new code is written in the same statement as the change: the old one stops as the write
|
|
98
|
-
commits, and every session a [token link](https://docs.adminium.dev/reference/manifest/#a-persons-own-rows) on that column opened stops with
|
|
99
|
-
it. What never renews: a create (it makes a code anyway), an import or other history, a change that
|
|
100
|
-
sends back the value the row already holds, and a server action that writes the code itself (a
|
|
101
|
-
[new link](https://docs.adminium.dev/reference/manifest/#a-rows-own-link)). A [timed move's](https://docs.adminium.dev/reference/manifest/#timed-moves) `set` renews like any other change.
|
|
102
|
-
Undoing a change of hands renews once more, so neither the old code nor the one handed on works
|
|
103
|
-
after it; see [Undo of a move](https://docs.adminium.dev/reference/manifest/#undo-of-a-move). A renewed code is never shown to a public caller
|
|
104
|
-
in the change's reply, and only to staff who may read the table.
|
|
105
|
-
|
|
106
|
-
#### Stamps
|
|
107
|
-
|
|
108
|
-
A stamp writes a value when a row is created, or when another column changes to one of a list of
|
|
109
|
-
values: the time a patient checked in, who took a payment.
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{ "ref": "checked_in_at", "type": "timestamptz", "nullable": true,
|
|
113
|
-
"rules": { "stamp": { "set": "now", "on": { "column": "status", "values": ["checked_in"] } } } }
|
|
114
|
-
```
|
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Manifest spec: requiredSchema — Column rules
|
|
4
4
|
|
|
5
|
+
`on` is one trigger or a list of 2–3: `{ "column", "changed": true }`, any change of another
|
|
6
|
+
column of the row, or `{ "column", "values" }`, that column moving to one of 1–16 values (a
|
|
7
|
+
transfer accepted). The watched column is not a code itself, not `json` or `blob`, and a `changed`
|
|
8
|
+
trigger watches a column a person changes or a stamp writes (a holder stamped in as an offer is
|
|
9
|
+
taken renews too).
|
|
10
|
+
|
|
11
|
+
The new code is written in the same statement as the change: the old one stops as the write
|
|
12
|
+
commits, and every session a [token link](https://docs.adminium.dev/reference/manifest/#a-persons-own-rows) on that column opened stops with
|
|
13
|
+
it. What never renews: a create (it makes a code anyway), an import or other history, a change that
|
|
14
|
+
sends back the value the row already holds, and a server action that writes the code itself (a
|
|
15
|
+
[new link](https://docs.adminium.dev/reference/manifest/#a-rows-own-link)). A [timed move's](https://docs.adminium.dev/reference/manifest/#timed-moves) `set` renews like any other change.
|
|
16
|
+
Undoing a change of hands renews once more, so neither the old code nor the one handed on works
|
|
17
|
+
after it; see [Undo of a move](https://docs.adminium.dev/reference/manifest/#undo-of-a-move). A renewed code is never shown to a public caller
|
|
18
|
+
in the change's reply, and only to staff who may read the table.
|
|
19
|
+
|
|
20
|
+
#### Stamps
|
|
21
|
+
|
|
22
|
+
A stamp writes a value when a row is created, or when another column changes to one of a list of
|
|
23
|
+
values: the time a patient checked in, who took a payment.
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{ "ref": "checked_in_at", "type": "timestamptz", "nullable": true,
|
|
27
|
+
"rules": { "stamp": { "set": "now", "on": { "column": "status", "values": ["checked_in"] } } } }
|
|
28
|
+
```
|
|
29
|
+
|
|
5
30
|
| Field | Rule |
|
|
6
31
|
|---|---|
|
|
7
32
|
| `set` | What is written; see the table below. |
|
|
@@ -52,28 +77,3 @@ A public write stamps like any other write, except `user-name` and `user-id`: a
|
|
|
52
77
|
nobody, so they write nothing. What it knows of the person is their own signed-in row, which is
|
|
53
78
|
what `claim` reads. For an automation, `user-name` is the rule's name. Sample data, an app's seed
|
|
54
79
|
rows and undo stamp nothing, since a stamp of today's time over history would be false.
|
|
55
|
-
|
|
56
|
-
A file somebody brings in is different: each line is their own create or their own change. A
|
|
57
|
-
stamp is written into a column the line leaves out or leaves empty, as it would be for a save
|
|
58
|
-
(`now` is the moment of the import, `user-id` and `user-name` are the person who brought the
|
|
59
|
-
file, a `byOrigin` column gets its `staff` value). So a role that may not write `received_at`
|
|
60
|
-
still brings a list of enquiries in, and each row says when it arrived. A value the line does
|
|
61
|
-
carry is kept, where a save would lose it to the stamp: the day an old enquiry really came is
|
|
62
|
-
the file's to say. Whether the person may say it is their role's create limit, which refuses a
|
|
63
|
-
file that carries a column they may not give a new row. A line that changes a stored row (an
|
|
64
|
-
import that updates the rows it matches) fires the stamps a change by hand would, against the
|
|
65
|
-
row as stored: moving a status stamps its moment once, and the same file brought in again
|
|
66
|
-
stamps nothing. A stamped column takes
|
|
67
|
-
no `copy`, `default`, `sequence`, `format`, `code`, `rollup`, `formula`, `lookup`, `band` or `perNight` as
|
|
68
|
-
well, and a stamp watches a column other than its own.
|
|
69
|
-
|
|
70
|
-
A stamp that works out a moment again whenever what it reads changes: a stay may be cancelled
|
|
71
|
-
free until 48 hours before 15:00 on its arrival day, and moving the arrival moves the deadline.
|
|
72
|
-
|
|
73
|
-
```json
|
|
74
|
-
{ "ref": "cancel_by", "type": "timestamptz", "nullable": true,
|
|
75
|
-
"rules": { "stamp": {
|
|
76
|
-
"set": { "moment": { "column": "arrive", "time": { "table": "settings", "column": "arrive_from" },
|
|
77
|
-
"minus": { "hours": { "table": "settings", "column": "cancel_hours" } } } },
|
|
78
|
-
"on": { "columns": ["arrive"] } } } }
|
|
79
|
-
```
|
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Manifest spec: requiredSchema — Column rules
|
|
4
4
|
|
|
5
|
+
A file somebody brings in is different: each line is their own create or their own change. A
|
|
6
|
+
stamp is written into a column the line leaves out or leaves empty, as it would be for a save
|
|
7
|
+
(`now` is the moment of the import, `user-id` and `user-name` are the person who brought the
|
|
8
|
+
file, a `byOrigin` column gets its `staff` value). So a role that may not write `received_at`
|
|
9
|
+
still brings a list of enquiries in, and each row says when it arrived. A value the line does
|
|
10
|
+
carry is kept, where a save would lose it to the stamp: the day an old enquiry really came is
|
|
11
|
+
the file's to say. Whether the person may say it is their role's create limit, which refuses a
|
|
12
|
+
file that carries a column they may not give a new row. A line that changes a stored row (an
|
|
13
|
+
import that updates the rows it matches) fires the stamps a change by hand would, against the
|
|
14
|
+
row as stored: moving a status stamps its moment once, and the same file brought in again
|
|
15
|
+
stamps nothing. A stamped column takes
|
|
16
|
+
no `copy`, `default`, `sequence`, `format`, `code`, `rollup`, `formula`, `lookup`, `band` or `perNight` as
|
|
17
|
+
well, and a stamp watches a column other than its own.
|
|
18
|
+
|
|
19
|
+
A stamp that works out a moment again whenever what it reads changes: a stay may be cancelled
|
|
20
|
+
free until 48 hours before 15:00 on its arrival day, and moving the arrival moves the deadline.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{ "ref": "cancel_by", "type": "timestamptz", "nullable": true,
|
|
24
|
+
"rules": { "stamp": {
|
|
25
|
+
"set": { "moment": { "column": "arrive", "time": { "table": "settings", "column": "arrive_from" },
|
|
26
|
+
"minus": { "hours": { "table": "settings", "column": "cancel_hours" } } } },
|
|
27
|
+
"on": { "columns": ["arrive"] } } } }
|
|
28
|
+
```
|
|
29
|
+
|
|
5
30
|
An offer that lasts as many hours as the settings row says, but never past the show's doors:
|
|
6
31
|
|
|
7
32
|
```json
|
|
@@ -17,6 +17,26 @@ is the text between it and its neighbour, so a guest with no last name is "Mia",
|
|
|
17
17
|
result is trimmed, and empty when every column is. A join is the whole formula of its column,
|
|
18
18
|
never a part of a sum.
|
|
19
19
|
|
|
20
|
+
A join with a `normalize` rule is kept as the rule says, the way a typed value is. A sample
|
|
21
|
+
request's `address_key`, a join over the postcode and the first line kept as a code, is
|
|
22
|
+
`SL71BT12QUAYSTREET` however the address is typed, so a `unique` key on it refuses the same
|
|
23
|
+
address in another case:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{ "ref": "address_key", "type": "text", "maxLength": 160, "nullable": true, "unique": true,
|
|
27
|
+
"rules": { "formula": { "join": ["postcode", "address_line1"] }, "normalize": "code" } }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
It is kept so wherever the join is worked out: a create, an edit of a column it reads, a total
|
|
31
|
+
that moves under it, and an update that fills it for the rows already there. A row written
|
|
32
|
+
before keeps its key until one of those works it out again. Needs Adminium 0.3.45; before it,
|
|
33
|
+
only a join over a running number was kept so, and any other kept as it was worked out.
|
|
34
|
+
|
|
35
|
+
An app that works its formulas out itself, in a demo with no server, keeps the same value by
|
|
36
|
+
passing the column's rules to the evaluator: `evaluateFormula(expr, row, scale, formulaKeepOf(column))`
|
|
37
|
+
from `@adminium/manifest` applies the `normalize` rule, then cuts a join to the column's length,
|
|
38
|
+
as the server does. Needs `@adminium/manifest` 0.3.45.
|
|
39
|
+
|
|
20
40
|
A join that reads personal data lands it only in a personal column. A guest's first and last
|
|
21
41
|
names beside their email read as personal by their names, so the joined name needs
|
|
22
42
|
`"personal": true` too; without it the check refuses the manifest. The same holds for a `copy`
|
|
@@ -108,29 +128,3 @@ made:
|
|
|
108
128
|
The same three settings (the last two) are what `sequence.startSetting` and `format.prefixSetting`
|
|
109
129
|
read. A column with a `default` rule is nullable: when there is nothing to read, it stays empty
|
|
110
130
|
rather than taking a made-up value. An update never refills it.
|
|
111
|
-
|
|
112
|
-
A `{ "table", "column" }` setting, wherever a rule reads one (a default, a limit's size, a move's
|
|
113
|
-
condition, a moment's time), names a table that holds **one row**: the outbox's
|
|
114
|
-
[`settings.table`](https://docs.adminium.dev/reference/manifest/#outbox), or a table that stands alone, with no foreign key of its own, none
|
|
115
|
-
pointing at it, and no states, limits or booking. Adminium reads that row when the rule runs. A
|
|
116
|
-
moment, a state condition or a stamp's amount that finds two rows there reads nothing rather than
|
|
117
|
-
guess which one is meant.
|
|
118
|
-
|
|
119
|
-
#### Copies that follow
|
|
120
|
-
|
|
121
|
-
A plain `copy` is taken when the row is written. With `"follow": true` it keeps in step: when the
|
|
122
|
-
row it copies from changes, every row that copies it takes the new value in the same write. A
|
|
123
|
-
hotel stay's extras copy the stay's nights and guests, so breakfast for two over three nights
|
|
124
|
-
becomes breakfast for three over four the moment the stay changes.
|
|
125
|
-
|
|
126
|
-
```json
|
|
127
|
-
{ "ref": "nights", "type": "int", "nullable": true,
|
|
128
|
-
"rules": { "copy": { "via": "stay_id", "from": "nights", "mode": "always", "follow": true } } }
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
The copy is written, then every formula over it, then the totals it moves are settled into the
|
|
132
|
-
row it follows (the stay's total, tax and balance), before the change commits; if any of that is
|
|
133
|
-
refused, nothing is kept. A paid stay whose balance would fall below zero is refused
|
|
134
|
-
`409` `BALANCE_EXCEEDED`.
|
|
135
|
-
|
|
136
|
-
The rules that keep a follow sound:
|
|
@@ -21,6 +21,6 @@ change or delete is theirs from then on.
|
|
|
21
21
|
| `format` | `{ "from", "prefix"?, "prefixSetting"?, "pad"? }` | A `text` column written from a running number of the same row, gapless or not: the prefix, then the digits padded with zeros (`INV-0042`). See [Numbers without gaps](https://docs.adminium.dev/reference/manifest/#numbers-without-gaps). |
|
|
22
22
|
| `code` | `{ "length", "prefix"?, "renew"?, "hiddenFromStaff"?, "givenByLedger"? }` | A short random code, unique in the column. `renew` makes a new one when the row changes hands; see [Codes that renew](https://docs.adminium.dev/reference/manifest/#codes-that-renew). `length` is 4–16; `prefix` is upper case, up to 6 characters plus an optional `-` (`MR-`). A create that leaves it out or empty gets one, a sample row or an import too; a code they bring is kept, but a sample's code for a shared link's `column` is always made anew. A code is no secret by its rule alone: a name that reads like one (`share_token`) keeps it one, unless `secret: false` says otherwise or it is the column a shared link opens a row by, on a table the install made, which staff who read the table see. The public sees a code only where an entry's `select` names it, and a shared link's never. The audit log and the automation logs say `[code]` in its place, and the assistant never reads it. `hiddenFromStaff: true`: a code no desk hands out (an online order's own link) is left out of every staff read, for every role and Super Admin too: rows, exports, live updates and the history. The link still opens its row, and the app's emails still carry it to the row's holder. Such a code is kept as a shared link's code is, whether or not an entry claims by it yet: no column copies it (a `copy`, a stamp's copy, a formula), no total keeps it as the newest child row's value (`rollup.latest`), no `codeLast4` keeps its last four, no posting copies it into a ledger (its `map`, from the row or its parent), and no public entry shows, filters or orders by it. The manifest check refuses each one, and so does the server when somebody saves such a rule on the schema or makes such an API endpoint (`ENDPOINT_SHARE_CODE_READ`). A rule never carries it: a rule's step or e-mail template that names it (`{{record.x}}`, `{{x}}`, `{{was.x}}`, a linked row's `{{link.x}}`) is refused by the validator and when a rule is saved, the column named. `givenByLedger: true`, on a table of an add-on: a row the add-on's own [ledger](https://docs.adminium.dev/reference/manifest/#ledgers) adds may bring its code (an older gift card, under the code its holder has always had). It is kept when it is the prefix, then 4 to 16 capital letters and digits, fits the column and no other row has it, and refused otherwise; with none given Adminium makes one. No person's save gains anything by it, and a change never writes a code. |
|
|
23
23
|
| `formula` | an expression | A number worked out from the row's other columns on every write. See [Formulas](https://docs.adminium.dev/reference/manifest/#formulas). |
|
|
24
|
-
| `normalize` | `"trim"`, `"email"` or `"code"` | How a `text` value is kept: `trim` without spaces at either end, `email` trimmed and in lower case, `code` compared as a code (upper case, spaces and dashes left out) when a person types one; see [Typed codes](https://docs.adminium.dev/reference/manifest/#typed-codes). |
|
|
24
|
+
| `normalize` | `"trim"`, `"email"` or `"code"` | How a `text` value is kept: `trim` without spaces at either end, `email` trimmed and in lower case, `code` compared as a code (upper case, spaces and dashes left out) when a person types one; see [Typed codes](https://docs.adminium.dev/reference/manifest/#typed-codes). On a [`join`](https://docs.adminium.dev/reference/manifest/#joined-text) column the joined text is kept that way. |
|
|
25
25
|
| `lookup` | `{ "from", "table", "column", "where"?, "scope"? }` | A foreign key filled from a code a person types into another column: a discount code, a presale code. See [Typed codes](https://docs.adminium.dev/reference/manifest/#typed-codes). |
|
|
26
26
|
| `band` | `{ "table", "min", "max"?, "value", "scope"?, "over"? }` | A foreign key filled with the band a number of the row falls in: a line's quantity among its product's price breaks, an order's weight among the delivery bands. See [Bands](https://docs.adminium.dev/reference/manifest/#bands). |
|
|
@@ -15,7 +15,7 @@ the only correct install spec (`npx @adminiumjs/adminium`); the binary it
|
|
|
15
15
|
installs is `adminium`. The unscoped npm name `adminium` is an unrelated
|
|
16
16
|
third-party package, so never run `npx adminium`.
|
|
17
17
|
|
|
18
|
-
On a server, add the version (`npx @adminiumjs/adminium@0.3.
|
|
18
|
+
On a server, add the version (`npx @adminiumjs/adminium@0.3.45 start`). Without
|
|
19
19
|
one, npx installs any newer release it finds, and with no terminal attached it
|
|
20
20
|
does so without asking. See
|
|
21
21
|
[A VPS without Docker](https://docs.adminium.dev/self-hosting/vps/) for a pinned install under systemd,
|
|
@@ -15,7 +15,7 @@ the only correct install spec (`npx @adminiumjs/adminium`); the binary it
|
|
|
15
15
|
installs is `adminium`. The unscoped npm name `adminium` is an unrelated
|
|
16
16
|
third-party package, so never run `npx adminium`.
|
|
17
17
|
|
|
18
|
-
On a server, add the version (`npx @adminiumjs/adminium@0.3.
|
|
18
|
+
On a server, add the version (`npx @adminiumjs/adminium@0.3.45 start`). Without
|
|
19
19
|
one, npx installs any newer release it finds, and with no terminal attached it
|
|
20
20
|
does so without asking. See
|
|
21
21
|
[A VPS without Docker](https://docs.adminium.dev/self-hosting/vps/) for a pinned install under systemd,
|
|
@@ -15,7 +15,7 @@ the only correct install spec (`npx @adminiumjs/adminium`); the binary it
|
|
|
15
15
|
installs is `adminium`. The unscoped npm name `adminium` is an unrelated
|
|
16
16
|
third-party package, so never run `npx adminium`.
|
|
17
17
|
|
|
18
|
-
On a server, add the version (`npx @adminiumjs/adminium@0.3.
|
|
18
|
+
On a server, add the version (`npx @adminiumjs/adminium@0.3.45 start`). Without
|
|
19
19
|
one, npx installs any newer release it finds, and with no terminal attached it
|
|
20
20
|
does so without asking. See
|
|
21
21
|
[A VPS without Docker](https://docs.adminium.dev/self-hosting/vps/) for a pinned install under systemd,
|