@friggframework/schemas 2.0.0--canary.704.79d9a63.0 → 2.0.0--canary.680.daae24e.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/README.md +1 -1
- package/package.json +2 -2
- package/schemas/api-authorization.schema.json +41 -7
- package/schemas/api-credentials.schema.json +5 -5
- package/schemas/api-entities.schema.json +12 -7
- package/schemas/api-module-definition.schema.json +34 -0
- package/schemas/api-proxy.schema.json +26 -13
- package/schemas/app-definition.schema.json +147 -35
- package/schemas/serverless-config.schema.json +4 -4
package/README.md
CHANGED
|
@@ -185,7 +185,7 @@ Defines the structure for Serverless Framework configuration used in AWS deploym
|
|
|
185
185
|
**Example:**
|
|
186
186
|
```javascript
|
|
187
187
|
const serverlessConfig = {
|
|
188
|
-
frameworkVersion: "
|
|
188
|
+
frameworkVersion: ">=3.17.0",
|
|
189
189
|
service: "frigg-backend",
|
|
190
190
|
provider: {
|
|
191
191
|
name: "aws",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/schemas",
|
|
3
|
-
"version": "2.0.0--canary.
|
|
3
|
+
"version": "2.0.0--canary.680.daae24e.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": "
|
|
44
|
+
"gitHead": "daae24ec9d6b03c59759b6b42f6f99369b683981"
|
|
45
45
|
}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"definitions": {
|
|
7
7
|
"authorizationRequirements": {
|
|
8
8
|
"type": "object",
|
|
9
|
-
"description": "Authorization requirements response from GET /api/authorize",
|
|
9
|
+
"description": "Authorization requirements response from GET /api/v2/authorize (GET /api/authorize in v1 returns the module requirements unwrapped)",
|
|
10
10
|
"required": ["type", "step", "totalSteps", "isMultiStep"],
|
|
11
11
|
"properties": {
|
|
12
12
|
"type": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"description": "Type of authentication required: oauth2, form, api-key, basic, or a module-defined step type (e.g. email, otp)",
|
|
15
|
+
"examples": ["oauth2", "form", "api-key", "basic", "otp"]
|
|
16
16
|
},
|
|
17
17
|
"step": {
|
|
18
18
|
"type": "integer",
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
},
|
|
113
113
|
"getEntityTypeRequirementsResponse": {
|
|
114
114
|
"type": "object",
|
|
115
|
-
"description": "Authorization requirements response from GET /api/entities/types/:
|
|
115
|
+
"description": "Authorization requirements response from GET /api/v2/entities/types/:entityType/requirements",
|
|
116
116
|
"required": ["type", "step", "totalSteps", "isMultiStep"],
|
|
117
117
|
"properties": {
|
|
118
118
|
"type": {
|
|
119
119
|
"type": "string",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
120
|
+
"description": "Type of authentication required: oauth2, form, api-key, basic, or a module-defined step type (e.g. email, otp)",
|
|
121
|
+
"examples": ["oauth2", "form", "api-key", "basic", "otp"]
|
|
122
122
|
},
|
|
123
123
|
"step": {
|
|
124
124
|
"type": "integer",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"authorizationRequest": {
|
|
153
153
|
"type": "object",
|
|
154
|
-
"description": "Authorization request to POST /api/authorize",
|
|
154
|
+
"description": "Authorization request to POST /api/v2/authorize (and v1 POST /api/authorize)",
|
|
155
155
|
"required": ["entityType"],
|
|
156
156
|
"properties": {
|
|
157
157
|
"entityType": {
|
|
@@ -238,6 +238,40 @@
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
|
+
"authorizeComplete": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"description": "POST /api/v2/authorize (or /api/v2/credentials/:credentialId/reauthorize) when the flow is complete. The credential is masked.",
|
|
244
|
+
"required": ["status", "entity", "credential"],
|
|
245
|
+
"properties": {
|
|
246
|
+
"status": { "const": "complete" },
|
|
247
|
+
"entity": { "type": "object", "description": "api-entities#/definitions/entity" },
|
|
248
|
+
"credential": { "type": "object", "description": "api-credentials#/definitions/credential, masked" },
|
|
249
|
+
"previousCredentialId": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Re-authorization only: set when the provider account changed and a new credential was stored"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"authorizePending": {
|
|
256
|
+
"type": "object",
|
|
257
|
+
"description": "POST /api/v2/authorize when another step is needed",
|
|
258
|
+
"required": ["status", "step", "totalSteps", "sessionId", "requirements"],
|
|
259
|
+
"properties": {
|
|
260
|
+
"status": { "const": "pending" },
|
|
261
|
+
"step": { "type": "integer", "minimum": 2 },
|
|
262
|
+
"totalSteps": { "type": "integer", "minimum": 2 },
|
|
263
|
+
"sessionId": { "type": "string" },
|
|
264
|
+
"requirements": { "$ref": "#/definitions/authorizationRequirements" },
|
|
265
|
+
"message": { "type": "string" }
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"authorizeV2Response": {
|
|
269
|
+
"description": "Response from POST /api/v2/authorize and POST /api/v2/credentials/:credentialId/reauthorize",
|
|
270
|
+
"oneOf": [
|
|
271
|
+
{ "$ref": "#/definitions/authorizeComplete" },
|
|
272
|
+
{ "$ref": "#/definitions/authorizePending" }
|
|
273
|
+
]
|
|
274
|
+
},
|
|
241
275
|
"authorizationSession": {
|
|
242
276
|
"type": "object",
|
|
243
277
|
"description": "Authorization session stored in database",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"listCredentialsResponse": {
|
|
50
50
|
"type": "object",
|
|
51
|
-
"description": "Response from GET /api/credentials - returns list of credentials for the authenticated user",
|
|
51
|
+
"description": "Response from GET /api/v2/credentials - returns list of credentials for the authenticated user",
|
|
52
52
|
"required": ["credentials"],
|
|
53
53
|
"properties": {
|
|
54
54
|
"credentials": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"getCredentialResponse": {
|
|
64
|
-
"description": "Response from GET /api/credentials/:
|
|
64
|
+
"description": "Response from GET /api/v2/credentials/:credentialId - returns a single credential",
|
|
65
65
|
"allOf": [
|
|
66
66
|
{
|
|
67
67
|
"$ref": "#/definitions/credential"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"deleteCredentialResponse": {
|
|
72
72
|
"type": "object",
|
|
73
|
-
"description": "
|
|
73
|
+
"description": "Legacy delete result. DELETE /api/v2/credentials/:credentialId answers 204 No Content.",
|
|
74
74
|
"required": ["success"],
|
|
75
75
|
"properties": {
|
|
76
76
|
"success": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"reauthorizeCredentialRequest": {
|
|
87
87
|
"type": "object",
|
|
88
|
-
"description": "Request to POST /api/credentials/:
|
|
88
|
+
"description": "Request to POST /api/v2/credentials/:credentialId/reauthorize - refresh or update credential authentication",
|
|
89
89
|
"required": ["data"],
|
|
90
90
|
"properties": {
|
|
91
91
|
"data": {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
},
|
|
108
108
|
"reauthorizeCredentialResponse": {
|
|
109
109
|
"type": "object",
|
|
110
|
-
"description": "
|
|
110
|
+
"description": "Legacy re-authorization result. POST /api/v2/credentials/:credentialId/reauthorize answers api-authorization#/definitions/authorizeV2Response.",
|
|
111
111
|
"oneOf": [
|
|
112
112
|
{
|
|
113
113
|
"$ref": "#/definitions/reauthorizeCredentialSuccess"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"listEntitiesResponse": {
|
|
53
53
|
"type": "object",
|
|
54
|
-
"description": "Response from GET /api/entities",
|
|
54
|
+
"description": "Response from GET /api/v2/entities",
|
|
55
55
|
"required": ["entities"],
|
|
56
56
|
"properties": {
|
|
57
57
|
"entities": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"createEntityRequest": {
|
|
67
67
|
"type": "object",
|
|
68
|
-
"description": "Request to POST /api/entities",
|
|
68
|
+
"description": "Request to POST /api/entities (v1 POST /api/entity). Not served by v2: POST /api/v2/authorize creates the entity.",
|
|
69
69
|
"required": ["entityType", "data"],
|
|
70
70
|
"properties": {
|
|
71
71
|
"entityType": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"createEntityResponse": {
|
|
90
90
|
"type": "object",
|
|
91
|
-
"description": "Response from POST /api/entities",
|
|
91
|
+
"description": "Response from POST /api/entities (v1 POST /api/entity). Not served by v2.",
|
|
92
92
|
"required": ["entity_id", "credential_id", "type"],
|
|
93
93
|
"properties": {
|
|
94
94
|
"entity_id": {
|
|
@@ -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"],
|
|
@@ -147,7 +152,7 @@
|
|
|
147
152
|
},
|
|
148
153
|
"listEntityTypesResponse": {
|
|
149
154
|
"type": "object",
|
|
150
|
-
"description": "Response from GET /api/entities/types",
|
|
155
|
+
"description": "Response from GET /api/v2/entities/types",
|
|
151
156
|
"required": ["types"],
|
|
152
157
|
"properties": {
|
|
153
158
|
"types": {
|
|
@@ -161,7 +166,7 @@
|
|
|
161
166
|
},
|
|
162
167
|
"getEntityTypeResponse": {
|
|
163
168
|
"type": "object",
|
|
164
|
-
"description": "Response from GET /api/entities/types/:
|
|
169
|
+
"description": "Response from GET /api/v2/entities/types/:entityType",
|
|
165
170
|
"required": ["type", "name"],
|
|
166
171
|
"properties": {
|
|
167
172
|
"type": {
|
|
@@ -201,7 +206,7 @@
|
|
|
201
206
|
},
|
|
202
207
|
"reauthorizeEntityRequest": {
|
|
203
208
|
"type": "object",
|
|
204
|
-
"description": "Request to POST /api/
|
|
209
|
+
"description": "Request to re-authorize an entity. Not served in 2.0.1: use POST /api/v2/credentials/:credentialId/reauthorize.",
|
|
205
210
|
"required": ["data"],
|
|
206
211
|
"properties": {
|
|
207
212
|
"data": {
|
|
@@ -223,7 +228,7 @@
|
|
|
223
228
|
},
|
|
224
229
|
"reauthorizeEntityResponse": {
|
|
225
230
|
"type": "object",
|
|
226
|
-
"description": "
|
|
231
|
+
"description": "Entity re-authorization result. Not served in 2.0.1: POST /api/v2/credentials/:credentialId/reauthorize answers api-authorization#/definitions/authorizeV2Response.",
|
|
227
232
|
"oneOf": [
|
|
228
233
|
{
|
|
229
234
|
"$ref": "#/definitions/reauthorizeEntitySuccess"
|
|
@@ -94,6 +94,40 @@
|
|
|
94
94
|
},
|
|
95
95
|
"additionalProperties": false
|
|
96
96
|
},
|
|
97
|
+
"proxy": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"description": "Opt in to the Management API entity proxy (ADR-052). Without allow, nothing can be proxied.",
|
|
100
|
+
"properties": {
|
|
101
|
+
"allow": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"description": "Operations that may be proxied. :param matches one segment; a trailing /** matches a subtree. Wildcards (method * or path /**) are ignored here and only accepted in the app definition.",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"required": ["method", "path"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"method": { "type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
|
|
109
|
+
"path": { "type": "string", "pattern": "^/" }
|
|
110
|
+
},
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"headers": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"description": "Provider-specific request headers callers may send, in addition to accept, content-type, accept-language, if-match and if-none-match",
|
|
117
|
+
"items": { "type": "string" }
|
|
118
|
+
},
|
|
119
|
+
"baseUrl": {
|
|
120
|
+
"description": "Proxy base URL (https). A string, or a function of the Api instance for tenant hosts. Defaults to the Api's baseUrl.",
|
|
121
|
+
"type": ["string", "object"]
|
|
122
|
+
},
|
|
123
|
+
"binary": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"default": false,
|
|
126
|
+
"description": "Return binary upstream bodies base64-encoded instead of refusing them (415)"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
},
|
|
97
131
|
"env": {
|
|
98
132
|
"type": "object",
|
|
99
133
|
"description": "Environment variable configuration",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"definitions": {
|
|
7
7
|
"proxyRequest": {
|
|
8
8
|
"type": "object",
|
|
9
|
-
"description": "Proxy request to POST /api/entities/:
|
|
9
|
+
"description": "Proxy request to POST /api/v2/entities/:entityId/proxy (ADR-052). Off unless the app sets managementApi.proxy.enable, and only for paths the module (or the app definition) allow-lists.",
|
|
10
10
|
"required": ["method", "path"],
|
|
11
11
|
"properties": {
|
|
12
12
|
"method": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"path": {
|
|
18
18
|
"type": "string",
|
|
19
|
-
"description": "
|
|
19
|
+
"description": "Path relative to the module's base URL (e.g. '/v3/contacts'). Must start with a single /. Rejected: //, backslashes, ? and # (use query), . and .. segments, encoded separators (%2f, %5c), double encoding, control and whitespace characters other than %20. The host always comes from the module.",
|
|
20
20
|
"pattern": "^/",
|
|
21
21
|
"minLength": 1
|
|
22
22
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"headers": {
|
|
39
39
|
"type": "object",
|
|
40
|
-
"description": "
|
|
40
|
+
"description": "Request headers. Only accept, content-type, accept-language, if-match, if-none-match and headers the module lists in proxy.headers are forwarded; others are dropped. Authorization, Proxy-Authorization, Cookie, Host, Forwarded, X-Forwarded-*, X-Real-IP, X-API-Key and the module's own auth header are refused (400). Auth headers come only from the module.",
|
|
41
41
|
"additionalProperties": { "type": "string" }
|
|
42
42
|
},
|
|
43
43
|
"body": {
|
|
@@ -84,19 +84,23 @@
|
|
|
84
84
|
},
|
|
85
85
|
"proxyResponse": {
|
|
86
86
|
"type": "object",
|
|
87
|
-
"description": "
|
|
87
|
+
"description": "Upstream answer relayed by the proxy. The HTTP status of the Frigg response equals `status`; `success` is false for upstream 4xx.",
|
|
88
88
|
"required": ["success", "status", "data"],
|
|
89
89
|
"properties": {
|
|
90
90
|
"success": {
|
|
91
91
|
"type": "boolean",
|
|
92
|
-
"
|
|
93
|
-
"description": "Indicates successful proxy operation"
|
|
92
|
+
"description": "True when the upstream status is below 400"
|
|
94
93
|
},
|
|
95
94
|
"status": {
|
|
96
95
|
"type": "integer",
|
|
97
96
|
"minimum": 200,
|
|
98
|
-
"maximum":
|
|
99
|
-
"description": "HTTP status code from the upstream API response"
|
|
97
|
+
"maximum": 499,
|
|
98
|
+
"description": "HTTP status code from the upstream API response (5xx, 401 and 429 are reported as proxy errors)"
|
|
99
|
+
},
|
|
100
|
+
"dataEncoding": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": ["base64"],
|
|
103
|
+
"description": "Present when data is a base64-encoded binary body (only for modules with proxy.binary: true)"
|
|
100
104
|
},
|
|
101
105
|
"headers": {
|
|
102
106
|
"type": "object",
|
|
@@ -171,16 +175,25 @@
|
|
|
171
175
|
"type": "string",
|
|
172
176
|
"description": "Error code identifying the type of failure",
|
|
173
177
|
"enum": [
|
|
174
|
-
"
|
|
175
|
-
"
|
|
178
|
+
"INVALID_PROXY_REQUEST",
|
|
179
|
+
"PROXY_NOT_ALLOWED",
|
|
180
|
+
"PROXY_NOT_CONFIGURED",
|
|
181
|
+
"PAYLOAD_TOO_LARGE",
|
|
182
|
+
"UNSUPPORTED_MEDIA_TYPE",
|
|
183
|
+
"RESPONSE_TOO_LARGE",
|
|
184
|
+
"INVALID_CREDENTIALS",
|
|
185
|
+
"RATE_LIMITED",
|
|
176
186
|
"UPSTREAM_ERROR",
|
|
177
187
|
"TIMEOUT",
|
|
178
188
|
"NETWORK_ERROR",
|
|
179
|
-
"
|
|
180
|
-
"INVALID_REQUEST",
|
|
189
|
+
"ENTITY_NOT_FOUND",
|
|
181
190
|
"NOT_FOUND",
|
|
191
|
+
"UNAUTHORIZED",
|
|
192
|
+
"VALIDATION_ERROR",
|
|
193
|
+
"INVALID_AUTH",
|
|
194
|
+
"EXPIRED_TOKEN",
|
|
195
|
+
"INVALID_REQUEST",
|
|
182
196
|
"PERMISSION_DENIED",
|
|
183
|
-
"INVALID_CREDENTIALS",
|
|
184
197
|
"SERVICE_UNAVAILABLE"
|
|
185
198
|
]
|
|
186
199
|
},
|
|
@@ -75,39 +75,6 @@
|
|
|
75
75
|
},
|
|
76
76
|
"default": []
|
|
77
77
|
},
|
|
78
|
-
"adminScripts": {
|
|
79
|
-
"type": "array",
|
|
80
|
-
"description": "Admin script classes (extending AdminScriptBase from @friggframework/admin-scripts) served under /admin/scripts",
|
|
81
|
-
"items": {
|
|
82
|
-
"description": "Admin script class"
|
|
83
|
-
},
|
|
84
|
-
"default": []
|
|
85
|
-
},
|
|
86
|
-
"reports": {
|
|
87
|
-
"type": "array",
|
|
88
|
-
"description": "Report classes served by the admin report runner",
|
|
89
|
-
"items": {
|
|
90
|
-
"description": "Report class"
|
|
91
|
-
},
|
|
92
|
-
"default": []
|
|
93
|
-
},
|
|
94
|
-
"admin": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"description": "Admin script and report runner options",
|
|
97
|
-
"properties": {
|
|
98
|
-
"enableScheduling": {
|
|
99
|
-
"type": "boolean",
|
|
100
|
-
"description": "Provision the EventBridge Scheduler group and role so admin scripts and reports can run on a schedule",
|
|
101
|
-
"default": false
|
|
102
|
-
},
|
|
103
|
-
"includeBuiltinReports": {
|
|
104
|
-
"type": "boolean",
|
|
105
|
-
"description": "Serve the built-in reports alongside the app's own reports",
|
|
106
|
-
"default": false
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
"additionalProperties": false
|
|
110
|
-
},
|
|
111
78
|
"user": {
|
|
112
79
|
"type": "object",
|
|
113
80
|
"description": "User management and authentication configuration",
|
|
@@ -344,8 +311,8 @@
|
|
|
344
311
|
"properties": {
|
|
345
312
|
"fieldLevelEncryptionMethod": {
|
|
346
313
|
"type": "string",
|
|
347
|
-
"description": "Method for field-level encryption",
|
|
348
|
-
"enum": ["kms", "aes"],
|
|
314
|
+
"description": "Method for field-level encryption. 'kms' creates or discovers a KMS key and sets KMS_KEY_ARN; 'aes' expects AES_KEY_ID and AES_KEY in the Lambda environment; 'none' sets FRIGG_ENCRYPTION_DISABLED=true and stores sensitive fields in plaintext. A deployed stage with no key and no 'none' opt-out refuses to start.",
|
|
315
|
+
"enum": ["kms", "aes", "none"],
|
|
349
316
|
"default": "aes"
|
|
350
317
|
},
|
|
351
318
|
"createResourceIfNoneFound": {
|
|
@@ -676,6 +643,151 @@
|
|
|
676
643
|
},
|
|
677
644
|
"additionalProperties": false
|
|
678
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
|
+
},
|
|
696
|
+
"managementApi": {
|
|
697
|
+
"type": "object",
|
|
698
|
+
"description": "Management API settings (ADR-053 versioning, ADR-052 entity proxy).",
|
|
699
|
+
"properties": {
|
|
700
|
+
"v1": {
|
|
701
|
+
"type": "boolean",
|
|
702
|
+
"default": true,
|
|
703
|
+
"description": "Serve the deprecated v1 routes (unprefixed /api/*). false removes them from the router and from the generated API Gateway routes."
|
|
704
|
+
},
|
|
705
|
+
"proxy": {
|
|
706
|
+
"type": "object",
|
|
707
|
+
"description": "Entity proxy, POST /api/v2/entities/:id/proxy (ADR-052). Off by default.",
|
|
708
|
+
"properties": {
|
|
709
|
+
"enable": {
|
|
710
|
+
"type": "boolean",
|
|
711
|
+
"default": false,
|
|
712
|
+
"description": "Mount the entity proxy route and advertise the entityProxy capability."
|
|
713
|
+
},
|
|
714
|
+
"timeoutMs": {
|
|
715
|
+
"type": "integer",
|
|
716
|
+
"minimum": 1,
|
|
717
|
+
"maximum": 25000,
|
|
718
|
+
"default": 25000,
|
|
719
|
+
"description": "Upstream timeout for one proxied call, in milliseconds (can only be lowered)."
|
|
720
|
+
},
|
|
721
|
+
"maxRequestBytes": {
|
|
722
|
+
"type": "integer",
|
|
723
|
+
"minimum": 1,
|
|
724
|
+
"maximum": 10485760,
|
|
725
|
+
"default": 1048576,
|
|
726
|
+
"description": "Largest proxied request body, in bytes."
|
|
727
|
+
},
|
|
728
|
+
"maxResponseBytes": {
|
|
729
|
+
"type": "integer",
|
|
730
|
+
"minimum": 1,
|
|
731
|
+
"maximum": 5242880,
|
|
732
|
+
"default": 5242880,
|
|
733
|
+
"description": "Largest proxied response body, in bytes (can only be lowered)."
|
|
734
|
+
},
|
|
735
|
+
"modules": {
|
|
736
|
+
"type": "object",
|
|
737
|
+
"description": "Per-module allow-list override, keyed by module name. 'module' uses the module's own proxy.allow list.",
|
|
738
|
+
"additionalProperties": {
|
|
739
|
+
"type": "object",
|
|
740
|
+
"properties": {
|
|
741
|
+
"allow": {
|
|
742
|
+
"oneOf": [
|
|
743
|
+
{
|
|
744
|
+
"type": "string",
|
|
745
|
+
"enum": [
|
|
746
|
+
"module"
|
|
747
|
+
]
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"type": "array",
|
|
751
|
+
"items": {
|
|
752
|
+
"type": "object",
|
|
753
|
+
"required": [
|
|
754
|
+
"method",
|
|
755
|
+
"path"
|
|
756
|
+
],
|
|
757
|
+
"properties": {
|
|
758
|
+
"method": {
|
|
759
|
+
"type": "string",
|
|
760
|
+
"enum": [
|
|
761
|
+
"GET",
|
|
762
|
+
"POST",
|
|
763
|
+
"PUT",
|
|
764
|
+
"PATCH",
|
|
765
|
+
"DELETE",
|
|
766
|
+
"*"
|
|
767
|
+
],
|
|
768
|
+
"description": "HTTP method, or * for any (app definition only; frigg validate warns)"
|
|
769
|
+
},
|
|
770
|
+
"path": {
|
|
771
|
+
"type": "string",
|
|
772
|
+
"pattern": "^/",
|
|
773
|
+
"description": "Path pattern relative to the module's base URL. `:param` matches one segment; a trailing `/**` matches a subtree."
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"additionalProperties": false
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
]
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
"additionalProperties": false
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
"additionalProperties": false
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
"additionalProperties": false
|
|
790
|
+
},
|
|
679
791
|
"custom": {
|
|
680
792
|
"type": "object",
|
|
681
793
|
"description": "Custom application-specific configuration",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"properties": {
|
|
9
9
|
"frameworkVersion": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"description": "
|
|
12
|
-
"pattern": "^[
|
|
13
|
-
"examples": ["
|
|
11
|
+
"description": "Serverless Framework version constraint",
|
|
12
|
+
"pattern": "^[><=]*\\d+\\.\\d+\\.\\d+$",
|
|
13
|
+
"examples": [">=3.17.0", "3.38.0"]
|
|
14
14
|
},
|
|
15
15
|
"service": {
|
|
16
16
|
"type": "string",
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
"additionalProperties": false,
|
|
354
354
|
"examples": [
|
|
355
355
|
{
|
|
356
|
-
"frameworkVersion": "
|
|
356
|
+
"frameworkVersion": ">=3.17.0",
|
|
357
357
|
"service": "frigg-backend",
|
|
358
358
|
"provider": {
|
|
359
359
|
"name": "aws",
|