@happyvertical/smrt-events 0.44.1 → 0.45.1

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