@stacksjs/types 0.75.86 → 0.75.87

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 (2) hide show
  1. package/dist/security.d.ts +15 -0
  2. package/package.json +4 -4
@@ -12,6 +12,7 @@ export declare interface FirewallOptions {
12
12
  }
13
13
  export declare interface ApiSecurityOptions {
14
14
  rowScoping: ApiRowScopingPolicy
15
+ models: ModelApiSelection
15
16
  }
16
17
  export declare interface SecurityOptions {
17
18
  driver: 'aws'
@@ -45,4 +46,18 @@ export type FirewallConfig = Partial<FirewallOptions>;
45
46
  * the accident visible instead of shipping it.
46
47
  */
47
48
  export type ApiRowScopingPolicy = 'warn' | 'deny';
49
+ /**
50
+ * Which models publish the REST API their `useApi` trait describes.
51
+ *
52
+ * - `'all'` (the default) - every `useApi` model, the framework's own included.
53
+ * - `'own'` - only the app's models in `app/Models`, overrides included.
54
+ * - `'none'` - no generated model APIs.
55
+ * - a list of model names - exactly those; `'own'` may be one of them, to mean
56
+ * the app's models plus the named framework ones.
57
+ *
58
+ * `STACKS_MODEL_APIS` overrides it (`own`, `none`, `all`, or `own,Product`).
59
+ * It narrows the set and never adds one: a listed model still needs its own
60
+ * `useApi` trait. stacksjs/stacks#2866.
61
+ */
62
+ export type ModelApiSelection = 'all' | 'own' | 'none' | readonly string[];
48
63
  export type SecurityConfig = DeepPartial<SecurityOptions>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.75.86",
4
+ "version": "0.75.87",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -58,8 +58,8 @@
58
58
  "dependencies": {
59
59
  "@stacksjs/bunpress": "^0.2.15",
60
60
  "@stacksjs/clapp": "^0.2.12",
61
- "@stacksjs/events": "0.75.86",
62
- "@stacksjs/strings": "0.75.86",
61
+ "@stacksjs/events": "0.75.87",
62
+ "@stacksjs/strings": "0.75.87",
63
63
  "@stacksjs/stx": "^0.2.384",
64
64
  "@stacksjs/ts-validation": "^0.5.6",
65
65
  "bun-query-builder": "^0.3.5"
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@stacksjs/validation": "0.75.86",
76
+ "@stacksjs/validation": "0.75.87",
77
77
  "better-dx": "^0.2.24",
78
78
  "meilisearch": "^0.62.0"
79
79
  },