@happyvertical/smrt-sites 0.30.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.
@@ -0,0 +1,778 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177128216,
4
+ "packageName": "@happyvertical/smrt-sites",
5
+ "packageVersion": "0.30.0",
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",
13
+ "packageName": "@happyvertical/smrt-sites",
14
+ "fields": {},
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",
60
+ "async": true,
61
+ "parameters": [
62
+ {
63
+ "name": "siteId",
64
+ "type": "string",
65
+ "optional": false
66
+ },
67
+ {
68
+ "name": "agentClass",
69
+ "type": "string",
70
+ "optional": false
71
+ }
72
+ ],
73
+ "returnType": "Promise<SiteAgentBinding | null>",
74
+ "isStatic": false,
75
+ "isPublic": true
76
+ }
77
+ },
78
+ "decoratorConfig": {
79
+ "tableName": "site_agent_bindings"
80
+ },
81
+ "extends": "SmrtCollection",
82
+ "extendsTypeArg": "SiteAgentBinding",
83
+ "exportName": "SiteAgentBindingCollection",
84
+ "collectionExportName": "SiteAgentBindingCollectionCollection",
85
+ "schema": {
86
+ "tableName": "site_agent_bindings",
87
+ "ddl": "CREATE TABLE IF NOT EXISTS \"site_agent_bindings\" (\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);",
88
+ "columns": {
89
+ "id": {
90
+ "type": "UUID",
91
+ "primaryKey": true,
92
+ "referenceKind": "id",
93
+ "notNull": true
94
+ },
95
+ "slug": {
96
+ "type": "TEXT",
97
+ "notNull": true
98
+ },
99
+ "context": {
100
+ "type": "TEXT",
101
+ "notNull": true,
102
+ "default": ""
103
+ },
104
+ "created_at": {
105
+ "type": "TIMESTAMP",
106
+ "notNull": true,
107
+ "default": "current_timestamp"
108
+ },
109
+ "updated_at": {
110
+ "type": "TIMESTAMP",
111
+ "notNull": true,
112
+ "default": "current_timestamp"
113
+ }
114
+ },
115
+ "indexes": [
116
+ {
117
+ "name": "site_agent_bindings_id_idx",
118
+ "columns": [
119
+ "id"
120
+ ]
121
+ },
122
+ {
123
+ "name": "site_agent_bindings_slug_context_idx",
124
+ "columns": [
125
+ "slug",
126
+ "context"
127
+ ],
128
+ "unique": true
129
+ }
130
+ ],
131
+ "version": "b7f2e6f8"
132
+ }
133
+ },
134
+ "@happyvertical/smrt-sites:SiteCollection": {
135
+ "name": "sitecollection",
136
+ "className": "SiteCollection",
137
+ "qualifiedName": "@happyvertical/smrt-sites:SiteCollection",
138
+ "collection": "sites",
139
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sites/src/collections/SiteCollection.ts",
140
+ "packageName": "@happyvertical/smrt-sites",
141
+ "fields": {},
142
+ "methods": {
143
+ "findByDomain": {
144
+ "name": "findByDomain",
145
+ "async": true,
146
+ "parameters": [
147
+ {
148
+ "name": "domain",
149
+ "type": "string",
150
+ "optional": false
151
+ }
152
+ ],
153
+ "returnType": "Promise<Site | null>",
154
+ "isStatic": false,
155
+ "isPublic": true
156
+ },
157
+ "findByTenant": {
158
+ "name": "findByTenant",
159
+ "async": true,
160
+ "parameters": [
161
+ {
162
+ "name": "tenantId",
163
+ "type": "string",
164
+ "optional": false
165
+ }
166
+ ],
167
+ "returnType": "Promise<Site[]>",
168
+ "isStatic": false,
169
+ "isPublic": true
170
+ },
171
+ "findByStatus": {
172
+ "name": "findByStatus",
173
+ "async": true,
174
+ "parameters": [
175
+ {
176
+ "name": "status",
177
+ "type": "SiteStatus",
178
+ "optional": false
179
+ }
180
+ ],
181
+ "returnType": "Promise<Site[]>",
182
+ "isStatic": false,
183
+ "isPublic": true
184
+ },
185
+ "findActive": {
186
+ "name": "findActive",
187
+ "async": true,
188
+ "parameters": [],
189
+ "returnType": "Promise<Site[]>",
190
+ "isStatic": false,
191
+ "isPublic": true
192
+ }
193
+ },
194
+ "decoratorConfig": {
195
+ "tableName": "sites"
196
+ },
197
+ "extends": "SmrtCollection",
198
+ "extendsTypeArg": "Site",
199
+ "exportName": "SiteCollection",
200
+ "collectionExportName": "SiteCollectionCollection",
201
+ "schema": {
202
+ "tableName": "sites",
203
+ "ddl": "CREATE TABLE IF NOT EXISTS \"sites\" (\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);",
204
+ "columns": {
205
+ "id": {
206
+ "type": "UUID",
207
+ "primaryKey": true,
208
+ "referenceKind": "id",
209
+ "notNull": true
210
+ },
211
+ "slug": {
212
+ "type": "TEXT",
213
+ "notNull": true
214
+ },
215
+ "context": {
216
+ "type": "TEXT",
217
+ "notNull": true,
218
+ "default": ""
219
+ },
220
+ "created_at": {
221
+ "type": "TIMESTAMP",
222
+ "notNull": true,
223
+ "default": "current_timestamp"
224
+ },
225
+ "updated_at": {
226
+ "type": "TIMESTAMP",
227
+ "notNull": true,
228
+ "default": "current_timestamp"
229
+ }
230
+ },
231
+ "indexes": [
232
+ {
233
+ "name": "sites_id_idx",
234
+ "columns": [
235
+ "id"
236
+ ]
237
+ },
238
+ {
239
+ "name": "sites_slug_context_idx",
240
+ "columns": [
241
+ "slug",
242
+ "context"
243
+ ],
244
+ "unique": true
245
+ }
246
+ ],
247
+ "version": "2f0752a0"
248
+ }
249
+ },
250
+ "@happyvertical/smrt-sites:Site": {
251
+ "name": "site",
252
+ "className": "Site",
253
+ "qualifiedName": "@happyvertical/smrt-sites:Site",
254
+ "collection": "sites",
255
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sites/src/models/Site.ts",
256
+ "packageName": "@happyvertical/smrt-sites",
257
+ "fields": {
258
+ "tenantId": {
259
+ "type": "text",
260
+ "required": true,
261
+ "_meta": {
262
+ "sqlType": "UUID",
263
+ "__tenancy": {
264
+ "isTenantIdField": true,
265
+ "autoFilter": true,
266
+ "required": true,
267
+ "autoPopulate": true,
268
+ "nullable": false,
269
+ "mode": "required",
270
+ "field": "tenantId",
271
+ "allowSuperAdminBypass": false
272
+ }
273
+ }
274
+ },
275
+ "name": {
276
+ "type": "text",
277
+ "required": false,
278
+ "default": ""
279
+ },
280
+ "domain": {
281
+ "type": "text",
282
+ "required": false,
283
+ "default": ""
284
+ },
285
+ "status": {
286
+ "type": "text",
287
+ "required": false,
288
+ "default": "draft"
289
+ },
290
+ "tier": {
291
+ "type": "text",
292
+ "required": false,
293
+ "default": "free"
294
+ },
295
+ "databaseUrl": {
296
+ "type": "text",
297
+ "required": false,
298
+ "default": ""
299
+ },
300
+ "databaseType": {
301
+ "type": "text",
302
+ "required": false,
303
+ "default": ""
304
+ },
305
+ "portalConfig": {
306
+ "type": "text",
307
+ "required": false,
308
+ "default": ""
309
+ },
310
+ "repositoryUrl": {
311
+ "type": "text",
312
+ "required": false,
313
+ "default": ""
314
+ },
315
+ "templateName": {
316
+ "type": "text",
317
+ "required": false,
318
+ "default": ""
319
+ },
320
+ "provisioningStatus": {
321
+ "type": "text",
322
+ "required": false,
323
+ "default": ""
324
+ },
325
+ "provisionedAt": {
326
+ "type": "datetime",
327
+ "required": false
328
+ },
329
+ "provisioningError": {
330
+ "type": "text",
331
+ "required": false,
332
+ "default": ""
333
+ },
334
+ "metadata": {
335
+ "type": "text",
336
+ "required": false,
337
+ "default": ""
338
+ },
339
+ "createdAt": {
340
+ "type": "datetime",
341
+ "required": false
342
+ },
343
+ "updatedAt": {
344
+ "type": "datetime",
345
+ "required": false
346
+ }
347
+ },
348
+ "methods": {
349
+ "isActive": {
350
+ "name": "isActive",
351
+ "async": false,
352
+ "parameters": [],
353
+ "returnType": "boolean",
354
+ "isStatic": false,
355
+ "isPublic": true
356
+ },
357
+ "isReady": {
358
+ "name": "isReady",
359
+ "async": false,
360
+ "parameters": [],
361
+ "returnType": "boolean",
362
+ "isStatic": false,
363
+ "isPublic": true
364
+ },
365
+ "getPortalConfig": {
366
+ "name": "getPortalConfig",
367
+ "async": false,
368
+ "parameters": [],
369
+ "returnType": "SitePortalConfig",
370
+ "isStatic": false,
371
+ "isPublic": true
372
+ },
373
+ "setPortalConfig": {
374
+ "name": "setPortalConfig",
375
+ "async": false,
376
+ "parameters": [
377
+ {
378
+ "name": "config",
379
+ "type": "SitePortalConfig",
380
+ "optional": false
381
+ }
382
+ ],
383
+ "returnType": "void",
384
+ "isStatic": false,
385
+ "isPublic": true
386
+ },
387
+ "getMetadata": {
388
+ "name": "getMetadata",
389
+ "async": false,
390
+ "parameters": [],
391
+ "returnType": "Record<string>",
392
+ "isStatic": false,
393
+ "isPublic": true
394
+ },
395
+ "setMetadata": {
396
+ "name": "setMetadata",
397
+ "async": false,
398
+ "parameters": [
399
+ {
400
+ "name": "data",
401
+ "type": "Record<string>",
402
+ "optional": false
403
+ }
404
+ ],
405
+ "returnType": "void",
406
+ "isStatic": false,
407
+ "isPublic": true
408
+ },
409
+ "updateMetadata": {
410
+ "name": "updateMetadata",
411
+ "async": false,
412
+ "parameters": [
413
+ {
414
+ "name": "updates",
415
+ "type": "Record<string>",
416
+ "optional": false
417
+ }
418
+ ],
419
+ "returnType": "void",
420
+ "isStatic": false,
421
+ "isPublic": true
422
+ }
423
+ },
424
+ "decoratorConfig": {
425
+ "tableName": "sites",
426
+ "api": {
427
+ "include": [
428
+ "list",
429
+ "get",
430
+ "create",
431
+ "update",
432
+ "delete"
433
+ ]
434
+ },
435
+ "mcp": {
436
+ "include": [
437
+ "list",
438
+ "get",
439
+ "create",
440
+ "update"
441
+ ]
442
+ },
443
+ "cli": true,
444
+ "conflictColumns": [
445
+ "tenant_id",
446
+ "domain"
447
+ ],
448
+ "tenantScoped": {
449
+ "mode": "required"
450
+ }
451
+ },
452
+ "extends": "SmrtObject",
453
+ "exportName": "Site",
454
+ "collectionExportName": "SiteCollection",
455
+ "validationRules": [
456
+ {
457
+ "field": "tenantId",
458
+ "rule": "required",
459
+ "fieldType": "text"
460
+ }
461
+ ],
462
+ "schema": {
463
+ "tableName": "sites",
464
+ "ddl": "CREATE TABLE IF NOT EXISTS \"sites\" (\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);",
465
+ "columns": {
466
+ "id": {
467
+ "type": "UUID",
468
+ "primaryKey": true,
469
+ "referenceKind": "id",
470
+ "notNull": true
471
+ },
472
+ "slug": {
473
+ "type": "TEXT",
474
+ "notNull": true
475
+ },
476
+ "context": {
477
+ "type": "TEXT",
478
+ "notNull": true,
479
+ "default": ""
480
+ },
481
+ "created_at": {
482
+ "type": "TIMESTAMP",
483
+ "notNull": true,
484
+ "default": "current_timestamp"
485
+ },
486
+ "updated_at": {
487
+ "type": "TIMESTAMP",
488
+ "notNull": true,
489
+ "default": "current_timestamp"
490
+ },
491
+ "tenant_id": {
492
+ "type": "UUID",
493
+ "referenceKind": "tenantId",
494
+ "notNull": true,
495
+ "unique": false
496
+ },
497
+ "name": {
498
+ "type": "TEXT",
499
+ "notNull": false,
500
+ "unique": false,
501
+ "default": ""
502
+ },
503
+ "domain": {
504
+ "type": "TEXT",
505
+ "notNull": false,
506
+ "unique": false,
507
+ "default": ""
508
+ },
509
+ "status": {
510
+ "type": "TEXT",
511
+ "notNull": false,
512
+ "unique": false,
513
+ "default": "draft"
514
+ },
515
+ "tier": {
516
+ "type": "TEXT",
517
+ "notNull": false,
518
+ "unique": false,
519
+ "default": "free"
520
+ },
521
+ "database_url": {
522
+ "type": "TEXT",
523
+ "notNull": false,
524
+ "unique": false,
525
+ "default": ""
526
+ },
527
+ "database_type": {
528
+ "type": "TEXT",
529
+ "notNull": false,
530
+ "unique": false,
531
+ "default": ""
532
+ },
533
+ "portal_config": {
534
+ "type": "TEXT",
535
+ "notNull": false,
536
+ "unique": false,
537
+ "default": ""
538
+ },
539
+ "repository_url": {
540
+ "type": "TEXT",
541
+ "notNull": false,
542
+ "unique": false,
543
+ "default": ""
544
+ },
545
+ "template_name": {
546
+ "type": "TEXT",
547
+ "notNull": false,
548
+ "unique": false,
549
+ "default": ""
550
+ },
551
+ "provisioning_status": {
552
+ "type": "TEXT",
553
+ "notNull": false,
554
+ "unique": false,
555
+ "default": ""
556
+ },
557
+ "provisioned_at": {
558
+ "type": "TIMESTAMP",
559
+ "notNull": false,
560
+ "unique": false
561
+ },
562
+ "provisioning_error": {
563
+ "type": "TEXT",
564
+ "notNull": false,
565
+ "unique": false,
566
+ "default": ""
567
+ },
568
+ "metadata": {
569
+ "type": "TEXT",
570
+ "notNull": false,
571
+ "unique": false,
572
+ "default": ""
573
+ }
574
+ },
575
+ "indexes": [
576
+ {
577
+ "name": "sites_id_idx",
578
+ "columns": [
579
+ "id"
580
+ ]
581
+ },
582
+ {
583
+ "name": "sites_tenant_id_domain_idx",
584
+ "columns": [
585
+ "tenant_id",
586
+ "domain"
587
+ ],
588
+ "unique": true
589
+ }
590
+ ],
591
+ "version": "1845042e"
592
+ }
593
+ },
594
+ "@happyvertical/smrt-sites:SiteAgentBinding": {
595
+ "name": "siteagentbinding",
596
+ "className": "SiteAgentBinding",
597
+ "qualifiedName": "@happyvertical/smrt-sites:SiteAgentBinding",
598
+ "collection": "siteagentbindings",
599
+ "filePath": "/home/runner/_work/smrt/smrt/packages/sites/src/models/SiteAgentBinding.ts",
600
+ "packageName": "@happyvertical/smrt-sites",
601
+ "fields": {
602
+ "tenantId": {
603
+ "type": "text",
604
+ "required": true,
605
+ "_meta": {
606
+ "sqlType": "UUID",
607
+ "__tenancy": {
608
+ "isTenantIdField": true,
609
+ "autoFilter": true,
610
+ "required": true,
611
+ "autoPopulate": true,
612
+ "nullable": false,
613
+ "mode": "required",
614
+ "field": "tenantId",
615
+ "allowSuperAdminBypass": false
616
+ }
617
+ }
618
+ },
619
+ "siteId": {
620
+ "type": "foreignKey",
621
+ "required": false,
622
+ "related": "Site"
623
+ },
624
+ "agentClass": {
625
+ "type": "text",
626
+ "required": false,
627
+ "default": ""
628
+ },
629
+ "enabled": {
630
+ "type": "boolean",
631
+ "required": false,
632
+ "default": true
633
+ },
634
+ "config": {
635
+ "type": "json",
636
+ "required": false,
637
+ "default": {}
638
+ },
639
+ "priority": {
640
+ "type": "integer",
641
+ "required": false,
642
+ "default": 0
643
+ }
644
+ },
645
+ "methods": {},
646
+ "decoratorConfig": {
647
+ "tableName": "site_agent_bindings",
648
+ "api": {
649
+ "include": [
650
+ "list",
651
+ "get",
652
+ "create",
653
+ "update",
654
+ "delete"
655
+ ]
656
+ },
657
+ "cli": {
658
+ "include": [
659
+ "list",
660
+ "get"
661
+ ]
662
+ },
663
+ "mcp": {
664
+ "include": [
665
+ "list",
666
+ "get"
667
+ ]
668
+ },
669
+ "conflictColumns": [
670
+ "site_id",
671
+ "agent_class"
672
+ ],
673
+ "tenantScoped": {
674
+ "mode": "required"
675
+ }
676
+ },
677
+ "extends": "SmrtObject",
678
+ "exportName": "SiteAgentBinding",
679
+ "collectionExportName": "SiteAgentBindingCollection",
680
+ "validationRules": [
681
+ {
682
+ "field": "tenantId",
683
+ "rule": "required",
684
+ "fieldType": "text"
685
+ }
686
+ ],
687
+ "schema": {
688
+ "tableName": "site_agent_bindings",
689
+ "ddl": "CREATE TABLE IF NOT EXISTS \"site_agent_bindings\" (\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);",
690
+ "columns": {
691
+ "id": {
692
+ "type": "UUID",
693
+ "primaryKey": true,
694
+ "referenceKind": "id",
695
+ "notNull": true
696
+ },
697
+ "slug": {
698
+ "type": "TEXT",
699
+ "notNull": true
700
+ },
701
+ "context": {
702
+ "type": "TEXT",
703
+ "notNull": true,
704
+ "default": ""
705
+ },
706
+ "created_at": {
707
+ "type": "TIMESTAMP",
708
+ "notNull": true,
709
+ "default": "current_timestamp"
710
+ },
711
+ "updated_at": {
712
+ "type": "TIMESTAMP",
713
+ "notNull": true,
714
+ "default": "current_timestamp"
715
+ },
716
+ "tenant_id": {
717
+ "type": "UUID",
718
+ "referenceKind": "tenantId",
719
+ "notNull": true,
720
+ "unique": false
721
+ },
722
+ "site_id": {
723
+ "type": "UUID",
724
+ "referenceKind": "foreignKey",
725
+ "notNull": false,
726
+ "unique": false
727
+ },
728
+ "agent_class": {
729
+ "type": "TEXT",
730
+ "notNull": false,
731
+ "unique": false,
732
+ "default": ""
733
+ },
734
+ "enabled": {
735
+ "type": "BOOLEAN",
736
+ "notNull": false,
737
+ "unique": false,
738
+ "default": true
739
+ },
740
+ "config": {
741
+ "type": "JSON",
742
+ "notNull": false,
743
+ "unique": false,
744
+ "default": {}
745
+ },
746
+ "priority": {
747
+ "type": "INTEGER",
748
+ "notNull": false,
749
+ "unique": false,
750
+ "default": 0
751
+ }
752
+ },
753
+ "indexes": [
754
+ {
755
+ "name": "site_agent_bindings_id_idx",
756
+ "columns": [
757
+ "id"
758
+ ]
759
+ },
760
+ {
761
+ "name": "site_agent_bindings_site_id_agent_class_idx",
762
+ "columns": [
763
+ "site_id",
764
+ "agent_class"
765
+ ],
766
+ "unique": true
767
+ }
768
+ ],
769
+ "version": "e9a85893"
770
+ }
771
+ }
772
+ },
773
+ "moduleType": "smrt",
774
+ "smrtDependencies": [
775
+ "@happyvertical/smrt-core",
776
+ "@happyvertical/smrt-tenancy"
777
+ ]
778
+ }