@elevasis/sdk 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1168,13 +1168,12 @@ type Json = string | number | boolean | null | {
1168
1168
  } | Json[];
1169
1169
  type Database = {
1170
1170
  __InternalSupabase: {
1171
- PostgrestVersion: '12.2.3 (519615d)';
1171
+ PostgrestVersion: "12.2.3 (519615d)";
1172
1172
  };
1173
1173
  public: {
1174
1174
  Tables: {
1175
1175
  acq_companies: {
1176
1176
  Row: {
1177
- attio_company_id: string | null;
1178
1177
  batch_id: string | null;
1179
1178
  category: string | null;
1180
1179
  category_pain: string | null;
@@ -1198,7 +1197,6 @@ type Database = {
1198
1197
  website: string | null;
1199
1198
  };
1200
1199
  Insert: {
1201
- attio_company_id?: string | null;
1202
1200
  batch_id?: string | null;
1203
1201
  category?: string | null;
1204
1202
  category_pain?: string | null;
@@ -1222,7 +1220,6 @@ type Database = {
1222
1220
  website?: string | null;
1223
1221
  };
1224
1222
  Update: {
1225
- attio_company_id?: string | null;
1226
1223
  batch_id?: string | null;
1227
1224
  category?: string | null;
1228
1225
  category_pain?: string | null;
@@ -1247,17 +1244,16 @@ type Database = {
1247
1244
  };
1248
1245
  Relationships: [
1249
1246
  {
1250
- foreignKeyName: 'acq_companies_organization_id_fkey';
1251
- columns: ['organization_id'];
1247
+ foreignKeyName: "acq_companies_organization_id_fkey";
1248
+ columns: ["organization_id"];
1252
1249
  isOneToOne: false;
1253
- referencedRelation: 'organizations';
1254
- referencedColumns: ['id'];
1250
+ referencedRelation: "organizations";
1251
+ referencedColumns: ["id"];
1255
1252
  }
1256
1253
  ];
1257
1254
  };
1258
1255
  acq_contacts: {
1259
1256
  Row: {
1260
- attio_person_id: string | null;
1261
1257
  batch_id: string | null;
1262
1258
  brochure_first_viewed_at: string | null;
1263
1259
  brochure_view_count: number;
@@ -1283,7 +1279,6 @@ type Database = {
1283
1279
  updated_at: string;
1284
1280
  };
1285
1281
  Insert: {
1286
- attio_person_id?: string | null;
1287
1282
  batch_id?: string | null;
1288
1283
  brochure_first_viewed_at?: string | null;
1289
1284
  brochure_view_count?: number;
@@ -1309,7 +1304,6 @@ type Database = {
1309
1304
  updated_at?: string;
1310
1305
  };
1311
1306
  Update: {
1312
- attio_person_id?: string | null;
1313
1307
  batch_id?: string | null;
1314
1308
  brochure_first_viewed_at?: string | null;
1315
1309
  brochure_view_count?: number;
@@ -1336,18 +1330,18 @@ type Database = {
1336
1330
  };
1337
1331
  Relationships: [
1338
1332
  {
1339
- foreignKeyName: 'acq_contacts_company_id_fkey';
1340
- columns: ['company_id'];
1333
+ foreignKeyName: "acq_contacts_company_id_fkey";
1334
+ columns: ["company_id"];
1341
1335
  isOneToOne: false;
1342
- referencedRelation: 'acq_companies';
1343
- referencedColumns: ['id'];
1336
+ referencedRelation: "acq_companies";
1337
+ referencedColumns: ["id"];
1344
1338
  },
1345
1339
  {
1346
- foreignKeyName: 'acq_contacts_organization_id_fkey';
1347
- columns: ['organization_id'];
1340
+ foreignKeyName: "acq_contacts_organization_id_fkey";
1341
+ columns: ["organization_id"];
1348
1342
  isOneToOne: false;
1349
- referencedRelation: 'organizations';
1350
- referencedColumns: ['id'];
1343
+ referencedRelation: "organizations";
1344
+ referencedColumns: ["id"];
1351
1345
  }
1352
1346
  ];
1353
1347
  };
@@ -1384,11 +1378,11 @@ type Database = {
1384
1378
  };
1385
1379
  Relationships: [
1386
1380
  {
1387
- foreignKeyName: 'acq_content_organization_id_fkey';
1388
- columns: ['organization_id'];
1381
+ foreignKeyName: "acq_content_organization_id_fkey";
1382
+ columns: ["organization_id"];
1389
1383
  isOneToOne: false;
1390
- referencedRelation: 'organizations';
1391
- referencedColumns: ['id'];
1384
+ referencedRelation: "organizations";
1385
+ referencedColumns: ["id"];
1392
1386
  }
1393
1387
  ];
1394
1388
  };
@@ -1452,25 +1446,132 @@ type Database = {
1452
1446
  };
1453
1447
  Relationships: [
1454
1448
  {
1455
- foreignKeyName: 'acq_content_distributions_content_id_fkey';
1456
- columns: ['content_id'];
1449
+ foreignKeyName: "acq_content_distributions_content_id_fkey";
1450
+ columns: ["content_id"];
1457
1451
  isOneToOne: false;
1458
- referencedRelation: 'acq_content';
1459
- referencedColumns: ['id'];
1452
+ referencedRelation: "acq_content";
1453
+ referencedColumns: ["id"];
1460
1454
  },
1461
1455
  {
1462
- foreignKeyName: 'acq_content_distributions_organization_id_fkey';
1463
- columns: ['organization_id'];
1456
+ foreignKeyName: "acq_content_distributions_organization_id_fkey";
1457
+ columns: ["organization_id"];
1464
1458
  isOneToOne: false;
1465
- referencedRelation: 'organizations';
1466
- referencedColumns: ['id'];
1459
+ referencedRelation: "organizations";
1460
+ referencedColumns: ["id"];
1461
+ }
1462
+ ];
1463
+ };
1464
+ acq_deal_notes: {
1465
+ Row: {
1466
+ author_user_id: string | null;
1467
+ body: string;
1468
+ created_at: string;
1469
+ deal_id: string;
1470
+ id: string;
1471
+ organization_id: string;
1472
+ updated_at: string;
1473
+ };
1474
+ Insert: {
1475
+ author_user_id?: string | null;
1476
+ body: string;
1477
+ created_at?: string;
1478
+ deal_id: string;
1479
+ id?: string;
1480
+ organization_id: string;
1481
+ updated_at?: string;
1482
+ };
1483
+ Update: {
1484
+ author_user_id?: string | null;
1485
+ body?: string;
1486
+ created_at?: string;
1487
+ deal_id?: string;
1488
+ id?: string;
1489
+ organization_id?: string;
1490
+ updated_at?: string;
1491
+ };
1492
+ Relationships: [
1493
+ {
1494
+ foreignKeyName: "acq_deal_notes_deal_id_fkey";
1495
+ columns: ["deal_id"];
1496
+ isOneToOne: false;
1497
+ referencedRelation: "acq_deals";
1498
+ referencedColumns: ["id"];
1499
+ },
1500
+ {
1501
+ foreignKeyName: "acq_deal_notes_organization_id_fkey";
1502
+ columns: ["organization_id"];
1503
+ isOneToOne: false;
1504
+ referencedRelation: "organizations";
1505
+ referencedColumns: ["id"];
1506
+ }
1507
+ ];
1508
+ };
1509
+ acq_deal_tasks: {
1510
+ Row: {
1511
+ assignee_user_id: string | null;
1512
+ completed_at: string | null;
1513
+ completed_by_user_id: string | null;
1514
+ created_at: string;
1515
+ created_by_user_id: string | null;
1516
+ deal_id: string;
1517
+ description: string | null;
1518
+ due_at: string | null;
1519
+ id: string;
1520
+ kind: string;
1521
+ organization_id: string;
1522
+ title: string;
1523
+ updated_at: string;
1524
+ };
1525
+ Insert: {
1526
+ assignee_user_id?: string | null;
1527
+ completed_at?: string | null;
1528
+ completed_by_user_id?: string | null;
1529
+ created_at?: string;
1530
+ created_by_user_id?: string | null;
1531
+ deal_id: string;
1532
+ description?: string | null;
1533
+ due_at?: string | null;
1534
+ id?: string;
1535
+ kind?: string;
1536
+ organization_id: string;
1537
+ title: string;
1538
+ updated_at?: string;
1539
+ };
1540
+ Update: {
1541
+ assignee_user_id?: string | null;
1542
+ completed_at?: string | null;
1543
+ completed_by_user_id?: string | null;
1544
+ created_at?: string;
1545
+ created_by_user_id?: string | null;
1546
+ deal_id?: string;
1547
+ description?: string | null;
1548
+ due_at?: string | null;
1549
+ id?: string;
1550
+ kind?: string;
1551
+ organization_id?: string;
1552
+ title?: string;
1553
+ updated_at?: string;
1554
+ };
1555
+ Relationships: [
1556
+ {
1557
+ foreignKeyName: "acq_deal_tasks_deal_id_fkey";
1558
+ columns: ["deal_id"];
1559
+ isOneToOne: false;
1560
+ referencedRelation: "acq_deals";
1561
+ referencedColumns: ["id"];
1562
+ },
1563
+ {
1564
+ foreignKeyName: "acq_deal_tasks_organization_id_fkey";
1565
+ columns: ["organization_id"];
1566
+ isOneToOne: false;
1567
+ referencedRelation: "organizations";
1568
+ referencedColumns: ["id"];
1467
1569
  }
1468
1570
  ];
1469
1571
  };
1470
1572
  acq_deals: {
1471
1573
  Row: {
1472
1574
  activity_log: Json;
1473
- attio_deal_id: string;
1474
1575
  cached_stage: string | null;
1475
1576
  closed_lost_at: string | null;
1476
1577
  closed_lost_reason: string | null;
@@ -1505,7 +1606,6 @@ type Database = {
1505
1606
  };
1506
1607
  Insert: {
1507
1608
  activity_log?: Json;
1508
- attio_deal_id: string;
1509
1609
  cached_stage?: string | null;
1510
1610
  closed_lost_at?: string | null;
1511
1611
  closed_lost_reason?: string | null;
@@ -1540,7 +1640,6 @@ type Database = {
1540
1640
  };
1541
1641
  Update: {
1542
1642
  activity_log?: Json;
1543
- attio_deal_id?: string;
1544
1643
  cached_stage?: string | null;
1545
1644
  closed_lost_at?: string | null;
1546
1645
  closed_lost_reason?: string | null;
@@ -1575,25 +1674,125 @@ type Database = {
1575
1674
  };
1576
1675
  Relationships: [
1577
1676
  {
1578
- foreignKeyName: 'acq_deals_contact_id_fkey';
1579
- columns: ['contact_id'];
1677
+ foreignKeyName: "acq_deals_contact_id_fkey";
1678
+ columns: ["contact_id"];
1679
+ isOneToOne: false;
1680
+ referencedRelation: "acq_contacts";
1681
+ referencedColumns: ["id"];
1682
+ },
1683
+ {
1684
+ foreignKeyName: "acq_deals_organization_id_fkey";
1685
+ columns: ["organization_id"];
1686
+ isOneToOne: false;
1687
+ referencedRelation: "organizations";
1688
+ referencedColumns: ["id"];
1689
+ },
1690
+ {
1691
+ foreignKeyName: "acq_deals_source_list_id_fkey";
1692
+ columns: ["source_list_id"];
1693
+ isOneToOne: false;
1694
+ referencedRelation: "acq_lists";
1695
+ referencedColumns: ["id"];
1696
+ }
1697
+ ];
1698
+ };
1699
+ acq_list_companies: {
1700
+ Row: {
1701
+ added_at: string;
1702
+ added_by: string | null;
1703
+ company_id: string;
1704
+ id: string;
1705
+ list_id: string;
1706
+ source_execution_id: string | null;
1707
+ source_input_hash: string | null;
1708
+ source_resource_id: string | null;
1709
+ stage: string | null;
1710
+ stage_updated_at: string | null;
1711
+ };
1712
+ Insert: {
1713
+ added_at?: string;
1714
+ added_by?: string | null;
1715
+ company_id: string;
1716
+ id?: string;
1717
+ list_id: string;
1718
+ source_execution_id?: string | null;
1719
+ source_input_hash?: string | null;
1720
+ source_resource_id?: string | null;
1721
+ stage?: string | null;
1722
+ stage_updated_at?: string | null;
1723
+ };
1724
+ Update: {
1725
+ added_at?: string;
1726
+ added_by?: string | null;
1727
+ company_id?: string;
1728
+ id?: string;
1729
+ list_id?: string;
1730
+ source_execution_id?: string | null;
1731
+ source_input_hash?: string | null;
1732
+ source_resource_id?: string | null;
1733
+ stage?: string | null;
1734
+ stage_updated_at?: string | null;
1735
+ };
1736
+ Relationships: [
1737
+ {
1738
+ foreignKeyName: "acq_list_companies_company_id_fkey";
1739
+ columns: ["company_id"];
1580
1740
  isOneToOne: false;
1581
- referencedRelation: 'acq_contacts';
1582
- referencedColumns: ['id'];
1741
+ referencedRelation: "acq_companies";
1742
+ referencedColumns: ["id"];
1583
1743
  },
1584
1744
  {
1585
- foreignKeyName: 'acq_deals_organization_id_fkey';
1586
- columns: ['organization_id'];
1745
+ foreignKeyName: "acq_list_companies_list_id_fkey";
1746
+ columns: ["list_id"];
1587
1747
  isOneToOne: false;
1588
- referencedRelation: 'organizations';
1589
- referencedColumns: ['id'];
1748
+ referencedRelation: "acq_lists";
1749
+ referencedColumns: ["id"];
1590
1750
  },
1591
1751
  {
1592
- foreignKeyName: 'acq_deals_source_list_id_fkey';
1593
- columns: ['source_list_id'];
1752
+ foreignKeyName: "acq_list_companies_source_execution_id_fkey";
1753
+ columns: ["source_execution_id"];
1594
1754
  isOneToOne: false;
1595
- referencedRelation: 'acq_lists';
1596
- referencedColumns: ['id'];
1755
+ referencedRelation: "execution_logs";
1756
+ referencedColumns: ["execution_id"];
1757
+ }
1758
+ ];
1759
+ };
1760
+ acq_list_executions: {
1761
+ Row: {
1762
+ created_at: string;
1763
+ execution_id: string;
1764
+ id: string;
1765
+ list_id: string;
1766
+ payload: Json;
1767
+ };
1768
+ Insert: {
1769
+ created_at?: string;
1770
+ execution_id: string;
1771
+ id?: string;
1772
+ list_id: string;
1773
+ payload?: Json;
1774
+ };
1775
+ Update: {
1776
+ created_at?: string;
1777
+ execution_id?: string;
1778
+ id?: string;
1779
+ list_id?: string;
1780
+ payload?: Json;
1781
+ };
1782
+ Relationships: [
1783
+ {
1784
+ foreignKeyName: "acq_list_executions_execution_id_fkey";
1785
+ columns: ["execution_id"];
1786
+ isOneToOne: false;
1787
+ referencedRelation: "execution_logs";
1788
+ referencedColumns: ["execution_id"];
1789
+ },
1790
+ {
1791
+ foreignKeyName: "acq_list_executions_list_id_fkey";
1792
+ columns: ["list_id"];
1793
+ isOneToOne: false;
1794
+ referencedRelation: "acq_lists";
1795
+ referencedColumns: ["id"];
1597
1796
  }
1598
1797
  ];
1599
1798
  };
@@ -1604,6 +1803,11 @@ type Database = {
1604
1803
  contact_id: string;
1605
1804
  id: string;
1606
1805
  list_id: string;
1806
+ source_execution_id: string | null;
1807
+ source_input_hash: string | null;
1808
+ source_resource_id: string | null;
1809
+ stage: string | null;
1810
+ stage_updated_at: string | null;
1607
1811
  };
1608
1812
  Insert: {
1609
1813
  added_at?: string;
@@ -1611,6 +1815,11 @@ type Database = {
1611
1815
  contact_id: string;
1612
1816
  id?: string;
1613
1817
  list_id: string;
1818
+ source_execution_id?: string | null;
1819
+ source_input_hash?: string | null;
1820
+ source_resource_id?: string | null;
1821
+ stage?: string | null;
1822
+ stage_updated_at?: string | null;
1614
1823
  };
1615
1824
  Update: {
1616
1825
  added_at?: string;
@@ -1618,21 +1827,33 @@ type Database = {
1618
1827
  contact_id?: string;
1619
1828
  id?: string;
1620
1829
  list_id?: string;
1830
+ source_execution_id?: string | null;
1831
+ source_input_hash?: string | null;
1832
+ source_resource_id?: string | null;
1833
+ stage?: string | null;
1834
+ stage_updated_at?: string | null;
1621
1835
  };
1622
1836
  Relationships: [
1623
1837
  {
1624
- foreignKeyName: 'acq_list_members_contact_id_fkey';
1625
- columns: ['contact_id'];
1838
+ foreignKeyName: "acq_list_members_contact_id_fkey";
1839
+ columns: ["contact_id"];
1840
+ isOneToOne: false;
1841
+ referencedRelation: "acq_contacts";
1842
+ referencedColumns: ["id"];
1843
+ },
1844
+ {
1845
+ foreignKeyName: "acq_list_members_list_id_fkey";
1846
+ columns: ["list_id"];
1626
1847
  isOneToOne: false;
1627
- referencedRelation: 'acq_contacts';
1628
- referencedColumns: ['id'];
1848
+ referencedRelation: "acq_lists";
1849
+ referencedColumns: ["id"];
1629
1850
  },
1630
1851
  {
1631
- foreignKeyName: 'acq_list_members_list_id_fkey';
1632
- columns: ['list_id'];
1852
+ foreignKeyName: "acq_list_members_source_execution_id_fkey";
1853
+ columns: ["source_execution_id"];
1633
1854
  isOneToOne: false;
1634
- referencedRelation: 'acq_lists';
1635
- referencedColumns: ['id'];
1855
+ referencedRelation: "execution_logs";
1856
+ referencedColumns: ["execution_id"];
1636
1857
  }
1637
1858
  ];
1638
1859
  };
@@ -1640,6 +1861,7 @@ type Database = {
1640
1861
  Row: {
1641
1862
  batch_ids: string[];
1642
1863
  completed_at: string | null;
1864
+ config: Json;
1643
1865
  created_at: string;
1644
1866
  description: string | null;
1645
1867
  id: string;
@@ -1654,6 +1876,7 @@ type Database = {
1654
1876
  Insert: {
1655
1877
  batch_ids?: string[];
1656
1878
  completed_at?: string | null;
1879
+ config?: Json;
1657
1880
  created_at?: string;
1658
1881
  description?: string | null;
1659
1882
  id?: string;
@@ -1668,6 +1891,7 @@ type Database = {
1668
1891
  Update: {
1669
1892
  batch_ids?: string[];
1670
1893
  completed_at?: string | null;
1894
+ config?: Json;
1671
1895
  created_at?: string;
1672
1896
  description?: string | null;
1673
1897
  id?: string;
@@ -1681,11 +1905,11 @@ type Database = {
1681
1905
  };
1682
1906
  Relationships: [
1683
1907
  {
1684
- foreignKeyName: 'acq_lists_organization_id_fkey';
1685
- columns: ['organization_id'];
1908
+ foreignKeyName: "acq_lists_organization_id_fkey";
1909
+ columns: ["organization_id"];
1686
1910
  isOneToOne: false;
1687
- referencedRelation: 'organizations';
1688
- referencedColumns: ['id'];
1911
+ referencedRelation: "organizations";
1912
+ referencedColumns: ["id"];
1689
1913
  }
1690
1914
  ];
1691
1915
  };
@@ -1761,18 +1985,18 @@ type Database = {
1761
1985
  };
1762
1986
  Relationships: [
1763
1987
  {
1764
- foreignKeyName: 'acq_seo_metrics_organization_id_fkey';
1765
- columns: ['organization_id'];
1988
+ foreignKeyName: "acq_seo_metrics_organization_id_fkey";
1989
+ columns: ["organization_id"];
1766
1990
  isOneToOne: false;
1767
- referencedRelation: 'organizations';
1768
- referencedColumns: ['id'];
1991
+ referencedRelation: "organizations";
1992
+ referencedColumns: ["id"];
1769
1993
  },
1770
1994
  {
1771
- foreignKeyName: 'acq_seo_metrics_seo_page_id_fkey';
1772
- columns: ['seo_page_id'];
1995
+ foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
1996
+ columns: ["seo_page_id"];
1773
1997
  isOneToOne: false;
1774
- referencedRelation: 'acq_seo_pages';
1775
- referencedColumns: ['id'];
1998
+ referencedRelation: "acq_seo_pages";
1999
+ referencedColumns: ["id"];
1776
2000
  }
1777
2001
  ];
1778
2002
  };
@@ -1848,11 +2072,11 @@ type Database = {
1848
2072
  };
1849
2073
  Relationships: [
1850
2074
  {
1851
- foreignKeyName: 'acq_seo_pages_organization_id_fkey';
1852
- columns: ['organization_id'];
2075
+ foreignKeyName: "acq_seo_pages_organization_id_fkey";
2076
+ columns: ["organization_id"];
1853
2077
  isOneToOne: false;
1854
- referencedRelation: 'organizations';
1855
- referencedColumns: ['id'];
2078
+ referencedRelation: "organizations";
2079
+ referencedColumns: ["id"];
1856
2080
  }
1857
2081
  ];
1858
2082
  };
@@ -1949,11 +2173,11 @@ type Database = {
1949
2173
  };
1950
2174
  Relationships: [
1951
2175
  {
1952
- foreignKeyName: 'acq_social_posts_organization_id_fkey';
1953
- columns: ['organization_id'];
2176
+ foreignKeyName: "acq_social_posts_organization_id_fkey";
2177
+ columns: ["organization_id"];
1954
2178
  isOneToOne: false;
1955
- referencedRelation: 'organizations';
1956
- referencedColumns: ['id'];
2179
+ referencedRelation: "organizations";
2180
+ referencedColumns: ["id"];
1957
2181
  }
1958
2182
  ];
1959
2183
  };
@@ -2008,11 +2232,11 @@ type Database = {
2008
2232
  };
2009
2233
  Relationships: [
2010
2234
  {
2011
- foreignKeyName: 'activities_organization_id_fkey';
2012
- columns: ['organization_id'];
2235
+ foreignKeyName: "activities_organization_id_fkey";
2236
+ columns: ["organization_id"];
2013
2237
  isOneToOne: false;
2014
- referencedRelation: 'organizations';
2015
- referencedColumns: ['id'];
2238
+ referencedRelation: "organizations";
2239
+ referencedColumns: ["id"];
2016
2240
  }
2017
2241
  ];
2018
2242
  };
@@ -2043,11 +2267,11 @@ type Database = {
2043
2267
  };
2044
2268
  Relationships: [
2045
2269
  {
2046
- foreignKeyName: 'api_keys_organization_id_fkey';
2047
- columns: ['organization_id'];
2270
+ foreignKeyName: "api_keys_organization_id_fkey";
2271
+ columns: ["organization_id"];
2048
2272
  isOneToOne: false;
2049
- referencedRelation: 'organizations';
2050
- referencedColumns: ['id'];
2273
+ referencedRelation: "organizations";
2274
+ referencedColumns: ["id"];
2051
2275
  }
2052
2276
  ];
2053
2277
  };
@@ -2084,11 +2308,11 @@ type Database = {
2084
2308
  };
2085
2309
  Relationships: [
2086
2310
  {
2087
- foreignKeyName: 'calibration_projects_organization_id_fkey';
2088
- columns: ['organization_id'];
2311
+ foreignKeyName: "calibration_projects_organization_id_fkey";
2312
+ columns: ["organization_id"];
2089
2313
  isOneToOne: false;
2090
- referencedRelation: 'organizations';
2091
- referencedColumns: ['id'];
2314
+ referencedRelation: "organizations";
2315
+ referencedColumns: ["id"];
2092
2316
  }
2093
2317
  ];
2094
2318
  };
@@ -2143,18 +2367,18 @@ type Database = {
2143
2367
  };
2144
2368
  Relationships: [
2145
2369
  {
2146
- foreignKeyName: 'calibration_runs_organization_id_fkey';
2147
- columns: ['organization_id'];
2370
+ foreignKeyName: "calibration_runs_organization_id_fkey";
2371
+ columns: ["organization_id"];
2148
2372
  isOneToOne: false;
2149
- referencedRelation: 'organizations';
2150
- referencedColumns: ['id'];
2373
+ referencedRelation: "organizations";
2374
+ referencedColumns: ["id"];
2151
2375
  },
2152
2376
  {
2153
- foreignKeyName: 'calibration_runs_project_id_fkey';
2154
- columns: ['project_id'];
2377
+ foreignKeyName: "calibration_runs_project_id_fkey";
2378
+ columns: ["project_id"];
2155
2379
  isOneToOne: false;
2156
- referencedRelation: 'calibration_projects';
2157
- referencedColumns: ['id'];
2380
+ referencedRelation: "calibration_projects";
2381
+ referencedColumns: ["id"];
2158
2382
  }
2159
2383
  ];
2160
2384
  };
@@ -2233,25 +2457,25 @@ type Database = {
2233
2457
  };
2234
2458
  Relationships: [
2235
2459
  {
2236
- foreignKeyName: 'command_queue_completed_by_fkey';
2237
- columns: ['completed_by'];
2460
+ foreignKeyName: "command_queue_completed_by_fkey";
2461
+ columns: ["completed_by"];
2238
2462
  isOneToOne: false;
2239
- referencedRelation: 'users';
2240
- referencedColumns: ['id'];
2463
+ referencedRelation: "users";
2464
+ referencedColumns: ["id"];
2241
2465
  },
2242
2466
  {
2243
- foreignKeyName: 'command_queue_organization_id_fkey';
2244
- columns: ['organization_id'];
2467
+ foreignKeyName: "command_queue_organization_id_fkey";
2468
+ columns: ["organization_id"];
2245
2469
  isOneToOne: false;
2246
- referencedRelation: 'organizations';
2247
- referencedColumns: ['id'];
2470
+ referencedRelation: "organizations";
2471
+ referencedColumns: ["id"];
2248
2472
  },
2249
2473
  {
2250
- foreignKeyName: 'command_queue_target_execution_id_fkey';
2251
- columns: ['target_execution_id'];
2474
+ foreignKeyName: "command_queue_target_execution_id_fkey";
2475
+ columns: ["target_execution_id"];
2252
2476
  isOneToOne: false;
2253
- referencedRelation: 'execution_logs';
2254
- referencedColumns: ['execution_id'];
2477
+ referencedRelation: "execution_logs";
2478
+ referencedColumns: ["execution_id"];
2255
2479
  }
2256
2480
  ];
2257
2481
  };
@@ -2291,397 +2515,109 @@ type Database = {
2291
2515
  };
2292
2516
  Relationships: [
2293
2517
  {
2294
- foreignKeyName: 'credentials_created_by_fkey';
2295
- columns: ['created_by'];
2518
+ foreignKeyName: "credentials_created_by_fkey";
2519
+ columns: ["created_by"];
2296
2520
  isOneToOne: false;
2297
- referencedRelation: 'users';
2298
- referencedColumns: ['id'];
2521
+ referencedRelation: "users";
2522
+ referencedColumns: ["id"];
2299
2523
  },
2300
2524
  {
2301
- foreignKeyName: 'credentials_organization_id_fkey';
2302
- columns: ['organization_id'];
2525
+ foreignKeyName: "credentials_organization_id_fkey";
2526
+ columns: ["organization_id"];
2303
2527
  isOneToOne: false;
2304
- referencedRelation: 'organizations';
2305
- referencedColumns: ['id'];
2528
+ referencedRelation: "organizations";
2529
+ referencedColumns: ["id"];
2306
2530
  }
2307
2531
  ];
2308
2532
  };
2309
- prj_tasks: {
2533
+ deployments: {
2310
2534
  Row: {
2311
- checklist: Json | null;
2312
- completed_at: string | null;
2535
+ compiled_docs: Json | null;
2313
2536
  created_at: string;
2314
- description: string | null;
2315
- due_date: string | null;
2316
- file_url: string | null;
2537
+ deployment_version: string | null;
2538
+ documentation: Json | null;
2539
+ error_message: string | null;
2317
2540
  id: string;
2318
- metadata: Json | null;
2319
- milestone_id: string | null;
2320
- name: string;
2321
2541
  organization_id: string;
2322
- parent_task_id: string | null;
2323
- project_id: string;
2324
- resume_context: Json | null;
2542
+ pid: number | null;
2543
+ port: number | null;
2544
+ sdk_version: string;
2325
2545
  status: string;
2326
- type: string;
2546
+ tarball_path: string | null;
2327
2547
  updated_at: string;
2328
2548
  };
2329
2549
  Insert: {
2330
- checklist?: Json | null;
2331
- completed_at?: string | null;
2550
+ compiled_docs?: Json | null;
2332
2551
  created_at?: string;
2333
- description?: string | null;
2334
- due_date?: string | null;
2335
- file_url?: string | null;
2552
+ deployment_version?: string | null;
2553
+ documentation?: Json | null;
2554
+ error_message?: string | null;
2336
2555
  id?: string;
2337
- metadata?: Json | null;
2338
- milestone_id?: string | null;
2339
- name: string;
2340
2556
  organization_id: string;
2341
- parent_task_id?: string | null;
2342
- project_id: string;
2343
- resume_context?: Json | null;
2557
+ pid?: number | null;
2558
+ port?: number | null;
2559
+ sdk_version: string;
2344
2560
  status?: string;
2345
- type?: string;
2561
+ tarball_path?: string | null;
2346
2562
  updated_at?: string;
2347
2563
  };
2348
2564
  Update: {
2349
- checklist?: Json | null;
2350
- completed_at?: string | null;
2565
+ compiled_docs?: Json | null;
2351
2566
  created_at?: string;
2352
- description?: string | null;
2353
- due_date?: string | null;
2354
- file_url?: string | null;
2567
+ deployment_version?: string | null;
2568
+ documentation?: Json | null;
2569
+ error_message?: string | null;
2355
2570
  id?: string;
2356
- metadata?: Json | null;
2357
- milestone_id?: string | null;
2358
- name?: string;
2359
2571
  organization_id?: string;
2360
- parent_task_id?: string | null;
2361
- project_id?: string;
2362
- resume_context?: Json | null;
2572
+ pid?: number | null;
2573
+ port?: number | null;
2574
+ sdk_version?: string;
2363
2575
  status?: string;
2364
- type?: string;
2576
+ tarball_path?: string | null;
2365
2577
  updated_at?: string;
2366
2578
  };
2367
2579
  Relationships: [
2368
2580
  {
2369
- foreignKeyName: 'prj_tasks_project_id_fkey';
2370
- columns: ['project_id'];
2371
- isOneToOne: false;
2372
- referencedRelation: 'prj_projects';
2373
- referencedColumns: ['id'];
2374
- },
2375
- {
2376
- foreignKeyName: 'prj_tasks_milestone_id_fkey';
2377
- columns: ['milestone_id'];
2378
- isOneToOne: false;
2379
- referencedRelation: 'prj_milestones';
2380
- referencedColumns: ['id'];
2381
- },
2382
- {
2383
- foreignKeyName: 'prj_tasks_organization_id_fkey';
2384
- columns: ['organization_id'];
2581
+ foreignKeyName: "deployments_organization_id_fkey";
2582
+ columns: ["organization_id"];
2385
2583
  isOneToOne: false;
2386
- referencedRelation: 'organizations';
2387
- referencedColumns: ['id'];
2584
+ referencedRelation: "organizations";
2585
+ referencedColumns: ["id"];
2388
2586
  }
2389
2587
  ];
2390
2588
  };
2391
- prj_projects: {
2589
+ execution_errors: {
2392
2590
  Row: {
2393
- actual_end_date: string | null;
2394
- client_company_id: string | null;
2395
- contract_value: number | null;
2396
- created_at: string;
2397
- deal_id: string | null;
2398
- description: string | null;
2591
+ created_at: string | null;
2592
+ error_category: string;
2593
+ error_message: string;
2594
+ error_severity: string;
2595
+ error_stack_trace: string | null;
2596
+ error_type: string;
2597
+ execution_id: string;
2399
2598
  id: string;
2400
- kind: string;
2401
2599
  metadata: Json | null;
2402
- name: string;
2600
+ occurred_at: string;
2403
2601
  organization_id: string;
2404
- start_date: string | null;
2405
- status: string;
2406
- target_end_date: string | null;
2407
- updated_at: string;
2602
+ resolved: boolean;
2603
+ resolved_at: string | null;
2604
+ resolved_by: string | null;
2408
2605
  };
2409
2606
  Insert: {
2410
- actual_end_date?: string | null;
2411
- client_company_id?: string | null;
2412
- contract_value?: number | null;
2413
- created_at?: string;
2414
- deal_id?: string | null;
2415
- description?: string | null;
2607
+ created_at?: string | null;
2608
+ error_category: string;
2609
+ error_message: string;
2610
+ error_severity: string;
2611
+ error_stack_trace?: string | null;
2612
+ error_type: string;
2613
+ execution_id: string;
2416
2614
  id?: string;
2417
- kind?: string;
2418
2615
  metadata?: Json | null;
2419
- name: string;
2616
+ occurred_at?: string;
2420
2617
  organization_id: string;
2421
- start_date?: string | null;
2422
- status?: string;
2423
- target_end_date?: string | null;
2424
- updated_at?: string;
2425
- };
2426
- Update: {
2427
- actual_end_date?: string | null;
2428
- client_company_id?: string | null;
2429
- contract_value?: number | null;
2430
- created_at?: string;
2431
- deal_id?: string | null;
2432
- description?: string | null;
2433
- id?: string;
2434
- kind?: string;
2435
- metadata?: Json | null;
2436
- name?: string;
2437
- organization_id?: string;
2438
- start_date?: string | null;
2439
- status?: string;
2440
- target_end_date?: string | null;
2441
- updated_at?: string;
2442
- };
2443
- Relationships: [
2444
- {
2445
- foreignKeyName: 'prj_projects_client_company_id_fkey';
2446
- columns: ['client_company_id'];
2447
- isOneToOne: false;
2448
- referencedRelation: 'acq_companies';
2449
- referencedColumns: ['id'];
2450
- },
2451
- {
2452
- foreignKeyName: 'prj_projects_deal_id_fkey';
2453
- columns: ['deal_id'];
2454
- isOneToOne: false;
2455
- referencedRelation: 'acq_deals';
2456
- referencedColumns: ['id'];
2457
- },
2458
- {
2459
- foreignKeyName: 'prj_projects_organization_id_fkey';
2460
- columns: ['organization_id'];
2461
- isOneToOne: false;
2462
- referencedRelation: 'organizations';
2463
- referencedColumns: ['id'];
2464
- }
2465
- ];
2466
- };
2467
- prj_milestones: {
2468
- Row: {
2469
- checklist: Json | null;
2470
- completed_at: string | null;
2471
- created_at: string;
2472
- description: string | null;
2473
- due_date: string | null;
2474
- id: string;
2475
- metadata: Json | null;
2476
- name: string;
2477
- organization_id: string;
2478
- project_id: string;
2479
- sequence: number;
2480
- status: string;
2481
- updated_at: string;
2482
- };
2483
- Insert: {
2484
- checklist?: Json | null;
2485
- completed_at?: string | null;
2486
- created_at?: string;
2487
- description?: string | null;
2488
- due_date?: string | null;
2489
- id?: string;
2490
- metadata?: Json | null;
2491
- name: string;
2492
- organization_id: string;
2493
- project_id: string;
2494
- sequence?: number;
2495
- status?: string;
2496
- updated_at?: string;
2497
- };
2498
- Update: {
2499
- checklist?: Json | null;
2500
- completed_at?: string | null;
2501
- created_at?: string;
2502
- description?: string | null;
2503
- due_date?: string | null;
2504
- id?: string;
2505
- metadata?: Json | null;
2506
- name?: string;
2507
- organization_id?: string;
2508
- project_id?: string;
2509
- sequence?: number;
2510
- status?: string;
2511
- updated_at?: string;
2512
- };
2513
- Relationships: [
2514
- {
2515
- foreignKeyName: 'prj_milestones_project_id_fkey';
2516
- columns: ['project_id'];
2517
- isOneToOne: false;
2518
- referencedRelation: 'prj_projects';
2519
- referencedColumns: ['id'];
2520
- },
2521
- {
2522
- foreignKeyName: 'prj_milestones_organization_id_fkey';
2523
- columns: ['organization_id'];
2524
- isOneToOne: false;
2525
- referencedRelation: 'organizations';
2526
- referencedColumns: ['id'];
2527
- }
2528
- ];
2529
- };
2530
- prj_notes: {
2531
- Row: {
2532
- content: string;
2533
- created_at: string;
2534
- created_by: string | null;
2535
- id: string;
2536
- metadata: Json | null;
2537
- milestone_id: string | null;
2538
- occurred_at: string;
2539
- organization_id: string;
2540
- project_id: string;
2541
- summary: string | null;
2542
- task_id: string | null;
2543
- type: string;
2544
- };
2545
- Insert: {
2546
- content: string;
2547
- created_at?: string;
2548
- created_by?: string | null;
2549
- id?: string;
2550
- metadata?: Json | null;
2551
- milestone_id?: string | null;
2552
- occurred_at?: string;
2553
- organization_id: string;
2554
- project_id: string;
2555
- summary?: string | null;
2556
- task_id?: string | null;
2557
- type?: string;
2558
- };
2559
- Update: {
2560
- content?: string;
2561
- created_at?: string;
2562
- created_by?: string | null;
2563
- id?: string;
2564
- metadata?: Json | null;
2565
- milestone_id?: string | null;
2566
- occurred_at?: string;
2567
- organization_id?: string;
2568
- project_id?: string;
2569
- summary?: string | null;
2570
- task_id?: string | null;
2571
- type?: string;
2572
- };
2573
- Relationships: [
2574
- {
2575
- foreignKeyName: 'prj_notes_created_by_fkey';
2576
- columns: ['created_by'];
2577
- isOneToOne: false;
2578
- referencedRelation: 'users';
2579
- referencedColumns: ['id'];
2580
- },
2581
- {
2582
- foreignKeyName: 'prj_notes_project_id_fkey';
2583
- columns: ['project_id'];
2584
- isOneToOne: false;
2585
- referencedRelation: 'prj_projects';
2586
- referencedColumns: ['id'];
2587
- },
2588
- {
2589
- foreignKeyName: 'prj_notes_organization_id_fkey';
2590
- columns: ['organization_id'];
2591
- isOneToOne: false;
2592
- referencedRelation: 'organizations';
2593
- referencedColumns: ['id'];
2594
- }
2595
- ];
2596
- };
2597
- deployments: {
2598
- Row: {
2599
- compiled_docs: Json | null;
2600
- created_at: string;
2601
- deployment_version: string | null;
2602
- documentation: Json | null;
2603
- error_message: string | null;
2604
- id: string;
2605
- organization_id: string;
2606
- pid: number | null;
2607
- port: number | null;
2608
- sdk_version: string;
2609
- status: string;
2610
- tarball_path: string | null;
2611
- updated_at: string;
2612
- };
2613
- Insert: {
2614
- compiled_docs?: Json | null;
2615
- created_at?: string;
2616
- deployment_version?: string | null;
2617
- documentation?: Json | null;
2618
- error_message?: string | null;
2619
- id?: string;
2620
- organization_id: string;
2621
- pid?: number | null;
2622
- port?: number | null;
2623
- sdk_version: string;
2624
- status?: string;
2625
- tarball_path?: string | null;
2626
- updated_at?: string;
2627
- };
2628
- Update: {
2629
- compiled_docs?: Json | null;
2630
- created_at?: string;
2631
- deployment_version?: string | null;
2632
- documentation?: Json | null;
2633
- error_message?: string | null;
2634
- id?: string;
2635
- organization_id?: string;
2636
- pid?: number | null;
2637
- port?: number | null;
2638
- sdk_version?: string;
2639
- status?: string;
2640
- tarball_path?: string | null;
2641
- updated_at?: string;
2642
- };
2643
- Relationships: [
2644
- {
2645
- foreignKeyName: 'deployments_organization_id_fkey';
2646
- columns: ['organization_id'];
2647
- isOneToOne: false;
2648
- referencedRelation: 'organizations';
2649
- referencedColumns: ['id'];
2650
- }
2651
- ];
2652
- };
2653
- execution_errors: {
2654
- Row: {
2655
- created_at: string | null;
2656
- error_category: string;
2657
- error_message: string;
2658
- error_severity: string;
2659
- error_stack_trace: string | null;
2660
- error_type: string;
2661
- execution_id: string;
2662
- id: string;
2663
- metadata: Json | null;
2664
- occurred_at: string;
2665
- organization_id: string;
2666
- resolved: boolean;
2667
- resolved_at: string | null;
2668
- resolved_by: string | null;
2669
- };
2670
- Insert: {
2671
- created_at?: string | null;
2672
- error_category: string;
2673
- error_message: string;
2674
- error_severity: string;
2675
- error_stack_trace?: string | null;
2676
- error_type: string;
2677
- execution_id: string;
2678
- id?: string;
2679
- metadata?: Json | null;
2680
- occurred_at?: string;
2681
- organization_id: string;
2682
- resolved?: boolean;
2683
- resolved_at?: string | null;
2684
- resolved_by?: string | null;
2618
+ resolved?: boolean;
2619
+ resolved_at?: string | null;
2620
+ resolved_by?: string | null;
2685
2621
  };
2686
2622
  Update: {
2687
2623
  created_at?: string | null;
@@ -2701,25 +2637,25 @@ type Database = {
2701
2637
  };
2702
2638
  Relationships: [
2703
2639
  {
2704
- foreignKeyName: 'execution_errors_execution_id_fkey';
2705
- columns: ['execution_id'];
2640
+ foreignKeyName: "execution_errors_execution_id_fkey";
2641
+ columns: ["execution_id"];
2706
2642
  isOneToOne: false;
2707
- referencedRelation: 'execution_logs';
2708
- referencedColumns: ['execution_id'];
2643
+ referencedRelation: "execution_logs";
2644
+ referencedColumns: ["execution_id"];
2709
2645
  },
2710
2646
  {
2711
- foreignKeyName: 'execution_errors_organization_id_fkey';
2712
- columns: ['organization_id'];
2647
+ foreignKeyName: "execution_errors_organization_id_fkey";
2648
+ columns: ["organization_id"];
2713
2649
  isOneToOne: false;
2714
- referencedRelation: 'organizations';
2715
- referencedColumns: ['id'];
2650
+ referencedRelation: "organizations";
2651
+ referencedColumns: ["id"];
2716
2652
  },
2717
2653
  {
2718
- foreignKeyName: 'execution_errors_resolved_by_fkey';
2719
- columns: ['resolved_by'];
2654
+ foreignKeyName: "execution_errors_resolved_by_fkey";
2655
+ columns: ["resolved_by"];
2720
2656
  isOneToOne: false;
2721
- referencedRelation: 'users';
2722
- referencedColumns: ['id'];
2657
+ referencedRelation: "users";
2658
+ referencedColumns: ["id"];
2723
2659
  }
2724
2660
  ];
2725
2661
  };
@@ -2801,32 +2737,32 @@ type Database = {
2801
2737
  };
2802
2738
  Relationships: [
2803
2739
  {
2804
- foreignKeyName: 'execution_history_organization_id_fkey';
2805
- columns: ['organization_id'];
2740
+ foreignKeyName: "execution_history_organization_id_fkey";
2741
+ columns: ["organization_id"];
2806
2742
  isOneToOne: false;
2807
- referencedRelation: 'organizations';
2808
- referencedColumns: ['id'];
2743
+ referencedRelation: "organizations";
2744
+ referencedColumns: ["id"];
2809
2745
  },
2810
2746
  {
2811
- foreignKeyName: 'execution_logs_origin_execution_id_fkey';
2812
- columns: ['origin_execution_id'];
2747
+ foreignKeyName: "execution_logs_origin_execution_id_fkey";
2748
+ columns: ["origin_execution_id"];
2813
2749
  isOneToOne: false;
2814
- referencedRelation: 'execution_logs';
2815
- referencedColumns: ['execution_id'];
2750
+ referencedRelation: "execution_logs";
2751
+ referencedColumns: ["execution_id"];
2816
2752
  },
2817
2753
  {
2818
- foreignKeyName: 'execution_logs_session_id_fkey';
2819
- columns: ['session_id'];
2754
+ foreignKeyName: "execution_logs_session_id_fkey";
2755
+ columns: ["session_id"];
2820
2756
  isOneToOne: false;
2821
- referencedRelation: 'sessions';
2822
- referencedColumns: ['session_id'];
2757
+ referencedRelation: "sessions";
2758
+ referencedColumns: ["session_id"];
2823
2759
  },
2824
2760
  {
2825
- foreignKeyName: 'execution_logs_user_id_fkey';
2826
- columns: ['user_id'];
2761
+ foreignKeyName: "execution_logs_user_id_fkey";
2762
+ columns: ["user_id"];
2827
2763
  isOneToOne: false;
2828
- referencedRelation: 'users';
2829
- referencedColumns: ['id'];
2764
+ referencedRelation: "users";
2765
+ referencedColumns: ["id"];
2830
2766
  }
2831
2767
  ];
2832
2768
  };
@@ -2872,18 +2808,18 @@ type Database = {
2872
2808
  };
2873
2809
  Relationships: [
2874
2810
  {
2875
- foreignKeyName: 'execution_metrics_execution_id_fkey';
2876
- columns: ['execution_id'];
2811
+ foreignKeyName: "execution_metrics_execution_id_fkey";
2812
+ columns: ["execution_id"];
2877
2813
  isOneToOne: true;
2878
- referencedRelation: 'execution_logs';
2879
- referencedColumns: ['execution_id'];
2814
+ referencedRelation: "execution_logs";
2815
+ referencedColumns: ["execution_id"];
2880
2816
  },
2881
2817
  {
2882
- foreignKeyName: 'execution_metrics_organization_id_fkey';
2883
- columns: ['organization_id'];
2818
+ foreignKeyName: "execution_metrics_organization_id_fkey";
2819
+ columns: ["organization_id"];
2884
2820
  isOneToOne: false;
2885
- referencedRelation: 'organizations';
2886
- referencedColumns: ['id'];
2821
+ referencedRelation: "organizations";
2822
+ referencedColumns: ["id"];
2887
2823
  }
2888
2824
  ];
2889
2825
  };
@@ -2926,18 +2862,18 @@ type Database = {
2926
2862
  };
2927
2863
  Relationships: [
2928
2864
  {
2929
- foreignKeyName: 'notifications_organization_id_fkey';
2930
- columns: ['organization_id'];
2865
+ foreignKeyName: "notifications_organization_id_fkey";
2866
+ columns: ["organization_id"];
2931
2867
  isOneToOne: false;
2932
- referencedRelation: 'organizations';
2933
- referencedColumns: ['id'];
2868
+ referencedRelation: "organizations";
2869
+ referencedColumns: ["id"];
2934
2870
  },
2935
2871
  {
2936
- foreignKeyName: 'notifications_user_id_fkey';
2937
- columns: ['user_id'];
2872
+ foreignKeyName: "notifications_user_id_fkey";
2873
+ columns: ["user_id"];
2938
2874
  isOneToOne: false;
2939
- referencedRelation: 'users';
2940
- referencedColumns: ['id'];
2875
+ referencedRelation: "users";
2876
+ referencedColumns: ["id"];
2941
2877
  }
2942
2878
  ];
2943
2879
  };
@@ -2992,107 +2928,416 @@ type Database = {
2992
2928
  };
2993
2929
  Relationships: [
2994
2930
  {
2995
- foreignKeyName: 'org_invitations_inviter_user_id_fkey';
2996
- columns: ['inviter_user_id'];
2931
+ foreignKeyName: "org_invitations_inviter_user_id_fkey";
2932
+ columns: ["inviter_user_id"];
2933
+ isOneToOne: false;
2934
+ referencedRelation: "users";
2935
+ referencedColumns: ["id"];
2936
+ },
2937
+ {
2938
+ foreignKeyName: "org_invitations_organization_id_fkey";
2939
+ columns: ["organization_id"];
2940
+ isOneToOne: false;
2941
+ referencedRelation: "organizations";
2942
+ referencedColumns: ["id"];
2943
+ }
2944
+ ];
2945
+ };
2946
+ org_memberships: {
2947
+ Row: {
2948
+ config: Json;
2949
+ created_at: string | null;
2950
+ id: string;
2951
+ membership_status: string | null;
2952
+ organization_id: string;
2953
+ role_slug: string | null;
2954
+ updated_at: string | null;
2955
+ user_id: string;
2956
+ workos_membership_id: string | null;
2957
+ };
2958
+ Insert: {
2959
+ config?: Json;
2960
+ created_at?: string | null;
2961
+ id?: string;
2962
+ membership_status?: string | null;
2963
+ organization_id: string;
2964
+ role_slug?: string | null;
2965
+ updated_at?: string | null;
2966
+ user_id: string;
2967
+ workos_membership_id?: string | null;
2968
+ };
2969
+ Update: {
2970
+ config?: Json;
2971
+ created_at?: string | null;
2972
+ id?: string;
2973
+ membership_status?: string | null;
2974
+ organization_id?: string;
2975
+ role_slug?: string | null;
2976
+ updated_at?: string | null;
2977
+ user_id?: string;
2978
+ workos_membership_id?: string | null;
2979
+ };
2980
+ Relationships: [
2981
+ {
2982
+ foreignKeyName: "org_memberships_organization_id_fkey";
2983
+ columns: ["organization_id"];
2984
+ isOneToOne: false;
2985
+ referencedRelation: "organizations";
2986
+ referencedColumns: ["id"];
2987
+ },
2988
+ {
2989
+ foreignKeyName: "org_memberships_user_id_fkey";
2990
+ columns: ["user_id"];
2991
+ isOneToOne: false;
2992
+ referencedRelation: "users";
2993
+ referencedColumns: ["id"];
2994
+ }
2995
+ ];
2996
+ };
2997
+ organizations: {
2998
+ Row: {
2999
+ config: Json;
3000
+ created_at: string;
3001
+ id: string;
3002
+ is_test: boolean;
3003
+ metadata: Json;
3004
+ name: string;
3005
+ status: string;
3006
+ updated_at: string;
3007
+ workos_org_id: string;
3008
+ };
3009
+ Insert: {
3010
+ config?: Json;
3011
+ created_at?: string;
3012
+ id?: string;
3013
+ is_test?: boolean;
3014
+ metadata?: Json;
3015
+ name: string;
3016
+ status?: string;
3017
+ updated_at?: string;
3018
+ workos_org_id: string;
3019
+ };
3020
+ Update: {
3021
+ config?: Json;
3022
+ created_at?: string;
3023
+ id?: string;
3024
+ is_test?: boolean;
3025
+ metadata?: Json;
3026
+ name?: string;
3027
+ status?: string;
3028
+ updated_at?: string;
3029
+ workos_org_id?: string;
3030
+ };
3031
+ Relationships: [];
3032
+ };
3033
+ prj_milestones: {
3034
+ Row: {
3035
+ checklist: Json | null;
3036
+ completed_at: string | null;
3037
+ created_at: string;
3038
+ description: string | null;
3039
+ due_date: string | null;
3040
+ id: string;
3041
+ metadata: Json | null;
3042
+ name: string;
3043
+ organization_id: string;
3044
+ project_id: string;
3045
+ sequence: number;
3046
+ status: string;
3047
+ updated_at: string;
3048
+ };
3049
+ Insert: {
3050
+ checklist?: Json | null;
3051
+ completed_at?: string | null;
3052
+ created_at?: string;
3053
+ description?: string | null;
3054
+ due_date?: string | null;
3055
+ id?: string;
3056
+ metadata?: Json | null;
3057
+ name: string;
3058
+ organization_id: string;
3059
+ project_id: string;
3060
+ sequence?: number;
3061
+ status?: string;
3062
+ updated_at?: string;
3063
+ };
3064
+ Update: {
3065
+ checklist?: Json | null;
3066
+ completed_at?: string | null;
3067
+ created_at?: string;
3068
+ description?: string | null;
3069
+ due_date?: string | null;
3070
+ id?: string;
3071
+ metadata?: Json | null;
3072
+ name?: string;
3073
+ organization_id?: string;
3074
+ project_id?: string;
3075
+ sequence?: number;
3076
+ status?: string;
3077
+ updated_at?: string;
3078
+ };
3079
+ Relationships: [
3080
+ {
3081
+ foreignKeyName: "prj_milestones_organization_id_fkey";
3082
+ columns: ["organization_id"];
3083
+ isOneToOne: false;
3084
+ referencedRelation: "organizations";
3085
+ referencedColumns: ["id"];
3086
+ },
3087
+ {
3088
+ foreignKeyName: "prj_milestones_project_id_fkey";
3089
+ columns: ["project_id"];
3090
+ isOneToOne: false;
3091
+ referencedRelation: "prj_projects";
3092
+ referencedColumns: ["id"];
3093
+ }
3094
+ ];
3095
+ };
3096
+ prj_notes: {
3097
+ Row: {
3098
+ content: string;
3099
+ created_at: string;
3100
+ created_by: string | null;
3101
+ id: string;
3102
+ metadata: Json | null;
3103
+ milestone_id: string | null;
3104
+ occurred_at: string;
3105
+ organization_id: string;
3106
+ project_id: string;
3107
+ summary: string | null;
3108
+ task_id: string | null;
3109
+ type: string;
3110
+ };
3111
+ Insert: {
3112
+ content: string;
3113
+ created_at?: string;
3114
+ created_by?: string | null;
3115
+ id?: string;
3116
+ metadata?: Json | null;
3117
+ milestone_id?: string | null;
3118
+ occurred_at?: string;
3119
+ organization_id: string;
3120
+ project_id: string;
3121
+ summary?: string | null;
3122
+ task_id?: string | null;
3123
+ type?: string;
3124
+ };
3125
+ Update: {
3126
+ content?: string;
3127
+ created_at?: string;
3128
+ created_by?: string | null;
3129
+ id?: string;
3130
+ metadata?: Json | null;
3131
+ milestone_id?: string | null;
3132
+ occurred_at?: string;
3133
+ organization_id?: string;
3134
+ project_id?: string;
3135
+ summary?: string | null;
3136
+ task_id?: string | null;
3137
+ type?: string;
3138
+ };
3139
+ Relationships: [
3140
+ {
3141
+ foreignKeyName: "prj_notes_created_by_fkey";
3142
+ columns: ["created_by"];
3143
+ isOneToOne: false;
3144
+ referencedRelation: "users";
3145
+ referencedColumns: ["id"];
3146
+ },
3147
+ {
3148
+ foreignKeyName: "prj_notes_milestone_id_fkey";
3149
+ columns: ["milestone_id"];
3150
+ isOneToOne: false;
3151
+ referencedRelation: "prj_milestones";
3152
+ referencedColumns: ["id"];
3153
+ },
3154
+ {
3155
+ foreignKeyName: "prj_notes_organization_id_fkey";
3156
+ columns: ["organization_id"];
2997
3157
  isOneToOne: false;
2998
- referencedRelation: 'users';
2999
- referencedColumns: ['id'];
3158
+ referencedRelation: "organizations";
3159
+ referencedColumns: ["id"];
3000
3160
  },
3001
3161
  {
3002
- foreignKeyName: 'org_invitations_organization_id_fkey';
3003
- columns: ['organization_id'];
3162
+ foreignKeyName: "prj_notes_project_id_fkey";
3163
+ columns: ["project_id"];
3004
3164
  isOneToOne: false;
3005
- referencedRelation: 'organizations';
3006
- referencedColumns: ['id'];
3165
+ referencedRelation: "prj_projects";
3166
+ referencedColumns: ["id"];
3167
+ },
3168
+ {
3169
+ foreignKeyName: "prj_notes_task_id_fkey";
3170
+ columns: ["task_id"];
3171
+ isOneToOne: false;
3172
+ referencedRelation: "prj_tasks";
3173
+ referencedColumns: ["id"];
3007
3174
  }
3008
3175
  ];
3009
3176
  };
3010
- org_memberships: {
3177
+ prj_projects: {
3011
3178
  Row: {
3012
- config: Json;
3013
- created_at: string | null;
3179
+ actual_end_date: string | null;
3180
+ client_company_id: string | null;
3181
+ contract_value: number | null;
3182
+ created_at: string;
3183
+ deal_id: string | null;
3184
+ description: string | null;
3014
3185
  id: string;
3015
- membership_status: string | null;
3186
+ kind: string;
3187
+ metadata: Json | null;
3188
+ name: string;
3016
3189
  organization_id: string;
3017
- role_slug: string | null;
3018
- updated_at: string | null;
3019
- user_id: string;
3020
- workos_membership_id: string | null;
3190
+ start_date: string | null;
3191
+ status: string;
3192
+ target_end_date: string | null;
3193
+ updated_at: string;
3021
3194
  };
3022
3195
  Insert: {
3023
- config?: Json;
3024
- created_at?: string | null;
3196
+ actual_end_date?: string | null;
3197
+ client_company_id?: string | null;
3198
+ contract_value?: number | null;
3199
+ created_at?: string;
3200
+ deal_id?: string | null;
3201
+ description?: string | null;
3025
3202
  id?: string;
3026
- membership_status?: string | null;
3203
+ kind?: string;
3204
+ metadata?: Json | null;
3205
+ name: string;
3027
3206
  organization_id: string;
3028
- role_slug?: string | null;
3029
- updated_at?: string | null;
3030
- user_id: string;
3031
- workos_membership_id?: string | null;
3207
+ start_date?: string | null;
3208
+ status?: string;
3209
+ target_end_date?: string | null;
3210
+ updated_at?: string;
3032
3211
  };
3033
3212
  Update: {
3034
- config?: Json;
3035
- created_at?: string | null;
3213
+ actual_end_date?: string | null;
3214
+ client_company_id?: string | null;
3215
+ contract_value?: number | null;
3216
+ created_at?: string;
3217
+ deal_id?: string | null;
3218
+ description?: string | null;
3036
3219
  id?: string;
3037
- membership_status?: string | null;
3220
+ kind?: string;
3221
+ metadata?: Json | null;
3222
+ name?: string;
3038
3223
  organization_id?: string;
3039
- role_slug?: string | null;
3040
- updated_at?: string | null;
3041
- user_id?: string;
3042
- workos_membership_id?: string | null;
3224
+ start_date?: string | null;
3225
+ status?: string;
3226
+ target_end_date?: string | null;
3227
+ updated_at?: string;
3043
3228
  };
3044
3229
  Relationships: [
3045
3230
  {
3046
- foreignKeyName: 'org_memberships_organization_id_fkey';
3047
- columns: ['organization_id'];
3231
+ foreignKeyName: "prj_projects_client_company_id_fkey";
3232
+ columns: ["client_company_id"];
3233
+ isOneToOne: false;
3234
+ referencedRelation: "acq_companies";
3235
+ referencedColumns: ["id"];
3236
+ },
3237
+ {
3238
+ foreignKeyName: "prj_projects_deal_id_fkey";
3239
+ columns: ["deal_id"];
3048
3240
  isOneToOne: false;
3049
- referencedRelation: 'organizations';
3050
- referencedColumns: ['id'];
3241
+ referencedRelation: "acq_deals";
3242
+ referencedColumns: ["id"];
3051
3243
  },
3052
3244
  {
3053
- foreignKeyName: 'org_memberships_user_id_fkey';
3054
- columns: ['user_id'];
3245
+ foreignKeyName: "prj_projects_organization_id_fkey";
3246
+ columns: ["organization_id"];
3055
3247
  isOneToOne: false;
3056
- referencedRelation: 'users';
3057
- referencedColumns: ['id'];
3248
+ referencedRelation: "organizations";
3249
+ referencedColumns: ["id"];
3058
3250
  }
3059
3251
  ];
3060
3252
  };
3061
- organizations: {
3253
+ prj_tasks: {
3062
3254
  Row: {
3063
- config: Json;
3255
+ checklist: Json;
3256
+ completed_at: string | null;
3064
3257
  created_at: string;
3258
+ description: string | null;
3259
+ due_date: string | null;
3260
+ file_url: string | null;
3065
3261
  id: string;
3066
- is_test: boolean;
3067
- metadata: Json;
3262
+ metadata: Json | null;
3263
+ milestone_id: string | null;
3068
3264
  name: string;
3265
+ organization_id: string;
3266
+ parent_task_id: string | null;
3267
+ project_id: string;
3268
+ resume_context: Json | null;
3069
3269
  status: string;
3270
+ type: string;
3070
3271
  updated_at: string;
3071
- workos_org_id: string;
3072
3272
  };
3073
3273
  Insert: {
3074
- config?: Json;
3274
+ checklist?: Json;
3275
+ completed_at?: string | null;
3075
3276
  created_at?: string;
3277
+ description?: string | null;
3278
+ due_date?: string | null;
3279
+ file_url?: string | null;
3076
3280
  id?: string;
3077
- is_test?: boolean;
3078
- metadata?: Json;
3281
+ metadata?: Json | null;
3282
+ milestone_id?: string | null;
3079
3283
  name: string;
3284
+ organization_id: string;
3285
+ parent_task_id?: string | null;
3286
+ project_id: string;
3287
+ resume_context?: Json | null;
3080
3288
  status?: string;
3289
+ type?: string;
3081
3290
  updated_at?: string;
3082
- workos_org_id: string;
3083
3291
  };
3084
3292
  Update: {
3085
- config?: Json;
3293
+ checklist?: Json;
3294
+ completed_at?: string | null;
3086
3295
  created_at?: string;
3296
+ description?: string | null;
3297
+ due_date?: string | null;
3298
+ file_url?: string | null;
3087
3299
  id?: string;
3088
- is_test?: boolean;
3089
- metadata?: Json;
3300
+ metadata?: Json | null;
3301
+ milestone_id?: string | null;
3090
3302
  name?: string;
3303
+ organization_id?: string;
3304
+ parent_task_id?: string | null;
3305
+ project_id?: string;
3306
+ resume_context?: Json | null;
3091
3307
  status?: string;
3308
+ type?: string;
3092
3309
  updated_at?: string;
3093
- workos_org_id?: string;
3094
3310
  };
3095
- Relationships: [];
3311
+ Relationships: [
3312
+ {
3313
+ foreignKeyName: "prj_tasks_milestone_id_fkey";
3314
+ columns: ["milestone_id"];
3315
+ isOneToOne: false;
3316
+ referencedRelation: "prj_milestones";
3317
+ referencedColumns: ["id"];
3318
+ },
3319
+ {
3320
+ foreignKeyName: "prj_tasks_organization_id_fkey";
3321
+ columns: ["organization_id"];
3322
+ isOneToOne: false;
3323
+ referencedRelation: "organizations";
3324
+ referencedColumns: ["id"];
3325
+ },
3326
+ {
3327
+ foreignKeyName: "prj_tasks_parent_task_id_fkey";
3328
+ columns: ["parent_task_id"];
3329
+ isOneToOne: false;
3330
+ referencedRelation: "prj_tasks";
3331
+ referencedColumns: ["id"];
3332
+ },
3333
+ {
3334
+ foreignKeyName: "prj_tasks_project_id_fkey";
3335
+ columns: ["project_id"];
3336
+ isOneToOne: false;
3337
+ referencedRelation: "prj_projects";
3338
+ referencedColumns: ["id"];
3339
+ }
3340
+ ];
3096
3341
  };
3097
3342
  session_messages: {
3098
3343
  Row: {
@@ -3130,11 +3375,11 @@ type Database = {
3130
3375
  };
3131
3376
  Relationships: [
3132
3377
  {
3133
- foreignKeyName: 'session_messages_session_id_fkey';
3134
- columns: ['session_id'];
3378
+ foreignKeyName: "session_messages_session_id_fkey";
3379
+ columns: ["session_id"];
3135
3380
  isOneToOne: false;
3136
- referencedRelation: 'sessions';
3137
- referencedColumns: ['session_id'];
3381
+ referencedRelation: "sessions";
3382
+ referencedColumns: ["session_id"];
3138
3383
  }
3139
3384
  ];
3140
3385
  };
@@ -3189,18 +3434,18 @@ type Database = {
3189
3434
  };
3190
3435
  Relationships: [
3191
3436
  {
3192
- foreignKeyName: 'fk_organization';
3193
- columns: ['organization_id'];
3437
+ foreignKeyName: "fk_organization";
3438
+ columns: ["organization_id"];
3194
3439
  isOneToOne: false;
3195
- referencedRelation: 'organizations';
3196
- referencedColumns: ['id'];
3440
+ referencedRelation: "organizations";
3441
+ referencedColumns: ["id"];
3197
3442
  },
3198
3443
  {
3199
- foreignKeyName: 'fk_user';
3200
- columns: ['user_id'];
3444
+ foreignKeyName: "fk_user";
3445
+ columns: ["user_id"];
3201
3446
  isOneToOne: false;
3202
- referencedRelation: 'users';
3203
- referencedColumns: ['id'];
3447
+ referencedRelation: "users";
3448
+ referencedColumns: ["id"];
3204
3449
  }
3205
3450
  ];
3206
3451
  };
@@ -3276,11 +3521,11 @@ type Database = {
3276
3521
  };
3277
3522
  Relationships: [
3278
3523
  {
3279
- foreignKeyName: 'task_schedules_organization_id_fkey';
3280
- columns: ['organization_id'];
3524
+ foreignKeyName: "task_schedules_organization_id_fkey";
3525
+ columns: ["organization_id"];
3281
3526
  isOneToOne: false;
3282
- referencedRelation: 'organizations';
3283
- referencedColumns: ['id'];
3527
+ referencedRelation: "organizations";
3528
+ referencedColumns: ["id"];
3284
3529
  }
3285
3530
  ];
3286
3531
  };
@@ -3335,11 +3580,11 @@ type Database = {
3335
3580
  };
3336
3581
  Relationships: [
3337
3582
  {
3338
- foreignKeyName: 'user_profiles_last_visited_org_fkey';
3339
- columns: ['last_visited_org'];
3583
+ foreignKeyName: "user_profiles_last_visited_org_fkey";
3584
+ columns: ["last_visited_org"];
3340
3585
  isOneToOne: false;
3341
- referencedRelation: 'organizations';
3342
- referencedColumns: ['id'];
3586
+ referencedRelation: "organizations";
3587
+ referencedColumns: ["id"];
3343
3588
  }
3344
3589
  ];
3345
3590
  };
@@ -3385,11 +3630,11 @@ type Database = {
3385
3630
  };
3386
3631
  Relationships: [
3387
3632
  {
3388
- foreignKeyName: 'webhook_endpoints_organization_id_fkey';
3389
- columns: ['organization_id'];
3633
+ foreignKeyName: "webhook_endpoints_organization_id_fkey";
3634
+ columns: ["organization_id"];
3390
3635
  isOneToOne: false;
3391
- referencedRelation: 'organizations';
3392
- referencedColumns: ['id'];
3636
+ referencedRelation: "organizations";
3637
+ referencedColumns: ["id"];
3393
3638
  }
3394
3639
  ];
3395
3640
  };
@@ -4047,6 +4292,7 @@ interface AcqList {
4047
4292
  launchedAt: Date | null;
4048
4293
  completedAt: Date | null;
4049
4294
  createdAt: Date;
4295
+ config: ListConfig;
4050
4296
  }
4051
4297
  /**
4052
4298
  * Company record in the acquisition database.
@@ -4105,6 +4351,92 @@ interface AcqContact {
4105
4351
  createdAt: Date;
4106
4352
  updatedAt: Date;
4107
4353
  }
4354
+ /** Task kind options for a deal task (human follow-up action type) */
4355
+ type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other';
4356
+ /**
4357
+ * A CRM to-do item attached to a deal representing a human follow-up action.
4358
+ * Transformed from AcqDealTaskRow with camelCase properties.
4359
+ */
4360
+ interface AcqDealTask {
4361
+ id: string;
4362
+ organizationId: string;
4363
+ dealId: string;
4364
+ title: string;
4365
+ description: string | null;
4366
+ kind: AcqDealTaskKind;
4367
+ dueAt: string | null;
4368
+ assigneeUserId: string | null;
4369
+ completedAt: string | null;
4370
+ completedByUserId: string | null;
4371
+ createdAt: string;
4372
+ updatedAt: string;
4373
+ createdByUserId: string | null;
4374
+ }
4375
+ /**
4376
+ * One ordered step in a list's pipeline. Maps to a deployed workflow
4377
+ * (e.g. 'lgn-03-company-qualification-workflow'). The `inputTemplate`
4378
+ * is merged with `{ listId }` at run time to form the workflow input.
4379
+ */
4380
+ interface PipelineStep {
4381
+ /** Stable key, e.g. 'scrape' | 'extract' | 'qualify' | 'discover' | 'verify' | 'personalize'. */
4382
+ key: string;
4383
+ /** Human label rendered in the UI stepper. */
4384
+ label: string;
4385
+ /** Deployed workflow resourceId (e.g. 'lgn-03-company-qualification-workflow'). */
4386
+ resourceId: string;
4387
+ /** Input defaults merged with `{ listId }` at dispatch. */
4388
+ inputTemplate: Record<string, unknown>;
4389
+ /** Whether the UI shows the Run button. */
4390
+ enabled: boolean;
4391
+ /** Display order (ascending). */
4392
+ order: number;
4393
+ }
4394
+ type CompanyListStage = 'populated' | 'extracted' | 'qualified';
4395
+ type ContactListStage = 'discovered' | 'verified' | 'personalized' | 'uploaded';
4396
+ /**
4397
+ * Per-list pipeline configuration stored as jsonb in `acq_lists.config`.
4398
+ *
4399
+ * `qualification` is the only required subtree. Every other subtree is optional
4400
+ * and inherits global defaults when omitted: workflows resolve values as
4401
+ * `list.config.foo ?? globalDefaults.foo`. Seeded rows from
4402
+ * `20260413000100_backfill_list_configs.sql` only populate `qualification`
4403
+ * and `scraping`; the rest was intentionally omitted.
4404
+ */
4405
+ interface ListConfig {
4406
+ qualification: {
4407
+ /** One-line description of the target vertical/segment. */
4408
+ targetDescription: string;
4409
+ /** Minimum Google review count to qualify. */
4410
+ minReviewCount: number;
4411
+ /** Minimum Google star rating to qualify (e.g. 3.0). */
4412
+ minRating: number;
4413
+ /** Whether to exclude franchises/chains during qualification. */
4414
+ excludeFranchises: boolean;
4415
+ /** Free-form LLM rules layered on top of the structured criteria. */
4416
+ customRules: string;
4417
+ };
4418
+ enrichment?: {
4419
+ emailDiscovery?: {
4420
+ primary: 'tomba' | 'anymailfinder';
4421
+ credentialName?: string;
4422
+ };
4423
+ emailVerification?: {
4424
+ provider: 'millionverifier';
4425
+ threshold?: 'ok' | 'ok+catch_all';
4426
+ };
4427
+ };
4428
+ personalization?: {
4429
+ industryContext?: string;
4430
+ /** Email body template with tags like {{opening_line}} / {{category_pain}}. */
4431
+ emailBody?: string;
4432
+ creativeDirection?: string;
4433
+ /** Contradiction-prevention rules layered into the personalization prompt. */
4434
+ exclusionRules?: string[];
4435
+ };
4436
+ pipeline?: {
4437
+ steps: PipelineStep[];
4438
+ };
4439
+ }
4108
4440
 
4109
4441
  /**
4110
4442
  * Lead Service Types
@@ -4128,10 +4460,12 @@ interface CreateListParams {
4128
4460
  instantlyCampaignId?: string;
4129
4461
  status?: string;
4130
4462
  metadata?: Record<string, unknown>;
4463
+ config?: ListConfig;
4131
4464
  }
4132
4465
  interface UpdateListParams {
4133
4466
  name?: string;
4134
4467
  description?: string;
4468
+ status?: string;
4135
4469
  }
4136
4470
  interface CreateCompanyParams {
4137
4471
  organizationId: string;
@@ -4162,14 +4496,14 @@ interface UpdateCompanyParams {
4162
4496
  pipelineStatus?: Record<string, unknown>;
4163
4497
  enrichmentData?: Record<string, unknown>;
4164
4498
  source?: string;
4165
- /** Attio Company record ID - set when company is added to CRM. Pass null to clear. */
4166
- attioCompanyId?: string | null;
4167
4499
  batchId?: string;
4168
4500
  status?: 'active' | 'invalid';
4169
4501
  verticalResearch?: string | null;
4170
4502
  }
4171
4503
  type UpsertCompanyParams = CreateCompanyParams;
4172
4504
  interface CompanyFilters {
4505
+ listId?: string;
4506
+ search?: string;
4173
4507
  domain?: string;
4174
4508
  website?: string;
4175
4509
  segment?: string;
@@ -4206,13 +4540,12 @@ interface UpdateContactParams {
4206
4540
  openingLine?: string;
4207
4541
  pipelineStatus?: Record<string, unknown>;
4208
4542
  enrichmentData?: Record<string, unknown>;
4209
- /** Attio Person record ID - set when contact responds and is added to CRM. Pass null to clear. */
4210
- attioPersonId?: string | null;
4211
4543
  status?: 'active' | 'invalid';
4212
4544
  }
4213
4545
  type UpsertContactParams = CreateContactParams;
4214
4546
  interface ContactFilters {
4215
4547
  listId?: string;
4548
+ search?: string;
4216
4549
  openingLineIsNull?: boolean;
4217
4550
  pipelineStatus?: Record<string, unknown>;
4218
4551
  batchId?: string;
@@ -4220,9 +4553,7 @@ interface ContactFilters {
4220
4553
  }
4221
4554
  interface UpsertDealParams {
4222
4555
  organizationId: string;
4223
- /** Attio Deal record ID (required link to CRM) */
4224
- attioDealId: string;
4225
- /** Contact email for lookup when Attio Deal ID is unknown */
4556
+ /** Contact email dedupe key together with organization_id */
4226
4557
  contactEmail: string;
4227
4558
  /** Optional contact ID for foreign key join */
4228
4559
  contactId?: string;
@@ -4260,19 +4591,19 @@ interface MarkProposalReviewedParams {
4260
4591
  }
4261
4592
  interface UpdateCloseLostReasonParams {
4262
4593
  organizationId: string;
4263
- attioDealId: string;
4594
+ dealId: string;
4264
4595
  reason: string;
4265
4596
  }
4266
4597
  interface UpdateFeesParams {
4267
4598
  organizationId: string;
4268
4599
  contactEmail?: string;
4269
- attioDealId?: string;
4600
+ dealId?: string;
4270
4601
  initialFee?: number;
4271
4602
  monthlyFee?: number;
4272
4603
  }
4273
4604
  interface SyncDealStageParams {
4274
4605
  organizationId: string;
4275
- attioDealId: string;
4606
+ dealId: string;
4276
4607
  stage: string;
4277
4608
  }
4278
4609
  interface SetContactNurtureParams {
@@ -4286,18 +4617,30 @@ interface CancelSchedulesAndHitlByEmailParams {
4286
4617
  }
4287
4618
  interface CancelHitlByDealIdParams {
4288
4619
  organizationId: string;
4289
- attioDealId: string;
4620
+ dealId: string;
4290
4621
  }
4291
4622
  interface ClearDealFieldsParams {
4292
4623
  organizationId: string;
4293
4624
  contactEmail?: string;
4294
- attioDealId?: string;
4625
+ dealId?: string;
4295
4626
  fields: ('proposalPdfUrl' | 'proposalStatus' | 'proposalGeneratedAt' | 'initialFee' | 'monthlyFee' | 'closedLostReason' | 'closedLostAt' | 'discoveryData' | 'discoverySubmittedAt')[];
4296
4627
  }
4297
4628
  interface DeleteDealParams {
4298
4629
  organizationId: string;
4299
4630
  dealId: string;
4300
4631
  }
4632
+ interface GetDealByIdParams {
4633
+ dealId: string;
4634
+ organizationId: string;
4635
+ }
4636
+ interface GetContactByIdParams {
4637
+ contactId: string;
4638
+ organizationId: string;
4639
+ }
4640
+ interface GetCompanyByIdParams {
4641
+ companyId: string;
4642
+ organizationId: string;
4643
+ }
4301
4644
  interface UpsertSocialPostParams {
4302
4645
  organizationId: string;
4303
4646
  platform: string;
@@ -4325,7 +4668,6 @@ interface UpsertSocialPostsResult {
4325
4668
  interface AcqDeal {
4326
4669
  id: string;
4327
4670
  organizationId: string;
4328
- attioDealId: string;
4329
4671
  contactEmail: string;
4330
4672
  cachedStage?: string | null;
4331
4673
  discoveryData?: Json | null;
@@ -4344,9 +4686,60 @@ interface DealActivityEntry {
4344
4686
  type: string;
4345
4687
  title: string;
4346
4688
  description?: string;
4347
- metadata?: Record<string, unknown>;
4689
+ payload?: Record<string, unknown>;
4348
4690
  occurredAt: string;
4349
- actor?: string;
4691
+ }
4692
+ interface AcqDealNote {
4693
+ id: string;
4694
+ dealId: string;
4695
+ organizationId: string;
4696
+ authorUserId: string | null;
4697
+ body: string;
4698
+ createdAt: string;
4699
+ updatedAt: string;
4700
+ }
4701
+ interface CreateDealNoteParams {
4702
+ organizationId: string;
4703
+ dealId: string;
4704
+ body: string;
4705
+ authorUserId?: string;
4706
+ }
4707
+ interface ListDealNotesParams {
4708
+ organizationId: string;
4709
+ dealId: string;
4710
+ }
4711
+ interface CreateDealTaskParams {
4712
+ organizationId: string;
4713
+ dealId: string;
4714
+ title: string;
4715
+ description?: string | null;
4716
+ kind?: AcqDealTaskKind;
4717
+ dueAt?: string | null;
4718
+ assigneeUserId?: string | null;
4719
+ createdByUserId?: string | null;
4720
+ }
4721
+ interface ListDealTasksParams {
4722
+ organizationId: string;
4723
+ dealId: string;
4724
+ }
4725
+ interface ListDealTasksDueParams {
4726
+ organizationId: string;
4727
+ assigneeUserId?: string | null;
4728
+ /** Window filter: 'overdue' = past due, 'today' = due today only, 'today_and_overdue' (default) = both, 'upcoming' = future */
4729
+ window?: 'overdue' | 'today' | 'today_and_overdue' | 'upcoming';
4730
+ }
4731
+ interface CompleteDealTaskParams {
4732
+ organizationId: string;
4733
+ taskId: string;
4734
+ completedByUserId: string | null;
4735
+ }
4736
+ interface RecordDealActivityParams {
4737
+ organizationId: string;
4738
+ dealId: string;
4739
+ type: string;
4740
+ title: string;
4741
+ description?: string;
4742
+ payload?: Record<string, unknown>;
4350
4743
  }
4351
4744
  interface DealStageSummary {
4352
4745
  stage: string;
@@ -4382,6 +4775,26 @@ interface AddContactsToListResult {
4382
4775
  added: number;
4383
4776
  alreadyExisted: number;
4384
4777
  }
4778
+ interface UpdateCompanyStageParams {
4779
+ organizationId: string;
4780
+ listId: string;
4781
+ companyId: string;
4782
+ stage: CompanyListStage;
4783
+ executionId?: string;
4784
+ }
4785
+ interface UpdateContactStageParams {
4786
+ organizationId: string;
4787
+ listId: string;
4788
+ contactId: string;
4789
+ stage: ContactListStage;
4790
+ executionId?: string;
4791
+ }
4792
+ interface RecordListExecutionParams {
4793
+ organizationId: string;
4794
+ listId: string;
4795
+ executionId: string;
4796
+ configSnapshot?: Record<string, unknown>;
4797
+ }
4385
4798
  interface BulkImportParams {
4386
4799
  organizationId: string;
4387
4800
  contacts: CreateContactParams[];
@@ -6030,7 +6443,6 @@ interface ListPaymentLinksResult {
6030
6443
  */
6031
6444
  interface CreateAutoPaymentLinkParams {
6032
6445
  dealId: string;
6033
- attioDealId: string;
6034
6446
  companyName: string;
6035
6447
  contactEmail: string;
6036
6448
  initialFee: number;
@@ -6628,17 +7040,23 @@ type LeadToolMap = {
6628
7040
  };
6629
7041
  updateDealEnvelopeId: {
6630
7042
  params: {
6631
- attioDealId: string;
7043
+ dealId: string;
6632
7044
  envelopeId: string;
6633
7045
  };
6634
7046
  result: AcqDeal | null;
6635
7047
  };
6636
- getDealByAttioId: {
6637
- params: {
6638
- attioDealId: string;
6639
- };
7048
+ getDealById: {
7049
+ params: Omit<GetDealByIdParams, 'organizationId'>;
6640
7050
  result: AcqDeal | null;
6641
7051
  };
7052
+ getContactById: {
7053
+ params: Omit<GetContactByIdParams, 'organizationId'>;
7054
+ result: AcqContact | null;
7055
+ };
7056
+ getCompanyById: {
7057
+ params: Omit<GetCompanyByIdParams, 'organizationId'>;
7058
+ result: AcqCompany | null;
7059
+ };
6642
7060
  updateDiscoveryData: {
6643
7061
  params: Omit<UpdateDiscoveryDataParams, 'organizationId'>;
6644
7062
  result: void;
@@ -6692,26 +7110,34 @@ type LeadToolMap = {
6692
7110
  params: Omit<DeleteDealParams, 'organizationId'>;
6693
7111
  result: void;
6694
7112
  };
6695
- recordReply: {
6696
- params: {
6697
- contactEmail: string;
6698
- replyText: string;
6699
- replySubject?: string;
6700
- campaignName?: string;
6701
- };
6702
- result: void;
6703
- };
6704
7113
  recordDealActivity: {
6705
- params: {
6706
- attioDealId?: string;
6707
- contactEmail?: string;
6708
- type: string;
6709
- title: string;
6710
- description?: string;
6711
- metadata?: Record<string, unknown>;
6712
- };
7114
+ params: Omit<RecordDealActivityParams, 'organizationId'>;
6713
7115
  result: void;
6714
7116
  };
7117
+ createDealNote: {
7118
+ params: Omit<CreateDealNoteParams, 'organizationId'>;
7119
+ result: AcqDealNote;
7120
+ };
7121
+ listDealNotes: {
7122
+ params: Omit<ListDealNotesParams, 'organizationId'>;
7123
+ result: AcqDealNote[];
7124
+ };
7125
+ createDealTask: {
7126
+ params: Omit<CreateDealTaskParams, 'organizationId'>;
7127
+ result: AcqDealTask;
7128
+ };
7129
+ listDealTasks: {
7130
+ params: Omit<ListDealTasksParams, 'organizationId'>;
7131
+ result: AcqDealTask[];
7132
+ };
7133
+ listDealTasksDue: {
7134
+ params: Omit<ListDealTasksDueParams, 'organizationId'>;
7135
+ result: AcqDealTask[];
7136
+ };
7137
+ completeDealTask: {
7138
+ params: Omit<CompleteDealTaskParams, 'organizationId'>;
7139
+ result: AcqDealTask;
7140
+ };
6715
7141
  listDeals: {
6716
7142
  params: DealFilters;
6717
7143
  result: AcqDeal[];
@@ -6737,6 +7163,26 @@ type LeadToolMap = {
6737
7163
  result: UpsertSocialPostsResult;
6738
7164
  };
6739
7165
  };
7166
+ type ListToolMap = {
7167
+ getConfig: {
7168
+ params: {
7169
+ listId: string;
7170
+ };
7171
+ result: ListConfig;
7172
+ };
7173
+ recordExecution: {
7174
+ params: Omit<RecordListExecutionParams, 'organizationId'>;
7175
+ result: void;
7176
+ };
7177
+ updateCompanyStage: {
7178
+ params: Omit<UpdateCompanyStageParams, 'organizationId'>;
7179
+ result: void;
7180
+ };
7181
+ updateContactStage: {
7182
+ params: Omit<UpdateContactStageParams, 'organizationId'>;
7183
+ result: void;
7184
+ };
7185
+ };
6740
7186
  type PdfToolMap = {
6741
7187
  render: {
6742
7188
  params: {
@@ -7529,6 +7975,14 @@ interface ElevasConfig {
7529
7975
  dev?: {
7530
7976
  port?: number;
7531
7977
  };
7978
+ /**
7979
+ * Directory (relative to CWD) to scan for deployable documentation.
7980
+ * Defaults to 'docs'. Use '../docs' when running the SDK from a subdirectory
7981
+ * and wanting to consolidate docs at the project root.
7982
+ *
7983
+ * Set to `false` to disable documentation scanning entirely.
7984
+ */
7985
+ docsDir?: string | false;
7532
7986
  }
7533
7987
 
7534
7988
  /**
@@ -7559,4 +8013,4 @@ declare class ToolingError extends ExecutionError {
7559
8013
  }
7560
8014
 
7561
8015
  export { ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError };
7562
- export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
8016
+ export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };