@happyvertical/smrt-core 0.37.7 → 0.37.9

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.
Files changed (88) hide show
  1. package/AGENTS.md +25 -6
  2. package/dist/change-feed.d.ts +261 -0
  3. package/dist/change-feed.d.ts.map +1 -0
  4. package/dist/change-feed.js +482 -0
  5. package/dist/change-feed.js.map +1 -0
  6. package/dist/class.d.ts.map +1 -1
  7. package/dist/class.js +4 -2
  8. package/dist/class.js.map +1 -1
  9. package/dist/collection.js +2 -2
  10. package/dist/consumer-plugin/index.d.ts.map +1 -1
  11. package/dist/consumer-plugin/index.js +24 -19
  12. package/dist/consumer-plugin/index.js.map +1 -1
  13. package/dist/dispatch/bus.js +2 -2
  14. package/dist/dispatch/index.d.ts +1 -1
  15. package/dist/dispatch/index.d.ts.map +1 -1
  16. package/dist/dispatch/index.js +2 -2
  17. package/dist/dispatch/tenant-resolver.d.ts +23 -0
  18. package/dist/dispatch/tenant-resolver.d.ts.map +1 -1
  19. package/dist/dispatch/tenant-resolver.js +33 -1
  20. package/dist/dispatch/tenant-resolver.js.map +1 -1
  21. package/dist/generated-client-runtime.d.ts +26 -0
  22. package/dist/generated-client-runtime.d.ts.map +1 -0
  23. package/dist/generated-client-runtime.js +88 -0
  24. package/dist/generated-client-runtime.js.map +1 -0
  25. package/dist/generators/changes-route.d.ts +52 -0
  26. package/dist/generators/changes-route.d.ts.map +1 -0
  27. package/dist/generators/changes-route.js +111 -0
  28. package/dist/generators/changes-route.js.map +1 -0
  29. package/dist/generators/conditional-get.d.ts +12 -0
  30. package/dist/generators/conditional-get.d.ts.map +1 -1
  31. package/dist/generators/conditional-get.js +30 -2
  32. package/dist/generators/conditional-get.js.map +1 -1
  33. package/dist/generators/rest.d.ts +58 -0
  34. package/dist/generators/rest.d.ts.map +1 -1
  35. package/dist/generators/rest.js +114 -21
  36. package/dist/generators/rest.js.map +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +6 -5
  40. package/dist/manifest/manifest-loader.d.ts +10 -1
  41. package/dist/manifest/manifest-loader.d.ts.map +1 -1
  42. package/dist/manifest/manifest-loader.js +18 -5
  43. package/dist/manifest/manifest-loader.js.map +1 -1
  44. package/dist/manifest/static-manifest.js +2 -2
  45. package/dist/manifest/static-manifest.js.map +1 -1
  46. package/dist/manifest/store.js +1 -1
  47. package/dist/manifest/test-manifest-stub.d.ts.map +1 -1
  48. package/dist/manifest/test-manifest-stub.js +880 -105
  49. package/dist/manifest/test-manifest-stub.js.map +1 -1
  50. package/dist/manifest.json +2 -2
  51. package/dist/object.js +2 -2
  52. package/dist/prebuild/index.d.ts.map +1 -1
  53. package/dist/prebuild/index.js +14 -7
  54. package/dist/prebuild/index.js.map +1 -1
  55. package/dist/registry/shared-state.d.ts +8 -1
  56. package/dist/registry/shared-state.d.ts.map +1 -1
  57. package/dist/registry/shared-state.js +11 -3
  58. package/dist/registry/shared-state.js.map +1 -1
  59. package/dist/smrt-knowledge.json +6 -6
  60. package/dist/system/schema.d.ts +24 -1
  61. package/dist/system/schema.d.ts.map +1 -1
  62. package/dist/system/schema.js +45 -3
  63. package/dist/system/schema.js.map +1 -1
  64. package/dist/testing/database.js +1 -1
  65. package/dist/utils/stack-frames.d.ts +50 -0
  66. package/dist/utils/stack-frames.d.ts.map +1 -0
  67. package/dist/utils/stack-frames.js +64 -0
  68. package/dist/utils/stack-frames.js.map +1 -0
  69. package/dist/vite-plugin/changes-route.d.ts +10 -0
  70. package/dist/vite-plugin/changes-route.d.ts.map +1 -0
  71. package/dist/vite-plugin/changes-route.js +174 -0
  72. package/dist/vite-plugin/changes-route.js.map +1 -0
  73. package/dist/vite-plugin/index.d.ts +7 -0
  74. package/dist/vite-plugin/index.d.ts.map +1 -1
  75. package/dist/vite-plugin/index.js +38 -20
  76. package/dist/vite-plugin/index.js.map +1 -1
  77. package/dist/vite-plugin/route-header.d.ts +10 -0
  78. package/dist/vite-plugin/route-header.d.ts.map +1 -0
  79. package/dist/vite-plugin/route-header.js +14 -0
  80. package/dist/vite-plugin/route-header.js.map +1 -0
  81. package/dist/vite-plugin/sveltekit-generator.d.ts +7 -0
  82. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
  83. package/dist/vite-plugin/sveltekit-generator.js +46 -20
  84. package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
  85. package/dist/vite-plugin/sync-apply-route.d.ts.map +1 -1
  86. package/dist/vite-plugin/sync-apply-route.js +2 -2
  87. package/dist/vite-plugin/sync-apply-route.js.map +1 -1
  88. package/package.json +4 -4
@@ -1,9 +1,9 @@
1
1
  //#region src/manifest/test-manifest-stub.ts
2
2
  var testManifest = {
3
3
  "version": "1.0.0",
4
- "timestamp": 1783048765908,
4
+ "timestamp": 1783086140349,
5
5
  "packageName": "@happyvertical/smrt-core",
6
- "packageVersion": "0.37.7",
6
+ "packageVersion": "0.37.9",
7
7
  "objects": {
8
8
  "@happyvertical/smrt-core:SmrtClass": {
9
9
  "name": "smrtclass",
@@ -19286,6 +19286,376 @@ var testManifest = {
19286
19286
  "version": "ffc6e9c6"
19287
19287
  }
19288
19288
  },
19289
+ "@happyvertical/smrt-core:ChangeFeedWidget": {
19290
+ "name": "changefeedwidget",
19291
+ "className": "ChangeFeedWidget",
19292
+ "qualifiedName": "@happyvertical/smrt-core:ChangeFeedWidget",
19293
+ "collection": "changefeedwidgets",
19294
+ "filePath": "packages/core/src/__tests__/issue-1758-change-feed.test.ts",
19295
+ "packageName": "@happyvertical/smrt-core",
19296
+ "fields": { "name": {
19297
+ "type": "text",
19298
+ "required": false,
19299
+ "default": ""
19300
+ } },
19301
+ "methods": {},
19302
+ "decoratorConfig": {},
19303
+ "extends": "SmrtObject",
19304
+ "exportName": "ChangeFeedWidget",
19305
+ "collectionExportName": "ChangeFeedWidgetCollection",
19306
+ "schema": {
19307
+ "tableName": "change_feed_widgets",
19308
+ "ddl": "CREATE TABLE IF NOT EXISTS \"change_feed_widgets\" (\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 \"name\" TEXT DEFAULT ''\n);",
19309
+ "columns": {
19310
+ "id": {
19311
+ "type": "UUID",
19312
+ "primaryKey": true,
19313
+ "referenceKind": "id",
19314
+ "notNull": true
19315
+ },
19316
+ "slug": {
19317
+ "type": "TEXT",
19318
+ "notNull": true
19319
+ },
19320
+ "context": {
19321
+ "type": "TEXT",
19322
+ "notNull": true,
19323
+ "default": ""
19324
+ },
19325
+ "created_at": {
19326
+ "type": "TIMESTAMP",
19327
+ "notNull": true,
19328
+ "default": "current_timestamp"
19329
+ },
19330
+ "updated_at": {
19331
+ "type": "TIMESTAMP",
19332
+ "notNull": true,
19333
+ "default": "current_timestamp"
19334
+ },
19335
+ "name": {
19336
+ "type": "TEXT",
19337
+ "notNull": false,
19338
+ "unique": false,
19339
+ "default": ""
19340
+ }
19341
+ },
19342
+ "indexes": [{
19343
+ "name": "change_feed_widgets_id_idx",
19344
+ "columns": ["id"]
19345
+ }, {
19346
+ "name": "change_feed_widgets_slug_context_idx",
19347
+ "columns": ["slug", "context"],
19348
+ "unique": true
19349
+ }],
19350
+ "version": "0180180c"
19351
+ }
19352
+ },
19353
+ "@happyvertical/smrt-core:ChangeFeedWidgetCollection": {
19354
+ "name": "changefeedwidgetcollection",
19355
+ "className": "ChangeFeedWidgetCollection",
19356
+ "qualifiedName": "@happyvertical/smrt-core:ChangeFeedWidgetCollection",
19357
+ "collection": "changefeedwidgets",
19358
+ "filePath": "packages/core/src/__tests__/issue-1758-change-feed.test.ts",
19359
+ "packageName": "@happyvertical/smrt-core",
19360
+ "fields": {},
19361
+ "methods": {},
19362
+ "decoratorConfig": {},
19363
+ "extends": "SmrtCollection",
19364
+ "extendsTypeArg": "ChangeFeedWidget",
19365
+ "exportName": "ChangeFeedWidgetCollection",
19366
+ "collectionExportName": "ChangeFeedWidgetCollectionCollection",
19367
+ "schema": {
19368
+ "tableName": "change_feed_widget_collections",
19369
+ "ddl": "CREATE TABLE IF NOT EXISTS \"change_feed_widget_collections\" (\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);",
19370
+ "columns": {
19371
+ "id": {
19372
+ "type": "UUID",
19373
+ "primaryKey": true,
19374
+ "referenceKind": "id",
19375
+ "notNull": true
19376
+ },
19377
+ "slug": {
19378
+ "type": "TEXT",
19379
+ "notNull": true
19380
+ },
19381
+ "context": {
19382
+ "type": "TEXT",
19383
+ "notNull": true,
19384
+ "default": ""
19385
+ },
19386
+ "created_at": {
19387
+ "type": "TIMESTAMP",
19388
+ "notNull": true,
19389
+ "default": "current_timestamp"
19390
+ },
19391
+ "updated_at": {
19392
+ "type": "TIMESTAMP",
19393
+ "notNull": true,
19394
+ "default": "current_timestamp"
19395
+ }
19396
+ },
19397
+ "indexes": [{
19398
+ "name": "change_feed_widget_collections_id_idx",
19399
+ "columns": ["id"]
19400
+ }, {
19401
+ "name": "change_feed_widget_collections_slug_context_idx",
19402
+ "columns": ["slug", "context"],
19403
+ "unique": true
19404
+ }],
19405
+ "version": "306ff712"
19406
+ }
19407
+ },
19408
+ "@happyvertical/smrt-core:ChangeFeedGadget": {
19409
+ "name": "changefeedgadget",
19410
+ "className": "ChangeFeedGadget",
19411
+ "qualifiedName": "@happyvertical/smrt-core:ChangeFeedGadget",
19412
+ "collection": "changefeedgadgets",
19413
+ "filePath": "packages/core/src/__tests__/issue-1758-change-feed.test.ts",
19414
+ "packageName": "@happyvertical/smrt-core",
19415
+ "fields": { "label": {
19416
+ "type": "text",
19417
+ "required": false,
19418
+ "default": ""
19419
+ } },
19420
+ "methods": {},
19421
+ "decoratorConfig": {},
19422
+ "extends": "SmrtObject",
19423
+ "exportName": "ChangeFeedGadget",
19424
+ "collectionExportName": "ChangeFeedGadgetCollection",
19425
+ "schema": {
19426
+ "tableName": "change_feed_gadgets",
19427
+ "ddl": "CREATE TABLE IF NOT EXISTS \"change_feed_gadgets\" (\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 \"label\" TEXT DEFAULT ''\n);",
19428
+ "columns": {
19429
+ "id": {
19430
+ "type": "UUID",
19431
+ "primaryKey": true,
19432
+ "referenceKind": "id",
19433
+ "notNull": true
19434
+ },
19435
+ "slug": {
19436
+ "type": "TEXT",
19437
+ "notNull": true
19438
+ },
19439
+ "context": {
19440
+ "type": "TEXT",
19441
+ "notNull": true,
19442
+ "default": ""
19443
+ },
19444
+ "created_at": {
19445
+ "type": "TIMESTAMP",
19446
+ "notNull": true,
19447
+ "default": "current_timestamp"
19448
+ },
19449
+ "updated_at": {
19450
+ "type": "TIMESTAMP",
19451
+ "notNull": true,
19452
+ "default": "current_timestamp"
19453
+ },
19454
+ "label": {
19455
+ "type": "TEXT",
19456
+ "notNull": false,
19457
+ "unique": false,
19458
+ "default": ""
19459
+ }
19460
+ },
19461
+ "indexes": [{
19462
+ "name": "change_feed_gadgets_id_idx",
19463
+ "columns": ["id"]
19464
+ }, {
19465
+ "name": "change_feed_gadgets_slug_context_idx",
19466
+ "columns": ["slug", "context"],
19467
+ "unique": true
19468
+ }],
19469
+ "version": "dcc30b9e"
19470
+ }
19471
+ },
19472
+ "@happyvertical/smrt-core:ChangeFeedGadgetCollection": {
19473
+ "name": "changefeedgadgetcollection",
19474
+ "className": "ChangeFeedGadgetCollection",
19475
+ "qualifiedName": "@happyvertical/smrt-core:ChangeFeedGadgetCollection",
19476
+ "collection": "changefeedgadgets",
19477
+ "filePath": "packages/core/src/__tests__/issue-1758-change-feed.test.ts",
19478
+ "packageName": "@happyvertical/smrt-core",
19479
+ "fields": {},
19480
+ "methods": {},
19481
+ "decoratorConfig": {},
19482
+ "extends": "SmrtCollection",
19483
+ "extendsTypeArg": "ChangeFeedGadget",
19484
+ "exportName": "ChangeFeedGadgetCollection",
19485
+ "collectionExportName": "ChangeFeedGadgetCollectionCollection",
19486
+ "schema": {
19487
+ "tableName": "change_feed_gadget_collections",
19488
+ "ddl": "CREATE TABLE IF NOT EXISTS \"change_feed_gadget_collections\" (\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);",
19489
+ "columns": {
19490
+ "id": {
19491
+ "type": "UUID",
19492
+ "primaryKey": true,
19493
+ "referenceKind": "id",
19494
+ "notNull": true
19495
+ },
19496
+ "slug": {
19497
+ "type": "TEXT",
19498
+ "notNull": true
19499
+ },
19500
+ "context": {
19501
+ "type": "TEXT",
19502
+ "notNull": true,
19503
+ "default": ""
19504
+ },
19505
+ "created_at": {
19506
+ "type": "TIMESTAMP",
19507
+ "notNull": true,
19508
+ "default": "current_timestamp"
19509
+ },
19510
+ "updated_at": {
19511
+ "type": "TIMESTAMP",
19512
+ "notNull": true,
19513
+ "default": "current_timestamp"
19514
+ }
19515
+ },
19516
+ "indexes": [{
19517
+ "name": "change_feed_gadget_collections_id_idx",
19518
+ "columns": ["id"]
19519
+ }, {
19520
+ "name": "change_feed_gadget_collections_slug_context_idx",
19521
+ "columns": ["slug", "context"],
19522
+ "unique": true
19523
+ }],
19524
+ "version": "c8e23410"
19525
+ }
19526
+ },
19527
+ "@happyvertical/smrt-core:ChangeFeedTenantDoc": {
19528
+ "name": "changefeedtenantdoc",
19529
+ "className": "ChangeFeedTenantDoc",
19530
+ "qualifiedName": "@happyvertical/smrt-core:ChangeFeedTenantDoc",
19531
+ "collection": "changefeedtenantdocs",
19532
+ "filePath": "packages/core/src/__tests__/issue-1758-change-feed.test.ts",
19533
+ "packageName": "@happyvertical/smrt-core",
19534
+ "fields": {
19535
+ "title": {
19536
+ "type": "text",
19537
+ "required": false,
19538
+ "default": ""
19539
+ },
19540
+ "tenantId": {
19541
+ "type": "text",
19542
+ "required": false,
19543
+ "default": ""
19544
+ }
19545
+ },
19546
+ "methods": {},
19547
+ "decoratorConfig": {},
19548
+ "extends": "SmrtObject",
19549
+ "exportName": "ChangeFeedTenantDoc",
19550
+ "collectionExportName": "ChangeFeedTenantDocCollection",
19551
+ "schema": {
19552
+ "tableName": "change_feed_tenant_docs",
19553
+ "ddl": "CREATE TABLE IF NOT EXISTS \"change_feed_tenant_docs\" (\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 \"title\" TEXT DEFAULT '',\n \"tenant_id\" TEXT DEFAULT ''\n);",
19554
+ "columns": {
19555
+ "id": {
19556
+ "type": "UUID",
19557
+ "primaryKey": true,
19558
+ "referenceKind": "id",
19559
+ "notNull": true
19560
+ },
19561
+ "slug": {
19562
+ "type": "TEXT",
19563
+ "notNull": true
19564
+ },
19565
+ "context": {
19566
+ "type": "TEXT",
19567
+ "notNull": true,
19568
+ "default": ""
19569
+ },
19570
+ "created_at": {
19571
+ "type": "TIMESTAMP",
19572
+ "notNull": true,
19573
+ "default": "current_timestamp"
19574
+ },
19575
+ "updated_at": {
19576
+ "type": "TIMESTAMP",
19577
+ "notNull": true,
19578
+ "default": "current_timestamp"
19579
+ },
19580
+ "title": {
19581
+ "type": "TEXT",
19582
+ "notNull": false,
19583
+ "unique": false,
19584
+ "default": ""
19585
+ },
19586
+ "tenant_id": {
19587
+ "type": "TEXT",
19588
+ "notNull": false,
19589
+ "unique": false,
19590
+ "default": ""
19591
+ }
19592
+ },
19593
+ "indexes": [{
19594
+ "name": "change_feed_tenant_docs_id_idx",
19595
+ "columns": ["id"]
19596
+ }, {
19597
+ "name": "change_feed_tenant_docs_slug_context_idx",
19598
+ "columns": ["slug", "context"],
19599
+ "unique": true
19600
+ }],
19601
+ "version": "5b50fa25"
19602
+ }
19603
+ },
19604
+ "@happyvertical/smrt-core:ChangeFeedTenantDocCollection": {
19605
+ "name": "changefeedtenantdoccollection",
19606
+ "className": "ChangeFeedTenantDocCollection",
19607
+ "qualifiedName": "@happyvertical/smrt-core:ChangeFeedTenantDocCollection",
19608
+ "collection": "changefeedtenantdocs",
19609
+ "filePath": "packages/core/src/__tests__/issue-1758-change-feed.test.ts",
19610
+ "packageName": "@happyvertical/smrt-core",
19611
+ "fields": {},
19612
+ "methods": {},
19613
+ "decoratorConfig": {},
19614
+ "extends": "SmrtCollection",
19615
+ "extendsTypeArg": "ChangeFeedTenantDoc",
19616
+ "exportName": "ChangeFeedTenantDocCollection",
19617
+ "collectionExportName": "ChangeFeedTenantDocCollectionCollection",
19618
+ "schema": {
19619
+ "tableName": "change_feed_tenant_doc_collections",
19620
+ "ddl": "CREATE TABLE IF NOT EXISTS \"change_feed_tenant_doc_collections\" (\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);",
19621
+ "columns": {
19622
+ "id": {
19623
+ "type": "UUID",
19624
+ "primaryKey": true,
19625
+ "referenceKind": "id",
19626
+ "notNull": true
19627
+ },
19628
+ "slug": {
19629
+ "type": "TEXT",
19630
+ "notNull": true
19631
+ },
19632
+ "context": {
19633
+ "type": "TEXT",
19634
+ "notNull": true,
19635
+ "default": ""
19636
+ },
19637
+ "created_at": {
19638
+ "type": "TIMESTAMP",
19639
+ "notNull": true,
19640
+ "default": "current_timestamp"
19641
+ },
19642
+ "updated_at": {
19643
+ "type": "TIMESTAMP",
19644
+ "notNull": true,
19645
+ "default": "current_timestamp"
19646
+ }
19647
+ },
19648
+ "indexes": [{
19649
+ "name": "change_feed_tenant_doc_collections_id_idx",
19650
+ "columns": ["id"]
19651
+ }, {
19652
+ "name": "change_feed_tenant_doc_collections_slug_context_idx",
19653
+ "columns": ["slug", "context"],
19654
+ "unique": true
19655
+ }],
19656
+ "version": "7e65ff52"
19657
+ }
19658
+ },
19289
19659
  "@happyvertical/smrt-core:TransientTest": {
19290
19660
  "name": "transienttest",
19291
19661
  "className": "TransientTest",
@@ -66097,46 +66467,293 @@ var testManifest = {
66097
66467
  "type": "TEXT",
66098
66468
  "notNull": false,
66099
66469
  "unique": false
66100
- },
66101
- "tenant_id": {
66102
- "type": "TEXT",
66103
- "notNull": false,
66104
- "unique": false
66105
- },
66106
- "internal_code": {
66107
- "type": "TEXT",
66108
- "notNull": false,
66109
- "unique": false
66470
+ },
66471
+ "tenant_id": {
66472
+ "type": "TEXT",
66473
+ "notNull": false,
66474
+ "unique": false
66475
+ },
66476
+ "internal_code": {
66477
+ "type": "TEXT",
66478
+ "notNull": false,
66479
+ "unique": false
66480
+ }
66481
+ },
66482
+ "indexes": [{
66483
+ "name": "rest_writable_widgets_id_idx",
66484
+ "columns": ["id"]
66485
+ }, {
66486
+ "name": "rest_writable_widgets_slug_context_idx",
66487
+ "columns": ["slug", "context"],
66488
+ "unique": true
66489
+ }],
66490
+ "version": "cb84805b"
66491
+ }
66492
+ },
66493
+ "@happyvertical/smrt-core:RestWritableWidgetCollection": {
66494
+ "name": "restwritablewidgetcollection",
66495
+ "className": "RestWritableWidgetCollection",
66496
+ "qualifiedName": "@happyvertical/smrt-core:RestWritableWidgetCollection",
66497
+ "collection": "restwritablewidgets",
66498
+ "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66499
+ "packageName": "@happyvertical/smrt-core",
66500
+ "fields": {},
66501
+ "methods": {},
66502
+ "decoratorConfig": {},
66503
+ "extends": "SmrtCollection",
66504
+ "extendsTypeArg": "RestWritableWidget",
66505
+ "exportName": "RestWritableWidgetCollection",
66506
+ "collectionExportName": "RestWritableWidgetCollectionCollection",
66507
+ "schema": {
66508
+ "tableName": "rest_writable_widget_collections",
66509
+ "ddl": "CREATE TABLE IF NOT EXISTS \"rest_writable_widget_collections\" (\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);",
66510
+ "columns": {
66511
+ "id": {
66512
+ "type": "UUID",
66513
+ "primaryKey": true,
66514
+ "referenceKind": "id",
66515
+ "notNull": true
66516
+ },
66517
+ "slug": {
66518
+ "type": "TEXT",
66519
+ "notNull": true
66520
+ },
66521
+ "context": {
66522
+ "type": "TEXT",
66523
+ "notNull": true,
66524
+ "default": ""
66525
+ },
66526
+ "created_at": {
66527
+ "type": "TIMESTAMP",
66528
+ "notNull": true,
66529
+ "default": "current_timestamp"
66530
+ },
66531
+ "updated_at": {
66532
+ "type": "TIMESTAMP",
66533
+ "notNull": true,
66534
+ "default": "current_timestamp"
66535
+ }
66536
+ },
66537
+ "indexes": [{
66538
+ "name": "rest_writable_widget_collections_id_idx",
66539
+ "columns": ["id"]
66540
+ }, {
66541
+ "name": "rest_writable_widget_collections_slug_context_idx",
66542
+ "columns": ["slug", "context"],
66543
+ "unique": true
66544
+ }],
66545
+ "version": "39994616"
66546
+ }
66547
+ },
66548
+ "@happyvertical/smrt-core:RestPrivateWidget": {
66549
+ "name": "restprivatewidget",
66550
+ "className": "RestPrivateWidget",
66551
+ "qualifiedName": "@happyvertical/smrt-core:RestPrivateWidget",
66552
+ "collection": "restprivatewidgets",
66553
+ "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66554
+ "packageName": "@happyvertical/smrt-core",
66555
+ "fields": { "name": {
66556
+ "type": "text",
66557
+ "required": false,
66558
+ "_meta": {}
66559
+ } },
66560
+ "methods": {},
66561
+ "decoratorConfig": { "api": { "include": [
66562
+ "list",
66563
+ "get",
66564
+ "create"
66565
+ ] } },
66566
+ "extends": "SmrtObject",
66567
+ "exportName": "RestPrivateWidget",
66568
+ "collectionExportName": "RestPrivateWidgetCollection",
66569
+ "schema": {
66570
+ "tableName": "rest_private_widgets",
66571
+ "ddl": "CREATE TABLE IF NOT EXISTS \"rest_private_widgets\" (\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 \"name\" TEXT\n);",
66572
+ "columns": {
66573
+ "id": {
66574
+ "type": "UUID",
66575
+ "primaryKey": true,
66576
+ "referenceKind": "id",
66577
+ "notNull": true
66578
+ },
66579
+ "slug": {
66580
+ "type": "TEXT",
66581
+ "notNull": true
66582
+ },
66583
+ "context": {
66584
+ "type": "TEXT",
66585
+ "notNull": true,
66586
+ "default": ""
66587
+ },
66588
+ "created_at": {
66589
+ "type": "TIMESTAMP",
66590
+ "notNull": true,
66591
+ "default": "current_timestamp"
66592
+ },
66593
+ "updated_at": {
66594
+ "type": "TIMESTAMP",
66595
+ "notNull": true,
66596
+ "default": "current_timestamp"
66597
+ },
66598
+ "name": {
66599
+ "type": "TEXT",
66600
+ "notNull": false,
66601
+ "unique": false
66602
+ }
66603
+ },
66604
+ "indexes": [{
66605
+ "name": "rest_private_widgets_id_idx",
66606
+ "columns": ["id"]
66607
+ }, {
66608
+ "name": "rest_private_widgets_slug_context_idx",
66609
+ "columns": ["slug", "context"],
66610
+ "unique": true
66611
+ }],
66612
+ "version": "73d3787b"
66613
+ }
66614
+ },
66615
+ "@happyvertical/smrt-core:RestPrivateWidgetCollection": {
66616
+ "name": "restprivatewidgetcollection",
66617
+ "className": "RestPrivateWidgetCollection",
66618
+ "qualifiedName": "@happyvertical/smrt-core:RestPrivateWidgetCollection",
66619
+ "collection": "restprivatewidgets",
66620
+ "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66621
+ "packageName": "@happyvertical/smrt-core",
66622
+ "fields": {},
66623
+ "methods": {},
66624
+ "decoratorConfig": {},
66625
+ "extends": "SmrtCollection",
66626
+ "extendsTypeArg": "RestPrivateWidget",
66627
+ "exportName": "RestPrivateWidgetCollection",
66628
+ "collectionExportName": "RestPrivateWidgetCollectionCollection",
66629
+ "schema": {
66630
+ "tableName": "rest_private_widget_collections",
66631
+ "ddl": "CREATE TABLE IF NOT EXISTS \"rest_private_widget_collections\" (\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);",
66632
+ "columns": {
66633
+ "id": {
66634
+ "type": "UUID",
66635
+ "primaryKey": true,
66636
+ "referenceKind": "id",
66637
+ "notNull": true
66638
+ },
66639
+ "slug": {
66640
+ "type": "TEXT",
66641
+ "notNull": true
66642
+ },
66643
+ "context": {
66644
+ "type": "TEXT",
66645
+ "notNull": true,
66646
+ "default": ""
66647
+ },
66648
+ "created_at": {
66649
+ "type": "TIMESTAMP",
66650
+ "notNull": true,
66651
+ "default": "current_timestamp"
66652
+ },
66653
+ "updated_at": {
66654
+ "type": "TIMESTAMP",
66655
+ "notNull": true,
66656
+ "default": "current_timestamp"
66657
+ }
66658
+ },
66659
+ "indexes": [{
66660
+ "name": "rest_private_widget_collections_id_idx",
66661
+ "columns": ["id"]
66662
+ }, {
66663
+ "name": "rest_private_widget_collections_slug_context_idx",
66664
+ "columns": ["slug", "context"],
66665
+ "unique": true
66666
+ }],
66667
+ "version": "31911960"
66668
+ }
66669
+ },
66670
+ "@happyvertical/smrt-core:RestReadPublicWidget": {
66671
+ "name": "restreadpublicwidget",
66672
+ "className": "RestReadPublicWidget",
66673
+ "qualifiedName": "@happyvertical/smrt-core:RestReadPublicWidget",
66674
+ "collection": "restreadpublicwidgets",
66675
+ "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66676
+ "packageName": "@happyvertical/smrt-core",
66677
+ "fields": { "name": {
66678
+ "type": "text",
66679
+ "required": false,
66680
+ "_meta": {}
66681
+ } },
66682
+ "methods": {},
66683
+ "decoratorConfig": { "api": {
66684
+ "include": [
66685
+ "list",
66686
+ "get",
66687
+ "create"
66688
+ ],
66689
+ "public": "read"
66690
+ } },
66691
+ "extends": "SmrtObject",
66692
+ "exportName": "RestReadPublicWidget",
66693
+ "collectionExportName": "RestReadPublicWidgetCollection",
66694
+ "schema": {
66695
+ "tableName": "rest_read_public_widgets",
66696
+ "ddl": "CREATE TABLE IF NOT EXISTS \"rest_read_public_widgets\" (\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 \"name\" TEXT\n);",
66697
+ "columns": {
66698
+ "id": {
66699
+ "type": "UUID",
66700
+ "primaryKey": true,
66701
+ "referenceKind": "id",
66702
+ "notNull": true
66703
+ },
66704
+ "slug": {
66705
+ "type": "TEXT",
66706
+ "notNull": true
66707
+ },
66708
+ "context": {
66709
+ "type": "TEXT",
66710
+ "notNull": true,
66711
+ "default": ""
66712
+ },
66713
+ "created_at": {
66714
+ "type": "TIMESTAMP",
66715
+ "notNull": true,
66716
+ "default": "current_timestamp"
66717
+ },
66718
+ "updated_at": {
66719
+ "type": "TIMESTAMP",
66720
+ "notNull": true,
66721
+ "default": "current_timestamp"
66722
+ },
66723
+ "name": {
66724
+ "type": "TEXT",
66725
+ "notNull": false,
66726
+ "unique": false
66110
66727
  }
66111
66728
  },
66112
66729
  "indexes": [{
66113
- "name": "rest_writable_widgets_id_idx",
66730
+ "name": "rest_read_public_widgets_id_idx",
66114
66731
  "columns": ["id"]
66115
66732
  }, {
66116
- "name": "rest_writable_widgets_slug_context_idx",
66733
+ "name": "rest_read_public_widgets_slug_context_idx",
66117
66734
  "columns": ["slug", "context"],
66118
66735
  "unique": true
66119
66736
  }],
66120
- "version": "cb84805b"
66737
+ "version": "d3002dc6"
66121
66738
  }
66122
66739
  },
66123
- "@happyvertical/smrt-core:RestWritableWidgetCollection": {
66124
- "name": "restwritablewidgetcollection",
66125
- "className": "RestWritableWidgetCollection",
66126
- "qualifiedName": "@happyvertical/smrt-core:RestWritableWidgetCollection",
66127
- "collection": "restwritablewidgets",
66740
+ "@happyvertical/smrt-core:RestReadPublicWidgetCollection": {
66741
+ "name": "restreadpublicwidgetcollection",
66742
+ "className": "RestReadPublicWidgetCollection",
66743
+ "qualifiedName": "@happyvertical/smrt-core:RestReadPublicWidgetCollection",
66744
+ "collection": "restreadpublicwidgets",
66128
66745
  "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66129
66746
  "packageName": "@happyvertical/smrt-core",
66130
66747
  "fields": {},
66131
66748
  "methods": {},
66132
66749
  "decoratorConfig": {},
66133
66750
  "extends": "SmrtCollection",
66134
- "extendsTypeArg": "RestWritableWidget",
66135
- "exportName": "RestWritableWidgetCollection",
66136
- "collectionExportName": "RestWritableWidgetCollectionCollection",
66751
+ "extendsTypeArg": "RestReadPublicWidget",
66752
+ "exportName": "RestReadPublicWidgetCollection",
66753
+ "collectionExportName": "RestReadPublicWidgetCollectionCollection",
66137
66754
  "schema": {
66138
- "tableName": "rest_writable_widget_collections",
66139
- "ddl": "CREATE TABLE IF NOT EXISTS \"rest_writable_widget_collections\" (\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);",
66755
+ "tableName": "rest_read_public_widget_collections",
66756
+ "ddl": "CREATE TABLE IF NOT EXISTS \"rest_read_public_widget_collections\" (\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);",
66140
66757
  "columns": {
66141
66758
  "id": {
66142
66759
  "type": "UUID",
@@ -66165,40 +66782,57 @@ var testManifest = {
66165
66782
  }
66166
66783
  },
66167
66784
  "indexes": [{
66168
- "name": "rest_writable_widget_collections_id_idx",
66785
+ "name": "rest_read_public_widget_collections_id_idx",
66169
66786
  "columns": ["id"]
66170
66787
  }, {
66171
- "name": "rest_writable_widget_collections_slug_context_idx",
66788
+ "name": "rest_read_public_widget_collections_slug_context_idx",
66172
66789
  "columns": ["slug", "context"],
66173
66790
  "unique": true
66174
66791
  }],
66175
- "version": "39994616"
66792
+ "version": "fbe68529"
66176
66793
  }
66177
66794
  },
66178
- "@happyvertical/smrt-core:RestPrivateWidget": {
66179
- "name": "restprivatewidget",
66180
- "className": "RestPrivateWidget",
66181
- "qualifiedName": "@happyvertical/smrt-core:RestPrivateWidget",
66182
- "collection": "restprivatewidgets",
66183
- "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66795
+ "@happyvertical/smrt-core:PublicTenantDoc": {
66796
+ "name": "publictenantdoc",
66797
+ "className": "PublicTenantDoc",
66798
+ "qualifiedName": "@happyvertical/smrt-core:PublicTenantDoc",
66799
+ "collection": "publictenantdocs",
66800
+ "filePath": "packages/core/src/generators/issue-1782-tenant-read-scope.spec.ts",
66184
66801
  "packageName": "@happyvertical/smrt-core",
66185
- "fields": { "name": {
66186
- "type": "text",
66187
- "required": false,
66188
- "_meta": {}
66189
- } },
66802
+ "fields": {
66803
+ "name": {
66804
+ "type": "text",
66805
+ "required": false,
66806
+ "_meta": {}
66807
+ },
66808
+ "tenantId": {
66809
+ "type": "text",
66810
+ "required": false,
66811
+ "_meta": {
66812
+ "nullable": true,
66813
+ "sqlType": "UUID",
66814
+ "__tenancy": {
66815
+ "isTenantIdField": true,
66816
+ "mode": "optional",
66817
+ "field": "tenantId",
66818
+ "autoFilter": true,
66819
+ "autoPopulate": true,
66820
+ "allowSuperAdminBypass": false
66821
+ }
66822
+ }
66823
+ }
66824
+ },
66190
66825
  "methods": {},
66191
- "decoratorConfig": { "api": { "include": [
66192
- "list",
66193
- "get",
66194
- "create"
66195
- ] } },
66826
+ "decoratorConfig": {
66827
+ "tenantScoped": { "mode": "optional" },
66828
+ "api": { "public": "read" }
66829
+ },
66196
66830
  "extends": "SmrtObject",
66197
- "exportName": "RestPrivateWidget",
66198
- "collectionExportName": "RestPrivateWidgetCollection",
66831
+ "exportName": "PublicTenantDoc",
66832
+ "collectionExportName": "PublicTenantDocCollection",
66199
66833
  "schema": {
66200
- "tableName": "rest_private_widgets",
66201
- "ddl": "CREATE TABLE IF NOT EXISTS \"rest_private_widgets\" (\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 \"name\" TEXT\n);",
66834
+ "tableName": "public_tenant_docs",
66835
+ "ddl": "CREATE TABLE IF NOT EXISTS \"public_tenant_docs\" (\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 \"name\" TEXT,\n \"tenant_id\" UUID\n);",
66202
66836
  "columns": {
66203
66837
  "id": {
66204
66838
  "type": "UUID",
@@ -66229,36 +66863,42 @@ var testManifest = {
66229
66863
  "type": "TEXT",
66230
66864
  "notNull": false,
66231
66865
  "unique": false
66866
+ },
66867
+ "tenant_id": {
66868
+ "type": "UUID",
66869
+ "referenceKind": "tenantId",
66870
+ "notNull": false,
66871
+ "unique": false
66232
66872
  }
66233
66873
  },
66234
66874
  "indexes": [{
66235
- "name": "rest_private_widgets_id_idx",
66875
+ "name": "public_tenant_docs_id_idx",
66236
66876
  "columns": ["id"]
66237
66877
  }, {
66238
- "name": "rest_private_widgets_slug_context_idx",
66878
+ "name": "public_tenant_docs_slug_context_idx",
66239
66879
  "columns": ["slug", "context"],
66240
66880
  "unique": true
66241
66881
  }],
66242
- "version": "73d3787b"
66882
+ "version": "12a72e86"
66243
66883
  }
66244
66884
  },
66245
- "@happyvertical/smrt-core:RestPrivateWidgetCollection": {
66246
- "name": "restprivatewidgetcollection",
66247
- "className": "RestPrivateWidgetCollection",
66248
- "qualifiedName": "@happyvertical/smrt-core:RestPrivateWidgetCollection",
66249
- "collection": "restprivatewidgets",
66250
- "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66885
+ "@happyvertical/smrt-core:PublicTenantDocCollection": {
66886
+ "name": "publictenantdoccollection",
66887
+ "className": "PublicTenantDocCollection",
66888
+ "qualifiedName": "@happyvertical/smrt-core:PublicTenantDocCollection",
66889
+ "collection": "publictenantdocs",
66890
+ "filePath": "packages/core/src/generators/issue-1782-tenant-read-scope.spec.ts",
66251
66891
  "packageName": "@happyvertical/smrt-core",
66252
66892
  "fields": {},
66253
66893
  "methods": {},
66254
66894
  "decoratorConfig": {},
66255
66895
  "extends": "SmrtCollection",
66256
- "extendsTypeArg": "RestPrivateWidget",
66257
- "exportName": "RestPrivateWidgetCollection",
66258
- "collectionExportName": "RestPrivateWidgetCollectionCollection",
66896
+ "extendsTypeArg": "PublicTenantDoc",
66897
+ "exportName": "PublicTenantDocCollection",
66898
+ "collectionExportName": "PublicTenantDocCollectionCollection",
66259
66899
  "schema": {
66260
- "tableName": "rest_private_widget_collections",
66261
- "ddl": "CREATE TABLE IF NOT EXISTS \"rest_private_widget_collections\" (\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);",
66900
+ "tableName": "public_tenant_doc_collections",
66901
+ "ddl": "CREATE TABLE IF NOT EXISTS \"public_tenant_doc_collections\" (\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);",
66262
66902
  "columns": {
66263
66903
  "id": {
66264
66904
  "type": "UUID",
@@ -66287,43 +66927,43 @@ var testManifest = {
66287
66927
  }
66288
66928
  },
66289
66929
  "indexes": [{
66290
- "name": "rest_private_widget_collections_id_idx",
66930
+ "name": "public_tenant_doc_collections_id_idx",
66291
66931
  "columns": ["id"]
66292
66932
  }, {
66293
- "name": "rest_private_widget_collections_slug_context_idx",
66933
+ "name": "public_tenant_doc_collections_slug_context_idx",
66294
66934
  "columns": ["slug", "context"],
66295
66935
  "unique": true
66296
66936
  }],
66297
- "version": "31911960"
66937
+ "version": "e5afcb41"
66298
66938
  }
66299
66939
  },
66300
- "@happyvertical/smrt-core:RestReadPublicWidget": {
66301
- "name": "restreadpublicwidget",
66302
- "className": "RestReadPublicWidget",
66303
- "qualifiedName": "@happyvertical/smrt-core:RestReadPublicWidget",
66304
- "collection": "restreadpublicwidgets",
66305
- "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
66940
+ "@happyvertical/smrt-core:Pattern1TenantDoc": {
66941
+ "name": "pattern1tenantdoc",
66942
+ "className": "Pattern1TenantDoc",
66943
+ "qualifiedName": "@happyvertical/smrt-core:Pattern1TenantDoc",
66944
+ "collection": "pattern1tenantdocs",
66945
+ "filePath": "packages/core/src/generators/issue-1782-tenant-read-scope.spec.ts",
66306
66946
  "packageName": "@happyvertical/smrt-core",
66307
- "fields": { "name": {
66308
- "type": "text",
66309
- "required": false,
66310
- "_meta": {}
66311
- } },
66947
+ "fields": {
66948
+ "name": {
66949
+ "type": "text",
66950
+ "required": false,
66951
+ "_meta": {}
66952
+ },
66953
+ "tenantId": {
66954
+ "type": "text",
66955
+ "required": false,
66956
+ "_meta": { "nullable": true }
66957
+ }
66958
+ },
66312
66959
  "methods": {},
66313
- "decoratorConfig": { "api": {
66314
- "include": [
66315
- "list",
66316
- "get",
66317
- "create"
66318
- ],
66319
- "public": "read"
66320
- } },
66960
+ "decoratorConfig": { "api": { "public": "read" } },
66321
66961
  "extends": "SmrtObject",
66322
- "exportName": "RestReadPublicWidget",
66323
- "collectionExportName": "RestReadPublicWidgetCollection",
66962
+ "exportName": "Pattern1TenantDoc",
66963
+ "collectionExportName": "Pattern1TenantDocCollection",
66324
66964
  "schema": {
66325
- "tableName": "rest_read_public_widgets",
66326
- "ddl": "CREATE TABLE IF NOT EXISTS \"rest_read_public_widgets\" (\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 \"name\" TEXT\n);",
66965
+ "tableName": "pattern1tenant_docs",
66966
+ "ddl": "CREATE TABLE IF NOT EXISTS \"pattern1tenant_docs\" (\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 \"name\" TEXT,\n \"tenant_id\" TEXT\n);",
66327
66967
  "columns": {
66328
66968
  "id": {
66329
66969
  "type": "UUID",
@@ -66354,36 +66994,41 @@ var testManifest = {
66354
66994
  "type": "TEXT",
66355
66995
  "notNull": false,
66356
66996
  "unique": false
66997
+ },
66998
+ "tenant_id": {
66999
+ "type": "TEXT",
67000
+ "notNull": false,
67001
+ "unique": false
66357
67002
  }
66358
67003
  },
66359
67004
  "indexes": [{
66360
- "name": "rest_read_public_widgets_id_idx",
67005
+ "name": "pattern1tenant_docs_id_idx",
66361
67006
  "columns": ["id"]
66362
67007
  }, {
66363
- "name": "rest_read_public_widgets_slug_context_idx",
67008
+ "name": "pattern1tenant_docs_slug_context_idx",
66364
67009
  "columns": ["slug", "context"],
66365
67010
  "unique": true
66366
67011
  }],
66367
- "version": "d3002dc6"
67012
+ "version": "64ba066b"
66368
67013
  }
66369
67014
  },
66370
- "@happyvertical/smrt-core:RestReadPublicWidgetCollection": {
66371
- "name": "restreadpublicwidgetcollection",
66372
- "className": "RestReadPublicWidgetCollection",
66373
- "qualifiedName": "@happyvertical/smrt-core:RestReadPublicWidgetCollection",
66374
- "collection": "restreadpublicwidgets",
66375
- "filePath": "packages/core/src/generators/issue-1540-rest-writable.spec.ts",
67015
+ "@happyvertical/smrt-core:Pattern1TenantDocCollection": {
67016
+ "name": "pattern1tenantdoccollection",
67017
+ "className": "Pattern1TenantDocCollection",
67018
+ "qualifiedName": "@happyvertical/smrt-core:Pattern1TenantDocCollection",
67019
+ "collection": "pattern1tenantdocs",
67020
+ "filePath": "packages/core/src/generators/issue-1782-tenant-read-scope.spec.ts",
66376
67021
  "packageName": "@happyvertical/smrt-core",
66377
67022
  "fields": {},
66378
67023
  "methods": {},
66379
67024
  "decoratorConfig": {},
66380
67025
  "extends": "SmrtCollection",
66381
- "extendsTypeArg": "RestReadPublicWidget",
66382
- "exportName": "RestReadPublicWidgetCollection",
66383
- "collectionExportName": "RestReadPublicWidgetCollectionCollection",
67026
+ "extendsTypeArg": "Pattern1TenantDoc",
67027
+ "exportName": "Pattern1TenantDocCollection",
67028
+ "collectionExportName": "Pattern1TenantDocCollectionCollection",
66384
67029
  "schema": {
66385
- "tableName": "rest_read_public_widget_collections",
66386
- "ddl": "CREATE TABLE IF NOT EXISTS \"rest_read_public_widget_collections\" (\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);",
67030
+ "tableName": "pattern1tenant_doc_collections",
67031
+ "ddl": "CREATE TABLE IF NOT EXISTS \"pattern1tenant_doc_collections\" (\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);",
66387
67032
  "columns": {
66388
67033
  "id": {
66389
67034
  "type": "UUID",
@@ -66412,14 +67057,14 @@ var testManifest = {
66412
67057
  }
66413
67058
  },
66414
67059
  "indexes": [{
66415
- "name": "rest_read_public_widget_collections_id_idx",
67060
+ "name": "pattern1tenant_doc_collections_id_idx",
66416
67061
  "columns": ["id"]
66417
67062
  }, {
66418
- "name": "rest_read_public_widget_collections_slug_context_idx",
67063
+ "name": "pattern1tenant_doc_collections_slug_context_idx",
66419
67064
  "columns": ["slug", "context"],
66420
67065
  "unique": true
66421
67066
  }],
66422
- "version": "fbe68529"
67067
+ "version": "3a36391e"
66423
67068
  }
66424
67069
  },
66425
67070
  "@happyvertical/smrt-core:ProtocolTestObject": {
@@ -69589,6 +70234,136 @@ var testManifest = {
69589
70234
  "version": "242dbd0c"
69590
70235
  }
69591
70236
  },
70237
+ "@happyvertical/smrt-core:GenClientProduct": {
70238
+ "name": "genclientproduct",
70239
+ "className": "GenClientProduct",
70240
+ "qualifiedName": "@happyvertical/smrt-core:GenClientProduct",
70241
+ "collection": "genclientproducts",
70242
+ "filePath": "packages/core/src/vite-plugin/generated-client-integration.test.ts",
70243
+ "packageName": "@happyvertical/smrt-core",
70244
+ "fields": {
70245
+ "name": {
70246
+ "type": "text",
70247
+ "required": false,
70248
+ "_meta": {}
70249
+ },
70250
+ "price": {
70251
+ "type": "integer",
70252
+ "required": false,
70253
+ "_meta": {}
70254
+ }
70255
+ },
70256
+ "methods": {},
70257
+ "decoratorConfig": { "api": { "public": true } },
70258
+ "extends": "SmrtObject",
70259
+ "exportName": "GenClientProduct",
70260
+ "collectionExportName": "GenClientProductCollection",
70261
+ "schema": {
70262
+ "tableName": "gen_client_products",
70263
+ "ddl": "CREATE TABLE IF NOT EXISTS \"gen_client_products\" (\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 \"name\" TEXT,\n \"price\" INTEGER\n);",
70264
+ "columns": {
70265
+ "id": {
70266
+ "type": "UUID",
70267
+ "primaryKey": true,
70268
+ "referenceKind": "id",
70269
+ "notNull": true
70270
+ },
70271
+ "slug": {
70272
+ "type": "TEXT",
70273
+ "notNull": true
70274
+ },
70275
+ "context": {
70276
+ "type": "TEXT",
70277
+ "notNull": true,
70278
+ "default": ""
70279
+ },
70280
+ "created_at": {
70281
+ "type": "TIMESTAMP",
70282
+ "notNull": true,
70283
+ "default": "current_timestamp"
70284
+ },
70285
+ "updated_at": {
70286
+ "type": "TIMESTAMP",
70287
+ "notNull": true,
70288
+ "default": "current_timestamp"
70289
+ },
70290
+ "name": {
70291
+ "type": "TEXT",
70292
+ "notNull": false,
70293
+ "unique": false
70294
+ },
70295
+ "price": {
70296
+ "type": "INTEGER",
70297
+ "notNull": false,
70298
+ "unique": false
70299
+ }
70300
+ },
70301
+ "indexes": [{
70302
+ "name": "gen_client_products_id_idx",
70303
+ "columns": ["id"]
70304
+ }, {
70305
+ "name": "gen_client_products_slug_context_idx",
70306
+ "columns": ["slug", "context"],
70307
+ "unique": true
70308
+ }],
70309
+ "version": "0656928f"
70310
+ }
70311
+ },
70312
+ "@happyvertical/smrt-core:GenClientProductCollection": {
70313
+ "name": "genclientproductcollection",
70314
+ "className": "GenClientProductCollection",
70315
+ "qualifiedName": "@happyvertical/smrt-core:GenClientProductCollection",
70316
+ "collection": "genclientproducts",
70317
+ "filePath": "packages/core/src/vite-plugin/generated-client-integration.test.ts",
70318
+ "packageName": "@happyvertical/smrt-core",
70319
+ "fields": {},
70320
+ "methods": {},
70321
+ "decoratorConfig": {},
70322
+ "extends": "SmrtCollection",
70323
+ "extendsTypeArg": "GenClientProduct",
70324
+ "exportName": "GenClientProductCollection",
70325
+ "collectionExportName": "GenClientProductCollectionCollection",
70326
+ "schema": {
70327
+ "tableName": "gen_client_product_collections",
70328
+ "ddl": "CREATE TABLE IF NOT EXISTS \"gen_client_product_collections\" (\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);",
70329
+ "columns": {
70330
+ "id": {
70331
+ "type": "UUID",
70332
+ "primaryKey": true,
70333
+ "referenceKind": "id",
70334
+ "notNull": true
70335
+ },
70336
+ "slug": {
70337
+ "type": "TEXT",
70338
+ "notNull": true
70339
+ },
70340
+ "context": {
70341
+ "type": "TEXT",
70342
+ "notNull": true,
70343
+ "default": ""
70344
+ },
70345
+ "created_at": {
70346
+ "type": "TIMESTAMP",
70347
+ "notNull": true,
70348
+ "default": "current_timestamp"
70349
+ },
70350
+ "updated_at": {
70351
+ "type": "TIMESTAMP",
70352
+ "notNull": true,
70353
+ "default": "current_timestamp"
70354
+ }
70355
+ },
70356
+ "indexes": [{
70357
+ "name": "gen_client_product_collections_id_idx",
70358
+ "columns": ["id"]
70359
+ }, {
70360
+ "name": "gen_client_product_collections_slug_context_idx",
70361
+ "columns": ["slug", "context"],
70362
+ "unique": true
70363
+ }],
70364
+ "version": "6a3185e6"
70365
+ }
70366
+ },
69592
70367
  "@happyvertical/smrt-core:AdvisorRichProduct": {
69593
70368
  "name": "advisorrichproduct",
69594
70369
  "className": "AdvisorRichProduct",