@vxil/config 0.11.0 → 0.13.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 +11 -0
- package/package.json +2 -2
- package/src/index.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,17 @@ export interface CollectionDef {
|
|
|
121
121
|
* `vxil push --allow-destructive`. Any other value fails `vxil plan` /
|
|
122
122
|
* `vxil push` (it never falls back to 'readwrite'). */
|
|
123
123
|
endUserAccess?: 'readwrite' | 'read' | 'none';
|
|
124
|
+
/** Role slugs one of which a VERIFIED end user must hold to WRITE this
|
|
125
|
+
* collection (create, update, $inc, delete, publish, transaction step,
|
|
126
|
+
* filtered delete, batch write, and an end-user delete's cascade into it) —
|
|
127
|
+
* otherwise `403 role_required`. Reads are unaffected. Roles are the
|
|
128
|
+
* session's verified role claims (its orgs roles — the
|
|
129
|
+
* same ones `readRoles` and `caller.roles` in hooks see). Server keys are
|
|
130
|
+
* never affected. Absent / `[]` = ungated. Up to 16 slugs
|
|
131
|
+
* (`^[a-z0-9][a-z0-9_-]{0,31}$`). Stored on the collection (model data, not
|
|
132
|
+
* a config leaf) and carried by BOTH push paths; widening (clearing, or
|
|
133
|
+
* adding a role) needs `vxil push --allow-destructive`. */
|
|
134
|
+
writeRoles?: string[];
|
|
124
135
|
/** Per-record action buttons (guide ch. 4): `[{ key, label, fn }]`, stored on
|
|
125
136
|
* the collection (model data, not a config leaf). The dashboard renders one
|
|
126
137
|
* 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.13.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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"!src/**/*.test.ts"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@vxil/feature-configs": "0.
|
|
26
|
+
"@vxil/feature-configs": "0.11.0"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -160,6 +160,17 @@ export interface CollectionDef {
|
|
|
160
160
|
* `vxil push --allow-destructive`. Any other value fails `vxil plan` /
|
|
161
161
|
* `vxil push` (it never falls back to 'readwrite'). */
|
|
162
162
|
endUserAccess?: 'readwrite' | 'read' | 'none';
|
|
163
|
+
/** Role slugs one of which a VERIFIED end user must hold to WRITE this
|
|
164
|
+
* collection (create, update, $inc, delete, publish, transaction step,
|
|
165
|
+
* filtered delete, batch write, and an end-user delete's cascade into it) —
|
|
166
|
+
* otherwise `403 role_required`. Reads are unaffected. Roles are the
|
|
167
|
+
* session's verified role claims (its orgs roles — the
|
|
168
|
+
* same ones `readRoles` and `caller.roles` in hooks see). Server keys are
|
|
169
|
+
* never affected. Absent / `[]` = ungated. Up to 16 slugs
|
|
170
|
+
* (`^[a-z0-9][a-z0-9_-]{0,31}$`). Stored on the collection (model data, not
|
|
171
|
+
* a config leaf) and carried by BOTH push paths; widening (clearing, or
|
|
172
|
+
* adding a role) needs `vxil push --allow-destructive`. */
|
|
173
|
+
writeRoles?: string[];
|
|
163
174
|
/** Per-record action buttons (guide ch. 4): `[{ key, label, fn }]`, stored on
|
|
164
175
|
* the collection (model data, not a config leaf). The dashboard renders one
|
|
165
176
|
* button per action on each record row; `POST /v1/cms/items/:coll/:id/actions/
|