@happyvertical/smrt-content 0.61.2 → 0.61.4

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 (33) hide show
  1. package/dist/chunks/{content-corrections-QyinPkfN.js → content-corrections-DgJ2duqR.js} +2 -1
  2. package/dist/chunks/content-corrections-DgJ2duqR.js.map +1 -0
  3. package/dist/chunks/content-query-CuPXExps.js +4255 -0
  4. package/dist/chunks/content-query-CuPXExps.js.map +1 -0
  5. package/dist/chunks/{content-reviews-H9ANWEi7.js → content-reviews-mzf5p6fz.js} +2 -1
  6. package/dist/chunks/content-reviews-mzf5p6fz.js.map +1 -0
  7. package/dist/chunks/{content-versions-CfHShbgr.js → content-versions-BlBQY7Rw.js} +3 -2
  8. package/dist/chunks/content-versions-BlBQY7Rw.js.map +1 -0
  9. package/dist/chunks/{contents-CD0lEx8g.js → contents-RG0HLcU1.js} +4 -4
  10. package/dist/chunks/contents-RG0HLcU1.js.map +1 -0
  11. package/dist/content-asset.d.ts.map +1 -1
  12. package/dist/content-contribution-attachment.d.ts.map +1 -1
  13. package/dist/content-contribution-revision.d.ts.map +1 -1
  14. package/dist/content-contribution.d.ts +1 -1
  15. package/dist/content-contribution.d.ts.map +1 -1
  16. package/dist/content-contributor.d.ts.map +1 -1
  17. package/dist/content-correction.d.ts.map +1 -1
  18. package/dist/content-review.d.ts.map +1 -1
  19. package/dist/content-version.d.ts.map +1 -1
  20. package/dist/content.d.ts.map +1 -1
  21. package/dist/contents.d.ts.map +1 -1
  22. package/dist/index.js +43 -17
  23. package/dist/index.js.map +1 -1
  24. package/dist/manifest.json +1520 -477
  25. package/dist/server.js +1 -1
  26. package/dist/smrt-knowledge.json +10 -10
  27. package/package.json +24 -24
  28. package/dist/chunks/content-corrections-QyinPkfN.js.map +0 -1
  29. package/dist/chunks/content-query-D3OONvEr.js +0 -4246
  30. package/dist/chunks/content-query-D3OONvEr.js.map +0 -1
  31. package/dist/chunks/content-reviews-H9ANWEi7.js.map +0 -1
  32. package/dist/chunks/content-versions-CfHShbgr.js.map +0 -1
  33. package/dist/chunks/contents-CD0lEx8g.js.map +0 -1
@@ -2,22 +2,19 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-content",
5
- "packageVersion": "0.61.2",
5
+ "packageVersion": "0.61.4",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-content:ContentAsset": {
8
8
  "name": "contentasset",
9
9
  "className": "ContentAsset",
10
10
  "qualifiedName": "@happyvertical/smrt-content:ContentAsset",
11
11
  "collection": "contentassets",
12
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-asset.ts",
12
+ "filePath": "src/content-asset.ts",
13
13
  "packageName": "@happyvertical/smrt-content",
14
14
  "fields": {
15
15
  "tenantId": {
16
16
  "type": "text",
17
- "required": false,
18
17
  "_meta": {
19
- "sqlType": "UUID",
20
- "nullable": true,
21
18
  "__tenancy": {
22
19
  "isTenantIdField": true,
23
20
  "autoFilter": true,
@@ -27,31 +24,64 @@
27
24
  "mode": "optional",
28
25
  "field": "tenantId",
29
26
  "allowSuperAdminBypass": false
30
- }
31
- }
27
+ },
28
+ "__statedOptions": [
29
+ "sqlType",
30
+ "nullable",
31
+ "__tenancy",
32
+ "required"
33
+ ],
34
+ "sqlType": "UUID",
35
+ "nullable": true,
36
+ "required": false
37
+ },
38
+ "required": false
32
39
  },
33
40
  "contentId": {
34
41
  "type": "foreignKey",
35
- "required": true,
36
- "related": "Content",
37
42
  "_meta": {
38
- "required": true
39
- }
43
+ "__statedOptions": [
44
+ "required",
45
+ "requiredFor",
46
+ "related"
47
+ ],
48
+ "required": true,
49
+ "requiredFor": "identity"
50
+ },
51
+ "required": true,
52
+ "related": "Content"
40
53
  },
41
54
  "assetId": {
42
55
  "type": "crossPackageRef",
56
+ "_meta": {
57
+ "__statedOptions": [
58
+ "required",
59
+ "requiredFor",
60
+ "related"
61
+ ],
62
+ "required": true,
63
+ "requiredFor": "identity"
64
+ },
43
65
  "required": true,
44
66
  "related": "@happyvertical/smrt-assets:Asset"
45
67
  },
46
68
  "relationship": {
47
69
  "type": "text",
48
- "required": true,
49
70
  "_meta": {
71
+ "__statedOptions": [
72
+ "required"
73
+ ],
50
74
  "required": true
51
- }
75
+ },
76
+ "required": true
52
77
  },
53
78
  "sortOrder": {
54
79
  "type": "integer",
80
+ "_meta": {
81
+ "__statedOptions": [
82
+ "default"
83
+ ]
84
+ },
55
85
  "required": true,
56
86
  "default": 0
57
87
  }
@@ -207,7 +237,7 @@
207
237
  "className": "ContentAssetCollection",
208
238
  "qualifiedName": "@happyvertical/smrt-content:ContentAssetCollection",
209
239
  "collection": "contentassets",
210
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-assets.ts",
240
+ "filePath": "src/content-assets.ts",
211
241
  "packageName": "@happyvertical/smrt-content",
212
242
  "fields": {},
213
243
  "methods": {
@@ -446,45 +476,79 @@
446
476
  "className": "ContentContributionAttachment",
447
477
  "qualifiedName": "@happyvertical/smrt-content:ContentContributionAttachment",
448
478
  "collection": "contentcontributionattachments",
449
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution-attachment.ts",
479
+ "filePath": "src/content-contribution-attachment.ts",
450
480
  "packageName": "@happyvertical/smrt-content",
451
481
  "fields": {
452
482
  "contributionId": {
453
483
  "type": "foreignKey",
454
- "required": true,
455
- "related": "ContentContribution",
456
484
  "_meta": {
457
- "required": true
458
- }
485
+ "__statedOptions": [
486
+ "required",
487
+ "requiredFor",
488
+ "related"
489
+ ],
490
+ "required": true,
491
+ "requiredFor": "identity"
492
+ },
493
+ "required": true,
494
+ "related": "ContentContribution"
459
495
  },
460
496
  "revisionId": {
461
497
  "type": "foreignKey",
498
+ "_meta": {
499
+ "__statedOptions": [
500
+ "related"
501
+ ]
502
+ },
462
503
  "required": false,
463
504
  "related": "ContentContributionRevision"
464
505
  },
465
506
  "filename": {
466
507
  "type": "text",
508
+ "_meta": {
509
+ "__statedOptions": []
510
+ },
467
511
  "required": false
468
512
  },
469
513
  "mimeType": {
470
514
  "type": "text",
515
+ "_meta": {
516
+ "__statedOptions": []
517
+ },
471
518
  "required": false
472
519
  },
473
520
  "size": {
474
521
  "type": "integer",
522
+ "_meta": {
523
+ "__statedOptions": [
524
+ "default"
525
+ ]
526
+ },
475
527
  "required": true,
476
528
  "default": 0
477
529
  },
478
530
  "fileKey": {
479
531
  "type": "text",
532
+ "_meta": {
533
+ "__statedOptions": []
534
+ },
480
535
  "required": false
481
536
  },
482
537
  "sourceUri": {
483
538
  "type": "text",
539
+ "_meta": {
540
+ "__statedOptions": []
541
+ },
484
542
  "required": false
485
543
  },
486
544
  "channel": {
487
545
  "type": "text",
546
+ "_meta": {
547
+ "__statedOptions": [
548
+ "default",
549
+ "enum"
550
+ ]
551
+ },
488
552
  "required": false,
489
553
  "default": "web",
490
554
  "enum": [
@@ -494,19 +558,24 @@
494
558
  },
495
559
  "promotedAssetId": {
496
560
  "type": "crossPackageRef",
561
+ "_meta": {
562
+ "__statedOptions": [
563
+ "related"
564
+ ]
565
+ },
497
566
  "required": false,
498
567
  "related": "@happyvertical/smrt-assets:Asset"
499
568
  },
500
569
  "metadata": {
501
570
  "type": "text",
571
+ "_meta": {
572
+ "__statedOptions": []
573
+ },
502
574
  "required": false
503
575
  },
504
576
  "tenantId": {
505
577
  "type": "text",
506
- "required": false,
507
578
  "_meta": {
508
- "sqlType": "UUID",
509
- "nullable": true,
510
579
  "__tenancy": {
511
580
  "isTenantIdField": true,
512
581
  "autoFilter": true,
@@ -516,15 +585,31 @@
516
585
  "mode": "optional",
517
586
  "field": "tenantId",
518
587
  "allowSuperAdminBypass": false
519
- }
520
- }
588
+ },
589
+ "__statedOptions": [
590
+ "sqlType",
591
+ "nullable",
592
+ "__tenancy",
593
+ "required"
594
+ ],
595
+ "sqlType": "UUID",
596
+ "nullable": true,
597
+ "required": false
598
+ },
599
+ "required": false
521
600
  },
522
601
  "createdAt": {
523
602
  "type": "text",
603
+ "_meta": {
604
+ "__statedOptions": []
605
+ },
524
606
  "required": false
525
607
  },
526
608
  "updatedAt": {
527
609
  "type": "text",
610
+ "_meta": {
611
+ "__statedOptions": []
612
+ },
528
613
  "required": false
529
614
  }
530
615
  },
@@ -735,7 +820,7 @@
735
820
  "className": "ContentContributionAttachmentCollection",
736
821
  "qualifiedName": "@happyvertical/smrt-content:ContentContributionAttachmentCollection",
737
822
  "collection": "contentcontributionattachments",
738
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution-attachments.ts",
823
+ "filePath": "src/content-contribution-attachments.ts",
739
824
  "packageName": "@happyvertical/smrt-content",
740
825
  "fields": {},
741
826
  "methods": {
@@ -953,24 +1038,41 @@
953
1038
  "className": "ContentContributionRevision",
954
1039
  "qualifiedName": "@happyvertical/smrt-content:ContentContributionRevision",
955
1040
  "collection": "contentcontributionrevisions",
956
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution-revision.ts",
1041
+ "filePath": "src/content-contribution-revision.ts",
957
1042
  "packageName": "@happyvertical/smrt-content",
958
1043
  "fields": {
959
1044
  "contributionId": {
960
1045
  "type": "foreignKey",
961
- "required": true,
962
- "related": "ContentContribution",
963
1046
  "_meta": {
964
- "required": true
965
- }
1047
+ "__statedOptions": [
1048
+ "required",
1049
+ "requiredFor",
1050
+ "related"
1051
+ ],
1052
+ "required": true,
1053
+ "requiredFor": "identity"
1054
+ },
1055
+ "required": true,
1056
+ "related": "ContentContribution"
966
1057
  },
967
1058
  "revisionNumber": {
968
1059
  "type": "integer",
1060
+ "_meta": {
1061
+ "__statedOptions": [
1062
+ "default"
1063
+ ]
1064
+ },
969
1065
  "required": true,
970
1066
  "default": 1
971
1067
  },
972
1068
  "channel": {
973
1069
  "type": "text",
1070
+ "_meta": {
1071
+ "__statedOptions": [
1072
+ "default",
1073
+ "enum"
1074
+ ]
1075
+ },
974
1076
  "required": false,
975
1077
  "default": "web",
976
1078
  "enum": [
@@ -980,35 +1082,52 @@
980
1082
  },
981
1083
  "title": {
982
1084
  "type": "text",
1085
+ "_meta": {
1086
+ "__statedOptions": []
1087
+ },
983
1088
  "required": false
984
1089
  },
985
1090
  "description": {
986
1091
  "type": "text",
1092
+ "_meta": {
1093
+ "__statedOptions": []
1094
+ },
987
1095
  "required": false
988
1096
  },
989
1097
  "body": {
990
1098
  "type": "text",
1099
+ "_meta": {
1100
+ "__statedOptions": []
1101
+ },
991
1102
  "required": false
992
1103
  },
993
1104
  "sourceMessageId": {
994
1105
  "type": "crossPackageRef",
1106
+ "_meta": {
1107
+ "__statedOptions": [
1108
+ "related"
1109
+ ]
1110
+ },
995
1111
  "required": false,
996
1112
  "related": "@happyvertical/smrt-messages:Message"
997
1113
  },
998
1114
  "sourceThreadKey": {
999
1115
  "type": "text",
1116
+ "_meta": {
1117
+ "__statedOptions": []
1118
+ },
1000
1119
  "required": false
1001
1120
  },
1002
1121
  "metadata": {
1003
1122
  "type": "text",
1123
+ "_meta": {
1124
+ "__statedOptions": []
1125
+ },
1004
1126
  "required": false
1005
1127
  },
1006
1128
  "tenantId": {
1007
1129
  "type": "text",
1008
- "required": false,
1009
1130
  "_meta": {
1010
- "sqlType": "UUID",
1011
- "nullable": true,
1012
1131
  "__tenancy": {
1013
1132
  "isTenantIdField": true,
1014
1133
  "autoFilter": true,
@@ -1018,15 +1137,31 @@
1018
1137
  "mode": "optional",
1019
1138
  "field": "tenantId",
1020
1139
  "allowSuperAdminBypass": false
1021
- }
1022
- }
1140
+ },
1141
+ "__statedOptions": [
1142
+ "sqlType",
1143
+ "nullable",
1144
+ "__tenancy",
1145
+ "required"
1146
+ ],
1147
+ "sqlType": "UUID",
1148
+ "nullable": true,
1149
+ "required": false
1150
+ },
1151
+ "required": false
1023
1152
  },
1024
1153
  "createdAt": {
1025
1154
  "type": "text",
1155
+ "_meta": {
1156
+ "__statedOptions": []
1157
+ },
1026
1158
  "required": false
1027
1159
  },
1028
1160
  "updatedAt": {
1029
1161
  "type": "text",
1162
+ "_meta": {
1163
+ "__statedOptions": []
1164
+ },
1030
1165
  "required": false
1031
1166
  }
1032
1167
  },
@@ -1223,7 +1358,7 @@
1223
1358
  "className": "ContentContributionRevisionCollection",
1224
1359
  "qualifiedName": "@happyvertical/smrt-content:ContentContributionRevisionCollection",
1225
1360
  "collection": "contentcontributionrevisions",
1226
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution-revisions.ts",
1361
+ "filePath": "src/content-contribution-revisions.ts",
1227
1362
  "packageName": "@happyvertical/smrt-content",
1228
1363
  "fields": {},
1229
1364
  "methods": {
@@ -1422,62 +1557,99 @@
1422
1557
  "className": "ContentContributionType",
1423
1558
  "qualifiedName": "@happyvertical/smrt-content:ContentContributionType",
1424
1559
  "collection": "contentcontributiontypes",
1425
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution-type.ts",
1560
+ "filePath": "src/content-contribution-type.ts",
1426
1561
  "packageName": "@happyvertical/smrt-content",
1427
1562
  "fields": {
1428
1563
  "key": {
1429
1564
  "type": "text",
1430
- "required": true,
1431
1565
  "_meta": {
1432
- "required": true
1433
- }
1566
+ "__statedOptions": [
1567
+ "required",
1568
+ "requiredFor"
1569
+ ],
1570
+ "required": true,
1571
+ "requiredFor": "identity"
1572
+ },
1573
+ "required": true
1434
1574
  },
1435
1575
  "label": {
1436
1576
  "type": "text",
1577
+ "_meta": {
1578
+ "__statedOptions": []
1579
+ },
1437
1580
  "required": false
1438
1581
  },
1439
1582
  "enabled": {
1440
1583
  "type": "boolean",
1584
+ "_meta": {
1585
+ "__statedOptions": [
1586
+ "default"
1587
+ ]
1588
+ },
1441
1589
  "required": true,
1442
1590
  "default": true
1443
1591
  },
1444
1592
  "allowedChannels": {
1445
1593
  "type": "text",
1594
+ "_meta": {
1595
+ "__statedOptions": []
1596
+ },
1446
1597
  "required": false
1447
1598
  },
1448
1599
  "allowText": {
1449
1600
  "type": "boolean",
1601
+ "_meta": {
1602
+ "__statedOptions": [
1603
+ "default"
1604
+ ]
1605
+ },
1450
1606
  "required": true,
1451
1607
  "default": true
1452
1608
  },
1453
1609
  "allowFiles": {
1454
1610
  "type": "boolean",
1611
+ "_meta": {
1612
+ "__statedOptions": [
1613
+ "default"
1614
+ ]
1615
+ },
1455
1616
  "required": true,
1456
1617
  "default": false
1457
1618
  },
1458
1619
  "allowEmptyText": {
1459
1620
  "type": "boolean",
1621
+ "_meta": {
1622
+ "__statedOptions": [
1623
+ "default"
1624
+ ]
1625
+ },
1460
1626
  "required": true,
1461
1627
  "default": false
1462
1628
  },
1463
1629
  "intakeRules": {
1464
1630
  "type": "text",
1631
+ "_meta": {
1632
+ "__statedOptions": []
1633
+ },
1465
1634
  "required": false
1466
1635
  },
1467
1636
  "promotion": {
1468
1637
  "type": "text",
1638
+ "_meta": {
1639
+ "__statedOptions": []
1640
+ },
1469
1641
  "required": false
1470
1642
  },
1471
1643
  "metadata": {
1472
1644
  "type": "text",
1645
+ "_meta": {
1646
+ "__statedOptions": []
1647
+ },
1473
1648
  "required": false
1474
1649
  },
1475
1650
  "tenantId": {
1476
1651
  "type": "text",
1477
- "required": false,
1478
1652
  "_meta": {
1479
- "sqlType": "UUID",
1480
- "nullable": true,
1481
1653
  "__tenancy": {
1482
1654
  "isTenantIdField": true,
1483
1655
  "autoFilter": true,
@@ -1487,15 +1659,31 @@
1487
1659
  "mode": "optional",
1488
1660
  "field": "tenantId",
1489
1661
  "allowSuperAdminBypass": false
1490
- }
1491
- }
1662
+ },
1663
+ "__statedOptions": [
1664
+ "sqlType",
1665
+ "nullable",
1666
+ "__tenancy",
1667
+ "required"
1668
+ ],
1669
+ "sqlType": "UUID",
1670
+ "nullable": true,
1671
+ "required": false
1672
+ },
1673
+ "required": false
1492
1674
  },
1493
1675
  "createdAt": {
1494
1676
  "type": "text",
1677
+ "_meta": {
1678
+ "__statedOptions": []
1679
+ },
1495
1680
  "required": false
1496
1681
  },
1497
1682
  "updatedAt": {
1498
1683
  "type": "text",
1684
+ "_meta": {
1685
+ "__statedOptions": []
1686
+ },
1499
1687
  "required": false
1500
1688
  }
1501
1689
  },
@@ -1797,7 +1985,7 @@
1797
1985
  "className": "ContentContributionTypeCollection",
1798
1986
  "qualifiedName": "@happyvertical/smrt-content:ContentContributionTypeCollection",
1799
1987
  "collection": "contentcontributiontypes",
1800
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution-types.ts",
1988
+ "filePath": "src/content-contribution-types.ts",
1801
1989
  "packageName": "@happyvertical/smrt-content",
1802
1990
  "fields": {},
1803
1991
  "methods": {
@@ -1976,36 +2164,54 @@
1976
2164
  "className": "ContentContribution",
1977
2165
  "qualifiedName": "@happyvertical/smrt-content:ContentContribution",
1978
2166
  "collection": "contentcontributions",
1979
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contribution.ts",
2167
+ "filePath": "src/content-contribution.ts",
1980
2168
  "packageName": "@happyvertical/smrt-content",
1981
2169
  "fields": {
1982
2170
  "contributorId": {
1983
2171
  "type": "foreignKey",
1984
- "required": true,
1985
- "related": "ContentContributor",
1986
- "description": "The person who sent this in.",
1987
2172
  "_meta": {
2173
+ "__statedOptions": [
2174
+ "nullable",
2175
+ "description",
2176
+ "related",
2177
+ "required"
2178
+ ],
1988
2179
  "description": "The person who sent this in.",
1989
- "required": true
1990
- }
2180
+ "nullable": true,
2181
+ "required": false
2182
+ },
2183
+ "required": false,
2184
+ "related": "ContentContributor",
2185
+ "description": "The person who sent this in."
1991
2186
  },
1992
2187
  "contributionTypeKey": {
1993
2188
  "type": "text",
1994
- "required": true,
1995
- "description": "What kind of submission it is, such as an article or a letter.",
1996
2189
  "_meta": {
2190
+ "__statedOptions": [
2191
+ "required",
2192
+ "requiredFor",
2193
+ "description"
2194
+ ],
1997
2195
  "required": true,
1998
- "description": "What kind of submission it is, such as an article or a letter."
1999
- }
2196
+ "description": "What kind of submission it is, such as an article or a letter.",
2197
+ "requiredFor": "identity"
2198
+ },
2199
+ "required": true,
2200
+ "description": "What kind of submission it is, such as an article or a letter."
2000
2201
  },
2001
2202
  "status": {
2002
2203
  "type": "text",
2003
- "required": false,
2004
- "default": "submitted",
2005
- "description": "Where the submission stands, from submitted to approved, rejected or published.",
2006
2204
  "_meta": {
2205
+ "__statedOptions": [
2206
+ "description",
2207
+ "default",
2208
+ "enum"
2209
+ ],
2007
2210
  "description": "Where the submission stands, from submitted to approved, rejected or published."
2008
2211
  },
2212
+ "required": false,
2213
+ "default": "submitted",
2214
+ "description": "Where the submission stands, from submitted to approved, rejected or published.",
2009
2215
  "enum": [
2010
2216
  "submitted",
2011
2217
  "quarantined",
@@ -2018,6 +2224,12 @@
2018
2224
  },
2019
2225
  "intakeDecision": {
2020
2226
  "type": "text",
2227
+ "_meta": {
2228
+ "__statedOptions": [
2229
+ "default",
2230
+ "enum"
2231
+ ]
2232
+ },
2021
2233
  "required": false,
2022
2234
  "default": "accepted",
2023
2235
  "enum": [
@@ -2028,12 +2240,17 @@
2028
2240
  },
2029
2241
  "channel": {
2030
2242
  "type": "text",
2031
- "required": false,
2032
- "default": "web",
2033
- "description": "How it arrived: through the website or by email.",
2034
2243
  "_meta": {
2244
+ "__statedOptions": [
2245
+ "description",
2246
+ "default",
2247
+ "enum"
2248
+ ],
2035
2249
  "description": "How it arrived: through the website or by email."
2036
2250
  },
2251
+ "required": false,
2252
+ "default": "web",
2253
+ "description": "How it arrived: through the website or by email.",
2037
2254
  "enum": [
2038
2255
  "web",
2039
2256
  "email"
@@ -2041,101 +2258,154 @@
2041
2258
  },
2042
2259
  "title": {
2043
2260
  "type": "text",
2044
- "required": false,
2045
- "description": "The headline the contributor gave it.",
2046
2261
  "_meta": {
2262
+ "__statedOptions": [
2263
+ "description"
2264
+ ],
2047
2265
  "description": "The headline the contributor gave it."
2048
- }
2266
+ },
2267
+ "required": false,
2268
+ "description": "The headline the contributor gave it."
2049
2269
  },
2050
2270
  "description": {
2051
2271
  "type": "text",
2052
- "required": false,
2053
- "description": "A short summary of the submission.",
2054
2272
  "_meta": {
2273
+ "__statedOptions": [
2274
+ "description"
2275
+ ],
2055
2276
  "description": "A short summary of the submission."
2056
- }
2277
+ },
2278
+ "required": false,
2279
+ "description": "A short summary of the submission."
2057
2280
  },
2058
2281
  "body": {
2059
2282
  "type": "text",
2060
- "required": false,
2061
- "description": "The full text as it was sent in.",
2062
2283
  "_meta": {
2284
+ "__statedOptions": [
2285
+ "description"
2286
+ ],
2063
2287
  "description": "The full text as it was sent in."
2064
- }
2288
+ },
2289
+ "required": false,
2290
+ "description": "The full text as it was sent in."
2065
2291
  },
2066
2292
  "contributorEmail": {
2067
2293
  "type": "text",
2294
+ "_meta": {
2295
+ "__statedOptions": []
2296
+ },
2068
2297
  "required": false
2069
2298
  },
2070
2299
  "contributorName": {
2071
2300
  "type": "text",
2072
- "required": false,
2073
- "description": "The name the contributor gave.",
2074
2301
  "_meta": {
2302
+ "__statedOptions": [
2303
+ "description"
2304
+ ],
2075
2305
  "description": "The name the contributor gave."
2076
- }
2306
+ },
2307
+ "required": false,
2308
+ "description": "The name the contributor gave."
2077
2309
  },
2078
2310
  "threadKey": {
2079
2311
  "type": "text",
2312
+ "_meta": {
2313
+ "__statedOptions": []
2314
+ },
2080
2315
  "required": false
2081
2316
  },
2082
2317
  "sourceMessageId": {
2083
2318
  "type": "crossPackageRef",
2319
+ "_meta": {
2320
+ "__statedOptions": [
2321
+ "related"
2322
+ ]
2323
+ },
2084
2324
  "required": false,
2085
2325
  "related": "@happyvertical/smrt-messages:Message"
2086
2326
  },
2087
2327
  "editorNotes": {
2088
2328
  "type": "text",
2089
- "required": false,
2090
- "description": "Notes from your team about this submission.",
2091
2329
  "_meta": {
2330
+ "__statedOptions": [
2331
+ "description"
2332
+ ],
2092
2333
  "description": "Notes from your team about this submission."
2093
- }
2334
+ },
2335
+ "required": false,
2336
+ "description": "Notes from your team about this submission."
2094
2337
  },
2095
2338
  "promotedContentId": {
2096
2339
  "type": "foreignKey",
2097
- "required": false,
2098
- "related": "Content",
2099
2340
  "_meta": {
2341
+ "__statedOptions": [
2342
+ "nullable",
2343
+ "onDelete",
2344
+ "related",
2345
+ "required"
2346
+ ],
2100
2347
  "nullable": true,
2101
- "onDelete": "SET NULL"
2102
- }
2348
+ "onDelete": "SET NULL",
2349
+ "required": false
2350
+ },
2351
+ "required": false,
2352
+ "related": "Content"
2103
2353
  },
2104
2354
  "revisionCount": {
2105
2355
  "type": "integer",
2356
+ "_meta": {
2357
+ "__statedOptions": [
2358
+ "default"
2359
+ ]
2360
+ },
2106
2361
  "required": true,
2107
2362
  "default": 0
2108
2363
  },
2109
2364
  "approvedAt": {
2110
2365
  "type": "datetime",
2366
+ "_meta": {
2367
+ "__statedOptions": []
2368
+ },
2111
2369
  "required": false
2112
2370
  },
2113
2371
  "promotedAt": {
2114
2372
  "type": "datetime",
2373
+ "_meta": {
2374
+ "__statedOptions": []
2375
+ },
2115
2376
  "required": false
2116
2377
  },
2117
2378
  "rejectedAt": {
2118
2379
  "type": "datetime",
2380
+ "_meta": {
2381
+ "__statedOptions": []
2382
+ },
2119
2383
  "required": false
2120
2384
  },
2121
2385
  "withdrawnAt": {
2122
2386
  "type": "datetime",
2387
+ "_meta": {
2388
+ "__statedOptions": []
2389
+ },
2123
2390
  "required": false
2124
2391
  },
2125
2392
  "requestedChangesAt": {
2126
2393
  "type": "datetime",
2394
+ "_meta": {
2395
+ "__statedOptions": []
2396
+ },
2127
2397
  "required": false
2128
2398
  },
2129
2399
  "metadata": {
2130
2400
  "type": "text",
2401
+ "_meta": {
2402
+ "__statedOptions": []
2403
+ },
2131
2404
  "required": false
2132
2405
  },
2133
2406
  "tenantId": {
2134
2407
  "type": "text",
2135
- "required": false,
2136
2408
  "_meta": {
2137
- "sqlType": "UUID",
2138
- "nullable": true,
2139
2409
  "__tenancy": {
2140
2410
  "isTenantIdField": true,
2141
2411
  "autoFilter": true,
@@ -2145,15 +2415,31 @@
2145
2415
  "mode": "optional",
2146
2416
  "field": "tenantId",
2147
2417
  "allowSuperAdminBypass": false
2148
- }
2149
- }
2418
+ },
2419
+ "__statedOptions": [
2420
+ "sqlType",
2421
+ "nullable",
2422
+ "__tenancy",
2423
+ "required"
2424
+ ],
2425
+ "sqlType": "UUID",
2426
+ "nullable": true,
2427
+ "required": false
2428
+ },
2429
+ "required": false
2150
2430
  },
2151
2431
  "createdAt": {
2152
2432
  "type": "text",
2433
+ "_meta": {
2434
+ "__statedOptions": []
2435
+ },
2153
2436
  "required": false
2154
2437
  },
2155
2438
  "updatedAt": {
2156
2439
  "type": "text",
2440
+ "_meta": {
2441
+ "__statedOptions": []
2442
+ },
2157
2443
  "required": false
2158
2444
  }
2159
2445
  },
@@ -2371,11 +2657,6 @@
2371
2657
  "collectionExportName": "ContentContributionCollection",
2372
2658
  "displayLabelField": "title",
2373
2659
  "validationRules": [
2374
- {
2375
- "field": "contributorId",
2376
- "rule": "required",
2377
- "fieldType": "foreignKey"
2378
- },
2379
2660
  {
2380
2661
  "field": "contributionTypeKey",
2381
2662
  "rule": "required",
@@ -2389,7 +2670,7 @@
2389
2670
  ],
2390
2671
  "schema": {
2391
2672
  "tableName": "content_contributions",
2392
- "ddl": "CREATE TABLE IF NOT EXISTS \"content_contributions\" (\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 \"contributor_id\" UUID NOT NULL,\n \"contribution_type_key\" TEXT NOT NULL,\n \"status\" TEXT DEFAULT 'submitted',\n \"intake_decision\" TEXT DEFAULT 'accepted',\n \"channel\" TEXT DEFAULT 'web',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"contributor_email\" TEXT,\n \"contributor_name\" TEXT,\n \"thread_key\" TEXT,\n \"source_message_id\" UUID,\n \"editor_notes\" TEXT,\n \"promoted_content_id\" UUID,\n \"revision_count\" INTEGER NOT NULL DEFAULT 0,\n \"approved_at\" TIMESTAMP,\n \"promoted_at\" TIMESTAMP,\n \"rejected_at\" TIMESTAMP,\n \"withdrawn_at\" TIMESTAMP,\n \"requested_changes_at\" TIMESTAMP,\n \"metadata\" TEXT,\n \"tenant_id\" UUID\n);",
2673
+ "ddl": "CREATE TABLE IF NOT EXISTS \"content_contributions\" (\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 \"contributor_id\" UUID,\n \"contribution_type_key\" TEXT NOT NULL,\n \"status\" TEXT DEFAULT 'submitted',\n \"intake_decision\" TEXT DEFAULT 'accepted',\n \"channel\" TEXT DEFAULT 'web',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"contributor_email\" TEXT,\n \"contributor_name\" TEXT,\n \"thread_key\" TEXT,\n \"source_message_id\" UUID,\n \"editor_notes\" TEXT,\n \"promoted_content_id\" UUID,\n \"revision_count\" INTEGER NOT NULL DEFAULT 0,\n \"approved_at\" TIMESTAMP,\n \"promoted_at\" TIMESTAMP,\n \"rejected_at\" TIMESTAMP,\n \"withdrawn_at\" TIMESTAMP,\n \"requested_changes_at\" TIMESTAMP,\n \"metadata\" TEXT,\n \"tenant_id\" UUID\n);",
2393
2674
  "columns": {
2394
2675
  "_sync_origin_device_id": {
2395
2676
  "type": "TEXT"
@@ -2425,7 +2706,7 @@
2425
2706
  "contributor_id": {
2426
2707
  "type": "UUID",
2427
2708
  "referenceKind": "foreignKey",
2428
- "notNull": true,
2709
+ "notNull": false,
2429
2710
  "unique": false,
2430
2711
  "foreignKey": {
2431
2712
  "table": "content_contributors",
@@ -2587,7 +2868,7 @@
2587
2868
  ]
2588
2869
  }
2589
2870
  ],
2590
- "version": "5ab96a24"
2871
+ "version": "550c1f7d"
2591
2872
  },
2592
2873
  "importPath": "@happyvertical/smrt-content"
2593
2874
  },
@@ -2596,7 +2877,7 @@
2596
2877
  "className": "ContentContributions",
2597
2878
  "qualifiedName": "@happyvertical/smrt-content:ContentContributions",
2598
2879
  "collection": "contentcontributions",
2599
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contributions.ts",
2880
+ "filePath": "src/content-contributions.ts",
2600
2881
  "packageName": "@happyvertical/smrt-content",
2601
2882
  "fields": {},
2602
2883
  "methods": {
@@ -2730,7 +3011,7 @@
2730
3011
  "collectionOf": "@happyvertical/smrt-content:ContentContribution",
2731
3012
  "schema": {
2732
3013
  "tableName": "content_contributions",
2733
- "ddl": "CREATE TABLE IF NOT EXISTS \"content_contributions\" (\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 \"contributor_id\" UUID NOT NULL,\n \"contribution_type_key\" TEXT NOT NULL,\n \"status\" TEXT DEFAULT 'submitted',\n \"intake_decision\" TEXT DEFAULT 'accepted',\n \"channel\" TEXT DEFAULT 'web',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"contributor_email\" TEXT,\n \"contributor_name\" TEXT,\n \"thread_key\" TEXT,\n \"source_message_id\" UUID,\n \"editor_notes\" TEXT,\n \"promoted_content_id\" UUID,\n \"revision_count\" INTEGER NOT NULL DEFAULT 0,\n \"approved_at\" TIMESTAMP,\n \"promoted_at\" TIMESTAMP,\n \"rejected_at\" TIMESTAMP,\n \"withdrawn_at\" TIMESTAMP,\n \"requested_changes_at\" TIMESTAMP,\n \"metadata\" TEXT,\n \"tenant_id\" UUID\n);",
3014
+ "ddl": "CREATE TABLE IF NOT EXISTS \"content_contributions\" (\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 \"contributor_id\" UUID,\n \"contribution_type_key\" TEXT NOT NULL,\n \"status\" TEXT DEFAULT 'submitted',\n \"intake_decision\" TEXT DEFAULT 'accepted',\n \"channel\" TEXT DEFAULT 'web',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"contributor_email\" TEXT,\n \"contributor_name\" TEXT,\n \"thread_key\" TEXT,\n \"source_message_id\" UUID,\n \"editor_notes\" TEXT,\n \"promoted_content_id\" UUID,\n \"revision_count\" INTEGER NOT NULL DEFAULT 0,\n \"approved_at\" TIMESTAMP,\n \"promoted_at\" TIMESTAMP,\n \"rejected_at\" TIMESTAMP,\n \"withdrawn_at\" TIMESTAMP,\n \"requested_changes_at\" TIMESTAMP,\n \"metadata\" TEXT,\n \"tenant_id\" UUID\n);",
2734
3015
  "columns": {
2735
3016
  "_sync_origin_device_id": {
2736
3017
  "type": "TEXT"
@@ -2766,7 +3047,7 @@
2766
3047
  "contributor_id": {
2767
3048
  "type": "UUID",
2768
3049
  "referenceKind": "foreignKey",
2769
- "notNull": true,
3050
+ "notNull": false,
2770
3051
  "unique": false,
2771
3052
  "foreignKey": {
2772
3053
  "table": "content_contributors",
@@ -2928,7 +3209,7 @@
2928
3209
  ]
2929
3210
  }
2930
3211
  ],
2931
- "version": "5ab96a24"
3212
+ "version": "550c1f7d"
2932
3213
  },
2933
3214
  "importPath": "@happyvertical/smrt-content"
2934
3215
  },
@@ -2937,39 +3218,58 @@
2937
3218
  "className": "ContentContributor",
2938
3219
  "qualifiedName": "@happyvertical/smrt-content:ContentContributor",
2939
3220
  "collection": "contentcontributors",
2940
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contributor.ts",
3221
+ "filePath": "src/content-contributor.ts",
2941
3222
  "packageName": "@happyvertical/smrt-content",
2942
3223
  "fields": {
2943
3224
  "profileId": {
2944
3225
  "type": "crossPackageRef",
3226
+ "_meta": {
3227
+ "__statedOptions": [
3228
+ "related"
3229
+ ]
3230
+ },
2945
3231
  "required": false,
2946
3232
  "related": "@happyvertical/smrt-profiles:Profile"
2947
3233
  },
2948
3234
  "email": {
2949
3235
  "type": "text",
2950
- "required": true,
2951
- "description": "The email address the contributor writes in from.",
2952
3236
  "_meta": {
3237
+ "__statedOptions": [
3238
+ "required",
3239
+ "requiredFor",
3240
+ "description"
3241
+ ],
2953
3242
  "required": true,
2954
- "description": "The email address the contributor writes in from."
2955
- }
3243
+ "description": "The email address the contributor writes in from.",
3244
+ "requiredFor": "identity"
3245
+ },
3246
+ "required": true,
3247
+ "description": "The email address the contributor writes in from."
2956
3248
  },
2957
3249
  "name": {
2958
3250
  "type": "text",
2959
- "required": false,
2960
- "description": "The name the contributor goes by.",
2961
3251
  "_meta": {
3252
+ "__statedOptions": [
3253
+ "description"
3254
+ ],
2962
3255
  "description": "The name the contributor goes by."
2963
- }
3256
+ },
3257
+ "required": false,
3258
+ "description": "The name the contributor goes by."
2964
3259
  },
2965
3260
  "trustLevel": {
2966
3261
  "type": "text",
2967
- "required": false,
2968
- "default": "standard",
2969
- "description": "How far you trust what they send in: standard, trusted or blocked.",
2970
3262
  "_meta": {
3263
+ "__statedOptions": [
3264
+ "description",
3265
+ "default",
3266
+ "enum"
3267
+ ],
2971
3268
  "description": "How far you trust what they send in: standard, trusted or blocked."
2972
3269
  },
3270
+ "required": false,
3271
+ "default": "standard",
3272
+ "description": "How far you trust what they send in: standard, trusted or blocked.",
2973
3273
  "enum": [
2974
3274
  "standard",
2975
3275
  "trusted",
@@ -2978,14 +3278,14 @@
2978
3278
  },
2979
3279
  "metadata": {
2980
3280
  "type": "text",
3281
+ "_meta": {
3282
+ "__statedOptions": []
3283
+ },
2981
3284
  "required": false
2982
3285
  },
2983
3286
  "tenantId": {
2984
3287
  "type": "text",
2985
- "required": false,
2986
3288
  "_meta": {
2987
- "sqlType": "UUID",
2988
- "nullable": true,
2989
3289
  "__tenancy": {
2990
3290
  "isTenantIdField": true,
2991
3291
  "autoFilter": true,
@@ -2995,15 +3295,31 @@
2995
3295
  "mode": "optional",
2996
3296
  "field": "tenantId",
2997
3297
  "allowSuperAdminBypass": false
2998
- }
2999
- }
3298
+ },
3299
+ "__statedOptions": [
3300
+ "sqlType",
3301
+ "nullable",
3302
+ "__tenancy",
3303
+ "required"
3304
+ ],
3305
+ "sqlType": "UUID",
3306
+ "nullable": true,
3307
+ "required": false
3308
+ },
3309
+ "required": false
3000
3310
  },
3001
3311
  "createdAt": {
3002
3312
  "type": "text",
3313
+ "_meta": {
3314
+ "__statedOptions": []
3315
+ },
3003
3316
  "required": false
3004
3317
  },
3005
3318
  "updatedAt": {
3006
3319
  "type": "text",
3320
+ "_meta": {
3321
+ "__statedOptions": []
3322
+ },
3007
3323
  "required": false
3008
3324
  }
3009
3325
  },
@@ -3182,7 +3498,7 @@
3182
3498
  "className": "ContentContributorCollection",
3183
3499
  "qualifiedName": "@happyvertical/smrt-content:ContentContributorCollection",
3184
3500
  "collection": "contentcontributors",
3185
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-contributors.ts",
3501
+ "filePath": "src/content-contributors.ts",
3186
3502
  "packageName": "@happyvertical/smrt-content",
3187
3503
  "fields": {},
3188
3504
  "methods": {
@@ -3384,46 +3700,73 @@
3384
3700
  "className": "ContentCorrection",
3385
3701
  "qualifiedName": "@happyvertical/smrt-content:ContentCorrection",
3386
3702
  "collection": "contentcorrections",
3387
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-correction.ts",
3703
+ "filePath": "src/content-correction.ts",
3388
3704
  "packageName": "@happyvertical/smrt-content",
3389
3705
  "fields": {
3390
3706
  "contentId": {
3391
3707
  "type": "foreignKey",
3392
- "required": true,
3393
- "related": "Content",
3394
- "description": "The piece being corrected.",
3395
3708
  "_meta": {
3396
- "description": "The piece being corrected.",
3709
+ "__statedOptions": [
3710
+ "required",
3711
+ "requiredFor",
3712
+ "onDelete",
3713
+ "description",
3714
+ "related"
3715
+ ],
3397
3716
  "required": true,
3717
+ "description": "The piece being corrected.",
3718
+ "requiredFor": "identity",
3398
3719
  "onDelete": "CASCADE"
3399
- }
3720
+ },
3721
+ "required": true,
3722
+ "related": "Content",
3723
+ "description": "The piece being corrected."
3400
3724
  },
3401
3725
  "contentVersionId": {
3402
3726
  "type": "foreignKey",
3403
- "required": false,
3404
- "related": "ContentVersion",
3405
3727
  "_meta": {
3728
+ "__statedOptions": [
3729
+ "onDelete",
3730
+ "related"
3731
+ ],
3406
3732
  "onDelete": "CASCADE"
3407
- }
3733
+ },
3734
+ "required": false,
3735
+ "related": "ContentVersion"
3408
3736
  },
3409
3737
  "factId": {
3410
3738
  "type": "crossPackageRef",
3739
+ "_meta": {
3740
+ "__statedOptions": [
3741
+ "related"
3742
+ ]
3743
+ },
3411
3744
  "required": false,
3412
3745
  "related": "@happyvertical/smrt-facts:Fact"
3413
3746
  },
3414
3747
  "replacementFactId": {
3415
3748
  "type": "crossPackageRef",
3749
+ "_meta": {
3750
+ "__statedOptions": [
3751
+ "related"
3752
+ ]
3753
+ },
3416
3754
  "required": false,
3417
3755
  "related": "@happyvertical/smrt-facts:Fact"
3418
3756
  },
3419
3757
  "correctionType": {
3420
3758
  "type": "text",
3421
- "required": false,
3422
- "default": "fact",
3423
- "description": "What kind of mistake it fixes: a fact, a safety concern, wording or something else.",
3424
3759
  "_meta": {
3760
+ "__statedOptions": [
3761
+ "description",
3762
+ "default",
3763
+ "enum"
3764
+ ],
3425
3765
  "description": "What kind of mistake it fixes: a fact, a safety concern, wording or something else."
3426
3766
  },
3767
+ "required": false,
3768
+ "default": "fact",
3769
+ "description": "What kind of mistake it fixes: a fact, a safety concern, wording or something else.",
3427
3770
  "enum": [
3428
3771
  "fact",
3429
3772
  "safety",
@@ -3433,12 +3776,17 @@
3433
3776
  },
3434
3777
  "status": {
3435
3778
  "type": "text",
3436
- "required": false,
3437
- "default": "draft",
3438
- "description": "Where the correction stands: a draft, published or retracted.",
3439
3779
  "_meta": {
3780
+ "__statedOptions": [
3781
+ "description",
3782
+ "default",
3783
+ "enum"
3784
+ ],
3440
3785
  "description": "Where the correction stands: a draft, published or retracted."
3441
3786
  },
3787
+ "required": false,
3788
+ "default": "draft",
3789
+ "description": "Where the correction stands: a draft, published or retracted.",
3442
3790
  "enum": [
3443
3791
  "draft",
3444
3792
  "published",
@@ -3447,46 +3795,58 @@
3447
3795
  },
3448
3796
  "summary": {
3449
3797
  "type": "text",
3450
- "required": false,
3451
- "description": "A short note on what was wrong and how it was fixed.",
3452
3798
  "_meta": {
3799
+ "__statedOptions": [
3800
+ "description"
3801
+ ],
3453
3802
  "description": "A short note on what was wrong and how it was fixed."
3454
- }
3803
+ },
3804
+ "required": false,
3805
+ "description": "A short note on what was wrong and how it was fixed."
3455
3806
  },
3456
3807
  "incorrectText": {
3457
3808
  "type": "text",
3458
- "required": false,
3459
- "description": "The wording that was wrong.",
3460
3809
  "_meta": {
3810
+ "__statedOptions": [
3811
+ "description"
3812
+ ],
3461
3813
  "description": "The wording that was wrong."
3462
- }
3814
+ },
3815
+ "required": false,
3816
+ "description": "The wording that was wrong."
3463
3817
  },
3464
3818
  "correctedText": {
3465
3819
  "type": "text",
3466
- "required": false,
3467
- "description": "The wording that replaces it.",
3468
3820
  "_meta": {
3821
+ "__statedOptions": [
3822
+ "description"
3823
+ ],
3469
3824
  "description": "The wording that replaces it."
3470
- }
3825
+ },
3826
+ "required": false,
3827
+ "description": "The wording that replaces it."
3471
3828
  },
3472
3829
  "publicNote": {
3473
3830
  "type": "text",
3474
- "required": false,
3475
- "description": "The note readers see about this correction.",
3476
3831
  "_meta": {
3832
+ "__statedOptions": [
3833
+ "description"
3834
+ ],
3477
3835
  "description": "The note readers see about this correction."
3478
- }
3836
+ },
3837
+ "required": false,
3838
+ "description": "The note readers see about this correction."
3479
3839
  },
3480
3840
  "metadata": {
3481
3841
  "type": "text",
3842
+ "_meta": {
3843
+ "__statedOptions": []
3844
+ },
3482
3845
  "required": false
3483
3846
  },
3484
3847
  "tenantId": {
3485
3848
  "type": "text",
3486
- "required": false,
3487
3849
  "_meta": {
3488
- "sqlType": "UUID",
3489
- "nullable": true,
3490
3850
  "__tenancy": {
3491
3851
  "isTenantIdField": true,
3492
3852
  "autoFilter": true,
@@ -3496,23 +3856,42 @@
3496
3856
  "mode": "optional",
3497
3857
  "field": "tenantId",
3498
3858
  "allowSuperAdminBypass": false
3499
- }
3500
- }
3859
+ },
3860
+ "__statedOptions": [
3861
+ "sqlType",
3862
+ "nullable",
3863
+ "__tenancy",
3864
+ "required"
3865
+ ],
3866
+ "sqlType": "UUID",
3867
+ "nullable": true,
3868
+ "required": false
3869
+ },
3870
+ "required": false
3501
3871
  },
3502
3872
  "publishedAt": {
3503
3873
  "type": "datetime",
3504
- "required": false,
3505
- "description": "When the correction was made public.",
3506
3874
  "_meta": {
3875
+ "__statedOptions": [
3876
+ "description"
3877
+ ],
3507
3878
  "description": "When the correction was made public."
3508
- }
3879
+ },
3880
+ "required": false,
3881
+ "description": "When the correction was made public."
3509
3882
  },
3510
3883
  "createdAt": {
3511
3884
  "type": "text",
3885
+ "_meta": {
3886
+ "__statedOptions": []
3887
+ },
3512
3888
  "required": false
3513
3889
  },
3514
3890
  "updatedAt": {
3515
3891
  "type": "text",
3892
+ "_meta": {
3893
+ "__statedOptions": []
3894
+ },
3516
3895
  "required": false
3517
3896
  }
3518
3897
  },
@@ -3738,7 +4117,7 @@
3738
4117
  "className": "ContentCorrectionCollection",
3739
4118
  "qualifiedName": "@happyvertical/smrt-content:ContentCorrectionCollection",
3740
4119
  "collection": "contentcorrections",
3741
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-corrections.ts",
4120
+ "filePath": "src/content-corrections.ts",
3742
4121
  "packageName": "@happyvertical/smrt-content",
3743
4122
  "fields": {},
3744
4123
  "methods": {
@@ -3986,15 +4365,12 @@
3986
4365
  "className": "ContentFeedSource",
3987
4366
  "qualifiedName": "@happyvertical/smrt-content:ContentFeedSource",
3988
4367
  "collection": "contentfeedsources",
3989
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-feed-source.ts",
4368
+ "filePath": "src/content-feed-source.ts",
3990
4369
  "packageName": "@happyvertical/smrt-content",
3991
4370
  "fields": {
3992
4371
  "tenantId": {
3993
4372
  "type": "text",
3994
- "required": false,
3995
4373
  "_meta": {
3996
- "sqlType": "UUID",
3997
- "nullable": true,
3998
4374
  "__tenancy": {
3999
4375
  "isTenantIdField": true,
4000
4376
  "autoFilter": true,
@@ -4004,29 +4380,52 @@
4004
4380
  "mode": "optional",
4005
4381
  "field": "tenantId",
4006
4382
  "allowSuperAdminBypass": false
4007
- }
4008
- }
4383
+ },
4384
+ "__statedOptions": [
4385
+ "sqlType",
4386
+ "nullable",
4387
+ "__tenancy",
4388
+ "required"
4389
+ ],
4390
+ "sqlType": "UUID",
4391
+ "nullable": true,
4392
+ "required": false
4393
+ },
4394
+ "required": false
4009
4395
  },
4010
4396
  "name": {
4011
4397
  "type": "text",
4012
- "required": true,
4013
4398
  "_meta": {
4014
- "required": true
4015
- }
4399
+ "__statedOptions": []
4400
+ },
4401
+ "required": false
4016
4402
  },
4017
4403
  "feedUrl": {
4018
4404
  "type": "text",
4019
- "required": true,
4020
4405
  "_meta": {
4021
- "required": true
4022
- }
4406
+ "__statedOptions": [
4407
+ "required",
4408
+ "requiredFor"
4409
+ ],
4410
+ "required": true,
4411
+ "requiredFor": "identity"
4412
+ },
4413
+ "required": true
4023
4414
  },
4024
4415
  "homepageUrl": {
4025
4416
  "type": "text",
4417
+ "_meta": {
4418
+ "__statedOptions": []
4419
+ },
4026
4420
  "required": false
4027
4421
  },
4028
4422
  "format": {
4029
4423
  "type": "text",
4424
+ "_meta": {
4425
+ "__statedOptions": [
4426
+ "enum"
4427
+ ]
4428
+ },
4030
4429
  "required": false,
4031
4430
  "enum": [
4032
4431
  "rss",
@@ -4035,12 +4434,17 @@
4035
4434
  },
4036
4435
  "status": {
4037
4436
  "type": "text",
4038
- "required": true,
4039
- "default": "active",
4040
4437
  "_meta": {
4438
+ "__statedOptions": [
4439
+ "required",
4440
+ "default",
4441
+ "enum"
4442
+ ],
4041
4443
  "required": true,
4042
4444
  "default": "active"
4043
4445
  },
4446
+ "required": true,
4447
+ "default": "active",
4044
4448
  "enum": [
4045
4449
  "active",
4046
4450
  "paused",
@@ -4050,48 +4454,85 @@
4050
4454
  },
4051
4455
  "defaultCategory": {
4052
4456
  "type": "text",
4457
+ "_meta": {
4458
+ "__statedOptions": []
4459
+ },
4053
4460
  "required": false
4054
4461
  },
4055
4462
  "sourceGroup": {
4056
4463
  "type": "text",
4464
+ "_meta": {
4465
+ "__statedOptions": []
4466
+ },
4057
4467
  "required": false
4058
4468
  },
4059
4469
  "pollIntervalMinutes": {
4060
4470
  "type": "integer",
4471
+ "_meta": {
4472
+ "__statedOptions": [
4473
+ "default"
4474
+ ]
4475
+ },
4061
4476
  "required": true,
4062
4477
  "default": 15
4063
4478
  },
4064
4479
  "etag": {
4065
4480
  "type": "text",
4481
+ "_meta": {
4482
+ "__statedOptions": []
4483
+ },
4066
4484
  "required": false
4067
4485
  },
4068
4486
  "lastModified": {
4069
4487
  "type": "text",
4488
+ "_meta": {
4489
+ "__statedOptions": []
4490
+ },
4070
4491
  "required": false
4071
4492
  },
4072
4493
  "lastFetchedAt": {
4073
4494
  "type": "datetime",
4495
+ "_meta": {
4496
+ "__statedOptions": []
4497
+ },
4074
4498
  "required": false
4075
4499
  },
4076
4500
  "lastSuccessAt": {
4077
4501
  "type": "datetime",
4502
+ "_meta": {
4503
+ "__statedOptions": []
4504
+ },
4078
4505
  "required": false
4079
4506
  },
4080
4507
  "lastError": {
4081
4508
  "type": "text",
4509
+ "_meta": {
4510
+ "__statedOptions": []
4511
+ },
4082
4512
  "required": false
4083
4513
  },
4084
4514
  "metadata": {
4085
4515
  "type": "json",
4516
+ "_meta": {
4517
+ "__statedOptions": [
4518
+ "default"
4519
+ ]
4520
+ },
4086
4521
  "required": false,
4087
4522
  "default": {}
4088
4523
  },
4089
4524
  "createdAt": {
4090
4525
  "type": "text",
4526
+ "_meta": {
4527
+ "__statedOptions": []
4528
+ },
4091
4529
  "required": false
4092
4530
  },
4093
4531
  "updatedAt": {
4094
4532
  "type": "text",
4533
+ "_meta": {
4534
+ "__statedOptions": []
4535
+ },
4095
4536
  "required": false
4096
4537
  }
4097
4538
  },
@@ -4210,11 +4651,6 @@
4210
4651
  "collectionExportName": "ContentFeedSourceCollection",
4211
4652
  "displayLabelField": "name",
4212
4653
  "validationRules": [
4213
- {
4214
- "field": "name",
4215
- "rule": "required",
4216
- "fieldType": "text"
4217
- },
4218
4654
  {
4219
4655
  "field": "feedUrl",
4220
4656
  "rule": "required",
@@ -4233,7 +4669,7 @@
4233
4669
  ],
4234
4670
  "schema": {
4235
4671
  "tableName": "content_feed_sources",
4236
- "ddl": "CREATE TABLE IF NOT EXISTS \"content_feed_sources\" (\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,\n \"name\" TEXT NOT NULL,\n \"feed_url\" TEXT NOT NULL,\n \"homepage_url\" TEXT,\n \"format\" TEXT,\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"default_category\" TEXT,\n \"source_group\" TEXT,\n \"poll_interval_minutes\" INTEGER NOT NULL DEFAULT 15,\n \"etag\" TEXT,\n \"last_modified\" TEXT,\n \"last_fetched_at\" TIMESTAMP,\n \"last_success_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"metadata\" JSON DEFAULT '{}'\n);",
4672
+ "ddl": "CREATE TABLE IF NOT EXISTS \"content_feed_sources\" (\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,\n \"name\" TEXT,\n \"feed_url\" TEXT NOT NULL,\n \"homepage_url\" TEXT,\n \"format\" TEXT,\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"default_category\" TEXT,\n \"source_group\" TEXT,\n \"poll_interval_minutes\" INTEGER NOT NULL DEFAULT 15,\n \"etag\" TEXT,\n \"last_modified\" TEXT,\n \"last_fetched_at\" TIMESTAMP,\n \"last_success_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"metadata\" JSON DEFAULT '{}'\n);",
4237
4673
  "columns": {
4238
4674
  "_sync_origin_device_id": {
4239
4675
  "type": "TEXT"
@@ -4274,7 +4710,7 @@
4274
4710
  },
4275
4711
  "name": {
4276
4712
  "type": "TEXT",
4277
- "notNull": true,
4713
+ "notNull": false,
4278
4714
  "unique": false
4279
4715
  },
4280
4716
  "feed_url": {
@@ -4371,7 +4807,7 @@
4371
4807
  ]
4372
4808
  }
4373
4809
  ],
4374
- "version": "640bbfbf"
4810
+ "version": "dfc2166a"
4375
4811
  },
4376
4812
  "importPath": "@happyvertical/smrt-content"
4377
4813
  },
@@ -4380,7 +4816,7 @@
4380
4816
  "className": "ContentFeedSourceCollection",
4381
4817
  "qualifiedName": "@happyvertical/smrt-content:ContentFeedSourceCollection",
4382
4818
  "collection": "contentfeedsources",
4383
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-feed-sources.ts",
4819
+ "filePath": "src/content-feed-sources.ts",
4384
4820
  "packageName": "@happyvertical/smrt-content",
4385
4821
  "fields": {},
4386
4822
  "methods": {
@@ -4493,7 +4929,7 @@
4493
4929
  ],
4494
4930
  "schema": {
4495
4931
  "tableName": "content_feed_sources",
4496
- "ddl": "CREATE TABLE IF NOT EXISTS \"content_feed_sources\" (\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,\n \"name\" TEXT NOT NULL,\n \"feed_url\" TEXT NOT NULL,\n \"homepage_url\" TEXT,\n \"format\" TEXT,\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"default_category\" TEXT,\n \"source_group\" TEXT,\n \"poll_interval_minutes\" INTEGER NOT NULL DEFAULT 15,\n \"etag\" TEXT,\n \"last_modified\" TEXT,\n \"last_fetched_at\" TIMESTAMP,\n \"last_success_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"metadata\" JSON DEFAULT '{}'\n);",
4932
+ "ddl": "CREATE TABLE IF NOT EXISTS \"content_feed_sources\" (\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,\n \"name\" TEXT,\n \"feed_url\" TEXT NOT NULL,\n \"homepage_url\" TEXT,\n \"format\" TEXT,\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"default_category\" TEXT,\n \"source_group\" TEXT,\n \"poll_interval_minutes\" INTEGER NOT NULL DEFAULT 15,\n \"etag\" TEXT,\n \"last_modified\" TEXT,\n \"last_fetched_at\" TIMESTAMP,\n \"last_success_at\" TIMESTAMP,\n \"last_error\" TEXT,\n \"metadata\" JSON DEFAULT '{}'\n);",
4497
4933
  "columns": {
4498
4934
  "_sync_origin_device_id": {
4499
4935
  "type": "TEXT"
@@ -4534,7 +4970,7 @@
4534
4970
  },
4535
4971
  "name": {
4536
4972
  "type": "TEXT",
4537
- "notNull": true,
4973
+ "notNull": false,
4538
4974
  "unique": false
4539
4975
  },
4540
4976
  "feed_url": {
@@ -4631,7 +5067,7 @@
4631
5067
  ]
4632
5068
  }
4633
5069
  ],
4634
- "version": "640bbfbf"
5070
+ "version": "dfc2166a"
4635
5071
  },
4636
5072
  "importPath": "@happyvertical/smrt-content"
4637
5073
  },
@@ -4640,74 +5076,121 @@
4640
5076
  "className": "ContentGovernanceAssignment",
4641
5077
  "qualifiedName": "@happyvertical/smrt-content:ContentGovernanceAssignment",
4642
5078
  "collection": "contentgovernanceassignments",
4643
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-governance-assignment.ts",
5079
+ "filePath": "src/content-governance-assignment.ts",
4644
5080
  "packageName": "@happyvertical/smrt-content",
4645
5081
  "fields": {
4646
5082
  "key": {
4647
5083
  "type": "text",
4648
- "required": true,
4649
5084
  "_meta": {
4650
- "required": true
4651
- }
5085
+ "__statedOptions": [
5086
+ "required",
5087
+ "requiredFor"
5088
+ ],
5089
+ "required": true,
5090
+ "requiredFor": "identity"
5091
+ },
5092
+ "required": true
4652
5093
  },
4653
5094
  "label": {
4654
5095
  "type": "text",
5096
+ "_meta": {
5097
+ "__statedOptions": []
5098
+ },
4655
5099
  "required": false
4656
5100
  },
4657
5101
  "contentType": {
4658
5102
  "type": "text",
4659
- "required": true,
4660
5103
  "_meta": {
4661
- "required": true
4662
- }
5104
+ "__statedOptions": [
5105
+ "required",
5106
+ "requiredFor"
5107
+ ],
5108
+ "required": true,
5109
+ "requiredFor": "identity"
5110
+ },
5111
+ "required": true
4663
5112
  },
4664
5113
  "contentVariant": {
4665
5114
  "type": "text",
5115
+ "_meta": {
5116
+ "__statedOptions": []
5117
+ },
4666
5118
  "required": false
4667
5119
  },
4668
5120
  "enabled": {
4669
5121
  "type": "boolean",
5122
+ "_meta": {
5123
+ "__statedOptions": [
5124
+ "default"
5125
+ ]
5126
+ },
4670
5127
  "required": true,
4671
5128
  "default": true
4672
5129
  },
4673
5130
  "factLinkingEnabled": {
4674
5131
  "type": "boolean",
5132
+ "_meta": {
5133
+ "__statedOptions": [
5134
+ "default"
5135
+ ]
5136
+ },
4675
5137
  "required": true,
4676
5138
  "default": false
4677
5139
  },
4678
5140
  "transparencyEnabled": {
4679
5141
  "type": "boolean",
5142
+ "_meta": {
5143
+ "__statedOptions": [
5144
+ "default"
5145
+ ]
5146
+ },
4680
5147
  "required": true,
4681
5148
  "default": false
4682
5149
  },
4683
5150
  "publicationProfileKey": {
4684
5151
  "type": "text",
5152
+ "_meta": {
5153
+ "__statedOptions": []
5154
+ },
4685
5155
  "required": false
4686
5156
  },
4687
5157
  "correctionProfileKey": {
4688
5158
  "type": "text",
5159
+ "_meta": {
5160
+ "__statedOptions": []
5161
+ },
4689
5162
  "required": false
4690
5163
  },
4691
5164
  "enforcePublishReadiness": {
4692
5165
  "type": "boolean",
5166
+ "_meta": {
5167
+ "__statedOptions": [
5168
+ "default"
5169
+ ]
5170
+ },
4693
5171
  "required": true,
4694
5172
  "default": false
4695
5173
  },
4696
5174
  "defaultFactRelationship": {
4697
5175
  "type": "text",
5176
+ "_meta": {
5177
+ "__statedOptions": [
5178
+ "default"
5179
+ ]
5180
+ },
4698
5181
  "required": false,
4699
5182
  "default": "supports"
4700
5183
  },
4701
5184
  "metadata": {
4702
5185
  "type": "text",
5186
+ "_meta": {
5187
+ "__statedOptions": []
5188
+ },
4703
5189
  "required": false
4704
5190
  },
4705
5191
  "tenantId": {
4706
5192
  "type": "text",
4707
- "required": false,
4708
5193
  "_meta": {
4709
- "sqlType": "UUID",
4710
- "nullable": true,
4711
5194
  "__tenancy": {
4712
5195
  "isTenantIdField": true,
4713
5196
  "autoFilter": true,
@@ -4717,15 +5200,31 @@
4717
5200
  "mode": "optional",
4718
5201
  "field": "tenantId",
4719
5202
  "allowSuperAdminBypass": false
4720
- }
4721
- }
5203
+ },
5204
+ "__statedOptions": [
5205
+ "sqlType",
5206
+ "nullable",
5207
+ "__tenancy",
5208
+ "required"
5209
+ ],
5210
+ "sqlType": "UUID",
5211
+ "nullable": true,
5212
+ "required": false
5213
+ },
5214
+ "required": false
4722
5215
  },
4723
5216
  "createdAt": {
4724
5217
  "type": "text",
5218
+ "_meta": {
5219
+ "__statedOptions": []
5220
+ },
4725
5221
  "required": false
4726
5222
  },
4727
5223
  "updatedAt": {
4728
5224
  "type": "text",
5225
+ "_meta": {
5226
+ "__statedOptions": []
5227
+ },
4729
5228
  "required": false
4730
5229
  }
4731
5230
  },
@@ -4955,7 +5454,7 @@
4955
5454
  "className": "ContentGovernanceAssignmentCollection",
4956
5455
  "qualifiedName": "@happyvertical/smrt-content:ContentGovernanceAssignmentCollection",
4957
5456
  "collection": "contentgovernanceassignments",
4958
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-governance-assignments.ts",
5457
+ "filePath": "src/content-governance-assignments.ts",
4959
5458
  "packageName": "@happyvertical/smrt-content",
4960
5459
  "fields": {},
4961
5460
  "methods": {
@@ -5171,7 +5670,7 @@
5171
5670
  "className": "ContentGovernancePolicyCollection",
5172
5671
  "qualifiedName": "@happyvertical/smrt-content:ContentGovernancePolicyCollection",
5173
5672
  "collection": "contentgovernancepolicies",
5174
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-governance-policies.ts",
5673
+ "filePath": "src/content-governance-policies.ts",
5175
5674
  "packageName": "@happyvertical/smrt-content",
5176
5675
  "fields": {},
5177
5676
  "methods": {
@@ -5336,22 +5835,36 @@
5336
5835
  "className": "ContentGovernancePolicy",
5337
5836
  "qualifiedName": "@happyvertical/smrt-content:ContentGovernancePolicy",
5338
5837
  "collection": "contentgovernancepolicies",
5339
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-governance-policy.ts",
5838
+ "filePath": "src/content-governance-policy.ts",
5340
5839
  "packageName": "@happyvertical/smrt-content",
5341
5840
  "fields": {
5342
5841
  "key": {
5343
5842
  "type": "text",
5344
- "required": true,
5345
5843
  "_meta": {
5346
- "required": true
5347
- }
5844
+ "__statedOptions": [
5845
+ "required",
5846
+ "requiredFor"
5847
+ ],
5848
+ "required": true,
5849
+ "requiredFor": "identity"
5850
+ },
5851
+ "required": true
5348
5852
  },
5349
5853
  "label": {
5350
5854
  "type": "text",
5855
+ "_meta": {
5856
+ "__statedOptions": []
5857
+ },
5351
5858
  "required": false
5352
5859
  },
5353
5860
  "kind": {
5354
5861
  "type": "text",
5862
+ "_meta": {
5863
+ "__statedOptions": [
5864
+ "default",
5865
+ "enum"
5866
+ ]
5867
+ },
5355
5868
  "required": false,
5356
5869
  "default": "custom",
5357
5870
  "enum": [
@@ -5362,23 +5875,31 @@
5362
5875
  },
5363
5876
  "instructions": {
5364
5877
  "type": "text",
5878
+ "_meta": {
5879
+ "__statedOptions": []
5880
+ },
5365
5881
  "required": false
5366
5882
  },
5367
5883
  "enabled": {
5368
5884
  "type": "boolean",
5885
+ "_meta": {
5886
+ "__statedOptions": [
5887
+ "default"
5888
+ ]
5889
+ },
5369
5890
  "required": true,
5370
5891
  "default": true
5371
5892
  },
5372
5893
  "metadata": {
5373
5894
  "type": "text",
5895
+ "_meta": {
5896
+ "__statedOptions": []
5897
+ },
5374
5898
  "required": false
5375
5899
  },
5376
5900
  "tenantId": {
5377
5901
  "type": "text",
5378
- "required": false,
5379
5902
  "_meta": {
5380
- "sqlType": "UUID",
5381
- "nullable": true,
5382
5903
  "__tenancy": {
5383
5904
  "isTenantIdField": true,
5384
5905
  "autoFilter": true,
@@ -5388,15 +5909,31 @@
5388
5909
  "mode": "optional",
5389
5910
  "field": "tenantId",
5390
5911
  "allowSuperAdminBypass": false
5391
- }
5392
- }
5912
+ },
5913
+ "__statedOptions": [
5914
+ "sqlType",
5915
+ "nullable",
5916
+ "__tenancy",
5917
+ "required"
5918
+ ],
5919
+ "sqlType": "UUID",
5920
+ "nullable": true,
5921
+ "required": false
5922
+ },
5923
+ "required": false
5393
5924
  },
5394
5925
  "createdAt": {
5395
5926
  "type": "text",
5927
+ "_meta": {
5928
+ "__statedOptions": []
5929
+ },
5396
5930
  "required": false
5397
5931
  },
5398
5932
  "updatedAt": {
5399
5933
  "type": "text",
5934
+ "_meta": {
5935
+ "__statedOptions": []
5936
+ },
5400
5937
  "required": false
5401
5938
  }
5402
5939
  },
@@ -5581,43 +6118,62 @@
5581
6118
  "className": "ContentGovernanceProfile",
5582
6119
  "qualifiedName": "@happyvertical/smrt-content:ContentGovernanceProfile",
5583
6120
  "collection": "contentgovernanceprofiles",
5584
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-governance-profile.ts",
6121
+ "filePath": "src/content-governance-profile.ts",
5585
6122
  "packageName": "@happyvertical/smrt-content",
5586
6123
  "fields": {
5587
6124
  "key": {
5588
6125
  "type": "text",
5589
- "required": true,
5590
6126
  "_meta": {
5591
- "required": true
5592
- }
6127
+ "__statedOptions": [
6128
+ "required",
6129
+ "requiredFor"
6130
+ ],
6131
+ "required": true,
6132
+ "requiredFor": "identity"
6133
+ },
6134
+ "required": true
5593
6135
  },
5594
6136
  "label": {
5595
6137
  "type": "text",
6138
+ "_meta": {
6139
+ "__statedOptions": []
6140
+ },
5596
6141
  "required": false
5597
6142
  },
5598
6143
  "description": {
5599
6144
  "type": "text",
6145
+ "_meta": {
6146
+ "__statedOptions": []
6147
+ },
5600
6148
  "required": false
5601
6149
  },
5602
6150
  "enabled": {
5603
6151
  "type": "boolean",
6152
+ "_meta": {
6153
+ "__statedOptions": [
6154
+ "default"
6155
+ ]
6156
+ },
5604
6157
  "required": true,
5605
6158
  "default": true
5606
6159
  },
5607
6160
  "requirements": {
5608
6161
  "type": "text",
6162
+ "_meta": {
6163
+ "__statedOptions": []
6164
+ },
5609
6165
  "required": false
5610
6166
  },
5611
6167
  "metadata": {
5612
6168
  "type": "text",
6169
+ "_meta": {
6170
+ "__statedOptions": []
6171
+ },
5613
6172
  "required": false
5614
6173
  },
5615
6174
  "tenantId": {
5616
6175
  "type": "text",
5617
- "required": false,
5618
6176
  "_meta": {
5619
- "sqlType": "UUID",
5620
- "nullable": true,
5621
6177
  "__tenancy": {
5622
6178
  "isTenantIdField": true,
5623
6179
  "autoFilter": true,
@@ -5627,15 +6183,31 @@
5627
6183
  "mode": "optional",
5628
6184
  "field": "tenantId",
5629
6185
  "allowSuperAdminBypass": false
5630
- }
5631
- }
6186
+ },
6187
+ "__statedOptions": [
6188
+ "sqlType",
6189
+ "nullable",
6190
+ "__tenancy",
6191
+ "required"
6192
+ ],
6193
+ "sqlType": "UUID",
6194
+ "nullable": true,
6195
+ "required": false
6196
+ },
6197
+ "required": false
5632
6198
  },
5633
6199
  "createdAt": {
5634
6200
  "type": "text",
6201
+ "_meta": {
6202
+ "__statedOptions": []
6203
+ },
5635
6204
  "required": false
5636
6205
  },
5637
6206
  "updatedAt": {
5638
6207
  "type": "text",
6208
+ "_meta": {
6209
+ "__statedOptions": []
6210
+ },
5639
6211
  "required": false
5640
6212
  }
5641
6213
  },
@@ -5827,7 +6399,7 @@
5827
6399
  "className": "ContentGovernanceProfileCollection",
5828
6400
  "qualifiedName": "@happyvertical/smrt-content:ContentGovernanceProfileCollection",
5829
6401
  "collection": "contentgovernanceprofiles",
5830
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-governance-profiles.ts",
6402
+ "filePath": "src/content-governance-profiles.ts",
5831
6403
  "packageName": "@happyvertical/smrt-content",
5832
6404
  "fields": {},
5833
6405
  "methods": {
@@ -5991,15 +6563,12 @@
5991
6563
  "className": "ContentReference",
5992
6564
  "qualifiedName": "@happyvertical/smrt-content:ContentReference",
5993
6565
  "collection": "contentreferences",
5994
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-reference.ts",
6566
+ "filePath": "src/content-reference.ts",
5995
6567
  "packageName": "@happyvertical/smrt-content",
5996
6568
  "fields": {
5997
6569
  "tenantId": {
5998
6570
  "type": "text",
5999
- "required": false,
6000
6571
  "_meta": {
6001
- "sqlType": "UUID",
6002
- "nullable": true,
6003
6572
  "__tenancy": {
6004
6573
  "isTenantIdField": true,
6005
6574
  "autoFilter": true,
@@ -6009,34 +6578,64 @@
6009
6578
  "mode": "optional",
6010
6579
  "field": "tenantId",
6011
6580
  "allowSuperAdminBypass": false
6012
- }
6013
- }
6581
+ },
6582
+ "__statedOptions": [
6583
+ "sqlType",
6584
+ "nullable",
6585
+ "__tenancy",
6586
+ "required"
6587
+ ],
6588
+ "sqlType": "UUID",
6589
+ "nullable": true,
6590
+ "required": false
6591
+ },
6592
+ "required": false
6014
6593
  },
6015
6594
  "sourceId": {
6016
6595
  "type": "foreignKey",
6017
- "required": true,
6018
- "related": "Content",
6019
6596
  "_meta": {
6020
- "required": true
6021
- }
6597
+ "__statedOptions": [
6598
+ "required",
6599
+ "requiredFor",
6600
+ "related"
6601
+ ],
6602
+ "required": true,
6603
+ "requiredFor": "identity"
6604
+ },
6605
+ "required": true,
6606
+ "related": "Content"
6022
6607
  },
6023
6608
  "targetId": {
6024
6609
  "type": "foreignKey",
6025
- "required": true,
6026
- "related": "Content",
6027
6610
  "_meta": {
6028
- "required": true
6029
- }
6611
+ "__statedOptions": [
6612
+ "required",
6613
+ "requiredFor",
6614
+ "related"
6615
+ ],
6616
+ "required": true,
6617
+ "requiredFor": "identity"
6618
+ },
6619
+ "required": true,
6620
+ "related": "Content"
6030
6621
  },
6031
6622
  "targetVersion": {
6032
6623
  "type": "integer",
6033
- "required": false,
6034
6624
  "_meta": {
6035
- "nullable": true
6036
- }
6625
+ "__statedOptions": [
6626
+ "nullable",
6627
+ "required"
6628
+ ],
6629
+ "nullable": true,
6630
+ "required": false
6631
+ },
6632
+ "required": false
6037
6633
  },
6038
6634
  "createdAt": {
6039
6635
  "type": "text",
6636
+ "_meta": {
6637
+ "__statedOptions": []
6638
+ },
6040
6639
  "required": false
6041
6640
  }
6042
6641
  },
@@ -6176,7 +6775,7 @@
6176
6775
  "className": "ContentReferences",
6177
6776
  "qualifiedName": "@happyvertical/smrt-content:ContentReferences",
6178
6777
  "collection": "contentreferences",
6179
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-references.ts",
6778
+ "filePath": "src/content-references.ts",
6180
6779
  "packageName": "@happyvertical/smrt-content",
6181
6780
  "fields": {},
6182
6781
  "methods": {
@@ -6457,36 +7056,53 @@
6457
7056
  "className": "ContentReview",
6458
7057
  "qualifiedName": "@happyvertical/smrt-content:ContentReview",
6459
7058
  "collection": "contentreviews",
6460
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-review.ts",
7059
+ "filePath": "src/content-review.ts",
6461
7060
  "packageName": "@happyvertical/smrt-content",
6462
7061
  "fields": {
6463
7062
  "contentId": {
6464
7063
  "type": "foreignKey",
6465
- "required": true,
6466
- "related": "Content",
6467
- "description": "The piece that was reviewed.",
6468
7064
  "_meta": {
6469
- "description": "The piece that was reviewed.",
7065
+ "__statedOptions": [
7066
+ "required",
7067
+ "requiredFor",
7068
+ "onDelete",
7069
+ "description",
7070
+ "related"
7071
+ ],
6470
7072
  "required": true,
7073
+ "description": "The piece that was reviewed.",
7074
+ "requiredFor": "identity",
6471
7075
  "onDelete": "CASCADE"
6472
- }
7076
+ },
7077
+ "required": true,
7078
+ "related": "Content",
7079
+ "description": "The piece that was reviewed."
6473
7080
  },
6474
7081
  "contentVersionId": {
6475
7082
  "type": "foreignKey",
6476
- "required": false,
6477
- "related": "ContentVersion",
6478
7083
  "_meta": {
7084
+ "__statedOptions": [
7085
+ "onDelete",
7086
+ "related"
7087
+ ],
6479
7088
  "onDelete": "CASCADE"
6480
- }
7089
+ },
7090
+ "required": false,
7091
+ "related": "ContentVersion"
6481
7092
  },
6482
7093
  "kind": {
6483
7094
  "type": "text",
6484
- "required": false,
6485
- "default": "custom",
6486
- "description": "What the review checked: facts, safety or a custom policy.",
6487
7095
  "_meta": {
7096
+ "__statedOptions": [
7097
+ "description",
7098
+ "default",
7099
+ "enum"
7100
+ ],
6488
7101
  "description": "What the review checked: facts, safety or a custom policy."
6489
7102
  },
7103
+ "required": false,
7104
+ "default": "custom",
7105
+ "description": "What the review checked: facts, safety or a custom policy.",
6490
7106
  "enum": [
6491
7107
  "facts",
6492
7108
  "safety",
@@ -6495,20 +7111,28 @@
6495
7111
  },
6496
7112
  "policyKey": {
6497
7113
  "type": "text",
6498
- "required": false,
6499
- "description": "The policy the piece was checked against.",
6500
7114
  "_meta": {
7115
+ "__statedOptions": [
7116
+ "description"
7117
+ ],
6501
7118
  "description": "The policy the piece was checked against."
6502
- }
7119
+ },
7120
+ "required": false,
7121
+ "description": "The policy the piece was checked against."
6503
7122
  },
6504
7123
  "status": {
6505
7124
  "type": "text",
6506
- "required": false,
6507
- "default": "pending",
6508
- "description": "The outcome: pending, passed, flagged, failed or waived.",
6509
7125
  "_meta": {
7126
+ "__statedOptions": [
7127
+ "description",
7128
+ "default",
7129
+ "enum"
7130
+ ],
6510
7131
  "description": "The outcome: pending, passed, flagged, failed or waived."
6511
7132
  },
7133
+ "required": false,
7134
+ "default": "pending",
7135
+ "description": "The outcome: pending, passed, flagged, failed or waived.",
6512
7136
  "enum": [
6513
7137
  "pending",
6514
7138
  "passed",
@@ -6519,34 +7143,43 @@
6519
7143
  },
6520
7144
  "summary": {
6521
7145
  "type": "text",
6522
- "required": false,
6523
- "description": "A short account of what the review found.",
6524
7146
  "_meta": {
7147
+ "__statedOptions": [
7148
+ "description"
7149
+ ],
6525
7150
  "description": "A short account of what the review found."
6526
- }
7151
+ },
7152
+ "required": false,
7153
+ "description": "A short account of what the review found."
6527
7154
  },
6528
7155
  "findings": {
6529
7156
  "type": "text",
7157
+ "_meta": {
7158
+ "__statedOptions": []
7159
+ },
6530
7160
  "required": false
6531
7161
  },
6532
7162
  "reviewer": {
6533
7163
  "type": "text",
6534
- "required": false,
6535
- "description": "Who or what carried out the review.",
6536
7164
  "_meta": {
7165
+ "__statedOptions": [
7166
+ "description"
7167
+ ],
6537
7168
  "description": "Who or what carried out the review."
6538
- }
7169
+ },
7170
+ "required": false,
7171
+ "description": "Who or what carried out the review."
6539
7172
  },
6540
7173
  "metadata": {
6541
7174
  "type": "text",
7175
+ "_meta": {
7176
+ "__statedOptions": []
7177
+ },
6542
7178
  "required": false
6543
7179
  },
6544
7180
  "tenantId": {
6545
7181
  "type": "text",
6546
- "required": false,
6547
7182
  "_meta": {
6548
- "sqlType": "UUID",
6549
- "nullable": true,
6550
7183
  "__tenancy": {
6551
7184
  "isTenantIdField": true,
6552
7185
  "autoFilter": true,
@@ -6556,19 +7189,35 @@
6556
7189
  "mode": "optional",
6557
7190
  "field": "tenantId",
6558
7191
  "allowSuperAdminBypass": false
6559
- }
6560
- }
7192
+ },
7193
+ "__statedOptions": [
7194
+ "sqlType",
7195
+ "nullable",
7196
+ "__tenancy",
7197
+ "required"
7198
+ ],
7199
+ "sqlType": "UUID",
7200
+ "nullable": true,
7201
+ "required": false
7202
+ },
7203
+ "required": false
6561
7204
  },
6562
7205
  "createdAt": {
6563
7206
  "type": "text",
6564
- "required": false,
6565
- "description": "When the review was done.",
6566
7207
  "_meta": {
7208
+ "__statedOptions": [
7209
+ "description"
7210
+ ],
6567
7211
  "description": "When the review was done."
6568
- }
7212
+ },
7213
+ "required": false,
7214
+ "description": "When the review was done."
6569
7215
  },
6570
7216
  "updatedAt": {
6571
7217
  "type": "text",
7218
+ "_meta": {
7219
+ "__statedOptions": []
7220
+ },
6572
7221
  "required": false
6573
7222
  }
6574
7223
  },
@@ -6773,7 +7422,7 @@
6773
7422
  "className": "ContentReviewCollection",
6774
7423
  "qualifiedName": "@happyvertical/smrt-content:ContentReviewCollection",
6775
7424
  "collection": "contentreviews",
6776
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-reviews.ts",
7425
+ "filePath": "src/content-reviews.ts",
6777
7426
  "packageName": "@happyvertical/smrt-content",
6778
7427
  "fields": {},
6779
7428
  "methods": {
@@ -7047,92 +7696,134 @@
7047
7696
  "qualifiedName": "@happyvertical/smrt-content:Article",
7048
7697
  "collection": "contents",
7049
7698
  "description": "Article content type",
7050
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-types.ts",
7699
+ "filePath": "src/content-types.ts",
7051
7700
  "packageName": "@happyvertical/smrt-content",
7052
7701
  "fields": {
7053
7702
  "created_at": {
7054
7703
  "type": "datetime",
7704
+ "_meta": {
7705
+ "__statedOptions": []
7706
+ },
7055
7707
  "required": false
7056
7708
  },
7057
7709
  "updated_at": {
7058
7710
  "type": "datetime",
7711
+ "_meta": {
7712
+ "__statedOptions": []
7713
+ },
7059
7714
  "required": false
7060
7715
  },
7061
7716
  "tenantId": {
7062
7717
  "type": "text",
7063
- "required": false,
7064
7718
  "_meta": {
7065
- "sqlType": "UUID",
7066
- "nullable": true,
7067
7719
  "__tenancy": {
7068
7720
  "isTenantIdField": true,
7069
7721
  "autoFilter": true,
7070
7722
  "required": false,
7071
7723
  "autoPopulate": true,
7072
7724
  "nullable": true
7073
- }
7074
- }
7725
+ },
7726
+ "__statedOptions": [
7727
+ "sqlType",
7728
+ "nullable",
7729
+ "__tenancy",
7730
+ "required"
7731
+ ],
7732
+ "required": false,
7733
+ "sqlType": "UUID",
7734
+ "nullable": true
7735
+ },
7736
+ "required": false
7075
7737
  },
7076
7738
  "type": {
7077
7739
  "type": "text",
7078
- "required": false,
7079
- "description": "What kind of piece this is, such as an article or a document.",
7080
7740
  "_meta": {
7741
+ "__statedOptions": [
7742
+ "description"
7743
+ ],
7081
7744
  "description": "What kind of piece this is, such as an article or a document."
7082
- }
7745
+ },
7746
+ "required": false,
7747
+ "description": "What kind of piece this is, such as an article or a document."
7083
7748
  },
7084
7749
  "variant": {
7085
7750
  "type": "text",
7751
+ "_meta": {
7752
+ "__statedOptions": []
7753
+ },
7086
7754
  "required": false
7087
7755
  },
7088
7756
  "fileKey": {
7089
7757
  "type": "text",
7758
+ "_meta": {
7759
+ "__statedOptions": []
7760
+ },
7090
7761
  "required": false
7091
7762
  },
7092
7763
  "author": {
7093
7764
  "type": "text",
7094
- "required": false,
7095
- "description": "Who wrote this piece.",
7096
7765
  "_meta": {
7766
+ "__statedOptions": [
7767
+ "description"
7768
+ ],
7097
7769
  "description": "Who wrote this piece."
7098
- }
7770
+ },
7771
+ "required": false,
7772
+ "description": "Who wrote this piece."
7099
7773
  },
7100
7774
  "name": {
7101
7775
  "type": "text",
7102
- "required": true,
7103
- "default": "",
7104
- "description": "A short name used to find this piece in lists.",
7105
7776
  "_meta": {
7106
- "required": true,
7777
+ "__statedOptions": [
7778
+ "description",
7779
+ "default"
7780
+ ],
7107
7781
  "description": "A short name used to find this piece in lists."
7108
- }
7782
+ },
7783
+ "required": false,
7784
+ "default": "",
7785
+ "description": "A short name used to find this piece in lists."
7109
7786
  },
7110
7787
  "title": {
7111
7788
  "type": "text",
7112
- "required": false,
7113
- "description": "The headline readers see.",
7114
7789
  "_meta": {
7790
+ "__statedOptions": [
7791
+ "description"
7792
+ ],
7115
7793
  "description": "The headline readers see."
7116
- }
7794
+ },
7795
+ "required": false,
7796
+ "description": "The headline readers see."
7117
7797
  },
7118
7798
  "description": {
7119
7799
  "type": "text",
7120
- "required": false,
7121
- "description": "A one or two sentence summary of the piece.",
7122
7800
  "_meta": {
7801
+ "__statedOptions": [
7802
+ "description"
7803
+ ],
7123
7804
  "description": "A one or two sentence summary of the piece."
7124
- }
7805
+ },
7806
+ "required": false,
7807
+ "description": "A one or two sentence summary of the piece."
7125
7808
  },
7126
7809
  "body": {
7127
7810
  "type": "text",
7128
- "required": false,
7129
- "description": "The full text of the piece.",
7130
7811
  "_meta": {
7812
+ "__statedOptions": [
7813
+ "description"
7814
+ ],
7131
7815
  "description": "The full text of the piece."
7132
- }
7816
+ },
7817
+ "required": false,
7818
+ "description": "The full text of the piece."
7133
7819
  },
7134
7820
  "bodyFormat": {
7135
7821
  "type": "text",
7822
+ "_meta": {
7823
+ "__statedOptions": [
7824
+ "enum"
7825
+ ]
7826
+ },
7136
7827
  "required": false,
7137
7828
  "enum": [
7138
7829
  "markdown",
@@ -7141,53 +7832,80 @@
7141
7832
  },
7142
7833
  "publish_date": {
7143
7834
  "type": "datetime",
7144
- "required": false,
7145
- "description": "The date the piece went out, or is due to go out.",
7146
7835
  "_meta": {
7836
+ "__statedOptions": [
7837
+ "description"
7838
+ ],
7147
7839
  "description": "The date the piece went out, or is due to go out."
7148
- }
7840
+ },
7841
+ "required": false,
7842
+ "description": "The date the piece went out, or is due to go out."
7149
7843
  },
7150
7844
  "url": {
7151
7845
  "type": "text",
7846
+ "_meta": {
7847
+ "__statedOptions": []
7848
+ },
7152
7849
  "required": false
7153
7850
  },
7154
7851
  "source": {
7155
7852
  "type": "text",
7853
+ "_meta": {
7854
+ "__statedOptions": []
7855
+ },
7156
7856
  "required": false
7157
7857
  },
7158
7858
  "original_url": {
7159
7859
  "type": "text",
7860
+ "_meta": {
7861
+ "__statedOptions": []
7862
+ },
7160
7863
  "required": false
7161
7864
  },
7162
7865
  "language": {
7163
7866
  "type": "text",
7867
+ "_meta": {
7868
+ "__statedOptions": []
7869
+ },
7164
7870
  "required": false
7165
7871
  },
7166
7872
  "tags": {
7167
7873
  "type": "json",
7168
- "required": false,
7169
- "default": [],
7170
- "description": "Words that group pieces by subject.",
7171
7874
  "_meta": {
7875
+ "__statedOptions": [
7876
+ "description",
7877
+ "default"
7878
+ ],
7172
7879
  "description": "Words that group pieces by subject."
7173
- }
7880
+ },
7881
+ "required": false,
7882
+ "default": [],
7883
+ "description": "Words that group pieces by subject."
7174
7884
  },
7175
7885
  "category": {
7176
7886
  "type": "text",
7177
- "required": false,
7178
- "description": "The one section the piece belongs to, such as news or local.",
7179
7887
  "_meta": {
7888
+ "__statedOptions": [
7889
+ "description"
7890
+ ],
7180
7891
  "description": "The one section the piece belongs to, such as news or local."
7181
- }
7892
+ },
7893
+ "required": false,
7894
+ "description": "The one section the piece belongs to, such as news or local."
7182
7895
  },
7183
7896
  "status": {
7184
7897
  "type": "text",
7185
- "required": false,
7186
- "default": "draft",
7187
- "description": "Where the piece stands: draft, in review, published or archived.",
7188
7898
  "_meta": {
7899
+ "__statedOptions": [
7900
+ "description",
7901
+ "default",
7902
+ "enum"
7903
+ ],
7189
7904
  "description": "Where the piece stands: draft, in review, published or archived."
7190
7905
  },
7906
+ "required": false,
7907
+ "default": "draft",
7908
+ "description": "Where the piece stands: draft, in review, published or archived.",
7191
7909
  "enum": [
7192
7910
  "published",
7193
7911
  "draft",
@@ -7198,6 +7916,12 @@
7198
7916
  },
7199
7917
  "state": {
7200
7918
  "type": "text",
7919
+ "_meta": {
7920
+ "__statedOptions": [
7921
+ "default",
7922
+ "enum"
7923
+ ]
7924
+ },
7201
7925
  "required": false,
7202
7926
  "default": "active",
7203
7927
  "enum": [
@@ -7208,11 +7932,21 @@
7208
7932
  },
7209
7933
  "metadata": {
7210
7934
  "type": "json",
7935
+ "_meta": {
7936
+ "__statedOptions": [
7937
+ "default"
7938
+ ]
7939
+ },
7211
7940
  "required": false,
7212
7941
  "default": {}
7213
7942
  },
7214
7943
  "thumbnailAssetId": {
7215
7944
  "type": "crossPackageRef",
7945
+ "_meta": {
7946
+ "__statedOptions": [
7947
+ "related"
7948
+ ]
7949
+ },
7216
7950
  "required": false,
7217
7951
  "related": "@happyvertical/smrt-assets:Asset"
7218
7952
  }
@@ -8171,13 +8905,6 @@
8171
8905
  "exportName": "Article",
8172
8906
  "collectionExportName": "ArticleCollection",
8173
8907
  "displayLabelField": "name",
8174
- "validationRules": [
8175
- {
8176
- "field": "name",
8177
- "rule": "required",
8178
- "fieldType": "text"
8179
- }
8180
- ],
8181
8908
  "schema": {
8182
8909
  "tableName": "contents",
8183
8910
  "ddl": "CREATE TABLE IF NOT EXISTS \"contents\" (\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 \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"type\" TEXT,\n \"variant\" TEXT,\n \"file_key\" TEXT,\n \"author\" TEXT,\n \"name\" TEXT DEFAULT '',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"body_format\" TEXT,\n \"publish_date\" TIMESTAMP,\n \"url\" TEXT,\n \"source\" TEXT,\n \"original_url\" TEXT,\n \"language\" TEXT,\n \"tags\" JSON DEFAULT '[]',\n \"category\" TEXT,\n \"status\" TEXT DEFAULT 'draft',\n \"state\" TEXT DEFAULT 'active',\n \"metadata\" JSON DEFAULT '{}',\n \"thumbnail_asset_id\" UUID,\n \"feed_source_id\" UUID,\n \"source_guid\" TEXT,\n \"source_name\" TEXT,\n \"source_homepage_url\" TEXT,\n \"external_url\" TEXT,\n \"original_published_at\" TIMESTAMP,\n \"dedupe_key\" TEXT\n);",
@@ -8403,92 +9130,134 @@
8403
9130
  "qualifiedName": "@happyvertical/smrt-content:ContentDocument",
8404
9131
  "collection": "contents",
8405
9132
  "description": "ContentDocument content type",
8406
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-types.ts",
9133
+ "filePath": "src/content-types.ts",
8407
9134
  "packageName": "@happyvertical/smrt-content",
8408
9135
  "fields": {
8409
9136
  "created_at": {
8410
9137
  "type": "datetime",
9138
+ "_meta": {
9139
+ "__statedOptions": []
9140
+ },
8411
9141
  "required": false
8412
9142
  },
8413
9143
  "updated_at": {
8414
9144
  "type": "datetime",
9145
+ "_meta": {
9146
+ "__statedOptions": []
9147
+ },
8415
9148
  "required": false
8416
9149
  },
8417
9150
  "tenantId": {
8418
9151
  "type": "text",
8419
- "required": false,
8420
9152
  "_meta": {
8421
- "sqlType": "UUID",
8422
- "nullable": true,
8423
9153
  "__tenancy": {
8424
9154
  "isTenantIdField": true,
8425
9155
  "autoFilter": true,
8426
9156
  "required": false,
8427
9157
  "autoPopulate": true,
8428
9158
  "nullable": true
8429
- }
8430
- }
9159
+ },
9160
+ "__statedOptions": [
9161
+ "sqlType",
9162
+ "nullable",
9163
+ "__tenancy",
9164
+ "required"
9165
+ ],
9166
+ "required": false,
9167
+ "sqlType": "UUID",
9168
+ "nullable": true
9169
+ },
9170
+ "required": false
8431
9171
  },
8432
9172
  "type": {
8433
9173
  "type": "text",
8434
- "required": false,
8435
- "description": "What kind of piece this is, such as an article or a document.",
8436
9174
  "_meta": {
9175
+ "__statedOptions": [
9176
+ "description"
9177
+ ],
8437
9178
  "description": "What kind of piece this is, such as an article or a document."
8438
- }
9179
+ },
9180
+ "required": false,
9181
+ "description": "What kind of piece this is, such as an article or a document."
8439
9182
  },
8440
9183
  "variant": {
8441
9184
  "type": "text",
9185
+ "_meta": {
9186
+ "__statedOptions": []
9187
+ },
8442
9188
  "required": false
8443
9189
  },
8444
9190
  "fileKey": {
8445
9191
  "type": "text",
9192
+ "_meta": {
9193
+ "__statedOptions": []
9194
+ },
8446
9195
  "required": false
8447
9196
  },
8448
9197
  "author": {
8449
9198
  "type": "text",
8450
- "required": false,
8451
- "description": "Who wrote this piece.",
8452
9199
  "_meta": {
9200
+ "__statedOptions": [
9201
+ "description"
9202
+ ],
8453
9203
  "description": "Who wrote this piece."
8454
- }
9204
+ },
9205
+ "required": false,
9206
+ "description": "Who wrote this piece."
8455
9207
  },
8456
9208
  "name": {
8457
9209
  "type": "text",
8458
- "required": true,
8459
- "default": "",
8460
- "description": "A short name used to find this piece in lists.",
8461
9210
  "_meta": {
8462
- "required": true,
9211
+ "__statedOptions": [
9212
+ "description",
9213
+ "default"
9214
+ ],
8463
9215
  "description": "A short name used to find this piece in lists."
8464
- }
9216
+ },
9217
+ "required": false,
9218
+ "default": "",
9219
+ "description": "A short name used to find this piece in lists."
8465
9220
  },
8466
9221
  "title": {
8467
9222
  "type": "text",
8468
- "required": false,
8469
- "description": "The headline readers see.",
8470
9223
  "_meta": {
9224
+ "__statedOptions": [
9225
+ "description"
9226
+ ],
8471
9227
  "description": "The headline readers see."
8472
- }
9228
+ },
9229
+ "required": false,
9230
+ "description": "The headline readers see."
8473
9231
  },
8474
9232
  "description": {
8475
9233
  "type": "text",
8476
- "required": false,
8477
- "description": "A one or two sentence summary of the piece.",
8478
9234
  "_meta": {
9235
+ "__statedOptions": [
9236
+ "description"
9237
+ ],
8479
9238
  "description": "A one or two sentence summary of the piece."
8480
- }
9239
+ },
9240
+ "required": false,
9241
+ "description": "A one or two sentence summary of the piece."
8481
9242
  },
8482
9243
  "body": {
8483
9244
  "type": "text",
8484
- "required": false,
8485
- "description": "The full text of the piece.",
8486
9245
  "_meta": {
9246
+ "__statedOptions": [
9247
+ "description"
9248
+ ],
8487
9249
  "description": "The full text of the piece."
8488
- }
9250
+ },
9251
+ "required": false,
9252
+ "description": "The full text of the piece."
8489
9253
  },
8490
9254
  "bodyFormat": {
8491
9255
  "type": "text",
9256
+ "_meta": {
9257
+ "__statedOptions": [
9258
+ "enum"
9259
+ ]
9260
+ },
8492
9261
  "required": false,
8493
9262
  "enum": [
8494
9263
  "markdown",
@@ -8497,53 +9266,80 @@
8497
9266
  },
8498
9267
  "publish_date": {
8499
9268
  "type": "datetime",
8500
- "required": false,
8501
- "description": "The date the piece went out, or is due to go out.",
8502
9269
  "_meta": {
9270
+ "__statedOptions": [
9271
+ "description"
9272
+ ],
8503
9273
  "description": "The date the piece went out, or is due to go out."
8504
- }
9274
+ },
9275
+ "required": false,
9276
+ "description": "The date the piece went out, or is due to go out."
8505
9277
  },
8506
9278
  "url": {
8507
9279
  "type": "text",
9280
+ "_meta": {
9281
+ "__statedOptions": []
9282
+ },
8508
9283
  "required": false
8509
9284
  },
8510
9285
  "source": {
8511
9286
  "type": "text",
9287
+ "_meta": {
9288
+ "__statedOptions": []
9289
+ },
8512
9290
  "required": false
8513
9291
  },
8514
9292
  "original_url": {
8515
9293
  "type": "text",
9294
+ "_meta": {
9295
+ "__statedOptions": []
9296
+ },
8516
9297
  "required": false
8517
9298
  },
8518
9299
  "language": {
8519
9300
  "type": "text",
9301
+ "_meta": {
9302
+ "__statedOptions": []
9303
+ },
8520
9304
  "required": false
8521
9305
  },
8522
9306
  "tags": {
8523
9307
  "type": "json",
8524
- "required": false,
8525
- "default": [],
8526
- "description": "Words that group pieces by subject.",
8527
9308
  "_meta": {
9309
+ "__statedOptions": [
9310
+ "description",
9311
+ "default"
9312
+ ],
8528
9313
  "description": "Words that group pieces by subject."
8529
- }
9314
+ },
9315
+ "required": false,
9316
+ "default": [],
9317
+ "description": "Words that group pieces by subject."
8530
9318
  },
8531
9319
  "category": {
8532
9320
  "type": "text",
8533
- "required": false,
8534
- "description": "The one section the piece belongs to, such as news or local.",
8535
9321
  "_meta": {
9322
+ "__statedOptions": [
9323
+ "description"
9324
+ ],
8536
9325
  "description": "The one section the piece belongs to, such as news or local."
8537
- }
9326
+ },
9327
+ "required": false,
9328
+ "description": "The one section the piece belongs to, such as news or local."
8538
9329
  },
8539
9330
  "status": {
8540
9331
  "type": "text",
8541
- "required": false,
8542
- "default": "draft",
8543
- "description": "Where the piece stands: draft, in review, published or archived.",
8544
9332
  "_meta": {
9333
+ "__statedOptions": [
9334
+ "description",
9335
+ "default",
9336
+ "enum"
9337
+ ],
8545
9338
  "description": "Where the piece stands: draft, in review, published or archived."
8546
9339
  },
9340
+ "required": false,
9341
+ "default": "draft",
9342
+ "description": "Where the piece stands: draft, in review, published or archived.",
8547
9343
  "enum": [
8548
9344
  "published",
8549
9345
  "draft",
@@ -8554,6 +9350,12 @@
8554
9350
  },
8555
9351
  "state": {
8556
9352
  "type": "text",
9353
+ "_meta": {
9354
+ "__statedOptions": [
9355
+ "default",
9356
+ "enum"
9357
+ ]
9358
+ },
8557
9359
  "required": false,
8558
9360
  "default": "active",
8559
9361
  "enum": [
@@ -8564,11 +9366,21 @@
8564
9366
  },
8565
9367
  "metadata": {
8566
9368
  "type": "json",
9369
+ "_meta": {
9370
+ "__statedOptions": [
9371
+ "default"
9372
+ ]
9373
+ },
8567
9374
  "required": false,
8568
9375
  "default": {}
8569
9376
  },
8570
9377
  "thumbnailAssetId": {
8571
9378
  "type": "crossPackageRef",
9379
+ "_meta": {
9380
+ "__statedOptions": [
9381
+ "related"
9382
+ ]
9383
+ },
8572
9384
  "required": false,
8573
9385
  "related": "@happyvertical/smrt-assets:Asset"
8574
9386
  }
@@ -9527,13 +10339,6 @@
9527
10339
  "exportName": "ContentDocument",
9528
10340
  "collectionExportName": "ContentDocumentCollection",
9529
10341
  "displayLabelField": "name",
9530
- "validationRules": [
9531
- {
9532
- "field": "name",
9533
- "rule": "required",
9534
- "fieldType": "text"
9535
- }
9536
- ],
9537
10342
  "schema": {
9538
10343
  "tableName": "contents",
9539
10344
  "ddl": "CREATE TABLE IF NOT EXISTS \"contents\" (\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 \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"type\" TEXT,\n \"variant\" TEXT,\n \"file_key\" TEXT,\n \"author\" TEXT,\n \"name\" TEXT DEFAULT '',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"body_format\" TEXT,\n \"publish_date\" TIMESTAMP,\n \"url\" TEXT,\n \"source\" TEXT,\n \"original_url\" TEXT,\n \"language\" TEXT,\n \"tags\" JSON DEFAULT '[]',\n \"category\" TEXT,\n \"status\" TEXT DEFAULT 'draft',\n \"state\" TEXT DEFAULT 'active',\n \"metadata\" JSON DEFAULT '{}',\n \"thumbnail_asset_id\" UUID,\n \"feed_source_id\" UUID,\n \"source_guid\" TEXT,\n \"source_name\" TEXT,\n \"source_homepage_url\" TEXT,\n \"external_url\" TEXT,\n \"original_published_at\" TIMESTAMP,\n \"dedupe_key\" TEXT\n);",
@@ -9759,92 +10564,134 @@
9759
10564
  "qualifiedName": "@happyvertical/smrt-content:Mirror",
9760
10565
  "collection": "contents",
9761
10566
  "description": "Mirror content type",
9762
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-types.ts",
10567
+ "filePath": "src/content-types.ts",
9763
10568
  "packageName": "@happyvertical/smrt-content",
9764
10569
  "fields": {
9765
10570
  "created_at": {
9766
10571
  "type": "datetime",
10572
+ "_meta": {
10573
+ "__statedOptions": []
10574
+ },
9767
10575
  "required": false
9768
10576
  },
9769
10577
  "updated_at": {
9770
10578
  "type": "datetime",
10579
+ "_meta": {
10580
+ "__statedOptions": []
10581
+ },
9771
10582
  "required": false
9772
10583
  },
9773
10584
  "tenantId": {
9774
10585
  "type": "text",
9775
- "required": false,
9776
10586
  "_meta": {
9777
- "sqlType": "UUID",
9778
- "nullable": true,
9779
10587
  "__tenancy": {
9780
10588
  "isTenantIdField": true,
9781
10589
  "autoFilter": true,
9782
10590
  "required": false,
9783
10591
  "autoPopulate": true,
9784
10592
  "nullable": true
9785
- }
9786
- }
10593
+ },
10594
+ "__statedOptions": [
10595
+ "sqlType",
10596
+ "nullable",
10597
+ "__tenancy",
10598
+ "required"
10599
+ ],
10600
+ "required": false,
10601
+ "sqlType": "UUID",
10602
+ "nullable": true
10603
+ },
10604
+ "required": false
9787
10605
  },
9788
10606
  "type": {
9789
10607
  "type": "text",
9790
- "required": false,
9791
- "description": "What kind of piece this is, such as an article or a document.",
9792
10608
  "_meta": {
10609
+ "__statedOptions": [
10610
+ "description"
10611
+ ],
9793
10612
  "description": "What kind of piece this is, such as an article or a document."
9794
- }
10613
+ },
10614
+ "required": false,
10615
+ "description": "What kind of piece this is, such as an article or a document."
9795
10616
  },
9796
10617
  "variant": {
9797
10618
  "type": "text",
10619
+ "_meta": {
10620
+ "__statedOptions": []
10621
+ },
9798
10622
  "required": false
9799
10623
  },
9800
10624
  "fileKey": {
9801
10625
  "type": "text",
10626
+ "_meta": {
10627
+ "__statedOptions": []
10628
+ },
9802
10629
  "required": false
9803
10630
  },
9804
10631
  "author": {
9805
10632
  "type": "text",
9806
- "required": false,
9807
- "description": "Who wrote this piece.",
9808
10633
  "_meta": {
10634
+ "__statedOptions": [
10635
+ "description"
10636
+ ],
9809
10637
  "description": "Who wrote this piece."
9810
- }
10638
+ },
10639
+ "required": false,
10640
+ "description": "Who wrote this piece."
9811
10641
  },
9812
10642
  "name": {
9813
10643
  "type": "text",
9814
- "required": true,
9815
- "default": "",
9816
- "description": "A short name used to find this piece in lists.",
9817
10644
  "_meta": {
9818
- "required": true,
10645
+ "__statedOptions": [
10646
+ "description",
10647
+ "default"
10648
+ ],
9819
10649
  "description": "A short name used to find this piece in lists."
9820
- }
10650
+ },
10651
+ "required": false,
10652
+ "default": "",
10653
+ "description": "A short name used to find this piece in lists."
9821
10654
  },
9822
10655
  "title": {
9823
10656
  "type": "text",
9824
- "required": false,
9825
- "description": "The headline readers see.",
9826
10657
  "_meta": {
10658
+ "__statedOptions": [
10659
+ "description"
10660
+ ],
9827
10661
  "description": "The headline readers see."
9828
- }
10662
+ },
10663
+ "required": false,
10664
+ "description": "The headline readers see."
9829
10665
  },
9830
10666
  "description": {
9831
10667
  "type": "text",
9832
- "required": false,
9833
- "description": "A one or two sentence summary of the piece.",
9834
10668
  "_meta": {
10669
+ "__statedOptions": [
10670
+ "description"
10671
+ ],
9835
10672
  "description": "A one or two sentence summary of the piece."
9836
- }
10673
+ },
10674
+ "required": false,
10675
+ "description": "A one or two sentence summary of the piece."
9837
10676
  },
9838
10677
  "body": {
9839
10678
  "type": "text",
9840
- "required": false,
9841
- "description": "The full text of the piece.",
9842
10679
  "_meta": {
10680
+ "__statedOptions": [
10681
+ "description"
10682
+ ],
9843
10683
  "description": "The full text of the piece."
9844
- }
10684
+ },
10685
+ "required": false,
10686
+ "description": "The full text of the piece."
9845
10687
  },
9846
10688
  "bodyFormat": {
9847
10689
  "type": "text",
10690
+ "_meta": {
10691
+ "__statedOptions": [
10692
+ "enum"
10693
+ ]
10694
+ },
9848
10695
  "required": false,
9849
10696
  "enum": [
9850
10697
  "markdown",
@@ -9853,53 +10700,80 @@
9853
10700
  },
9854
10701
  "publish_date": {
9855
10702
  "type": "datetime",
9856
- "required": false,
9857
- "description": "The date the piece went out, or is due to go out.",
9858
10703
  "_meta": {
10704
+ "__statedOptions": [
10705
+ "description"
10706
+ ],
9859
10707
  "description": "The date the piece went out, or is due to go out."
9860
- }
10708
+ },
10709
+ "required": false,
10710
+ "description": "The date the piece went out, or is due to go out."
9861
10711
  },
9862
10712
  "url": {
9863
10713
  "type": "text",
10714
+ "_meta": {
10715
+ "__statedOptions": []
10716
+ },
9864
10717
  "required": false
9865
10718
  },
9866
10719
  "source": {
9867
10720
  "type": "text",
10721
+ "_meta": {
10722
+ "__statedOptions": []
10723
+ },
9868
10724
  "required": false
9869
10725
  },
9870
10726
  "original_url": {
9871
10727
  "type": "text",
10728
+ "_meta": {
10729
+ "__statedOptions": []
10730
+ },
9872
10731
  "required": false
9873
10732
  },
9874
10733
  "language": {
9875
10734
  "type": "text",
10735
+ "_meta": {
10736
+ "__statedOptions": []
10737
+ },
9876
10738
  "required": false
9877
10739
  },
9878
10740
  "tags": {
9879
10741
  "type": "json",
9880
- "required": false,
9881
- "default": [],
9882
- "description": "Words that group pieces by subject.",
9883
10742
  "_meta": {
10743
+ "__statedOptions": [
10744
+ "description",
10745
+ "default"
10746
+ ],
9884
10747
  "description": "Words that group pieces by subject."
9885
- }
10748
+ },
10749
+ "required": false,
10750
+ "default": [],
10751
+ "description": "Words that group pieces by subject."
9886
10752
  },
9887
10753
  "category": {
9888
10754
  "type": "text",
9889
- "required": false,
9890
- "description": "The one section the piece belongs to, such as news or local.",
9891
10755
  "_meta": {
10756
+ "__statedOptions": [
10757
+ "description"
10758
+ ],
9892
10759
  "description": "The one section the piece belongs to, such as news or local."
9893
- }
10760
+ },
10761
+ "required": false,
10762
+ "description": "The one section the piece belongs to, such as news or local."
9894
10763
  },
9895
10764
  "status": {
9896
10765
  "type": "text",
9897
- "required": false,
9898
- "default": "draft",
9899
- "description": "Where the piece stands: draft, in review, published or archived.",
9900
10766
  "_meta": {
10767
+ "__statedOptions": [
10768
+ "description",
10769
+ "default",
10770
+ "enum"
10771
+ ],
9901
10772
  "description": "Where the piece stands: draft, in review, published or archived."
9902
10773
  },
10774
+ "required": false,
10775
+ "default": "draft",
10776
+ "description": "Where the piece stands: draft, in review, published or archived.",
9903
10777
  "enum": [
9904
10778
  "published",
9905
10779
  "draft",
@@ -9910,6 +10784,12 @@
9910
10784
  },
9911
10785
  "state": {
9912
10786
  "type": "text",
10787
+ "_meta": {
10788
+ "__statedOptions": [
10789
+ "default",
10790
+ "enum"
10791
+ ]
10792
+ },
9913
10793
  "required": false,
9914
10794
  "default": "active",
9915
10795
  "enum": [
@@ -9920,41 +10800,74 @@
9920
10800
  },
9921
10801
  "metadata": {
9922
10802
  "type": "json",
10803
+ "_meta": {
10804
+ "__statedOptions": [
10805
+ "default"
10806
+ ]
10807
+ },
9923
10808
  "required": false,
9924
10809
  "default": {}
9925
10810
  },
9926
10811
  "thumbnailAssetId": {
9927
10812
  "type": "crossPackageRef",
10813
+ "_meta": {
10814
+ "__statedOptions": [
10815
+ "related"
10816
+ ]
10817
+ },
9928
10818
  "required": false,
9929
10819
  "related": "@happyvertical/smrt-assets:Asset"
9930
10820
  },
9931
10821
  "feedSourceId": {
9932
10822
  "type": "foreignKey",
10823
+ "_meta": {
10824
+ "__statedOptions": [
10825
+ "related"
10826
+ ]
10827
+ },
9933
10828
  "required": false,
9934
10829
  "related": "ContentFeedSource"
9935
10830
  },
9936
10831
  "sourceGuid": {
9937
10832
  "type": "text",
10833
+ "_meta": {
10834
+ "__statedOptions": []
10835
+ },
9938
10836
  "required": false
9939
10837
  },
9940
10838
  "sourceName": {
9941
10839
  "type": "text",
10840
+ "_meta": {
10841
+ "__statedOptions": []
10842
+ },
9942
10843
  "required": false
9943
10844
  },
9944
10845
  "sourceHomepageUrl": {
9945
10846
  "type": "text",
10847
+ "_meta": {
10848
+ "__statedOptions": []
10849
+ },
9946
10850
  "required": false
9947
10851
  },
9948
10852
  "externalUrl": {
9949
10853
  "type": "text",
10854
+ "_meta": {
10855
+ "__statedOptions": []
10856
+ },
9950
10857
  "required": false
9951
10858
  },
9952
10859
  "originalPublishedAt": {
9953
10860
  "type": "datetime",
10861
+ "_meta": {
10862
+ "__statedOptions": []
10863
+ },
9954
10864
  "required": false
9955
10865
  },
9956
10866
  "dedupeKey": {
9957
10867
  "type": "text",
10868
+ "_meta": {
10869
+ "__statedOptions": []
10870
+ },
9958
10871
  "required": false
9959
10872
  }
9960
10873
  },
@@ -10912,13 +11825,6 @@
10912
11825
  "exportName": "Mirror",
10913
11826
  "collectionExportName": "MirrorCollection",
10914
11827
  "displayLabelField": "name",
10915
- "validationRules": [
10916
- {
10917
- "field": "name",
10918
- "rule": "required",
10919
- "fieldType": "text"
10920
- }
10921
- ],
10922
11828
  "schema": {
10923
11829
  "tableName": "contents",
10924
11830
  "ddl": "CREATE TABLE IF NOT EXISTS \"contents\" (\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 \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"type\" TEXT,\n \"variant\" TEXT,\n \"file_key\" TEXT,\n \"author\" TEXT,\n \"name\" TEXT DEFAULT '',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"body_format\" TEXT,\n \"publish_date\" TIMESTAMP,\n \"url\" TEXT,\n \"source\" TEXT,\n \"original_url\" TEXT,\n \"language\" TEXT,\n \"tags\" JSON DEFAULT '[]',\n \"category\" TEXT,\n \"status\" TEXT DEFAULT 'draft',\n \"state\" TEXT DEFAULT 'active',\n \"metadata\" JSON DEFAULT '{}',\n \"thumbnail_asset_id\" UUID,\n \"feed_source_id\" UUID,\n \"source_guid\" TEXT,\n \"source_name\" TEXT,\n \"source_homepage_url\" TEXT,\n \"external_url\" TEXT,\n \"original_published_at\" TIMESTAMP,\n \"dedupe_key\" TEXT\n);",
@@ -11143,37 +12049,54 @@
11143
12049
  "className": "ContentVersion",
11144
12050
  "qualifiedName": "@happyvertical/smrt-content:ContentVersion",
11145
12051
  "collection": "contentversions",
11146
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-version.ts",
12052
+ "filePath": "src/content-version.ts",
11147
12053
  "packageName": "@happyvertical/smrt-content",
11148
12054
  "fields": {
11149
12055
  "contentId": {
11150
12056
  "type": "foreignKey",
11151
- "required": true,
11152
- "related": "Content",
11153
- "description": "The piece this version belongs to.",
11154
12057
  "_meta": {
11155
- "description": "The piece this version belongs to.",
12058
+ "__statedOptions": [
12059
+ "required",
12060
+ "requiredFor",
12061
+ "onDelete",
12062
+ "description",
12063
+ "related"
12064
+ ],
11156
12065
  "required": true,
12066
+ "description": "The piece this version belongs to.",
12067
+ "requiredFor": "identity",
11157
12068
  "onDelete": "CASCADE"
11158
- }
12069
+ },
12070
+ "required": true,
12071
+ "related": "Content",
12072
+ "description": "The piece this version belongs to."
11159
12073
  },
11160
12074
  "version": {
11161
12075
  "type": "integer",
11162
- "required": true,
11163
- "default": 1,
11164
- "description": "The number of this version, counting up from one.",
11165
12076
  "_meta": {
12077
+ "__statedOptions": [
12078
+ "description",
12079
+ "default"
12080
+ ],
11166
12081
  "description": "The number of this version, counting up from one."
11167
- }
12082
+ },
12083
+ "required": true,
12084
+ "default": 1,
12085
+ "description": "The number of this version, counting up from one."
11168
12086
  },
11169
12087
  "kind": {
11170
12088
  "type": "text",
11171
- "required": false,
11172
- "default": "manual",
11173
- "description": "Why the version was saved: a draft, a review, a publication or a correction.",
11174
12089
  "_meta": {
12090
+ "__statedOptions": [
12091
+ "description",
12092
+ "default",
12093
+ "enum"
12094
+ ],
11175
12095
  "description": "Why the version was saved: a draft, a review, a publication or a correction."
11176
12096
  },
12097
+ "required": false,
12098
+ "default": "manual",
12099
+ "description": "Why the version was saved: a draft, a review, a publication or a correction.",
11177
12100
  "enum": [
11178
12101
  "manual",
11179
12102
  "draft",
@@ -11185,50 +12108,68 @@
11185
12108
  },
11186
12109
  "title": {
11187
12110
  "type": "text",
11188
- "required": false,
11189
- "description": "The headline as it was in this version.",
11190
12111
  "_meta": {
12112
+ "__statedOptions": [
12113
+ "description"
12114
+ ],
11191
12115
  "description": "The headline as it was in this version."
11192
- }
12116
+ },
12117
+ "required": false,
12118
+ "description": "The headline as it was in this version."
11193
12119
  },
11194
12120
  "description": {
11195
12121
  "type": "text",
12122
+ "_meta": {
12123
+ "__statedOptions": []
12124
+ },
11196
12125
  "required": false
11197
12126
  },
11198
12127
  "body": {
11199
12128
  "type": "text",
12129
+ "_meta": {
12130
+ "__statedOptions": []
12131
+ },
11200
12132
  "required": false
11201
12133
  },
11202
12134
  "status": {
11203
12135
  "type": "text",
11204
- "required": false,
11205
- "description": "Where the piece stood when this version was saved.",
11206
12136
  "_meta": {
12137
+ "__statedOptions": [
12138
+ "description"
12139
+ ],
11207
12140
  "description": "Where the piece stood when this version was saved."
11208
- }
12141
+ },
12142
+ "required": false,
12143
+ "description": "Where the piece stood when this version was saved."
11209
12144
  },
11210
12145
  "summary": {
11211
12146
  "type": "text",
11212
- "required": false,
11213
- "description": "A short note on what changed in this version.",
11214
12147
  "_meta": {
12148
+ "__statedOptions": [
12149
+ "description"
12150
+ ],
11215
12151
  "description": "A short note on what changed in this version."
11216
- }
12152
+ },
12153
+ "required": false,
12154
+ "description": "A short note on what changed in this version."
11217
12155
  },
11218
12156
  "snapshot": {
11219
12157
  "type": "text",
12158
+ "_meta": {
12159
+ "__statedOptions": []
12160
+ },
11220
12161
  "required": false
11221
12162
  },
11222
12163
  "metadata": {
11223
12164
  "type": "text",
12165
+ "_meta": {
12166
+ "__statedOptions": []
12167
+ },
11224
12168
  "required": false
11225
12169
  },
11226
12170
  "tenantId": {
11227
12171
  "type": "text",
11228
- "required": false,
11229
12172
  "_meta": {
11230
- "sqlType": "UUID",
11231
- "nullable": true,
11232
12173
  "__tenancy": {
11233
12174
  "isTenantIdField": true,
11234
12175
  "autoFilter": true,
@@ -11238,19 +12179,35 @@
11238
12179
  "mode": "optional",
11239
12180
  "field": "tenantId",
11240
12181
  "allowSuperAdminBypass": false
11241
- }
11242
- }
12182
+ },
12183
+ "__statedOptions": [
12184
+ "sqlType",
12185
+ "nullable",
12186
+ "__tenancy",
12187
+ "required"
12188
+ ],
12189
+ "sqlType": "UUID",
12190
+ "nullable": true,
12191
+ "required": false
12192
+ },
12193
+ "required": false
11243
12194
  },
11244
12195
  "createdAt": {
11245
12196
  "type": "text",
11246
- "required": false,
11247
- "description": "When this version was saved.",
11248
12197
  "_meta": {
12198
+ "__statedOptions": [
12199
+ "description"
12200
+ ],
11249
12201
  "description": "When this version was saved."
11250
- }
12202
+ },
12203
+ "required": false,
12204
+ "description": "When this version was saved."
11251
12205
  },
11252
12206
  "updatedAt": {
11253
12207
  "type": "text",
12208
+ "_meta": {
12209
+ "__statedOptions": []
12210
+ },
11254
12211
  "required": false
11255
12212
  }
11256
12213
  },
@@ -11470,7 +12427,7 @@
11470
12427
  "className": "ContentVersionCollection",
11471
12428
  "qualifiedName": "@happyvertical/smrt-content:ContentVersionCollection",
11472
12429
  "collection": "contentversions",
11473
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content-versions.ts",
12430
+ "filePath": "src/content-versions.ts",
11474
12431
  "packageName": "@happyvertical/smrt-content",
11475
12432
  "fields": {},
11476
12433
  "methods": {
@@ -11749,23 +12706,26 @@
11749
12706
  "qualifiedName": "@happyvertical/smrt-content:Content",
11750
12707
  "collection": "contents",
11751
12708
  "description": "Structured content object with metadata and body text",
11752
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/content.ts",
12709
+ "filePath": "src/content.ts",
11753
12710
  "packageName": "@happyvertical/smrt-content",
11754
12711
  "fields": {
11755
12712
  "created_at": {
11756
12713
  "type": "datetime",
12714
+ "_meta": {
12715
+ "__statedOptions": []
12716
+ },
11757
12717
  "required": false
11758
12718
  },
11759
12719
  "updated_at": {
11760
12720
  "type": "datetime",
12721
+ "_meta": {
12722
+ "__statedOptions": []
12723
+ },
11761
12724
  "required": false
11762
12725
  },
11763
12726
  "tenantId": {
11764
12727
  "type": "text",
11765
- "required": false,
11766
12728
  "_meta": {
11767
- "sqlType": "UUID",
11768
- "nullable": true,
11769
12729
  "__tenancy": {
11770
12730
  "isTenantIdField": true,
11771
12731
  "autoFilter": true,
@@ -11775,69 +12735,108 @@
11775
12735
  "mode": "optional",
11776
12736
  "field": "tenantId",
11777
12737
  "allowSuperAdminBypass": false
11778
- }
11779
- }
12738
+ },
12739
+ "__statedOptions": [
12740
+ "sqlType",
12741
+ "nullable",
12742
+ "__tenancy",
12743
+ "required"
12744
+ ],
12745
+ "sqlType": "UUID",
12746
+ "nullable": true,
12747
+ "required": false
12748
+ },
12749
+ "required": false
11780
12750
  },
11781
12751
  "type": {
11782
12752
  "type": "text",
11783
- "required": false,
11784
- "description": "What kind of piece this is, such as an article or a document.",
11785
12753
  "_meta": {
12754
+ "__statedOptions": [
12755
+ "description"
12756
+ ],
11786
12757
  "description": "What kind of piece this is, such as an article or a document."
11787
- }
12758
+ },
12759
+ "required": false,
12760
+ "description": "What kind of piece this is, such as an article or a document."
11788
12761
  },
11789
12762
  "variant": {
11790
12763
  "type": "text",
12764
+ "_meta": {
12765
+ "__statedOptions": []
12766
+ },
11791
12767
  "required": false
11792
12768
  },
11793
12769
  "fileKey": {
11794
12770
  "type": "text",
12771
+ "_meta": {
12772
+ "__statedOptions": []
12773
+ },
11795
12774
  "required": false
11796
12775
  },
11797
12776
  "author": {
11798
12777
  "type": "text",
11799
- "required": false,
11800
- "description": "Who wrote this piece.",
11801
12778
  "_meta": {
12779
+ "__statedOptions": [
12780
+ "description"
12781
+ ],
11802
12782
  "description": "Who wrote this piece."
11803
- }
12783
+ },
12784
+ "required": false,
12785
+ "description": "Who wrote this piece."
11804
12786
  },
11805
12787
  "name": {
11806
12788
  "type": "text",
11807
- "required": true,
11808
- "default": "",
11809
- "description": "A short name used to find this piece in lists.",
11810
12789
  "_meta": {
11811
- "required": true,
12790
+ "__statedOptions": [
12791
+ "description",
12792
+ "default"
12793
+ ],
11812
12794
  "description": "A short name used to find this piece in lists."
11813
- }
12795
+ },
12796
+ "required": false,
12797
+ "default": "",
12798
+ "description": "A short name used to find this piece in lists."
11814
12799
  },
11815
12800
  "title": {
11816
12801
  "type": "text",
11817
- "required": false,
11818
- "description": "The headline readers see.",
11819
12802
  "_meta": {
12803
+ "__statedOptions": [
12804
+ "description"
12805
+ ],
11820
12806
  "description": "The headline readers see."
11821
- }
12807
+ },
12808
+ "required": false,
12809
+ "description": "The headline readers see."
11822
12810
  },
11823
12811
  "description": {
11824
12812
  "type": "text",
11825
- "required": false,
11826
- "description": "A one or two sentence summary of the piece.",
11827
12813
  "_meta": {
12814
+ "__statedOptions": [
12815
+ "description"
12816
+ ],
11828
12817
  "description": "A one or two sentence summary of the piece."
11829
- }
12818
+ },
12819
+ "required": false,
12820
+ "description": "A one or two sentence summary of the piece."
11830
12821
  },
11831
12822
  "body": {
11832
12823
  "type": "text",
11833
- "required": false,
11834
- "description": "The full text of the piece.",
11835
12824
  "_meta": {
12825
+ "__statedOptions": [
12826
+ "description"
12827
+ ],
11836
12828
  "description": "The full text of the piece."
11837
- }
12829
+ },
12830
+ "required": false,
12831
+ "description": "The full text of the piece."
11838
12832
  },
11839
12833
  "bodyFormat": {
11840
12834
  "type": "text",
12835
+ "_meta": {
12836
+ "__statedOptions": [
12837
+ "enum"
12838
+ ]
12839
+ },
11841
12840
  "required": false,
11842
12841
  "enum": [
11843
12842
  "markdown",
@@ -11846,53 +12845,80 @@
11846
12845
  },
11847
12846
  "publish_date": {
11848
12847
  "type": "datetime",
11849
- "required": false,
11850
- "description": "The date the piece went out, or is due to go out.",
11851
12848
  "_meta": {
12849
+ "__statedOptions": [
12850
+ "description"
12851
+ ],
11852
12852
  "description": "The date the piece went out, or is due to go out."
11853
- }
12853
+ },
12854
+ "required": false,
12855
+ "description": "The date the piece went out, or is due to go out."
11854
12856
  },
11855
12857
  "url": {
11856
12858
  "type": "text",
12859
+ "_meta": {
12860
+ "__statedOptions": []
12861
+ },
11857
12862
  "required": false
11858
12863
  },
11859
12864
  "source": {
11860
12865
  "type": "text",
12866
+ "_meta": {
12867
+ "__statedOptions": []
12868
+ },
11861
12869
  "required": false
11862
12870
  },
11863
12871
  "original_url": {
11864
12872
  "type": "text",
12873
+ "_meta": {
12874
+ "__statedOptions": []
12875
+ },
11865
12876
  "required": false
11866
12877
  },
11867
12878
  "language": {
11868
12879
  "type": "text",
12880
+ "_meta": {
12881
+ "__statedOptions": []
12882
+ },
11869
12883
  "required": false
11870
12884
  },
11871
12885
  "tags": {
11872
12886
  "type": "json",
11873
- "required": false,
11874
- "default": [],
11875
- "description": "Words that group pieces by subject.",
11876
12887
  "_meta": {
12888
+ "__statedOptions": [
12889
+ "description",
12890
+ "default"
12891
+ ],
11877
12892
  "description": "Words that group pieces by subject."
11878
- }
12893
+ },
12894
+ "required": false,
12895
+ "default": [],
12896
+ "description": "Words that group pieces by subject."
11879
12897
  },
11880
12898
  "category": {
11881
12899
  "type": "text",
11882
- "required": false,
11883
- "description": "The one section the piece belongs to, such as news or local.",
11884
12900
  "_meta": {
12901
+ "__statedOptions": [
12902
+ "description"
12903
+ ],
11885
12904
  "description": "The one section the piece belongs to, such as news or local."
11886
- }
12905
+ },
12906
+ "required": false,
12907
+ "description": "The one section the piece belongs to, such as news or local."
11887
12908
  },
11888
12909
  "status": {
11889
12910
  "type": "text",
11890
- "required": false,
11891
- "default": "draft",
11892
- "description": "Where the piece stands: draft, in review, published or archived.",
11893
12911
  "_meta": {
12912
+ "__statedOptions": [
12913
+ "description",
12914
+ "default",
12915
+ "enum"
12916
+ ],
11894
12917
  "description": "Where the piece stands: draft, in review, published or archived."
11895
12918
  },
12919
+ "required": false,
12920
+ "default": "draft",
12921
+ "description": "Where the piece stands: draft, in review, published or archived.",
11896
12922
  "enum": [
11897
12923
  "published",
11898
12924
  "draft",
@@ -11903,6 +12929,12 @@
11903
12929
  },
11904
12930
  "state": {
11905
12931
  "type": "text",
12932
+ "_meta": {
12933
+ "__statedOptions": [
12934
+ "default",
12935
+ "enum"
12936
+ ]
12937
+ },
11906
12938
  "required": false,
11907
12939
  "default": "active",
11908
12940
  "enum": [
@@ -11913,11 +12945,21 @@
11913
12945
  },
11914
12946
  "metadata": {
11915
12947
  "type": "json",
12948
+ "_meta": {
12949
+ "__statedOptions": [
12950
+ "default"
12951
+ ]
12952
+ },
11916
12953
  "required": false,
11917
12954
  "default": {}
11918
12955
  },
11919
12956
  "thumbnailAssetId": {
11920
12957
  "type": "crossPackageRef",
12958
+ "_meta": {
12959
+ "__statedOptions": [
12960
+ "related"
12961
+ ]
12962
+ },
11921
12963
  "required": false,
11922
12964
  "related": "@happyvertical/smrt-assets:Asset"
11923
12965
  }
@@ -13006,13 +14048,6 @@
13006
14048
  "exportName": "Content",
13007
14049
  "collectionExportName": "ContentCollection",
13008
14050
  "displayLabelField": "name",
13009
- "validationRules": [
13010
- {
13011
- "field": "name",
13012
- "rule": "required",
13013
- "fieldType": "text"
13014
- }
13015
- ],
13016
14051
  "schema": {
13017
14052
  "tableName": "contents",
13018
14053
  "ddl": "CREATE TABLE IF NOT EXISTS \"contents\" (\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 \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"type\" TEXT,\n \"variant\" TEXT,\n \"file_key\" TEXT,\n \"author\" TEXT,\n \"name\" TEXT DEFAULT '',\n \"title\" TEXT,\n \"description\" TEXT,\n \"body\" TEXT,\n \"body_format\" TEXT,\n \"publish_date\" TIMESTAMP,\n \"url\" TEXT,\n \"source\" TEXT,\n \"original_url\" TEXT,\n \"language\" TEXT,\n \"tags\" JSON DEFAULT '[]',\n \"category\" TEXT,\n \"status\" TEXT DEFAULT 'draft',\n \"state\" TEXT DEFAULT 'active',\n \"metadata\" JSON DEFAULT '{}',\n \"thumbnail_asset_id\" UUID,\n \"feed_source_id\" UUID,\n \"source_guid\" TEXT,\n \"source_name\" TEXT,\n \"source_homepage_url\" TEXT,\n \"external_url\" TEXT,\n \"original_published_at\" TIMESTAMP,\n \"dedupe_key\" TEXT\n);",
@@ -13238,15 +14273,22 @@
13238
14273
  "qualifiedName": "@happyvertical/smrt-content:Contents",
13239
14274
  "collection": "contents",
13240
14275
  "description": "Collection for managing Content objects",
13241
- "filePath": "/home/runner/work/smrt/smrt/packages/content/src/contents.ts",
14276
+ "filePath": "src/contents.ts",
13242
14277
  "packageName": "@happyvertical/smrt-content",
13243
14278
  "fields": {
13244
14279
  "contentDir": {
13245
14280
  "type": "text",
14281
+ "_meta": {
14282
+ "__statedOptions": []
14283
+ },
13246
14284
  "required": false
13247
14285
  },
13248
14286
  "loaded": {
13249
14287
  "type": "json",
14288
+ "_meta": {
14289
+ "__typeUnresolved": true,
14290
+ "__statedOptions": []
14291
+ },
13250
14292
  "required": true
13251
14293
  }
13252
14294
  },
@@ -14230,5 +15272,6 @@
14230
15272
  "@happyvertical/smrt-users"
14231
15273
  ]
14232
15274
  },
15275
+ "schemaFingerprint": "160db0e9cbf59cf9d2883643ebd7377c2b11446da7a57cf44c845b3a7093d99a",
14233
15276
  "stampsConstructors": true
14234
15277
  }