@friggframework/schemas 2.0.0-next.45 → 2.0.0-next.47
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-next.
|
|
3
|
+
"version": "2.0.0-next.47",
|
|
4
4
|
"description": "Canonical JSON Schema definitions for Frigg Framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"validators/",
|
|
40
40
|
"index.js"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "7a7b05dc023f05a6b1c18075064e88f29156fee1"
|
|
43
43
|
}
|
|
@@ -2,10 +2,42 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schemas.friggframework.org/app-definition.schema.json",
|
|
4
4
|
"title": "Frigg Application Definition",
|
|
5
|
-
"description": "Schema for defining a Frigg application configuration including integrations,
|
|
5
|
+
"description": "Schema for defining a Frigg application configuration including integrations, infrastructure, security settings, and deployment options.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["integrations"],
|
|
8
8
|
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Service name for deployment (used as CloudFormation stack name prefix)",
|
|
12
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9-]*$",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 128,
|
|
15
|
+
"examples": ["my-frigg-app", "customer-integrations"]
|
|
16
|
+
},
|
|
17
|
+
"provider": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Cloud provider for deployment",
|
|
20
|
+
"enum": ["aws"],
|
|
21
|
+
"default": "aws"
|
|
22
|
+
},
|
|
23
|
+
"environment": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Environment variable configuration (key: true/false flags)",
|
|
26
|
+
"patternProperties": {
|
|
27
|
+
"^[A-Z][A-Z0-9_]*$": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "Set to true to include this environment variable from process.env"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"examples": [
|
|
34
|
+
{
|
|
35
|
+
"NODE_ENV": true,
|
|
36
|
+
"API_KEY": true,
|
|
37
|
+
"DATABASE_URL": true
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
9
41
|
"integrations": {
|
|
10
42
|
"type": "array",
|
|
11
43
|
"description": "Array of integration classes to enable in the application",
|
|
@@ -17,13 +49,84 @@
|
|
|
17
49
|
},
|
|
18
50
|
"user": {
|
|
19
51
|
"type": "object",
|
|
20
|
-
"description": "User management configuration",
|
|
52
|
+
"description": "User management and authentication configuration",
|
|
21
53
|
"properties": {
|
|
54
|
+
"usePassword": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Enable password-based authentication for user login",
|
|
57
|
+
"default": true
|
|
58
|
+
},
|
|
22
59
|
"password": {
|
|
23
60
|
"type": "boolean",
|
|
24
|
-
"description": "Enable password-based authentication",
|
|
61
|
+
"description": "DEPRECATED: Use 'usePassword' instead. Enable password-based authentication",
|
|
25
62
|
"default": true
|
|
26
63
|
},
|
|
64
|
+
"primary": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "Primary user type for authentication",
|
|
67
|
+
"enum": ["individual", "organization"],
|
|
68
|
+
"default": "individual"
|
|
69
|
+
},
|
|
70
|
+
"individualUserRequired": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"description": "Require individual user for authentication",
|
|
73
|
+
"default": true
|
|
74
|
+
},
|
|
75
|
+
"organizationUserRequired": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "Require organization user for authentication",
|
|
78
|
+
"default": false
|
|
79
|
+
},
|
|
80
|
+
"authModes": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"description": "Authentication mode configuration - enables multiple authentication strategies. x-frigg-appUserId and x-frigg-appOrgId headers are automatically supported for user identification with any auth mode.",
|
|
83
|
+
"properties": {
|
|
84
|
+
"friggToken": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"description": "Enable Frigg native bearer token authentication (from /user/login)",
|
|
87
|
+
"default": true
|
|
88
|
+
},
|
|
89
|
+
"sharedSecret": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"description": "Enable shared secret authentication for backend-to-backend communication (requires FRIGG_API_KEY env var and x-frigg-api-key header)",
|
|
92
|
+
"default": false
|
|
93
|
+
},
|
|
94
|
+
"adopterJwt": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "Enable custom JWT authentication from adopter's auth system (requires jwtConfig)",
|
|
97
|
+
"default": false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
"jwtConfig": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"description": "JWT configuration for adopter JWT authentication mode (when authModes.adopterJwt is true)",
|
|
105
|
+
"properties": {
|
|
106
|
+
"secret": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "JWT secret key for signature validation (should be set via environment variable)"
|
|
109
|
+
},
|
|
110
|
+
"userIdClaim": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "JWT claim name containing the user ID",
|
|
113
|
+
"default": "sub"
|
|
114
|
+
},
|
|
115
|
+
"orgIdClaim": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "JWT claim name containing the organization ID",
|
|
118
|
+
"default": "org_id"
|
|
119
|
+
},
|
|
120
|
+
"algorithm": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "JWT signing algorithm",
|
|
123
|
+
"enum": ["HS256", "HS384", "HS512", "RS256", "RS384", "RS512"],
|
|
124
|
+
"default": "HS256"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": ["secret"],
|
|
128
|
+
"additionalProperties": false
|
|
129
|
+
},
|
|
27
130
|
"fields": {
|
|
28
131
|
"type": "array",
|
|
29
132
|
"description": "Additional user fields",
|
|
@@ -64,27 +167,112 @@
|
|
|
64
167
|
},
|
|
65
168
|
"database": {
|
|
66
169
|
"type": "object",
|
|
67
|
-
"description": "Database
|
|
170
|
+
"description": "Database configuration for MongoDB, PostgreSQL, or DocumentDB",
|
|
68
171
|
"properties": {
|
|
69
172
|
"uri": {
|
|
70
173
|
"type": "string",
|
|
71
174
|
"description": "Database connection URI (should be set via environment variable)",
|
|
72
175
|
"format": "uri"
|
|
73
176
|
},
|
|
74
|
-
"
|
|
177
|
+
"mongoDB": {
|
|
75
178
|
"type": "object",
|
|
76
|
-
"description": "MongoDB
|
|
179
|
+
"description": "MongoDB configuration",
|
|
77
180
|
"properties": {
|
|
78
|
-
"
|
|
181
|
+
"enable": {
|
|
79
182
|
"type": "boolean",
|
|
80
|
-
"
|
|
183
|
+
"description": "Enable MongoDB database",
|
|
184
|
+
"default": false
|
|
81
185
|
},
|
|
82
|
-
"
|
|
83
|
-
"type": "
|
|
84
|
-
"
|
|
186
|
+
"uri": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "MongoDB connection URI"
|
|
85
189
|
}
|
|
86
190
|
},
|
|
87
191
|
"additionalProperties": true
|
|
192
|
+
},
|
|
193
|
+
"documentDB": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"description": "AWS DocumentDB configuration (MongoDB-compatible)",
|
|
196
|
+
"properties": {
|
|
197
|
+
"enable": {
|
|
198
|
+
"type": "boolean",
|
|
199
|
+
"description": "Enable DocumentDB database",
|
|
200
|
+
"default": false
|
|
201
|
+
},
|
|
202
|
+
"tlsCAFile": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": "Path to TLS CA certificate file for DocumentDB",
|
|
205
|
+
"examples": ["./security/global-bundle.pem"]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"additionalProperties": true
|
|
209
|
+
},
|
|
210
|
+
"postgres": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"description": "PostgreSQL/Aurora configuration",
|
|
213
|
+
"properties": {
|
|
214
|
+
"enable": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"description": "Enable PostgreSQL database",
|
|
217
|
+
"default": false
|
|
218
|
+
},
|
|
219
|
+
"management": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "How to manage the PostgreSQL database",
|
|
222
|
+
"enum": ["discover", "create-new", "existing"],
|
|
223
|
+
"default": "discover"
|
|
224
|
+
},
|
|
225
|
+
"endpoint": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"description": "Existing database endpoint (when management='existing')",
|
|
228
|
+
"examples": ["mydb.cluster-abc123.us-east-1.rds.amazonaws.com"]
|
|
229
|
+
},
|
|
230
|
+
"port": {
|
|
231
|
+
"type": "integer",
|
|
232
|
+
"description": "Database port",
|
|
233
|
+
"default": 5432
|
|
234
|
+
},
|
|
235
|
+
"database": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "Database name",
|
|
238
|
+
"default": "frigg"
|
|
239
|
+
},
|
|
240
|
+
"username": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "Database username",
|
|
243
|
+
"default": "postgres"
|
|
244
|
+
},
|
|
245
|
+
"selfHeal": {
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"description": "Automatically fix database configuration issues",
|
|
248
|
+
"default": true
|
|
249
|
+
},
|
|
250
|
+
"publiclyAccessible": {
|
|
251
|
+
"type": "boolean",
|
|
252
|
+
"description": "Make database publicly accessible (not recommended for production)",
|
|
253
|
+
"default": false
|
|
254
|
+
},
|
|
255
|
+
"autoCreateCredentials": {
|
|
256
|
+
"type": "boolean",
|
|
257
|
+
"description": "Automatically create Secrets Manager secret and rotate Aurora password when discovering existing cluster (only applies when management='discover')",
|
|
258
|
+
"default": false
|
|
259
|
+
},
|
|
260
|
+
"minCapacity": {
|
|
261
|
+
"type": "number",
|
|
262
|
+
"description": "Minimum Aurora Serverless capacity units (0.5-128)",
|
|
263
|
+
"minimum": 0.5,
|
|
264
|
+
"maximum": 128,
|
|
265
|
+
"default": 0.5
|
|
266
|
+
},
|
|
267
|
+
"maxCapacity": {
|
|
268
|
+
"type": "number",
|
|
269
|
+
"description": "Maximum Aurora Serverless capacity units (0.5-128)",
|
|
270
|
+
"minimum": 0.5,
|
|
271
|
+
"maximum": 128,
|
|
272
|
+
"default": 1
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"additionalProperties": false
|
|
88
276
|
}
|
|
89
277
|
},
|
|
90
278
|
"additionalProperties": true
|
|
@@ -97,11 +285,11 @@
|
|
|
97
285
|
"type": "string",
|
|
98
286
|
"description": "Method for field-level encryption",
|
|
99
287
|
"enum": ["kms", "aes"],
|
|
100
|
-
"default": "
|
|
288
|
+
"default": "aes"
|
|
101
289
|
},
|
|
102
290
|
"createResourceIfNoneFound": {
|
|
103
291
|
"type": "boolean",
|
|
104
|
-
"description": "Create KMS key if none found",
|
|
292
|
+
"description": "Create KMS key if none found during discovery",
|
|
105
293
|
"default": false
|
|
106
294
|
}
|
|
107
295
|
},
|
|
@@ -109,12 +297,152 @@
|
|
|
109
297
|
},
|
|
110
298
|
"vpc": {
|
|
111
299
|
"type": "object",
|
|
112
|
-
"description": "Virtual Private Cloud settings",
|
|
300
|
+
"description": "Virtual Private Cloud settings for Lambda functions",
|
|
113
301
|
"properties": {
|
|
114
302
|
"enable": {
|
|
115
303
|
"type": "boolean",
|
|
116
|
-
"description": "Enable VPC for
|
|
304
|
+
"description": "Enable VPC for Lambda functions",
|
|
305
|
+
"default": false
|
|
306
|
+
},
|
|
307
|
+
"management": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"description": "How to manage VPC infrastructure",
|
|
310
|
+
"enum": ["discover", "create-new", "existing"],
|
|
311
|
+
"default": "discover"
|
|
312
|
+
},
|
|
313
|
+
"vpcId": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"description": "Existing VPC ID (when management='existing')",
|
|
316
|
+
"pattern": "^vpc-[a-z0-9]+$",
|
|
317
|
+
"examples": ["vpc-abc123"]
|
|
318
|
+
},
|
|
319
|
+
"cidrBlock": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"description": "CIDR block for VPC (when management='create-new')",
|
|
322
|
+
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$",
|
|
323
|
+
"default": "10.0.0.0/16"
|
|
324
|
+
},
|
|
325
|
+
"securityGroupIds": {
|
|
326
|
+
"type": "array",
|
|
327
|
+
"description": "Security group IDs for Lambda functions",
|
|
328
|
+
"items": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"pattern": "^sg-[a-z0-9]+$"
|
|
331
|
+
},
|
|
332
|
+
"examples": [["sg-abc123", "sg-def456"]]
|
|
333
|
+
},
|
|
334
|
+
"subnets": {
|
|
335
|
+
"type": "object",
|
|
336
|
+
"description": "Subnet configuration",
|
|
337
|
+
"properties": {
|
|
338
|
+
"management": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "How to manage subnets",
|
|
341
|
+
"enum": ["discover", "create-new", "existing"],
|
|
342
|
+
"default": "discover"
|
|
343
|
+
},
|
|
344
|
+
"ids": {
|
|
345
|
+
"type": "array",
|
|
346
|
+
"description": "Existing subnet IDs",
|
|
347
|
+
"items": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"pattern": "^subnet-[a-z0-9]+$"
|
|
350
|
+
},
|
|
351
|
+
"minItems": 2,
|
|
352
|
+
"examples": [["subnet-abc123", "subnet-def456"]]
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"additionalProperties": false
|
|
356
|
+
},
|
|
357
|
+
"natGateway": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"description": "NAT Gateway configuration for private subnets",
|
|
360
|
+
"properties": {
|
|
361
|
+
"management": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"description": "How to manage NAT Gateway",
|
|
364
|
+
"enum": ["discover", "create-new", "existing"],
|
|
365
|
+
"default": "discover"
|
|
366
|
+
},
|
|
367
|
+
"id": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"description": "Existing NAT Gateway ID",
|
|
370
|
+
"pattern": "^nat-[a-z0-9]+$",
|
|
371
|
+
"examples": ["nat-abc123"]
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"additionalProperties": false
|
|
375
|
+
},
|
|
376
|
+
"enableVPCEndpoints": {
|
|
377
|
+
"type": "boolean",
|
|
378
|
+
"description": "Create VPC endpoints for AWS services (S3, DynamoDB, KMS, Secrets Manager)",
|
|
117
379
|
"default": true
|
|
380
|
+
},
|
|
381
|
+
"selfHeal": {
|
|
382
|
+
"type": "boolean",
|
|
383
|
+
"description": "Automatically fix VPC configuration issues",
|
|
384
|
+
"default": false
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"additionalProperties": false
|
|
388
|
+
},
|
|
389
|
+
"ssm": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"description": "AWS Systems Manager Parameter Store configuration",
|
|
392
|
+
"properties": {
|
|
393
|
+
"enable": {
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"description": "Enable SSM Parameter Store for configuration",
|
|
396
|
+
"default": false
|
|
397
|
+
},
|
|
398
|
+
"parameters": {
|
|
399
|
+
"type": "object",
|
|
400
|
+
"description": "SSM parameter definitions",
|
|
401
|
+
"patternProperties": {
|
|
402
|
+
"^[a-zA-Z0-9/_.-]+$": {
|
|
403
|
+
"type": "object",
|
|
404
|
+
"properties": {
|
|
405
|
+
"type": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"enum": ["String", "StringList", "SecureString"],
|
|
408
|
+
"default": "String"
|
|
409
|
+
},
|
|
410
|
+
"description": {
|
|
411
|
+
"type": "string"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"additionalProperties": false
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"additionalProperties": false
|
|
420
|
+
},
|
|
421
|
+
"secretsManager": {
|
|
422
|
+
"type": "object",
|
|
423
|
+
"description": "AWS Secrets Manager configuration",
|
|
424
|
+
"properties": {
|
|
425
|
+
"enable": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"description": "Enable AWS Secrets Manager for secure credential storage",
|
|
428
|
+
"default": false
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"additionalProperties": false
|
|
432
|
+
},
|
|
433
|
+
"websockets": {
|
|
434
|
+
"type": "object",
|
|
435
|
+
"description": "WebSocket API Gateway configuration",
|
|
436
|
+
"properties": {
|
|
437
|
+
"enable": {
|
|
438
|
+
"type": "boolean",
|
|
439
|
+
"description": "Enable WebSocket API Gateway",
|
|
440
|
+
"default": false
|
|
441
|
+
},
|
|
442
|
+
"routeSelectionExpression": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"description": "Route selection expression for WebSocket",
|
|
445
|
+
"default": "$request.body.action"
|
|
118
446
|
}
|
|
119
447
|
},
|
|
120
448
|
"additionalProperties": false
|
|
@@ -221,7 +549,7 @@
|
|
|
221
549
|
"properties": {
|
|
222
550
|
"appName": {
|
|
223
551
|
"type": "string",
|
|
224
|
-
"description": "Application name",
|
|
552
|
+
"description": "Application display name",
|
|
225
553
|
"default": "My Frigg Application"
|
|
226
554
|
},
|
|
227
555
|
"version": {
|
|
@@ -232,7 +560,7 @@
|
|
|
232
560
|
},
|
|
233
561
|
"environment": {
|
|
234
562
|
"type": "string",
|
|
235
|
-
"description": "
|
|
563
|
+
"description": "Deployment environment/stage",
|
|
236
564
|
"enum": ["development", "staging", "production", "test"],
|
|
237
565
|
"default": "development"
|
|
238
566
|
},
|
|
@@ -253,14 +581,36 @@
|
|
|
253
581
|
"additionalProperties": false,
|
|
254
582
|
"examples": [
|
|
255
583
|
{
|
|
584
|
+
"name": "my-frigg-app",
|
|
585
|
+
"provider": "aws",
|
|
586
|
+
"environment": {
|
|
587
|
+
"NODE_ENV": true,
|
|
588
|
+
"API_KEY": true
|
|
589
|
+
},
|
|
256
590
|
"integrations": [],
|
|
257
591
|
"user": {
|
|
258
592
|
"password": true
|
|
259
593
|
},
|
|
594
|
+
"database": {
|
|
595
|
+
"postgres": {
|
|
596
|
+
"enable": true,
|
|
597
|
+
"management": "create-new"
|
|
598
|
+
}
|
|
599
|
+
},
|
|
260
600
|
"encryption": {
|
|
261
|
-
"fieldLevelEncryptionMethod": "kms"
|
|
601
|
+
"fieldLevelEncryptionMethod": "kms",
|
|
602
|
+
"createResourceIfNoneFound": true
|
|
262
603
|
},
|
|
263
604
|
"vpc": {
|
|
605
|
+
"enable": true,
|
|
606
|
+
"management": "create-new",
|
|
607
|
+
"cidrBlock": "10.0.0.0/16",
|
|
608
|
+
"enableVPCEndpoints": true
|
|
609
|
+
},
|
|
610
|
+
"ssm": {
|
|
611
|
+
"enable": true
|
|
612
|
+
},
|
|
613
|
+
"websockets": {
|
|
264
614
|
"enable": true
|
|
265
615
|
},
|
|
266
616
|
"security": {
|
|
@@ -271,12 +621,7 @@
|
|
|
271
621
|
},
|
|
272
622
|
"logging": {
|
|
273
623
|
"level": "info"
|
|
274
|
-
},
|
|
275
|
-
"custom": {
|
|
276
|
-
"appName": "My Frigg Application",
|
|
277
|
-
"version": "1.0.0",
|
|
278
|
-
"environment": "development"
|
|
279
624
|
}
|
|
280
625
|
}
|
|
281
626
|
]
|
|
282
|
-
}
|
|
627
|
+
}
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
"userModel": {
|
|
18
18
|
"type": "object",
|
|
19
19
|
"description": "Frigg User model schema",
|
|
20
|
-
"required": [
|
|
20
|
+
"required": [
|
|
21
|
+
"_id"
|
|
22
|
+
],
|
|
21
23
|
"properties": {
|
|
22
24
|
"_id": {
|
|
23
25
|
"$ref": "#/definitions/objectId",
|
|
@@ -47,7 +49,12 @@
|
|
|
47
49
|
"role": {
|
|
48
50
|
"type": "string",
|
|
49
51
|
"description": "User role",
|
|
50
|
-
"enum": [
|
|
52
|
+
"enum": [
|
|
53
|
+
"admin",
|
|
54
|
+
"user",
|
|
55
|
+
"developer",
|
|
56
|
+
"viewer"
|
|
57
|
+
],
|
|
51
58
|
"default": "user"
|
|
52
59
|
},
|
|
53
60
|
"permissions": {
|
|
@@ -56,10 +63,18 @@
|
|
|
56
63
|
"items": {
|
|
57
64
|
"type": "string",
|
|
58
65
|
"enum": [
|
|
59
|
-
"integrations:read",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
66
|
+
"integrations:read",
|
|
67
|
+
"integrations:write",
|
|
68
|
+
"integrations:delete",
|
|
69
|
+
"entities:read",
|
|
70
|
+
"entities:write",
|
|
71
|
+
"entities:delete",
|
|
72
|
+
"credentials:read",
|
|
73
|
+
"credentials:write",
|
|
74
|
+
"credentials:delete",
|
|
75
|
+
"users:read",
|
|
76
|
+
"users:write",
|
|
77
|
+
"users:delete",
|
|
63
78
|
"admin:all"
|
|
64
79
|
]
|
|
65
80
|
},
|
|
@@ -71,7 +86,11 @@
|
|
|
71
86
|
"properties": {
|
|
72
87
|
"theme": {
|
|
73
88
|
"type": "string",
|
|
74
|
-
"enum": [
|
|
89
|
+
"enum": [
|
|
90
|
+
"light",
|
|
91
|
+
"dark",
|
|
92
|
+
"auto"
|
|
93
|
+
],
|
|
75
94
|
"default": "light"
|
|
76
95
|
},
|
|
77
96
|
"language": {
|
|
@@ -128,7 +147,10 @@
|
|
|
128
147
|
"credentialModel": {
|
|
129
148
|
"type": "object",
|
|
130
149
|
"description": "Frigg Credential model schema",
|
|
131
|
-
"required": [
|
|
150
|
+
"required": [
|
|
151
|
+
"_id",
|
|
152
|
+
"userId"
|
|
153
|
+
],
|
|
132
154
|
"properties": {
|
|
133
155
|
"_id": {
|
|
134
156
|
"$ref": "#/definitions/objectId",
|
|
@@ -138,12 +160,6 @@
|
|
|
138
160
|
"$ref": "#/definitions/objectId",
|
|
139
161
|
"description": "Associated user ID"
|
|
140
162
|
},
|
|
141
|
-
"subType": {
|
|
142
|
-
"type": "string",
|
|
143
|
-
"description": "Integration type for this credential",
|
|
144
|
-
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
|
|
145
|
-
"maxLength": 100
|
|
146
|
-
},
|
|
147
163
|
"externalId": {
|
|
148
164
|
"type": "string",
|
|
149
165
|
"description": "External system identifier",
|
|
@@ -169,7 +185,11 @@
|
|
|
169
185
|
"token_type": {
|
|
170
186
|
"type": "string",
|
|
171
187
|
"description": "Token type",
|
|
172
|
-
"enum": [
|
|
188
|
+
"enum": [
|
|
189
|
+
"Bearer",
|
|
190
|
+
"Basic",
|
|
191
|
+
"API-Key"
|
|
192
|
+
],
|
|
173
193
|
"default": "Bearer"
|
|
174
194
|
},
|
|
175
195
|
"expires_at": {
|
|
@@ -214,7 +234,10 @@
|
|
|
214
234
|
"description": "Error code"
|
|
215
235
|
}
|
|
216
236
|
},
|
|
217
|
-
"required": [
|
|
237
|
+
"required": [
|
|
238
|
+
"error",
|
|
239
|
+
"timestamp"
|
|
240
|
+
]
|
|
218
241
|
}
|
|
219
242
|
}
|
|
220
243
|
},
|
|
@@ -239,7 +262,11 @@
|
|
|
239
262
|
"entityModel": {
|
|
240
263
|
"type": "object",
|
|
241
264
|
"description": "Frigg Entity model schema",
|
|
242
|
-
"required": [
|
|
265
|
+
"required": [
|
|
266
|
+
"_id",
|
|
267
|
+
"credentialId",
|
|
268
|
+
"userId"
|
|
269
|
+
],
|
|
243
270
|
"properties": {
|
|
244
271
|
"_id": {
|
|
245
272
|
"$ref": "#/definitions/objectId",
|
|
@@ -253,9 +280,9 @@
|
|
|
253
280
|
"$ref": "#/definitions/objectId",
|
|
254
281
|
"description": "Associated user ID"
|
|
255
282
|
},
|
|
256
|
-
"
|
|
283
|
+
"moduleName": {
|
|
257
284
|
"type": "string",
|
|
258
|
-
"description": "
|
|
285
|
+
"description": "Module type identifier (e.g., 'salesforce', 'hubspot', 'attio'). Represents the API/service being integrated. Historically mapped from Mongoose discriminator (__t).",
|
|
259
286
|
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
|
|
260
287
|
"maxLength": 100
|
|
261
288
|
},
|
|
@@ -286,13 +313,23 @@
|
|
|
286
313
|
"sync_direction": {
|
|
287
314
|
"type": "string",
|
|
288
315
|
"description": "Synchronization direction",
|
|
289
|
-
"enum": [
|
|
316
|
+
"enum": [
|
|
317
|
+
"incoming",
|
|
318
|
+
"outgoing",
|
|
319
|
+
"bidirectional"
|
|
320
|
+
],
|
|
290
321
|
"default": "bidirectional"
|
|
291
322
|
},
|
|
292
323
|
"sync_frequency": {
|
|
293
324
|
"type": "string",
|
|
294
325
|
"description": "Synchronization frequency",
|
|
295
|
-
"enum": [
|
|
326
|
+
"enum": [
|
|
327
|
+
"real-time",
|
|
328
|
+
"hourly",
|
|
329
|
+
"daily",
|
|
330
|
+
"weekly",
|
|
331
|
+
"manual"
|
|
332
|
+
],
|
|
296
333
|
"default": "hourly"
|
|
297
334
|
},
|
|
298
335
|
"field_mappings": {
|
|
@@ -311,7 +348,13 @@
|
|
|
311
348
|
"status": {
|
|
312
349
|
"type": "string",
|
|
313
350
|
"description": "Entity status",
|
|
314
|
-
"enum": [
|
|
351
|
+
"enum": [
|
|
352
|
+
"active",
|
|
353
|
+
"inactive",
|
|
354
|
+
"error",
|
|
355
|
+
"syncing",
|
|
356
|
+
"pending"
|
|
357
|
+
],
|
|
315
358
|
"default": "active"
|
|
316
359
|
},
|
|
317
360
|
"lastSync": {
|
|
@@ -342,7 +385,10 @@
|
|
|
342
385
|
"default": true
|
|
343
386
|
}
|
|
344
387
|
},
|
|
345
|
-
"required": [
|
|
388
|
+
"required": [
|
|
389
|
+
"error",
|
|
390
|
+
"timestamp"
|
|
391
|
+
]
|
|
346
392
|
}
|
|
347
393
|
},
|
|
348
394
|
"isActive": {
|
|
@@ -383,7 +429,10 @@
|
|
|
383
429
|
"lastName": "Doe",
|
|
384
430
|
"organization": "Example Corp",
|
|
385
431
|
"role": "user",
|
|
386
|
-
"permissions": [
|
|
432
|
+
"permissions": [
|
|
433
|
+
"integrations:read",
|
|
434
|
+
"integrations:write"
|
|
435
|
+
],
|
|
387
436
|
"preferences": {
|
|
388
437
|
"theme": "dark",
|
|
389
438
|
"language": "en",
|
|
@@ -399,7 +448,6 @@
|
|
|
399
448
|
"credential": {
|
|
400
449
|
"_id": "507f1f77bcf86cd799439012",
|
|
401
450
|
"userId": "507f1f77bcf86cd799439011",
|
|
402
|
-
"subType": "hubspot",
|
|
403
451
|
"externalId": "12345",
|
|
404
452
|
"auth_is_valid": true,
|
|
405
453
|
"authData": {
|
|
@@ -421,7 +469,6 @@
|
|
|
421
469
|
"_id": "507f1f77bcf86cd799439013",
|
|
422
470
|
"credentialId": "507f1f77bcf86cd799439012",
|
|
423
471
|
"userId": "507f1f77bcf86cd799439011",
|
|
424
|
-
"subType": "contact",
|
|
425
472
|
"name": "HubSpot Contacts",
|
|
426
473
|
"externalId": "hubspot_contacts_12345",
|
|
427
474
|
"config": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"runtime": {
|
|
33
33
|
"type": "string",
|
|
34
34
|
"description": "Runtime environment",
|
|
35
|
-
"enum": ["
|
|
35
|
+
"enum": ["nodejs20.x", "nodejs22.x", "python3.9", "python3.10", "python3.11", "python3.12"]
|
|
36
36
|
},
|
|
37
37
|
"timeout": {
|
|
38
38
|
"type": "integer",
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
"service": "frigg-backend",
|
|
353
353
|
"provider": {
|
|
354
354
|
"name": "aws",
|
|
355
|
-
"runtime": "
|
|
355
|
+
"runtime": "nodejs22.x",
|
|
356
356
|
"timeout": 30,
|
|
357
357
|
"region": "us-east-1",
|
|
358
358
|
"environment": {
|