@happyvertical/smrt-sites 0.60.17 → 0.61.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.
@@ -2,81 +2,34 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-sites",
5
- "packageVersion": "0.60.17",
5
+ "packageVersion": "0.61.0",
6
6
  "objects": {
7
- "@happyvertical/smrt-sites:SiteAgentBindingCollection": {
8
- "name": "siteagentbindingcollection",
9
- "className": "SiteAgentBindingCollection",
10
- "qualifiedName": "@happyvertical/smrt-sites:SiteAgentBindingCollection",
11
- "collection": "siteagentbindings",
12
- "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/SiteAgentBindingCollection.ts",
7
+ "@happyvertical/smrt-sites:DnsZoneCollection": {
8
+ "name": "dnszonecollection",
9
+ "className": "DnsZoneCollection",
10
+ "qualifiedName": "@happyvertical/smrt-sites:DnsZoneCollection",
11
+ "collection": "dnszones",
12
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/DnsZoneCollection.ts",
13
13
  "packageName": "@happyvertical/smrt-sites",
14
14
  "fields": {},
15
15
  "methods": {
16
- "findBySite": {
17
- "name": "findBySite",
18
- "async": true,
19
- "parameters": [
20
- {
21
- "name": "siteId",
22
- "type": "string",
23
- "optional": false
24
- }
25
- ],
26
- "returnType": "Promise<SiteAgentBinding[]>",
27
- "isStatic": false,
28
- "isPublic": true
29
- },
30
- "findByAgent": {
31
- "name": "findByAgent",
32
- "async": true,
33
- "parameters": [
34
- {
35
- "name": "agentClass",
36
- "type": "string",
37
- "optional": false
38
- }
39
- ],
40
- "returnType": "Promise<SiteAgentBinding[]>",
41
- "isStatic": false,
42
- "isPublic": true
43
- },
44
- "findEnabled": {
45
- "name": "findEnabled",
46
- "async": true,
47
- "parameters": [
48
- {
49
- "name": "siteId",
50
- "type": "string",
51
- "optional": false
52
- }
53
- ],
54
- "returnType": "Promise<SiteAgentBinding[]>",
55
- "isStatic": false,
56
- "isPublic": true
57
- },
58
- "findBySiteAndAgent": {
59
- "name": "findBySiteAndAgent",
16
+ "findByName": {
17
+ "name": "findByName",
60
18
  "async": true,
61
19
  "parameters": [
62
20
  {
63
- "name": "siteId",
64
- "type": "string",
65
- "optional": false
66
- },
67
- {
68
- "name": "agentClass",
21
+ "name": "name",
69
22
  "type": "string",
70
23
  "optional": false
71
24
  }
72
25
  ],
73
- "returnType": "Promise<SiteAgentBinding | null>",
26
+ "returnType": "Promise<DnsZone | null>",
74
27
  "isStatic": false,
75
28
  "isPublic": true
76
29
  }
77
30
  },
78
31
  "decoratorConfig": {
79
- "tableName": "site_agent_bindings",
32
+ "tableName": "dns_zones",
80
33
  "api": {
81
34
  "include": [
82
35
  "list",
@@ -100,18 +53,18 @@
100
53
  }
101
54
  },
102
55
  "extends": "SmrtCollection",
103
- "extendsTypeArg": "SiteAgentBinding",
104
- "exportName": "SiteAgentBindingCollection",
105
- "collectionExportName": "SiteAgentBindingCollectionCollection",
106
- "collectionOf": "@happyvertical/smrt-sites:SiteAgentBinding",
56
+ "extendsTypeArg": "DnsZone",
57
+ "exportName": "DnsZoneCollection",
58
+ "collectionExportName": "DnsZoneCollectionCollection",
59
+ "collectionOf": "@happyvertical/smrt-sites:DnsZone",
107
60
  "inheritedExposure": [
108
61
  "api",
109
62
  "mcp",
110
63
  "cli"
111
64
  ],
112
65
  "schema": {
113
- "tableName": "site_agent_bindings",
114
- "ddl": "CREATE TABLE IF NOT EXISTS \"site_agent_bindings\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"site_id\" UUID,\n \"agent_class\" TEXT DEFAULT '',\n \"enabled\" BOOLEAN DEFAULT TRUE,\n \"config\" JSON DEFAULT '{}',\n \"priority\" INTEGER DEFAULT 0\n);",
66
+ "tableName": "dns_zones",
67
+ "ddl": "CREATE TABLE IF NOT EXISTS \"dns_zones\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
115
68
  "columns": {
116
69
  "_sync_origin_device_id": {
117
70
  "type": "TEXT"
@@ -150,134 +103,88 @@
150
103
  "notNull": true,
151
104
  "unique": false
152
105
  },
153
- "site_id": {
154
- "type": "UUID",
155
- "referenceKind": "foreignKey",
156
- "notNull": false,
157
- "unique": false,
158
- "foreignKey": {
159
- "table": "sites",
160
- "column": "id",
161
- "onDelete": "CASCADE",
162
- "onUpdate": "CASCADE"
163
- }
164
- },
165
- "agent_class": {
106
+ "name": {
166
107
  "type": "TEXT",
167
108
  "notNull": false,
168
109
  "unique": false,
169
110
  "default": ""
170
111
  },
171
- "enabled": {
172
- "type": "BOOLEAN",
173
- "notNull": false,
174
- "unique": false,
175
- "default": true
176
- },
177
- "config": {
178
- "type": "JSON",
179
- "notNull": false,
180
- "unique": false,
181
- "default": {}
182
- },
183
- "priority": {
184
- "type": "INTEGER",
112
+ "notes": {
113
+ "type": "TEXT",
185
114
  "notNull": false,
186
115
  "unique": false,
187
- "default": 0
116
+ "default": ""
188
117
  }
189
118
  },
190
119
  "indexes": [
191
120
  {
192
- "name": "site_agent_bindings_site_id_agent_class_idx",
121
+ "name": "dns_zones_tenant_id_name_idx",
193
122
  "columns": [
194
- "site_id",
195
- "agent_class"
123
+ "tenant_id",
124
+ "name"
196
125
  ],
197
126
  "unique": true,
198
127
  "nullsNotDistinct": true
199
128
  },
200
129
  {
201
- "name": "site_agent_bindings_slug_context_idx",
130
+ "name": "dns_zones_slug_context_idx",
202
131
  "columns": [
203
132
  "slug",
204
133
  "context"
205
134
  ]
206
135
  },
207
136
  {
208
- "name": "site_agent_bindings_tenant_id_created_at_idx",
137
+ "name": "dns_zones_tenant_id_created_at_idx",
209
138
  "columns": [
210
139
  "tenant_id",
211
140
  "created_at"
212
141
  ]
213
142
  }
214
143
  ],
215
- "version": "a739eab3"
144
+ "version": "a3af1dad"
216
145
  },
217
146
  "importPath": "@happyvertical/smrt-sites"
218
147
  },
219
- "@happyvertical/smrt-sites:SiteCollection": {
220
- "name": "sitecollection",
221
- "className": "SiteCollection",
222
- "qualifiedName": "@happyvertical/smrt-sites:SiteCollection",
223
- "collection": "sites",
224
- "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/SiteCollection.ts",
148
+ "@happyvertical/smrt-sites:DomainCollection": {
149
+ "name": "domaincollection",
150
+ "className": "DomainCollection",
151
+ "qualifiedName": "@happyvertical/smrt-sites:DomainCollection",
152
+ "collection": "domains",
153
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/DomainCollection.ts",
225
154
  "packageName": "@happyvertical/smrt-sites",
226
155
  "fields": {},
227
156
  "methods": {
228
- "findByDomain": {
229
- "name": "findByDomain",
157
+ "findByHostname": {
158
+ "name": "findByHostname",
230
159
  "async": true,
231
160
  "parameters": [
232
161
  {
233
- "name": "domain",
162
+ "name": "hostname",
234
163
  "type": "string",
235
164
  "optional": false
236
165
  }
237
166
  ],
238
- "returnType": "Promise<Site | null>",
167
+ "returnType": "Promise<Domain | null>",
239
168
  "isStatic": false,
240
169
  "isPublic": true
241
170
  },
242
- "findByTenant": {
243
- "name": "findByTenant",
171
+ "findByZone": {
172
+ "name": "findByZone",
244
173
  "async": true,
245
174
  "parameters": [
246
175
  {
247
- "name": "tenantId",
176
+ "name": "zoneId",
248
177
  "type": "string",
249
178
  "optional": false
250
179
  }
251
180
  ],
252
- "returnType": "Promise<Site[]>",
253
- "isStatic": false,
254
- "isPublic": true
255
- },
256
- "findByStatus": {
257
- "name": "findByStatus",
258
- "async": true,
259
- "parameters": [
260
- {
261
- "name": "status",
262
- "type": "SiteStatus",
263
- "optional": false
264
- }
265
- ],
266
- "returnType": "Promise<Site[]>",
267
- "isStatic": false,
268
- "isPublic": true
269
- },
270
- "findActive": {
271
- "name": "findActive",
272
- "async": true,
273
- "parameters": [],
274
- "returnType": "Promise<Site[]>",
181
+ "returnType": "Promise<Domain[]>",
275
182
  "isStatic": false,
276
183
  "isPublic": true
277
184
  }
278
185
  },
279
186
  "decoratorConfig": {
280
- "tableName": "sites",
187
+ "tableName": "domains",
281
188
  "api": {
282
189
  "include": [
283
190
  "list",
@@ -290,24 +197,29 @@
290
197
  "mcp": {
291
198
  "include": [
292
199
  "list",
293
- "get",
294
- "create",
295
- "update"
200
+ "get"
201
+ ]
202
+ },
203
+ "cli": {
204
+ "include": [
205
+ "list",
206
+ "get"
296
207
  ]
297
208
  }
298
209
  },
299
210
  "extends": "SmrtCollection",
300
- "extendsTypeArg": "Site",
301
- "exportName": "SiteCollection",
302
- "collectionExportName": "SiteCollectionCollection",
303
- "collectionOf": "@happyvertical/smrt-sites:Site",
211
+ "extendsTypeArg": "Domain",
212
+ "exportName": "DomainCollection",
213
+ "collectionExportName": "DomainCollectionCollection",
214
+ "collectionOf": "@happyvertical/smrt-sites:Domain",
304
215
  "inheritedExposure": [
305
216
  "api",
306
- "mcp"
217
+ "mcp",
218
+ "cli"
307
219
  ],
308
220
  "schema": {
309
- "tableName": "sites",
310
- "ddl": "CREATE TABLE IF NOT EXISTS \"sites\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"domain\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'draft',\n \"tier\" TEXT DEFAULT 'free',\n \"database_url\" TEXT DEFAULT '',\n \"database_type\" TEXT DEFAULT '',\n \"portal_config\" TEXT DEFAULT '',\n \"repository_url\" TEXT DEFAULT '',\n \"template_name\" TEXT DEFAULT '',\n \"provisioning_status\" TEXT DEFAULT '',\n \"provisioned_at\" TIMESTAMP,\n \"provisioning_error\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT ''\n);",
221
+ "tableName": "domains",
222
+ "ddl": "CREATE TABLE IF NOT EXISTS \"domains\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"zone_id\" UUID,\n \"hostname\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
311
223
  "columns": {
312
224
  "_sync_origin_device_id": {
313
225
  "type": "TEXT"
@@ -346,78 +258,25 @@
346
258
  "notNull": true,
347
259
  "unique": false
348
260
  },
349
- "name": {
350
- "type": "TEXT",
351
- "notNull": false,
352
- "unique": false,
353
- "default": ""
354
- },
355
- "domain": {
356
- "type": "TEXT",
357
- "notNull": false,
358
- "unique": false,
359
- "default": ""
360
- },
361
- "status": {
362
- "type": "TEXT",
363
- "notNull": false,
364
- "unique": false,
365
- "default": "draft"
366
- },
367
- "tier": {
368
- "type": "TEXT",
369
- "notNull": false,
370
- "unique": false,
371
- "default": "free"
372
- },
373
- "database_url": {
374
- "type": "TEXT",
375
- "notNull": false,
376
- "unique": false,
377
- "default": ""
378
- },
379
- "database_type": {
380
- "type": "TEXT",
381
- "notNull": false,
382
- "unique": false,
383
- "default": ""
384
- },
385
- "portal_config": {
386
- "type": "TEXT",
387
- "notNull": false,
388
- "unique": false,
389
- "default": ""
390
- },
391
- "repository_url": {
392
- "type": "TEXT",
393
- "notNull": false,
394
- "unique": false,
395
- "default": ""
396
- },
397
- "template_name": {
398
- "type": "TEXT",
399
- "notNull": false,
400
- "unique": false,
401
- "default": ""
402
- },
403
- "provisioning_status": {
404
- "type": "TEXT",
261
+ "zone_id": {
262
+ "type": "UUID",
263
+ "referenceKind": "foreignKey",
405
264
  "notNull": false,
406
265
  "unique": false,
407
- "default": ""
408
- },
409
- "provisioned_at": {
410
- "type": "TIMESTAMP",
411
- "notNull": false,
412
- "unique": false
266
+ "foreignKey": {
267
+ "table": "dns_zones",
268
+ "column": "id",
269
+ "onDelete": "NO ACTION",
270
+ "onUpdate": "CASCADE"
271
+ }
413
272
  },
414
- "provisioning_error": {
273
+ "hostname": {
415
274
  "type": "TEXT",
416
275
  "notNull": false,
417
276
  "unique": false,
418
277
  "default": ""
419
278
  },
420
- "metadata": {
279
+ "notes": {
421
280
  "type": "TEXT",
422
281
  "notNull": false,
423
282
  "unique": false,
@@ -426,30 +285,1361 @@
426
285
  },
427
286
  "indexes": [
428
287
  {
429
- "name": "sites_tenant_id_domain_idx",
288
+ "name": "domains_tenant_id_hostname_idx",
430
289
  "columns": [
431
290
  "tenant_id",
432
- "domain"
291
+ "hostname"
433
292
  ],
434
293
  "unique": true,
435
294
  "nullsNotDistinct": true
436
295
  },
437
296
  {
438
- "name": "sites_slug_context_idx",
297
+ "name": "domains_slug_context_idx",
439
298
  "columns": [
440
299
  "slug",
441
300
  "context"
442
301
  ]
443
302
  },
444
303
  {
445
- "name": "sites_tenant_id_created_at_idx",
304
+ "name": "domains_tenant_id_created_at_idx",
446
305
  "columns": [
447
306
  "tenant_id",
448
307
  "created_at"
449
308
  ]
309
+ },
310
+ {
311
+ "name": "domains_zone_id_idx",
312
+ "columns": [
313
+ "zone_id"
314
+ ]
450
315
  }
451
316
  ],
452
- "version": "e8449af3"
317
+ "version": "238f70a9"
318
+ },
319
+ "importPath": "@happyvertical/smrt-sites"
320
+ },
321
+ "@happyvertical/smrt-sites:ProjectDomainCollection": {
322
+ "name": "projectdomaincollection",
323
+ "className": "ProjectDomainCollection",
324
+ "qualifiedName": "@happyvertical/smrt-sites:ProjectDomainCollection",
325
+ "collection": "projectdomains",
326
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/ProjectDomainCollection.ts",
327
+ "packageName": "@happyvertical/smrt-sites",
328
+ "fields": {},
329
+ "methods": {
330
+ "byRight": {
331
+ "name": "byRight",
332
+ "async": true,
333
+ "parameters": [
334
+ {
335
+ "name": "rightId",
336
+ "type": "string",
337
+ "optional": false
338
+ },
339
+ {
340
+ "name": "opts",
341
+ "type": "JunctionFilterOptions",
342
+ "optional": true
343
+ }
344
+ ],
345
+ "returnType": "Promise<TItem[]>",
346
+ "isStatic": false,
347
+ "isPublic": true
348
+ },
349
+ "byLeft": {
350
+ "name": "byLeft",
351
+ "async": true,
352
+ "parameters": [
353
+ {
354
+ "name": "leftId",
355
+ "type": "string",
356
+ "optional": false
357
+ },
358
+ {
359
+ "name": "opts",
360
+ "type": "JunctionFilterOptions",
361
+ "optional": true
362
+ }
363
+ ],
364
+ "returnType": "Promise<TItem[]>",
365
+ "isStatic": false,
366
+ "isPublic": true
367
+ },
368
+ "attach": {
369
+ "name": "attach",
370
+ "async": true,
371
+ "parameters": [
372
+ {
373
+ "name": "leftId",
374
+ "type": "string",
375
+ "optional": false
376
+ },
377
+ {
378
+ "name": "rightId",
379
+ "type": "string",
380
+ "optional": false
381
+ },
382
+ {
383
+ "name": "opts",
384
+ "type": "JunctionAttachOptions",
385
+ "optional": true,
386
+ "resolvedType": "Record<string, unknown>"
387
+ }
388
+ ],
389
+ "returnType": "Promise<TItem>",
390
+ "isStatic": false,
391
+ "isPublic": true
392
+ },
393
+ "detach": {
394
+ "name": "detach",
395
+ "async": true,
396
+ "parameters": [
397
+ {
398
+ "name": "leftId",
399
+ "type": "string",
400
+ "optional": false
401
+ },
402
+ {
403
+ "name": "rightId",
404
+ "type": "string",
405
+ "optional": false
406
+ },
407
+ {
408
+ "name": "opts",
409
+ "type": "JunctionFilterOptions",
410
+ "optional": true
411
+ }
412
+ ],
413
+ "returnType": "Promise<void>",
414
+ "isStatic": false,
415
+ "isPublic": true
416
+ },
417
+ "setLinks": {
418
+ "name": "setLinks",
419
+ "async": true,
420
+ "parameters": [
421
+ {
422
+ "name": "leftId",
423
+ "type": "string",
424
+ "optional": false
425
+ },
426
+ {
427
+ "name": "rightIds",
428
+ "type": "string[]",
429
+ "optional": false
430
+ },
431
+ {
432
+ "name": "opts",
433
+ "type": "JunctionAttachOptions",
434
+ "optional": true,
435
+ "resolvedType": "Record<string, unknown>"
436
+ }
437
+ ],
438
+ "returnType": "Promise<void>",
439
+ "isStatic": false,
440
+ "isPublic": true
441
+ },
442
+ "findByDomain": {
443
+ "name": "findByDomain",
444
+ "async": true,
445
+ "parameters": [
446
+ {
447
+ "name": "domainId",
448
+ "type": "string",
449
+ "optional": false
450
+ }
451
+ ],
452
+ "returnType": "Promise<ProjectDomain[]>",
453
+ "isStatic": false,
454
+ "isPublic": true
455
+ },
456
+ "findByProject": {
457
+ "name": "findByProject",
458
+ "async": true,
459
+ "parameters": [
460
+ {
461
+ "name": "projectId",
462
+ "type": "string",
463
+ "optional": false
464
+ }
465
+ ],
466
+ "returnType": "Promise<ProjectDomain[]>",
467
+ "isStatic": false,
468
+ "isPublic": true
469
+ },
470
+ "findByRole": {
471
+ "name": "findByRole",
472
+ "async": true,
473
+ "parameters": [
474
+ {
475
+ "name": "role",
476
+ "type": "DomainRole",
477
+ "optional": false
478
+ }
479
+ ],
480
+ "returnType": "Promise<ProjectDomain[]>",
481
+ "isStatic": false,
482
+ "isPublic": true
483
+ },
484
+ "assign": {
485
+ "name": "assign",
486
+ "async": true,
487
+ "parameters": [
488
+ {
489
+ "name": "domain",
490
+ "type": "Domain",
491
+ "optional": false
492
+ },
493
+ {
494
+ "name": "projectId",
495
+ "type": "string",
496
+ "optional": false
497
+ },
498
+ {
499
+ "name": "role",
500
+ "type": "DomainRole",
501
+ "optional": true,
502
+ "default": "production"
503
+ },
504
+ {
505
+ "name": "tenantId",
506
+ "type": "string",
507
+ "optional": true
508
+ }
509
+ ],
510
+ "returnType": "Promise<ProjectDomain>",
511
+ "isStatic": false,
512
+ "isPublic": true
513
+ }
514
+ },
515
+ "decoratorConfig": {
516
+ "tableName": "project_domains",
517
+ "api": {
518
+ "include": [
519
+ "list",
520
+ "get",
521
+ "create",
522
+ "update",
523
+ "delete"
524
+ ]
525
+ },
526
+ "mcp": {
527
+ "include": [
528
+ "list",
529
+ "get"
530
+ ]
531
+ },
532
+ "cli": {
533
+ "include": [
534
+ "list",
535
+ "get"
536
+ ]
537
+ }
538
+ },
539
+ "extends": "SmrtJunction",
540
+ "extendsTypeArg": "ProjectDomain",
541
+ "exportName": "ProjectDomainCollection",
542
+ "collectionExportName": "ProjectDomainCollectionCollection",
543
+ "collectionOf": "@happyvertical/smrt-sites:ProjectDomain",
544
+ "inheritedExposure": [
545
+ "api",
546
+ "mcp",
547
+ "cli"
548
+ ],
549
+ "schema": {
550
+ "tableName": "project_domains",
551
+ "ddl": "CREATE TABLE IF NOT EXISTS \"project_domains\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"domain_id\" UUID,\n \"project_id\" UUID,\n \"role\" TEXT DEFAULT 'production'\n);",
552
+ "columns": {
553
+ "_sync_origin_device_id": {
554
+ "type": "TEXT"
555
+ },
556
+ "_sync_revision": {
557
+ "type": "INTEGER"
558
+ },
559
+ "id": {
560
+ "type": "UUID",
561
+ "primaryKey": true,
562
+ "referenceKind": "id",
563
+ "notNull": true
564
+ },
565
+ "slug": {
566
+ "type": "TEXT",
567
+ "notNull": true
568
+ },
569
+ "context": {
570
+ "type": "TEXT",
571
+ "notNull": true,
572
+ "default": ""
573
+ },
574
+ "created_at": {
575
+ "type": "TIMESTAMP",
576
+ "notNull": true,
577
+ "default": "current_timestamp"
578
+ },
579
+ "updated_at": {
580
+ "type": "TIMESTAMP",
581
+ "notNull": true,
582
+ "default": "current_timestamp"
583
+ },
584
+ "tenant_id": {
585
+ "type": "UUID",
586
+ "referenceKind": "tenantId",
587
+ "notNull": true,
588
+ "unique": false
589
+ },
590
+ "domain_id": {
591
+ "type": "UUID",
592
+ "referenceKind": "foreignKey",
593
+ "notNull": false,
594
+ "unique": false,
595
+ "foreignKey": {
596
+ "table": "domains",
597
+ "column": "id",
598
+ "onDelete": "CASCADE",
599
+ "onUpdate": "CASCADE"
600
+ }
601
+ },
602
+ "project_id": {
603
+ "type": "UUID",
604
+ "referenceKind": "crossPackageRef",
605
+ "notNull": false,
606
+ "unique": false
607
+ },
608
+ "role": {
609
+ "type": "TEXT",
610
+ "notNull": false,
611
+ "unique": false,
612
+ "default": "production"
613
+ }
614
+ },
615
+ "indexes": [
616
+ {
617
+ "name": "project_domains_domain_id_project_id_idx",
618
+ "columns": [
619
+ "domain_id",
620
+ "project_id",
621
+ "role"
622
+ ],
623
+ "unique": true,
624
+ "nullsNotDistinct": true
625
+ },
626
+ {
627
+ "name": "project_domains_slug_context_idx",
628
+ "columns": [
629
+ "slug",
630
+ "context"
631
+ ]
632
+ },
633
+ {
634
+ "name": "project_domains_tenant_id_created_at_idx",
635
+ "columns": [
636
+ "tenant_id",
637
+ "created_at"
638
+ ]
639
+ },
640
+ {
641
+ "name": "project_domains_project_id_idx",
642
+ "columns": [
643
+ "project_id"
644
+ ]
645
+ }
646
+ ],
647
+ "version": "4cf1547a"
648
+ },
649
+ "importPath": "@happyvertical/smrt-sites"
650
+ },
651
+ "@happyvertical/smrt-sites:SiteAgentBindingCollection": {
652
+ "name": "siteagentbindingcollection",
653
+ "className": "SiteAgentBindingCollection",
654
+ "qualifiedName": "@happyvertical/smrt-sites:SiteAgentBindingCollection",
655
+ "collection": "siteagentbindings",
656
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/SiteAgentBindingCollection.ts",
657
+ "packageName": "@happyvertical/smrt-sites",
658
+ "fields": {},
659
+ "methods": {
660
+ "findBySite": {
661
+ "name": "findBySite",
662
+ "async": true,
663
+ "parameters": [
664
+ {
665
+ "name": "siteId",
666
+ "type": "string",
667
+ "optional": false
668
+ }
669
+ ],
670
+ "returnType": "Promise<SiteAgentBinding[]>",
671
+ "isStatic": false,
672
+ "isPublic": true
673
+ },
674
+ "findByAgent": {
675
+ "name": "findByAgent",
676
+ "async": true,
677
+ "parameters": [
678
+ {
679
+ "name": "agentClass",
680
+ "type": "string",
681
+ "optional": false
682
+ }
683
+ ],
684
+ "returnType": "Promise<SiteAgentBinding[]>",
685
+ "isStatic": false,
686
+ "isPublic": true
687
+ },
688
+ "findEnabled": {
689
+ "name": "findEnabled",
690
+ "async": true,
691
+ "parameters": [
692
+ {
693
+ "name": "siteId",
694
+ "type": "string",
695
+ "optional": false
696
+ }
697
+ ],
698
+ "returnType": "Promise<SiteAgentBinding[]>",
699
+ "isStatic": false,
700
+ "isPublic": true
701
+ },
702
+ "findBySiteAndAgent": {
703
+ "name": "findBySiteAndAgent",
704
+ "async": true,
705
+ "parameters": [
706
+ {
707
+ "name": "siteId",
708
+ "type": "string",
709
+ "optional": false
710
+ },
711
+ {
712
+ "name": "agentClass",
713
+ "type": "string",
714
+ "optional": false
715
+ }
716
+ ],
717
+ "returnType": "Promise<SiteAgentBinding | null>",
718
+ "isStatic": false,
719
+ "isPublic": true
720
+ }
721
+ },
722
+ "decoratorConfig": {
723
+ "tableName": "site_agent_bindings",
724
+ "api": {
725
+ "include": [
726
+ "list",
727
+ "get",
728
+ "create",
729
+ "update",
730
+ "delete"
731
+ ]
732
+ },
733
+ "mcp": {
734
+ "include": [
735
+ "list",
736
+ "get"
737
+ ]
738
+ },
739
+ "cli": {
740
+ "include": [
741
+ "list",
742
+ "get"
743
+ ]
744
+ }
745
+ },
746
+ "extends": "SmrtCollection",
747
+ "extendsTypeArg": "SiteAgentBinding",
748
+ "exportName": "SiteAgentBindingCollection",
749
+ "collectionExportName": "SiteAgentBindingCollectionCollection",
750
+ "collectionOf": "@happyvertical/smrt-sites:SiteAgentBinding",
751
+ "inheritedExposure": [
752
+ "api",
753
+ "mcp",
754
+ "cli"
755
+ ],
756
+ "schema": {
757
+ "tableName": "site_agent_bindings",
758
+ "ddl": "CREATE TABLE IF NOT EXISTS \"site_agent_bindings\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"site_id\" UUID,\n \"agent_class\" TEXT DEFAULT '',\n \"enabled\" BOOLEAN DEFAULT TRUE,\n \"config\" JSON DEFAULT '{}',\n \"priority\" INTEGER DEFAULT 0\n);",
759
+ "columns": {
760
+ "_sync_origin_device_id": {
761
+ "type": "TEXT"
762
+ },
763
+ "_sync_revision": {
764
+ "type": "INTEGER"
765
+ },
766
+ "id": {
767
+ "type": "UUID",
768
+ "primaryKey": true,
769
+ "referenceKind": "id",
770
+ "notNull": true
771
+ },
772
+ "slug": {
773
+ "type": "TEXT",
774
+ "notNull": true
775
+ },
776
+ "context": {
777
+ "type": "TEXT",
778
+ "notNull": true,
779
+ "default": ""
780
+ },
781
+ "created_at": {
782
+ "type": "TIMESTAMP",
783
+ "notNull": true,
784
+ "default": "current_timestamp"
785
+ },
786
+ "updated_at": {
787
+ "type": "TIMESTAMP",
788
+ "notNull": true,
789
+ "default": "current_timestamp"
790
+ },
791
+ "tenant_id": {
792
+ "type": "UUID",
793
+ "referenceKind": "tenantId",
794
+ "notNull": true,
795
+ "unique": false
796
+ },
797
+ "site_id": {
798
+ "type": "UUID",
799
+ "referenceKind": "foreignKey",
800
+ "notNull": false,
801
+ "unique": false,
802
+ "foreignKey": {
803
+ "table": "sites",
804
+ "column": "id",
805
+ "onDelete": "CASCADE",
806
+ "onUpdate": "CASCADE"
807
+ }
808
+ },
809
+ "agent_class": {
810
+ "type": "TEXT",
811
+ "notNull": false,
812
+ "unique": false,
813
+ "default": ""
814
+ },
815
+ "enabled": {
816
+ "type": "BOOLEAN",
817
+ "notNull": false,
818
+ "unique": false,
819
+ "default": true
820
+ },
821
+ "config": {
822
+ "type": "JSON",
823
+ "notNull": false,
824
+ "unique": false,
825
+ "default": {}
826
+ },
827
+ "priority": {
828
+ "type": "INTEGER",
829
+ "notNull": false,
830
+ "unique": false,
831
+ "default": 0
832
+ }
833
+ },
834
+ "indexes": [
835
+ {
836
+ "name": "site_agent_bindings_site_id_agent_class_idx",
837
+ "columns": [
838
+ "site_id",
839
+ "agent_class"
840
+ ],
841
+ "unique": true,
842
+ "nullsNotDistinct": true
843
+ },
844
+ {
845
+ "name": "site_agent_bindings_slug_context_idx",
846
+ "columns": [
847
+ "slug",
848
+ "context"
849
+ ]
850
+ },
851
+ {
852
+ "name": "site_agent_bindings_tenant_id_created_at_idx",
853
+ "columns": [
854
+ "tenant_id",
855
+ "created_at"
856
+ ]
857
+ }
858
+ ],
859
+ "version": "a739eab3"
860
+ },
861
+ "importPath": "@happyvertical/smrt-sites"
862
+ },
863
+ "@happyvertical/smrt-sites:SiteCollection": {
864
+ "name": "sitecollection",
865
+ "className": "SiteCollection",
866
+ "qualifiedName": "@happyvertical/smrt-sites:SiteCollection",
867
+ "collection": "sites",
868
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/collections/SiteCollection.ts",
869
+ "packageName": "@happyvertical/smrt-sites",
870
+ "fields": {},
871
+ "methods": {
872
+ "findByDomain": {
873
+ "name": "findByDomain",
874
+ "async": true,
875
+ "parameters": [
876
+ {
877
+ "name": "domain",
878
+ "type": "string",
879
+ "optional": false
880
+ }
881
+ ],
882
+ "returnType": "Promise<Site | null>",
883
+ "isStatic": false,
884
+ "isPublic": true
885
+ },
886
+ "findByTenant": {
887
+ "name": "findByTenant",
888
+ "async": true,
889
+ "parameters": [
890
+ {
891
+ "name": "tenantId",
892
+ "type": "string",
893
+ "optional": false
894
+ }
895
+ ],
896
+ "returnType": "Promise<Site[]>",
897
+ "isStatic": false,
898
+ "isPublic": true
899
+ },
900
+ "findByStatus": {
901
+ "name": "findByStatus",
902
+ "async": true,
903
+ "parameters": [
904
+ {
905
+ "name": "status",
906
+ "type": "SiteStatus",
907
+ "optional": false
908
+ }
909
+ ],
910
+ "returnType": "Promise<Site[]>",
911
+ "isStatic": false,
912
+ "isPublic": true
913
+ },
914
+ "findActive": {
915
+ "name": "findActive",
916
+ "async": true,
917
+ "parameters": [],
918
+ "returnType": "Promise<Site[]>",
919
+ "isStatic": false,
920
+ "isPublic": true
921
+ }
922
+ },
923
+ "decoratorConfig": {
924
+ "tableName": "sites",
925
+ "api": {
926
+ "include": [
927
+ "list",
928
+ "get",
929
+ "create",
930
+ "update",
931
+ "delete"
932
+ ]
933
+ },
934
+ "mcp": {
935
+ "include": [
936
+ "list",
937
+ "get",
938
+ "create",
939
+ "update"
940
+ ]
941
+ }
942
+ },
943
+ "extends": "SmrtCollection",
944
+ "extendsTypeArg": "Site",
945
+ "exportName": "SiteCollection",
946
+ "collectionExportName": "SiteCollectionCollection",
947
+ "collectionOf": "@happyvertical/smrt-sites:Site",
948
+ "inheritedExposure": [
949
+ "api",
950
+ "mcp"
951
+ ],
952
+ "schema": {
953
+ "tableName": "sites",
954
+ "ddl": "CREATE TABLE IF NOT EXISTS \"sites\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"domain\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'draft',\n \"tier\" TEXT DEFAULT 'free',\n \"database_url\" TEXT DEFAULT '',\n \"database_type\" TEXT DEFAULT '',\n \"portal_config\" TEXT DEFAULT '',\n \"repository_url\" TEXT DEFAULT '',\n \"template_name\" TEXT DEFAULT '',\n \"provisioning_status\" TEXT DEFAULT '',\n \"provisioned_at\" TIMESTAMP,\n \"provisioning_error\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT ''\n);",
955
+ "columns": {
956
+ "_sync_origin_device_id": {
957
+ "type": "TEXT"
958
+ },
959
+ "_sync_revision": {
960
+ "type": "INTEGER"
961
+ },
962
+ "id": {
963
+ "type": "UUID",
964
+ "primaryKey": true,
965
+ "referenceKind": "id",
966
+ "notNull": true
967
+ },
968
+ "slug": {
969
+ "type": "TEXT",
970
+ "notNull": true
971
+ },
972
+ "context": {
973
+ "type": "TEXT",
974
+ "notNull": true,
975
+ "default": ""
976
+ },
977
+ "created_at": {
978
+ "type": "TIMESTAMP",
979
+ "notNull": true,
980
+ "default": "current_timestamp"
981
+ },
982
+ "updated_at": {
983
+ "type": "TIMESTAMP",
984
+ "notNull": true,
985
+ "default": "current_timestamp"
986
+ },
987
+ "tenant_id": {
988
+ "type": "UUID",
989
+ "referenceKind": "tenantId",
990
+ "notNull": true,
991
+ "unique": false
992
+ },
993
+ "name": {
994
+ "type": "TEXT",
995
+ "notNull": false,
996
+ "unique": false,
997
+ "default": ""
998
+ },
999
+ "domain": {
1000
+ "type": "TEXT",
1001
+ "notNull": false,
1002
+ "unique": false,
1003
+ "default": ""
1004
+ },
1005
+ "status": {
1006
+ "type": "TEXT",
1007
+ "notNull": false,
1008
+ "unique": false,
1009
+ "default": "draft"
1010
+ },
1011
+ "tier": {
1012
+ "type": "TEXT",
1013
+ "notNull": false,
1014
+ "unique": false,
1015
+ "default": "free"
1016
+ },
1017
+ "database_url": {
1018
+ "type": "TEXT",
1019
+ "notNull": false,
1020
+ "unique": false,
1021
+ "default": ""
1022
+ },
1023
+ "database_type": {
1024
+ "type": "TEXT",
1025
+ "notNull": false,
1026
+ "unique": false,
1027
+ "default": ""
1028
+ },
1029
+ "portal_config": {
1030
+ "type": "TEXT",
1031
+ "notNull": false,
1032
+ "unique": false,
1033
+ "default": ""
1034
+ },
1035
+ "repository_url": {
1036
+ "type": "TEXT",
1037
+ "notNull": false,
1038
+ "unique": false,
1039
+ "default": ""
1040
+ },
1041
+ "template_name": {
1042
+ "type": "TEXT",
1043
+ "notNull": false,
1044
+ "unique": false,
1045
+ "default": ""
1046
+ },
1047
+ "provisioning_status": {
1048
+ "type": "TEXT",
1049
+ "notNull": false,
1050
+ "unique": false,
1051
+ "default": ""
1052
+ },
1053
+ "provisioned_at": {
1054
+ "type": "TIMESTAMP",
1055
+ "notNull": false,
1056
+ "unique": false
1057
+ },
1058
+ "provisioning_error": {
1059
+ "type": "TEXT",
1060
+ "notNull": false,
1061
+ "unique": false,
1062
+ "default": ""
1063
+ },
1064
+ "metadata": {
1065
+ "type": "TEXT",
1066
+ "notNull": false,
1067
+ "unique": false,
1068
+ "default": ""
1069
+ }
1070
+ },
1071
+ "indexes": [
1072
+ {
1073
+ "name": "sites_tenant_id_domain_idx",
1074
+ "columns": [
1075
+ "tenant_id",
1076
+ "domain"
1077
+ ],
1078
+ "unique": true,
1079
+ "nullsNotDistinct": true
1080
+ },
1081
+ {
1082
+ "name": "sites_slug_context_idx",
1083
+ "columns": [
1084
+ "slug",
1085
+ "context"
1086
+ ]
1087
+ },
1088
+ {
1089
+ "name": "sites_tenant_id_created_at_idx",
1090
+ "columns": [
1091
+ "tenant_id",
1092
+ "created_at"
1093
+ ]
1094
+ }
1095
+ ],
1096
+ "version": "e8449af3"
1097
+ },
1098
+ "importPath": "@happyvertical/smrt-sites"
1099
+ },
1100
+ "@happyvertical/smrt-sites:DnsZone": {
1101
+ "name": "dnszone",
1102
+ "className": "DnsZone",
1103
+ "qualifiedName": "@happyvertical/smrt-sites:DnsZone",
1104
+ "collection": "dnszones",
1105
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/models/DnsZone.ts",
1106
+ "packageName": "@happyvertical/smrt-sites",
1107
+ "fields": {
1108
+ "tenantId": {
1109
+ "type": "text",
1110
+ "required": true,
1111
+ "_meta": {
1112
+ "sqlType": "UUID",
1113
+ "__tenancy": {
1114
+ "isTenantIdField": true,
1115
+ "autoFilter": true,
1116
+ "required": true,
1117
+ "autoPopulate": true,
1118
+ "nullable": false,
1119
+ "mode": "required",
1120
+ "field": "tenantId",
1121
+ "allowSuperAdminBypass": false
1122
+ }
1123
+ }
1124
+ },
1125
+ "name": {
1126
+ "type": "text",
1127
+ "required": false,
1128
+ "default": ""
1129
+ },
1130
+ "notes": {
1131
+ "type": "text",
1132
+ "required": false,
1133
+ "default": ""
1134
+ },
1135
+ "createdAt": {
1136
+ "type": "datetime",
1137
+ "required": false
1138
+ },
1139
+ "updatedAt": {
1140
+ "type": "datetime",
1141
+ "required": false
1142
+ }
1143
+ },
1144
+ "methods": {},
1145
+ "decoratorConfig": {
1146
+ "tableName": "dns_zones",
1147
+ "api": {
1148
+ "include": [
1149
+ "list",
1150
+ "get",
1151
+ "create",
1152
+ "update",
1153
+ "delete"
1154
+ ]
1155
+ },
1156
+ "cli": {
1157
+ "include": [
1158
+ "list",
1159
+ "get"
1160
+ ]
1161
+ },
1162
+ "mcp": {
1163
+ "include": [
1164
+ "list",
1165
+ "get"
1166
+ ]
1167
+ },
1168
+ "conflictColumns": [
1169
+ "tenant_id",
1170
+ "name"
1171
+ ],
1172
+ "tenantScoped": {
1173
+ "mode": "required"
1174
+ }
1175
+ },
1176
+ "extends": "SmrtObject",
1177
+ "exportName": "DnsZone",
1178
+ "collectionExportName": "DnsZoneCollection",
1179
+ "displayLabelField": "name",
1180
+ "validationRules": [],
1181
+ "schema": {
1182
+ "tableName": "dns_zones",
1183
+ "ddl": "CREATE TABLE IF NOT EXISTS \"dns_zones\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
1184
+ "columns": {
1185
+ "_sync_origin_device_id": {
1186
+ "type": "TEXT"
1187
+ },
1188
+ "_sync_revision": {
1189
+ "type": "INTEGER"
1190
+ },
1191
+ "id": {
1192
+ "type": "UUID",
1193
+ "primaryKey": true,
1194
+ "referenceKind": "id",
1195
+ "notNull": true
1196
+ },
1197
+ "slug": {
1198
+ "type": "TEXT",
1199
+ "notNull": true
1200
+ },
1201
+ "context": {
1202
+ "type": "TEXT",
1203
+ "notNull": true,
1204
+ "default": ""
1205
+ },
1206
+ "created_at": {
1207
+ "type": "TIMESTAMP",
1208
+ "notNull": true,
1209
+ "default": "current_timestamp"
1210
+ },
1211
+ "updated_at": {
1212
+ "type": "TIMESTAMP",
1213
+ "notNull": true,
1214
+ "default": "current_timestamp"
1215
+ },
1216
+ "tenant_id": {
1217
+ "type": "UUID",
1218
+ "referenceKind": "tenantId",
1219
+ "notNull": true,
1220
+ "unique": false
1221
+ },
1222
+ "name": {
1223
+ "type": "TEXT",
1224
+ "notNull": false,
1225
+ "unique": false,
1226
+ "default": ""
1227
+ },
1228
+ "notes": {
1229
+ "type": "TEXT",
1230
+ "notNull": false,
1231
+ "unique": false,
1232
+ "default": ""
1233
+ }
1234
+ },
1235
+ "indexes": [
1236
+ {
1237
+ "name": "dns_zones_tenant_id_name_idx",
1238
+ "columns": [
1239
+ "tenant_id",
1240
+ "name"
1241
+ ],
1242
+ "unique": true,
1243
+ "nullsNotDistinct": true
1244
+ },
1245
+ {
1246
+ "name": "dns_zones_slug_context_idx",
1247
+ "columns": [
1248
+ "slug",
1249
+ "context"
1250
+ ]
1251
+ },
1252
+ {
1253
+ "name": "dns_zones_tenant_id_created_at_idx",
1254
+ "columns": [
1255
+ "tenant_id",
1256
+ "created_at"
1257
+ ]
1258
+ }
1259
+ ],
1260
+ "version": "a3af1dad"
1261
+ },
1262
+ "importPath": "@happyvertical/smrt-sites"
1263
+ },
1264
+ "@happyvertical/smrt-sites:Domain": {
1265
+ "name": "domain",
1266
+ "className": "Domain",
1267
+ "qualifiedName": "@happyvertical/smrt-sites:Domain",
1268
+ "collection": "domains",
1269
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/models/Domain.ts",
1270
+ "packageName": "@happyvertical/smrt-sites",
1271
+ "fields": {
1272
+ "tenantId": {
1273
+ "type": "text",
1274
+ "required": true,
1275
+ "_meta": {
1276
+ "sqlType": "UUID",
1277
+ "__tenancy": {
1278
+ "isTenantIdField": true,
1279
+ "autoFilter": true,
1280
+ "required": true,
1281
+ "autoPopulate": true,
1282
+ "nullable": false,
1283
+ "mode": "required",
1284
+ "field": "tenantId",
1285
+ "allowSuperAdminBypass": false
1286
+ }
1287
+ }
1288
+ },
1289
+ "zoneId": {
1290
+ "type": "foreignKey",
1291
+ "required": false,
1292
+ "related": "DnsZone"
1293
+ },
1294
+ "hostname": {
1295
+ "type": "text",
1296
+ "required": false,
1297
+ "default": ""
1298
+ },
1299
+ "notes": {
1300
+ "type": "text",
1301
+ "required": false,
1302
+ "default": ""
1303
+ },
1304
+ "createdAt": {
1305
+ "type": "datetime",
1306
+ "required": false
1307
+ },
1308
+ "updatedAt": {
1309
+ "type": "datetime",
1310
+ "required": false
1311
+ }
1312
+ },
1313
+ "methods": {},
1314
+ "decoratorConfig": {
1315
+ "tableName": "domains",
1316
+ "api": {
1317
+ "include": [
1318
+ "list",
1319
+ "get",
1320
+ "create",
1321
+ "update",
1322
+ "delete"
1323
+ ]
1324
+ },
1325
+ "cli": {
1326
+ "include": [
1327
+ "list",
1328
+ "get"
1329
+ ]
1330
+ },
1331
+ "mcp": {
1332
+ "include": [
1333
+ "list",
1334
+ "get"
1335
+ ]
1336
+ },
1337
+ "conflictColumns": [
1338
+ "tenant_id",
1339
+ "hostname"
1340
+ ],
1341
+ "tenantScoped": {
1342
+ "mode": "required"
1343
+ }
1344
+ },
1345
+ "extends": "SmrtObject",
1346
+ "exportName": "Domain",
1347
+ "collectionExportName": "DomainCollection",
1348
+ "validationRules": [],
1349
+ "schema": {
1350
+ "tableName": "domains",
1351
+ "ddl": "CREATE TABLE IF NOT EXISTS \"domains\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"zone_id\" UUID,\n \"hostname\" TEXT DEFAULT '',\n \"notes\" TEXT DEFAULT ''\n);",
1352
+ "columns": {
1353
+ "_sync_origin_device_id": {
1354
+ "type": "TEXT"
1355
+ },
1356
+ "_sync_revision": {
1357
+ "type": "INTEGER"
1358
+ },
1359
+ "id": {
1360
+ "type": "UUID",
1361
+ "primaryKey": true,
1362
+ "referenceKind": "id",
1363
+ "notNull": true
1364
+ },
1365
+ "slug": {
1366
+ "type": "TEXT",
1367
+ "notNull": true
1368
+ },
1369
+ "context": {
1370
+ "type": "TEXT",
1371
+ "notNull": true,
1372
+ "default": ""
1373
+ },
1374
+ "created_at": {
1375
+ "type": "TIMESTAMP",
1376
+ "notNull": true,
1377
+ "default": "current_timestamp"
1378
+ },
1379
+ "updated_at": {
1380
+ "type": "TIMESTAMP",
1381
+ "notNull": true,
1382
+ "default": "current_timestamp"
1383
+ },
1384
+ "tenant_id": {
1385
+ "type": "UUID",
1386
+ "referenceKind": "tenantId",
1387
+ "notNull": true,
1388
+ "unique": false
1389
+ },
1390
+ "zone_id": {
1391
+ "type": "UUID",
1392
+ "referenceKind": "foreignKey",
1393
+ "notNull": false,
1394
+ "unique": false,
1395
+ "foreignKey": {
1396
+ "table": "dns_zones",
1397
+ "column": "id",
1398
+ "onDelete": "NO ACTION",
1399
+ "onUpdate": "CASCADE"
1400
+ }
1401
+ },
1402
+ "hostname": {
1403
+ "type": "TEXT",
1404
+ "notNull": false,
1405
+ "unique": false,
1406
+ "default": ""
1407
+ },
1408
+ "notes": {
1409
+ "type": "TEXT",
1410
+ "notNull": false,
1411
+ "unique": false,
1412
+ "default": ""
1413
+ }
1414
+ },
1415
+ "indexes": [
1416
+ {
1417
+ "name": "domains_tenant_id_hostname_idx",
1418
+ "columns": [
1419
+ "tenant_id",
1420
+ "hostname"
1421
+ ],
1422
+ "unique": true,
1423
+ "nullsNotDistinct": true
1424
+ },
1425
+ {
1426
+ "name": "domains_slug_context_idx",
1427
+ "columns": [
1428
+ "slug",
1429
+ "context"
1430
+ ]
1431
+ },
1432
+ {
1433
+ "name": "domains_tenant_id_created_at_idx",
1434
+ "columns": [
1435
+ "tenant_id",
1436
+ "created_at"
1437
+ ]
1438
+ },
1439
+ {
1440
+ "name": "domains_zone_id_idx",
1441
+ "columns": [
1442
+ "zone_id"
1443
+ ]
1444
+ }
1445
+ ],
1446
+ "version": "238f70a9"
1447
+ },
1448
+ "importPath": "@happyvertical/smrt-sites"
1449
+ },
1450
+ "@happyvertical/smrt-sites:ProjectDomain": {
1451
+ "name": "projectdomain",
1452
+ "className": "ProjectDomain",
1453
+ "qualifiedName": "@happyvertical/smrt-sites:ProjectDomain",
1454
+ "collection": "projectdomains",
1455
+ "filePath": "/home/runner/work/smrt/smrt/packages/sites/src/models/ProjectDomain.ts",
1456
+ "packageName": "@happyvertical/smrt-sites",
1457
+ "fields": {
1458
+ "tenantId": {
1459
+ "type": "text",
1460
+ "required": true,
1461
+ "_meta": {
1462
+ "sqlType": "UUID",
1463
+ "__tenancy": {
1464
+ "isTenantIdField": true,
1465
+ "autoFilter": true,
1466
+ "required": true,
1467
+ "autoPopulate": true,
1468
+ "nullable": false,
1469
+ "mode": "required",
1470
+ "field": "tenantId",
1471
+ "allowSuperAdminBypass": false
1472
+ }
1473
+ }
1474
+ },
1475
+ "domainId": {
1476
+ "type": "foreignKey",
1477
+ "required": false,
1478
+ "related": "Domain"
1479
+ },
1480
+ "projectId": {
1481
+ "type": "crossPackageRef",
1482
+ "required": false,
1483
+ "related": "@happyvertical/smrt-projects:Project"
1484
+ },
1485
+ "role": {
1486
+ "type": "text",
1487
+ "required": false,
1488
+ "default": "production",
1489
+ "enum": [
1490
+ "production",
1491
+ "staging",
1492
+ "preview",
1493
+ "mail",
1494
+ "redirect",
1495
+ "other"
1496
+ ]
1497
+ },
1498
+ "createdAt": {
1499
+ "type": "datetime",
1500
+ "required": false
1501
+ },
1502
+ "updatedAt": {
1503
+ "type": "datetime",
1504
+ "required": false
1505
+ }
1506
+ },
1507
+ "methods": {},
1508
+ "decoratorConfig": {
1509
+ "tableName": "project_domains",
1510
+ "api": {
1511
+ "include": [
1512
+ "list",
1513
+ "get",
1514
+ "create",
1515
+ "update",
1516
+ "delete"
1517
+ ]
1518
+ },
1519
+ "cli": {
1520
+ "include": [
1521
+ "list",
1522
+ "get"
1523
+ ]
1524
+ },
1525
+ "mcp": {
1526
+ "include": [
1527
+ "list",
1528
+ "get"
1529
+ ]
1530
+ },
1531
+ "conflictColumns": [
1532
+ "domain_id",
1533
+ "project_id",
1534
+ "role"
1535
+ ],
1536
+ "tenantScoped": {
1537
+ "mode": "required"
1538
+ }
1539
+ },
1540
+ "extends": "SmrtObject",
1541
+ "exportName": "ProjectDomain",
1542
+ "collectionExportName": "ProjectDomainCollection",
1543
+ "validationRules": [],
1544
+ "schema": {
1545
+ "tableName": "project_domains",
1546
+ "ddl": "CREATE TABLE IF NOT EXISTS \"project_domains\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"domain_id\" UUID,\n \"project_id\" UUID,\n \"role\" TEXT DEFAULT 'production'\n);",
1547
+ "columns": {
1548
+ "_sync_origin_device_id": {
1549
+ "type": "TEXT"
1550
+ },
1551
+ "_sync_revision": {
1552
+ "type": "INTEGER"
1553
+ },
1554
+ "id": {
1555
+ "type": "UUID",
1556
+ "primaryKey": true,
1557
+ "referenceKind": "id",
1558
+ "notNull": true
1559
+ },
1560
+ "slug": {
1561
+ "type": "TEXT",
1562
+ "notNull": true
1563
+ },
1564
+ "context": {
1565
+ "type": "TEXT",
1566
+ "notNull": true,
1567
+ "default": ""
1568
+ },
1569
+ "created_at": {
1570
+ "type": "TIMESTAMP",
1571
+ "notNull": true,
1572
+ "default": "current_timestamp"
1573
+ },
1574
+ "updated_at": {
1575
+ "type": "TIMESTAMP",
1576
+ "notNull": true,
1577
+ "default": "current_timestamp"
1578
+ },
1579
+ "tenant_id": {
1580
+ "type": "UUID",
1581
+ "referenceKind": "tenantId",
1582
+ "notNull": true,
1583
+ "unique": false
1584
+ },
1585
+ "domain_id": {
1586
+ "type": "UUID",
1587
+ "referenceKind": "foreignKey",
1588
+ "notNull": false,
1589
+ "unique": false,
1590
+ "foreignKey": {
1591
+ "table": "domains",
1592
+ "column": "id",
1593
+ "onDelete": "CASCADE",
1594
+ "onUpdate": "CASCADE"
1595
+ }
1596
+ },
1597
+ "project_id": {
1598
+ "type": "UUID",
1599
+ "referenceKind": "crossPackageRef",
1600
+ "notNull": false,
1601
+ "unique": false
1602
+ },
1603
+ "role": {
1604
+ "type": "TEXT",
1605
+ "notNull": false,
1606
+ "unique": false,
1607
+ "default": "production"
1608
+ }
1609
+ },
1610
+ "indexes": [
1611
+ {
1612
+ "name": "project_domains_domain_id_project_id_idx",
1613
+ "columns": [
1614
+ "domain_id",
1615
+ "project_id",
1616
+ "role"
1617
+ ],
1618
+ "unique": true,
1619
+ "nullsNotDistinct": true
1620
+ },
1621
+ {
1622
+ "name": "project_domains_slug_context_idx",
1623
+ "columns": [
1624
+ "slug",
1625
+ "context"
1626
+ ]
1627
+ },
1628
+ {
1629
+ "name": "project_domains_tenant_id_created_at_idx",
1630
+ "columns": [
1631
+ "tenant_id",
1632
+ "created_at"
1633
+ ]
1634
+ },
1635
+ {
1636
+ "name": "project_domains_project_id_idx",
1637
+ "columns": [
1638
+ "project_id"
1639
+ ]
1640
+ }
1641
+ ],
1642
+ "version": "4cf1547a"
453
1643
  },
454
1644
  "importPath": "@happyvertical/smrt-sites"
455
1645
  },