@friggframework/schemas 2.0.0--canary.461.ec909cf.0 → 2.0.0--canary.461.7b36f0f.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.461.ec909cf.0",
3
+ "version": "2.0.0--canary.461.7b36f0f.0",
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": "ec909cf5076fa52ca3e914ee671a1c13c2cb11ee"
42
+ "gitHead": "7b36f0f437980499b06c66adc4ddbc3e80f6d8e6"
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, user management, security settings, and more.",
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",
@@ -64,27 +96,107 @@
64
96
  },
65
97
  "database": {
66
98
  "type": "object",
67
- "description": "Database connection and model configuration",
99
+ "description": "Database configuration for MongoDB, PostgreSQL, or DocumentDB",
68
100
  "properties": {
69
101
  "uri": {
70
102
  "type": "string",
71
103
  "description": "Database connection URI (should be set via environment variable)",
72
104
  "format": "uri"
73
105
  },
74
- "mongodb": {
106
+ "mongoDB": {
75
107
  "type": "object",
76
- "description": "MongoDB-specific options",
108
+ "description": "MongoDB configuration",
77
109
  "properties": {
78
- "useNewUrlParser": {
110
+ "enable": {
79
111
  "type": "boolean",
80
- "default": true
112
+ "description": "Enable MongoDB database",
113
+ "default": false
81
114
  },
82
- "useUnifiedTopology": {
83
- "type": "boolean",
84
- "default": true
115
+ "uri": {
116
+ "type": "string",
117
+ "description": "MongoDB connection URI"
85
118
  }
86
119
  },
87
120
  "additionalProperties": true
121
+ },
122
+ "documentDB": {
123
+ "type": "object",
124
+ "description": "AWS DocumentDB configuration (MongoDB-compatible)",
125
+ "properties": {
126
+ "enable": {
127
+ "type": "boolean",
128
+ "description": "Enable DocumentDB database",
129
+ "default": false
130
+ },
131
+ "tlsCAFile": {
132
+ "type": "string",
133
+ "description": "Path to TLS CA certificate file for DocumentDB",
134
+ "examples": ["./security/global-bundle.pem"]
135
+ }
136
+ },
137
+ "additionalProperties": true
138
+ },
139
+ "postgres": {
140
+ "type": "object",
141
+ "description": "PostgreSQL/Aurora configuration",
142
+ "properties": {
143
+ "enable": {
144
+ "type": "boolean",
145
+ "description": "Enable PostgreSQL database",
146
+ "default": false
147
+ },
148
+ "management": {
149
+ "type": "string",
150
+ "description": "How to manage the PostgreSQL database",
151
+ "enum": ["discover", "create-new", "existing"],
152
+ "default": "discover"
153
+ },
154
+ "endpoint": {
155
+ "type": "string",
156
+ "description": "Existing database endpoint (when management='existing')",
157
+ "examples": ["mydb.cluster-abc123.us-east-1.rds.amazonaws.com"]
158
+ },
159
+ "port": {
160
+ "type": "integer",
161
+ "description": "Database port",
162
+ "default": 5432
163
+ },
164
+ "database": {
165
+ "type": "string",
166
+ "description": "Database name",
167
+ "default": "frigg"
168
+ },
169
+ "username": {
170
+ "type": "string",
171
+ "description": "Database username",
172
+ "default": "postgres"
173
+ },
174
+ "selfHeal": {
175
+ "type": "boolean",
176
+ "description": "Automatically fix database configuration issues",
177
+ "default": true
178
+ },
179
+ "publiclyAccessible": {
180
+ "type": "boolean",
181
+ "description": "Make database publicly accessible (not recommended for production)",
182
+ "default": false
183
+ },
184
+ "minCapacity": {
185
+ "type": "number",
186
+ "description": "Minimum Aurora Serverless capacity units (0.5-128)",
187
+ "minimum": 0.5,
188
+ "maximum": 128,
189
+ "default": 0.5
190
+ },
191
+ "maxCapacity": {
192
+ "type": "number",
193
+ "description": "Maximum Aurora Serverless capacity units (0.5-128)",
194
+ "minimum": 0.5,
195
+ "maximum": 128,
196
+ "default": 1
197
+ }
198
+ },
199
+ "additionalProperties": false
88
200
  }
89
201
  },
90
202
  "additionalProperties": true
@@ -97,11 +209,11 @@
97
209
  "type": "string",
98
210
  "description": "Method for field-level encryption",
99
211
  "enum": ["kms", "aes"],
100
- "default": "kms"
212
+ "default": "aes"
101
213
  },
102
214
  "createResourceIfNoneFound": {
103
215
  "type": "boolean",
104
- "description": "Create KMS key if none found",
216
+ "description": "Create KMS key if none found during discovery",
105
217
  "default": false
106
218
  }
107
219
  },
@@ -109,12 +221,152 @@
109
221
  },
110
222
  "vpc": {
111
223
  "type": "object",
112
- "description": "Virtual Private Cloud settings",
224
+ "description": "Virtual Private Cloud settings for Lambda functions",
113
225
  "properties": {
114
226
  "enable": {
115
227
  "type": "boolean",
116
- "description": "Enable VPC for enhanced security",
228
+ "description": "Enable VPC for Lambda functions",
229
+ "default": false
230
+ },
231
+ "management": {
232
+ "type": "string",
233
+ "description": "How to manage VPC infrastructure",
234
+ "enum": ["discover", "create-new", "existing"],
235
+ "default": "discover"
236
+ },
237
+ "vpcId": {
238
+ "type": "string",
239
+ "description": "Existing VPC ID (when management='existing')",
240
+ "pattern": "^vpc-[a-z0-9]+$",
241
+ "examples": ["vpc-abc123"]
242
+ },
243
+ "cidrBlock": {
244
+ "type": "string",
245
+ "description": "CIDR block for VPC (when management='create-new')",
246
+ "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$",
247
+ "default": "10.0.0.0/16"
248
+ },
249
+ "securityGroupIds": {
250
+ "type": "array",
251
+ "description": "Security group IDs for Lambda functions",
252
+ "items": {
253
+ "type": "string",
254
+ "pattern": "^sg-[a-z0-9]+$"
255
+ },
256
+ "examples": [["sg-abc123", "sg-def456"]]
257
+ },
258
+ "subnets": {
259
+ "type": "object",
260
+ "description": "Subnet configuration",
261
+ "properties": {
262
+ "management": {
263
+ "type": "string",
264
+ "description": "How to manage subnets",
265
+ "enum": ["discover", "create-new", "existing"],
266
+ "default": "discover"
267
+ },
268
+ "ids": {
269
+ "type": "array",
270
+ "description": "Existing subnet IDs",
271
+ "items": {
272
+ "type": "string",
273
+ "pattern": "^subnet-[a-z0-9]+$"
274
+ },
275
+ "minItems": 2,
276
+ "examples": [["subnet-abc123", "subnet-def456"]]
277
+ }
278
+ },
279
+ "additionalProperties": false
280
+ },
281
+ "natGateway": {
282
+ "type": "object",
283
+ "description": "NAT Gateway configuration for private subnets",
284
+ "properties": {
285
+ "management": {
286
+ "type": "string",
287
+ "description": "How to manage NAT Gateway",
288
+ "enum": ["discover", "create-new", "existing"],
289
+ "default": "discover"
290
+ },
291
+ "id": {
292
+ "type": "string",
293
+ "description": "Existing NAT Gateway ID",
294
+ "pattern": "^nat-[a-z0-9]+$",
295
+ "examples": ["nat-abc123"]
296
+ }
297
+ },
298
+ "additionalProperties": false
299
+ },
300
+ "enableVPCEndpoints": {
301
+ "type": "boolean",
302
+ "description": "Create VPC endpoints for AWS services (S3, DynamoDB, KMS, Secrets Manager)",
117
303
  "default": true
304
+ },
305
+ "selfHeal": {
306
+ "type": "boolean",
307
+ "description": "Automatically fix VPC configuration issues",
308
+ "default": false
309
+ }
310
+ },
311
+ "additionalProperties": false
312
+ },
313
+ "ssm": {
314
+ "type": "object",
315
+ "description": "AWS Systems Manager Parameter Store configuration",
316
+ "properties": {
317
+ "enable": {
318
+ "type": "boolean",
319
+ "description": "Enable SSM Parameter Store for configuration",
320
+ "default": false
321
+ },
322
+ "parameters": {
323
+ "type": "object",
324
+ "description": "SSM parameter definitions",
325
+ "patternProperties": {
326
+ "^[a-zA-Z0-9/_.-]+$": {
327
+ "type": "object",
328
+ "properties": {
329
+ "type": {
330
+ "type": "string",
331
+ "enum": ["String", "StringList", "SecureString"],
332
+ "default": "String"
333
+ },
334
+ "description": {
335
+ "type": "string"
336
+ }
337
+ }
338
+ }
339
+ },
340
+ "additionalProperties": false
341
+ }
342
+ },
343
+ "additionalProperties": false
344
+ },
345
+ "secretsManager": {
346
+ "type": "object",
347
+ "description": "AWS Secrets Manager configuration",
348
+ "properties": {
349
+ "enable": {
350
+ "type": "boolean",
351
+ "description": "Enable AWS Secrets Manager for secure credential storage",
352
+ "default": false
353
+ }
354
+ },
355
+ "additionalProperties": false
356
+ },
357
+ "websockets": {
358
+ "type": "object",
359
+ "description": "WebSocket API Gateway configuration",
360
+ "properties": {
361
+ "enable": {
362
+ "type": "boolean",
363
+ "description": "Enable WebSocket API Gateway",
364
+ "default": false
365
+ },
366
+ "routeSelectionExpression": {
367
+ "type": "string",
368
+ "description": "Route selection expression for WebSocket",
369
+ "default": "$request.body.action"
118
370
  }
119
371
  },
120
372
  "additionalProperties": false
@@ -221,7 +473,7 @@
221
473
  "properties": {
222
474
  "appName": {
223
475
  "type": "string",
224
- "description": "Application name",
476
+ "description": "Application display name",
225
477
  "default": "My Frigg Application"
226
478
  },
227
479
  "version": {
@@ -232,7 +484,7 @@
232
484
  },
233
485
  "environment": {
234
486
  "type": "string",
235
- "description": "Runtime environment",
487
+ "description": "Deployment environment/stage",
236
488
  "enum": ["development", "staging", "production", "test"],
237
489
  "default": "development"
238
490
  },
@@ -253,14 +505,36 @@
253
505
  "additionalProperties": false,
254
506
  "examples": [
255
507
  {
508
+ "name": "my-frigg-app",
509
+ "provider": "aws",
510
+ "environment": {
511
+ "NODE_ENV": true,
512
+ "API_KEY": true
513
+ },
256
514
  "integrations": [],
257
515
  "user": {
258
516
  "password": true
259
517
  },
518
+ "database": {
519
+ "postgres": {
520
+ "enable": true,
521
+ "management": "create-new"
522
+ }
523
+ },
260
524
  "encryption": {
261
- "fieldLevelEncryptionMethod": "kms"
525
+ "fieldLevelEncryptionMethod": "kms",
526
+ "createResourceIfNoneFound": true
262
527
  },
263
528
  "vpc": {
529
+ "enable": true,
530
+ "management": "create-new",
531
+ "cidrBlock": "10.0.0.0/16",
532
+ "enableVPCEndpoints": true
533
+ },
534
+ "ssm": {
535
+ "enable": true
536
+ },
537
+ "websockets": {
264
538
  "enable": true
265
539
  },
266
540
  "security": {
@@ -271,12 +545,7 @@
271
545
  },
272
546
  "logging": {
273
547
  "level": "info"
274
- },
275
- "custom": {
276
- "appName": "My Frigg Application",
277
- "version": "1.0.0",
278
- "environment": "development"
279
548
  }
280
549
  }
281
550
  ]
282
- }
551
+ }
@@ -32,7 +32,7 @@
32
32
  "runtime": {
33
33
  "type": "string",
34
34
  "description": "Runtime environment",
35
- "enum": ["nodejs18.x", "nodejs20.x", "python3.9", "python3.10", "python3.11"]
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": "nodejs20.x",
355
+ "runtime": "nodejs22.x",
356
356
  "timeout": 30,
357
357
  "region": "us-east-1",
358
358
  "environment": {