@happyvertical/smrt-events 0.44.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-events",
5
- "packageVersion": "0.44.0",
5
+ "packageVersion": "0.45.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-events:EventAssetCollection": {
8
8
  "name": "eventassetcollection",
@@ -1322,2228 +1322,536 @@
1322
1322
  }
1323
1323
  },
1324
1324
  "methods": {
1325
- "withDatabase": {
1326
- "name": "withDatabase",
1325
+ "getParent": {
1326
+ "name": "getParent",
1327
1327
  "async": true,
1328
- "parameters": [
1329
- {
1330
- "name": "db",
1331
- "type": "DatabaseInterface",
1332
- "optional": false
1333
- },
1334
- {
1335
- "name": "operation",
1336
- "type": "Function",
1337
- "optional": false
1338
- }
1339
- ],
1340
- "returnType": "Promise<T>",
1341
- "isStatic": false,
1342
- "isPublic": true
1343
- },
1344
- "getAiUsageSnapshot": {
1345
- "name": "getAiUsageSnapshot",
1346
- "async": false,
1347
- "parameters": [],
1348
- "returnType": "AiUsageSnapshot | undefined",
1349
- "isStatic": false,
1350
- "isPublic": true
1351
- },
1352
- "resetAiUsage": {
1353
- "name": "resetAiUsage",
1354
- "async": false,
1355
1328
  "parameters": [],
1356
- "returnType": "void",
1357
- "isStatic": false,
1358
- "isPublic": true
1359
- },
1360
- "listAiUsage": {
1361
- "name": "listAiUsage",
1362
- "async": true,
1363
- "parameters": [
1364
- {
1365
- "name": "options",
1366
- "type": "AiUsageListOptions",
1367
- "optional": true
1368
- }
1369
- ],
1370
- "returnType": "Promise<SmrtAiUsageRecord[]>",
1329
+ "returnType": "Promise<null>",
1371
1330
  "isStatic": false,
1372
1331
  "isPublic": true
1373
1332
  },
1374
- "summarizeAiUsage": {
1375
- "name": "summarizeAiUsage",
1333
+ "getChildren": {
1334
+ "name": "getChildren",
1376
1335
  "async": true,
1377
- "parameters": [
1378
- {
1379
- "name": "options",
1380
- "type": "AiUsageSummaryOptions",
1381
- "optional": true
1382
- }
1383
- ],
1384
- "returnType": "Promise<Record<string, AiUsageStats>>",
1385
- "isStatic": false,
1386
- "isPublic": true
1387
- },
1388
- "destroy": {
1389
- "name": "destroy",
1390
- "async": false,
1391
- "parameters": [],
1392
- "returnType": "void",
1393
- "isStatic": false,
1394
- "isPublic": true
1395
- },
1396
- "markAsPersisted": {
1397
- "name": "markAsPersisted",
1398
- "async": false,
1399
1336
  "parameters": [],
1400
- "returnType": "void",
1337
+ "returnType": "Promise",
1401
1338
  "isStatic": false,
1402
1339
  "isPublic": true
1403
1340
  },
1404
- "requireInsertOnSave": {
1405
- "name": "requireInsertOnSave",
1406
- "async": false,
1341
+ "getAncestors": {
1342
+ "name": "getAncestors",
1343
+ "async": true,
1407
1344
  "parameters": [],
1408
- "returnType": "void",
1345
+ "returnType": "Promise",
1409
1346
  "isStatic": false,
1410
1347
  "isPublic": true
1411
1348
  },
1412
- "withTransaction": {
1413
- "name": "withTransaction",
1349
+ "getDescendants": {
1350
+ "name": "getDescendants",
1414
1351
  "async": true,
1415
- "parameters": [
1416
- {
1417
- "name": "operation",
1418
- "type": "Function",
1419
- "optional": false
1420
- }
1421
- ],
1422
- "returnType": "Promise<T>",
1352
+ "parameters": [],
1353
+ "returnType": "Promise",
1423
1354
  "isStatic": false,
1424
1355
  "isPublic": true
1425
1356
  },
1426
- "initialize": {
1427
- "name": "initialize",
1357
+ "getHierarchy": {
1358
+ "name": "getHierarchy",
1428
1359
  "async": true,
1429
1360
  "parameters": [],
1430
- "returnType": "Promise",
1361
+ "returnType": "Promise<HierarchyView>",
1431
1362
  "isStatic": false,
1432
1363
  "isPublic": true
1433
1364
  },
1434
- "loadDataFromDb": {
1435
- "name": "loadDataFromDb",
1365
+ "moveTo": {
1366
+ "name": "moveTo",
1436
1367
  "async": true,
1437
1368
  "parameters": [
1438
1369
  {
1439
- "name": "data",
1440
- "type": "Record<string>",
1370
+ "name": "newParent",
1371
+ "type": "string | null",
1441
1372
  "optional": false
1442
1373
  }
1443
1374
  ],
1444
- "returnType": "any",
1445
- "isStatic": false,
1446
- "isPublic": true
1447
- },
1448
- "getFields": {
1449
- "name": "getFields",
1450
- "async": true,
1451
- "parameters": [],
1452
- "returnType": "Promise<any>",
1453
- "isStatic": false,
1454
- "isPublic": true
1455
- },
1456
- "toJSON": {
1457
- "name": "toJSON",
1458
- "async": false,
1459
- "parameters": [],
1460
- "returnType": "any",
1375
+ "returnType": "Promise<void>",
1461
1376
  "isStatic": false,
1462
1377
  "isPublic": true
1463
1378
  },
1464
- "toPlainObject": {
1465
- "name": "toPlainObject",
1379
+ "getMetadata": {
1380
+ "name": "getMetadata",
1466
1381
  "async": false,
1467
1382
  "parameters": [],
1468
1383
  "returnType": "Record<string>",
1469
1384
  "isStatic": false,
1470
1385
  "isPublic": true
1471
1386
  },
1472
- "toPublicJSON": {
1473
- "name": "toPublicJSON",
1387
+ "setMetadata": {
1388
+ "name": "setMetadata",
1474
1389
  "async": false,
1475
1390
  "parameters": [
1476
1391
  {
1477
- "name": "options",
1478
- "type": "PublicJsonOptions",
1479
- "optional": true
1392
+ "name": "data",
1393
+ "type": "Record<string>",
1394
+ "optional": false
1480
1395
  }
1481
1396
  ],
1482
- "returnType": "Record<string>",
1483
- "isStatic": false,
1484
- "isPublic": true
1485
- },
1486
- "getId": {
1487
- "name": "getId",
1488
- "async": true,
1489
- "parameters": [],
1490
- "returnType": "any",
1491
- "isStatic": false,
1492
- "isPublic": true
1493
- },
1494
- "getSlug": {
1495
- "name": "getSlug",
1496
- "async": true,
1497
- "parameters": [],
1498
- "returnType": "any",
1499
- "isStatic": false,
1500
- "isPublic": true
1501
- },
1502
- "getSavedId": {
1503
- "name": "getSavedId",
1504
- "async": true,
1505
- "parameters": [],
1506
- "returnType": "any",
1507
- "isStatic": false,
1508
- "isPublic": true
1509
- },
1510
- "isSaved": {
1511
- "name": "isSaved",
1512
- "async": true,
1513
- "parameters": [],
1514
- "returnType": "any",
1397
+ "returnType": "void",
1515
1398
  "isStatic": false,
1516
1399
  "isPublic": true
1517
1400
  },
1518
- "save": {
1519
- "name": "save",
1520
- "async": true,
1401
+ "updateMetadata": {
1402
+ "name": "updateMetadata",
1403
+ "async": false,
1521
1404
  "parameters": [
1522
1405
  {
1523
- "name": "options",
1524
- "type": "SmrtSaveOptions",
1525
- "optional": true
1406
+ "name": "updates",
1407
+ "type": "Record<string>",
1408
+ "optional": false
1526
1409
  }
1527
1410
  ],
1528
- "returnType": "any",
1411
+ "returnType": "void",
1529
1412
  "isStatic": false,
1530
1413
  "isPublic": true
1531
1414
  },
1532
- "claimRevision": {
1533
- "name": "claimRevision",
1415
+ "updateStatus": {
1416
+ "name": "updateStatus",
1534
1417
  "async": true,
1535
1418
  "parameters": [
1536
1419
  {
1537
- "name": "expectedUpdatedAt",
1538
- "type": "Date | string",
1420
+ "name": "newStatus",
1421
+ "type": "EventStatus",
1539
1422
  "optional": false
1540
1423
  }
1541
1424
  ],
1542
- "returnType": "Promise",
1425
+ "returnType": "Promise<void>",
1543
1426
  "isStatic": false,
1544
1427
  "isPublic": true
1545
1428
  },
1546
- "classifyConstraintError": {
1547
- "name": "classifyConstraintError",
1548
- "async": false,
1549
- "parameters": [
1550
- {
1551
- "name": "message",
1552
- "type": "string",
1553
- "optional": false
1554
- }
1555
- ],
1556
- "returnType": "'unique' | 'not_null' | null",
1557
- "isStatic": true,
1558
- "isPublic": true
1559
- },
1560
- "loadFromId": {
1561
- "name": "loadFromId",
1429
+ "getSeries": {
1430
+ "name": "getSeries",
1562
1431
  "async": true,
1563
1432
  "parameters": [],
1564
1433
  "returnType": "any",
1565
1434
  "isStatic": false,
1566
1435
  "isPublic": true
1567
1436
  },
1568
- "loadFromSlug": {
1569
- "name": "loadFromSlug",
1437
+ "getType": {
1438
+ "name": "getType",
1570
1439
  "async": true,
1571
1440
  "parameters": [],
1572
1441
  "returnType": "any",
1573
1442
  "isStatic": false,
1574
1443
  "isPublic": true
1575
1444
  },
1576
- "is": {
1577
- "name": "is",
1445
+ "getPlace": {
1446
+ "name": "getPlace",
1578
1447
  "async": true,
1579
- "parameters": [
1580
- {
1581
- "name": "criteria",
1582
- "type": "string",
1583
- "optional": false
1584
- },
1585
- {
1586
- "name": "options",
1587
- "type": "AiOperationOptions",
1588
- "optional": true
1589
- }
1590
- ],
1448
+ "parameters": [],
1591
1449
  "returnType": "any",
1592
1450
  "isStatic": false,
1593
1451
  "isPublic": true
1594
1452
  },
1595
- "do": {
1596
- "name": "do",
1453
+ "getRootEvent": {
1454
+ "name": "getRootEvent",
1597
1455
  "async": true,
1598
- "parameters": [
1599
- {
1600
- "name": "instructions",
1601
- "type": "string",
1602
- "optional": false
1603
- },
1604
- {
1605
- "name": "options",
1606
- "type": "AiOperationOptions",
1607
- "optional": true
1608
- }
1609
- ],
1610
- "returnType": "any",
1456
+ "parameters": [],
1457
+ "returnType": "Promise<Event>",
1611
1458
  "isStatic": false,
1612
1459
  "isPublic": true
1613
1460
  },
1614
- "describe": {
1615
- "name": "describe",
1461
+ "getParticipants": {
1462
+ "name": "getParticipants",
1616
1463
  "async": true,
1617
- "parameters": [
1618
- {
1619
- "name": "options",
1620
- "type": "AiOperationOptions",
1621
- "optional": true
1622
- }
1623
- ],
1464
+ "parameters": [],
1624
1465
  "returnType": "any",
1625
1466
  "isStatic": false,
1626
1467
  "isPublic": true
1627
1468
  },
1628
- "delete": {
1629
- "name": "delete",
1469
+ "getAssets": {
1470
+ "name": "getAssets",
1630
1471
  "async": true,
1631
- "parameters": [],
1632
- "returnType": "Promise<void>",
1633
- "isStatic": false,
1634
- "isPublic": true
1635
- },
1636
- "isRelatedLoaded": {
1637
- "name": "isRelatedLoaded",
1638
- "async": false,
1639
1472
  "parameters": [
1640
1473
  {
1641
- "name": "fieldName",
1474
+ "name": "relationship",
1642
1475
  "type": "string",
1643
- "optional": false
1476
+ "optional": true
1644
1477
  }
1645
1478
  ],
1646
- "returnType": "boolean",
1479
+ "returnType": "Promise<Asset[]>",
1647
1480
  "isStatic": false,
1648
1481
  "isPublic": true
1649
1482
  },
1650
- "_setLoadedRelationship": {
1651
- "name": "_setLoadedRelationship",
1652
- "async": false,
1483
+ "addAsset": {
1484
+ "name": "addAsset",
1485
+ "async": true,
1653
1486
  "parameters": [
1654
1487
  {
1655
- "name": "fieldName",
1656
- "type": "string",
1488
+ "name": "asset",
1489
+ "type": "Asset",
1657
1490
  "optional": false
1658
1491
  },
1659
1492
  {
1660
- "name": "value",
1493
+ "name": "relationship",
1661
1494
  "type": "any",
1662
- "optional": false
1663
- }
1664
- ],
1665
- "returnType": "void",
1666
- "isStatic": false,
1667
- "isPublic": true
1668
- },
1669
- "loadRelated": {
1670
- "name": "loadRelated",
1671
- "async": true,
1672
- "parameters": [
1673
- {
1674
- "name": "fieldName",
1675
- "type": "string",
1676
- "optional": false
1495
+ "optional": true,
1496
+ "default": "attachment"
1677
1497
  },
1678
1498
  {
1679
- "name": "opts",
1680
- "type": "LoadRelatedOptions",
1499
+ "name": "sortOrder",
1500
+ "type": "any",
1681
1501
  "optional": true
1682
1502
  }
1683
1503
  ],
1684
- "returnType": "Promise<any>",
1504
+ "returnType": "Promise<void>",
1685
1505
  "isStatic": false,
1686
1506
  "isPublic": true
1687
1507
  },
1688
- "loadRelatedMany": {
1689
- "name": "loadRelatedMany",
1508
+ "removeAsset": {
1509
+ "name": "removeAsset",
1690
1510
  "async": true,
1691
1511
  "parameters": [
1692
1512
  {
1693
- "name": "fieldName",
1513
+ "name": "assetId",
1694
1514
  "type": "string",
1695
1515
  "optional": false
1696
1516
  },
1697
1517
  {
1698
- "name": "opts",
1699
- "type": "LoadRelatedOptions",
1518
+ "name": "relationship",
1519
+ "type": "string",
1700
1520
  "optional": true
1701
1521
  }
1702
1522
  ],
1703
- "returnType": "Promise<any[]>",
1523
+ "returnType": "Promise<void>",
1704
1524
  "isStatic": false,
1705
1525
  "isPublic": true
1706
1526
  },
1707
- "getRelated": {
1708
- "name": "getRelated",
1709
- "async": true,
1710
- "parameters": [
1711
- {
1712
- "name": "fieldName",
1713
- "type": "string",
1714
- "optional": false
1715
- },
1716
- {
1717
- "name": "opts",
1718
- "type": "LoadRelatedOptions",
1719
- "optional": true
1720
- }
1721
- ],
1722
- "returnType": "Promise<any>",
1527
+ "isInProgress": {
1528
+ "name": "isInProgress",
1529
+ "async": false,
1530
+ "parameters": [],
1531
+ "returnType": "boolean",
1723
1532
  "isStatic": false,
1724
1533
  "isPublic": true
1725
1534
  },
1726
- "getAvailableTools": {
1727
- "name": "getAvailableTools",
1535
+ "isRoot": {
1536
+ "name": "isRoot",
1728
1537
  "async": false,
1729
1538
  "parameters": [],
1730
- "returnType": "AITool[]",
1731
- "isStatic": false,
1732
- "isPublic": true
1733
- },
1734
- "executeToolCall": {
1735
- "name": "executeToolCall",
1736
- "async": true,
1737
- "parameters": [
1738
- {
1739
- "name": "toolCall",
1740
- "type": "ToolCall",
1741
- "optional": false
1742
- }
1743
- ],
1744
- "returnType": "Promise<ToolCallResult>",
1745
- "isStatic": false,
1746
- "isPublic": true
1747
- },
1748
- "remember": {
1749
- "name": "remember",
1750
- "async": true,
1751
- "parameters": [
1752
- {
1753
- "name": "options",
1754
- "type": "object",
1755
- "optional": false
1756
- }
1757
- ],
1758
- "returnType": "Promise<void>",
1759
- "isStatic": false,
1760
- "isPublic": true
1761
- },
1762
- "recall": {
1763
- "name": "recall",
1764
- "async": true,
1765
- "parameters": [
1766
- {
1767
- "name": "options",
1768
- "type": "object",
1769
- "optional": false
1770
- }
1771
- ],
1772
- "returnType": "Promise",
1773
- "isStatic": false,
1774
- "isPublic": true
1775
- },
1776
- "recallAll": {
1777
- "name": "recallAll",
1778
- "async": true,
1779
- "parameters": [
1780
- {
1781
- "name": "options",
1782
- "type": "object",
1783
- "optional": true
1784
- }
1785
- ],
1786
- "returnType": "Promise<Map<string>>",
1787
- "isStatic": false,
1788
- "isPublic": true
1789
- },
1790
- "forget": {
1791
- "name": "forget",
1792
- "async": true,
1793
- "parameters": [
1794
- {
1795
- "name": "options",
1796
- "type": "object",
1797
- "optional": false
1798
- }
1799
- ],
1800
- "returnType": "Promise<void>",
1801
- "isStatic": false,
1802
- "isPublic": true
1803
- },
1804
- "forgetScope": {
1805
- "name": "forgetScope",
1806
- "async": true,
1807
- "parameters": [
1808
- {
1809
- "name": "options",
1810
- "type": "object",
1811
- "optional": false
1812
- }
1813
- ],
1814
- "returnType": "Promise<number>",
1815
- "isStatic": false,
1816
- "isPublic": true
1817
- },
1818
- "generateEmbeddings": {
1819
- "name": "generateEmbeddings",
1820
- "async": true,
1821
- "parameters": [
1822
- {
1823
- "name": "options",
1824
- "type": "GenerateEmbeddingsOptions",
1825
- "optional": true
1826
- }
1827
- ],
1828
- "returnType": "Promise<void>",
1829
- "isStatic": false,
1830
- "isPublic": true
1831
- },
1832
- "getEmbedding": {
1833
- "name": "getEmbedding",
1834
- "async": true,
1835
- "parameters": [
1836
- {
1837
- "name": "fieldName",
1838
- "type": "string",
1839
- "optional": false
1840
- },
1841
- {
1842
- "name": "model",
1843
- "type": "string",
1844
- "optional": true
1845
- }
1846
- ],
1847
- "returnType": "Promise<number[] | null>",
1848
- "isStatic": false,
1849
- "isPublic": true
1850
- },
1851
- "hasStaleEmbeddings": {
1852
- "name": "hasStaleEmbeddings",
1853
- "async": true,
1854
- "parameters": [],
1855
- "returnType": "Promise<boolean>",
1856
- "isStatic": false,
1857
- "isPublic": true
1858
- },
1859
- "clearEmbeddings": {
1860
- "name": "clearEmbeddings",
1861
- "async": true,
1862
- "parameters": [],
1863
- "returnType": "Promise<void>",
1864
- "isStatic": false,
1865
- "isPublic": true
1866
- },
1867
- "getParent": {
1868
- "name": "getParent",
1869
- "async": true,
1870
- "parameters": [],
1871
- "returnType": "Promise<null>",
1872
- "isStatic": false,
1873
- "isPublic": true
1874
- },
1875
- "getChildren": {
1876
- "name": "getChildren",
1877
- "async": true,
1878
- "parameters": [],
1879
- "returnType": "Promise",
1880
- "isStatic": false,
1881
- "isPublic": true
1882
- },
1883
- "getAncestors": {
1884
- "name": "getAncestors",
1885
- "async": true,
1886
- "parameters": [],
1887
- "returnType": "Promise",
1888
- "isStatic": false,
1889
- "isPublic": true
1890
- },
1891
- "getDescendants": {
1892
- "name": "getDescendants",
1893
- "async": true,
1894
- "parameters": [],
1895
- "returnType": "Promise",
1896
- "isStatic": false,
1897
- "isPublic": true
1898
- },
1899
- "getHierarchy": {
1900
- "name": "getHierarchy",
1901
- "async": true,
1902
- "parameters": [],
1903
- "returnType": "Promise<HierarchyView>",
1904
- "isStatic": false,
1905
- "isPublic": true
1906
- },
1907
- "moveTo": {
1908
- "name": "moveTo",
1909
- "async": true,
1910
- "parameters": [
1911
- {
1912
- "name": "newParent",
1913
- "type": "string | null",
1914
- "optional": false
1915
- }
1916
- ],
1917
- "returnType": "Promise<void>",
1918
- "isStatic": false,
1919
- "isPublic": true
1920
- },
1921
- "getMetadata": {
1922
- "name": "getMetadata",
1923
- "async": false,
1924
- "parameters": [],
1925
- "returnType": "Record<string>",
1926
- "isStatic": false,
1927
- "isPublic": true
1928
- },
1929
- "setMetadata": {
1930
- "name": "setMetadata",
1931
- "async": false,
1932
- "parameters": [
1933
- {
1934
- "name": "data",
1935
- "type": "Record<string>",
1936
- "optional": false
1937
- }
1938
- ],
1939
- "returnType": "void",
1940
- "isStatic": false,
1941
- "isPublic": true
1942
- },
1943
- "updateMetadata": {
1944
- "name": "updateMetadata",
1945
- "async": false,
1946
- "parameters": [
1947
- {
1948
- "name": "updates",
1949
- "type": "Record<string>",
1950
- "optional": false
1951
- }
1952
- ],
1953
- "returnType": "void",
1954
- "isStatic": false,
1955
- "isPublic": true
1956
- },
1957
- "updateStatus": {
1958
- "name": "updateStatus",
1959
- "async": true,
1960
- "parameters": [
1961
- {
1962
- "name": "newStatus",
1963
- "type": "EventStatus",
1964
- "optional": false
1965
- }
1966
- ],
1967
- "returnType": "Promise<void>",
1968
- "isStatic": false,
1969
- "isPublic": true
1970
- },
1971
- "getSeries": {
1972
- "name": "getSeries",
1973
- "async": true,
1974
- "parameters": [],
1975
- "returnType": "any",
1976
- "isStatic": false,
1977
- "isPublic": true
1978
- },
1979
- "getType": {
1980
- "name": "getType",
1981
- "async": true,
1982
- "parameters": [],
1983
- "returnType": "any",
1984
- "isStatic": false,
1985
- "isPublic": true
1986
- },
1987
- "getPlace": {
1988
- "name": "getPlace",
1989
- "async": true,
1990
- "parameters": [],
1991
- "returnType": "any",
1992
- "isStatic": false,
1993
- "isPublic": true
1994
- },
1995
- "getRootEvent": {
1996
- "name": "getRootEvent",
1997
- "async": true,
1998
- "parameters": [],
1999
- "returnType": "Promise<Event>",
2000
- "isStatic": false,
2001
- "isPublic": true
2002
- },
2003
- "getParticipants": {
2004
- "name": "getParticipants",
2005
- "async": true,
2006
- "parameters": [],
2007
- "returnType": "any",
2008
- "isStatic": false,
2009
- "isPublic": true
2010
- },
2011
- "getAssets": {
2012
- "name": "getAssets",
2013
- "async": true,
2014
- "parameters": [
2015
- {
2016
- "name": "relationship",
2017
- "type": "string",
2018
- "optional": true
2019
- }
2020
- ],
2021
- "returnType": "Promise<Asset[]>",
2022
- "isStatic": false,
2023
- "isPublic": true
2024
- },
2025
- "addAsset": {
2026
- "name": "addAsset",
2027
- "async": true,
2028
- "parameters": [
2029
- {
2030
- "name": "asset",
2031
- "type": "Asset",
2032
- "optional": false
2033
- },
2034
- {
2035
- "name": "relationship",
2036
- "type": "any",
2037
- "optional": true,
2038
- "default": "attachment"
2039
- },
2040
- {
2041
- "name": "sortOrder",
2042
- "type": "any",
2043
- "optional": true
2044
- }
2045
- ],
2046
- "returnType": "Promise<void>",
2047
- "isStatic": false,
2048
- "isPublic": true
2049
- },
2050
- "removeAsset": {
2051
- "name": "removeAsset",
2052
- "async": true,
2053
- "parameters": [
2054
- {
2055
- "name": "assetId",
2056
- "type": "string",
2057
- "optional": false
2058
- },
2059
- {
2060
- "name": "relationship",
2061
- "type": "string",
2062
- "optional": true
2063
- }
2064
- ],
2065
- "returnType": "Promise<void>",
2066
- "isStatic": false,
2067
- "isPublic": true
2068
- },
2069
- "isInProgress": {
2070
- "name": "isInProgress",
2071
- "async": false,
2072
- "parameters": [],
2073
- "returnType": "boolean",
2074
- "isStatic": false,
2075
- "isPublic": true
2076
- },
2077
- "isRoot": {
2078
- "name": "isRoot",
2079
- "async": false,
2080
- "parameters": [],
2081
- "returnType": "boolean",
2082
- "isStatic": false,
2083
- "isPublic": true
2084
- }
2085
- },
2086
- "decoratorConfig": {
2087
- "tableStrategy": "sti",
2088
- "api": {
2089
- "include": [
2090
- "list",
2091
- "get",
2092
- "create",
2093
- "update",
2094
- "delete"
2095
- ]
2096
- },
2097
- "mcp": {
2098
- "include": [
2099
- "list",
2100
- "get",
2101
- "create",
2102
- "update"
2103
- ]
2104
- },
2105
- "cli": true,
2106
- "tenantScoped": {
2107
- "mode": "optional"
2108
- },
2109
- "conflictColumns": [
2110
- "tenant_id",
2111
- "slug",
2112
- "context",
2113
- "_meta_type"
2114
- ]
2115
- },
2116
- "extends": "SmrtHierarchical",
2117
- "exportName": "Event",
2118
- "collectionExportName": "EventCollection",
2119
- "schema": {
2120
- "tableName": "events",
2121
- "ddl": "CREATE TABLE IF NOT EXISTS \"events\" (\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 \"parent_id\" UUID,\n \"tenant_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"series_id\" UUID,\n \"type_id\" UUID,\n \"place_id\" UUID,\n \"description\" TEXT,\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"status\" TEXT DEFAULT 'scheduled',\n \"round\" INTEGER,\n \"metadata\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT\n);",
2122
- "columns": {
2123
- "id": {
2124
- "type": "UUID",
2125
- "primaryKey": true,
2126
- "referenceKind": "id",
2127
- "notNull": true
2128
- },
2129
- "slug": {
2130
- "type": "TEXT",
2131
- "notNull": true
2132
- },
2133
- "context": {
2134
- "type": "TEXT",
2135
- "notNull": true,
2136
- "default": ""
2137
- },
2138
- "_meta_type": {
2139
- "type": "TEXT",
2140
- "notNull": true
2141
- },
2142
- "_meta_data": {
2143
- "type": "JSON",
2144
- "notNull": false
2145
- },
2146
- "created_at": {
2147
- "type": "TIMESTAMP",
2148
- "notNull": true,
2149
- "default": "current_timestamp"
2150
- },
2151
- "updated_at": {
2152
- "type": "TIMESTAMP",
2153
- "notNull": true,
2154
- "default": "current_timestamp"
2155
- },
2156
- "parent_id": {
2157
- "type": "UUID",
2158
- "referenceKind": "foreignKey",
2159
- "notNull": false,
2160
- "foreignKey": {
2161
- "table": "events",
2162
- "column": "id",
2163
- "onDelete": "NO ACTION",
2164
- "onUpdate": "CASCADE",
2165
- "engines": [
2166
- "postgres",
2167
- "sqlite"
2168
- ]
2169
- }
2170
- },
2171
- "tenant_id": {
2172
- "type": "UUID",
2173
- "referenceKind": "tenantId",
2174
- "notNull": false
2175
- },
2176
- "name": {
2177
- "type": "TEXT",
2178
- "notNull": false,
2179
- "default": ""
2180
- },
2181
- "series_id": {
2182
- "type": "UUID",
2183
- "referenceKind": "foreignKey",
2184
- "notNull": false,
2185
- "foreignKey": {
2186
- "table": "event_series",
2187
- "column": "id",
2188
- "onDelete": "NO ACTION",
2189
- "onUpdate": "CASCADE",
2190
- "engines": [
2191
- "postgres",
2192
- "sqlite"
2193
- ]
2194
- }
2195
- },
2196
- "type_id": {
2197
- "type": "UUID",
2198
- "referenceKind": "foreignKey",
2199
- "notNull": false,
2200
- "foreignKey": {
2201
- "table": "event_types",
2202
- "column": "id",
2203
- "onDelete": "NO ACTION",
2204
- "onUpdate": "CASCADE",
2205
- "engines": [
2206
- "postgres",
2207
- "sqlite"
2208
- ]
2209
- }
2210
- },
2211
- "place_id": {
2212
- "type": "UUID",
2213
- "referenceKind": "crossPackageRef",
2214
- "notNull": false
2215
- },
2216
- "description": {
2217
- "type": "TEXT",
2218
- "notNull": false
2219
- },
2220
- "start_date": {
2221
- "type": "TIMESTAMP",
2222
- "notNull": false
2223
- },
2224
- "end_date": {
2225
- "type": "TIMESTAMP",
2226
- "notNull": false
2227
- },
2228
- "status": {
2229
- "type": "TEXT",
2230
- "notNull": false,
2231
- "default": "scheduled"
2232
- },
2233
- "round": {
2234
- "type": "INTEGER",
2235
- "notNull": false
2236
- },
2237
- "metadata": {
2238
- "type": "TEXT",
2239
- "notNull": false
2240
- },
2241
- "external_id": {
2242
- "type": "TEXT",
2243
- "notNull": false
2244
- },
2245
- "source": {
2246
- "type": "TEXT",
2247
- "notNull": false
2248
- }
2249
- },
2250
- "indexes": [
2251
- {
2252
- "name": "events_slug_context_meta_type_idx",
2253
- "columns": [
2254
- "tenant_id",
2255
- "slug",
2256
- "context",
2257
- "_meta_type"
2258
- ],
2259
- "unique": true
2260
- },
2261
- {
2262
- "name": "events_meta_type_idx",
2263
- "columns": [
2264
- "_meta_type"
2265
- ]
2266
- },
2267
- {
2268
- "name": "events_tenant_id_created_at_idx",
2269
- "columns": [
2270
- "tenant_id",
2271
- "created_at"
2272
- ]
2273
- },
2274
- {
2275
- "name": "events_parent_id_idx",
2276
- "columns": [
2277
- "parent_id"
2278
- ]
2279
- },
2280
- {
2281
- "name": "events_series_id_idx",
2282
- "columns": [
2283
- "series_id"
2284
- ]
2285
- },
2286
- {
2287
- "name": "events_type_id_idx",
2288
- "columns": [
2289
- "type_id"
2290
- ]
2291
- },
2292
- {
2293
- "name": "events_place_id_idx",
2294
- "columns": [
2295
- "place_id"
2296
- ]
2297
- }
2298
- ],
2299
- "version": "373ccc72"
2300
- }
2301
- },
2302
- "@happyvertical/smrt-events:EventAsset": {
2303
- "name": "eventasset",
2304
- "className": "EventAsset",
2305
- "qualifiedName": "@happyvertical/smrt-events:EventAsset",
2306
- "collection": "eventassets",
2307
- "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventAsset.ts",
2308
- "packageName": "@happyvertical/smrt-events",
2309
- "fields": {
2310
- "tenantId": {
2311
- "type": "text",
2312
- "required": false,
2313
- "_meta": {
2314
- "sqlType": "UUID",
2315
- "nullable": true,
2316
- "__tenancy": {
2317
- "isTenantIdField": true,
2318
- "autoFilter": true,
2319
- "required": false,
2320
- "autoPopulate": true,
2321
- "nullable": true,
2322
- "mode": "optional",
2323
- "field": "tenantId",
2324
- "allowSuperAdminBypass": false
2325
- }
2326
- }
2327
- },
2328
- "eventId": {
2329
- "type": "foreignKey",
2330
- "required": true,
2331
- "related": "Event",
2332
- "_meta": {
2333
- "required": true
2334
- }
2335
- },
2336
- "assetId": {
2337
- "type": "crossPackageRef",
2338
- "required": true,
2339
- "related": "@happyvertical/smrt-assets:Asset"
2340
- },
2341
- "relationship": {
2342
- "type": "text",
2343
- "required": true,
2344
- "_meta": {
2345
- "required": true
2346
- }
2347
- },
2348
- "sortOrder": {
2349
- "type": "integer",
2350
- "required": true,
2351
- "default": 0
2352
- }
2353
- },
2354
- "methods": {},
2355
- "decoratorConfig": {
2356
- "tableName": "event_assets",
2357
- "conflictColumns": [
2358
- "event_id",
2359
- "asset_id",
2360
- "relationship"
2361
- ],
2362
- "api": false,
2363
- "mcp": false,
2364
- "cli": false,
2365
- "tenantScoped": {
2366
- "mode": "optional"
2367
- }
2368
- },
2369
- "extends": "SmrtObject",
2370
- "exportName": "EventAsset",
2371
- "collectionExportName": "EventAssetCollection",
2372
- "validationRules": [
2373
- {
2374
- "field": "eventId",
2375
- "rule": "required",
2376
- "fieldType": "foreignKey"
2377
- },
2378
- {
2379
- "field": "assetId",
2380
- "rule": "required",
2381
- "fieldType": "crossPackageRef"
2382
- },
2383
- {
2384
- "field": "relationship",
2385
- "rule": "required",
2386
- "fieldType": "text"
2387
- },
2388
- {
2389
- "field": "sortOrder",
2390
- "rule": "required",
2391
- "fieldType": "integer"
2392
- }
2393
- ],
2394
- "schema": {
2395
- "tableName": "event_assets",
2396
- "ddl": "CREATE TABLE IF NOT EXISTS \"event_assets\" (\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 \"event_id\" UUID NOT NULL,\n \"asset_id\" UUID NOT NULL,\n \"relationship\" TEXT NOT NULL,\n \"sort_order\" INTEGER NOT NULL DEFAULT 0\n);",
2397
- "columns": {
2398
- "id": {
2399
- "type": "UUID",
2400
- "primaryKey": true,
2401
- "referenceKind": "id",
2402
- "notNull": true
2403
- },
2404
- "slug": {
2405
- "type": "TEXT",
2406
- "notNull": true
2407
- },
2408
- "context": {
2409
- "type": "TEXT",
2410
- "notNull": true,
2411
- "default": ""
2412
- },
2413
- "created_at": {
2414
- "type": "TIMESTAMP",
2415
- "notNull": true,
2416
- "default": "current_timestamp"
2417
- },
2418
- "updated_at": {
2419
- "type": "TIMESTAMP",
2420
- "notNull": true,
2421
- "default": "current_timestamp"
2422
- },
2423
- "tenant_id": {
2424
- "type": "UUID",
2425
- "referenceKind": "tenantId",
2426
- "notNull": false,
2427
- "unique": false
2428
- },
2429
- "event_id": {
2430
- "type": "UUID",
2431
- "referenceKind": "foreignKey",
2432
- "notNull": true,
2433
- "unique": false,
2434
- "foreignKey": {
2435
- "table": "events",
2436
- "column": "id",
2437
- "onDelete": "CASCADE",
2438
- "onUpdate": "CASCADE"
2439
- }
2440
- },
2441
- "asset_id": {
2442
- "type": "UUID",
2443
- "referenceKind": "crossPackageRef",
2444
- "notNull": true,
2445
- "unique": false
2446
- },
2447
- "relationship": {
2448
- "type": "TEXT",
2449
- "notNull": true,
2450
- "unique": false
2451
- },
2452
- "sort_order": {
2453
- "type": "INTEGER",
2454
- "notNull": true,
2455
- "unique": false,
2456
- "default": 0
2457
- }
2458
- },
2459
- "indexes": [
2460
- {
2461
- "name": "event_assets_event_id_asset_id_idx",
2462
- "columns": [
2463
- "event_id",
2464
- "asset_id",
2465
- "relationship"
2466
- ],
2467
- "unique": true
2468
- },
2469
- {
2470
- "name": "event_assets_slug_context_idx",
2471
- "columns": [
2472
- "slug",
2473
- "context"
2474
- ]
2475
- },
2476
- {
2477
- "name": "event_assets_tenant_id_created_at_idx",
2478
- "columns": [
2479
- "tenant_id",
2480
- "created_at"
2481
- ]
2482
- },
2483
- {
2484
- "name": "event_assets_asset_id_idx",
2485
- "columns": [
2486
- "asset_id"
2487
- ]
2488
- }
2489
- ],
2490
- "version": "aeebedc6"
2491
- }
2492
- },
2493
- "@happyvertical/smrt-events:EventParticipant": {
2494
- "name": "eventparticipant",
2495
- "className": "EventParticipant",
2496
- "qualifiedName": "@happyvertical/smrt-events:EventParticipant",
2497
- "collection": "eventparticipants",
2498
- "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventParticipant.ts",
2499
- "packageName": "@happyvertical/smrt-events",
2500
- "fields": {
2501
- "tenantId": {
2502
- "type": "text",
2503
- "required": false,
2504
- "_meta": {
2505
- "sqlType": "UUID",
2506
- "nullable": true,
2507
- "__tenancy": {
2508
- "isTenantIdField": true,
2509
- "autoFilter": true,
2510
- "required": false,
2511
- "autoPopulate": true,
2512
- "nullable": true,
2513
- "mode": "optional",
2514
- "field": "tenantId",
2515
- "allowSuperAdminBypass": false
2516
- }
2517
- }
2518
- },
2519
- "eventId": {
2520
- "type": "foreignKey",
2521
- "required": false,
2522
- "related": "Event"
2523
- },
2524
- "profileId": {
2525
- "type": "crossPackageRef",
2526
- "required": false,
2527
- "related": "@happyvertical/smrt-profiles:Profile"
2528
- },
2529
- "role": {
2530
- "type": "text",
2531
- "required": false,
2532
- "default": ""
2533
- },
2534
- "placement": {
2535
- "type": "integer",
2536
- "required": false
2537
- },
2538
- "groupId": {
2539
- "type": "text",
2540
- "required": false
2541
- },
2542
- "metadata": {
2543
- "type": "text",
2544
- "required": false
2545
- },
2546
- "externalId": {
2547
- "type": "text",
2548
- "required": false
2549
- },
2550
- "source": {
2551
- "type": "text",
2552
- "required": false
2553
- },
2554
- "createdAt": {
2555
- "type": "text",
2556
- "required": false
2557
- },
2558
- "updatedAt": {
2559
- "type": "text",
2560
- "required": false
2561
- }
2562
- },
2563
- "methods": {
2564
- "getMetadata": {
2565
- "name": "getMetadata",
2566
- "async": false,
2567
- "parameters": [],
2568
- "returnType": "Record<string>",
2569
- "isStatic": false,
2570
- "isPublic": true
2571
- },
2572
- "setMetadata": {
2573
- "name": "setMetadata",
2574
- "async": false,
2575
- "parameters": [
2576
- {
2577
- "name": "data",
2578
- "type": "Record<string>",
2579
- "optional": false
2580
- }
2581
- ],
2582
- "returnType": "void",
2583
- "isStatic": false,
2584
- "isPublic": true
2585
- },
2586
- "updateMetadata": {
2587
- "name": "updateMetadata",
2588
- "async": false,
2589
- "parameters": [
2590
- {
2591
- "name": "updates",
2592
- "type": "Record<string>",
2593
- "optional": false
2594
- }
2595
- ],
2596
- "returnType": "void",
2597
- "isStatic": false,
2598
- "isPublic": true
2599
- },
2600
- "getEvent": {
2601
- "name": "getEvent",
2602
- "async": true,
2603
- "parameters": [],
2604
- "returnType": "any",
2605
- "isStatic": false,
2606
- "isPublic": true
2607
- },
2608
- "getProfile": {
2609
- "name": "getProfile",
2610
- "async": true,
2611
- "parameters": [],
2612
- "returnType": "any",
2613
- "isStatic": false,
2614
- "isPublic": true
2615
- },
2616
- "getGroupParticipants": {
2617
- "name": "getGroupParticipants",
2618
- "async": true,
2619
- "parameters": [],
2620
- "returnType": "Promise<EventParticipant[]>",
2621
- "isStatic": false,
2622
- "isPublic": true
2623
- },
2624
- "isHome": {
2625
- "name": "isHome",
2626
- "async": false,
2627
- "parameters": [],
2628
- "returnType": "boolean",
2629
- "isStatic": false,
2630
- "isPublic": true
2631
- },
2632
- "isAway": {
2633
- "name": "isAway",
2634
- "async": false,
2635
- "parameters": [],
2636
- "returnType": "boolean",
2637
- "isStatic": false,
2638
- "isPublic": true
2639
- }
2640
- },
2641
- "decoratorConfig": {
2642
- "conflictColumns": [
2643
- "event_id",
2644
- "profile_id",
2645
- "role"
2646
- ],
2647
- "api": {
2648
- "include": [
2649
- "list",
2650
- "get",
2651
- "create",
2652
- "update",
2653
- "delete"
2654
- ]
2655
- },
2656
- "mcp": {
2657
- "include": [
2658
- "list",
2659
- "get",
2660
- "create",
2661
- "update"
2662
- ]
2663
- },
2664
- "cli": true,
2665
- "tenantScoped": {
2666
- "mode": "optional"
2667
- }
2668
- },
2669
- "extends": "SmrtObject",
2670
- "exportName": "EventParticipant",
2671
- "collectionExportName": "EventParticipantCollection",
2672
- "schema": {
2673
- "tableName": "event_participants",
2674
- "ddl": "CREATE TABLE IF NOT EXISTS \"event_participants\" (\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 \"event_id\" UUID,\n \"profile_id\" UUID,\n \"role\" TEXT DEFAULT '',\n \"placement\" INTEGER,\n \"group_id\" TEXT,\n \"metadata\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT\n);",
2675
- "columns": {
2676
- "id": {
2677
- "type": "UUID",
2678
- "primaryKey": true,
2679
- "referenceKind": "id",
2680
- "notNull": true
2681
- },
2682
- "slug": {
2683
- "type": "TEXT",
2684
- "notNull": true
2685
- },
2686
- "context": {
2687
- "type": "TEXT",
2688
- "notNull": true,
2689
- "default": ""
2690
- },
2691
- "created_at": {
2692
- "type": "TIMESTAMP",
2693
- "notNull": true,
2694
- "default": "current_timestamp"
2695
- },
2696
- "updated_at": {
2697
- "type": "TIMESTAMP",
2698
- "notNull": true,
2699
- "default": "current_timestamp"
2700
- },
2701
- "tenant_id": {
2702
- "type": "UUID",
2703
- "referenceKind": "tenantId",
2704
- "notNull": false,
2705
- "unique": false
2706
- },
2707
- "event_id": {
2708
- "type": "UUID",
2709
- "referenceKind": "foreignKey",
2710
- "notNull": false,
2711
- "unique": false,
2712
- "foreignKey": {
2713
- "table": "events",
2714
- "column": "id",
2715
- "onDelete": "CASCADE",
2716
- "onUpdate": "CASCADE"
2717
- }
2718
- },
2719
- "profile_id": {
2720
- "type": "UUID",
2721
- "referenceKind": "crossPackageRef",
2722
- "notNull": false,
2723
- "unique": false
2724
- },
2725
- "role": {
2726
- "type": "TEXT",
2727
- "notNull": false,
2728
- "unique": false,
2729
- "default": ""
2730
- },
2731
- "placement": {
2732
- "type": "INTEGER",
2733
- "notNull": false,
2734
- "unique": false
2735
- },
2736
- "group_id": {
2737
- "type": "TEXT",
2738
- "notNull": false,
2739
- "unique": false
2740
- },
2741
- "metadata": {
2742
- "type": "TEXT",
2743
- "notNull": false,
2744
- "unique": false
2745
- },
2746
- "external_id": {
2747
- "type": "TEXT",
2748
- "notNull": false,
2749
- "unique": false
2750
- },
2751
- "source": {
2752
- "type": "TEXT",
2753
- "notNull": false,
2754
- "unique": false
2755
- }
2756
- },
2757
- "indexes": [
2758
- {
2759
- "name": "event_participants_event_id_profile_id_idx",
2760
- "columns": [
2761
- "event_id",
2762
- "profile_id",
2763
- "role"
2764
- ],
2765
- "unique": true
2766
- },
2767
- {
2768
- "name": "event_participants_slug_context_idx",
2769
- "columns": [
2770
- "slug",
2771
- "context"
2772
- ]
2773
- },
2774
- {
2775
- "name": "event_participants_tenant_id_created_at_idx",
2776
- "columns": [
2777
- "tenant_id",
2778
- "created_at"
2779
- ]
2780
- },
2781
- {
2782
- "name": "event_participants_profile_id_idx",
2783
- "columns": [
2784
- "profile_id"
2785
- ]
2786
- }
2787
- ],
2788
- "version": "c2faac84"
2789
- }
2790
- },
2791
- "@happyvertical/smrt-events:EventSeries": {
2792
- "name": "eventseries",
2793
- "className": "EventSeries",
2794
- "qualifiedName": "@happyvertical/smrt-events:EventSeries",
2795
- "collection": "eventserieses",
2796
- "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventSeries.ts",
2797
- "packageName": "@happyvertical/smrt-events",
2798
- "fields": {
2799
- "created_at": {
2800
- "type": "datetime",
2801
- "required": false
2802
- },
2803
- "updated_at": {
2804
- "type": "datetime",
2805
- "required": false
2806
- },
2807
- "tenantId": {
2808
- "type": "text",
2809
- "required": false,
2810
- "_meta": {
2811
- "sqlType": "UUID",
2812
- "nullable": true,
2813
- "__tenancy": {
2814
- "isTenantIdField": true,
2815
- "autoFilter": true,
2816
- "required": false,
2817
- "autoPopulate": true,
2818
- "nullable": true,
2819
- "mode": "optional",
2820
- "field": "tenantId",
2821
- "allowSuperAdminBypass": false
2822
- }
2823
- }
2824
- },
2825
- "name": {
2826
- "type": "text",
2827
- "required": false,
2828
- "default": ""
2829
- },
2830
- "typeId": {
2831
- "type": "foreignKey",
2832
- "required": false,
2833
- "related": "EventType"
2834
- },
2835
- "organizerId": {
2836
- "type": "crossPackageRef",
2837
- "required": false,
2838
- "related": "@happyvertical/smrt-profiles:Profile"
2839
- },
2840
- "description": {
2841
- "type": "text",
2842
- "required": false
2843
- },
2844
- "startDate": {
2845
- "type": "datetime",
2846
- "required": false
2847
- },
2848
- "endDate": {
2849
- "type": "datetime",
2850
- "required": false
2851
- },
2852
- "recurrence": {
2853
- "type": "text",
2854
- "required": false
2855
- },
2856
- "metadata": {
2857
- "type": "text",
2858
- "required": false
2859
- },
2860
- "externalId": {
2861
- "type": "text",
2862
- "required": false
2863
- },
2864
- "source": {
2865
- "type": "text",
2866
- "required": false
2867
- },
2868
- "createdAt": {
2869
- "type": "text",
2870
- "required": false
2871
- },
2872
- "updatedAt": {
2873
- "type": "text",
2874
- "required": false
2875
- }
2876
- },
2877
- "methods": {
2878
- "withDatabase": {
2879
- "name": "withDatabase",
2880
- "async": true,
2881
- "parameters": [
2882
- {
2883
- "name": "db",
2884
- "type": "DatabaseInterface",
2885
- "optional": false
2886
- },
2887
- {
2888
- "name": "operation",
2889
- "type": "Function",
2890
- "optional": false
2891
- }
2892
- ],
2893
- "returnType": "Promise<T>",
2894
- "isStatic": false,
2895
- "isPublic": true
2896
- },
2897
- "getAiUsageSnapshot": {
2898
- "name": "getAiUsageSnapshot",
2899
- "async": false,
2900
- "parameters": [],
2901
- "returnType": "AiUsageSnapshot | undefined",
2902
- "isStatic": false,
2903
- "isPublic": true
2904
- },
2905
- "resetAiUsage": {
2906
- "name": "resetAiUsage",
2907
- "async": false,
2908
- "parameters": [],
2909
- "returnType": "void",
2910
- "isStatic": false,
2911
- "isPublic": true
2912
- },
2913
- "listAiUsage": {
2914
- "name": "listAiUsage",
2915
- "async": true,
2916
- "parameters": [
2917
- {
2918
- "name": "options",
2919
- "type": "AiUsageListOptions",
2920
- "optional": true
2921
- }
2922
- ],
2923
- "returnType": "Promise<SmrtAiUsageRecord[]>",
2924
- "isStatic": false,
2925
- "isPublic": true
2926
- },
2927
- "summarizeAiUsage": {
2928
- "name": "summarizeAiUsage",
2929
- "async": true,
2930
- "parameters": [
2931
- {
2932
- "name": "options",
2933
- "type": "AiUsageSummaryOptions",
2934
- "optional": true
2935
- }
2936
- ],
2937
- "returnType": "Promise<Record<string, AiUsageStats>>",
2938
- "isStatic": false,
2939
- "isPublic": true
2940
- },
2941
- "destroy": {
2942
- "name": "destroy",
2943
- "async": false,
2944
- "parameters": [],
2945
- "returnType": "void",
2946
- "isStatic": false,
2947
- "isPublic": true
2948
- },
2949
- "markAsPersisted": {
2950
- "name": "markAsPersisted",
2951
- "async": false,
2952
- "parameters": [],
2953
- "returnType": "void",
2954
- "isStatic": false,
2955
- "isPublic": true
2956
- },
2957
- "requireInsertOnSave": {
2958
- "name": "requireInsertOnSave",
2959
- "async": false,
2960
- "parameters": [],
2961
- "returnType": "void",
2962
- "isStatic": false,
2963
- "isPublic": true
2964
- },
2965
- "withTransaction": {
2966
- "name": "withTransaction",
2967
- "async": true,
2968
- "parameters": [
2969
- {
2970
- "name": "operation",
2971
- "type": "Function",
2972
- "optional": false
2973
- }
2974
- ],
2975
- "returnType": "Promise<T>",
2976
- "isStatic": false,
2977
- "isPublic": true
2978
- },
2979
- "initialize": {
2980
- "name": "initialize",
2981
- "async": true,
2982
- "parameters": [],
2983
- "returnType": "Promise",
2984
- "isStatic": false,
2985
- "isPublic": true
2986
- },
2987
- "loadDataFromDb": {
2988
- "name": "loadDataFromDb",
2989
- "async": true,
2990
- "parameters": [
2991
- {
2992
- "name": "data",
2993
- "type": "Record<string>",
2994
- "optional": false
2995
- }
2996
- ],
2997
- "returnType": "any",
2998
- "isStatic": false,
2999
- "isPublic": true
3000
- },
3001
- "getFields": {
3002
- "name": "getFields",
3003
- "async": true,
3004
- "parameters": [],
3005
- "returnType": "Promise<any>",
3006
- "isStatic": false,
3007
- "isPublic": true
3008
- },
3009
- "toJSON": {
3010
- "name": "toJSON",
3011
- "async": false,
3012
- "parameters": [],
3013
- "returnType": "any",
3014
- "isStatic": false,
3015
- "isPublic": true
3016
- },
3017
- "toPlainObject": {
3018
- "name": "toPlainObject",
3019
- "async": false,
3020
- "parameters": [],
3021
- "returnType": "Record<string>",
3022
- "isStatic": false,
3023
- "isPublic": true
3024
- },
3025
- "toPublicJSON": {
3026
- "name": "toPublicJSON",
3027
- "async": false,
3028
- "parameters": [
3029
- {
3030
- "name": "options",
3031
- "type": "PublicJsonOptions",
3032
- "optional": true
3033
- }
3034
- ],
3035
- "returnType": "Record<string>",
3036
- "isStatic": false,
3037
- "isPublic": true
3038
- },
3039
- "getId": {
3040
- "name": "getId",
3041
- "async": true,
3042
- "parameters": [],
3043
- "returnType": "any",
3044
- "isStatic": false,
3045
- "isPublic": true
3046
- },
3047
- "getSlug": {
3048
- "name": "getSlug",
3049
- "async": true,
3050
- "parameters": [],
3051
- "returnType": "any",
3052
- "isStatic": false,
3053
- "isPublic": true
3054
- },
3055
- "getSavedId": {
3056
- "name": "getSavedId",
3057
- "async": true,
3058
- "parameters": [],
3059
- "returnType": "any",
3060
- "isStatic": false,
3061
- "isPublic": true
3062
- },
3063
- "isSaved": {
3064
- "name": "isSaved",
3065
- "async": true,
3066
- "parameters": [],
3067
- "returnType": "any",
3068
- "isStatic": false,
3069
- "isPublic": true
3070
- },
3071
- "save": {
3072
- "name": "save",
3073
- "async": true,
3074
- "parameters": [
3075
- {
3076
- "name": "options",
3077
- "type": "SmrtSaveOptions",
3078
- "optional": true
3079
- }
3080
- ],
3081
- "returnType": "any",
3082
- "isStatic": false,
3083
- "isPublic": true
3084
- },
3085
- "claimRevision": {
3086
- "name": "claimRevision",
3087
- "async": true,
3088
- "parameters": [
3089
- {
3090
- "name": "expectedUpdatedAt",
3091
- "type": "Date | string",
3092
- "optional": false
3093
- }
3094
- ],
3095
- "returnType": "Promise",
3096
- "isStatic": false,
3097
- "isPublic": true
3098
- },
3099
- "classifyConstraintError": {
3100
- "name": "classifyConstraintError",
3101
- "async": false,
3102
- "parameters": [
3103
- {
3104
- "name": "message",
3105
- "type": "string",
3106
- "optional": false
3107
- }
3108
- ],
3109
- "returnType": "'unique' | 'not_null' | null",
3110
- "isStatic": true,
3111
- "isPublic": true
3112
- },
3113
- "loadFromId": {
3114
- "name": "loadFromId",
3115
- "async": true,
3116
- "parameters": [],
3117
- "returnType": "any",
3118
- "isStatic": false,
3119
- "isPublic": true
3120
- },
3121
- "loadFromSlug": {
3122
- "name": "loadFromSlug",
3123
- "async": true,
3124
- "parameters": [],
3125
- "returnType": "any",
3126
- "isStatic": false,
3127
- "isPublic": true
3128
- },
3129
- "is": {
3130
- "name": "is",
3131
- "async": true,
3132
- "parameters": [
3133
- {
3134
- "name": "criteria",
3135
- "type": "string",
3136
- "optional": false
3137
- },
3138
- {
3139
- "name": "options",
3140
- "type": "AiOperationOptions",
3141
- "optional": true
3142
- }
3143
- ],
3144
- "returnType": "any",
3145
- "isStatic": false,
3146
- "isPublic": true
3147
- },
3148
- "do": {
3149
- "name": "do",
3150
- "async": true,
3151
- "parameters": [
3152
- {
3153
- "name": "instructions",
3154
- "type": "string",
3155
- "optional": false
3156
- },
3157
- {
3158
- "name": "options",
3159
- "type": "AiOperationOptions",
3160
- "optional": true
3161
- }
3162
- ],
3163
- "returnType": "any",
3164
- "isStatic": false,
3165
- "isPublic": true
3166
- },
3167
- "describe": {
3168
- "name": "describe",
3169
- "async": true,
3170
- "parameters": [
3171
- {
3172
- "name": "options",
3173
- "type": "AiOperationOptions",
3174
- "optional": true
3175
- }
3176
- ],
3177
- "returnType": "any",
3178
- "isStatic": false,
3179
- "isPublic": true
3180
- },
3181
- "delete": {
3182
- "name": "delete",
3183
- "async": true,
3184
- "parameters": [],
3185
- "returnType": "Promise<void>",
3186
- "isStatic": false,
3187
- "isPublic": true
3188
- },
3189
- "isRelatedLoaded": {
3190
- "name": "isRelatedLoaded",
3191
- "async": false,
3192
- "parameters": [
3193
- {
3194
- "name": "fieldName",
3195
- "type": "string",
3196
- "optional": false
3197
- }
3198
- ],
3199
- "returnType": "boolean",
3200
- "isStatic": false,
3201
- "isPublic": true
3202
- },
3203
- "_setLoadedRelationship": {
3204
- "name": "_setLoadedRelationship",
3205
- "async": false,
3206
- "parameters": [
3207
- {
3208
- "name": "fieldName",
3209
- "type": "string",
3210
- "optional": false
3211
- },
3212
- {
3213
- "name": "value",
3214
- "type": "any",
3215
- "optional": false
3216
- }
3217
- ],
3218
- "returnType": "void",
3219
- "isStatic": false,
3220
- "isPublic": true
3221
- },
3222
- "loadRelated": {
3223
- "name": "loadRelated",
3224
- "async": true,
3225
- "parameters": [
3226
- {
3227
- "name": "fieldName",
3228
- "type": "string",
3229
- "optional": false
3230
- },
3231
- {
3232
- "name": "opts",
3233
- "type": "LoadRelatedOptions",
3234
- "optional": true
3235
- }
3236
- ],
3237
- "returnType": "Promise<any>",
3238
- "isStatic": false,
3239
- "isPublic": true
3240
- },
3241
- "loadRelatedMany": {
3242
- "name": "loadRelatedMany",
3243
- "async": true,
3244
- "parameters": [
3245
- {
3246
- "name": "fieldName",
3247
- "type": "string",
3248
- "optional": false
3249
- },
3250
- {
3251
- "name": "opts",
3252
- "type": "LoadRelatedOptions",
3253
- "optional": true
3254
- }
3255
- ],
3256
- "returnType": "Promise<any[]>",
3257
- "isStatic": false,
3258
- "isPublic": true
3259
- },
3260
- "getRelated": {
3261
- "name": "getRelated",
3262
- "async": true,
3263
- "parameters": [
3264
- {
3265
- "name": "fieldName",
3266
- "type": "string",
3267
- "optional": false
3268
- },
3269
- {
3270
- "name": "opts",
3271
- "type": "LoadRelatedOptions",
3272
- "optional": true
3273
- }
3274
- ],
3275
- "returnType": "Promise<any>",
3276
- "isStatic": false,
3277
- "isPublic": true
3278
- },
3279
- "getAvailableTools": {
3280
- "name": "getAvailableTools",
3281
- "async": false,
3282
- "parameters": [],
3283
- "returnType": "AITool[]",
3284
- "isStatic": false,
3285
- "isPublic": true
3286
- },
3287
- "executeToolCall": {
3288
- "name": "executeToolCall",
3289
- "async": true,
3290
- "parameters": [
3291
- {
3292
- "name": "toolCall",
3293
- "type": "ToolCall",
3294
- "optional": false
3295
- }
3296
- ],
3297
- "returnType": "Promise<ToolCallResult>",
3298
- "isStatic": false,
3299
- "isPublic": true
3300
- },
3301
- "remember": {
3302
- "name": "remember",
3303
- "async": true,
3304
- "parameters": [
3305
- {
3306
- "name": "options",
3307
- "type": "object",
3308
- "optional": false
3309
- }
3310
- ],
3311
- "returnType": "Promise<void>",
3312
- "isStatic": false,
3313
- "isPublic": true
3314
- },
3315
- "recall": {
3316
- "name": "recall",
3317
- "async": true,
3318
- "parameters": [
3319
- {
3320
- "name": "options",
3321
- "type": "object",
3322
- "optional": false
3323
- }
3324
- ],
3325
- "returnType": "Promise",
3326
- "isStatic": false,
3327
- "isPublic": true
3328
- },
3329
- "recallAll": {
3330
- "name": "recallAll",
3331
- "async": true,
3332
- "parameters": [
3333
- {
3334
- "name": "options",
3335
- "type": "object",
3336
- "optional": true
3337
- }
3338
- ],
3339
- "returnType": "Promise<Map<string>>",
3340
- "isStatic": false,
3341
- "isPublic": true
3342
- },
3343
- "forget": {
3344
- "name": "forget",
3345
- "async": true,
3346
- "parameters": [
3347
- {
3348
- "name": "options",
3349
- "type": "object",
3350
- "optional": false
3351
- }
3352
- ],
3353
- "returnType": "Promise<void>",
3354
- "isStatic": false,
3355
- "isPublic": true
3356
- },
3357
- "forgetScope": {
3358
- "name": "forgetScope",
3359
- "async": true,
3360
- "parameters": [
3361
- {
3362
- "name": "options",
3363
- "type": "object",
3364
- "optional": false
3365
- }
3366
- ],
3367
- "returnType": "Promise<number>",
3368
- "isStatic": false,
3369
- "isPublic": true
3370
- },
3371
- "generateEmbeddings": {
3372
- "name": "generateEmbeddings",
3373
- "async": true,
3374
- "parameters": [
3375
- {
3376
- "name": "options",
3377
- "type": "GenerateEmbeddingsOptions",
3378
- "optional": true
3379
- }
3380
- ],
3381
- "returnType": "Promise<void>",
3382
- "isStatic": false,
3383
- "isPublic": true
3384
- },
3385
- "getEmbedding": {
3386
- "name": "getEmbedding",
3387
- "async": true,
3388
- "parameters": [
3389
- {
3390
- "name": "fieldName",
3391
- "type": "string",
3392
- "optional": false
3393
- },
3394
- {
3395
- "name": "model",
3396
- "type": "string",
3397
- "optional": true
3398
- }
3399
- ],
3400
- "returnType": "Promise<number[] | null>",
3401
- "isStatic": false,
3402
- "isPublic": true
3403
- },
3404
- "hasStaleEmbeddings": {
3405
- "name": "hasStaleEmbeddings",
3406
- "async": true,
3407
- "parameters": [],
3408
- "returnType": "Promise<boolean>",
1539
+ "returnType": "boolean",
3409
1540
  "isStatic": false,
3410
1541
  "isPublic": true
1542
+ }
1543
+ },
1544
+ "decoratorConfig": {
1545
+ "tableStrategy": "sti",
1546
+ "api": {
1547
+ "include": [
1548
+ "list",
1549
+ "get",
1550
+ "create",
1551
+ "update",
1552
+ "delete"
1553
+ ]
3411
1554
  },
3412
- "clearEmbeddings": {
3413
- "name": "clearEmbeddings",
3414
- "async": true,
3415
- "parameters": [],
3416
- "returnType": "Promise<void>",
3417
- "isStatic": false,
3418
- "isPublic": true
1555
+ "mcp": {
1556
+ "include": [
1557
+ "list",
1558
+ "get",
1559
+ "create",
1560
+ "update"
1561
+ ]
3419
1562
  },
3420
- "getRecurrence": {
3421
- "name": "getRecurrence",
3422
- "async": false,
3423
- "parameters": [],
3424
- "returnType": "RecurrencePattern | null",
3425
- "isStatic": false,
3426
- "isPublic": true
1563
+ "cli": true,
1564
+ "tenantScoped": {
1565
+ "mode": "optional"
3427
1566
  },
3428
- "setRecurrence": {
3429
- "name": "setRecurrence",
3430
- "async": false,
3431
- "parameters": [
3432
- {
3433
- "name": "pattern",
3434
- "type": "RecurrencePattern",
3435
- "optional": false
1567
+ "conflictColumns": [
1568
+ "tenant_id",
1569
+ "slug",
1570
+ "context",
1571
+ "_meta_type"
1572
+ ]
1573
+ },
1574
+ "extends": "SmrtHierarchical",
1575
+ "exportName": "Event",
1576
+ "collectionExportName": "EventCollection",
1577
+ "schema": {
1578
+ "tableName": "events",
1579
+ "ddl": "CREATE TABLE IF NOT EXISTS \"events\" (\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 \"parent_id\" UUID,\n \"tenant_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"series_id\" UUID,\n \"type_id\" UUID,\n \"place_id\" UUID,\n \"description\" TEXT,\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"status\" TEXT DEFAULT 'scheduled',\n \"round\" INTEGER,\n \"metadata\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT\n);",
1580
+ "columns": {
1581
+ "id": {
1582
+ "type": "UUID",
1583
+ "primaryKey": true,
1584
+ "referenceKind": "id",
1585
+ "notNull": true
1586
+ },
1587
+ "slug": {
1588
+ "type": "TEXT",
1589
+ "notNull": true
1590
+ },
1591
+ "context": {
1592
+ "type": "TEXT",
1593
+ "notNull": true,
1594
+ "default": ""
1595
+ },
1596
+ "_meta_type": {
1597
+ "type": "TEXT",
1598
+ "notNull": true
1599
+ },
1600
+ "_meta_data": {
1601
+ "type": "JSON",
1602
+ "notNull": false
1603
+ },
1604
+ "created_at": {
1605
+ "type": "TIMESTAMP",
1606
+ "notNull": true,
1607
+ "default": "current_timestamp"
1608
+ },
1609
+ "updated_at": {
1610
+ "type": "TIMESTAMP",
1611
+ "notNull": true,
1612
+ "default": "current_timestamp"
1613
+ },
1614
+ "parent_id": {
1615
+ "type": "UUID",
1616
+ "referenceKind": "foreignKey",
1617
+ "notNull": false,
1618
+ "foreignKey": {
1619
+ "table": "events",
1620
+ "column": "id",
1621
+ "onDelete": "NO ACTION",
1622
+ "onUpdate": "CASCADE",
1623
+ "engines": [
1624
+ "postgres",
1625
+ "sqlite"
1626
+ ]
3436
1627
  }
3437
- ],
3438
- "returnType": "void",
3439
- "isStatic": false,
3440
- "isPublic": true
3441
- },
3442
- "getMetadata": {
3443
- "name": "getMetadata",
3444
- "async": false,
3445
- "parameters": [],
3446
- "returnType": "Record<string>",
3447
- "isStatic": false,
3448
- "isPublic": true
3449
- },
3450
- "setMetadata": {
3451
- "name": "setMetadata",
3452
- "async": false,
3453
- "parameters": [
3454
- {
3455
- "name": "data",
3456
- "type": "Record<string>",
3457
- "optional": false
1628
+ },
1629
+ "tenant_id": {
1630
+ "type": "UUID",
1631
+ "referenceKind": "tenantId",
1632
+ "notNull": false
1633
+ },
1634
+ "name": {
1635
+ "type": "TEXT",
1636
+ "notNull": false,
1637
+ "default": ""
1638
+ },
1639
+ "series_id": {
1640
+ "type": "UUID",
1641
+ "referenceKind": "foreignKey",
1642
+ "notNull": false,
1643
+ "foreignKey": {
1644
+ "table": "event_series",
1645
+ "column": "id",
1646
+ "onDelete": "NO ACTION",
1647
+ "onUpdate": "CASCADE",
1648
+ "engines": [
1649
+ "postgres",
1650
+ "sqlite"
1651
+ ]
3458
1652
  }
3459
- ],
3460
- "returnType": "void",
3461
- "isStatic": false,
3462
- "isPublic": true
1653
+ },
1654
+ "type_id": {
1655
+ "type": "UUID",
1656
+ "referenceKind": "foreignKey",
1657
+ "notNull": false,
1658
+ "foreignKey": {
1659
+ "table": "event_types",
1660
+ "column": "id",
1661
+ "onDelete": "NO ACTION",
1662
+ "onUpdate": "CASCADE",
1663
+ "engines": [
1664
+ "postgres",
1665
+ "sqlite"
1666
+ ]
1667
+ }
1668
+ },
1669
+ "place_id": {
1670
+ "type": "UUID",
1671
+ "referenceKind": "crossPackageRef",
1672
+ "notNull": false
1673
+ },
1674
+ "description": {
1675
+ "type": "TEXT",
1676
+ "notNull": false
1677
+ },
1678
+ "start_date": {
1679
+ "type": "TIMESTAMP",
1680
+ "notNull": false
1681
+ },
1682
+ "end_date": {
1683
+ "type": "TIMESTAMP",
1684
+ "notNull": false
1685
+ },
1686
+ "status": {
1687
+ "type": "TEXT",
1688
+ "notNull": false,
1689
+ "default": "scheduled"
1690
+ },
1691
+ "round": {
1692
+ "type": "INTEGER",
1693
+ "notNull": false
1694
+ },
1695
+ "metadata": {
1696
+ "type": "TEXT",
1697
+ "notNull": false
1698
+ },
1699
+ "external_id": {
1700
+ "type": "TEXT",
1701
+ "notNull": false
1702
+ },
1703
+ "source": {
1704
+ "type": "TEXT",
1705
+ "notNull": false
1706
+ }
3463
1707
  },
3464
- "updateMetadata": {
3465
- "name": "updateMetadata",
3466
- "async": false,
3467
- "parameters": [
3468
- {
3469
- "name": "updates",
3470
- "type": "Record<string>",
3471
- "optional": false
1708
+ "indexes": [
1709
+ {
1710
+ "name": "events_slug_context_meta_type_idx",
1711
+ "columns": [
1712
+ "tenant_id",
1713
+ "slug",
1714
+ "context",
1715
+ "_meta_type"
1716
+ ],
1717
+ "unique": true
1718
+ },
1719
+ {
1720
+ "name": "events_meta_type_idx",
1721
+ "columns": [
1722
+ "_meta_type"
1723
+ ]
1724
+ },
1725
+ {
1726
+ "name": "events_tenant_id_created_at_idx",
1727
+ "columns": [
1728
+ "tenant_id",
1729
+ "created_at"
1730
+ ]
1731
+ },
1732
+ {
1733
+ "name": "events_parent_id_idx",
1734
+ "columns": [
1735
+ "parent_id"
1736
+ ]
1737
+ },
1738
+ {
1739
+ "name": "events_series_id_idx",
1740
+ "columns": [
1741
+ "series_id"
1742
+ ]
1743
+ },
1744
+ {
1745
+ "name": "events_type_id_idx",
1746
+ "columns": [
1747
+ "type_id"
1748
+ ]
1749
+ },
1750
+ {
1751
+ "name": "events_place_id_idx",
1752
+ "columns": [
1753
+ "place_id"
1754
+ ]
1755
+ }
1756
+ ],
1757
+ "version": "373ccc72"
1758
+ }
1759
+ },
1760
+ "@happyvertical/smrt-events:EventAsset": {
1761
+ "name": "eventasset",
1762
+ "className": "EventAsset",
1763
+ "qualifiedName": "@happyvertical/smrt-events:EventAsset",
1764
+ "collection": "eventassets",
1765
+ "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventAsset.ts",
1766
+ "packageName": "@happyvertical/smrt-events",
1767
+ "fields": {
1768
+ "tenantId": {
1769
+ "type": "text",
1770
+ "required": false,
1771
+ "_meta": {
1772
+ "sqlType": "UUID",
1773
+ "nullable": true,
1774
+ "__tenancy": {
1775
+ "isTenantIdField": true,
1776
+ "autoFilter": true,
1777
+ "required": false,
1778
+ "autoPopulate": true,
1779
+ "nullable": true,
1780
+ "mode": "optional",
1781
+ "field": "tenantId",
1782
+ "allowSuperAdminBypass": false
3472
1783
  }
3473
- ],
3474
- "returnType": "void",
3475
- "isStatic": false,
3476
- "isPublic": true
1784
+ }
3477
1785
  },
3478
- "getType": {
3479
- "name": "getType",
3480
- "async": true,
3481
- "parameters": [],
3482
- "returnType": "any",
3483
- "isStatic": false,
3484
- "isPublic": true
1786
+ "eventId": {
1787
+ "type": "foreignKey",
1788
+ "required": true,
1789
+ "related": "Event",
1790
+ "_meta": {
1791
+ "required": true
1792
+ }
3485
1793
  },
3486
- "getOrganizer": {
3487
- "name": "getOrganizer",
3488
- "async": true,
3489
- "parameters": [],
3490
- "returnType": "any",
3491
- "isStatic": false,
3492
- "isPublic": true
1794
+ "assetId": {
1795
+ "type": "crossPackageRef",
1796
+ "required": true,
1797
+ "related": "@happyvertical/smrt-assets:Asset"
3493
1798
  },
3494
- "getEvents": {
3495
- "name": "getEvents",
3496
- "async": true,
3497
- "parameters": [],
3498
- "returnType": "any",
3499
- "isStatic": false,
3500
- "isPublic": true
1799
+ "relationship": {
1800
+ "type": "text",
1801
+ "required": true,
1802
+ "_meta": {
1803
+ "required": true
1804
+ }
3501
1805
  },
3502
- "isActive": {
3503
- "name": "isActive",
3504
- "async": false,
3505
- "parameters": [],
3506
- "returnType": "boolean",
3507
- "isStatic": false,
3508
- "isPublic": true
1806
+ "sortOrder": {
1807
+ "type": "integer",
1808
+ "required": true,
1809
+ "default": 0
3509
1810
  }
3510
1811
  },
1812
+ "methods": {},
3511
1813
  "decoratorConfig": {
3512
- "tableStrategy": "sti",
3513
- "api": {
3514
- "include": [
3515
- "list",
3516
- "get",
3517
- "create",
3518
- "update",
3519
- "delete"
3520
- ]
3521
- },
3522
- "mcp": {
3523
- "include": [
3524
- "list",
3525
- "get",
3526
- "create",
3527
- "update"
3528
- ]
3529
- },
3530
- "cli": true,
1814
+ "tableName": "event_assets",
1815
+ "conflictColumns": [
1816
+ "event_id",
1817
+ "asset_id",
1818
+ "relationship"
1819
+ ],
1820
+ "api": false,
1821
+ "mcp": false,
1822
+ "cli": false,
3531
1823
  "tenantScoped": {
3532
1824
  "mode": "optional"
3533
- },
3534
- "conflictColumns": [
3535
- "tenant_id",
3536
- "slug",
3537
- "context",
3538
- "_meta_type"
3539
- ]
1825
+ }
3540
1826
  },
3541
1827
  "extends": "SmrtObject",
3542
- "exportName": "EventSeries",
3543
- "collectionExportName": "EventSeriesCollection",
1828
+ "exportName": "EventAsset",
1829
+ "collectionExportName": "EventAssetCollection",
1830
+ "validationRules": [
1831
+ {
1832
+ "field": "eventId",
1833
+ "rule": "required",
1834
+ "fieldType": "foreignKey"
1835
+ },
1836
+ {
1837
+ "field": "assetId",
1838
+ "rule": "required",
1839
+ "fieldType": "crossPackageRef"
1840
+ },
1841
+ {
1842
+ "field": "relationship",
1843
+ "rule": "required",
1844
+ "fieldType": "text"
1845
+ },
1846
+ {
1847
+ "field": "sortOrder",
1848
+ "rule": "required",
1849
+ "fieldType": "integer"
1850
+ }
1851
+ ],
3544
1852
  "schema": {
3545
- "tableName": "event_series",
3546
- "ddl": "CREATE TABLE IF NOT EXISTS \"event_series\" (\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 \"name\" TEXT DEFAULT '',\n \"type_id\" UUID,\n \"organizer_id\" UUID,\n \"description\" TEXT,\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"recurrence\" TEXT,\n \"metadata\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT\n);",
1853
+ "tableName": "event_assets",
1854
+ "ddl": "CREATE TABLE IF NOT EXISTS \"event_assets\" (\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 \"event_id\" UUID NOT NULL,\n \"asset_id\" UUID NOT NULL,\n \"relationship\" TEXT NOT NULL,\n \"sort_order\" INTEGER NOT NULL DEFAULT 0\n);",
3547
1855
  "columns": {
3548
1856
  "id": {
3549
1857
  "type": "UUID",
@@ -3560,14 +1868,6 @@
3560
1868
  "notNull": true,
3561
1869
  "default": ""
3562
1870
  },
3563
- "_meta_type": {
3564
- "type": "TEXT",
3565
- "notNull": true
3566
- },
3567
- "_meta_data": {
3568
- "type": "JSON",
3569
- "notNull": false
3570
- },
3571
1871
  "created_at": {
3572
1872
  "type": "TIMESTAMP",
3573
1873
  "notNull": true,
@@ -3581,114 +1881,81 @@
3581
1881
  "tenant_id": {
3582
1882
  "type": "UUID",
3583
1883
  "referenceKind": "tenantId",
3584
- "notNull": false
3585
- },
3586
- "name": {
3587
- "type": "TEXT",
3588
1884
  "notNull": false,
3589
- "default": ""
1885
+ "unique": false
3590
1886
  },
3591
- "type_id": {
1887
+ "event_id": {
3592
1888
  "type": "UUID",
3593
1889
  "referenceKind": "foreignKey",
3594
- "notNull": false,
1890
+ "notNull": true,
1891
+ "unique": false,
3595
1892
  "foreignKey": {
3596
- "table": "event_types",
1893
+ "table": "events",
3597
1894
  "column": "id",
3598
- "onDelete": "NO ACTION",
1895
+ "onDelete": "CASCADE",
3599
1896
  "onUpdate": "CASCADE"
3600
1897
  }
3601
1898
  },
3602
- "organizer_id": {
1899
+ "asset_id": {
3603
1900
  "type": "UUID",
3604
1901
  "referenceKind": "crossPackageRef",
3605
- "notNull": false
3606
- },
3607
- "description": {
3608
- "type": "TEXT",
3609
- "notNull": false
3610
- },
3611
- "start_date": {
3612
- "type": "TIMESTAMP",
3613
- "notNull": false
3614
- },
3615
- "end_date": {
3616
- "type": "TIMESTAMP",
3617
- "notNull": false
3618
- },
3619
- "recurrence": {
3620
- "type": "TEXT",
3621
- "notNull": false
3622
- },
3623
- "metadata": {
3624
- "type": "TEXT",
3625
- "notNull": false
1902
+ "notNull": true,
1903
+ "unique": false
3626
1904
  },
3627
- "external_id": {
1905
+ "relationship": {
3628
1906
  "type": "TEXT",
3629
- "notNull": false
1907
+ "notNull": true,
1908
+ "unique": false
3630
1909
  },
3631
- "source": {
3632
- "type": "TEXT",
3633
- "notNull": false
1910
+ "sort_order": {
1911
+ "type": "INTEGER",
1912
+ "notNull": true,
1913
+ "unique": false,
1914
+ "default": 0
3634
1915
  }
3635
1916
  },
3636
1917
  "indexes": [
3637
1918
  {
3638
- "name": "event_series_slug_context_meta_type_idx",
1919
+ "name": "event_assets_event_id_asset_id_idx",
3639
1920
  "columns": [
3640
- "tenant_id",
3641
- "slug",
3642
- "context",
3643
- "_meta_type"
1921
+ "event_id",
1922
+ "asset_id",
1923
+ "relationship"
3644
1924
  ],
3645
1925
  "unique": true
3646
1926
  },
3647
1927
  {
3648
- "name": "event_series_meta_type_idx",
1928
+ "name": "event_assets_slug_context_idx",
3649
1929
  "columns": [
3650
- "_meta_type"
1930
+ "slug",
1931
+ "context"
3651
1932
  ]
3652
1933
  },
3653
1934
  {
3654
- "name": "event_series_tenant_id_created_at_idx",
1935
+ "name": "event_assets_tenant_id_created_at_idx",
3655
1936
  "columns": [
3656
1937
  "tenant_id",
3657
1938
  "created_at"
3658
1939
  ]
3659
1940
  },
3660
1941
  {
3661
- "name": "event_series_type_id_idx",
3662
- "columns": [
3663
- "type_id"
3664
- ]
3665
- },
3666
- {
3667
- "name": "event_series_organizer_id_idx",
1942
+ "name": "event_assets_asset_id_idx",
3668
1943
  "columns": [
3669
- "organizer_id"
1944
+ "asset_id"
3670
1945
  ]
3671
1946
  }
3672
1947
  ],
3673
- "version": "c79f5863"
1948
+ "version": "aeebedc6"
3674
1949
  }
3675
1950
  },
3676
- "@happyvertical/smrt-events:EventType": {
3677
- "name": "eventtype",
3678
- "className": "EventType",
3679
- "qualifiedName": "@happyvertical/smrt-events:EventType",
3680
- "collection": "eventtypes",
3681
- "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventType.ts",
1951
+ "@happyvertical/smrt-events:EventParticipant": {
1952
+ "name": "eventparticipant",
1953
+ "className": "EventParticipant",
1954
+ "qualifiedName": "@happyvertical/smrt-events:EventParticipant",
1955
+ "collection": "eventparticipants",
1956
+ "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventParticipant.ts",
3682
1957
  "packageName": "@happyvertical/smrt-events",
3683
1958
  "fields": {
3684
- "created_at": {
3685
- "type": "datetime",
3686
- "required": false
3687
- },
3688
- "updated_at": {
3689
- "type": "datetime",
3690
- "required": false
3691
- },
3692
1959
  "tenantId": {
3693
1960
  "type": "text",
3694
1961
  "required": false,
@@ -3707,581 +1974,688 @@
3707
1974
  }
3708
1975
  }
3709
1976
  },
3710
- "name": {
3711
- "type": "text",
3712
- "required": true,
3713
- "default": "",
3714
- "_meta": {
3715
- "required": true
3716
- }
3717
- },
3718
- "description": {
3719
- "type": "text",
1977
+ "eventId": {
1978
+ "type": "foreignKey",
3720
1979
  "required": false,
3721
- "default": ""
1980
+ "related": "Event"
3722
1981
  },
3723
- "schema": {
3724
- "type": "text",
1982
+ "profileId": {
1983
+ "type": "crossPackageRef",
3725
1984
  "required": false,
3726
- "default": ""
1985
+ "related": "@happyvertical/smrt-profiles:Profile"
3727
1986
  },
3728
- "participantSchema": {
1987
+ "role": {
3729
1988
  "type": "text",
3730
1989
  "required": false,
3731
1990
  "default": ""
3732
1991
  },
3733
- "createdAt": {
3734
- "type": "datetime",
1992
+ "placement": {
1993
+ "type": "integer",
3735
1994
  "required": false
3736
1995
  },
3737
- "updatedAt": {
3738
- "type": "datetime",
1996
+ "groupId": {
1997
+ "type": "text",
3739
1998
  "required": false
3740
- }
3741
- },
3742
- "methods": {
3743
- "withDatabase": {
3744
- "name": "withDatabase",
3745
- "async": true,
3746
- "parameters": [
3747
- {
3748
- "name": "db",
3749
- "type": "DatabaseInterface",
3750
- "optional": false
3751
- },
3752
- {
3753
- "name": "operation",
3754
- "type": "Function",
3755
- "optional": false
3756
- }
3757
- ],
3758
- "returnType": "Promise<T>",
3759
- "isStatic": false,
3760
- "isPublic": true
3761
- },
3762
- "getAiUsageSnapshot": {
3763
- "name": "getAiUsageSnapshot",
3764
- "async": false,
3765
- "parameters": [],
3766
- "returnType": "AiUsageSnapshot | undefined",
3767
- "isStatic": false,
3768
- "isPublic": true
3769
1999
  },
3770
- "resetAiUsage": {
3771
- "name": "resetAiUsage",
3772
- "async": false,
3773
- "parameters": [],
3774
- "returnType": "void",
3775
- "isStatic": false,
3776
- "isPublic": true
2000
+ "metadata": {
2001
+ "type": "text",
2002
+ "required": false
3777
2003
  },
3778
- "listAiUsage": {
3779
- "name": "listAiUsage",
3780
- "async": true,
3781
- "parameters": [
3782
- {
3783
- "name": "options",
3784
- "type": "AiUsageListOptions",
3785
- "optional": true
3786
- }
3787
- ],
3788
- "returnType": "Promise<SmrtAiUsageRecord[]>",
3789
- "isStatic": false,
3790
- "isPublic": true
2004
+ "externalId": {
2005
+ "type": "text",
2006
+ "required": false
3791
2007
  },
3792
- "summarizeAiUsage": {
3793
- "name": "summarizeAiUsage",
3794
- "async": true,
3795
- "parameters": [
3796
- {
3797
- "name": "options",
3798
- "type": "AiUsageSummaryOptions",
3799
- "optional": true
3800
- }
3801
- ],
3802
- "returnType": "Promise<Record<string, AiUsageStats>>",
3803
- "isStatic": false,
3804
- "isPublic": true
2008
+ "source": {
2009
+ "type": "text",
2010
+ "required": false
3805
2011
  },
3806
- "destroy": {
3807
- "name": "destroy",
3808
- "async": false,
3809
- "parameters": [],
3810
- "returnType": "void",
3811
- "isStatic": false,
3812
- "isPublic": true
2012
+ "createdAt": {
2013
+ "type": "text",
2014
+ "required": false
3813
2015
  },
3814
- "markAsPersisted": {
3815
- "name": "markAsPersisted",
2016
+ "updatedAt": {
2017
+ "type": "text",
2018
+ "required": false
2019
+ }
2020
+ },
2021
+ "methods": {
2022
+ "getMetadata": {
2023
+ "name": "getMetadata",
3816
2024
  "async": false,
3817
2025
  "parameters": [],
3818
- "returnType": "void",
2026
+ "returnType": "Record<string>",
3819
2027
  "isStatic": false,
3820
2028
  "isPublic": true
3821
2029
  },
3822
- "requireInsertOnSave": {
3823
- "name": "requireInsertOnSave",
2030
+ "setMetadata": {
2031
+ "name": "setMetadata",
3824
2032
  "async": false,
3825
- "parameters": [],
3826
- "returnType": "void",
3827
- "isStatic": false,
3828
- "isPublic": true
3829
- },
3830
- "withTransaction": {
3831
- "name": "withTransaction",
3832
- "async": true,
3833
2033
  "parameters": [
3834
2034
  {
3835
- "name": "operation",
3836
- "type": "Function",
2035
+ "name": "data",
2036
+ "type": "Record<string>",
3837
2037
  "optional": false
3838
2038
  }
3839
2039
  ],
3840
- "returnType": "Promise<T>",
3841
- "isStatic": false,
3842
- "isPublic": true
3843
- },
3844
- "initialize": {
3845
- "name": "initialize",
3846
- "async": true,
3847
- "parameters": [],
3848
- "returnType": "Promise",
2040
+ "returnType": "void",
3849
2041
  "isStatic": false,
3850
2042
  "isPublic": true
3851
2043
  },
3852
- "loadDataFromDb": {
3853
- "name": "loadDataFromDb",
3854
- "async": true,
2044
+ "updateMetadata": {
2045
+ "name": "updateMetadata",
2046
+ "async": false,
3855
2047
  "parameters": [
3856
2048
  {
3857
- "name": "data",
2049
+ "name": "updates",
3858
2050
  "type": "Record<string>",
3859
2051
  "optional": false
3860
2052
  }
3861
2053
  ],
3862
- "returnType": "any",
2054
+ "returnType": "void",
3863
2055
  "isStatic": false,
3864
2056
  "isPublic": true
3865
2057
  },
3866
- "getFields": {
3867
- "name": "getFields",
2058
+ "getEvent": {
2059
+ "name": "getEvent",
3868
2060
  "async": true,
3869
2061
  "parameters": [],
3870
- "returnType": "Promise<any>",
3871
- "isStatic": false,
3872
- "isPublic": true
3873
- },
3874
- "toJSON": {
3875
- "name": "toJSON",
3876
- "async": false,
3877
- "parameters": [],
3878
2062
  "returnType": "any",
3879
2063
  "isStatic": false,
3880
2064
  "isPublic": true
3881
2065
  },
3882
- "toPlainObject": {
3883
- "name": "toPlainObject",
3884
- "async": false,
3885
- "parameters": [],
3886
- "returnType": "Record<string>",
3887
- "isStatic": false,
3888
- "isPublic": true
3889
- },
3890
- "toPublicJSON": {
3891
- "name": "toPublicJSON",
3892
- "async": false,
3893
- "parameters": [
3894
- {
3895
- "name": "options",
3896
- "type": "PublicJsonOptions",
3897
- "optional": true
3898
- }
3899
- ],
3900
- "returnType": "Record<string>",
3901
- "isStatic": false,
3902
- "isPublic": true
3903
- },
3904
- "getId": {
3905
- "name": "getId",
2066
+ "getProfile": {
2067
+ "name": "getProfile",
3906
2068
  "async": true,
3907
2069
  "parameters": [],
3908
2070
  "returnType": "any",
3909
2071
  "isStatic": false,
3910
2072
  "isPublic": true
3911
2073
  },
3912
- "getSlug": {
3913
- "name": "getSlug",
2074
+ "getGroupParticipants": {
2075
+ "name": "getGroupParticipants",
3914
2076
  "async": true,
3915
2077
  "parameters": [],
3916
- "returnType": "any",
2078
+ "returnType": "Promise<EventParticipant[]>",
3917
2079
  "isStatic": false,
3918
2080
  "isPublic": true
3919
2081
  },
3920
- "getSavedId": {
3921
- "name": "getSavedId",
3922
- "async": true,
2082
+ "isHome": {
2083
+ "name": "isHome",
2084
+ "async": false,
3923
2085
  "parameters": [],
3924
- "returnType": "any",
2086
+ "returnType": "boolean",
3925
2087
  "isStatic": false,
3926
2088
  "isPublic": true
3927
2089
  },
3928
- "isSaved": {
3929
- "name": "isSaved",
3930
- "async": true,
2090
+ "isAway": {
2091
+ "name": "isAway",
2092
+ "async": false,
3931
2093
  "parameters": [],
3932
- "returnType": "any",
2094
+ "returnType": "boolean",
3933
2095
  "isStatic": false,
3934
2096
  "isPublic": true
2097
+ }
2098
+ },
2099
+ "decoratorConfig": {
2100
+ "conflictColumns": [
2101
+ "event_id",
2102
+ "profile_id",
2103
+ "role"
2104
+ ],
2105
+ "api": {
2106
+ "include": [
2107
+ "list",
2108
+ "get",
2109
+ "create",
2110
+ "update",
2111
+ "delete"
2112
+ ]
3935
2113
  },
3936
- "save": {
3937
- "name": "save",
3938
- "async": true,
3939
- "parameters": [
3940
- {
3941
- "name": "options",
3942
- "type": "SmrtSaveOptions",
3943
- "optional": true
3944
- }
3945
- ],
3946
- "returnType": "any",
3947
- "isStatic": false,
3948
- "isPublic": true
2114
+ "mcp": {
2115
+ "include": [
2116
+ "list",
2117
+ "get",
2118
+ "create",
2119
+ "update"
2120
+ ]
3949
2121
  },
3950
- "claimRevision": {
3951
- "name": "claimRevision",
3952
- "async": true,
3953
- "parameters": [
3954
- {
3955
- "name": "expectedUpdatedAt",
3956
- "type": "Date | string",
3957
- "optional": false
2122
+ "cli": true,
2123
+ "tenantScoped": {
2124
+ "mode": "optional"
2125
+ }
2126
+ },
2127
+ "extends": "SmrtObject",
2128
+ "exportName": "EventParticipant",
2129
+ "collectionExportName": "EventParticipantCollection",
2130
+ "schema": {
2131
+ "tableName": "event_participants",
2132
+ "ddl": "CREATE TABLE IF NOT EXISTS \"event_participants\" (\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 \"event_id\" UUID,\n \"profile_id\" UUID,\n \"role\" TEXT DEFAULT '',\n \"placement\" INTEGER,\n \"group_id\" TEXT,\n \"metadata\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT\n);",
2133
+ "columns": {
2134
+ "id": {
2135
+ "type": "UUID",
2136
+ "primaryKey": true,
2137
+ "referenceKind": "id",
2138
+ "notNull": true
2139
+ },
2140
+ "slug": {
2141
+ "type": "TEXT",
2142
+ "notNull": true
2143
+ },
2144
+ "context": {
2145
+ "type": "TEXT",
2146
+ "notNull": true,
2147
+ "default": ""
2148
+ },
2149
+ "created_at": {
2150
+ "type": "TIMESTAMP",
2151
+ "notNull": true,
2152
+ "default": "current_timestamp"
2153
+ },
2154
+ "updated_at": {
2155
+ "type": "TIMESTAMP",
2156
+ "notNull": true,
2157
+ "default": "current_timestamp"
2158
+ },
2159
+ "tenant_id": {
2160
+ "type": "UUID",
2161
+ "referenceKind": "tenantId",
2162
+ "notNull": false,
2163
+ "unique": false
2164
+ },
2165
+ "event_id": {
2166
+ "type": "UUID",
2167
+ "referenceKind": "foreignKey",
2168
+ "notNull": false,
2169
+ "unique": false,
2170
+ "foreignKey": {
2171
+ "table": "events",
2172
+ "column": "id",
2173
+ "onDelete": "CASCADE",
2174
+ "onUpdate": "CASCADE"
3958
2175
  }
3959
- ],
3960
- "returnType": "Promise",
3961
- "isStatic": false,
3962
- "isPublic": true
2176
+ },
2177
+ "profile_id": {
2178
+ "type": "UUID",
2179
+ "referenceKind": "crossPackageRef",
2180
+ "notNull": false,
2181
+ "unique": false
2182
+ },
2183
+ "role": {
2184
+ "type": "TEXT",
2185
+ "notNull": false,
2186
+ "unique": false,
2187
+ "default": ""
2188
+ },
2189
+ "placement": {
2190
+ "type": "INTEGER",
2191
+ "notNull": false,
2192
+ "unique": false
2193
+ },
2194
+ "group_id": {
2195
+ "type": "TEXT",
2196
+ "notNull": false,
2197
+ "unique": false
2198
+ },
2199
+ "metadata": {
2200
+ "type": "TEXT",
2201
+ "notNull": false,
2202
+ "unique": false
2203
+ },
2204
+ "external_id": {
2205
+ "type": "TEXT",
2206
+ "notNull": false,
2207
+ "unique": false
2208
+ },
2209
+ "source": {
2210
+ "type": "TEXT",
2211
+ "notNull": false,
2212
+ "unique": false
2213
+ }
2214
+ },
2215
+ "indexes": [
2216
+ {
2217
+ "name": "event_participants_event_id_profile_id_idx",
2218
+ "columns": [
2219
+ "event_id",
2220
+ "profile_id",
2221
+ "role"
2222
+ ],
2223
+ "unique": true
2224
+ },
2225
+ {
2226
+ "name": "event_participants_slug_context_idx",
2227
+ "columns": [
2228
+ "slug",
2229
+ "context"
2230
+ ]
2231
+ },
2232
+ {
2233
+ "name": "event_participants_tenant_id_created_at_idx",
2234
+ "columns": [
2235
+ "tenant_id",
2236
+ "created_at"
2237
+ ]
2238
+ },
2239
+ {
2240
+ "name": "event_participants_profile_id_idx",
2241
+ "columns": [
2242
+ "profile_id"
2243
+ ]
2244
+ }
2245
+ ],
2246
+ "version": "c2faac84"
2247
+ }
2248
+ },
2249
+ "@happyvertical/smrt-events:EventSeries": {
2250
+ "name": "eventseries",
2251
+ "className": "EventSeries",
2252
+ "qualifiedName": "@happyvertical/smrt-events:EventSeries",
2253
+ "collection": "eventserieses",
2254
+ "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventSeries.ts",
2255
+ "packageName": "@happyvertical/smrt-events",
2256
+ "fields": {
2257
+ "created_at": {
2258
+ "type": "datetime",
2259
+ "required": false
3963
2260
  },
3964
- "classifyConstraintError": {
3965
- "name": "classifyConstraintError",
3966
- "async": false,
3967
- "parameters": [
3968
- {
3969
- "name": "message",
3970
- "type": "string",
3971
- "optional": false
2261
+ "updated_at": {
2262
+ "type": "datetime",
2263
+ "required": false
2264
+ },
2265
+ "tenantId": {
2266
+ "type": "text",
2267
+ "required": false,
2268
+ "_meta": {
2269
+ "sqlType": "UUID",
2270
+ "nullable": true,
2271
+ "__tenancy": {
2272
+ "isTenantIdField": true,
2273
+ "autoFilter": true,
2274
+ "required": false,
2275
+ "autoPopulate": true,
2276
+ "nullable": true,
2277
+ "mode": "optional",
2278
+ "field": "tenantId",
2279
+ "allowSuperAdminBypass": false
3972
2280
  }
3973
- ],
3974
- "returnType": "'unique' | 'not_null' | null",
3975
- "isStatic": true,
3976
- "isPublic": true
2281
+ }
3977
2282
  },
3978
- "loadFromId": {
3979
- "name": "loadFromId",
3980
- "async": true,
3981
- "parameters": [],
3982
- "returnType": "any",
3983
- "isStatic": false,
3984
- "isPublic": true
2283
+ "name": {
2284
+ "type": "text",
2285
+ "required": false,
2286
+ "default": ""
3985
2287
  },
3986
- "loadFromSlug": {
3987
- "name": "loadFromSlug",
3988
- "async": true,
3989
- "parameters": [],
3990
- "returnType": "any",
3991
- "isStatic": false,
3992
- "isPublic": true
2288
+ "typeId": {
2289
+ "type": "foreignKey",
2290
+ "required": false,
2291
+ "related": "EventType"
3993
2292
  },
3994
- "is": {
3995
- "name": "is",
3996
- "async": true,
3997
- "parameters": [
3998
- {
3999
- "name": "criteria",
4000
- "type": "string",
4001
- "optional": false
4002
- },
4003
- {
4004
- "name": "options",
4005
- "type": "AiOperationOptions",
4006
- "optional": true
4007
- }
4008
- ],
4009
- "returnType": "any",
4010
- "isStatic": false,
4011
- "isPublic": true
2293
+ "organizerId": {
2294
+ "type": "crossPackageRef",
2295
+ "required": false,
2296
+ "related": "@happyvertical/smrt-profiles:Profile"
4012
2297
  },
4013
- "do": {
4014
- "name": "do",
4015
- "async": true,
4016
- "parameters": [
4017
- {
4018
- "name": "instructions",
4019
- "type": "string",
4020
- "optional": false
4021
- },
4022
- {
4023
- "name": "options",
4024
- "type": "AiOperationOptions",
4025
- "optional": true
4026
- }
4027
- ],
4028
- "returnType": "any",
4029
- "isStatic": false,
4030
- "isPublic": true
2298
+ "description": {
2299
+ "type": "text",
2300
+ "required": false
4031
2301
  },
4032
- "describe": {
4033
- "name": "describe",
4034
- "async": true,
4035
- "parameters": [
4036
- {
4037
- "name": "options",
4038
- "type": "AiOperationOptions",
4039
- "optional": true
4040
- }
4041
- ],
4042
- "returnType": "any",
4043
- "isStatic": false,
4044
- "isPublic": true
2302
+ "startDate": {
2303
+ "type": "datetime",
2304
+ "required": false
4045
2305
  },
4046
- "delete": {
4047
- "name": "delete",
4048
- "async": true,
4049
- "parameters": [],
4050
- "returnType": "Promise<void>",
4051
- "isStatic": false,
4052
- "isPublic": true
2306
+ "endDate": {
2307
+ "type": "datetime",
2308
+ "required": false
4053
2309
  },
4054
- "isRelatedLoaded": {
4055
- "name": "isRelatedLoaded",
4056
- "async": false,
4057
- "parameters": [
4058
- {
4059
- "name": "fieldName",
4060
- "type": "string",
4061
- "optional": false
4062
- }
4063
- ],
4064
- "returnType": "boolean",
4065
- "isStatic": false,
4066
- "isPublic": true
2310
+ "recurrence": {
2311
+ "type": "text",
2312
+ "required": false
4067
2313
  },
4068
- "_setLoadedRelationship": {
4069
- "name": "_setLoadedRelationship",
4070
- "async": false,
4071
- "parameters": [
4072
- {
4073
- "name": "fieldName",
4074
- "type": "string",
4075
- "optional": false
4076
- },
4077
- {
4078
- "name": "value",
4079
- "type": "any",
4080
- "optional": false
4081
- }
4082
- ],
4083
- "returnType": "void",
4084
- "isStatic": false,
4085
- "isPublic": true
2314
+ "metadata": {
2315
+ "type": "text",
2316
+ "required": false
4086
2317
  },
4087
- "loadRelated": {
4088
- "name": "loadRelated",
4089
- "async": true,
4090
- "parameters": [
4091
- {
4092
- "name": "fieldName",
4093
- "type": "string",
4094
- "optional": false
4095
- },
4096
- {
4097
- "name": "opts",
4098
- "type": "LoadRelatedOptions",
4099
- "optional": true
4100
- }
4101
- ],
4102
- "returnType": "Promise<any>",
4103
- "isStatic": false,
4104
- "isPublic": true
2318
+ "externalId": {
2319
+ "type": "text",
2320
+ "required": false
4105
2321
  },
4106
- "loadRelatedMany": {
4107
- "name": "loadRelatedMany",
4108
- "async": true,
4109
- "parameters": [
4110
- {
4111
- "name": "fieldName",
4112
- "type": "string",
4113
- "optional": false
4114
- },
4115
- {
4116
- "name": "opts",
4117
- "type": "LoadRelatedOptions",
4118
- "optional": true
4119
- }
4120
- ],
4121
- "returnType": "Promise<any[]>",
4122
- "isStatic": false,
4123
- "isPublic": true
2322
+ "source": {
2323
+ "type": "text",
2324
+ "required": false
4124
2325
  },
4125
- "getRelated": {
4126
- "name": "getRelated",
4127
- "async": true,
4128
- "parameters": [
4129
- {
4130
- "name": "fieldName",
4131
- "type": "string",
4132
- "optional": false
4133
- },
4134
- {
4135
- "name": "opts",
4136
- "type": "LoadRelatedOptions",
4137
- "optional": true
4138
- }
4139
- ],
4140
- "returnType": "Promise<any>",
4141
- "isStatic": false,
4142
- "isPublic": true
2326
+ "createdAt": {
2327
+ "type": "text",
2328
+ "required": false
4143
2329
  },
4144
- "getAvailableTools": {
4145
- "name": "getAvailableTools",
2330
+ "updatedAt": {
2331
+ "type": "text",
2332
+ "required": false
2333
+ }
2334
+ },
2335
+ "methods": {
2336
+ "getRecurrence": {
2337
+ "name": "getRecurrence",
4146
2338
  "async": false,
4147
2339
  "parameters": [],
4148
- "returnType": "AITool[]",
4149
- "isStatic": false,
4150
- "isPublic": true
4151
- },
4152
- "executeToolCall": {
4153
- "name": "executeToolCall",
4154
- "async": true,
4155
- "parameters": [
4156
- {
4157
- "name": "toolCall",
4158
- "type": "ToolCall",
4159
- "optional": false
4160
- }
4161
- ],
4162
- "returnType": "Promise<ToolCallResult>",
4163
- "isStatic": false,
4164
- "isPublic": true
4165
- },
4166
- "remember": {
4167
- "name": "remember",
4168
- "async": true,
4169
- "parameters": [
4170
- {
4171
- "name": "options",
4172
- "type": "object",
4173
- "optional": false
4174
- }
4175
- ],
4176
- "returnType": "Promise<void>",
2340
+ "returnType": "RecurrencePattern | null",
4177
2341
  "isStatic": false,
4178
2342
  "isPublic": true
4179
2343
  },
4180
- "recall": {
4181
- "name": "recall",
4182
- "async": true,
2344
+ "setRecurrence": {
2345
+ "name": "setRecurrence",
2346
+ "async": false,
4183
2347
  "parameters": [
4184
2348
  {
4185
- "name": "options",
4186
- "type": "object",
2349
+ "name": "pattern",
2350
+ "type": "RecurrencePattern",
4187
2351
  "optional": false
4188
2352
  }
4189
2353
  ],
4190
- "returnType": "Promise",
2354
+ "returnType": "void",
4191
2355
  "isStatic": false,
4192
2356
  "isPublic": true
4193
2357
  },
4194
- "recallAll": {
4195
- "name": "recallAll",
4196
- "async": true,
4197
- "parameters": [
4198
- {
4199
- "name": "options",
4200
- "type": "object",
4201
- "optional": true
4202
- }
4203
- ],
4204
- "returnType": "Promise<Map<string>>",
2358
+ "getMetadata": {
2359
+ "name": "getMetadata",
2360
+ "async": false,
2361
+ "parameters": [],
2362
+ "returnType": "Record<string>",
4205
2363
  "isStatic": false,
4206
2364
  "isPublic": true
4207
2365
  },
4208
- "forget": {
4209
- "name": "forget",
4210
- "async": true,
2366
+ "setMetadata": {
2367
+ "name": "setMetadata",
2368
+ "async": false,
4211
2369
  "parameters": [
4212
2370
  {
4213
- "name": "options",
4214
- "type": "object",
2371
+ "name": "data",
2372
+ "type": "Record<string>",
4215
2373
  "optional": false
4216
2374
  }
4217
2375
  ],
4218
- "returnType": "Promise<void>",
2376
+ "returnType": "void",
4219
2377
  "isStatic": false,
4220
2378
  "isPublic": true
4221
2379
  },
4222
- "forgetScope": {
4223
- "name": "forgetScope",
4224
- "async": true,
2380
+ "updateMetadata": {
2381
+ "name": "updateMetadata",
2382
+ "async": false,
4225
2383
  "parameters": [
4226
2384
  {
4227
- "name": "options",
4228
- "type": "object",
2385
+ "name": "updates",
2386
+ "type": "Record<string>",
4229
2387
  "optional": false
4230
2388
  }
4231
2389
  ],
4232
- "returnType": "Promise<number>",
2390
+ "returnType": "void",
4233
2391
  "isStatic": false,
4234
2392
  "isPublic": true
4235
2393
  },
4236
- "generateEmbeddings": {
4237
- "name": "generateEmbeddings",
2394
+ "getType": {
2395
+ "name": "getType",
4238
2396
  "async": true,
4239
- "parameters": [
4240
- {
4241
- "name": "options",
4242
- "type": "GenerateEmbeddingsOptions",
4243
- "optional": true
4244
- }
4245
- ],
4246
- "returnType": "Promise<void>",
2397
+ "parameters": [],
2398
+ "returnType": "any",
4247
2399
  "isStatic": false,
4248
2400
  "isPublic": true
4249
2401
  },
4250
- "getEmbedding": {
4251
- "name": "getEmbedding",
2402
+ "getOrganizer": {
2403
+ "name": "getOrganizer",
4252
2404
  "async": true,
4253
- "parameters": [
4254
- {
4255
- "name": "fieldName",
4256
- "type": "string",
4257
- "optional": false
4258
- },
4259
- {
4260
- "name": "model",
4261
- "type": "string",
4262
- "optional": true
4263
- }
4264
- ],
4265
- "returnType": "Promise<number[] | null>",
2405
+ "parameters": [],
2406
+ "returnType": "any",
4266
2407
  "isStatic": false,
4267
2408
  "isPublic": true
4268
2409
  },
4269
- "hasStaleEmbeddings": {
4270
- "name": "hasStaleEmbeddings",
2410
+ "getEvents": {
2411
+ "name": "getEvents",
4271
2412
  "async": true,
4272
2413
  "parameters": [],
4273
- "returnType": "Promise<boolean>",
2414
+ "returnType": "any",
4274
2415
  "isStatic": false,
4275
2416
  "isPublic": true
4276
2417
  },
4277
- "clearEmbeddings": {
4278
- "name": "clearEmbeddings",
4279
- "async": true,
2418
+ "isActive": {
2419
+ "name": "isActive",
2420
+ "async": false,
4280
2421
  "parameters": [],
4281
- "returnType": "Promise<void>",
2422
+ "returnType": "boolean",
4282
2423
  "isStatic": false,
4283
2424
  "isPublic": true
2425
+ }
2426
+ },
2427
+ "decoratorConfig": {
2428
+ "tableStrategy": "sti",
2429
+ "api": {
2430
+ "include": [
2431
+ "list",
2432
+ "get",
2433
+ "create",
2434
+ "update",
2435
+ "delete"
2436
+ ]
2437
+ },
2438
+ "mcp": {
2439
+ "include": [
2440
+ "list",
2441
+ "get",
2442
+ "create",
2443
+ "update"
2444
+ ]
2445
+ },
2446
+ "cli": true,
2447
+ "tenantScoped": {
2448
+ "mode": "optional"
2449
+ },
2450
+ "conflictColumns": [
2451
+ "tenant_id",
2452
+ "slug",
2453
+ "context",
2454
+ "_meta_type"
2455
+ ]
2456
+ },
2457
+ "extends": "SmrtObject",
2458
+ "exportName": "EventSeries",
2459
+ "collectionExportName": "EventSeriesCollection",
2460
+ "schema": {
2461
+ "tableName": "event_series",
2462
+ "ddl": "CREATE TABLE IF NOT EXISTS \"event_series\" (\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 \"name\" TEXT DEFAULT '',\n \"type_id\" UUID,\n \"organizer_id\" UUID,\n \"description\" TEXT,\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"recurrence\" TEXT,\n \"metadata\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT\n);",
2463
+ "columns": {
2464
+ "id": {
2465
+ "type": "UUID",
2466
+ "primaryKey": true,
2467
+ "referenceKind": "id",
2468
+ "notNull": true
2469
+ },
2470
+ "slug": {
2471
+ "type": "TEXT",
2472
+ "notNull": true
2473
+ },
2474
+ "context": {
2475
+ "type": "TEXT",
2476
+ "notNull": true,
2477
+ "default": ""
2478
+ },
2479
+ "_meta_type": {
2480
+ "type": "TEXT",
2481
+ "notNull": true
2482
+ },
2483
+ "_meta_data": {
2484
+ "type": "JSON",
2485
+ "notNull": false
2486
+ },
2487
+ "created_at": {
2488
+ "type": "TIMESTAMP",
2489
+ "notNull": true,
2490
+ "default": "current_timestamp"
2491
+ },
2492
+ "updated_at": {
2493
+ "type": "TIMESTAMP",
2494
+ "notNull": true,
2495
+ "default": "current_timestamp"
2496
+ },
2497
+ "tenant_id": {
2498
+ "type": "UUID",
2499
+ "referenceKind": "tenantId",
2500
+ "notNull": false
2501
+ },
2502
+ "name": {
2503
+ "type": "TEXT",
2504
+ "notNull": false,
2505
+ "default": ""
2506
+ },
2507
+ "type_id": {
2508
+ "type": "UUID",
2509
+ "referenceKind": "foreignKey",
2510
+ "notNull": false,
2511
+ "foreignKey": {
2512
+ "table": "event_types",
2513
+ "column": "id",
2514
+ "onDelete": "NO ACTION",
2515
+ "onUpdate": "CASCADE"
2516
+ }
2517
+ },
2518
+ "organizer_id": {
2519
+ "type": "UUID",
2520
+ "referenceKind": "crossPackageRef",
2521
+ "notNull": false
2522
+ },
2523
+ "description": {
2524
+ "type": "TEXT",
2525
+ "notNull": false
2526
+ },
2527
+ "start_date": {
2528
+ "type": "TIMESTAMP",
2529
+ "notNull": false
2530
+ },
2531
+ "end_date": {
2532
+ "type": "TIMESTAMP",
2533
+ "notNull": false
2534
+ },
2535
+ "recurrence": {
2536
+ "type": "TEXT",
2537
+ "notNull": false
2538
+ },
2539
+ "metadata": {
2540
+ "type": "TEXT",
2541
+ "notNull": false
2542
+ },
2543
+ "external_id": {
2544
+ "type": "TEXT",
2545
+ "notNull": false
2546
+ },
2547
+ "source": {
2548
+ "type": "TEXT",
2549
+ "notNull": false
2550
+ }
2551
+ },
2552
+ "indexes": [
2553
+ {
2554
+ "name": "event_series_slug_context_meta_type_idx",
2555
+ "columns": [
2556
+ "tenant_id",
2557
+ "slug",
2558
+ "context",
2559
+ "_meta_type"
2560
+ ],
2561
+ "unique": true
2562
+ },
2563
+ {
2564
+ "name": "event_series_meta_type_idx",
2565
+ "columns": [
2566
+ "_meta_type"
2567
+ ]
2568
+ },
2569
+ {
2570
+ "name": "event_series_tenant_id_created_at_idx",
2571
+ "columns": [
2572
+ "tenant_id",
2573
+ "created_at"
2574
+ ]
2575
+ },
2576
+ {
2577
+ "name": "event_series_type_id_idx",
2578
+ "columns": [
2579
+ "type_id"
2580
+ ]
2581
+ },
2582
+ {
2583
+ "name": "event_series_organizer_id_idx",
2584
+ "columns": [
2585
+ "organizer_id"
2586
+ ]
2587
+ }
2588
+ ],
2589
+ "version": "c79f5863"
2590
+ }
2591
+ },
2592
+ "@happyvertical/smrt-events:EventType": {
2593
+ "name": "eventtype",
2594
+ "className": "EventType",
2595
+ "qualifiedName": "@happyvertical/smrt-events:EventType",
2596
+ "collection": "eventtypes",
2597
+ "filePath": "/home/runner/work/smrt/smrt/packages/events/src/models/EventType.ts",
2598
+ "packageName": "@happyvertical/smrt-events",
2599
+ "fields": {
2600
+ "created_at": {
2601
+ "type": "datetime",
2602
+ "required": false
2603
+ },
2604
+ "updated_at": {
2605
+ "type": "datetime",
2606
+ "required": false
2607
+ },
2608
+ "tenantId": {
2609
+ "type": "text",
2610
+ "required": false,
2611
+ "_meta": {
2612
+ "sqlType": "UUID",
2613
+ "nullable": true,
2614
+ "__tenancy": {
2615
+ "isTenantIdField": true,
2616
+ "autoFilter": true,
2617
+ "required": false,
2618
+ "autoPopulate": true,
2619
+ "nullable": true,
2620
+ "mode": "optional",
2621
+ "field": "tenantId",
2622
+ "allowSuperAdminBypass": false
2623
+ }
2624
+ }
2625
+ },
2626
+ "name": {
2627
+ "type": "text",
2628
+ "required": true,
2629
+ "default": "",
2630
+ "_meta": {
2631
+ "required": true
2632
+ }
2633
+ },
2634
+ "description": {
2635
+ "type": "text",
2636
+ "required": false,
2637
+ "default": ""
2638
+ },
2639
+ "schema": {
2640
+ "type": "text",
2641
+ "required": false,
2642
+ "default": ""
2643
+ },
2644
+ "participantSchema": {
2645
+ "type": "text",
2646
+ "required": false,
2647
+ "default": ""
2648
+ },
2649
+ "createdAt": {
2650
+ "type": "datetime",
2651
+ "required": false
4284
2652
  },
2653
+ "updatedAt": {
2654
+ "type": "datetime",
2655
+ "required": false
2656
+ }
2657
+ },
2658
+ "methods": {
4285
2659
  "getSchema": {
4286
2660
  "name": "getSchema",
4287
2661
  "async": false,