@friggframework/schemas 2.0.0--canary.678.58db4b2.0 → 2.0.0--canary.680.b3ca7f1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@friggframework/schemas",
3
- "version": "2.0.0--canary.678.58db4b2.0",
3
+ "version": "2.0.0--canary.680.b3ca7f1.0",
4
4
  "description": "Canonical JSON Schema definitions for Frigg Framework",
5
5
  "main": "index.js",
6
6
  "author": "",
@@ -41,5 +41,5 @@
41
41
  "middleware/",
42
42
  "index.js"
43
43
  ],
44
- "gitHead": "58db4b2bc17529f46b8dae1110771f5df39033ed"
44
+ "gitHead": "b3ca7f1295d79b4d0cb5fb9fb4ec41093033ba4d"
45
45
  }
@@ -122,6 +122,11 @@
122
122
  "type": "string",
123
123
  "description": "Description of the entity type"
124
124
  },
125
+ "usedBy": {
126
+ "type": "array",
127
+ "items": { "type": "string" },
128
+ "description": "Names of the integrations that bind this entity type; empty for a type registered only in appDefinition.entities"
129
+ },
125
130
  "authType": {
126
131
  "type": "string",
127
132
  "enum": ["oauth2", "form", "api-key", "basic"],
@@ -129,72 +129,30 @@
129
129
  },
130
130
  "jwtConfig": {
131
131
  "type": "object",
132
- "description": "Adopter token (JWT) verification for authModes.adopterJwt. Set exactly one of jwksUri (asymmetric keys, rotating) or secret (HMAC). With jwksUri, audience is required and issuer should be set.",
132
+ "description": "JWT configuration for adopter JWT authentication mode (when authModes.adopterJwt is true)",
133
133
  "properties": {
134
- "jwksUri": {
135
- "type": "string",
136
- "format": "uri",
137
- "description": "URL of the issuer's JWKS (https; http only for localhost, 127.0.0.0/8 or ::1). Keys are fetched, cached and rotated per process."
138
- },
139
134
  "secret": {
140
135
  "type": "string",
141
- "description": "Shared HMAC secret for HS* tokens (set via an environment variable, never in source)"
142
- },
143
- "issuer": {
144
- "type": "string",
145
- "description": "Required iss claim. Not checked when omitted; with jwksUri a startup warning is logged when it is unset."
146
- },
147
- "audience": {
148
- "description": "Accepted aud claim value(s). Required with jwksUri; optional (not checked when omitted) with secret.",
149
- "oneOf": [
150
- { "type": "string" },
151
- { "type": "array", "items": { "type": "string" }, "minItems": 1 }
152
- ]
153
- },
154
- "algorithms": {
155
- "type": "array",
156
- "description": "Allowed signing algorithms. Defaults to ES256 and RS256 with jwksUri, HS256 with secret. HS* only with secret, never with jwksUri.",
157
- "items": {
158
- "type": "string",
159
- "enum": ["ES256", "ES384", "RS256", "RS384", "RS512", "HS256", "HS384", "HS512"]
160
- },
161
- "minItems": 1
162
- },
163
- "algorithm": {
164
- "type": "string",
165
- "description": "Deprecated alias for a one-item algorithms list. Setting both algorithm and algorithms is an error.",
166
- "enum": ["ES256", "ES384", "RS256", "RS384", "RS512", "HS256", "HS384", "HS512"]
167
- },
168
- "clockToleranceSec": {
169
- "type": "integer",
170
- "minimum": 0,
171
- "description": "Clock skew allowed on exp and nbf, in seconds",
172
- "default": 30
136
+ "description": "JWT secret key for signature validation (should be set via environment variable)"
173
137
  },
174
138
  "userIdClaim": {
175
139
  "type": "string",
176
- "description": "JWT claim name containing the app user ID",
140
+ "description": "JWT claim name containing the user ID",
177
141
  "default": "sub"
178
142
  },
179
143
  "orgIdClaim": {
180
144
  "type": "string",
181
- "description": "JWT claim name containing the app organization ID",
145
+ "description": "JWT claim name containing the organization ID",
182
146
  "default": "org_id"
183
147
  },
184
- "roleClaim": {
148
+ "algorithm": {
185
149
  "type": "string",
186
- "description": "JWT claim name containing the organization role. Read and exposed on the authenticated user; not stored yet.",
187
- "default": "org_role"
150
+ "description": "JWT signing algorithm",
151
+ "enum": ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512"],
152
+ "default": "HS256"
188
153
  }
189
154
  },
190
- "oneOf": [
191
- { "required": ["secret"] },
192
- { "required": ["jwksUri"] }
193
- ],
194
- "dependencies": {
195
- "jwksUri": ["audience"]
196
- },
197
- "not": { "required": ["algorithm", "algorithms"] },
155
+ "required": ["secret"],
198
156
  "additionalProperties": false
199
157
  },
200
158
  "fields": {
@@ -685,6 +643,56 @@
685
643
  },
686
644
  "additionalProperties": false
687
645
  },
646
+ "entities": {
647
+ "type": "object",
648
+ "description": "App-level entity type registry (ADR-059). Keyed by entity type name; each key must equal its definition's moduleName / getName(). Registered types can be connected without any integration. Entity types bound by declared integrations are inferred and merged unless $infer is false.",
649
+ "properties": {
650
+ "$infer": {
651
+ "type": "boolean",
652
+ "default": true,
653
+ "description": "false turns inference off: every module an integration binds must then be registered here, or the app fails to load."
654
+ }
655
+ },
656
+ "additionalProperties": {
657
+ "type": "object",
658
+ "description": "One entity type: its module definition plus app-level settings.",
659
+ "required": ["definition"],
660
+ "properties": {
661
+ "definition": {
662
+ "type": "object",
663
+ "description": "The API module definition (the object an integration binds as modules.<key>.definition)."
664
+ },
665
+ "scope": {
666
+ "description": "Who owns entities of this type (ADR-056): one scope, or a default plus the scopes callers may choose.",
667
+ "oneOf": [
668
+ { "type": "string", "enum": ["individual", "organization", "global"] },
669
+ {
670
+ "type": "object",
671
+ "properties": {
672
+ "default": { "type": "string", "enum": ["individual", "organization", "global"] },
673
+ "allow": {
674
+ "type": "array",
675
+ "items": { "type": "string", "enum": ["individual", "organization", "global"] },
676
+ "minItems": 1,
677
+ "uniqueItems": true
678
+ }
679
+ },
680
+ "additionalProperties": false
681
+ }
682
+ ]
683
+ },
684
+ "proxy": {
685
+ "type": "object",
686
+ "description": "Per-type entity proxy allow-list override (ADR-052)."
687
+ },
688
+ "display": {
689
+ "type": "object",
690
+ "description": "Label, icon and description shown by UIs and GET /api/v2/entity-types."
691
+ }
692
+ },
693
+ "additionalProperties": false
694
+ }
695
+ },
688
696
  "managementApi": {
689
697
  "type": "object",
690
698
  "description": "Management API settings (ADR-053 versioning, ADR-052 entity proxy).",