@elevasis/sdk 0.4.9 → 0.4.11

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
@@ -1,5 +1,58 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /**
4
+ * Common validation utilities
5
+ *
6
+ * Reusable Zod schema primitives for input validation across all domains.
7
+ * These validators are composed by domain-specific api-schemas.ts files.
8
+ *
9
+ * Design Principles:
10
+ * - KISS: Pure functions, no classes, no state
11
+ * - DRY: Common patterns extracted once, reused everywhere
12
+ * - Type Safety: Full TypeScript inference, no any types
13
+ * - Composability: Small validators easily combined using Zod methods
14
+ *
15
+ * Security Benefits:
16
+ * - SQL Injection Prevention: Strict format validation (UUID, Email)
17
+ * - DoS Protection: Max length constraints on strings/arrays, pagination limits
18
+ * - Mass Assignment Prevention: Use .strict() mode on all request schemas
19
+ * - XSS Prevention: Input sanitization and format validation
20
+ *
21
+ * @module validation
22
+ */
23
+
24
+ /**
25
+ * Standard pagination parameters
26
+ *
27
+ * Constraints:
28
+ * - limit: 1-100 items (default: 20)
29
+ * - offset: 0+ items (default: 0)
30
+ *
31
+ * Uses z.coerce to handle string query parameters from URLs
32
+ *
33
+ * Security: DoS protection (max 100 items), prevents type coercion exploits
34
+ *
35
+ * @example
36
+ * // Query string: ?limit=50&offset=100
37
+ * PaginationSchema.parse({ limit: '50', offset: '100' })
38
+ * // Result: { limit: 50, offset: 100 }
39
+ *
40
+ * @example
41
+ * // Extend with filters
42
+ * const FilteredListSchema = PaginationSchema.extend({
43
+ * status: z.enum(['active', 'inactive']),
44
+ * search: z.string().optional()
45
+ * })
46
+ */
47
+ declare const PaginationSchema: z.ZodObject<{
48
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
49
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
50
+ }, z.core.$strip>;
51
+ /**
52
+ * Export type helpers for domain schemas
53
+ */
54
+ type PaginationParams$1 = z.infer<typeof PaginationSchema>;
55
+
3
56
  /**
4
57
  * Workflow-specific logging types and utilities
5
58
  */
@@ -285,8 +338,6 @@ interface FormSchema {
285
338
  description?: string;
286
339
  /** Form fields */
287
340
  fields: FormField[];
288
- /** Layout (default: 'vertical') */
289
- layout?: 'vertical' | 'horizontal' | 'grid';
290
341
  }
291
342
 
292
343
  /**
@@ -1107,6 +1158,1803 @@ interface IterationContext {
1107
1158
  knowledgeMap?: KnowledgeMap;
1108
1159
  }
1109
1160
 
1161
+ type Json = string | number | boolean | null | {
1162
+ [key: string]: Json | undefined;
1163
+ } | Json[];
1164
+ type Database = {
1165
+ __InternalSupabase: {
1166
+ PostgrestVersion: "12.2.3 (519615d)";
1167
+ };
1168
+ public: {
1169
+ Tables: {
1170
+ acq_companies: {
1171
+ Row: {
1172
+ attio_company_id: string | null;
1173
+ business_description: string | null;
1174
+ business_type: string | null;
1175
+ company_values: string | null;
1176
+ core_offerings: string[] | null;
1177
+ created_at: string;
1178
+ domain: string | null;
1179
+ enrichment_status: Json | null;
1180
+ founded_year: number | null;
1181
+ id: string;
1182
+ linkedin_url: string | null;
1183
+ location_city: string | null;
1184
+ location_state: string | null;
1185
+ mission_vision: string | null;
1186
+ name: string;
1187
+ num_employees: number | null;
1188
+ organization_id: string;
1189
+ other_segments: string[] | null;
1190
+ primary_segment: string | null;
1191
+ recent_web_posts: Json | null;
1192
+ source: string | null;
1193
+ target_audience: string | null;
1194
+ unique_attributes: string | null;
1195
+ updated_at: string;
1196
+ website: string | null;
1197
+ };
1198
+ Insert: {
1199
+ attio_company_id?: string | null;
1200
+ business_description?: string | null;
1201
+ business_type?: string | null;
1202
+ company_values?: string | null;
1203
+ core_offerings?: string[] | null;
1204
+ created_at?: string;
1205
+ domain?: string | null;
1206
+ enrichment_status?: Json | null;
1207
+ founded_year?: number | null;
1208
+ id?: string;
1209
+ linkedin_url?: string | null;
1210
+ location_city?: string | null;
1211
+ location_state?: string | null;
1212
+ mission_vision?: string | null;
1213
+ name: string;
1214
+ num_employees?: number | null;
1215
+ organization_id: string;
1216
+ other_segments?: string[] | null;
1217
+ primary_segment?: string | null;
1218
+ recent_web_posts?: Json | null;
1219
+ source?: string | null;
1220
+ target_audience?: string | null;
1221
+ unique_attributes?: string | null;
1222
+ updated_at?: string;
1223
+ website?: string | null;
1224
+ };
1225
+ Update: {
1226
+ attio_company_id?: string | null;
1227
+ business_description?: string | null;
1228
+ business_type?: string | null;
1229
+ company_values?: string | null;
1230
+ core_offerings?: string[] | null;
1231
+ created_at?: string;
1232
+ domain?: string | null;
1233
+ enrichment_status?: Json | null;
1234
+ founded_year?: number | null;
1235
+ id?: string;
1236
+ linkedin_url?: string | null;
1237
+ location_city?: string | null;
1238
+ location_state?: string | null;
1239
+ mission_vision?: string | null;
1240
+ name?: string;
1241
+ num_employees?: number | null;
1242
+ organization_id?: string;
1243
+ other_segments?: string[] | null;
1244
+ primary_segment?: string | null;
1245
+ recent_web_posts?: Json | null;
1246
+ source?: string | null;
1247
+ target_audience?: string | null;
1248
+ unique_attributes?: string | null;
1249
+ updated_at?: string;
1250
+ website?: string | null;
1251
+ };
1252
+ Relationships: [
1253
+ {
1254
+ foreignKeyName: "acq_companies_organization_id_fkey";
1255
+ columns: ["organization_id"];
1256
+ isOneToOne: false;
1257
+ referencedRelation: "organizations";
1258
+ referencedColumns: ["id"];
1259
+ }
1260
+ ];
1261
+ };
1262
+ acq_contacts: {
1263
+ Row: {
1264
+ attio_person_id: string | null;
1265
+ brochure_first_viewed_at: string | null;
1266
+ brochure_view_count: number;
1267
+ company_id: string | null;
1268
+ created_at: string;
1269
+ email: string;
1270
+ email_valid: string | null;
1271
+ enrichment_status: Json | null;
1272
+ filter_reason: string | null;
1273
+ first_name: string | null;
1274
+ headline: string | null;
1275
+ id: string;
1276
+ last_name: string | null;
1277
+ li_activity: Json | null;
1278
+ li_education: string | null;
1279
+ li_past_experience: string | null;
1280
+ li_summary: string | null;
1281
+ linkedin_url: string | null;
1282
+ nurture: boolean;
1283
+ opening_line: string | null;
1284
+ organization_id: string;
1285
+ qualification: string | null;
1286
+ source: string | null;
1287
+ source_id: string | null;
1288
+ status: string | null;
1289
+ title: string | null;
1290
+ updated_at: string;
1291
+ };
1292
+ Insert: {
1293
+ attio_person_id?: string | null;
1294
+ brochure_first_viewed_at?: string | null;
1295
+ brochure_view_count?: number;
1296
+ company_id?: string | null;
1297
+ created_at?: string;
1298
+ email: string;
1299
+ email_valid?: string | null;
1300
+ enrichment_status?: Json | null;
1301
+ filter_reason?: string | null;
1302
+ first_name?: string | null;
1303
+ headline?: string | null;
1304
+ id?: string;
1305
+ last_name?: string | null;
1306
+ li_activity?: Json | null;
1307
+ li_education?: string | null;
1308
+ li_past_experience?: string | null;
1309
+ li_summary?: string | null;
1310
+ linkedin_url?: string | null;
1311
+ nurture?: boolean;
1312
+ opening_line?: string | null;
1313
+ organization_id: string;
1314
+ qualification?: string | null;
1315
+ source?: string | null;
1316
+ source_id?: string | null;
1317
+ status?: string | null;
1318
+ title?: string | null;
1319
+ updated_at?: string;
1320
+ };
1321
+ Update: {
1322
+ attio_person_id?: string | null;
1323
+ brochure_first_viewed_at?: string | null;
1324
+ brochure_view_count?: number;
1325
+ company_id?: string | null;
1326
+ created_at?: string;
1327
+ email?: string;
1328
+ email_valid?: string | null;
1329
+ enrichment_status?: Json | null;
1330
+ filter_reason?: string | null;
1331
+ first_name?: string | null;
1332
+ headline?: string | null;
1333
+ id?: string;
1334
+ last_name?: string | null;
1335
+ li_activity?: Json | null;
1336
+ li_education?: string | null;
1337
+ li_past_experience?: string | null;
1338
+ li_summary?: string | null;
1339
+ linkedin_url?: string | null;
1340
+ nurture?: boolean;
1341
+ opening_line?: string | null;
1342
+ organization_id?: string;
1343
+ qualification?: string | null;
1344
+ source?: string | null;
1345
+ source_id?: string | null;
1346
+ status?: string | null;
1347
+ title?: string | null;
1348
+ updated_at?: string;
1349
+ };
1350
+ Relationships: [
1351
+ {
1352
+ foreignKeyName: "acq_contacts_company_id_fkey";
1353
+ columns: ["company_id"];
1354
+ isOneToOne: false;
1355
+ referencedRelation: "acq_companies";
1356
+ referencedColumns: ["id"];
1357
+ },
1358
+ {
1359
+ foreignKeyName: "acq_contacts_organization_id_fkey";
1360
+ columns: ["organization_id"];
1361
+ isOneToOne: false;
1362
+ referencedRelation: "organizations";
1363
+ referencedColumns: ["id"];
1364
+ }
1365
+ ];
1366
+ };
1367
+ acq_deals: {
1368
+ Row: {
1369
+ attio_deal_id: string;
1370
+ cached_stage: string | null;
1371
+ closed_lost_at: string | null;
1372
+ closed_lost_reason: string | null;
1373
+ contact_email: string;
1374
+ contact_id: string | null;
1375
+ created_at: string;
1376
+ discovery_data: Json | null;
1377
+ discovery_submitted_at: string | null;
1378
+ discovery_submitted_by: string | null;
1379
+ id: string;
1380
+ initial_fee: number | null;
1381
+ monthly_fee: number | null;
1382
+ organization_id: string;
1383
+ payment_link_sent_at: string | null;
1384
+ payment_received_at: string | null;
1385
+ proposal_data: Json | null;
1386
+ proposal_generated_at: string | null;
1387
+ proposal_pdf_url: string | null;
1388
+ proposal_reviewed_at: string | null;
1389
+ proposal_reviewed_by: string | null;
1390
+ proposal_sent_at: string | null;
1391
+ proposal_signed_at: string | null;
1392
+ proposal_status: string | null;
1393
+ signature_envelope_id: string | null;
1394
+ source_list_id: string | null;
1395
+ source_type: string | null;
1396
+ stripe_payment_id: string | null;
1397
+ stripe_payment_link: string | null;
1398
+ stripe_payment_link_id: string | null;
1399
+ stripe_subscription_id: string | null;
1400
+ updated_at: string;
1401
+ };
1402
+ Insert: {
1403
+ attio_deal_id: string;
1404
+ cached_stage?: string | null;
1405
+ closed_lost_at?: string | null;
1406
+ closed_lost_reason?: string | null;
1407
+ contact_email: string;
1408
+ contact_id?: string | null;
1409
+ created_at?: string;
1410
+ discovery_data?: Json | null;
1411
+ discovery_submitted_at?: string | null;
1412
+ discovery_submitted_by?: string | null;
1413
+ id?: string;
1414
+ initial_fee?: number | null;
1415
+ monthly_fee?: number | null;
1416
+ organization_id: string;
1417
+ payment_link_sent_at?: string | null;
1418
+ payment_received_at?: string | null;
1419
+ proposal_data?: Json | null;
1420
+ proposal_generated_at?: string | null;
1421
+ proposal_pdf_url?: string | null;
1422
+ proposal_reviewed_at?: string | null;
1423
+ proposal_reviewed_by?: string | null;
1424
+ proposal_sent_at?: string | null;
1425
+ proposal_signed_at?: string | null;
1426
+ proposal_status?: string | null;
1427
+ signature_envelope_id?: string | null;
1428
+ source_list_id?: string | null;
1429
+ source_type?: string | null;
1430
+ stripe_payment_id?: string | null;
1431
+ stripe_payment_link?: string | null;
1432
+ stripe_payment_link_id?: string | null;
1433
+ stripe_subscription_id?: string | null;
1434
+ updated_at?: string;
1435
+ };
1436
+ Update: {
1437
+ attio_deal_id?: string;
1438
+ cached_stage?: string | null;
1439
+ closed_lost_at?: string | null;
1440
+ closed_lost_reason?: string | null;
1441
+ contact_email?: string;
1442
+ contact_id?: string | null;
1443
+ created_at?: string;
1444
+ discovery_data?: Json | null;
1445
+ discovery_submitted_at?: string | null;
1446
+ discovery_submitted_by?: string | null;
1447
+ id?: string;
1448
+ initial_fee?: number | null;
1449
+ monthly_fee?: number | null;
1450
+ organization_id?: string;
1451
+ payment_link_sent_at?: string | null;
1452
+ payment_received_at?: string | null;
1453
+ proposal_data?: Json | null;
1454
+ proposal_generated_at?: string | null;
1455
+ proposal_pdf_url?: string | null;
1456
+ proposal_reviewed_at?: string | null;
1457
+ proposal_reviewed_by?: string | null;
1458
+ proposal_sent_at?: string | null;
1459
+ proposal_signed_at?: string | null;
1460
+ proposal_status?: string | null;
1461
+ signature_envelope_id?: string | null;
1462
+ source_list_id?: string | null;
1463
+ source_type?: string | null;
1464
+ stripe_payment_id?: string | null;
1465
+ stripe_payment_link?: string | null;
1466
+ stripe_payment_link_id?: string | null;
1467
+ stripe_subscription_id?: string | null;
1468
+ updated_at?: string;
1469
+ };
1470
+ Relationships: [
1471
+ {
1472
+ foreignKeyName: "acq_deals_contact_id_fkey";
1473
+ columns: ["contact_id"];
1474
+ isOneToOne: false;
1475
+ referencedRelation: "acq_contacts";
1476
+ referencedColumns: ["id"];
1477
+ },
1478
+ {
1479
+ foreignKeyName: "acq_deals_organization_id_fkey";
1480
+ columns: ["organization_id"];
1481
+ isOneToOne: false;
1482
+ referencedRelation: "organizations";
1483
+ referencedColumns: ["id"];
1484
+ },
1485
+ {
1486
+ foreignKeyName: "acq_deals_source_list_id_fkey";
1487
+ columns: ["source_list_id"];
1488
+ isOneToOne: false;
1489
+ referencedRelation: "acq_lists";
1490
+ referencedColumns: ["id"];
1491
+ }
1492
+ ];
1493
+ };
1494
+ acq_list_members: {
1495
+ Row: {
1496
+ added_at: string;
1497
+ added_by: string | null;
1498
+ contact_id: string;
1499
+ id: string;
1500
+ list_id: string;
1501
+ };
1502
+ Insert: {
1503
+ added_at?: string;
1504
+ added_by?: string | null;
1505
+ contact_id: string;
1506
+ id?: string;
1507
+ list_id: string;
1508
+ };
1509
+ Update: {
1510
+ added_at?: string;
1511
+ added_by?: string | null;
1512
+ contact_id?: string;
1513
+ id?: string;
1514
+ list_id?: string;
1515
+ };
1516
+ Relationships: [
1517
+ {
1518
+ foreignKeyName: "acq_list_members_contact_id_fkey";
1519
+ columns: ["contact_id"];
1520
+ isOneToOne: false;
1521
+ referencedRelation: "acq_contacts";
1522
+ referencedColumns: ["id"];
1523
+ },
1524
+ {
1525
+ foreignKeyName: "acq_list_members_list_id_fkey";
1526
+ columns: ["list_id"];
1527
+ isOneToOne: false;
1528
+ referencedRelation: "acq_lists";
1529
+ referencedColumns: ["id"];
1530
+ }
1531
+ ];
1532
+ };
1533
+ acq_lists: {
1534
+ Row: {
1535
+ created_at: string;
1536
+ description: string | null;
1537
+ id: string;
1538
+ name: string;
1539
+ organization_id: string;
1540
+ };
1541
+ Insert: {
1542
+ created_at?: string;
1543
+ description?: string | null;
1544
+ id?: string;
1545
+ name: string;
1546
+ organization_id: string;
1547
+ };
1548
+ Update: {
1549
+ created_at?: string;
1550
+ description?: string | null;
1551
+ id?: string;
1552
+ name?: string;
1553
+ organization_id?: string;
1554
+ };
1555
+ Relationships: [
1556
+ {
1557
+ foreignKeyName: "acq_lists_organization_id_fkey";
1558
+ columns: ["organization_id"];
1559
+ isOneToOne: false;
1560
+ referencedRelation: "organizations";
1561
+ referencedColumns: ["id"];
1562
+ }
1563
+ ];
1564
+ };
1565
+ activities: {
1566
+ Row: {
1567
+ activity_type: string;
1568
+ created_at: string;
1569
+ description: string | null;
1570
+ entity_id: string;
1571
+ entity_name: string | null;
1572
+ entity_type: string;
1573
+ id: string;
1574
+ metadata: Json | null;
1575
+ occurred_at: string;
1576
+ organization_id: string;
1577
+ status: string;
1578
+ title: string;
1579
+ };
1580
+ Insert: {
1581
+ activity_type: string;
1582
+ created_at?: string;
1583
+ description?: string | null;
1584
+ entity_id: string;
1585
+ entity_name?: string | null;
1586
+ entity_type: string;
1587
+ id?: string;
1588
+ metadata?: Json | null;
1589
+ occurred_at?: string;
1590
+ organization_id: string;
1591
+ status: string;
1592
+ title: string;
1593
+ };
1594
+ Update: {
1595
+ activity_type?: string;
1596
+ created_at?: string;
1597
+ description?: string | null;
1598
+ entity_id?: string;
1599
+ entity_name?: string | null;
1600
+ entity_type?: string;
1601
+ id?: string;
1602
+ metadata?: Json | null;
1603
+ occurred_at?: string;
1604
+ organization_id?: string;
1605
+ status?: string;
1606
+ title?: string;
1607
+ };
1608
+ Relationships: [
1609
+ {
1610
+ foreignKeyName: "activities_organization_id_fkey";
1611
+ columns: ["organization_id"];
1612
+ isOneToOne: false;
1613
+ referencedRelation: "organizations";
1614
+ referencedColumns: ["id"];
1615
+ }
1616
+ ];
1617
+ };
1618
+ api_keys: {
1619
+ Row: {
1620
+ created_at: string | null;
1621
+ id: string;
1622
+ key_hash: string;
1623
+ last_used_at: string | null;
1624
+ name: string;
1625
+ organization_id: string;
1626
+ };
1627
+ Insert: {
1628
+ created_at?: string | null;
1629
+ id?: string;
1630
+ key_hash: string;
1631
+ last_used_at?: string | null;
1632
+ name: string;
1633
+ organization_id: string;
1634
+ };
1635
+ Update: {
1636
+ created_at?: string | null;
1637
+ id?: string;
1638
+ key_hash?: string;
1639
+ last_used_at?: string | null;
1640
+ name?: string;
1641
+ organization_id?: string;
1642
+ };
1643
+ Relationships: [
1644
+ {
1645
+ foreignKeyName: "api_keys_organization_id_fkey";
1646
+ columns: ["organization_id"];
1647
+ isOneToOne: false;
1648
+ referencedRelation: "organizations";
1649
+ referencedColumns: ["id"];
1650
+ }
1651
+ ];
1652
+ };
1653
+ calibration_projects: {
1654
+ Row: {
1655
+ created_at: string | null;
1656
+ description: string | null;
1657
+ id: string;
1658
+ name: string;
1659
+ organization_id: string;
1660
+ resource_id: string;
1661
+ resource_type: string;
1662
+ updated_at: string | null;
1663
+ };
1664
+ Insert: {
1665
+ created_at?: string | null;
1666
+ description?: string | null;
1667
+ id?: string;
1668
+ name: string;
1669
+ organization_id: string;
1670
+ resource_id: string;
1671
+ resource_type: string;
1672
+ updated_at?: string | null;
1673
+ };
1674
+ Update: {
1675
+ created_at?: string | null;
1676
+ description?: string | null;
1677
+ id?: string;
1678
+ name?: string;
1679
+ organization_id?: string;
1680
+ resource_id?: string;
1681
+ resource_type?: string;
1682
+ updated_at?: string | null;
1683
+ };
1684
+ Relationships: [
1685
+ {
1686
+ foreignKeyName: "calibration_projects_organization_id_fkey";
1687
+ columns: ["organization_id"];
1688
+ isOneToOne: false;
1689
+ referencedRelation: "organizations";
1690
+ referencedColumns: ["id"];
1691
+ }
1692
+ ];
1693
+ };
1694
+ calibration_runs: {
1695
+ Row: {
1696
+ completed_at: string | null;
1697
+ config_variants: Json;
1698
+ created_at: string | null;
1699
+ description: string | null;
1700
+ execution_mode: string;
1701
+ grader_model: string | null;
1702
+ grading_rubric: Json | null;
1703
+ id: string;
1704
+ name: string;
1705
+ organization_id: string;
1706
+ project_id: string;
1707
+ results: Json;
1708
+ status: string;
1709
+ test_inputs: Json;
1710
+ };
1711
+ Insert: {
1712
+ completed_at?: string | null;
1713
+ config_variants: Json;
1714
+ created_at?: string | null;
1715
+ description?: string | null;
1716
+ execution_mode?: string;
1717
+ grader_model?: string | null;
1718
+ grading_rubric?: Json | null;
1719
+ id?: string;
1720
+ name: string;
1721
+ organization_id: string;
1722
+ project_id: string;
1723
+ results?: Json;
1724
+ status?: string;
1725
+ test_inputs: Json;
1726
+ };
1727
+ Update: {
1728
+ completed_at?: string | null;
1729
+ config_variants?: Json;
1730
+ created_at?: string | null;
1731
+ description?: string | null;
1732
+ execution_mode?: string;
1733
+ grader_model?: string | null;
1734
+ grading_rubric?: Json | null;
1735
+ id?: string;
1736
+ name?: string;
1737
+ organization_id?: string;
1738
+ project_id?: string;
1739
+ results?: Json;
1740
+ status?: string;
1741
+ test_inputs?: Json;
1742
+ };
1743
+ Relationships: [
1744
+ {
1745
+ foreignKeyName: "calibration_runs_organization_id_fkey";
1746
+ columns: ["organization_id"];
1747
+ isOneToOne: false;
1748
+ referencedRelation: "organizations";
1749
+ referencedColumns: ["id"];
1750
+ },
1751
+ {
1752
+ foreignKeyName: "calibration_runs_project_id_fkey";
1753
+ columns: ["project_id"];
1754
+ isOneToOne: false;
1755
+ referencedRelation: "calibration_projects";
1756
+ referencedColumns: ["id"];
1757
+ }
1758
+ ];
1759
+ };
1760
+ command_queue: {
1761
+ Row: {
1762
+ action_payload: Json | null;
1763
+ actions: Json;
1764
+ completed_at: string | null;
1765
+ completed_by: string | null;
1766
+ context: Json;
1767
+ created_at: string;
1768
+ description: string | null;
1769
+ expires_at: string | null;
1770
+ human_checkpoint: string | null;
1771
+ id: string;
1772
+ metadata: Json | null;
1773
+ organization_id: string;
1774
+ origin_execution_id: string;
1775
+ origin_resource_id: string;
1776
+ origin_resource_type: string;
1777
+ priority: number;
1778
+ selected_action: string | null;
1779
+ status: string;
1780
+ target_execution_id: string | null;
1781
+ };
1782
+ Insert: {
1783
+ action_payload?: Json | null;
1784
+ actions: Json;
1785
+ completed_at?: string | null;
1786
+ completed_by?: string | null;
1787
+ context: Json;
1788
+ created_at?: string;
1789
+ description?: string | null;
1790
+ expires_at?: string | null;
1791
+ human_checkpoint?: string | null;
1792
+ id?: string;
1793
+ metadata?: Json | null;
1794
+ organization_id: string;
1795
+ origin_execution_id: string;
1796
+ origin_resource_id: string;
1797
+ origin_resource_type: string;
1798
+ priority?: number;
1799
+ selected_action?: string | null;
1800
+ status?: string;
1801
+ target_execution_id?: string | null;
1802
+ };
1803
+ Update: {
1804
+ action_payload?: Json | null;
1805
+ actions?: Json;
1806
+ completed_at?: string | null;
1807
+ completed_by?: string | null;
1808
+ context?: Json;
1809
+ created_at?: string;
1810
+ description?: string | null;
1811
+ expires_at?: string | null;
1812
+ human_checkpoint?: string | null;
1813
+ id?: string;
1814
+ metadata?: Json | null;
1815
+ organization_id?: string;
1816
+ origin_execution_id?: string;
1817
+ origin_resource_id?: string;
1818
+ origin_resource_type?: string;
1819
+ priority?: number;
1820
+ selected_action?: string | null;
1821
+ status?: string;
1822
+ target_execution_id?: string | null;
1823
+ };
1824
+ Relationships: [
1825
+ {
1826
+ foreignKeyName: "command_queue_completed_by_fkey";
1827
+ columns: ["completed_by"];
1828
+ isOneToOne: false;
1829
+ referencedRelation: "users";
1830
+ referencedColumns: ["id"];
1831
+ },
1832
+ {
1833
+ foreignKeyName: "command_queue_organization_id_fkey";
1834
+ columns: ["organization_id"];
1835
+ isOneToOne: false;
1836
+ referencedRelation: "organizations";
1837
+ referencedColumns: ["id"];
1838
+ },
1839
+ {
1840
+ foreignKeyName: "command_queue_target_execution_id_fkey";
1841
+ columns: ["target_execution_id"];
1842
+ isOneToOne: false;
1843
+ referencedRelation: "execution_logs";
1844
+ referencedColumns: ["execution_id"];
1845
+ }
1846
+ ];
1847
+ };
1848
+ credentials: {
1849
+ Row: {
1850
+ created_at: string;
1851
+ created_by: string | null;
1852
+ encrypted_value: string;
1853
+ id: string;
1854
+ name: string;
1855
+ organization_id: string;
1856
+ provider: string | null;
1857
+ type: string;
1858
+ updated_at: string;
1859
+ };
1860
+ Insert: {
1861
+ created_at?: string;
1862
+ created_by?: string | null;
1863
+ encrypted_value: string;
1864
+ id?: string;
1865
+ name: string;
1866
+ organization_id: string;
1867
+ provider?: string | null;
1868
+ type?: string;
1869
+ updated_at?: string;
1870
+ };
1871
+ Update: {
1872
+ created_at?: string;
1873
+ created_by?: string | null;
1874
+ encrypted_value?: string;
1875
+ id?: string;
1876
+ name?: string;
1877
+ organization_id?: string;
1878
+ provider?: string | null;
1879
+ type?: string;
1880
+ updated_at?: string;
1881
+ };
1882
+ Relationships: [
1883
+ {
1884
+ foreignKeyName: "credentials_created_by_fkey";
1885
+ columns: ["created_by"];
1886
+ isOneToOne: false;
1887
+ referencedRelation: "users";
1888
+ referencedColumns: ["id"];
1889
+ },
1890
+ {
1891
+ foreignKeyName: "credentials_organization_id_fkey";
1892
+ columns: ["organization_id"];
1893
+ isOneToOne: false;
1894
+ referencedRelation: "organizations";
1895
+ referencedColumns: ["id"];
1896
+ }
1897
+ ];
1898
+ };
1899
+ deployments: {
1900
+ Row: {
1901
+ compiled_docs: Json | null;
1902
+ created_at: string;
1903
+ documentation: Json | null;
1904
+ error_message: string | null;
1905
+ id: string;
1906
+ organization_id: string;
1907
+ pid: number | null;
1908
+ port: number | null;
1909
+ sdk_version: string;
1910
+ status: string;
1911
+ tarball_path: string | null;
1912
+ updated_at: string;
1913
+ };
1914
+ Insert: {
1915
+ compiled_docs?: Json | null;
1916
+ created_at?: string;
1917
+ documentation?: Json | null;
1918
+ error_message?: string | null;
1919
+ id?: string;
1920
+ organization_id: string;
1921
+ pid?: number | null;
1922
+ port?: number | null;
1923
+ sdk_version: string;
1924
+ status?: string;
1925
+ tarball_path?: string | null;
1926
+ updated_at?: string;
1927
+ };
1928
+ Update: {
1929
+ compiled_docs?: Json | null;
1930
+ created_at?: string;
1931
+ documentation?: Json | null;
1932
+ error_message?: string | null;
1933
+ id?: string;
1934
+ organization_id?: string;
1935
+ pid?: number | null;
1936
+ port?: number | null;
1937
+ sdk_version?: string;
1938
+ status?: string;
1939
+ tarball_path?: string | null;
1940
+ updated_at?: string;
1941
+ };
1942
+ Relationships: [
1943
+ {
1944
+ foreignKeyName: "deployments_organization_id_fkey";
1945
+ columns: ["organization_id"];
1946
+ isOneToOne: false;
1947
+ referencedRelation: "organizations";
1948
+ referencedColumns: ["id"];
1949
+ }
1950
+ ];
1951
+ };
1952
+ execution_errors: {
1953
+ Row: {
1954
+ created_at: string | null;
1955
+ error_category: string;
1956
+ error_message: string;
1957
+ error_severity: string;
1958
+ error_stack_trace: string | null;
1959
+ error_type: string;
1960
+ execution_id: string;
1961
+ id: string;
1962
+ metadata: Json | null;
1963
+ occurred_at: string;
1964
+ organization_id: string;
1965
+ resolved: boolean;
1966
+ resolved_at: string | null;
1967
+ resolved_by: string | null;
1968
+ };
1969
+ Insert: {
1970
+ created_at?: string | null;
1971
+ error_category: string;
1972
+ error_message: string;
1973
+ error_severity: string;
1974
+ error_stack_trace?: string | null;
1975
+ error_type: string;
1976
+ execution_id: string;
1977
+ id?: string;
1978
+ metadata?: Json | null;
1979
+ occurred_at?: string;
1980
+ organization_id: string;
1981
+ resolved?: boolean;
1982
+ resolved_at?: string | null;
1983
+ resolved_by?: string | null;
1984
+ };
1985
+ Update: {
1986
+ created_at?: string | null;
1987
+ error_category?: string;
1988
+ error_message?: string;
1989
+ error_severity?: string;
1990
+ error_stack_trace?: string | null;
1991
+ error_type?: string;
1992
+ execution_id?: string;
1993
+ id?: string;
1994
+ metadata?: Json | null;
1995
+ occurred_at?: string;
1996
+ organization_id?: string;
1997
+ resolved?: boolean;
1998
+ resolved_at?: string | null;
1999
+ resolved_by?: string | null;
2000
+ };
2001
+ Relationships: [
2002
+ {
2003
+ foreignKeyName: "execution_errors_execution_id_fkey";
2004
+ columns: ["execution_id"];
2005
+ isOneToOne: false;
2006
+ referencedRelation: "execution_logs";
2007
+ referencedColumns: ["execution_id"];
2008
+ },
2009
+ {
2010
+ foreignKeyName: "execution_errors_organization_id_fkey";
2011
+ columns: ["organization_id"];
2012
+ isOneToOne: false;
2013
+ referencedRelation: "organizations";
2014
+ referencedColumns: ["id"];
2015
+ },
2016
+ {
2017
+ foreignKeyName: "execution_errors_resolved_by_fkey";
2018
+ columns: ["resolved_by"];
2019
+ isOneToOne: false;
2020
+ referencedRelation: "users";
2021
+ referencedColumns: ["id"];
2022
+ }
2023
+ ];
2024
+ };
2025
+ execution_logs: {
2026
+ Row: {
2027
+ api_version: string | null;
2028
+ completed_at: string | null;
2029
+ created_at: string | null;
2030
+ error: string | null;
2031
+ execution_id: string;
2032
+ input: Json | null;
2033
+ logs: Json | null;
2034
+ organization_id: string;
2035
+ origin_execution_id: string | null;
2036
+ output: Json | null;
2037
+ resource_id: string;
2038
+ resource_status: string;
2039
+ resource_type: string;
2040
+ resource_version: string | null;
2041
+ sdk_version: string | null;
2042
+ session_id: string | null;
2043
+ session_turn_number: number | null;
2044
+ started_at: string;
2045
+ status: string;
2046
+ updated_at: string | null;
2047
+ user_id: string | null;
2048
+ };
2049
+ Insert: {
2050
+ api_version?: string | null;
2051
+ completed_at?: string | null;
2052
+ created_at?: string | null;
2053
+ error?: string | null;
2054
+ execution_id?: string;
2055
+ input?: Json | null;
2056
+ logs?: Json | null;
2057
+ organization_id: string;
2058
+ origin_execution_id?: string | null;
2059
+ output?: Json | null;
2060
+ resource_id: string;
2061
+ resource_status?: string;
2062
+ resource_type?: string;
2063
+ resource_version?: string | null;
2064
+ sdk_version?: string | null;
2065
+ session_id?: string | null;
2066
+ session_turn_number?: number | null;
2067
+ started_at?: string;
2068
+ status: string;
2069
+ updated_at?: string | null;
2070
+ user_id?: string | null;
2071
+ };
2072
+ Update: {
2073
+ api_version?: string | null;
2074
+ completed_at?: string | null;
2075
+ created_at?: string | null;
2076
+ error?: string | null;
2077
+ execution_id?: string;
2078
+ input?: Json | null;
2079
+ logs?: Json | null;
2080
+ organization_id?: string;
2081
+ origin_execution_id?: string | null;
2082
+ output?: Json | null;
2083
+ resource_id?: string;
2084
+ resource_status?: string;
2085
+ resource_type?: string;
2086
+ resource_version?: string | null;
2087
+ sdk_version?: string | null;
2088
+ session_id?: string | null;
2089
+ session_turn_number?: number | null;
2090
+ started_at?: string;
2091
+ status?: string;
2092
+ updated_at?: string | null;
2093
+ user_id?: string | null;
2094
+ };
2095
+ Relationships: [
2096
+ {
2097
+ foreignKeyName: "execution_history_organization_id_fkey";
2098
+ columns: ["organization_id"];
2099
+ isOneToOne: false;
2100
+ referencedRelation: "organizations";
2101
+ referencedColumns: ["id"];
2102
+ },
2103
+ {
2104
+ foreignKeyName: "execution_logs_origin_execution_id_fkey";
2105
+ columns: ["origin_execution_id"];
2106
+ isOneToOne: false;
2107
+ referencedRelation: "execution_logs";
2108
+ referencedColumns: ["execution_id"];
2109
+ },
2110
+ {
2111
+ foreignKeyName: "execution_logs_session_id_fkey";
2112
+ columns: ["session_id"];
2113
+ isOneToOne: false;
2114
+ referencedRelation: "sessions";
2115
+ referencedColumns: ["session_id"];
2116
+ },
2117
+ {
2118
+ foreignKeyName: "execution_logs_user_id_fkey";
2119
+ columns: ["user_id"];
2120
+ isOneToOne: false;
2121
+ referencedRelation: "users";
2122
+ referencedColumns: ["id"];
2123
+ }
2124
+ ];
2125
+ };
2126
+ execution_metrics: {
2127
+ Row: {
2128
+ ai_call_count: number;
2129
+ ai_calls: Json | null;
2130
+ automation_savings_usd: number | null;
2131
+ created_at: string | null;
2132
+ duration_ms: number | null;
2133
+ execution_id: string;
2134
+ organization_id: string;
2135
+ resource_id: string;
2136
+ total_cost_usd: number;
2137
+ total_input_tokens: number;
2138
+ total_output_tokens: number;
2139
+ };
2140
+ Insert: {
2141
+ ai_call_count: number;
2142
+ ai_calls?: Json | null;
2143
+ automation_savings_usd?: number | null;
2144
+ created_at?: string | null;
2145
+ duration_ms?: number | null;
2146
+ execution_id: string;
2147
+ organization_id: string;
2148
+ resource_id: string;
2149
+ total_cost_usd: number;
2150
+ total_input_tokens: number;
2151
+ total_output_tokens: number;
2152
+ };
2153
+ Update: {
2154
+ ai_call_count?: number;
2155
+ ai_calls?: Json | null;
2156
+ automation_savings_usd?: number | null;
2157
+ created_at?: string | null;
2158
+ duration_ms?: number | null;
2159
+ execution_id?: string;
2160
+ organization_id?: string;
2161
+ resource_id?: string;
2162
+ total_cost_usd?: number;
2163
+ total_input_tokens?: number;
2164
+ total_output_tokens?: number;
2165
+ };
2166
+ Relationships: [
2167
+ {
2168
+ foreignKeyName: "execution_metrics_execution_id_fkey";
2169
+ columns: ["execution_id"];
2170
+ isOneToOne: true;
2171
+ referencedRelation: "execution_logs";
2172
+ referencedColumns: ["execution_id"];
2173
+ },
2174
+ {
2175
+ foreignKeyName: "execution_metrics_organization_id_fkey";
2176
+ columns: ["organization_id"];
2177
+ isOneToOne: false;
2178
+ referencedRelation: "organizations";
2179
+ referencedColumns: ["id"];
2180
+ }
2181
+ ];
2182
+ };
2183
+ notifications: {
2184
+ Row: {
2185
+ action_url: string | null;
2186
+ category: string;
2187
+ created_at: string | null;
2188
+ id: string;
2189
+ message: string;
2190
+ organization_id: string;
2191
+ read: boolean | null;
2192
+ read_at: string | null;
2193
+ title: string;
2194
+ user_id: string;
2195
+ };
2196
+ Insert: {
2197
+ action_url?: string | null;
2198
+ category: string;
2199
+ created_at?: string | null;
2200
+ id?: string;
2201
+ message: string;
2202
+ organization_id: string;
2203
+ read?: boolean | null;
2204
+ read_at?: string | null;
2205
+ title: string;
2206
+ user_id: string;
2207
+ };
2208
+ Update: {
2209
+ action_url?: string | null;
2210
+ category?: string;
2211
+ created_at?: string | null;
2212
+ id?: string;
2213
+ message?: string;
2214
+ organization_id?: string;
2215
+ read?: boolean | null;
2216
+ read_at?: string | null;
2217
+ title?: string;
2218
+ user_id?: string;
2219
+ };
2220
+ Relationships: [
2221
+ {
2222
+ foreignKeyName: "notifications_organization_id_fkey";
2223
+ columns: ["organization_id"];
2224
+ isOneToOne: false;
2225
+ referencedRelation: "organizations";
2226
+ referencedColumns: ["id"];
2227
+ },
2228
+ {
2229
+ foreignKeyName: "notifications_user_id_fkey";
2230
+ columns: ["user_id"];
2231
+ isOneToOne: false;
2232
+ referencedRelation: "users";
2233
+ referencedColumns: ["id"];
2234
+ }
2235
+ ];
2236
+ };
2237
+ org_invitations: {
2238
+ Row: {
2239
+ accept_invitation_url: string | null;
2240
+ accepted_at: string | null;
2241
+ created_at: string | null;
2242
+ email: string;
2243
+ expires_at: string;
2244
+ id: string;
2245
+ invitation_state: string | null;
2246
+ invitation_token: string | null;
2247
+ inviter_user_id: string | null;
2248
+ organization_id: string | null;
2249
+ revoked_at: string | null;
2250
+ role_slug: string | null;
2251
+ updated_at: string | null;
2252
+ workos_invitation_id: string;
2253
+ };
2254
+ Insert: {
2255
+ accept_invitation_url?: string | null;
2256
+ accepted_at?: string | null;
2257
+ created_at?: string | null;
2258
+ email: string;
2259
+ expires_at: string;
2260
+ id?: string;
2261
+ invitation_state?: string | null;
2262
+ invitation_token?: string | null;
2263
+ inviter_user_id?: string | null;
2264
+ organization_id?: string | null;
2265
+ revoked_at?: string | null;
2266
+ role_slug?: string | null;
2267
+ updated_at?: string | null;
2268
+ workos_invitation_id: string;
2269
+ };
2270
+ Update: {
2271
+ accept_invitation_url?: string | null;
2272
+ accepted_at?: string | null;
2273
+ created_at?: string | null;
2274
+ email?: string;
2275
+ expires_at?: string;
2276
+ id?: string;
2277
+ invitation_state?: string | null;
2278
+ invitation_token?: string | null;
2279
+ inviter_user_id?: string | null;
2280
+ organization_id?: string | null;
2281
+ revoked_at?: string | null;
2282
+ role_slug?: string | null;
2283
+ updated_at?: string | null;
2284
+ workos_invitation_id?: string;
2285
+ };
2286
+ Relationships: [
2287
+ {
2288
+ foreignKeyName: "org_invitations_inviter_user_id_fkey";
2289
+ columns: ["inviter_user_id"];
2290
+ isOneToOne: false;
2291
+ referencedRelation: "users";
2292
+ referencedColumns: ["id"];
2293
+ },
2294
+ {
2295
+ foreignKeyName: "org_invitations_organization_id_fkey";
2296
+ columns: ["organization_id"];
2297
+ isOneToOne: false;
2298
+ referencedRelation: "organizations";
2299
+ referencedColumns: ["id"];
2300
+ }
2301
+ ];
2302
+ };
2303
+ org_memberships: {
2304
+ Row: {
2305
+ config: Json;
2306
+ created_at: string | null;
2307
+ id: string;
2308
+ membership_status: string | null;
2309
+ organization_id: string;
2310
+ role_slug: string | null;
2311
+ updated_at: string | null;
2312
+ user_id: string;
2313
+ workos_membership_id: string | null;
2314
+ };
2315
+ Insert: {
2316
+ config?: Json;
2317
+ created_at?: string | null;
2318
+ id?: string;
2319
+ membership_status?: string | null;
2320
+ organization_id: string;
2321
+ role_slug?: string | null;
2322
+ updated_at?: string | null;
2323
+ user_id: string;
2324
+ workos_membership_id?: string | null;
2325
+ };
2326
+ Update: {
2327
+ config?: Json;
2328
+ created_at?: string | null;
2329
+ id?: string;
2330
+ membership_status?: string | null;
2331
+ organization_id?: string;
2332
+ role_slug?: string | null;
2333
+ updated_at?: string | null;
2334
+ user_id?: string;
2335
+ workos_membership_id?: string | null;
2336
+ };
2337
+ Relationships: [
2338
+ {
2339
+ foreignKeyName: "org_memberships_organization_id_fkey";
2340
+ columns: ["organization_id"];
2341
+ isOneToOne: false;
2342
+ referencedRelation: "organizations";
2343
+ referencedColumns: ["id"];
2344
+ },
2345
+ {
2346
+ foreignKeyName: "org_memberships_user_id_fkey";
2347
+ columns: ["user_id"];
2348
+ isOneToOne: false;
2349
+ referencedRelation: "users";
2350
+ referencedColumns: ["id"];
2351
+ }
2352
+ ];
2353
+ };
2354
+ organizations: {
2355
+ Row: {
2356
+ config: Json;
2357
+ created_at: string;
2358
+ id: string;
2359
+ is_test: boolean;
2360
+ metadata: Json;
2361
+ name: string;
2362
+ status: string;
2363
+ updated_at: string;
2364
+ workos_org_id: string;
2365
+ };
2366
+ Insert: {
2367
+ config?: Json;
2368
+ created_at?: string;
2369
+ id?: string;
2370
+ is_test?: boolean;
2371
+ metadata?: Json;
2372
+ name: string;
2373
+ status?: string;
2374
+ updated_at?: string;
2375
+ workos_org_id: string;
2376
+ };
2377
+ Update: {
2378
+ config?: Json;
2379
+ created_at?: string;
2380
+ id?: string;
2381
+ is_test?: boolean;
2382
+ metadata?: Json;
2383
+ name?: string;
2384
+ status?: string;
2385
+ updated_at?: string;
2386
+ workos_org_id?: string;
2387
+ };
2388
+ Relationships: [];
2389
+ };
2390
+ session_messages: {
2391
+ Row: {
2392
+ created_at: string | null;
2393
+ id: string;
2394
+ message: string;
2395
+ message_index: number | null;
2396
+ message_type: string | null;
2397
+ metadata: Json | null;
2398
+ role: string;
2399
+ session_id: string;
2400
+ session_turn_number: number;
2401
+ };
2402
+ Insert: {
2403
+ created_at?: string | null;
2404
+ id: string;
2405
+ message: string;
2406
+ message_index?: number | null;
2407
+ message_type?: string | null;
2408
+ metadata?: Json | null;
2409
+ role: string;
2410
+ session_id: string;
2411
+ session_turn_number: number;
2412
+ };
2413
+ Update: {
2414
+ created_at?: string | null;
2415
+ id?: string;
2416
+ message?: string;
2417
+ message_index?: number | null;
2418
+ message_type?: string | null;
2419
+ metadata?: Json | null;
2420
+ role?: string;
2421
+ session_id?: string;
2422
+ session_turn_number?: number;
2423
+ };
2424
+ Relationships: [
2425
+ {
2426
+ foreignKeyName: "session_messages_session_id_fkey";
2427
+ columns: ["session_id"];
2428
+ isOneToOne: false;
2429
+ referencedRelation: "sessions";
2430
+ referencedColumns: ["session_id"];
2431
+ }
2432
+ ];
2433
+ };
2434
+ sessions: {
2435
+ Row: {
2436
+ created_at: string | null;
2437
+ ended_at: string | null;
2438
+ memory_snapshot: Json;
2439
+ metadata: Json | null;
2440
+ organization_id: string;
2441
+ resource_id: string;
2442
+ session_id: string;
2443
+ session_total_turns: number | null;
2444
+ updated_at: string | null;
2445
+ user_id: string | null;
2446
+ };
2447
+ Insert: {
2448
+ created_at?: string | null;
2449
+ ended_at?: string | null;
2450
+ memory_snapshot: Json;
2451
+ metadata?: Json | null;
2452
+ organization_id: string;
2453
+ resource_id: string;
2454
+ session_id?: string;
2455
+ session_total_turns?: number | null;
2456
+ updated_at?: string | null;
2457
+ user_id?: string | null;
2458
+ };
2459
+ Update: {
2460
+ created_at?: string | null;
2461
+ ended_at?: string | null;
2462
+ memory_snapshot?: Json;
2463
+ metadata?: Json | null;
2464
+ organization_id?: string;
2465
+ resource_id?: string;
2466
+ session_id?: string;
2467
+ session_total_turns?: number | null;
2468
+ updated_at?: string | null;
2469
+ user_id?: string | null;
2470
+ };
2471
+ Relationships: [
2472
+ {
2473
+ foreignKeyName: "fk_organization";
2474
+ columns: ["organization_id"];
2475
+ isOneToOne: false;
2476
+ referencedRelation: "organizations";
2477
+ referencedColumns: ["id"];
2478
+ },
2479
+ {
2480
+ foreignKeyName: "fk_user";
2481
+ columns: ["user_id"];
2482
+ isOneToOne: false;
2483
+ referencedRelation: "users";
2484
+ referencedColumns: ["id"];
2485
+ }
2486
+ ];
2487
+ };
2488
+ task_schedules: {
2489
+ Row: {
2490
+ created_at: string;
2491
+ current_step: number;
2492
+ description: string | null;
2493
+ id: string;
2494
+ idempotency_key: string | null;
2495
+ last_execution_id: string | null;
2496
+ last_run_at: string | null;
2497
+ max_retries: number;
2498
+ metadata: Json | null;
2499
+ name: string;
2500
+ next_run_at: string | null;
2501
+ organization_id: string;
2502
+ origin_execution_id: string | null;
2503
+ origin_resource_id: string | null;
2504
+ origin_resource_type: string | null;
2505
+ retry_count: number;
2506
+ schedule_config: Json;
2507
+ status: string;
2508
+ target_resource_id: string;
2509
+ target_resource_type: string;
2510
+ updated_at: string;
2511
+ };
2512
+ Insert: {
2513
+ created_at?: string;
2514
+ current_step?: number;
2515
+ description?: string | null;
2516
+ id?: string;
2517
+ idempotency_key?: string | null;
2518
+ last_execution_id?: string | null;
2519
+ last_run_at?: string | null;
2520
+ max_retries?: number;
2521
+ metadata?: Json | null;
2522
+ name: string;
2523
+ next_run_at?: string | null;
2524
+ organization_id: string;
2525
+ origin_execution_id?: string | null;
2526
+ origin_resource_id?: string | null;
2527
+ origin_resource_type?: string | null;
2528
+ retry_count?: number;
2529
+ schedule_config: Json;
2530
+ status?: string;
2531
+ target_resource_id: string;
2532
+ target_resource_type: string;
2533
+ updated_at?: string;
2534
+ };
2535
+ Update: {
2536
+ created_at?: string;
2537
+ current_step?: number;
2538
+ description?: string | null;
2539
+ id?: string;
2540
+ idempotency_key?: string | null;
2541
+ last_execution_id?: string | null;
2542
+ last_run_at?: string | null;
2543
+ max_retries?: number;
2544
+ metadata?: Json | null;
2545
+ name?: string;
2546
+ next_run_at?: string | null;
2547
+ organization_id?: string;
2548
+ origin_execution_id?: string | null;
2549
+ origin_resource_id?: string | null;
2550
+ origin_resource_type?: string | null;
2551
+ retry_count?: number;
2552
+ schedule_config?: Json;
2553
+ status?: string;
2554
+ target_resource_id?: string;
2555
+ target_resource_type?: string;
2556
+ updated_at?: string;
2557
+ };
2558
+ Relationships: [
2559
+ {
2560
+ foreignKeyName: "task_schedules_organization_id_fkey";
2561
+ columns: ["organization_id"];
2562
+ isOneToOne: false;
2563
+ referencedRelation: "organizations";
2564
+ referencedColumns: ["id"];
2565
+ }
2566
+ ];
2567
+ };
2568
+ training_assessments: {
2569
+ Row: {
2570
+ answers: Json | null;
2571
+ assessment_slug: string;
2572
+ attempted_at: string;
2573
+ course_slug: string;
2574
+ id: string;
2575
+ organization_id: string;
2576
+ passed: boolean;
2577
+ score: number;
2578
+ user_id: string;
2579
+ };
2580
+ Insert: {
2581
+ answers?: Json | null;
2582
+ assessment_slug: string;
2583
+ attempted_at?: string;
2584
+ course_slug: string;
2585
+ id?: string;
2586
+ organization_id: string;
2587
+ passed: boolean;
2588
+ score: number;
2589
+ user_id: string;
2590
+ };
2591
+ Update: {
2592
+ answers?: Json | null;
2593
+ assessment_slug?: string;
2594
+ attempted_at?: string;
2595
+ course_slug?: string;
2596
+ id?: string;
2597
+ organization_id?: string;
2598
+ passed?: boolean;
2599
+ score?: number;
2600
+ user_id?: string;
2601
+ };
2602
+ Relationships: [
2603
+ {
2604
+ foreignKeyName: "training_assessments_organization_id_fkey";
2605
+ columns: ["organization_id"];
2606
+ isOneToOne: false;
2607
+ referencedRelation: "organizations";
2608
+ referencedColumns: ["id"];
2609
+ },
2610
+ {
2611
+ foreignKeyName: "training_assessments_user_id_fkey";
2612
+ columns: ["user_id"];
2613
+ isOneToOne: false;
2614
+ referencedRelation: "users";
2615
+ referencedColumns: ["id"];
2616
+ }
2617
+ ];
2618
+ };
2619
+ training_certifications: {
2620
+ Row: {
2621
+ awarded_at: string;
2622
+ certification_slug: string;
2623
+ id: string;
2624
+ organization_id: string;
2625
+ user_id: string;
2626
+ };
2627
+ Insert: {
2628
+ awarded_at?: string;
2629
+ certification_slug: string;
2630
+ id?: string;
2631
+ organization_id: string;
2632
+ user_id: string;
2633
+ };
2634
+ Update: {
2635
+ awarded_at?: string;
2636
+ certification_slug?: string;
2637
+ id?: string;
2638
+ organization_id?: string;
2639
+ user_id?: string;
2640
+ };
2641
+ Relationships: [
2642
+ {
2643
+ foreignKeyName: "training_certifications_organization_id_fkey";
2644
+ columns: ["organization_id"];
2645
+ isOneToOne: false;
2646
+ referencedRelation: "organizations";
2647
+ referencedColumns: ["id"];
2648
+ },
2649
+ {
2650
+ foreignKeyName: "training_certifications_user_id_fkey";
2651
+ columns: ["user_id"];
2652
+ isOneToOne: false;
2653
+ referencedRelation: "users";
2654
+ referencedColumns: ["id"];
2655
+ }
2656
+ ];
2657
+ };
2658
+ training_progress: {
2659
+ Row: {
2660
+ completed_at: string;
2661
+ course_slug: string;
2662
+ id: string;
2663
+ lesson_slug: string;
2664
+ organization_id: string;
2665
+ user_id: string;
2666
+ };
2667
+ Insert: {
2668
+ completed_at?: string;
2669
+ course_slug: string;
2670
+ id?: string;
2671
+ lesson_slug: string;
2672
+ organization_id: string;
2673
+ user_id: string;
2674
+ };
2675
+ Update: {
2676
+ completed_at?: string;
2677
+ course_slug?: string;
2678
+ id?: string;
2679
+ lesson_slug?: string;
2680
+ organization_id?: string;
2681
+ user_id?: string;
2682
+ };
2683
+ Relationships: [
2684
+ {
2685
+ foreignKeyName: "training_progress_organization_id_fkey";
2686
+ columns: ["organization_id"];
2687
+ isOneToOne: false;
2688
+ referencedRelation: "organizations";
2689
+ referencedColumns: ["id"];
2690
+ },
2691
+ {
2692
+ foreignKeyName: "training_progress_user_id_fkey";
2693
+ columns: ["user_id"];
2694
+ isOneToOne: false;
2695
+ referencedRelation: "users";
2696
+ referencedColumns: ["id"];
2697
+ }
2698
+ ];
2699
+ };
2700
+ users: {
2701
+ Row: {
2702
+ config: Json;
2703
+ created_at: string;
2704
+ display_name: string | null;
2705
+ email: string;
2706
+ first_name: string | null;
2707
+ id: string;
2708
+ is_active: boolean;
2709
+ is_platform_admin: boolean | null;
2710
+ last_login_at: string | null;
2711
+ last_name: string | null;
2712
+ last_visited_org: string | null;
2713
+ profile_picture_url: string | null;
2714
+ updated_at: string;
2715
+ workos_user_id: string | null;
2716
+ };
2717
+ Insert: {
2718
+ config?: Json;
2719
+ created_at?: string;
2720
+ display_name?: string | null;
2721
+ email: string;
2722
+ first_name?: string | null;
2723
+ id?: string;
2724
+ is_active?: boolean;
2725
+ is_platform_admin?: boolean | null;
2726
+ last_login_at?: string | null;
2727
+ last_name?: string | null;
2728
+ last_visited_org?: string | null;
2729
+ profile_picture_url?: string | null;
2730
+ updated_at?: string;
2731
+ workos_user_id?: string | null;
2732
+ };
2733
+ Update: {
2734
+ config?: Json;
2735
+ created_at?: string;
2736
+ display_name?: string | null;
2737
+ email?: string;
2738
+ first_name?: string | null;
2739
+ id?: string;
2740
+ is_active?: boolean;
2741
+ is_platform_admin?: boolean | null;
2742
+ last_login_at?: string | null;
2743
+ last_name?: string | null;
2744
+ last_visited_org?: string | null;
2745
+ profile_picture_url?: string | null;
2746
+ updated_at?: string;
2747
+ workos_user_id?: string | null;
2748
+ };
2749
+ Relationships: [
2750
+ {
2751
+ foreignKeyName: "user_profiles_last_visited_org_fkey";
2752
+ columns: ["last_visited_org"];
2753
+ isOneToOne: false;
2754
+ referencedRelation: "organizations";
2755
+ referencedColumns: ["id"];
2756
+ }
2757
+ ];
2758
+ };
2759
+ };
2760
+ Views: {
2761
+ [_ in never]: never;
2762
+ };
2763
+ Functions: {
2764
+ auth_jwt_claims: {
2765
+ Args: never;
2766
+ Returns: Json;
2767
+ };
2768
+ auth_uid_safe: {
2769
+ Args: never;
2770
+ Returns: string;
2771
+ };
2772
+ current_user_is_platform_admin: {
2773
+ Args: never;
2774
+ Returns: boolean;
2775
+ };
2776
+ current_user_supabase_id: {
2777
+ Args: never;
2778
+ Returns: string;
2779
+ };
2780
+ execute_session_turn: {
2781
+ Args: {
2782
+ p_session_id: string;
2783
+ };
2784
+ Returns: {
2785
+ created_at: string;
2786
+ ended_at: string;
2787
+ memory_snapshot: Json;
2788
+ metadata: Json;
2789
+ organization_id: string;
2790
+ resource_id: string;
2791
+ session_id: string;
2792
+ session_total_turns: number;
2793
+ updated_at: string;
2794
+ user_id: string;
2795
+ }[];
2796
+ };
2797
+ get_storage_org_id: {
2798
+ Args: {
2799
+ file_path: string;
2800
+ };
2801
+ Returns: string;
2802
+ };
2803
+ get_workos_user_id: {
2804
+ Args: never;
2805
+ Returns: string;
2806
+ };
2807
+ is_org_admin: {
2808
+ Args: {
2809
+ org_id: string;
2810
+ };
2811
+ Returns: boolean;
2812
+ };
2813
+ is_org_member: {
2814
+ Args: {
2815
+ org_id: string;
2816
+ };
2817
+ Returns: boolean;
2818
+ };
2819
+ is_platform_admin: {
2820
+ Args: never;
2821
+ Returns: boolean;
2822
+ };
2823
+ link_workos_membership_on_accept: {
2824
+ Args: {
2825
+ p_email: string;
2826
+ p_organization_id: string;
2827
+ p_workos_membership_id: string;
2828
+ };
2829
+ Returns: boolean;
2830
+ };
2831
+ pre_provision_invited_user: {
2832
+ Args: {
2833
+ p_email: string;
2834
+ p_organization_id: string;
2835
+ p_role_slug?: string;
2836
+ };
2837
+ Returns: Json;
2838
+ };
2839
+ process_due_schedules: {
2840
+ Args: never;
2841
+ Returns: Json;
2842
+ };
2843
+ upsert_user_profile: {
2844
+ Args: never;
2845
+ Returns: {
2846
+ profile_display_name: string;
2847
+ profile_email: string;
2848
+ profile_id: string;
2849
+ profile_workos_user_id: string;
2850
+ }[];
2851
+ };
2852
+ };
2853
+ Enums: {
2854
+ [_ in never]: never;
2855
+ };
2856
+ CompositeTypes: {
2857
+ [_ in never]: never;
2858
+ };
2859
+ };
2860
+ };
2861
+
2862
+ /**
2863
+ * Origin resource type - where an execution/task originated from.
2864
+ * Used for audit trails and tracking execution lineage.
2865
+ */
2866
+ type OriginResourceType = 'agent' | 'workflow' | 'scheduler' | 'api';
2867
+
2868
+ /**
2869
+ * Target for schedule execution - identifies what resource to execute.
2870
+ * Unlike ExecutionTarget, payload is NOT included here because schedules
2871
+ * store payload in the scheduleConfig (varies per step/item).
2872
+ */
2873
+ interface ScheduleTarget {
2874
+ resourceType: 'agent' | 'workflow';
2875
+ resourceId: string;
2876
+ }
2877
+ /**
2878
+ * Optional origin tracking for schedules.
2879
+ * Unlike OriginTracking (which is required), these fields are all optional
2880
+ * for schedules created directly via API (not triggered by another resource).
2881
+ */
2882
+ interface ScheduleOriginTracking {
2883
+ originExecutionId?: string;
2884
+ originResourceType?: OriginResourceType;
2885
+ originResourceId?: string;
2886
+ }
2887
+ type TaskScheduleConfig = RecurringScheduleConfig | RelativeScheduleConfig | AbsoluteScheduleConfig;
2888
+ interface RecurringScheduleConfig {
2889
+ type: 'recurring';
2890
+ cron?: string;
2891
+ interval?: 'daily' | 'weekly' | 'monthly';
2892
+ time?: string;
2893
+ timezone: string;
2894
+ payload: Record<string, unknown>;
2895
+ endAt?: string | null;
2896
+ overduePolicy?: 'skip' | 'execute';
2897
+ }
2898
+ interface RelativeScheduleConfig {
2899
+ type: 'relative';
2900
+ anchorAt: string;
2901
+ anchorLabel?: string;
2902
+ items: RelativeScheduleItem[];
2903
+ overduePolicy?: 'skip' | 'execute';
2904
+ }
2905
+ interface RelativeScheduleItem {
2906
+ offset: string;
2907
+ payload: Record<string, unknown>;
2908
+ label?: string;
2909
+ }
2910
+ interface AbsoluteScheduleConfig {
2911
+ type: 'absolute';
2912
+ items: AbsoluteScheduleItem[];
2913
+ overduePolicy?: 'skip' | 'execute';
2914
+ }
2915
+ interface AbsoluteScheduleItem {
2916
+ runAt: string;
2917
+ payload: Record<string, unknown>;
2918
+ label?: string;
2919
+ }
2920
+ interface TaskSchedule extends ScheduleOriginTracking {
2921
+ id: string;
2922
+ organizationId: string;
2923
+ name: string;
2924
+ description?: string;
2925
+ target: ScheduleTarget;
2926
+ scheduleConfig: TaskScheduleConfig;
2927
+ nextRunAt?: Date;
2928
+ currentStep: number;
2929
+ status: 'active' | 'paused' | 'completed' | 'cancelled';
2930
+ lastRunAt?: Date;
2931
+ lastExecutionId?: string;
2932
+ maxRetries: number;
2933
+ idempotencyKey?: string;
2934
+ createdAt: Date;
2935
+ updatedAt: Date;
2936
+ }
2937
+ interface CreateScheduleInput extends ScheduleOriginTracking {
2938
+ organizationId: string;
2939
+ name: string;
2940
+ description?: string;
2941
+ target: ScheduleTarget;
2942
+ scheduleConfig: TaskScheduleConfig;
2943
+ maxRetries?: number;
2944
+ idempotencyKey?: string;
2945
+ metadata?: Record<string, unknown>;
2946
+ }
2947
+
2948
+ type NotificationRow = Database['public']['Tables']['notifications']['Row'];
2949
+ interface CreateNotificationParams {
2950
+ userId: string;
2951
+ organizationId: string;
2952
+ category: NotificationRow['category'];
2953
+ title: string;
2954
+ message: string;
2955
+ actionUrl?: string;
2956
+ }
2957
+
1110
2958
  /**
1111
2959
  * ResourceRegistry - Resource discovery and lookup
1112
2960
  * Handles resource definitions from OrganizationRegistry
@@ -1365,6 +3213,2498 @@ declare class ResourceRegistry {
1365
3213
  }>;
1366
3214
  }
1367
3215
 
3216
+ /**
3217
+ * Represents a web post from company website scraping.
3218
+ * Used for recent blog posts, news, or announcements.
3219
+ */
3220
+ interface WebPost {
3221
+ /** ISO date string of when the post was published */
3222
+ date: string;
3223
+ /** Title of the web post */
3224
+ title: string;
3225
+ /** Brief summary of the post content */
3226
+ summary: string;
3227
+ /** AI-generated insight about the post's relevance */
3228
+ aiInsight?: string;
3229
+ }
3230
+ /**
3231
+ * Represents a LinkedIn activity item from a contact's profile.
3232
+ * Used for personalization and understanding engagement.
3233
+ */
3234
+ interface LinkedInActivity {
3235
+ /** ISO date string of the activity */
3236
+ date: string;
3237
+ /** Content of the LinkedIn post or activity */
3238
+ content: string;
3239
+ }
3240
+ /**
3241
+ * Tracks the status of various enrichment processes.
3242
+ * Each field represents a different enrichment source.
3243
+ */
3244
+ interface EnrichmentStatus {
3245
+ /** Website scraping enrichment status */
3246
+ website?: 'pending' | 'complete' | 'failed';
3247
+ /** LinkedIn profile enrichment status */
3248
+ linkedin?: 'pending' | 'complete' | 'failed';
3249
+ /** Email validation enrichment status */
3250
+ email?: 'pending' | 'complete' | 'failed';
3251
+ /** AI personalization enrichment status */
3252
+ personalization?: 'pending' | 'complete' | 'failed';
3253
+ }
3254
+ /**
3255
+ * Acquisition list for organizing contacts and companies.
3256
+ * Transformed from AcqListRow with camelCase properties.
3257
+ */
3258
+ interface AcqList {
3259
+ id: string;
3260
+ organizationId: string;
3261
+ name: string;
3262
+ description: string | null;
3263
+ createdAt: Date;
3264
+ }
3265
+ /**
3266
+ * Company record in the acquisition database.
3267
+ * Contains enriched company data from various sources.
3268
+ * Transformed from AcqCompanyRow with camelCase properties.
3269
+ */
3270
+ interface AcqCompany {
3271
+ id: string;
3272
+ organizationId: string;
3273
+ name: string;
3274
+ domain: string | null;
3275
+ linkedinUrl: string | null;
3276
+ website: string | null;
3277
+ numEmployees: number | null;
3278
+ foundedYear: number | null;
3279
+ locationCity: string | null;
3280
+ locationState: string | null;
3281
+ missionVision: string | null;
3282
+ uniqueAttributes: string | null;
3283
+ coreOfferings: string[] | null;
3284
+ targetAudience: string | null;
3285
+ companyValues: string | null;
3286
+ businessDescription: string | null;
3287
+ recentWebPosts: WebPost[] | null;
3288
+ businessType: string | null;
3289
+ primarySegment: string | null;
3290
+ otherSegments: string[] | null;
3291
+ enrichmentStatus: EnrichmentStatus | null;
3292
+ source: string | null;
3293
+ createdAt: Date;
3294
+ updatedAt: Date;
3295
+ }
3296
+ /**
3297
+ * Contact record in the acquisition database.
3298
+ * Contains enriched contact data and personalization content.
3299
+ * Transformed from AcqContactRow with camelCase properties.
3300
+ */
3301
+ interface AcqContact {
3302
+ id: string;
3303
+ organizationId: string;
3304
+ companyId: string | null;
3305
+ email: string;
3306
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null;
3307
+ firstName: string | null;
3308
+ lastName: string | null;
3309
+ linkedinUrl: string | null;
3310
+ title: string | null;
3311
+ headline: string | null;
3312
+ liSummary: string | null;
3313
+ liPastExperience: string | null;
3314
+ liEducation: string | null;
3315
+ liActivity: LinkedInActivity[] | null;
3316
+ qualification: 'qualified' | 'disqualified' | 'pending' | null;
3317
+ filterReason: string | null;
3318
+ openingLine: string | null;
3319
+ source: string | null;
3320
+ sourceId: string | null;
3321
+ enrichmentStatus: EnrichmentStatus | null;
3322
+ /** Attio Person record ID - set when contact responds and is added to CRM */
3323
+ attioPersonId: string | null;
3324
+ createdAt: Date;
3325
+ updatedAt: Date;
3326
+ }
3327
+
3328
+ /**
3329
+ * Lead Service Types
3330
+ * CRUD operation types for the acquisition platform (lists, companies, contacts, deals)
3331
+ *
3332
+ * Implementation: apps/api/src/acquisition/lead-service.ts (LeadService class)
3333
+ */
3334
+
3335
+ interface PaginationParams {
3336
+ limit: number;
3337
+ offset: number;
3338
+ }
3339
+ interface PaginatedResult<T> {
3340
+ data: T[];
3341
+ total: number;
3342
+ limit: number;
3343
+ offset: number;
3344
+ }
3345
+ interface CreateListParams {
3346
+ organizationId: string;
3347
+ name: string;
3348
+ description?: string;
3349
+ }
3350
+ interface UpdateListParams {
3351
+ name?: string;
3352
+ description?: string;
3353
+ }
3354
+ interface CreateCompanyParams {
3355
+ organizationId: string;
3356
+ name: string;
3357
+ domain?: string;
3358
+ linkedinUrl?: string;
3359
+ website?: string;
3360
+ numEmployees?: number;
3361
+ foundedYear?: number;
3362
+ locationCity?: string;
3363
+ locationState?: string;
3364
+ source?: string;
3365
+ }
3366
+ interface UpdateCompanyParams {
3367
+ name?: string;
3368
+ domain?: string;
3369
+ linkedinUrl?: string;
3370
+ website?: string;
3371
+ numEmployees?: number;
3372
+ foundedYear?: number;
3373
+ locationCity?: string;
3374
+ locationState?: string;
3375
+ missionVision?: string;
3376
+ uniqueAttributes?: string;
3377
+ coreOfferings?: string[];
3378
+ targetAudience?: string;
3379
+ companyValues?: string;
3380
+ businessDescription?: string;
3381
+ recentWebPosts?: unknown[];
3382
+ businessType?: string;
3383
+ primarySegment?: string;
3384
+ otherSegments?: string[];
3385
+ enrichmentStatus?: Record<string, string>;
3386
+ source?: string;
3387
+ /** Attio Company record ID - set when company is added to CRM. Pass null to clear. */
3388
+ attioCompanyId?: string | null;
3389
+ }
3390
+ type UpsertCompanyParams = CreateCompanyParams;
3391
+ interface CompanyFilters {
3392
+ primarySegment?: string;
3393
+ businessType?: string;
3394
+ enrichmentStatus?: string;
3395
+ }
3396
+ interface CreateContactParams {
3397
+ organizationId: string;
3398
+ email: string;
3399
+ companyId?: string;
3400
+ firstName?: string;
3401
+ lastName?: string;
3402
+ linkedinUrl?: string;
3403
+ title?: string;
3404
+ source?: string;
3405
+ sourceId?: string;
3406
+ }
3407
+ interface UpdateContactParams {
3408
+ companyId?: string;
3409
+ emailValid?: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN';
3410
+ firstName?: string;
3411
+ lastName?: string;
3412
+ linkedinUrl?: string;
3413
+ title?: string;
3414
+ headline?: string;
3415
+ liSummary?: string;
3416
+ liPastExperience?: string;
3417
+ liEducation?: string;
3418
+ liActivity?: unknown[];
3419
+ qualification?: 'qualified' | 'disqualified' | 'pending';
3420
+ filterReason?: string;
3421
+ openingLine?: string;
3422
+ enrichmentStatus?: Record<string, string>;
3423
+ status?: 'active' | 'bounced' | 'unsubscribed';
3424
+ /** Attio Person record ID - set when contact responds and is added to CRM. Pass null to clear. */
3425
+ attioPersonId?: string | null;
3426
+ }
3427
+ type UpsertContactParams = CreateContactParams;
3428
+ interface ContactFilters {
3429
+ qualification?: 'qualified' | 'disqualified' | 'pending';
3430
+ openingLineIsNull?: boolean;
3431
+ }
3432
+ interface UpsertDealParams {
3433
+ organizationId: string;
3434
+ /** Attio Deal record ID (required link to CRM) */
3435
+ attioDealId: string;
3436
+ /** Contact email for lookup when Attio Deal ID is unknown */
3437
+ contactEmail: string;
3438
+ /** Optional contact ID for foreign key join */
3439
+ contactId?: string;
3440
+ /** Campaign list that generated this deal (FK to acq_lists) */
3441
+ sourceListId?: string;
3442
+ /** Deal origin: 'instantly', 'referral', 'inbound', 'manual' */
3443
+ sourceType?: 'instantly' | 'referral' | 'inbound' | 'manual';
3444
+ /** Optional discovery data JSONB to set on upsert */
3445
+ discoveryData?: unknown;
3446
+ /** Optional proposal data JSONB to set on upsert */
3447
+ proposalData?: unknown;
3448
+ }
3449
+ interface UpdateDiscoveryDataParams {
3450
+ organizationId: string;
3451
+ contactEmail: string;
3452
+ discoveryData: unknown;
3453
+ submittedBy?: string;
3454
+ }
3455
+ interface UpdateProposalDataParams {
3456
+ organizationId: string;
3457
+ contactEmail: string;
3458
+ proposalData: unknown;
3459
+ proposalPdfUrl?: string;
3460
+ proposalStatus?: string;
3461
+ }
3462
+ interface MarkProposalSentParams {
3463
+ organizationId: string;
3464
+ contactEmail: string;
3465
+ }
3466
+ interface MarkProposalReviewedParams {
3467
+ organizationId: string;
3468
+ contactEmail: string;
3469
+ reviewedBy: string;
3470
+ proposalData?: unknown;
3471
+ }
3472
+ interface UpdateCloseLostReasonParams {
3473
+ organizationId: string;
3474
+ attioDealId: string;
3475
+ reason: string;
3476
+ }
3477
+ interface UpdateFeesParams {
3478
+ organizationId: string;
3479
+ contactEmail?: string;
3480
+ attioDealId?: string;
3481
+ initialFee?: number;
3482
+ monthlyFee?: number;
3483
+ }
3484
+ interface SyncDealStageParams {
3485
+ organizationId: string;
3486
+ attioDealId: string;
3487
+ stage: string;
3488
+ }
3489
+ interface SetContactNurtureParams {
3490
+ organizationId: string;
3491
+ contactEmail: string;
3492
+ nurture?: boolean;
3493
+ }
3494
+ interface CancelSchedulesAndHitlByEmailParams {
3495
+ organizationId: string;
3496
+ email: string;
3497
+ }
3498
+ interface CancelHitlByDealIdParams {
3499
+ organizationId: string;
3500
+ attioDealId: string;
3501
+ }
3502
+ interface ClearDealFieldsParams {
3503
+ organizationId: string;
3504
+ contactEmail?: string;
3505
+ attioDealId?: string;
3506
+ fields: ('proposalPdfUrl' | 'proposalStatus' | 'proposalGeneratedAt' | 'initialFee' | 'monthlyFee' | 'closedLostReason' | 'closedLostAt' | 'discoveryData' | 'discoverySubmittedAt')[];
3507
+ }
3508
+ interface DeleteDealParams {
3509
+ organizationId: string;
3510
+ dealId: string;
3511
+ }
3512
+ interface AcqDeal {
3513
+ id: string;
3514
+ organizationId: string;
3515
+ attioDealId: string;
3516
+ contactEmail: string;
3517
+ cachedStage?: string | null;
3518
+ discoveryData?: Json | null;
3519
+ proposalData?: Json | null;
3520
+ proposalStatus?: string | null;
3521
+ proposalSentAt?: string | null;
3522
+ proposalPdfUrl?: string | null;
3523
+ signatureEnvelopeId?: string | null;
3524
+ sourceListId?: string | null;
3525
+ sourceType?: string | null;
3526
+ createdAt: Date;
3527
+ updatedAt: Date;
3528
+ }
3529
+ interface BulkImportParams {
3530
+ organizationId: string;
3531
+ contacts: CreateContactParams[];
3532
+ }
3533
+ interface BulkImportResult {
3534
+ created: number;
3535
+ updated: number;
3536
+ errors: Array<{
3537
+ email: string;
3538
+ error: string;
3539
+ }>;
3540
+ }
3541
+
3542
+ /**
3543
+ * Platform Storage Tool Types
3544
+ * Zod schemas and TypeScript types for storage platform tools
3545
+ */
3546
+
3547
+ /**
3548
+ * Schema for storage upload tool input
3549
+ */
3550
+ declare const StorageUploadInputSchema: z.ZodObject<{
3551
+ bucket: z.ZodString;
3552
+ path: z.ZodString;
3553
+ content: z.ZodString;
3554
+ contentType: z.ZodString;
3555
+ upsert: z.ZodOptional<z.ZodBoolean>;
3556
+ }, z.core.$strip>;
3557
+ /**
3558
+ * Schema for storage signed URL tool input
3559
+ */
3560
+ declare const StorageSignedUrlInputSchema: z.ZodObject<{
3561
+ bucket: z.ZodString;
3562
+ path: z.ZodString;
3563
+ expiresIn: z.ZodDefault<z.ZodNumber>;
3564
+ }, z.core.$strip>;
3565
+ /**
3566
+ * Schema for storage download tool input
3567
+ */
3568
+ declare const StorageDownloadInputSchema: z.ZodObject<{
3569
+ bucket: z.ZodString;
3570
+ path: z.ZodString;
3571
+ }, z.core.$strip>;
3572
+ /**
3573
+ * Schema for storage delete tool input
3574
+ */
3575
+ declare const StorageDeleteInputSchema: z.ZodObject<{
3576
+ bucket: z.ZodString;
3577
+ path: z.ZodString;
3578
+ }, z.core.$strip>;
3579
+ /**
3580
+ * Schema for storage list tool input
3581
+ */
3582
+ declare const StorageListInputSchema: z.ZodObject<{
3583
+ bucket: z.ZodString;
3584
+ prefix: z.ZodOptional<z.ZodString>;
3585
+ }, z.core.$strip>;
3586
+ /**
3587
+ * Schema for storage upload tool output
3588
+ */
3589
+ declare const StorageUploadOutputSchema: z.ZodObject<{
3590
+ success: z.ZodBoolean;
3591
+ path: z.ZodString;
3592
+ fullPath: z.ZodString;
3593
+ }, z.core.$strip>;
3594
+ /**
3595
+ * Schema for storage signed URL tool output
3596
+ */
3597
+ declare const StorageSignedUrlOutputSchema: z.ZodObject<{
3598
+ success: z.ZodBoolean;
3599
+ signedUrl: z.ZodString;
3600
+ expiresAt: z.ZodString;
3601
+ }, z.core.$strip>;
3602
+ /**
3603
+ * Schema for storage download tool output
3604
+ */
3605
+ declare const StorageDownloadOutputSchema: z.ZodObject<{
3606
+ success: z.ZodBoolean;
3607
+ content: z.ZodString;
3608
+ contentType: z.ZodOptional<z.ZodString>;
3609
+ }, z.core.$strip>;
3610
+ /**
3611
+ * Schema for storage delete tool output
3612
+ */
3613
+ declare const StorageDeleteOutputSchema: z.ZodObject<{
3614
+ success: z.ZodBoolean;
3615
+ }, z.core.$strip>;
3616
+ /**
3617
+ * Schema for storage list tool output
3618
+ */
3619
+ declare const StorageListOutputSchema: z.ZodObject<{
3620
+ success: z.ZodBoolean;
3621
+ files: z.ZodArray<z.ZodString>;
3622
+ }, z.core.$strip>;
3623
+ type StorageUploadInput = z.infer<typeof StorageUploadInputSchema>;
3624
+ type StorageSignedUrlInput = z.infer<typeof StorageSignedUrlInputSchema>;
3625
+ type StorageDownloadInput = z.infer<typeof StorageDownloadInputSchema>;
3626
+ type StorageDeleteInput = z.infer<typeof StorageDeleteInputSchema>;
3627
+ type StorageListInput = z.infer<typeof StorageListInputSchema>;
3628
+ type StorageUploadOutput = z.infer<typeof StorageUploadOutputSchema>;
3629
+ type StorageSignedUrlOutput = z.infer<typeof StorageSignedUrlOutputSchema>;
3630
+ type StorageDownloadOutput = z.infer<typeof StorageDownloadOutputSchema>;
3631
+ type StorageDeleteOutput = z.infer<typeof StorageDeleteOutputSchema>;
3632
+ type StorageListOutput = z.infer<typeof StorageListOutputSchema>;
3633
+
3634
+ /**
3635
+ * Create record parameters
3636
+ */
3637
+ interface CreateRecordParams {
3638
+ object: string;
3639
+ values: Record<string, unknown>;
3640
+ }
3641
+ /**
3642
+ * Create record result
3643
+ */
3644
+ interface CreateRecordResult {
3645
+ recordId: string;
3646
+ success: boolean;
3647
+ }
3648
+ /**
3649
+ * Update record parameters
3650
+ */
3651
+ interface UpdateRecordParams {
3652
+ object: string;
3653
+ recordId: string;
3654
+ values: Record<string, unknown>;
3655
+ }
3656
+ /**
3657
+ * Update record result
3658
+ */
3659
+ interface UpdateRecordResult {
3660
+ recordId: string;
3661
+ success: boolean;
3662
+ }
3663
+ /**
3664
+ * Filter expression (recursive type for nested filters)
3665
+ */
3666
+ type FilterExpression = {
3667
+ [attribute: string]: {
3668
+ [field: string]: {
3669
+ [operator: string]: unknown;
3670
+ };
3671
+ } | FilterExpression;
3672
+ } | {
3673
+ $and?: FilterExpression[];
3674
+ $or?: FilterExpression[];
3675
+ };
3676
+ /**
3677
+ * Sort criteria for query results
3678
+ */
3679
+ interface SortCriteria {
3680
+ attribute: string;
3681
+ direction: 'asc' | 'desc';
3682
+ field?: string;
3683
+ }
3684
+ /**
3685
+ * Query records parameters
3686
+ */
3687
+ interface QueryRecordsParams {
3688
+ object: string;
3689
+ filter?: FilterExpression;
3690
+ sorts?: SortCriteria[];
3691
+ limit?: number;
3692
+ offset?: number;
3693
+ }
3694
+ /**
3695
+ * Query records result
3696
+ */
3697
+ interface QueryRecordsResult {
3698
+ records: Array<{
3699
+ id: string;
3700
+ values: Record<string, unknown>;
3701
+ createdAt: string;
3702
+ webUrl: string;
3703
+ }>;
3704
+ hasMore: boolean;
3705
+ }
3706
+ /**
3707
+ * Get record parameters
3708
+ */
3709
+ interface GetRecordParams {
3710
+ object: string;
3711
+ recordId: string;
3712
+ }
3713
+ /**
3714
+ * Get record result
3715
+ */
3716
+ interface GetRecordResult {
3717
+ id: string;
3718
+ values: Record<string, unknown>;
3719
+ createdAt: string;
3720
+ webUrl: string;
3721
+ }
3722
+ /**
3723
+ * Delete record parameters
3724
+ */
3725
+ interface DeleteRecordParams {
3726
+ object: string;
3727
+ recordId: string;
3728
+ }
3729
+ /**
3730
+ * Delete record result
3731
+ */
3732
+ interface DeleteRecordResult {
3733
+ recordId: string;
3734
+ success: boolean;
3735
+ }
3736
+ /**
3737
+ * Attio object (table) in workspace
3738
+ */
3739
+ interface AttioObject {
3740
+ id: string;
3741
+ slug: string;
3742
+ singularNoun: string;
3743
+ pluralNoun: string;
3744
+ createdAt: string;
3745
+ }
3746
+ /**
3747
+ * Supported attribute types in Attio
3748
+ */
3749
+ type AttioAttributeType = 'text' | 'number' | 'currency' | 'select' | 'checkbox' | 'date' | 'timestamp' | 'rating' | 'email-address' | 'phone-number' | 'domain' | 'location' | 'record-reference' | 'actor-reference' | 'personal-email-address' | 'interaction';
3750
+ /**
3751
+ * Select option for select/multi-select attributes
3752
+ */
3753
+ interface SelectOption {
3754
+ id?: string;
3755
+ title: string;
3756
+ isArchived: boolean;
3757
+ }
3758
+ /**
3759
+ * Attribute configuration (type-specific)
3760
+ */
3761
+ interface AttributeConfig {
3762
+ options?: SelectOption[];
3763
+ targetObject?: string;
3764
+ currencyCode?: string;
3765
+ maxValue?: number;
3766
+ }
3767
+ /**
3768
+ * Attio attribute (field) on an object
3769
+ */
3770
+ interface AttioAttribute {
3771
+ id: string;
3772
+ slug: string;
3773
+ title: string;
3774
+ description?: string;
3775
+ type: AttioAttributeType;
3776
+ isSystemAttribute: boolean;
3777
+ isRequired: boolean;
3778
+ isUnique: boolean;
3779
+ isMultiselect: boolean;
3780
+ isArchived: boolean;
3781
+ config?: AttributeConfig;
3782
+ }
3783
+ /**
3784
+ * List objects result
3785
+ */
3786
+ interface ListObjectsResult {
3787
+ objects: AttioObject[];
3788
+ }
3789
+ /**
3790
+ * List attributes parameters
3791
+ */
3792
+ interface ListAttributesParams {
3793
+ objectSlug: string;
3794
+ }
3795
+ /**
3796
+ * List attributes result
3797
+ */
3798
+ interface ListAttributesResult {
3799
+ attributes: AttioAttribute[];
3800
+ }
3801
+ /**
3802
+ * Create attribute parameters
3803
+ */
3804
+ interface CreateAttributeParams {
3805
+ objectSlug: string;
3806
+ title: string;
3807
+ apiSlug: string;
3808
+ type: AttioAttributeType;
3809
+ description?: string;
3810
+ isRequired?: boolean;
3811
+ isUnique?: boolean;
3812
+ isMultiselect?: boolean;
3813
+ config?: AttributeConfig;
3814
+ }
3815
+ /**
3816
+ * Create attribute result
3817
+ */
3818
+ interface CreateAttributeResult {
3819
+ attributeId: string;
3820
+ slug: string;
3821
+ success: boolean;
3822
+ }
3823
+ /**
3824
+ * Update attribute parameters
3825
+ */
3826
+ interface UpdateAttributeParams {
3827
+ objectSlug: string;
3828
+ attributeSlug: string;
3829
+ title?: string;
3830
+ description?: string;
3831
+ isRequired?: boolean;
3832
+ isArchived?: boolean;
3833
+ config?: AttributeConfig;
3834
+ }
3835
+ /**
3836
+ * Update attribute result
3837
+ */
3838
+ interface UpdateAttributeResult {
3839
+ attributeId: string;
3840
+ slug: string;
3841
+ success: boolean;
3842
+ }
3843
+ /**
3844
+ * Note format options
3845
+ */
3846
+ type NoteFormat = 'plaintext' | 'markdown';
3847
+ /**
3848
+ * Create note parameters
3849
+ */
3850
+ interface CreateNoteParams {
3851
+ parentObject: string;
3852
+ parentRecordId: string;
3853
+ title: string;
3854
+ format: NoteFormat;
3855
+ content: string;
3856
+ createdAt?: string;
3857
+ }
3858
+ /**
3859
+ * Create note result
3860
+ */
3861
+ interface CreateNoteResult {
3862
+ noteId: string;
3863
+ success: boolean;
3864
+ }
3865
+ /**
3866
+ * List notes parameters
3867
+ */
3868
+ interface ListNotesParams {
3869
+ parentObject: string;
3870
+ parentRecordId: string;
3871
+ }
3872
+ /**
3873
+ * List notes result
3874
+ */
3875
+ interface ListNotesResult {
3876
+ notes: Array<{
3877
+ noteId: string;
3878
+ title: string;
3879
+ createdAt: string;
3880
+ }>;
3881
+ success: boolean;
3882
+ }
3883
+ /**
3884
+ * Delete note parameters
3885
+ */
3886
+ interface DeleteNoteParams {
3887
+ noteId: string;
3888
+ }
3889
+ /**
3890
+ * Delete note result
3891
+ */
3892
+ interface DeleteNoteResult {
3893
+ noteId: string;
3894
+ success: boolean;
3895
+ }
3896
+
3897
+ /**
3898
+ * Shared Apify param/result types (browser-safe)
3899
+ *
3900
+ * These types define the public interface for Apify operations -- used by both
3901
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
3902
+ * dependencies and are safe to import in any environment.
3903
+ *
3904
+ * Server-internal types (credentials, retry logic) remain in
3905
+ * server/adapters/apify/fetch/run-actor/index.ts
3906
+ */
3907
+ /**
3908
+ * Run actor parameters
3909
+ */
3910
+ interface RunActorParams {
3911
+ actorId: string;
3912
+ input?: Record<string, unknown>;
3913
+ timeoutSecs?: number;
3914
+ pollIntervalSecs?: number;
3915
+ maxItems?: number;
3916
+ }
3917
+ /**
3918
+ * Run actor result
3919
+ */
3920
+ interface RunActorResult {
3921
+ status: 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'TIMED_OUT';
3922
+ runId: string;
3923
+ datasetId: string;
3924
+ items: unknown[];
3925
+ totalCount: number;
3926
+ executionTimeMs: number;
3927
+ }
3928
+
3929
+ /**
3930
+ * Shared Dropbox param/result types (browser-safe)
3931
+ *
3932
+ * These types define the public interface for Dropbox operations -- used by both
3933
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
3934
+ * dependencies and are safe to import in any environment.
3935
+ *
3936
+ * Uses Uint8Array instead of Buffer for browser safety.
3937
+ *
3938
+ * Server-internal types (credentials, error handling) remain in
3939
+ * server/adapters/dropbox/fetch/
3940
+ */
3941
+ /**
3942
+ * Upload file parameters
3943
+ */
3944
+ interface UploadFileParams {
3945
+ path: string;
3946
+ contents: Uint8Array;
3947
+ mode?: 'add' | 'overwrite';
3948
+ autorename?: boolean;
3949
+ }
3950
+ /**
3951
+ * Upload file result
3952
+ */
3953
+ interface UploadFileResult {
3954
+ id: string;
3955
+ name: string;
3956
+ path_lower: string;
3957
+ path_display: string;
3958
+ rev: string;
3959
+ size: number;
3960
+ is_downloadable: boolean;
3961
+ content_hash?: string;
3962
+ }
3963
+ /**
3964
+ * Create folder parameters
3965
+ */
3966
+ interface CreateFolderParams {
3967
+ path: string;
3968
+ autorename?: boolean;
3969
+ }
3970
+ /**
3971
+ * Create folder result
3972
+ */
3973
+ interface CreateFolderResult {
3974
+ metadata: {
3975
+ id: string;
3976
+ name: string;
3977
+ path_lower: string;
3978
+ path_display: string;
3979
+ } | null;
3980
+ }
3981
+
3982
+ /**
3983
+ * Shared Gmail param/result types (browser-safe)
3984
+ *
3985
+ * These types define the public interface for Gmail operations -- used by both
3986
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
3987
+ * dependencies and are safe to import in any environment.
3988
+ *
3989
+ * Prefixed with "Gmail" to avoid collision with Resend types.
3990
+ *
3991
+ * Server-internal types (OAuth credentials, API response shapes) remain in
3992
+ * server/adapters/gmail/gmail-adapter.ts
3993
+ */
3994
+ /**
3995
+ * Send email parameters
3996
+ */
3997
+ interface GmailSendEmailParams {
3998
+ to: string;
3999
+ subject: string;
4000
+ body: string;
4001
+ cc?: string;
4002
+ from?: string;
4003
+ }
4004
+ /**
4005
+ * Send email result
4006
+ */
4007
+ interface GmailSendEmailResult {
4008
+ messageId: string;
4009
+ threadId: string;
4010
+ }
4011
+
4012
+ /**
4013
+ * Shared Google Sheets param/result types (browser-safe)
4014
+ *
4015
+ * These types define the public interface for Google Sheets operations -- used by both
4016
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4017
+ * dependencies and are safe to import in any environment.
4018
+ *
4019
+ * Server-internal types (credentials, API response shapes) remain in
4020
+ * server/adapters/google-sheets/google-sheets-adapter.ts
4021
+ */
4022
+ /**
4023
+ * Sheet information within a spreadsheet
4024
+ */
4025
+ interface SheetInfo {
4026
+ sheetId: number;
4027
+ title: string;
4028
+ index: number;
4029
+ }
4030
+ /**
4031
+ * Read sheet parameters
4032
+ */
4033
+ interface ReadSheetParams {
4034
+ spreadsheetId: string;
4035
+ range: string;
4036
+ }
4037
+ /**
4038
+ * Read sheet result
4039
+ */
4040
+ interface ReadSheetResult {
4041
+ values: string[][];
4042
+ }
4043
+ /**
4044
+ * Write sheet parameters
4045
+ */
4046
+ interface WriteSheetParams {
4047
+ spreadsheetId: string;
4048
+ range: string;
4049
+ values: string[][];
4050
+ }
4051
+ /**
4052
+ * Write sheet result
4053
+ */
4054
+ interface WriteSheetResult {
4055
+ updatedCells: number;
4056
+ }
4057
+ /**
4058
+ * Append rows parameters
4059
+ */
4060
+ interface AppendRowsParams {
4061
+ spreadsheetId: string;
4062
+ range: string;
4063
+ values: string[][];
4064
+ }
4065
+ /**
4066
+ * Append rows result
4067
+ */
4068
+ interface AppendRowsResult {
4069
+ updatedRows: number;
4070
+ }
4071
+ /**
4072
+ * Clear range parameters
4073
+ */
4074
+ interface ClearRangeParams {
4075
+ spreadsheetId: string;
4076
+ range: string;
4077
+ }
4078
+ /**
4079
+ * Clear range result
4080
+ */
4081
+ interface ClearRangeResult {
4082
+ clearedRange: string;
4083
+ }
4084
+ /**
4085
+ * Get spreadsheet metadata parameters
4086
+ */
4087
+ interface GetSpreadsheetMetadataParams {
4088
+ spreadsheetId: string;
4089
+ }
4090
+ /**
4091
+ * Get spreadsheet metadata result
4092
+ */
4093
+ interface GetSpreadsheetMetadataResult {
4094
+ title: string;
4095
+ sheets: SheetInfo[];
4096
+ }
4097
+ /**
4098
+ * Batch update parameters
4099
+ */
4100
+ interface BatchUpdateParams {
4101
+ spreadsheetId: string;
4102
+ data: Array<{
4103
+ range: string;
4104
+ values: string[][];
4105
+ }>;
4106
+ }
4107
+ /**
4108
+ * Batch update result
4109
+ */
4110
+ interface BatchUpdateResult {
4111
+ totalUpdatedCells: number;
4112
+ totalUpdatedRows: number;
4113
+ }
4114
+ /**
4115
+ * Get headers parameters
4116
+ */
4117
+ interface GetHeadersParams {
4118
+ spreadsheetId: string;
4119
+ sheetName: string;
4120
+ }
4121
+ /**
4122
+ * Get headers result
4123
+ */
4124
+ interface GetHeadersResult {
4125
+ headers: string[];
4126
+ columnCount: number;
4127
+ columnMap: Record<string, string>;
4128
+ }
4129
+ /**
4130
+ * Get last row parameters
4131
+ */
4132
+ interface GetLastRowParams {
4133
+ spreadsheetId: string;
4134
+ sheetName: string;
4135
+ column?: string;
4136
+ }
4137
+ /**
4138
+ * Get last row result
4139
+ */
4140
+ interface GetLastRowResult {
4141
+ lastRow: number;
4142
+ isEmpty: boolean;
4143
+ }
4144
+ /**
4145
+ * Get row by value parameters
4146
+ */
4147
+ interface GetRowByValueParams {
4148
+ spreadsheetId: string;
4149
+ sheetName: string;
4150
+ searchColumn: string;
4151
+ searchValue: string;
4152
+ }
4153
+ /**
4154
+ * Get row by value result
4155
+ */
4156
+ interface GetRowByValueResult {
4157
+ found: boolean;
4158
+ rowNumber: number | null;
4159
+ rowData: string[] | null;
4160
+ headers: string[];
4161
+ }
4162
+ /**
4163
+ * Update row by value parameters
4164
+ */
4165
+ interface UpdateRowByValueParams {
4166
+ spreadsheetId: string;
4167
+ sheetName: string;
4168
+ searchColumn: string;
4169
+ searchValue: string;
4170
+ updates: Record<string, string>;
4171
+ }
4172
+ /**
4173
+ * Update row by value result
4174
+ */
4175
+ interface UpdateRowByValueResult {
4176
+ found: boolean;
4177
+ rowNumber: number | null;
4178
+ updatedCells: number;
4179
+ }
4180
+ /**
4181
+ * Upsert row parameters
4182
+ */
4183
+ interface UpsertRowParams {
4184
+ spreadsheetId: string;
4185
+ sheetName: string;
4186
+ keyColumn: string;
4187
+ keyValue: string;
4188
+ rowData: Record<string, string>;
4189
+ }
4190
+ /**
4191
+ * Upsert row result
4192
+ */
4193
+ interface UpsertRowResult {
4194
+ action: 'inserted' | 'updated';
4195
+ rowNumber: number;
4196
+ updatedCells: number;
4197
+ }
4198
+ /**
4199
+ * Filter rows parameters
4200
+ */
4201
+ interface FilterRowsParams {
4202
+ spreadsheetId: string;
4203
+ sheetName: string;
4204
+ filterColumn: string;
4205
+ filterValue: string;
4206
+ operator?: 'equals' | 'contains' | 'startsWith' | 'endsWith';
4207
+ }
4208
+ /**
4209
+ * Filter rows result
4210
+ */
4211
+ interface FilterRowsResult {
4212
+ rows: Array<{
4213
+ rowNumber: number;
4214
+ data: string[];
4215
+ }>;
4216
+ matchCount: number;
4217
+ headers: string[];
4218
+ }
4219
+ /**
4220
+ * Delete row by value parameters
4221
+ */
4222
+ interface DeleteRowByValueParams {
4223
+ spreadsheetId: string;
4224
+ sheetName: string;
4225
+ searchColumn: string;
4226
+ searchValue: string;
4227
+ }
4228
+ /**
4229
+ * Delete row by value result
4230
+ */
4231
+ interface DeleteRowByValueResult {
4232
+ found: boolean;
4233
+ deletedRowNumber: number | null;
4234
+ }
4235
+
4236
+ /**
4237
+ * Shared Instantly param/result types (browser-safe)
4238
+ *
4239
+ * These types define the public interface for Instantly operations -- used by both
4240
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4241
+ * dependencies and are safe to import in any environment.
4242
+ *
4243
+ * Preserves snake_case field names to match server-side API expectations.
4244
+ *
4245
+ * Server-internal types (credentials, error handling) remain in
4246
+ * server/adapters/instantly/
4247
+ */
4248
+ /**
4249
+ * Send reply parameters
4250
+ */
4251
+ interface SendReplyParams {
4252
+ eaccount: string;
4253
+ reply_to_uuid: string;
4254
+ subject: string;
4255
+ body: {
4256
+ text?: string;
4257
+ html?: string;
4258
+ };
4259
+ timestamp?: string;
4260
+ }
4261
+ /**
4262
+ * Send reply result
4263
+ */
4264
+ interface SendReplyResult {
4265
+ success: boolean;
4266
+ email_id: string;
4267
+ thread_id: string;
4268
+ sent_at: string;
4269
+ }
4270
+ /**
4271
+ * Remove from subsequence parameters
4272
+ */
4273
+ interface RemoveFromSubsequenceParams {
4274
+ lead_email: string;
4275
+ campaign_id: string;
4276
+ }
4277
+ /**
4278
+ * Remove from subsequence result
4279
+ */
4280
+ interface RemoveFromSubsequenceResult {
4281
+ success: boolean;
4282
+ lead_email: string;
4283
+ campaign_id: string;
4284
+ }
4285
+ /**
4286
+ * Get emails parameters
4287
+ */
4288
+ interface GetEmailsParams {
4289
+ email_id?: string;
4290
+ search?: string;
4291
+ campaign_id?: string;
4292
+ lead?: string;
4293
+ email_type?: 'received' | 'sent' | 'manual';
4294
+ eaccount?: string;
4295
+ sort_order?: 'asc' | 'desc';
4296
+ preview_only?: boolean;
4297
+ is_unread?: boolean;
4298
+ limit?: number;
4299
+ starting_after?: string;
4300
+ }
4301
+ /**
4302
+ * Get emails result
4303
+ */
4304
+ interface GetEmailsResult {
4305
+ emails: unknown[];
4306
+ total_count: number;
4307
+ next_starting_after?: string;
4308
+ }
4309
+ /**
4310
+ * Update interest status parameters
4311
+ */
4312
+ interface UpdateInterestStatusParams {
4313
+ lead_email: string;
4314
+ interest_value: number;
4315
+ campaign_id?: string;
4316
+ disable_auto_interest?: boolean;
4317
+ }
4318
+ /**
4319
+ * Update interest status result
4320
+ */
4321
+ interface UpdateInterestStatusResult {
4322
+ success: boolean;
4323
+ lead_email: string;
4324
+ }
4325
+ /**
4326
+ * Lead entry for add to campaign
4327
+ */
4328
+ interface AddToCampaignLead {
4329
+ email: string;
4330
+ first_name?: string;
4331
+ last_name?: string;
4332
+ company_name?: string;
4333
+ }
4334
+ /**
4335
+ * Add to campaign parameters
4336
+ */
4337
+ interface AddToCampaignParams {
4338
+ campaign_id: string;
4339
+ leads: AddToCampaignLead[];
4340
+ }
4341
+ /**
4342
+ * Add to campaign result
4343
+ */
4344
+ interface AddToCampaignResult {
4345
+ success: boolean;
4346
+ added_count: number;
4347
+ errors?: string[];
4348
+ }
4349
+
4350
+ /**
4351
+ * Shared Mailso param/result types (browser-safe)
4352
+ *
4353
+ * These types define the public interface for Mails.so operations -- used by both
4354
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4355
+ * dependencies and are safe to import in any environment.
4356
+ *
4357
+ * Server-internal types (API response shapes, credentials) remain in
4358
+ * server/adapters/mailso/fetch/utils/types.ts
4359
+ */
4360
+ /**
4361
+ * Verify email parameters
4362
+ */
4363
+ interface MailsoVerifyEmailParams {
4364
+ email: string;
4365
+ }
4366
+ /**
4367
+ * Verify email result (normalized, camelCase)
4368
+ */
4369
+ interface MailsoVerifyEmailResult {
4370
+ email: string;
4371
+ result: 'deliverable' | 'undeliverable' | 'risky' | 'unknown';
4372
+ score: number;
4373
+ reason: string;
4374
+ isValidFormat: boolean;
4375
+ isValidDomain: boolean;
4376
+ isValidMx: boolean;
4377
+ isNotBlocklisted: boolean;
4378
+ isNotCatchAll: boolean;
4379
+ isNotGeneric: boolean;
4380
+ isFree: boolean;
4381
+ domain: string | null;
4382
+ mxRecord: string | null;
4383
+ }
4384
+
4385
+ /**
4386
+ * Shared Notion param/result types (browser-safe)
4387
+ *
4388
+ * These types define the public interface for Notion operations -- used by both
4389
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4390
+ * dependencies and are safe to import in any environment.
4391
+ *
4392
+ * Server-internal types (API response shapes, credentials) remain in
4393
+ * server/adapters/notion/notion-page-adapter.ts
4394
+ */
4395
+ /**
4396
+ * Page with recursive children (for listAllPages)
4397
+ */
4398
+ interface PageWithChildren {
4399
+ id: string;
4400
+ title: string;
4401
+ children?: PageWithChildren[];
4402
+ }
4403
+ /**
4404
+ * List all pages result
4405
+ */
4406
+ interface ListAllPagesResult {
4407
+ pages: PageWithChildren[];
4408
+ }
4409
+ /**
4410
+ * Read page parameters
4411
+ */
4412
+ interface ReadPageParams {
4413
+ pageId: string;
4414
+ }
4415
+ /**
4416
+ * Read page result
4417
+ */
4418
+ interface ReadPageResult {
4419
+ id: string;
4420
+ title: string;
4421
+ content: string;
4422
+ }
4423
+ /**
4424
+ * Create page parameters
4425
+ */
4426
+ interface CreatePageParams {
4427
+ title: string;
4428
+ content: string;
4429
+ parentId: string;
4430
+ }
4431
+ /**
4432
+ * Create page result
4433
+ */
4434
+ interface CreatePageResult {
4435
+ id: string;
4436
+ url: string;
4437
+ }
4438
+ /**
4439
+ * Update page title parameters
4440
+ */
4441
+ interface UpdatePageTitleParams {
4442
+ pageId: string;
4443
+ title: string;
4444
+ }
4445
+ /**
4446
+ * Update page title result
4447
+ */
4448
+ interface UpdatePageTitleResult {
4449
+ id: string;
4450
+ url: string;
4451
+ }
4452
+ /**
4453
+ * Append blocks parameters
4454
+ */
4455
+ interface AppendBlocksParams {
4456
+ pageId: string;
4457
+ content: string;
4458
+ }
4459
+ /**
4460
+ * Append blocks result
4461
+ */
4462
+ interface AppendBlocksResult {
4463
+ pageId: string;
4464
+ blocksAdded: number;
4465
+ url: string;
4466
+ }
4467
+ /**
4468
+ * Update blocks parameters (batch)
4469
+ */
4470
+ interface UpdateBlocksParams {
4471
+ pageId: string;
4472
+ blocks: Record<string, string>;
4473
+ }
4474
+ /**
4475
+ * Update blocks result
4476
+ */
4477
+ interface UpdateBlocksResult {
4478
+ updatedCount: number;
4479
+ failedCount: number;
4480
+ errors?: Array<{
4481
+ blockId: string;
4482
+ error: string;
4483
+ }>;
4484
+ }
4485
+ /**
4486
+ * Delete page parameters
4487
+ */
4488
+ interface DeletePageParams {
4489
+ pageId: string;
4490
+ }
4491
+ /**
4492
+ * Delete page result
4493
+ */
4494
+ interface DeletePageResult {
4495
+ id: string;
4496
+ archived: boolean;
4497
+ }
4498
+ /**
4499
+ * Delete blocks parameters
4500
+ */
4501
+ interface DeleteBlocksParams {
4502
+ blockIds: string[];
4503
+ }
4504
+ /**
4505
+ * Delete blocks result
4506
+ */
4507
+ interface DeleteBlocksResult {
4508
+ deletedCount: number;
4509
+ failedCount: number;
4510
+ errors?: Array<{
4511
+ blockId: string;
4512
+ error: string;
4513
+ }>;
4514
+ }
4515
+
4516
+ /**
4517
+ * Shared Resend param/result types (browser-safe)
4518
+ *
4519
+ * These types define the public interface for Resend email operations -- used by both
4520
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4521
+ * dependencies and are safe to import in any environment.
4522
+ *
4523
+ * Prefixed with "Resend" to avoid collision with Gmail types.
4524
+ *
4525
+ * Server-internal types (API response shapes, credentials) remain in
4526
+ * server/adapters/resend/fetch/utils/types.ts
4527
+ */
4528
+ /**
4529
+ * Send email parameters
4530
+ */
4531
+ interface ResendSendEmailParams {
4532
+ from: string;
4533
+ to: string | string[];
4534
+ subject: string;
4535
+ html?: string;
4536
+ text?: string;
4537
+ replyTo?: string | string[];
4538
+ cc?: string | string[];
4539
+ bcc?: string | string[];
4540
+ headers?: Record<string, string>;
4541
+ tags?: Array<{
4542
+ name: string;
4543
+ value: string;
4544
+ }>;
4545
+ }
4546
+ /**
4547
+ * Send email result
4548
+ */
4549
+ interface ResendSendEmailResult {
4550
+ id: string;
4551
+ success: boolean;
4552
+ }
4553
+ /**
4554
+ * Get email parameters
4555
+ */
4556
+ interface ResendGetEmailParams {
4557
+ emailId: string;
4558
+ }
4559
+ /**
4560
+ * Get email result
4561
+ */
4562
+ interface ResendGetEmailResult {
4563
+ id: string;
4564
+ to: string[];
4565
+ from: string;
4566
+ subject: string;
4567
+ lastEvent: string;
4568
+ createdAt: string;
4569
+ }
4570
+
4571
+ /**
4572
+ * Shared SignatureAPI param/result types (browser-safe)
4573
+ *
4574
+ * These types define the public interface for SignatureAPI eSignature operations --
4575
+ * used by both the server-side adapter and the SDK typed wrappers. They contain
4576
+ * zero Node.js dependencies and are safe to import in any environment.
4577
+ *
4578
+ * Uses Uint8Array instead of Buffer for browser safety.
4579
+ *
4580
+ * Server-internal types (API response shapes, credentials) remain in
4581
+ * server/adapters/signature-api/fetch/utils/types.ts
4582
+ */
4583
+ /**
4584
+ * Valid SignatureAPI field types
4585
+ */
4586
+ type SignatureApiFieldType = 'signature' | 'initials' | 'recipient_completed_date' | 'envelope_completed_date' | 'recipient_name' | 'recipient_email' | 'text' | 'text_input' | 'boxed_text_input' | 'multi_line_text_input' | 'checkbox' | 'dropdown';
4587
+ /**
4588
+ * Signing place configuration
4589
+ */
4590
+ interface SigningPlace {
4591
+ recipientKey: string;
4592
+ type: SignatureApiFieldType;
4593
+ page: number;
4594
+ x: number;
4595
+ y: number;
4596
+ width?: number;
4597
+ height?: number;
4598
+ fontColor?: string;
4599
+ }
4600
+ /**
4601
+ * Document for signing
4602
+ */
4603
+ interface EnvelopeDocument {
4604
+ name: string;
4605
+ url: string;
4606
+ places?: SigningPlace[];
4607
+ }
4608
+ /**
4609
+ * Recipient/signer configuration
4610
+ */
4611
+ interface Recipient {
4612
+ key: string;
4613
+ type: 'signer' | 'viewer' | 'approver';
4614
+ name: string;
4615
+ email: string;
4616
+ language?: string;
4617
+ }
4618
+ /**
4619
+ * Create envelope parameters
4620
+ */
4621
+ interface CreateEnvelopeParams {
4622
+ title: string;
4623
+ message?: string;
4624
+ documents: EnvelopeDocument[];
4625
+ recipients: Recipient[];
4626
+ metadata?: Record<string, string>;
4627
+ webhookUrl?: string;
4628
+ routing?: 'parallel' | 'sequential';
4629
+ }
4630
+ /**
4631
+ * Create envelope result
4632
+ */
4633
+ interface CreateEnvelopeResult {
4634
+ id: string;
4635
+ status: string;
4636
+ signingUrl?: string;
4637
+ }
4638
+ /**
4639
+ * Void envelope parameters
4640
+ */
4641
+ interface VoidEnvelopeParams {
4642
+ envelopeId: string;
4643
+ reason?: string;
4644
+ }
4645
+ /**
4646
+ * Void envelope result
4647
+ */
4648
+ interface VoidEnvelopeResult {
4649
+ id: string;
4650
+ status: 'voided';
4651
+ }
4652
+ /**
4653
+ * Download document parameters
4654
+ */
4655
+ interface DownloadDocumentParams {
4656
+ envelopeId: string;
4657
+ documentType?: 'combined' | 'original' | 'audit';
4658
+ }
4659
+ /**
4660
+ * Download document result (Uint8Array for browser safety)
4661
+ */
4662
+ interface DownloadDocumentResult {
4663
+ content: Uint8Array;
4664
+ contentType: string;
4665
+ filename: string;
4666
+ }
4667
+ /**
4668
+ * Get envelope parameters
4669
+ */
4670
+ interface GetEnvelopeParams {
4671
+ envelopeId: string;
4672
+ }
4673
+ /**
4674
+ * Get envelope result
4675
+ */
4676
+ interface GetEnvelopeResult {
4677
+ id: string;
4678
+ title: string;
4679
+ status: 'processing' | 'pending' | 'completed' | 'declined' | 'voided';
4680
+ createdAt: string;
4681
+ completedAt?: string;
4682
+ metadata: Record<string, string>;
4683
+ recipients: Array<{
4684
+ key: string;
4685
+ name: string;
4686
+ email: string;
4687
+ status: 'pending' | 'signed' | 'declined';
4688
+ signedAt?: string;
4689
+ }>;
4690
+ }
4691
+
4692
+ /**
4693
+ * Shared Stripe param/result types (browser-safe)
4694
+ *
4695
+ * These types define the public interface for Stripe operations -- used by both
4696
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4697
+ * dependencies and are safe to import in any environment.
4698
+ *
4699
+ * Server-internal types (API response shapes, credentials) remain in
4700
+ * server/adapters/stripe/fetch/utils/types.ts
4701
+ */
4702
+ /**
4703
+ * Create payment link parameters
4704
+ */
4705
+ interface CreatePaymentLinkParams {
4706
+ priceId: string;
4707
+ quantity?: number;
4708
+ metadata?: Record<string, string>;
4709
+ afterCompletionType?: 'redirect' | 'hosted_confirmation';
4710
+ redirectUrl?: string;
4711
+ allowPromotionCodes?: boolean;
4712
+ automaticTax?: boolean;
4713
+ billingAddressCollection?: 'auto' | 'required';
4714
+ invoiceCreation?: boolean;
4715
+ }
4716
+ /**
4717
+ * Create payment link result
4718
+ */
4719
+ interface CreatePaymentLinkResult {
4720
+ id: string;
4721
+ url: string;
4722
+ active: boolean;
4723
+ livemode: boolean;
4724
+ }
4725
+ /**
4726
+ * Get payment link parameters
4727
+ */
4728
+ interface GetPaymentLinkParams {
4729
+ paymentLinkId: string;
4730
+ }
4731
+ /**
4732
+ * Get payment link result
4733
+ */
4734
+ interface GetPaymentLinkResult {
4735
+ id: string;
4736
+ url: string;
4737
+ active: boolean;
4738
+ livemode: boolean;
4739
+ metadata: Record<string, string>;
4740
+ }
4741
+ /**
4742
+ * Update payment link parameters
4743
+ */
4744
+ interface UpdatePaymentLinkParams {
4745
+ paymentLinkId: string;
4746
+ active?: boolean;
4747
+ metadata?: Record<string, string>;
4748
+ }
4749
+ /**
4750
+ * Update payment link result
4751
+ */
4752
+ interface UpdatePaymentLinkResult {
4753
+ id: string;
4754
+ active: boolean;
4755
+ url: string;
4756
+ }
4757
+ /**
4758
+ * List payment links parameters
4759
+ */
4760
+ interface ListPaymentLinksParams {
4761
+ active?: boolean;
4762
+ limit?: number;
4763
+ startingAfter?: string;
4764
+ endingBefore?: string;
4765
+ }
4766
+ /**
4767
+ * List payment links result
4768
+ */
4769
+ interface ListPaymentLinksResult {
4770
+ data: Array<{
4771
+ id: string;
4772
+ url: string;
4773
+ active: boolean;
4774
+ metadata: Record<string, string>;
4775
+ }>;
4776
+ hasMore: boolean;
4777
+ }
4778
+ /**
4779
+ * Create auto payment link parameters
4780
+ */
4781
+ interface CreateAutoPaymentLinkParams {
4782
+ dealId: string;
4783
+ attioDealId: string;
4784
+ companyName: string;
4785
+ contactEmail: string;
4786
+ initialFee: number;
4787
+ monthlyFee: number;
4788
+ }
4789
+ /**
4790
+ * Create auto payment link result
4791
+ */
4792
+ interface CreateAutoPaymentLinkResult {
4793
+ paymentLinkId: string;
4794
+ url: string;
4795
+ hasInitialFee: boolean;
4796
+ hasRecurring: boolean;
4797
+ }
4798
+ /**
4799
+ * Create checkout session parameters
4800
+ */
4801
+ interface CreateCheckoutSessionParams {
4802
+ amount: number;
4803
+ currency?: string;
4804
+ productName?: string;
4805
+ productDescription?: string;
4806
+ metadata?: Record<string, string>;
4807
+ successUrl: string;
4808
+ cancelUrl: string;
4809
+ customerEmail?: string;
4810
+ }
4811
+ /**
4812
+ * Create checkout session result
4813
+ */
4814
+ interface CreateCheckoutSessionResult {
4815
+ id: string;
4816
+ url: string;
4817
+ expiresAt: number;
4818
+ }
4819
+
4820
+ /**
4821
+ * Shared Trello param/result types (browser-safe)
4822
+ *
4823
+ * These types define the public interface for Trello operations -- used by both
4824
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
4825
+ * dependencies and are safe to import in any environment.
4826
+ *
4827
+ * Server-internal types (credentials, Zod schemas) remain in
4828
+ * server/adapters/trello/
4829
+ */
4830
+ /**
4831
+ * Get board parameters
4832
+ */
4833
+ interface GetBoardParams {
4834
+ id: string;
4835
+ }
4836
+ /**
4837
+ * Get board result
4838
+ */
4839
+ interface GetBoardResult {
4840
+ id: string;
4841
+ name: string;
4842
+ desc: string;
4843
+ url: string;
4844
+ shortUrl: string;
4845
+ closed: boolean;
4846
+ }
4847
+ /**
4848
+ * Get lists parameters
4849
+ */
4850
+ interface GetListsParams {
4851
+ boardId: string;
4852
+ filter?: 'all' | 'open' | 'closed';
4853
+ }
4854
+ /**
4855
+ * Get lists result
4856
+ */
4857
+ interface GetListsResult {
4858
+ lists: Array<{
4859
+ id: string;
4860
+ name: string;
4861
+ closed: boolean;
4862
+ pos: number;
4863
+ idBoard: string;
4864
+ }>;
4865
+ }
4866
+ /**
4867
+ * Get cards parameters
4868
+ */
4869
+ interface GetCardsParams {
4870
+ listId: string;
4871
+ }
4872
+ /**
4873
+ * Get cards result
4874
+ */
4875
+ interface GetCardsResult {
4876
+ cards: Array<{
4877
+ id: string;
4878
+ name: string;
4879
+ desc: string;
4880
+ closed: boolean;
4881
+ due: string | null;
4882
+ url: string;
4883
+ shortUrl: string;
4884
+ idList: string;
4885
+ idBoard: string;
4886
+ }>;
4887
+ }
4888
+ /**
4889
+ * Create card parameters
4890
+ */
4891
+ interface CreateCardParams {
4892
+ name: string;
4893
+ idList: string;
4894
+ desc?: string;
4895
+ pos?: 'top' | 'bottom' | number;
4896
+ due?: string;
4897
+ idMembers?: string[];
4898
+ idLabels?: string[];
4899
+ }
4900
+ /**
4901
+ * Create card result
4902
+ */
4903
+ interface CreateCardResult {
4904
+ id: string;
4905
+ name: string;
4906
+ url: string;
4907
+ shortUrl: string;
4908
+ }
4909
+ /**
4910
+ * Update card parameters
4911
+ */
4912
+ interface UpdateCardParams {
4913
+ id: string;
4914
+ name?: string;
4915
+ desc?: string;
4916
+ closed?: boolean;
4917
+ idList?: string;
4918
+ due?: string;
4919
+ pos?: 'top' | 'bottom' | number;
4920
+ idMembers?: string[];
4921
+ idLabels?: string[];
4922
+ }
4923
+ /**
4924
+ * Update card result
4925
+ */
4926
+ interface UpdateCardResult {
4927
+ id: string;
4928
+ name: string;
4929
+ url: string;
4930
+ success: boolean;
4931
+ }
4932
+ /**
4933
+ * Create list parameters
4934
+ *
4935
+ * Prefixed with "Trello" to avoid collision with the Lead Service CreateListParams
4936
+ * exported from the same barrel (execution/index.ts).
4937
+ */
4938
+ interface TrelloCreateListParams {
4939
+ name: string;
4940
+ idBoard: string;
4941
+ pos?: 'top' | 'bottom' | number;
4942
+ }
4943
+ /**
4944
+ * Create list result
4945
+ */
4946
+ interface TrelloCreateListResult {
4947
+ id: string;
4948
+ name: string;
4949
+ closed: boolean;
4950
+ pos: number;
4951
+ idBoard: string;
4952
+ }
4953
+ /**
4954
+ * Create checklist parameters
4955
+ */
4956
+ interface CreateChecklistParams {
4957
+ idCard: string;
4958
+ name: string;
4959
+ pos?: 'top' | 'bottom' | number;
4960
+ }
4961
+ /**
4962
+ * Create checklist result
4963
+ */
4964
+ interface CreateChecklistResult {
4965
+ id: string;
4966
+ name: string;
4967
+ idCard: string;
4968
+ }
4969
+ /**
4970
+ * Add checklist item parameters
4971
+ */
4972
+ interface AddChecklistItemParams {
4973
+ idChecklist: string;
4974
+ name: string;
4975
+ pos?: 'top' | 'bottom' | number;
4976
+ checked?: boolean;
4977
+ }
4978
+ /**
4979
+ * Add checklist item result
4980
+ */
4981
+ interface AddChecklistItemResult {
4982
+ id: string;
4983
+ name: string;
4984
+ state: 'complete' | 'incomplete';
4985
+ idChecklist: string;
4986
+ }
4987
+ /**
4988
+ * Update checklist item parameters
4989
+ */
4990
+ interface UpdateChecklistItemParams {
4991
+ idCard: string;
4992
+ idCheckItem: string;
4993
+ state?: 'complete' | 'incomplete';
4994
+ name?: string;
4995
+ pos?: 'top' | 'bottom' | number;
4996
+ }
4997
+ /**
4998
+ * Update checklist item result
4999
+ */
5000
+ interface UpdateChecklistItemResult {
5001
+ id: string;
5002
+ name: string;
5003
+ state: 'complete' | 'incomplete';
5004
+ success: boolean;
5005
+ }
5006
+ /**
5007
+ * Get card checklists parameters
5008
+ */
5009
+ interface GetCardChecklistsParams {
5010
+ idCard: string;
5011
+ }
5012
+ /**
5013
+ * Get card checklists result
5014
+ */
5015
+ interface GetCardChecklistsResult {
5016
+ checklists: Array<{
5017
+ id: string;
5018
+ name: string;
5019
+ idCard: string;
5020
+ checkItems: Array<{
5021
+ id: string;
5022
+ name: string;
5023
+ state: 'complete' | 'incomplete';
5024
+ pos: number;
5025
+ }>;
5026
+ }>;
5027
+ }
5028
+
5029
+ /**
5030
+ * Tool Method Maps
5031
+ *
5032
+ * Single source of truth for tool -> method -> params -> result type mappings.
5033
+ * Used by SDK adapters (compile-time typed wrappers) and optionally by the
5034
+ * server-side dispatcher for type checking.
5035
+ *
5036
+ * Browser-safe: no Node.js imports, pure type definitions.
5037
+ */
5038
+
5039
+ /** A single method entry: what params go in, what result comes out */
5040
+ interface MethodEntry {
5041
+ params: unknown;
5042
+ result: unknown;
5043
+ }
5044
+ /** A tool's complete method map: method name -> MethodEntry */
5045
+ type ToolMethodMap = Record<string, MethodEntry>;
5046
+ type AttioToolMap = {
5047
+ createRecord: {
5048
+ params: CreateRecordParams;
5049
+ result: CreateRecordResult;
5050
+ };
5051
+ updateRecord: {
5052
+ params: UpdateRecordParams;
5053
+ result: UpdateRecordResult;
5054
+ };
5055
+ listRecords: {
5056
+ params: QueryRecordsParams;
5057
+ result: QueryRecordsResult;
5058
+ };
5059
+ getRecord: {
5060
+ params: GetRecordParams;
5061
+ result: GetRecordResult;
5062
+ };
5063
+ deleteRecord: {
5064
+ params: DeleteRecordParams;
5065
+ result: DeleteRecordResult;
5066
+ };
5067
+ listObjects: {
5068
+ params: Record<string, never>;
5069
+ result: ListObjectsResult;
5070
+ };
5071
+ listAttributes: {
5072
+ params: ListAttributesParams;
5073
+ result: ListAttributesResult;
5074
+ };
5075
+ createAttribute: {
5076
+ params: CreateAttributeParams;
5077
+ result: CreateAttributeResult;
5078
+ };
5079
+ updateAttribute: {
5080
+ params: UpdateAttributeParams;
5081
+ result: UpdateAttributeResult;
5082
+ };
5083
+ createNote: {
5084
+ params: CreateNoteParams;
5085
+ result: CreateNoteResult;
5086
+ };
5087
+ listNotes: {
5088
+ params: ListNotesParams;
5089
+ result: ListNotesResult;
5090
+ };
5091
+ deleteNote: {
5092
+ params: DeleteNoteParams;
5093
+ result: DeleteNoteResult;
5094
+ };
5095
+ };
5096
+ type SchedulerToolMap = {
5097
+ createSchedule: {
5098
+ params: CreateScheduleInput;
5099
+ result: TaskSchedule;
5100
+ };
5101
+ updateAnchor: {
5102
+ params: {
5103
+ scheduleId: string;
5104
+ anchorAt: string;
5105
+ };
5106
+ result: TaskSchedule;
5107
+ };
5108
+ deleteSchedule: {
5109
+ params: {
5110
+ scheduleId: string;
5111
+ };
5112
+ result: void;
5113
+ };
5114
+ findByIdempotencyKey: {
5115
+ params: {
5116
+ idempotencyKey: string;
5117
+ };
5118
+ result: TaskSchedule | null;
5119
+ };
5120
+ deleteScheduleByIdempotencyKey: {
5121
+ params: {
5122
+ idempotencyKey: string;
5123
+ };
5124
+ result: void;
5125
+ };
5126
+ listSchedules: {
5127
+ params: {
5128
+ status?: string;
5129
+ limit?: number;
5130
+ offset?: number;
5131
+ };
5132
+ result: TaskSchedule[];
5133
+ };
5134
+ getSchedule: {
5135
+ params: {
5136
+ scheduleId: string;
5137
+ };
5138
+ result: TaskSchedule;
5139
+ };
5140
+ cancelSchedule: {
5141
+ params: {
5142
+ scheduleId: string;
5143
+ };
5144
+ result: void;
5145
+ };
5146
+ cancelSchedulesByMetadata: {
5147
+ params: {
5148
+ metadata: Record<string, unknown>;
5149
+ };
5150
+ result: {
5151
+ cancelledCount: number;
5152
+ };
5153
+ };
5154
+ };
5155
+ type StorageToolMap = {
5156
+ upload: {
5157
+ params: StorageUploadInput;
5158
+ result: StorageUploadOutput;
5159
+ };
5160
+ download: {
5161
+ params: StorageDownloadInput;
5162
+ result: StorageDownloadOutput;
5163
+ };
5164
+ createSignedUrl: {
5165
+ params: StorageSignedUrlInput;
5166
+ result: StorageSignedUrlOutput;
5167
+ };
5168
+ delete: {
5169
+ params: StorageDeleteInput;
5170
+ result: StorageDeleteOutput;
5171
+ };
5172
+ list: {
5173
+ params: StorageListInput;
5174
+ result: StorageListOutput;
5175
+ };
5176
+ };
5177
+ /**
5178
+ * SDK-side notification input.
5179
+ * Omits userId and organizationId which are injected server-side from execution context.
5180
+ */
5181
+ type NotificationSDKInput = Omit<CreateNotificationParams, 'userId' | 'organizationId'>;
5182
+ type NotificationToolMap = {
5183
+ create: {
5184
+ params: NotificationSDKInput;
5185
+ result: void;
5186
+ };
5187
+ };
5188
+ type StripeToolMap = {
5189
+ createPaymentLink: {
5190
+ params: CreatePaymentLinkParams;
5191
+ result: CreatePaymentLinkResult;
5192
+ };
5193
+ getPaymentLink: {
5194
+ params: GetPaymentLinkParams;
5195
+ result: GetPaymentLinkResult;
5196
+ };
5197
+ updatePaymentLink: {
5198
+ params: UpdatePaymentLinkParams;
5199
+ result: UpdatePaymentLinkResult;
5200
+ };
5201
+ listPaymentLinks: {
5202
+ params: ListPaymentLinksParams;
5203
+ result: ListPaymentLinksResult;
5204
+ };
5205
+ createAutoPaymentLink: {
5206
+ params: CreateAutoPaymentLinkParams;
5207
+ result: CreateAutoPaymentLinkResult;
5208
+ };
5209
+ createCheckoutSession: {
5210
+ params: CreateCheckoutSessionParams;
5211
+ result: CreateCheckoutSessionResult;
5212
+ };
5213
+ };
5214
+ type NotionToolMap = {
5215
+ listAllPages: {
5216
+ params: Record<string, never>;
5217
+ result: ListAllPagesResult;
5218
+ };
5219
+ readPage: {
5220
+ params: ReadPageParams;
5221
+ result: ReadPageResult;
5222
+ };
5223
+ createPage: {
5224
+ params: CreatePageParams;
5225
+ result: CreatePageResult;
5226
+ };
5227
+ updatePageTitle: {
5228
+ params: UpdatePageTitleParams;
5229
+ result: UpdatePageTitleResult;
5230
+ };
5231
+ appendBlocks: {
5232
+ params: AppendBlocksParams;
5233
+ result: AppendBlocksResult;
5234
+ };
5235
+ updateBlocks: {
5236
+ params: UpdateBlocksParams;
5237
+ result: UpdateBlocksResult;
5238
+ };
5239
+ deletePage: {
5240
+ params: DeletePageParams;
5241
+ result: DeletePageResult;
5242
+ };
5243
+ deleteBlocks: {
5244
+ params: DeleteBlocksParams;
5245
+ result: DeleteBlocksResult;
5246
+ };
5247
+ };
5248
+ type GoogleSheetsToolMap = {
5249
+ readSheet: {
5250
+ params: ReadSheetParams;
5251
+ result: ReadSheetResult;
5252
+ };
5253
+ writeSheet: {
5254
+ params: WriteSheetParams;
5255
+ result: WriteSheetResult;
5256
+ };
5257
+ appendRows: {
5258
+ params: AppendRowsParams;
5259
+ result: AppendRowsResult;
5260
+ };
5261
+ clearRange: {
5262
+ params: ClearRangeParams;
5263
+ result: ClearRangeResult;
5264
+ };
5265
+ getSpreadsheetMetadata: {
5266
+ params: GetSpreadsheetMetadataParams;
5267
+ result: GetSpreadsheetMetadataResult;
5268
+ };
5269
+ batchUpdate: {
5270
+ params: BatchUpdateParams;
5271
+ result: BatchUpdateResult;
5272
+ };
5273
+ getHeaders: {
5274
+ params: GetHeadersParams;
5275
+ result: GetHeadersResult;
5276
+ };
5277
+ getLastRow: {
5278
+ params: GetLastRowParams;
5279
+ result: GetLastRowResult;
5280
+ };
5281
+ getRowByValue: {
5282
+ params: GetRowByValueParams;
5283
+ result: GetRowByValueResult;
5284
+ };
5285
+ updateRowByValue: {
5286
+ params: UpdateRowByValueParams;
5287
+ result: UpdateRowByValueResult;
5288
+ };
5289
+ upsertRow: {
5290
+ params: UpsertRowParams;
5291
+ result: UpsertRowResult;
5292
+ };
5293
+ filterRows: {
5294
+ params: FilterRowsParams;
5295
+ result: FilterRowsResult;
5296
+ };
5297
+ deleteRowByValue: {
5298
+ params: DeleteRowByValueParams;
5299
+ result: DeleteRowByValueResult;
5300
+ };
5301
+ };
5302
+ type ResendToolMap = {
5303
+ sendEmail: {
5304
+ params: ResendSendEmailParams;
5305
+ result: ResendSendEmailResult;
5306
+ };
5307
+ getEmail: {
5308
+ params: ResendGetEmailParams;
5309
+ result: ResendGetEmailResult;
5310
+ };
5311
+ };
5312
+ type ApifyToolMap = {
5313
+ runActor: {
5314
+ params: RunActorParams;
5315
+ result: RunActorResult;
5316
+ };
5317
+ };
5318
+ type GmailToolMap = {
5319
+ sendEmail: {
5320
+ params: GmailSendEmailParams;
5321
+ result: GmailSendEmailResult;
5322
+ };
5323
+ };
5324
+ type DropboxToolMap = {
5325
+ uploadFile: {
5326
+ params: UploadFileParams;
5327
+ result: UploadFileResult;
5328
+ };
5329
+ createFolder: {
5330
+ params: CreateFolderParams;
5331
+ result: CreateFolderResult;
5332
+ };
5333
+ };
5334
+ type TrelloToolMap = {
5335
+ getBoard: {
5336
+ params: GetBoardParams;
5337
+ result: GetBoardResult;
5338
+ };
5339
+ getLists: {
5340
+ params: GetListsParams;
5341
+ result: GetListsResult;
5342
+ };
5343
+ getCards: {
5344
+ params: GetCardsParams;
5345
+ result: GetCardsResult;
5346
+ };
5347
+ createCard: {
5348
+ params: CreateCardParams;
5349
+ result: CreateCardResult;
5350
+ };
5351
+ updateCard: {
5352
+ params: UpdateCardParams;
5353
+ result: UpdateCardResult;
5354
+ };
5355
+ createList: {
5356
+ params: TrelloCreateListParams;
5357
+ result: TrelloCreateListResult;
5358
+ };
5359
+ createChecklist: {
5360
+ params: CreateChecklistParams;
5361
+ result: CreateChecklistResult;
5362
+ };
5363
+ addChecklistItem: {
5364
+ params: AddChecklistItemParams;
5365
+ result: AddChecklistItemResult;
5366
+ };
5367
+ updateChecklistItem: {
5368
+ params: UpdateChecklistItemParams;
5369
+ result: UpdateChecklistItemResult;
5370
+ };
5371
+ getCardChecklists: {
5372
+ params: GetCardChecklistsParams;
5373
+ result: GetCardChecklistsResult;
5374
+ };
5375
+ };
5376
+ type SignatureApiToolMap = {
5377
+ createEnvelope: {
5378
+ params: CreateEnvelopeParams;
5379
+ result: CreateEnvelopeResult;
5380
+ };
5381
+ voidEnvelope: {
5382
+ params: VoidEnvelopeParams;
5383
+ result: VoidEnvelopeResult;
5384
+ };
5385
+ downloadDocument: {
5386
+ params: DownloadDocumentParams;
5387
+ result: DownloadDocumentResult;
5388
+ };
5389
+ getEnvelope: {
5390
+ params: GetEnvelopeParams;
5391
+ result: GetEnvelopeResult;
5392
+ };
5393
+ };
5394
+ type InstantlyToolMap = {
5395
+ sendReply: {
5396
+ params: SendReplyParams;
5397
+ result: SendReplyResult;
5398
+ };
5399
+ removeFromSubsequence: {
5400
+ params: RemoveFromSubsequenceParams;
5401
+ result: RemoveFromSubsequenceResult;
5402
+ };
5403
+ getEmails: {
5404
+ params: GetEmailsParams;
5405
+ result: GetEmailsResult;
5406
+ };
5407
+ updateInterestStatus: {
5408
+ params: UpdateInterestStatusParams;
5409
+ result: UpdateInterestStatusResult;
5410
+ };
5411
+ addToCampaign: {
5412
+ params: AddToCampaignParams;
5413
+ result: AddToCampaignResult;
5414
+ };
5415
+ };
5416
+ type MailsoToolMap = {
5417
+ verifyEmail: {
5418
+ params: MailsoVerifyEmailParams;
5419
+ result: MailsoVerifyEmailResult;
5420
+ };
5421
+ };
5422
+ type LeadToolMap = {
5423
+ listLists: {
5424
+ params: Record<string, never>;
5425
+ result: AcqList[];
5426
+ };
5427
+ createList: {
5428
+ params: Omit<CreateListParams, 'organizationId'>;
5429
+ result: AcqList;
5430
+ };
5431
+ updateList: {
5432
+ params: {
5433
+ id: string;
5434
+ } & UpdateListParams;
5435
+ result: AcqList;
5436
+ };
5437
+ deleteList: {
5438
+ params: {
5439
+ id: string;
5440
+ };
5441
+ result: void;
5442
+ };
5443
+ createCompany: {
5444
+ params: Omit<CreateCompanyParams, 'organizationId'>;
5445
+ result: AcqCompany;
5446
+ };
5447
+ upsertCompany: {
5448
+ params: Omit<UpsertCompanyParams, 'organizationId'>;
5449
+ result: AcqCompany;
5450
+ };
5451
+ updateCompany: {
5452
+ params: {
5453
+ id: string;
5454
+ } & UpdateCompanyParams;
5455
+ result: AcqCompany;
5456
+ };
5457
+ getCompany: {
5458
+ params: {
5459
+ id: string;
5460
+ };
5461
+ result: AcqCompany | null;
5462
+ };
5463
+ listCompanies: {
5464
+ params: {
5465
+ filters?: CompanyFilters;
5466
+ };
5467
+ result: AcqCompany[];
5468
+ };
5469
+ deleteCompany: {
5470
+ params: {
5471
+ id: string;
5472
+ };
5473
+ result: void;
5474
+ };
5475
+ createContact: {
5476
+ params: Omit<CreateContactParams, 'organizationId'>;
5477
+ result: AcqContact;
5478
+ };
5479
+ upsertContact: {
5480
+ params: Omit<UpsertContactParams, 'organizationId'>;
5481
+ result: AcqContact;
5482
+ };
5483
+ updateContact: {
5484
+ params: {
5485
+ id: string;
5486
+ } & UpdateContactParams;
5487
+ result: AcqContact;
5488
+ };
5489
+ getContact: {
5490
+ params: {
5491
+ id: string;
5492
+ };
5493
+ result: AcqContact | null;
5494
+ };
5495
+ getContactByEmail: {
5496
+ params: {
5497
+ email: string;
5498
+ };
5499
+ result: AcqContact | null;
5500
+ };
5501
+ listContacts: {
5502
+ params: {
5503
+ filters?: ContactFilters;
5504
+ pagination?: PaginationParams;
5505
+ };
5506
+ result: PaginatedResult<AcqContact>;
5507
+ };
5508
+ deleteContact: {
5509
+ params: {
5510
+ id: string;
5511
+ };
5512
+ result: void;
5513
+ };
5514
+ bulkImportContacts: {
5515
+ params: Omit<BulkImportParams, 'organizationId'>;
5516
+ result: BulkImportResult;
5517
+ };
5518
+ upsertDeal: {
5519
+ params: Omit<UpsertDealParams, 'organizationId'>;
5520
+ result: AcqDeal;
5521
+ };
5522
+ getDealByEmail: {
5523
+ params: {
5524
+ email: string;
5525
+ };
5526
+ result: AcqDeal | null;
5527
+ };
5528
+ getDealByEnvelopeId: {
5529
+ params: {
5530
+ envelopeId: string;
5531
+ };
5532
+ result: AcqDeal | null;
5533
+ };
5534
+ updateDealEnvelopeId: {
5535
+ params: {
5536
+ attioDealId: string;
5537
+ envelopeId: string;
5538
+ };
5539
+ result: AcqDeal | null;
5540
+ };
5541
+ getDealByAttioId: {
5542
+ params: {
5543
+ attioDealId: string;
5544
+ };
5545
+ result: AcqDeal | null;
5546
+ };
5547
+ updateDiscoveryData: {
5548
+ params: Omit<UpdateDiscoveryDataParams, 'organizationId'>;
5549
+ result: void;
5550
+ };
5551
+ updateProposalData: {
5552
+ params: Omit<UpdateProposalDataParams, 'organizationId'>;
5553
+ result: void;
5554
+ };
5555
+ markProposalSent: {
5556
+ params: Omit<MarkProposalSentParams, 'organizationId'>;
5557
+ result: void;
5558
+ };
5559
+ markProposalReviewed: {
5560
+ params: Omit<MarkProposalReviewedParams, 'organizationId'>;
5561
+ result: void;
5562
+ };
5563
+ updateCloseLostReason: {
5564
+ params: Omit<UpdateCloseLostReasonParams, 'organizationId'>;
5565
+ result: void;
5566
+ };
5567
+ updateFees: {
5568
+ params: Omit<UpdateFeesParams, 'organizationId'>;
5569
+ result: void;
5570
+ };
5571
+ syncDealStage: {
5572
+ params: Omit<SyncDealStageParams, 'organizationId'>;
5573
+ result: void;
5574
+ };
5575
+ setContactNurture: {
5576
+ params: Omit<SetContactNurtureParams, 'organizationId'>;
5577
+ result: void;
5578
+ };
5579
+ cancelSchedulesAndHitlByEmail: {
5580
+ params: Omit<CancelSchedulesAndHitlByEmailParams, 'organizationId'>;
5581
+ result: {
5582
+ schedulesCancelled: number;
5583
+ hitlDeleted: number;
5584
+ };
5585
+ };
5586
+ cancelHitlByDealId: {
5587
+ params: Omit<CancelHitlByDealIdParams, 'organizationId'>;
5588
+ result: {
5589
+ hitlDeleted: number;
5590
+ };
5591
+ };
5592
+ clearDealFields: {
5593
+ params: Omit<ClearDealFieldsParams, 'organizationId'>;
5594
+ result: void;
5595
+ };
5596
+ deleteDeal: {
5597
+ params: Omit<DeleteDealParams, 'organizationId'>;
5598
+ result: void;
5599
+ };
5600
+ };
5601
+ type PdfToolMap = {
5602
+ render: {
5603
+ params: {
5604
+ document: Record<string, unknown>;
5605
+ theme?: Record<string, unknown>;
5606
+ storage: {
5607
+ bucket: string;
5608
+ path: string;
5609
+ };
5610
+ };
5611
+ result: {
5612
+ success: boolean;
5613
+ pdfUrl: string;
5614
+ size: number;
5615
+ };
5616
+ };
5617
+ renderToBuffer: {
5618
+ params: {
5619
+ document: Record<string, unknown>;
5620
+ theme?: Record<string, unknown>;
5621
+ };
5622
+ result: {
5623
+ buffer: string;
5624
+ };
5625
+ };
5626
+ };
5627
+ type ApprovalToolMap = {
5628
+ create: {
5629
+ params: {
5630
+ actions: Array<{
5631
+ id: string;
5632
+ label: string;
5633
+ type: 'primary' | 'secondary' | 'danger' | 'outline';
5634
+ icon?: string;
5635
+ color?: string;
5636
+ target?: {
5637
+ resourceType: 'agent' | 'workflow';
5638
+ resourceId: string;
5639
+ sessionId?: string;
5640
+ };
5641
+ form?: Record<string, unknown>;
5642
+ requiresConfirmation?: boolean;
5643
+ confirmationMessage?: string;
5644
+ description?: string;
5645
+ }>;
5646
+ context: unknown;
5647
+ description?: string;
5648
+ priority?: number;
5649
+ humanCheckpoint?: string;
5650
+ metadata?: Record<string, unknown>;
5651
+ expiresAt?: string;
5652
+ };
5653
+ result: {
5654
+ id: string;
5655
+ };
5656
+ };
5657
+ deleteByMetadata: {
5658
+ params: {
5659
+ metadata: Record<string, unknown>;
5660
+ status?: string;
5661
+ };
5662
+ result: {
5663
+ deleted: number;
5664
+ };
5665
+ };
5666
+ };
5667
+ type ExecutionToolMap = {
5668
+ trigger: {
5669
+ params: {
5670
+ resourceId: string;
5671
+ input?: unknown;
5672
+ };
5673
+ result: {
5674
+ success: boolean;
5675
+ executionId: string;
5676
+ output: unknown;
5677
+ error?: string;
5678
+ };
5679
+ };
5680
+ };
5681
+ type EmailToolMap = {
5682
+ send: {
5683
+ params: {
5684
+ subject: string;
5685
+ html?: string;
5686
+ text?: string;
5687
+ userIds?: string[];
5688
+ targetRole?: string;
5689
+ targetAll?: boolean;
5690
+ replyTo?: string;
5691
+ tags?: Array<{
5692
+ name: string;
5693
+ value: string;
5694
+ }>;
5695
+ };
5696
+ result: {
5697
+ sent: number;
5698
+ failed: number;
5699
+ errors?: Array<{
5700
+ userId: string;
5701
+ email: string;
5702
+ error: string;
5703
+ }>;
5704
+ };
5705
+ };
5706
+ };
5707
+
1368
5708
  /**
1369
5709
  * MetricsCollector
1370
5710
  * Tracks execution timing and ROI metrics
@@ -2015,4 +6355,4 @@ declare class ToolingError extends ExecutionError {
2015
6355
  }
2016
6356
 
2017
6357
  export { ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError };
2018
- export type { AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, ConditionalNext, Contract, DomainDefinition, ElevasConfig, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, FormField, FormFieldType, FormSchema, IntegrationDefinition, LLMAdapterFactory, LLMModel, LinearNext, ModelConfig, NextConfig, OrganizationResources, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceStatus, ResourceType, ScheduleTriggerConfig, StepHandler, Tool, ToolExecutionOptions, ToolingErrorType, TriggerConfig, TriggerDefinition, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep };
6358
+ export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddChecklistItemParams, AddChecklistItemResult, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, ApifyToolMap, AppendBlocksParams, AppendBlocksResult, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCardParams, CreateCardResult, CreateChecklistParams, CreateChecklistResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePageParams, CreatePageResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteBlocksParams, DeleteBlocksResult, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeletePageParams, DeletePageResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetBoardParams, GetBoardResult, GetCardChecklistsParams, GetCardChecklistsResult, GetCardsParams, GetCardsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetListsParams, GetListsResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAllPagesResult, ListAttributesParams, ListAttributesResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, MailsoToolMap, MailsoVerifyEmailParams, MailsoVerifyEmailResult, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, NotionToolMap, OrganizationResources, PageWithChildren, PaginatedResult, PaginationParams$1 as PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadPageParams, ReadPageResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceStatus, ResourceType, RunActorParams, RunActorResult, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TrelloCreateListParams, TrelloCreateListResult, TrelloToolMap, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateBlocksParams, UpdateBlocksResult, UpdateCardParams, UpdateCardResult, UpdateChecklistItemParams, UpdateChecklistItemResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePageTitleParams, UpdatePageTitleResult, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };