@vxil/config 0.10.1 → 0.11.0
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/index.d.ts +15 -0
- package/package.json +1 -1
- package/src/index.ts +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -106,6 +106,21 @@ export interface CollectionDef {
|
|
|
106
106
|
* with a regression test on each — an attribute read by no enforcing path ships
|
|
107
107
|
* inert (the validation.unique / owner_field precedent). */
|
|
108
108
|
public?: boolean;
|
|
109
|
+
/** What a VERIFIED end user (a thin-client key + a session) may do on this
|
|
110
|
+
* collection (https://vxil.com/docs/guide/09-security-and-multitenancy):
|
|
111
|
+
* 'readwrite' (default) — read and write (owner-scoped when ownerField is set);
|
|
112
|
+
* 'read' — read only (owner-scoped as above); every end-user write
|
|
113
|
+
* (create, update, $inc, delete, publish, transaction step,
|
|
114
|
+
* filtered delete, batch write — and a delete elsewhere
|
|
115
|
+
* whose on_delete cascade / set_null would change a row
|
|
116
|
+
* here) is `403 server_only`;
|
|
117
|
+
* 'none' — no end-user reads or writes at all, even with ownerField.
|
|
118
|
+
* Server keys (and platform writes such as a jobs status mirror) are never
|
|
119
|
+
* affected. Stored on the collection (model data, not a config leaf) and
|
|
120
|
+
* carried by BOTH push paths; widening ('read'/'none' → 'readwrite') needs
|
|
121
|
+
* `vxil push --allow-destructive`. Any other value fails `vxil plan` /
|
|
122
|
+
* `vxil push` (it never falls back to 'readwrite'). */
|
|
123
|
+
endUserAccess?: 'readwrite' | 'read' | 'none';
|
|
109
124
|
/** Per-record action buttons (guide ch. 4): `[{ key, label, fn }]`, stored on
|
|
110
125
|
* the collection (model data, not a config leaf). The dashboard renders one
|
|
111
126
|
* button per action on each record row; `POST /v1/cms/items/:coll/:id/actions/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxil/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Typed vxil.config.ts authoring for the vxil backend platform — defineConfig, feature and cms field definitions (published for @vxil/cli).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://vxil.com",
|
package/src/index.ts
CHANGED
|
@@ -145,6 +145,21 @@ export interface CollectionDef {
|
|
|
145
145
|
* with a regression test on each — an attribute read by no enforcing path ships
|
|
146
146
|
* inert (the validation.unique / owner_field precedent). */
|
|
147
147
|
public?: boolean;
|
|
148
|
+
/** What a VERIFIED end user (a thin-client key + a session) may do on this
|
|
149
|
+
* collection (https://vxil.com/docs/guide/09-security-and-multitenancy):
|
|
150
|
+
* 'readwrite' (default) — read and write (owner-scoped when ownerField is set);
|
|
151
|
+
* 'read' — read only (owner-scoped as above); every end-user write
|
|
152
|
+
* (create, update, $inc, delete, publish, transaction step,
|
|
153
|
+
* filtered delete, batch write — and a delete elsewhere
|
|
154
|
+
* whose on_delete cascade / set_null would change a row
|
|
155
|
+
* here) is `403 server_only`;
|
|
156
|
+
* 'none' — no end-user reads or writes at all, even with ownerField.
|
|
157
|
+
* Server keys (and platform writes such as a jobs status mirror) are never
|
|
158
|
+
* affected. Stored on the collection (model data, not a config leaf) and
|
|
159
|
+
* carried by BOTH push paths; widening ('read'/'none' → 'readwrite') needs
|
|
160
|
+
* `vxil push --allow-destructive`. Any other value fails `vxil plan` /
|
|
161
|
+
* `vxil push` (it never falls back to 'readwrite'). */
|
|
162
|
+
endUserAccess?: 'readwrite' | 'read' | 'none';
|
|
148
163
|
/** Per-record action buttons (guide ch. 4): `[{ key, label, fn }]`, stored on
|
|
149
164
|
* the collection (model data, not a config leaf). The dashboard renders one
|
|
150
165
|
* button per action on each record row; `POST /v1/cms/items/:coll/:id/actions/
|