@adminiumjs/adminium 0.3.29 → 0.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/assistant/actions.js +13 -9
  2. package/dist/assistant/actions.js.map +1 -1
  3. package/dist/automations/actions/record-write.d.ts.map +1 -1
  4. package/dist/automations/actions/record-write.js +18 -2
  5. package/dist/automations/actions/record-write.js.map +1 -1
  6. package/dist/compose.d.ts.map +1 -1
  7. package/dist/compose.js +42 -9
  8. package/dist/compose.js.map +1 -1
  9. package/dist/connections/column-rules-validation.d.ts.map +1 -1
  10. package/dist/connections/column-rules-validation.js +4 -0
  11. package/dist/connections/column-rules-validation.js.map +1 -1
  12. package/dist/connections/effective-schema.d.ts +4 -0
  13. package/dist/connections/effective-schema.d.ts.map +1 -1
  14. package/dist/connections/effective-schema.js +1 -0
  15. package/dist/connections/effective-schema.js.map +1 -1
  16. package/dist/crud/row-writes.d.ts.map +1 -1
  17. package/dist/crud/row-writes.js +30 -2
  18. package/dist/crud/row-writes.js.map +1 -1
  19. package/dist/crud/states.d.ts +2 -0
  20. package/dist/crud/states.d.ts.map +1 -1
  21. package/dist/crud/states.js +42 -2
  22. package/dist/crud/states.js.map +1 -1
  23. package/dist/crud/unbuilt-rules.d.ts.map +1 -1
  24. package/dist/crud/unbuilt-rules.js +2 -0
  25. package/dist/crud/unbuilt-rules.js.map +1 -1
  26. package/dist/crud/write-service.d.ts.map +1 -1
  27. package/dist/crud/write-service.js +64 -4
  28. package/dist/crud/write-service.js.map +1 -1
  29. package/dist/crud/write-tree.d.ts +3 -0
  30. package/dist/crud/write-tree.d.ts.map +1 -1
  31. package/dist/crud/write-tree.js.map +1 -1
  32. package/dist/email/file-reach.d.ts +16 -6
  33. package/dist/email/file-reach.d.ts.map +1 -1
  34. package/dist/email/file-reach.js +17 -8
  35. package/dist/email/file-reach.js.map +1 -1
  36. package/dist/files/named-uploads.d.ts +35 -0
  37. package/dist/files/named-uploads.d.ts.map +1 -0
  38. package/dist/files/named-uploads.js +72 -0
  39. package/dist/files/named-uploads.js.map +1 -0
  40. package/dist/files/reconcile.d.ts +2 -0
  41. package/dist/files/reconcile.d.ts.map +1 -1
  42. package/dist/files/reconcile.js +15 -5
  43. package/dist/files/reconcile.js.map +1 -1
  44. package/dist/project/code/db.d.ts.map +1 -1
  45. package/dist/project/code/db.js +4 -2
  46. package/dist/project/code/db.js.map +1 -1
  47. package/dist/routes/data/index.d.ts.map +1 -1
  48. package/dist/routes/data/index.js +90 -11
  49. package/dist/routes/data/index.js.map +1 -1
  50. package/dist/routes/data/refusal-scrub.d.ts +8 -0
  51. package/dist/routes/data/refusal-scrub.d.ts.map +1 -1
  52. package/dist/routes/data/refusal-scrub.js +14 -0
  53. package/dist/routes/data/refusal-scrub.js.map +1 -1
  54. package/dist/routes/email-templates/index.d.ts.map +1 -1
  55. package/dist/routes/email-templates/index.js +5 -1
  56. package/dist/routes/email-templates/index.js.map +1 -1
  57. package/dist/routes/files/index.d.ts.map +1 -1
  58. package/dist/routes/files/index.js +5 -2
  59. package/dist/routes/files/index.js.map +1 -1
  60. package/dist/routes/public/index.d.ts.map +1 -1
  61. package/dist/routes/public/index.js +21 -5
  62. package/dist/routes/public/index.js.map +1 -1
  63. package/node_modules/@adminium/adapter-mysql/package.json +1 -1
  64. package/node_modules/@adminium/adapter-postgres/package.json +1 -1
  65. package/node_modules/@adminium/adapter-sqlite/package.json +1 -1
  66. package/node_modules/@adminium/add-on-contracts/package.json +1 -1
  67. package/node_modules/@adminium/engine/package.json +1 -1
  68. package/node_modules/@adminium/i18n/package.json +1 -1
  69. package/node_modules/@adminium/llm/package.json +1 -1
  70. package/node_modules/@adminium/manifest/dist/roles.d.ts +3 -0
  71. package/node_modules/@adminium/manifest/dist/roles.d.ts.map +1 -1
  72. package/node_modules/@adminium/manifest/dist/roles.js +5 -0
  73. package/node_modules/@adminium/manifest/dist/roles.js.map +1 -1
  74. package/node_modules/@adminium/manifest/dist/schema.d.ts +8 -0
  75. package/node_modules/@adminium/manifest/dist/schema.d.ts.map +1 -1
  76. package/node_modules/@adminium/manifest/dist/schema.js +1 -0
  77. package/node_modules/@adminium/manifest/dist/schema.js.map +1 -1
  78. package/node_modules/@adminium/manifest/dist/shapes.js +4 -0
  79. package/node_modules/@adminium/manifest/dist/shapes.js.map +1 -1
  80. package/node_modules/@adminium/manifest/dist/states.d.ts +8 -1
  81. package/node_modules/@adminium/manifest/dist/states.d.ts.map +1 -1
  82. package/node_modules/@adminium/manifest/dist/states.js +40 -3
  83. package/node_modules/@adminium/manifest/dist/states.js.map +1 -1
  84. package/node_modules/@adminium/manifest/dist/words.d.ts +1 -1
  85. package/node_modules/@adminium/manifest/dist/words.d.ts.map +1 -1
  86. package/node_modules/@adminium/manifest/dist/words.js +7 -0
  87. package/node_modules/@adminium/manifest/dist/words.js.map +1 -1
  88. package/node_modules/@adminium/manifest/package.json +1 -1
  89. package/node_modules/@adminium/meta/dist/repos/files.d.ts +23 -3
  90. package/node_modules/@adminium/meta/dist/repos/files.d.ts.map +1 -1
  91. package/node_modules/@adminium/meta/dist/repos/files.js +63 -15
  92. package/node_modules/@adminium/meta/dist/repos/files.js.map +1 -1
  93. package/node_modules/@adminium/meta/dist/schema/json-payloads.d.ts +1 -0
  94. package/node_modules/@adminium/meta/dist/schema/json-payloads.d.ts.map +1 -1
  95. package/node_modules/@adminium/meta/dist/schema/json-payloads.js +2 -0
  96. package/node_modules/@adminium/meta/dist/schema/json-payloads.js.map +1 -1
  97. package/node_modules/@adminium/meta/package.json +1 -1
  98. package/node_modules/@adminium/schema-import/package.json +1 -1
  99. package/node_modules/@adminium/widgets/package.json +1 -1
  100. package/package.json +12 -12
  101. package/skills/adminium-app/references/manifest/INDEX.md +3 -3
  102. package/skills/adminium-app/references/manifest/requiredschema--states-3.md +15 -7
  103. package/skills/adminium-app/references/manifest/requiredschema--states-4.md +43 -0
  104. package/skills/adminium-app/references/manifest/requiredschema--states.md +1 -0
@@ -2,6 +2,49 @@
2
2
 
3
3
  # Manifest spec: requiredSchema — States
4
4
 
5
+ When a `sign_offs` row is created, its job moves to `signed-off` by the job's own listed move,
6
+ once the new row is in: that move's conditions are judged on the job as held, with the new row
7
+ already counted (`children: { "sign_offs": 1 }` passes on the first sign-off), and its stamps,
8
+ totals and limits are written as for any move of the job. It is announced as a change of the job
9
+ by the same person: the job's screens refresh, its audit names the sign-off's maker, and a rule
10
+ that runs on the job's move to `signed-off` runs.
11
+
12
+ - A job **already** `signed-off` is left as it is, and the row is made: a correction, a new
13
+ sign-off that names the one it corrects, moves nothing.
14
+ - A job in a state with **no listed move** to `signed-off` (still `open` above), or whose move's
15
+ conditions do not hold (a snag still blocking), refuses the whole write: `409`
16
+ `STATE_MOVE_REFUSED`, and no row is made. List `"open": ["installed", "signed-off"]` and a
17
+ sign-off made on an open job signs it off too.
18
+ - **Whoever may create the child moves the parent.** The move is the app's own declared move, as an
19
+ [effect](https://docs.adminium.dev/reference/manifest/#effects)'s is: the roles a move is kept for do not stop it, and the person needs no
20
+ right to read or change the parent. A refusal about the parent is told as that person reads the
21
+ parent's table. Give `moveOnCreate` only to a child whose rows belong with the parent they move.
22
+ - Only a create moves the parent. A change of the child, its move to another parent, or its delete
23
+ moves nothing. Importing rows and loading sample data are history: they move nothing either. A
24
+ save that moved its parent offers no Undo.
25
+
26
+ The move is made as an effect's is, so the same tables are refused: the state must be one a listed
27
+ move goes to, from a state the child is added in (`createIn` or `parentIn`, when given); not only
28
+ by an undo, nor only by an add-on's ledger (`planned`); not one that waits for another row or is
29
+ judged late by another row's time; not one that sets off this table's own [effects](https://docs.adminium.dev/reference/manifest/#effects) (an
30
+ effect moves one row, never a chain). The parent may not be a line of another table's states, book
31
+ people by the day, keep a [limit](https://docs.adminium.dev/reference/manifest/#capacity) of its own, be private, be the app's outbox, or be
32
+ watched by a project hook (refused when the row is made). An add-on's shape keeps its children's
33
+ `moveOnCreate` as it wrote it.
34
+
35
+ #### Undo of a move
36
+
37
+ A move marked `"undo": true` takes back the listed move the other way: the kitchen marked an
38
+ order ready by mistake, and moves it back to preparing.
39
+
40
+ ```json
41
+ "moves": {
42
+ "preparing": ["ready"],
43
+ "ready": [{ "to": "preparing", "undo": true,
44
+ "requires": { "time": { "before": { "column": "ready_at", "plus": { "minutes": 1 } } } } }]
45
+ }
46
+ ```
47
+
5
48
  An undo move is made only by a write that names the state it saw the row in (`from` on a staff
6
49
  change): a stale screen's tap never takes back another screen's move, and is refused `409`
7
50
  `STATE_MOVE_REFUSED` naming both states. What it waits for is judged on the row as it stands. The
@@ -66,6 +66,7 @@ least one of:
66
66
  | `createIn` | 1–16 states: a child row may be **added** only while this row is in one of them (a payment taken on a stay still booked or in house). Not with `lock` or `parentIn`. |
67
67
  | `changeIn` | 1–16 states: a child row may be **changed or deleted** only while this row is in one of them (a payment voided on a cancelled stay too). Not with `lock` or `parentIn`. |
68
68
  | `clearOnCreate` | 1–8 nullable columns of **this** row, emptied when a child row is created (a recorded payment clears the client's "I've sent it"). |
69
+ | `moveOnCreate` | A state of **this** row: a child row created moves it there, by one of this table's listed moves (a sign-off made on site signs its job off). A row already there is left as it is. Needs Adminium 0.3.30. See [A new child moves its parent](https://docs.adminium.dev/reference/manifest/#a-new-child-moves-its-parent). |
69
70
  | `lockLinked` | `{ "<link>": ["<column>", …] }`: for 1–8 of the child's foreign keys to other tables, 1–16 columns of the row the link points at that do not change while a child row points at it (the hours of time an invoice line bills). The key is never one. |
70
71
 
71
72
  and, with `lock`: