@elevasis/sdk 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/cli.cjs +2325 -124
  2. package/dist/index.d.ts +882 -794
  3. package/dist/index.js +170 -46
  4. package/dist/node/index.d.ts +69 -0
  5. package/dist/node/index.js +273 -0
  6. package/dist/test-utils/index.d.ts +857 -711
  7. package/dist/test-utils/index.js +2 -0
  8. package/dist/types/worker/adapters/lead.d.ts +1 -1
  9. package/dist/types/worker/platform.d.ts +2 -9
  10. package/dist/worker/index.js +1 -0
  11. package/package.json +12 -3
  12. package/reference/_navigation.md +23 -1
  13. package/reference/_reference-manifest.json +98 -0
  14. package/reference/claude-config/rules/agent-start-here.md +13 -0
  15. package/reference/claude-config/rules/organization-model.md +40 -40
  16. package/reference/claude-config/rules/organization-os.md +16 -16
  17. package/reference/claude-config/rules/ui.md +2 -6
  18. package/reference/claude-config/rules/vibe.md +13 -13
  19. package/reference/claude-config/skills/knowledge/SKILL.md +253 -0
  20. package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-a.md +100 -100
  21. package/reference/claude-config/skills/{configure → knowledge}/operations/codify-level-b.md +158 -158
  22. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -0
  23. package/reference/claude-config/skills/knowledge/operations/features.md +113 -0
  24. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -0
  25. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -0
  26. package/reference/claude-config/skills/knowledge/operations/labels.md +89 -0
  27. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -0
  28. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -0
  29. package/reference/claude-config/skills/knowledge/operations/techStack.md +102 -0
  30. package/reference/claude-config/skills/run-ui/SKILL.md +73 -0
  31. package/reference/claude-config/skills/setup/SKILL.md +270 -270
  32. package/reference/claude-config/skills/tutorial/SKILL.md +249 -0
  33. package/reference/claude-config/skills/tutorial/progress-template.md +74 -0
  34. package/reference/claude-config/skills/tutorial/technical.md +1309 -0
  35. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -0
  36. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -0
  37. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -0
  38. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -0
  39. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -0
  40. package/reference/deployment/index.mdx +5 -5
  41. package/reference/examples/organization-model.ts +40 -0
  42. package/reference/framework/index.mdx +1 -1
  43. package/reference/framework/tutorial-system.mdx +86 -173
  44. package/reference/packages/core/src/knowledge/README.md +32 -0
  45. package/reference/packages/ui/src/knowledge/README.md +31 -0
  46. package/reference/packages/ui/src/theme/presets/README.md +19 -0
  47. package/reference/scaffold/core/organization-model.mdx +1 -1
  48. package/reference/scaffold/recipes/add-a-feature.md +1 -1
  49. package/reference/scaffold/recipes/customize-crm-actions.md +3 -3
  50. package/reference/scaffold/recipes/customize-organization-model.md +3 -3
  51. package/reference/scaffold/recipes/extend-crm.md +12 -8
  52. package/reference/scaffold/recipes/extend-lead-gen.md +129 -20
  53. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +1 -1
  54. package/reference/scaffold/recipes/index.md +6 -0
  55. package/reference/scaffold/reference/contracts.md +829 -595
  56. package/reference/scaffold/reference/feature-registry.md +2 -1
  57. package/reference/scaffold/ui/composition-extensibility.mdx +17 -0
  58. package/reference/claude-config/skills/configure/SKILL.md +0 -98
  59. package/reference/claude-config/skills/configure/operations/customers.md +0 -150
  60. package/reference/claude-config/skills/configure/operations/features.md +0 -162
  61. package/reference/claude-config/skills/configure/operations/goals.md +0 -147
  62. package/reference/claude-config/skills/configure/operations/identity.md +0 -133
  63. package/reference/claude-config/skills/configure/operations/labels.md +0 -128
  64. package/reference/claude-config/skills/configure/operations/offerings.md +0 -159
  65. package/reference/claude-config/skills/configure/operations/roles.md +0 -153
  66. package/reference/claude-config/skills/configure/operations/techStack.md +0 -139
package/dist/index.d.ts CHANGED
@@ -21,6 +21,16 @@ import { z } from 'zod';
21
21
  * @module validation
22
22
  */
23
23
 
24
+ /**
25
+ * Validates email format (RFC 5322)
26
+ *
27
+ * Security: Prevents email header injection, validates format before sending
28
+ *
29
+ * @example
30
+ * EmailSchema.parse('user@example.com') // OK
31
+ * EmailSchema.parse('invalid') // Error: Invalid email
32
+ */
33
+ declare const EmailSchema: z.ZodString;
24
34
  /**
25
35
  * Standard pagination parameters
26
36
  *
@@ -290,56 +300,6 @@ interface IExecutionLogger {
290
300
  error(message: string, context?: LogContext): void;
291
301
  }
292
302
 
293
- /**
294
- * Shared form field types for dynamic form generation
295
- * Used by: Command Queue, Execution Runner UI, future form-based features
296
- */
297
- /**
298
- * Supported form field types for action payloads
299
- * Maps to Mantine form components
300
- */
301
- type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
302
- /**
303
- * Form field definition
304
- */
305
- interface FormField {
306
- /** Field key in payload object */
307
- name: string;
308
- /** Field label for UI */
309
- label: string;
310
- /** Field type (determines UI component) */
311
- type: FormFieldType;
312
- /** Default value */
313
- defaultValue?: unknown;
314
- /** Required field */
315
- required?: boolean;
316
- /** Placeholder text */
317
- placeholder?: string;
318
- /** Help text */
319
- description?: string;
320
- /** Options for select/radio */
321
- options?: Array<{
322
- label: string;
323
- value: string | number;
324
- }>;
325
- /** Min/max for number */
326
- min?: number;
327
- max?: number;
328
- /** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
329
- defaultValueFromContext?: string;
330
- }
331
- /**
332
- * Form schema for action payload collection
333
- */
334
- interface FormSchema {
335
- /** Form title */
336
- title?: string;
337
- /** Form description */
338
- description?: string;
339
- /** Form fields */
340
- fields: FormField[];
341
- }
342
-
343
303
  /**
344
304
  * Serialized Registry Types
345
305
  *
@@ -347,67 +307,6 @@ interface FormSchema {
347
307
  * Serialization happens once at API startup, enabling instant response times.
348
308
  */
349
309
 
350
- /**
351
- * Serialized form field for API responses
352
- */
353
- interface SerializedFormField {
354
- name: string;
355
- label: string;
356
- type: FormFieldType;
357
- defaultValue?: unknown;
358
- required?: boolean;
359
- placeholder?: string;
360
- description?: string;
361
- options?: Array<{
362
- label: string;
363
- value: string | number;
364
- }>;
365
- min?: number;
366
- max?: number;
367
- }
368
- /**
369
- * Serialized form schema for API responses
370
- */
371
- interface SerializedFormSchema {
372
- title?: string;
373
- description?: string;
374
- fields: SerializedFormField[];
375
- layout?: 'vertical' | 'horizontal' | 'grid';
376
- }
377
- /**
378
- * Serialized execution form schema for API responses
379
- */
380
- interface SerializedExecutionFormSchema extends SerializedFormSchema {
381
- fieldMappings?: Record<string, string>;
382
- submitButton?: {
383
- label?: string;
384
- loadingLabel?: string;
385
- confirmMessage?: string;
386
- };
387
- }
388
- /**
389
- * Serialized schedule config for API responses
390
- */
391
- interface SerializedScheduleConfig {
392
- enabled: boolean;
393
- defaultSchedule?: string;
394
- allowedPatterns?: string[];
395
- }
396
- /**
397
- * Serialized webhook config for API responses
398
- */
399
- interface SerializedWebhookConfig {
400
- enabled: boolean;
401
- payloadSchema?: unknown;
402
- }
403
- /**
404
- * Serialized execution interface for API responses
405
- */
406
- interface SerializedExecutionInterface {
407
- form: SerializedExecutionFormSchema;
408
- schedule?: SerializedScheduleConfig;
409
- webhook?: SerializedWebhookConfig;
410
- }
411
310
  /**
412
311
  * Serialized agent definition (JSON-safe)
413
312
  * Result of serializeDefinition(AgentDefinition)
@@ -463,7 +362,6 @@ interface SerializedAgentDefinition {
463
362
  }>;
464
363
  };
465
364
  metricsConfig?: object;
466
- interface?: SerializedExecutionInterface;
467
365
  }
468
366
  /**
469
367
  * Serialized workflow definition (JSON-safe)
@@ -503,7 +401,6 @@ interface SerializedWorkflowDefinition {
503
401
  outputSchema?: object;
504
402
  };
505
403
  metricsConfig?: object;
506
- interface?: SerializedExecutionInterface;
507
404
  }
508
405
 
509
406
  /**
@@ -604,6 +501,56 @@ interface ModelConfig {
604
501
  modelOptions?: ModelSpecificOptions;
605
502
  }
606
503
 
504
+ /**
505
+ * Shared form field types for dynamic form generation
506
+ * Used by: Command Queue, Execution Runner UI, future form-based features
507
+ */
508
+ /**
509
+ * Supported form field types for action payloads
510
+ * Maps to Mantine form components
511
+ */
512
+ type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
513
+ /**
514
+ * Form field definition
515
+ */
516
+ interface FormField {
517
+ /** Field key in payload object */
518
+ name: string;
519
+ /** Field label for UI */
520
+ label: string;
521
+ /** Field type (determines UI component) */
522
+ type: FormFieldType;
523
+ /** Default value */
524
+ defaultValue?: unknown;
525
+ /** Required field */
526
+ required?: boolean;
527
+ /** Placeholder text */
528
+ placeholder?: string;
529
+ /** Help text */
530
+ description?: string;
531
+ /** Options for select/radio */
532
+ options?: Array<{
533
+ label: string;
534
+ value: string | number;
535
+ }>;
536
+ /** Min/max for number */
537
+ min?: number;
538
+ max?: number;
539
+ /** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
540
+ defaultValueFromContext?: string;
541
+ }
542
+ /**
543
+ * Form schema for action payload collection
544
+ */
545
+ interface FormSchema {
546
+ /** Form title */
547
+ title?: string;
548
+ /** Form description */
549
+ description?: string;
550
+ /** Form fields */
551
+ fields: FormField[];
552
+ }
553
+
607
554
  /**
608
555
  * Execution interface configuration
609
556
  * Defines how a resource is executed via the UI (forms, scheduling, webhooks)
@@ -661,6 +608,8 @@ interface WebhookConfig {
661
608
 
662
609
  interface WorkflowConfig extends ResourceDefinition {
663
610
  type: 'workflow';
611
+ /** Lead-gen capability key for registry derivation (e.g. 'lead-gen.company.apollo-import') */
612
+ capabilityKey?: string;
664
613
  }
665
614
  interface WorkflowStepDefinition {
666
615
  id: string;
@@ -1114,7 +1063,7 @@ type Json = string | number | boolean | null | {
1114
1063
  } | Json[];
1115
1064
  type Database = {
1116
1065
  __InternalSupabase: {
1117
- PostgrestVersion: '12.2.3 (519615d)';
1066
+ PostgrestVersion: "12.2.3 (519615d)";
1118
1067
  };
1119
1068
  public: {
1120
1069
  Tables: {
@@ -1157,11 +1106,11 @@ type Database = {
1157
1106
  };
1158
1107
  Relationships: [
1159
1108
  {
1160
- foreignKeyName: 'acq_artifacts_organization_id_fkey';
1161
- columns: ['organization_id'];
1109
+ foreignKeyName: "acq_artifacts_organization_id_fkey";
1110
+ columns: ["organization_id"];
1162
1111
  isOneToOne: false;
1163
- referencedRelation: 'organizations';
1164
- referencedColumns: ['id'];
1112
+ referencedRelation: "organizations";
1113
+ referencedColumns: ["id"];
1165
1114
  }
1166
1115
  ];
1167
1116
  };
@@ -1246,11 +1195,11 @@ type Database = {
1246
1195
  };
1247
1196
  Relationships: [
1248
1197
  {
1249
- foreignKeyName: 'acq_companies_organization_id_fkey';
1250
- columns: ['organization_id'];
1198
+ foreignKeyName: "acq_companies_organization_id_fkey";
1199
+ columns: ["organization_id"];
1251
1200
  isOneToOne: false;
1252
- referencedRelation: 'organizations';
1253
- referencedColumns: ['id'];
1201
+ referencedRelation: "organizations";
1202
+ referencedColumns: ["id"];
1254
1203
  }
1255
1204
  ];
1256
1205
  };
@@ -1341,18 +1290,18 @@ type Database = {
1341
1290
  };
1342
1291
  Relationships: [
1343
1292
  {
1344
- foreignKeyName: 'acq_contacts_company_id_fkey';
1345
- columns: ['company_id'];
1293
+ foreignKeyName: "acq_contacts_company_id_fkey";
1294
+ columns: ["company_id"];
1346
1295
  isOneToOne: false;
1347
- referencedRelation: 'acq_companies';
1348
- referencedColumns: ['id'];
1296
+ referencedRelation: "acq_companies";
1297
+ referencedColumns: ["id"];
1349
1298
  },
1350
1299
  {
1351
- foreignKeyName: 'acq_contacts_organization_id_fkey';
1352
- columns: ['organization_id'];
1300
+ foreignKeyName: "acq_contacts_organization_id_fkey";
1301
+ columns: ["organization_id"];
1353
1302
  isOneToOne: false;
1354
- referencedRelation: 'organizations';
1355
- referencedColumns: ['id'];
1303
+ referencedRelation: "organizations";
1304
+ referencedColumns: ["id"];
1356
1305
  }
1357
1306
  ];
1358
1307
  };
@@ -1389,11 +1338,11 @@ type Database = {
1389
1338
  };
1390
1339
  Relationships: [
1391
1340
  {
1392
- foreignKeyName: 'acq_content_organization_id_fkey';
1393
- columns: ['organization_id'];
1341
+ foreignKeyName: "acq_content_organization_id_fkey";
1342
+ columns: ["organization_id"];
1394
1343
  isOneToOne: false;
1395
- referencedRelation: 'organizations';
1396
- referencedColumns: ['id'];
1344
+ referencedRelation: "organizations";
1345
+ referencedColumns: ["id"];
1397
1346
  }
1398
1347
  ];
1399
1348
  };
@@ -1457,18 +1406,18 @@ type Database = {
1457
1406
  };
1458
1407
  Relationships: [
1459
1408
  {
1460
- foreignKeyName: 'acq_content_distributions_content_id_fkey';
1461
- columns: ['content_id'];
1409
+ foreignKeyName: "acq_content_distributions_content_id_fkey";
1410
+ columns: ["content_id"];
1462
1411
  isOneToOne: false;
1463
- referencedRelation: 'acq_content';
1464
- referencedColumns: ['id'];
1412
+ referencedRelation: "acq_content";
1413
+ referencedColumns: ["id"];
1465
1414
  },
1466
1415
  {
1467
- foreignKeyName: 'acq_content_distributions_organization_id_fkey';
1468
- columns: ['organization_id'];
1416
+ foreignKeyName: "acq_content_distributions_organization_id_fkey";
1417
+ columns: ["organization_id"];
1469
1418
  isOneToOne: false;
1470
- referencedRelation: 'organizations';
1471
- referencedColumns: ['id'];
1419
+ referencedRelation: "organizations";
1420
+ referencedColumns: ["id"];
1472
1421
  }
1473
1422
  ];
1474
1423
  };
@@ -1502,18 +1451,18 @@ type Database = {
1502
1451
  };
1503
1452
  Relationships: [
1504
1453
  {
1505
- foreignKeyName: 'acq_deal_notes_deal_id_fkey';
1506
- columns: ['deal_id'];
1454
+ foreignKeyName: "acq_deal_notes_deal_id_fkey";
1455
+ columns: ["deal_id"];
1507
1456
  isOneToOne: false;
1508
- referencedRelation: 'acq_deals';
1509
- referencedColumns: ['id'];
1457
+ referencedRelation: "acq_deals";
1458
+ referencedColumns: ["id"];
1510
1459
  },
1511
1460
  {
1512
- foreignKeyName: 'acq_deal_notes_organization_id_fkey';
1513
- columns: ['organization_id'];
1461
+ foreignKeyName: "acq_deal_notes_organization_id_fkey";
1462
+ columns: ["organization_id"];
1514
1463
  isOneToOne: false;
1515
- referencedRelation: 'organizations';
1516
- referencedColumns: ['id'];
1464
+ referencedRelation: "organizations";
1465
+ referencedColumns: ["id"];
1517
1466
  }
1518
1467
  ];
1519
1468
  };
@@ -1565,18 +1514,18 @@ type Database = {
1565
1514
  };
1566
1515
  Relationships: [
1567
1516
  {
1568
- foreignKeyName: 'acq_deal_tasks_deal_id_fkey';
1569
- columns: ['deal_id'];
1517
+ foreignKeyName: "acq_deal_tasks_deal_id_fkey";
1518
+ columns: ["deal_id"];
1570
1519
  isOneToOne: false;
1571
- referencedRelation: 'acq_deals';
1572
- referencedColumns: ['id'];
1520
+ referencedRelation: "acq_deals";
1521
+ referencedColumns: ["id"];
1573
1522
  },
1574
1523
  {
1575
- foreignKeyName: 'acq_deal_tasks_organization_id_fkey';
1576
- columns: ['organization_id'];
1524
+ foreignKeyName: "acq_deal_tasks_organization_id_fkey";
1525
+ columns: ["organization_id"];
1577
1526
  isOneToOne: false;
1578
- referencedRelation: 'organizations';
1579
- referencedColumns: ['id'];
1527
+ referencedRelation: "organizations";
1528
+ referencedColumns: ["id"];
1580
1529
  }
1581
1530
  ];
1582
1531
  };
@@ -1593,6 +1542,8 @@ type Database = {
1593
1542
  discovery_submitted_by: string | null;
1594
1543
  id: string;
1595
1544
  initial_fee: number | null;
1545
+ instantly_email_account: string | null;
1546
+ instantly_thread_uuid: string | null;
1596
1547
  monthly_fee: number | null;
1597
1548
  organization_id: string;
1598
1549
  payment_link_sent_at: string | null;
@@ -1628,6 +1579,8 @@ type Database = {
1628
1579
  discovery_submitted_by?: string | null;
1629
1580
  id?: string;
1630
1581
  initial_fee?: number | null;
1582
+ instantly_email_account?: string | null;
1583
+ instantly_thread_uuid?: string | null;
1631
1584
  monthly_fee?: number | null;
1632
1585
  organization_id: string;
1633
1586
  payment_link_sent_at?: string | null;
@@ -1663,6 +1616,8 @@ type Database = {
1663
1616
  discovery_submitted_by?: string | null;
1664
1617
  id?: string;
1665
1618
  initial_fee?: number | null;
1619
+ instantly_email_account?: string | null;
1620
+ instantly_thread_uuid?: string | null;
1666
1621
  monthly_fee?: number | null;
1667
1622
  organization_id?: string;
1668
1623
  payment_link_sent_at?: string | null;
@@ -1688,25 +1643,25 @@ type Database = {
1688
1643
  };
1689
1644
  Relationships: [
1690
1645
  {
1691
- foreignKeyName: 'acq_deals_contact_id_fkey';
1692
- columns: ['contact_id'];
1646
+ foreignKeyName: "acq_deals_contact_id_fkey";
1647
+ columns: ["contact_id"];
1693
1648
  isOneToOne: false;
1694
- referencedRelation: 'acq_contacts';
1695
- referencedColumns: ['id'];
1649
+ referencedRelation: "acq_contacts";
1650
+ referencedColumns: ["id"];
1696
1651
  },
1697
1652
  {
1698
- foreignKeyName: 'acq_deals_organization_id_fkey';
1699
- columns: ['organization_id'];
1653
+ foreignKeyName: "acq_deals_organization_id_fkey";
1654
+ columns: ["organization_id"];
1700
1655
  isOneToOne: false;
1701
- referencedRelation: 'organizations';
1702
- referencedColumns: ['id'];
1656
+ referencedRelation: "organizations";
1657
+ referencedColumns: ["id"];
1703
1658
  },
1704
1659
  {
1705
- foreignKeyName: 'acq_deals_source_list_id_fkey';
1706
- columns: ['source_list_id'];
1660
+ foreignKeyName: "acq_deals_source_list_id_fkey";
1661
+ columns: ["source_list_id"];
1707
1662
  isOneToOne: false;
1708
- referencedRelation: 'acq_lists';
1709
- referencedColumns: ['id'];
1663
+ referencedRelation: "acq_lists";
1664
+ referencedColumns: ["id"];
1710
1665
  }
1711
1666
  ];
1712
1667
  };
@@ -1758,25 +1713,25 @@ type Database = {
1758
1713
  };
1759
1714
  Relationships: [
1760
1715
  {
1761
- foreignKeyName: 'acq_list_companies_company_id_fkey';
1762
- columns: ['company_id'];
1716
+ foreignKeyName: "acq_list_companies_company_id_fkey";
1717
+ columns: ["company_id"];
1763
1718
  isOneToOne: false;
1764
- referencedRelation: 'acq_companies';
1765
- referencedColumns: ['id'];
1719
+ referencedRelation: "acq_companies";
1720
+ referencedColumns: ["id"];
1766
1721
  },
1767
1722
  {
1768
- foreignKeyName: 'acq_list_companies_list_id_fkey';
1769
- columns: ['list_id'];
1723
+ foreignKeyName: "acq_list_companies_list_id_fkey";
1724
+ columns: ["list_id"];
1770
1725
  isOneToOne: false;
1771
- referencedRelation: 'acq_lists';
1772
- referencedColumns: ['id'];
1726
+ referencedRelation: "acq_lists";
1727
+ referencedColumns: ["id"];
1773
1728
  },
1774
1729
  {
1775
- foreignKeyName: 'acq_list_companies_source_execution_id_fkey';
1776
- columns: ['source_execution_id'];
1730
+ foreignKeyName: "acq_list_companies_source_execution_id_fkey";
1731
+ columns: ["source_execution_id"];
1777
1732
  isOneToOne: false;
1778
- referencedRelation: 'execution_logs';
1779
- referencedColumns: ['execution_id'];
1733
+ referencedRelation: "execution_logs";
1734
+ referencedColumns: ["execution_id"];
1780
1735
  }
1781
1736
  ];
1782
1737
  };
@@ -1804,18 +1759,18 @@ type Database = {
1804
1759
  };
1805
1760
  Relationships: [
1806
1761
  {
1807
- foreignKeyName: 'acq_list_executions_execution_id_fkey';
1808
- columns: ['execution_id'];
1762
+ foreignKeyName: "acq_list_executions_execution_id_fkey";
1763
+ columns: ["execution_id"];
1809
1764
  isOneToOne: false;
1810
- referencedRelation: 'execution_logs';
1811
- referencedColumns: ['execution_id'];
1765
+ referencedRelation: "execution_logs";
1766
+ referencedColumns: ["execution_id"];
1812
1767
  },
1813
1768
  {
1814
- foreignKeyName: 'acq_list_executions_list_id_fkey';
1815
- columns: ['list_id'];
1769
+ foreignKeyName: "acq_list_executions_list_id_fkey";
1770
+ columns: ["list_id"];
1816
1771
  isOneToOne: false;
1817
- referencedRelation: 'acq_lists';
1818
- referencedColumns: ['id'];
1772
+ referencedRelation: "acq_lists";
1773
+ referencedColumns: ["id"];
1819
1774
  }
1820
1775
  ];
1821
1776
  };
@@ -1867,25 +1822,25 @@ type Database = {
1867
1822
  };
1868
1823
  Relationships: [
1869
1824
  {
1870
- foreignKeyName: 'acq_list_members_contact_id_fkey';
1871
- columns: ['contact_id'];
1825
+ foreignKeyName: "acq_list_members_contact_id_fkey";
1826
+ columns: ["contact_id"];
1872
1827
  isOneToOne: false;
1873
- referencedRelation: 'acq_contacts';
1874
- referencedColumns: ['id'];
1828
+ referencedRelation: "acq_contacts";
1829
+ referencedColumns: ["id"];
1875
1830
  },
1876
1831
  {
1877
- foreignKeyName: 'acq_list_members_list_id_fkey';
1878
- columns: ['list_id'];
1832
+ foreignKeyName: "acq_list_members_list_id_fkey";
1833
+ columns: ["list_id"];
1879
1834
  isOneToOne: false;
1880
- referencedRelation: 'acq_lists';
1881
- referencedColumns: ['id'];
1835
+ referencedRelation: "acq_lists";
1836
+ referencedColumns: ["id"];
1882
1837
  },
1883
1838
  {
1884
- foreignKeyName: 'acq_list_members_source_execution_id_fkey';
1885
- columns: ['source_execution_id'];
1839
+ foreignKeyName: "acq_list_members_source_execution_id_fkey";
1840
+ columns: ["source_execution_id"];
1886
1841
  isOneToOne: false;
1887
- referencedRelation: 'execution_logs';
1888
- referencedColumns: ['execution_id'];
1842
+ referencedRelation: "execution_logs";
1843
+ referencedColumns: ["execution_id"];
1889
1844
  }
1890
1845
  ];
1891
1846
  };
@@ -1940,11 +1895,11 @@ type Database = {
1940
1895
  };
1941
1896
  Relationships: [
1942
1897
  {
1943
- foreignKeyName: 'acq_lists_organization_id_fkey';
1944
- columns: ['organization_id'];
1898
+ foreignKeyName: "acq_lists_organization_id_fkey";
1899
+ columns: ["organization_id"];
1945
1900
  isOneToOne: false;
1946
- referencedRelation: 'organizations';
1947
- referencedColumns: ['id'];
1901
+ referencedRelation: "organizations";
1902
+ referencedColumns: ["id"];
1948
1903
  }
1949
1904
  ];
1950
1905
  };
@@ -2020,18 +1975,18 @@ type Database = {
2020
1975
  };
2021
1976
  Relationships: [
2022
1977
  {
2023
- foreignKeyName: 'acq_seo_metrics_organization_id_fkey';
2024
- columns: ['organization_id'];
1978
+ foreignKeyName: "acq_seo_metrics_organization_id_fkey";
1979
+ columns: ["organization_id"];
2025
1980
  isOneToOne: false;
2026
- referencedRelation: 'organizations';
2027
- referencedColumns: ['id'];
1981
+ referencedRelation: "organizations";
1982
+ referencedColumns: ["id"];
2028
1983
  },
2029
1984
  {
2030
- foreignKeyName: 'acq_seo_metrics_seo_page_id_fkey';
2031
- columns: ['seo_page_id'];
1985
+ foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
1986
+ columns: ["seo_page_id"];
2032
1987
  isOneToOne: false;
2033
- referencedRelation: 'acq_seo_pages';
2034
- referencedColumns: ['id'];
1988
+ referencedRelation: "acq_seo_pages";
1989
+ referencedColumns: ["id"];
2035
1990
  }
2036
1991
  ];
2037
1992
  };
@@ -2107,11 +2062,11 @@ type Database = {
2107
2062
  };
2108
2063
  Relationships: [
2109
2064
  {
2110
- foreignKeyName: 'acq_seo_pages_organization_id_fkey';
2111
- columns: ['organization_id'];
2065
+ foreignKeyName: "acq_seo_pages_organization_id_fkey";
2066
+ columns: ["organization_id"];
2112
2067
  isOneToOne: false;
2113
- referencedRelation: 'organizations';
2114
- referencedColumns: ['id'];
2068
+ referencedRelation: "organizations";
2069
+ referencedColumns: ["id"];
2115
2070
  }
2116
2071
  ];
2117
2072
  };
@@ -2208,11 +2163,11 @@ type Database = {
2208
2163
  };
2209
2164
  Relationships: [
2210
2165
  {
2211
- foreignKeyName: 'acq_social_posts_organization_id_fkey';
2212
- columns: ['organization_id'];
2166
+ foreignKeyName: "acq_social_posts_organization_id_fkey";
2167
+ columns: ["organization_id"];
2213
2168
  isOneToOne: false;
2214
- referencedRelation: 'organizations';
2215
- referencedColumns: ['id'];
2169
+ referencedRelation: "organizations";
2170
+ referencedColumns: ["id"];
2216
2171
  }
2217
2172
  ];
2218
2173
  };
@@ -2267,11 +2222,11 @@ type Database = {
2267
2222
  };
2268
2223
  Relationships: [
2269
2224
  {
2270
- foreignKeyName: 'activities_organization_id_fkey';
2271
- columns: ['organization_id'];
2225
+ foreignKeyName: "activities_organization_id_fkey";
2226
+ columns: ["organization_id"];
2272
2227
  isOneToOne: false;
2273
- referencedRelation: 'organizations';
2274
- referencedColumns: ['id'];
2228
+ referencedRelation: "organizations";
2229
+ referencedColumns: ["id"];
2275
2230
  }
2276
2231
  ];
2277
2232
  };
@@ -2302,11 +2257,11 @@ type Database = {
2302
2257
  };
2303
2258
  Relationships: [
2304
2259
  {
2305
- foreignKeyName: 'api_keys_organization_id_fkey';
2306
- columns: ['organization_id'];
2260
+ foreignKeyName: "api_keys_organization_id_fkey";
2261
+ columns: ["organization_id"];
2307
2262
  isOneToOne: false;
2308
- referencedRelation: 'organizations';
2309
- referencedColumns: ['id'];
2263
+ referencedRelation: "organizations";
2264
+ referencedColumns: ["id"];
2310
2265
  }
2311
2266
  ];
2312
2267
  };
@@ -2385,25 +2340,25 @@ type Database = {
2385
2340
  };
2386
2341
  Relationships: [
2387
2342
  {
2388
- foreignKeyName: 'command_queue_completed_by_fkey';
2389
- columns: ['completed_by'];
2343
+ foreignKeyName: "command_queue_completed_by_fkey";
2344
+ columns: ["completed_by"];
2390
2345
  isOneToOne: false;
2391
- referencedRelation: 'users';
2392
- referencedColumns: ['id'];
2346
+ referencedRelation: "users";
2347
+ referencedColumns: ["id"];
2393
2348
  },
2394
2349
  {
2395
- foreignKeyName: 'command_queue_organization_id_fkey';
2396
- columns: ['organization_id'];
2350
+ foreignKeyName: "command_queue_organization_id_fkey";
2351
+ columns: ["organization_id"];
2397
2352
  isOneToOne: false;
2398
- referencedRelation: 'organizations';
2399
- referencedColumns: ['id'];
2353
+ referencedRelation: "organizations";
2354
+ referencedColumns: ["id"];
2400
2355
  },
2401
2356
  {
2402
- foreignKeyName: 'command_queue_target_execution_id_fkey';
2403
- columns: ['target_execution_id'];
2357
+ foreignKeyName: "command_queue_target_execution_id_fkey";
2358
+ columns: ["target_execution_id"];
2404
2359
  isOneToOne: false;
2405
- referencedRelation: 'execution_logs';
2406
- referencedColumns: ['execution_id'];
2360
+ referencedRelation: "execution_logs";
2361
+ referencedColumns: ["execution_id"];
2407
2362
  }
2408
2363
  ];
2409
2364
  };
@@ -2443,18 +2398,18 @@ type Database = {
2443
2398
  };
2444
2399
  Relationships: [
2445
2400
  {
2446
- foreignKeyName: 'credentials_created_by_fkey';
2447
- columns: ['created_by'];
2401
+ foreignKeyName: "credentials_created_by_fkey";
2402
+ columns: ["created_by"];
2448
2403
  isOneToOne: false;
2449
- referencedRelation: 'users';
2450
- referencedColumns: ['id'];
2404
+ referencedRelation: "users";
2405
+ referencedColumns: ["id"];
2451
2406
  },
2452
2407
  {
2453
- foreignKeyName: 'credentials_organization_id_fkey';
2454
- columns: ['organization_id'];
2408
+ foreignKeyName: "credentials_organization_id_fkey";
2409
+ columns: ["organization_id"];
2455
2410
  isOneToOne: false;
2456
- referencedRelation: 'organizations';
2457
- referencedColumns: ['id'];
2411
+ referencedRelation: "organizations";
2412
+ referencedColumns: ["id"];
2458
2413
  }
2459
2414
  ];
2460
2415
  };
@@ -2500,11 +2455,11 @@ type Database = {
2500
2455
  };
2501
2456
  Relationships: [
2502
2457
  {
2503
- foreignKeyName: 'deployments_organization_id_fkey';
2504
- columns: ['organization_id'];
2458
+ foreignKeyName: "deployments_organization_id_fkey";
2459
+ columns: ["organization_id"];
2505
2460
  isOneToOne: false;
2506
- referencedRelation: 'organizations';
2507
- referencedColumns: ['id'];
2461
+ referencedRelation: "organizations";
2462
+ referencedColumns: ["id"];
2508
2463
  }
2509
2464
  ];
2510
2465
  };
@@ -2559,25 +2514,25 @@ type Database = {
2559
2514
  };
2560
2515
  Relationships: [
2561
2516
  {
2562
- foreignKeyName: 'execution_errors_execution_id_fkey';
2563
- columns: ['execution_id'];
2517
+ foreignKeyName: "execution_errors_execution_id_fkey";
2518
+ columns: ["execution_id"];
2564
2519
  isOneToOne: false;
2565
- referencedRelation: 'execution_logs';
2566
- referencedColumns: ['execution_id'];
2520
+ referencedRelation: "execution_logs";
2521
+ referencedColumns: ["execution_id"];
2567
2522
  },
2568
2523
  {
2569
- foreignKeyName: 'execution_errors_organization_id_fkey';
2570
- columns: ['organization_id'];
2524
+ foreignKeyName: "execution_errors_organization_id_fkey";
2525
+ columns: ["organization_id"];
2571
2526
  isOneToOne: false;
2572
- referencedRelation: 'organizations';
2573
- referencedColumns: ['id'];
2527
+ referencedRelation: "organizations";
2528
+ referencedColumns: ["id"];
2574
2529
  },
2575
2530
  {
2576
- foreignKeyName: 'execution_errors_resolved_by_fkey';
2577
- columns: ['resolved_by'];
2531
+ foreignKeyName: "execution_errors_resolved_by_fkey";
2532
+ columns: ["resolved_by"];
2578
2533
  isOneToOne: false;
2579
- referencedRelation: 'users';
2580
- referencedColumns: ['id'];
2534
+ referencedRelation: "users";
2535
+ referencedColumns: ["id"];
2581
2536
  }
2582
2537
  ];
2583
2538
  };
@@ -2659,32 +2614,32 @@ type Database = {
2659
2614
  };
2660
2615
  Relationships: [
2661
2616
  {
2662
- foreignKeyName: 'execution_history_organization_id_fkey';
2663
- columns: ['organization_id'];
2617
+ foreignKeyName: "execution_history_organization_id_fkey";
2618
+ columns: ["organization_id"];
2664
2619
  isOneToOne: false;
2665
- referencedRelation: 'organizations';
2666
- referencedColumns: ['id'];
2620
+ referencedRelation: "organizations";
2621
+ referencedColumns: ["id"];
2667
2622
  },
2668
2623
  {
2669
- foreignKeyName: 'execution_logs_origin_execution_id_fkey';
2670
- columns: ['origin_execution_id'];
2624
+ foreignKeyName: "execution_logs_origin_execution_id_fkey";
2625
+ columns: ["origin_execution_id"];
2671
2626
  isOneToOne: false;
2672
- referencedRelation: 'execution_logs';
2673
- referencedColumns: ['execution_id'];
2627
+ referencedRelation: "execution_logs";
2628
+ referencedColumns: ["execution_id"];
2674
2629
  },
2675
2630
  {
2676
- foreignKeyName: 'execution_logs_session_id_fkey';
2677
- columns: ['session_id'];
2631
+ foreignKeyName: "execution_logs_session_id_fkey";
2632
+ columns: ["session_id"];
2678
2633
  isOneToOne: false;
2679
- referencedRelation: 'sessions';
2680
- referencedColumns: ['session_id'];
2634
+ referencedRelation: "sessions";
2635
+ referencedColumns: ["session_id"];
2681
2636
  },
2682
2637
  {
2683
- foreignKeyName: 'execution_logs_user_id_fkey';
2684
- columns: ['user_id'];
2638
+ foreignKeyName: "execution_logs_user_id_fkey";
2639
+ columns: ["user_id"];
2685
2640
  isOneToOne: false;
2686
- referencedRelation: 'users';
2687
- referencedColumns: ['id'];
2641
+ referencedRelation: "users";
2642
+ referencedColumns: ["id"];
2688
2643
  }
2689
2644
  ];
2690
2645
  };
@@ -2730,18 +2685,18 @@ type Database = {
2730
2685
  };
2731
2686
  Relationships: [
2732
2687
  {
2733
- foreignKeyName: 'execution_metrics_execution_id_fkey';
2734
- columns: ['execution_id'];
2688
+ foreignKeyName: "execution_metrics_execution_id_fkey";
2689
+ columns: ["execution_id"];
2735
2690
  isOneToOne: true;
2736
- referencedRelation: 'execution_logs';
2737
- referencedColumns: ['execution_id'];
2691
+ referencedRelation: "execution_logs";
2692
+ referencedColumns: ["execution_id"];
2738
2693
  },
2739
2694
  {
2740
- foreignKeyName: 'execution_metrics_organization_id_fkey';
2741
- columns: ['organization_id'];
2695
+ foreignKeyName: "execution_metrics_organization_id_fkey";
2696
+ columns: ["organization_id"];
2742
2697
  isOneToOne: false;
2743
- referencedRelation: 'organizations';
2744
- referencedColumns: ['id'];
2698
+ referencedRelation: "organizations";
2699
+ referencedColumns: ["id"];
2745
2700
  }
2746
2701
  ];
2747
2702
  };
@@ -2784,18 +2739,18 @@ type Database = {
2784
2739
  };
2785
2740
  Relationships: [
2786
2741
  {
2787
- foreignKeyName: 'notifications_organization_id_fkey';
2788
- columns: ['organization_id'];
2742
+ foreignKeyName: "notifications_organization_id_fkey";
2743
+ columns: ["organization_id"];
2789
2744
  isOneToOne: false;
2790
- referencedRelation: 'organizations';
2791
- referencedColumns: ['id'];
2745
+ referencedRelation: "organizations";
2746
+ referencedColumns: ["id"];
2792
2747
  },
2793
2748
  {
2794
- foreignKeyName: 'notifications_user_id_fkey';
2795
- columns: ['user_id'];
2749
+ foreignKeyName: "notifications_user_id_fkey";
2750
+ columns: ["user_id"];
2796
2751
  isOneToOne: false;
2797
- referencedRelation: 'users';
2798
- referencedColumns: ['id'];
2752
+ referencedRelation: "users";
2753
+ referencedColumns: ["id"];
2799
2754
  }
2800
2755
  ];
2801
2756
  };
@@ -2850,18 +2805,18 @@ type Database = {
2850
2805
  };
2851
2806
  Relationships: [
2852
2807
  {
2853
- foreignKeyName: 'org_invitations_inviter_user_id_fkey';
2854
- columns: ['inviter_user_id'];
2808
+ foreignKeyName: "org_invitations_inviter_user_id_fkey";
2809
+ columns: ["inviter_user_id"];
2855
2810
  isOneToOne: false;
2856
- referencedRelation: 'users';
2857
- referencedColumns: ['id'];
2811
+ referencedRelation: "users";
2812
+ referencedColumns: ["id"];
2858
2813
  },
2859
2814
  {
2860
- foreignKeyName: 'org_invitations_organization_id_fkey';
2861
- columns: ['organization_id'];
2815
+ foreignKeyName: "org_invitations_organization_id_fkey";
2816
+ columns: ["organization_id"];
2862
2817
  isOneToOne: false;
2863
- referencedRelation: 'organizations';
2864
- referencedColumns: ['id'];
2818
+ referencedRelation: "organizations";
2819
+ referencedColumns: ["id"];
2865
2820
  }
2866
2821
  ];
2867
2822
  };
@@ -2904,18 +2859,18 @@ type Database = {
2904
2859
  };
2905
2860
  Relationships: [
2906
2861
  {
2907
- foreignKeyName: 'org_memberships_organization_id_fkey';
2908
- columns: ['organization_id'];
2862
+ foreignKeyName: "org_memberships_organization_id_fkey";
2863
+ columns: ["organization_id"];
2909
2864
  isOneToOne: false;
2910
- referencedRelation: 'organizations';
2911
- referencedColumns: ['id'];
2865
+ referencedRelation: "organizations";
2866
+ referencedColumns: ["id"];
2912
2867
  },
2913
2868
  {
2914
- foreignKeyName: 'org_memberships_user_id_fkey';
2915
- columns: ['user_id'];
2869
+ foreignKeyName: "org_memberships_user_id_fkey";
2870
+ columns: ["user_id"];
2916
2871
  isOneToOne: false;
2917
- referencedRelation: 'users';
2918
- referencedColumns: ['id'];
2872
+ referencedRelation: "users";
2873
+ referencedColumns: ["id"];
2919
2874
  }
2920
2875
  ];
2921
2876
  };
@@ -2940,25 +2895,25 @@ type Database = {
2940
2895
  };
2941
2896
  Relationships: [
2942
2897
  {
2943
- foreignKeyName: 'org_rol_assignments_granted_by_fkey';
2944
- columns: ['granted_by'];
2898
+ foreignKeyName: "org_rol_assignments_granted_by_fkey";
2899
+ columns: ["granted_by"];
2945
2900
  isOneToOne: false;
2946
- referencedRelation: 'users';
2947
- referencedColumns: ['id'];
2901
+ referencedRelation: "users";
2902
+ referencedColumns: ["id"];
2948
2903
  },
2949
2904
  {
2950
- foreignKeyName: 'org_rol_assignments_membership_id_fkey';
2951
- columns: ['membership_id'];
2905
+ foreignKeyName: "org_rol_assignments_membership_id_fkey";
2906
+ columns: ["membership_id"];
2952
2907
  isOneToOne: false;
2953
- referencedRelation: 'org_memberships';
2954
- referencedColumns: ['id'];
2908
+ referencedRelation: "org_memberships";
2909
+ referencedColumns: ["id"];
2955
2910
  },
2956
2911
  {
2957
- foreignKeyName: 'org_rol_assignments_role_id_fkey';
2958
- columns: ['role_id'];
2912
+ foreignKeyName: "org_rol_assignments_role_id_fkey";
2913
+ columns: ["role_id"];
2959
2914
  isOneToOne: false;
2960
- referencedRelation: 'org_rol_definitions';
2961
- referencedColumns: ['id'];
2915
+ referencedRelation: "org_rol_definitions";
2916
+ referencedColumns: ["id"];
2962
2917
  }
2963
2918
  ];
2964
2919
  };
@@ -2995,11 +2950,11 @@ type Database = {
2995
2950
  };
2996
2951
  Relationships: [
2997
2952
  {
2998
- foreignKeyName: 'org_rol_definitions_organization_id_fkey';
2999
- columns: ['organization_id'];
2953
+ foreignKeyName: "org_rol_definitions_organization_id_fkey";
2954
+ columns: ["organization_id"];
3000
2955
  isOneToOne: false;
3001
- referencedRelation: 'organizations';
3002
- referencedColumns: ['id'];
2956
+ referencedRelation: "organizations";
2957
+ referencedColumns: ["id"];
3003
2958
  }
3004
2959
  ];
3005
2960
  };
@@ -3021,18 +2976,18 @@ type Database = {
3021
2976
  };
3022
2977
  Relationships: [
3023
2978
  {
3024
- foreignKeyName: 'org_rol_grants_permission_key_fkey';
3025
- columns: ['permission_key'];
2979
+ foreignKeyName: "org_rol_grants_permission_key_fkey";
2980
+ columns: ["permission_key"];
3026
2981
  isOneToOne: false;
3027
- referencedRelation: 'org_rol_permissions';
3028
- referencedColumns: ['key'];
2982
+ referencedRelation: "org_rol_permissions";
2983
+ referencedColumns: ["key"];
3029
2984
  },
3030
2985
  {
3031
- foreignKeyName: 'org_rol_grants_role_id_fkey';
3032
- columns: ['role_id'];
2986
+ foreignKeyName: "org_rol_grants_role_id_fkey";
2987
+ columns: ["role_id"];
3033
2988
  isOneToOne: false;
3034
- referencedRelation: 'org_rol_definitions';
3035
- referencedColumns: ['id'];
2989
+ referencedRelation: "org_rol_definitions";
2990
+ referencedColumns: ["id"];
3036
2991
  }
3037
2992
  ];
3038
2993
  };
@@ -3144,25 +3099,25 @@ type Database = {
3144
3099
  };
3145
3100
  Relationships: [
3146
3101
  {
3147
- foreignKeyName: 'fk_milestones_project';
3148
- columns: ['project_id'];
3102
+ foreignKeyName: "fk_milestones_project";
3103
+ columns: ["project_id"];
3149
3104
  isOneToOne: false;
3150
- referencedRelation: 'prj_projects';
3151
- referencedColumns: ['id'];
3105
+ referencedRelation: "prj_projects";
3106
+ referencedColumns: ["id"];
3152
3107
  },
3153
3108
  {
3154
- foreignKeyName: 'prj_milestones_organization_id_fkey';
3155
- columns: ['organization_id'];
3109
+ foreignKeyName: "prj_milestones_organization_id_fkey";
3110
+ columns: ["organization_id"];
3156
3111
  isOneToOne: false;
3157
- referencedRelation: 'organizations';
3158
- referencedColumns: ['id'];
3112
+ referencedRelation: "organizations";
3113
+ referencedColumns: ["id"];
3159
3114
  },
3160
3115
  {
3161
- foreignKeyName: 'prj_milestones_project_id_fkey';
3162
- columns: ['project_id'];
3116
+ foreignKeyName: "prj_milestones_project_id_fkey";
3117
+ columns: ["project_id"];
3163
3118
  isOneToOne: false;
3164
- referencedRelation: 'prj_projects';
3165
- referencedColumns: ['id'];
3119
+ referencedRelation: "prj_projects";
3120
+ referencedColumns: ["id"];
3166
3121
  }
3167
3122
  ];
3168
3123
  };
@@ -3211,67 +3166,67 @@ type Database = {
3211
3166
  };
3212
3167
  Relationships: [
3213
3168
  {
3214
- foreignKeyName: 'fk_notes_created_by';
3215
- columns: ['created_by'];
3169
+ foreignKeyName: "fk_notes_created_by";
3170
+ columns: ["created_by"];
3216
3171
  isOneToOne: false;
3217
- referencedRelation: 'users';
3218
- referencedColumns: ['id'];
3172
+ referencedRelation: "users";
3173
+ referencedColumns: ["id"];
3219
3174
  },
3220
3175
  {
3221
- foreignKeyName: 'fk_notes_milestone';
3222
- columns: ['milestone_id'];
3176
+ foreignKeyName: "fk_notes_milestone";
3177
+ columns: ["milestone_id"];
3223
3178
  isOneToOne: false;
3224
- referencedRelation: 'prj_milestones';
3225
- referencedColumns: ['id'];
3179
+ referencedRelation: "prj_milestones";
3180
+ referencedColumns: ["id"];
3226
3181
  },
3227
3182
  {
3228
- foreignKeyName: 'fk_notes_project';
3229
- columns: ['project_id'];
3183
+ foreignKeyName: "fk_notes_project";
3184
+ columns: ["project_id"];
3230
3185
  isOneToOne: false;
3231
- referencedRelation: 'prj_projects';
3232
- referencedColumns: ['id'];
3186
+ referencedRelation: "prj_projects";
3187
+ referencedColumns: ["id"];
3233
3188
  },
3234
3189
  {
3235
- foreignKeyName: 'fk_notes_task';
3236
- columns: ['task_id'];
3190
+ foreignKeyName: "fk_notes_task";
3191
+ columns: ["task_id"];
3237
3192
  isOneToOne: false;
3238
- referencedRelation: 'prj_tasks';
3239
- referencedColumns: ['id'];
3193
+ referencedRelation: "prj_tasks";
3194
+ referencedColumns: ["id"];
3240
3195
  },
3241
3196
  {
3242
- foreignKeyName: 'prj_notes_created_by_fkey';
3243
- columns: ['created_by'];
3197
+ foreignKeyName: "prj_notes_created_by_fkey";
3198
+ columns: ["created_by"];
3244
3199
  isOneToOne: false;
3245
- referencedRelation: 'users';
3246
- referencedColumns: ['id'];
3200
+ referencedRelation: "users";
3201
+ referencedColumns: ["id"];
3247
3202
  },
3248
3203
  {
3249
- foreignKeyName: 'prj_notes_milestone_id_fkey';
3250
- columns: ['milestone_id'];
3204
+ foreignKeyName: "prj_notes_milestone_id_fkey";
3205
+ columns: ["milestone_id"];
3251
3206
  isOneToOne: false;
3252
- referencedRelation: 'prj_milestones';
3253
- referencedColumns: ['id'];
3207
+ referencedRelation: "prj_milestones";
3208
+ referencedColumns: ["id"];
3254
3209
  },
3255
3210
  {
3256
- foreignKeyName: 'prj_notes_organization_id_fkey';
3257
- columns: ['organization_id'];
3211
+ foreignKeyName: "prj_notes_organization_id_fkey";
3212
+ columns: ["organization_id"];
3258
3213
  isOneToOne: false;
3259
- referencedRelation: 'organizations';
3260
- referencedColumns: ['id'];
3214
+ referencedRelation: "organizations";
3215
+ referencedColumns: ["id"];
3261
3216
  },
3262
3217
  {
3263
- foreignKeyName: 'prj_notes_project_id_fkey';
3264
- columns: ['project_id'];
3218
+ foreignKeyName: "prj_notes_project_id_fkey";
3219
+ columns: ["project_id"];
3265
3220
  isOneToOne: false;
3266
- referencedRelation: 'prj_projects';
3267
- referencedColumns: ['id'];
3221
+ referencedRelation: "prj_projects";
3222
+ referencedColumns: ["id"];
3268
3223
  },
3269
3224
  {
3270
- foreignKeyName: 'prj_notes_task_id_fkey';
3271
- columns: ['task_id'];
3225
+ foreignKeyName: "prj_notes_task_id_fkey";
3226
+ columns: ["task_id"];
3272
3227
  isOneToOne: false;
3273
- referencedRelation: 'prj_tasks';
3274
- referencedColumns: ['id'];
3228
+ referencedRelation: "prj_tasks";
3229
+ referencedColumns: ["id"];
3275
3230
  }
3276
3231
  ];
3277
3232
  };
@@ -3329,39 +3284,39 @@ type Database = {
3329
3284
  };
3330
3285
  Relationships: [
3331
3286
  {
3332
- foreignKeyName: 'fk_projects_company';
3333
- columns: ['client_company_id'];
3287
+ foreignKeyName: "fk_projects_company";
3288
+ columns: ["client_company_id"];
3334
3289
  isOneToOne: false;
3335
- referencedRelation: 'acq_companies';
3336
- referencedColumns: ['id'];
3290
+ referencedRelation: "acq_companies";
3291
+ referencedColumns: ["id"];
3337
3292
  },
3338
3293
  {
3339
- foreignKeyName: 'fk_projects_deal';
3340
- columns: ['deal_id'];
3294
+ foreignKeyName: "fk_projects_deal";
3295
+ columns: ["deal_id"];
3341
3296
  isOneToOne: false;
3342
- referencedRelation: 'acq_deals';
3343
- referencedColumns: ['id'];
3297
+ referencedRelation: "acq_deals";
3298
+ referencedColumns: ["id"];
3344
3299
  },
3345
3300
  {
3346
- foreignKeyName: 'prj_projects_client_company_id_fkey';
3347
- columns: ['client_company_id'];
3301
+ foreignKeyName: "prj_projects_client_company_id_fkey";
3302
+ columns: ["client_company_id"];
3348
3303
  isOneToOne: false;
3349
- referencedRelation: 'acq_companies';
3350
- referencedColumns: ['id'];
3304
+ referencedRelation: "acq_companies";
3305
+ referencedColumns: ["id"];
3351
3306
  },
3352
3307
  {
3353
- foreignKeyName: 'prj_projects_deal_id_fkey';
3354
- columns: ['deal_id'];
3308
+ foreignKeyName: "prj_projects_deal_id_fkey";
3309
+ columns: ["deal_id"];
3355
3310
  isOneToOne: false;
3356
- referencedRelation: 'acq_deals';
3357
- referencedColumns: ['id'];
3311
+ referencedRelation: "acq_deals";
3312
+ referencedColumns: ["id"];
3358
3313
  },
3359
3314
  {
3360
- foreignKeyName: 'prj_projects_organization_id_fkey';
3361
- columns: ['organization_id'];
3315
+ foreignKeyName: "prj_projects_organization_id_fkey";
3316
+ columns: ["organization_id"];
3362
3317
  isOneToOne: false;
3363
- referencedRelation: 'organizations';
3364
- referencedColumns: ['id'];
3318
+ referencedRelation: "organizations";
3319
+ referencedColumns: ["id"];
3365
3320
  }
3366
3321
  ];
3367
3322
  };
@@ -3425,53 +3380,53 @@ type Database = {
3425
3380
  };
3426
3381
  Relationships: [
3427
3382
  {
3428
- foreignKeyName: 'fk_tasks_milestone';
3429
- columns: ['milestone_id'];
3383
+ foreignKeyName: "fk_tasks_milestone";
3384
+ columns: ["milestone_id"];
3430
3385
  isOneToOne: false;
3431
- referencedRelation: 'prj_milestones';
3432
- referencedColumns: ['id'];
3386
+ referencedRelation: "prj_milestones";
3387
+ referencedColumns: ["id"];
3433
3388
  },
3434
3389
  {
3435
- foreignKeyName: 'fk_tasks_parent';
3436
- columns: ['parent_task_id'];
3390
+ foreignKeyName: "fk_tasks_parent";
3391
+ columns: ["parent_task_id"];
3437
3392
  isOneToOne: false;
3438
- referencedRelation: 'prj_tasks';
3439
- referencedColumns: ['id'];
3393
+ referencedRelation: "prj_tasks";
3394
+ referencedColumns: ["id"];
3440
3395
  },
3441
3396
  {
3442
- foreignKeyName: 'fk_tasks_project';
3443
- columns: ['project_id'];
3397
+ foreignKeyName: "fk_tasks_project";
3398
+ columns: ["project_id"];
3444
3399
  isOneToOne: false;
3445
- referencedRelation: 'prj_projects';
3446
- referencedColumns: ['id'];
3400
+ referencedRelation: "prj_projects";
3401
+ referencedColumns: ["id"];
3447
3402
  },
3448
3403
  {
3449
- foreignKeyName: 'prj_tasks_milestone_id_fkey';
3450
- columns: ['milestone_id'];
3404
+ foreignKeyName: "prj_tasks_milestone_id_fkey";
3405
+ columns: ["milestone_id"];
3451
3406
  isOneToOne: false;
3452
- referencedRelation: 'prj_milestones';
3453
- referencedColumns: ['id'];
3407
+ referencedRelation: "prj_milestones";
3408
+ referencedColumns: ["id"];
3454
3409
  },
3455
3410
  {
3456
- foreignKeyName: 'prj_tasks_organization_id_fkey';
3457
- columns: ['organization_id'];
3411
+ foreignKeyName: "prj_tasks_organization_id_fkey";
3412
+ columns: ["organization_id"];
3458
3413
  isOneToOne: false;
3459
- referencedRelation: 'organizations';
3460
- referencedColumns: ['id'];
3414
+ referencedRelation: "organizations";
3415
+ referencedColumns: ["id"];
3461
3416
  },
3462
3417
  {
3463
- foreignKeyName: 'prj_tasks_parent_task_id_fkey';
3464
- columns: ['parent_task_id'];
3418
+ foreignKeyName: "prj_tasks_parent_task_id_fkey";
3419
+ columns: ["parent_task_id"];
3465
3420
  isOneToOne: false;
3466
- referencedRelation: 'prj_tasks';
3467
- referencedColumns: ['id'];
3421
+ referencedRelation: "prj_tasks";
3422
+ referencedColumns: ["id"];
3468
3423
  },
3469
3424
  {
3470
- foreignKeyName: 'prj_tasks_project_id_fkey';
3471
- columns: ['project_id'];
3425
+ foreignKeyName: "prj_tasks_project_id_fkey";
3426
+ columns: ["project_id"];
3472
3427
  isOneToOne: false;
3473
- referencedRelation: 'prj_projects';
3474
- referencedColumns: ['id'];
3428
+ referencedRelation: "prj_projects";
3429
+ referencedColumns: ["id"];
3475
3430
  }
3476
3431
  ];
3477
3432
  };
@@ -3541,25 +3496,25 @@ type Database = {
3541
3496
  };
3542
3497
  Relationships: [
3543
3498
  {
3544
- foreignKeyName: 'reported_requests_organization_id_fkey';
3545
- columns: ['organization_id'];
3499
+ foreignKeyName: "reported_requests_organization_id_fkey";
3500
+ columns: ["organization_id"];
3546
3501
  isOneToOne: false;
3547
- referencedRelation: 'organizations';
3548
- referencedColumns: ['id'];
3502
+ referencedRelation: "organizations";
3503
+ referencedColumns: ["id"];
3549
3504
  },
3550
3505
  {
3551
- foreignKeyName: 'reported_requests_project_id_fkey';
3552
- columns: ['project_id'];
3506
+ foreignKeyName: "reported_requests_project_id_fkey";
3507
+ columns: ["project_id"];
3553
3508
  isOneToOne: false;
3554
- referencedRelation: 'prj_projects';
3555
- referencedColumns: ['id'];
3509
+ referencedRelation: "prj_projects";
3510
+ referencedColumns: ["id"];
3556
3511
  },
3557
3512
  {
3558
- foreignKeyName: 'reported_requests_task_id_fkey';
3559
- columns: ['task_id'];
3513
+ foreignKeyName: "reported_requests_task_id_fkey";
3514
+ columns: ["task_id"];
3560
3515
  isOneToOne: false;
3561
- referencedRelation: 'prj_tasks';
3562
- referencedColumns: ['id'];
3516
+ referencedRelation: "prj_tasks";
3517
+ referencedColumns: ["id"];
3563
3518
  }
3564
3519
  ];
3565
3520
  };
@@ -3599,11 +3554,11 @@ type Database = {
3599
3554
  };
3600
3555
  Relationships: [
3601
3556
  {
3602
- foreignKeyName: 'session_messages_session_id_fkey';
3603
- columns: ['session_id'];
3557
+ foreignKeyName: "session_messages_session_id_fkey";
3558
+ columns: ["session_id"];
3604
3559
  isOneToOne: false;
3605
- referencedRelation: 'sessions';
3606
- referencedColumns: ['session_id'];
3560
+ referencedRelation: "sessions";
3561
+ referencedColumns: ["session_id"];
3607
3562
  }
3608
3563
  ];
3609
3564
  };
@@ -3658,18 +3613,18 @@ type Database = {
3658
3613
  };
3659
3614
  Relationships: [
3660
3615
  {
3661
- foreignKeyName: 'fk_organization';
3662
- columns: ['organization_id'];
3616
+ foreignKeyName: "fk_organization";
3617
+ columns: ["organization_id"];
3663
3618
  isOneToOne: false;
3664
- referencedRelation: 'organizations';
3665
- referencedColumns: ['id'];
3619
+ referencedRelation: "organizations";
3620
+ referencedColumns: ["id"];
3666
3621
  },
3667
3622
  {
3668
- foreignKeyName: 'fk_user';
3669
- columns: ['user_id'];
3623
+ foreignKeyName: "fk_user";
3624
+ columns: ["user_id"];
3670
3625
  isOneToOne: false;
3671
- referencedRelation: 'users';
3672
- referencedColumns: ['id'];
3626
+ referencedRelation: "users";
3627
+ referencedColumns: ["id"];
3673
3628
  }
3674
3629
  ];
3675
3630
  };
@@ -3745,11 +3700,11 @@ type Database = {
3745
3700
  };
3746
3701
  Relationships: [
3747
3702
  {
3748
- foreignKeyName: 'task_schedules_organization_id_fkey';
3749
- columns: ['organization_id'];
3703
+ foreignKeyName: "task_schedules_organization_id_fkey";
3704
+ columns: ["organization_id"];
3750
3705
  isOneToOne: false;
3751
- referencedRelation: 'organizations';
3752
- referencedColumns: ['id'];
3706
+ referencedRelation: "organizations";
3707
+ referencedColumns: ["id"];
3753
3708
  }
3754
3709
  ];
3755
3710
  };
@@ -3804,11 +3759,11 @@ type Database = {
3804
3759
  };
3805
3760
  Relationships: [
3806
3761
  {
3807
- foreignKeyName: 'user_profiles_last_visited_org_fkey';
3808
- columns: ['last_visited_org'];
3762
+ foreignKeyName: "user_profiles_last_visited_org_fkey";
3763
+ columns: ["last_visited_org"];
3809
3764
  isOneToOne: false;
3810
- referencedRelation: 'organizations';
3811
- referencedColumns: ['id'];
3765
+ referencedRelation: "organizations";
3766
+ referencedColumns: ["id"];
3812
3767
  }
3813
3768
  ];
3814
3769
  };
@@ -3857,11 +3812,11 @@ type Database = {
3857
3812
  };
3858
3813
  Relationships: [
3859
3814
  {
3860
- foreignKeyName: 'webhook_endpoints_organization_id_fkey';
3861
- columns: ['organization_id'];
3815
+ foreignKeyName: "webhook_endpoints_organization_id_fkey";
3816
+ columns: ["organization_id"];
3862
3817
  isOneToOne: false;
3863
- referencedRelation: 'organizations';
3864
- referencedColumns: ['id'];
3818
+ referencedRelation: "organizations";
3819
+ referencedColumns: ["id"];
3865
3820
  }
3866
3821
  ];
3867
3822
  };
@@ -4010,272 +3965,6 @@ type Database = {
4010
3965
  };
4011
3966
  };
4012
3967
 
4013
- /** Raw database row type for acq_deals table */
4014
- type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
4015
- /**
4016
- * Tracks pipeline status for a company across all processing stages.
4017
- */
4018
- interface CompanyPipelineStatus {
4019
- acquired: boolean;
4020
- enrichment: {
4021
- [source: string]: {
4022
- status: 'pending' | 'complete' | 'failed' | 'skipped';
4023
- completedAt?: string;
4024
- error?: string;
4025
- };
4026
- };
4027
- }
4028
- /**
4029
- * Tracks pipeline status for a contact across all processing stages.
4030
- */
4031
- interface ContactPipelineStatus {
4032
- enrichment: {
4033
- [source: string]: {
4034
- status: 'pending' | 'complete' | 'failed' | 'skipped';
4035
- completedAt?: string;
4036
- error?: string;
4037
- };
4038
- };
4039
- personalization: {
4040
- status: 'pending' | 'complete' | 'failed' | 'skipped';
4041
- completedAt?: string;
4042
- };
4043
- outreach: {
4044
- status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out';
4045
- sentAt?: string;
4046
- channel?: string;
4047
- campaignId?: string;
4048
- };
4049
- }
4050
- /**
4051
- * Enrichment data collected for a company from various sources.
4052
- */
4053
- interface CompanyEnrichmentData {
4054
- googleMaps?: {
4055
- placeId?: string;
4056
- totalScore?: number;
4057
- reviewsCount?: number;
4058
- address?: string;
4059
- phone?: string;
4060
- categoryName?: string;
4061
- googleMapsUrl?: string;
4062
- scrapedAt?: string;
4063
- };
4064
- websiteCrawl?: {
4065
- companyDescription?: string;
4066
- services?: string[];
4067
- specialties?: string[];
4068
- staff?: Array<{
4069
- name: string;
4070
- title?: string;
4071
- email?: string;
4072
- }>;
4073
- automationGaps?: string[];
4074
- targetAudience?: string;
4075
- category?: string;
4076
- segment?: string;
4077
- recentWin?: string;
4078
- emailCount?: number;
4079
- pageCount?: number;
4080
- totalChars?: number;
4081
- crawledAt?: string;
4082
- extractedAt?: string;
4083
- };
4084
- website?: {
4085
- missionVision?: string;
4086
- uniqueAttributes?: string;
4087
- coreOfferings?: string;
4088
- targetAudience?: string;
4089
- companyValues?: string;
4090
- businessDescription?: string;
4091
- recentPosts?: Array<{
4092
- date?: string;
4093
- title?: string;
4094
- summary?: string;
4095
- aiInsight?: string;
4096
- }>;
4097
- };
4098
- tomba?: {
4099
- waterfallEmail?: {
4100
- email: string;
4101
- name?: string;
4102
- title?: string;
4103
- department?: string;
4104
- } | null;
4105
- genericEmail?: string | null;
4106
- totalFound?: number;
4107
- searchedAt?: string;
4108
- };
4109
- }
4110
- /**
4111
- * Enrichment data collected for a contact from various sources.
4112
- */
4113
- interface ContactEnrichmentData {
4114
- linkedin?: {
4115
- summary?: string;
4116
- pastExperience?: string;
4117
- education?: string;
4118
- activity?: Array<{
4119
- date?: string;
4120
- content?: string;
4121
- }>;
4122
- };
4123
- }
4124
- type ListStatus = 'draft' | 'enriching' | 'launched' | 'closing' | 'archived';
4125
- interface ScrapingConfig {
4126
- source?: string;
4127
- query?: string;
4128
- filters?: Record<string, unknown>;
4129
- [key: string]: unknown;
4130
- }
4131
- interface IcpRubric {
4132
- targetDescription?: string;
4133
- minReviewCount?: number;
4134
- minRating?: number;
4135
- excludeFranchises?: boolean;
4136
- customRules?: string;
4137
- qualificationRubricKey?: string | null;
4138
- [key: string]: unknown;
4139
- }
4140
- interface PipelineStage {
4141
- key: string;
4142
- label?: string;
4143
- description?: string;
4144
- resourceId?: string;
4145
- inputTemplate?: Record<string, unknown>;
4146
- enabled?: boolean;
4147
- order?: number;
4148
- }
4149
- interface PipelineConfig {
4150
- stages: PipelineStage[];
4151
- }
4152
- interface AcqList {
4153
- id: string;
4154
- organizationId: string;
4155
- name: string;
4156
- description: string | null;
4157
- batchIds: string[];
4158
- instantlyCampaignId: string | null;
4159
- status: ListStatus;
4160
- scrapingConfig: ScrapingConfig;
4161
- icp: IcpRubric;
4162
- pipelineConfig: PipelineConfig;
4163
- metadata: Record<string, unknown>;
4164
- launchedAt: Date | null;
4165
- completedAt: Date | null;
4166
- createdAt: Date;
4167
- }
4168
- /**
4169
- * Company record in the acquisition database.
4170
- * Contains enriched company data from various sources.
4171
- * Transformed from AcqCompanyRow with camelCase properties.
4172
- */
4173
- interface AcqCompany {
4174
- id: string;
4175
- organizationId: string;
4176
- name: string;
4177
- domain: string | null;
4178
- linkedinUrl: string | null;
4179
- website: string | null;
4180
- numEmployees: number | null;
4181
- foundedYear: number | null;
4182
- locationCity: string | null;
4183
- locationState: string | null;
4184
- category: string | null;
4185
- categoryPain: string | null;
4186
- segment: string | null;
4187
- pipelineStatus: CompanyPipelineStatus | null;
4188
- enrichmentData: CompanyEnrichmentData | null;
4189
- source: string | null;
4190
- batchId: string | null;
4191
- status: 'active' | 'invalid';
4192
- verticalResearch: string | null;
4193
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
4194
- qualificationScore: number | null;
4195
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
4196
- qualificationSignals: Record<string, unknown> | null;
4197
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
4198
- qualificationRubricKey: string | null;
4199
- createdAt: Date;
4200
- updatedAt: Date;
4201
- }
4202
- /**
4203
- * Contact record in the acquisition database.
4204
- * Contains enriched contact data and personalization content.
4205
- * Transformed from AcqContactRow with camelCase properties.
4206
- */
4207
- interface AcqContact {
4208
- id: string;
4209
- organizationId: string;
4210
- companyId: string | null;
4211
- email: string;
4212
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null;
4213
- firstName: string | null;
4214
- lastName: string | null;
4215
- linkedinUrl: string | null;
4216
- title: string | null;
4217
- headline: string | null;
4218
- filterReason: string | null;
4219
- openingLine: string | null;
4220
- source: string | null;
4221
- sourceId: string | null;
4222
- pipelineStatus: ContactPipelineStatus | null;
4223
- enrichmentData: ContactEnrichmentData | null;
4224
- /** Attio Person record ID - set when contact responds and is added to CRM */
4225
- attioPersonId: string | null;
4226
- batchId: string | null;
4227
- status: 'active' | 'invalid';
4228
- createdAt: Date;
4229
- updatedAt: Date;
4230
- }
4231
- interface DealContact {
4232
- id: string;
4233
- first_name: string | null;
4234
- last_name: string | null;
4235
- email: string;
4236
- title: string | null;
4237
- headline: string | null;
4238
- linkedin_url: string | null;
4239
- pipeline_status: Record<string, unknown> | null;
4240
- enrichment_data: Record<string, unknown> | null;
4241
- company: {
4242
- id: string;
4243
- name: string;
4244
- domain: string | null;
4245
- website: string | null;
4246
- linkedin_url: string | null;
4247
- segment: string | null;
4248
- category: string | null;
4249
- num_employees: number | null;
4250
- } | null;
4251
- }
4252
- /** Deal list item with joined contact and company data */
4253
- interface DealListItem extends AcqDealRow {
4254
- contact: DealContact | null;
4255
- }
4256
- type DealDetail = DealListItem;
4257
- /** Task kind options for a deal task (human follow-up action type) */
4258
- type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other';
4259
- /**
4260
- * A CRM to-do item attached to a deal representing a human follow-up action.
4261
- * Transformed from AcqDealTaskRow with camelCase properties.
4262
- */
4263
- interface AcqDealTask {
4264
- id: string;
4265
- organizationId: string;
4266
- dealId: string;
4267
- title: string;
4268
- description: string | null;
4269
- kind: AcqDealTaskKind;
4270
- dueAt: string | null;
4271
- assigneeUserId: string | null;
4272
- completedAt: string | null;
4273
- completedByUserId: string | null;
4274
- createdAt: string;
4275
- updatedAt: string;
4276
- createdByUserId: string | null;
4277
- }
4278
-
4279
3968
  declare const DealSchemas: {
4280
3969
  DealIdParams: z.ZodObject<{
4281
3970
  dealId: z.ZodString;
@@ -4344,6 +4033,21 @@ declare const DealSchemas: {
4344
4033
  ExecuteActionRequest: z.ZodObject<{
4345
4034
  payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4346
4035
  }, z.core.$strict>;
4036
+ DealPriority: z.ZodObject<{
4037
+ bucketKey: z.ZodEnum<{
4038
+ needs_response: "needs_response";
4039
+ follow_up_due: "follow_up_due";
4040
+ waiting: "waiting";
4041
+ stale: "stale";
4042
+ closed_low: "closed_low";
4043
+ }>;
4044
+ rank: z.ZodNumber;
4045
+ label: z.ZodString;
4046
+ color: z.ZodString;
4047
+ reason: z.ZodString;
4048
+ latestActivityAt: z.ZodNullable<z.ZodString>;
4049
+ nextActionAt: z.ZodNullable<z.ZodString>;
4050
+ }, z.core.$strip>;
4347
4051
  DealListResponse: z.ZodObject<{
4348
4052
  data: z.ZodArray<z.ZodObject<{
4349
4053
  id: z.ZodString;
@@ -4369,6 +4073,26 @@ declare const DealSchemas: {
4369
4073
  closed_lost_reason: z.ZodNullable<z.ZodString>;
4370
4074
  created_at: z.ZodString;
4371
4075
  updated_at: z.ZodString;
4076
+ priority: z.ZodObject<{
4077
+ bucketKey: z.ZodEnum<{
4078
+ needs_response: "needs_response";
4079
+ follow_up_due: "follow_up_due";
4080
+ waiting: "waiting";
4081
+ stale: "stale";
4082
+ closed_low: "closed_low";
4083
+ }>;
4084
+ rank: z.ZodNumber;
4085
+ label: z.ZodString;
4086
+ color: z.ZodString;
4087
+ reason: z.ZodString;
4088
+ latestActivityAt: z.ZodNullable<z.ZodString>;
4089
+ nextActionAt: z.ZodNullable<z.ZodString>;
4090
+ }, z.core.$strip>;
4091
+ ownership: z.ZodNullable<z.ZodEnum<{
4092
+ us: "us";
4093
+ them: "them";
4094
+ }>>;
4095
+ nextAction: z.ZodNullable<z.ZodString>;
4372
4096
  contact: z.ZodNullable<z.ZodObject<{
4373
4097
  id: z.ZodString;
4374
4098
  first_name: z.ZodNullable<z.ZodString>;
@@ -4427,6 +4151,18 @@ declare const DealSchemas: {
4427
4151
  companyName: z.ZodNullable<z.ZodString>;
4428
4152
  displayLabel: z.ZodString;
4429
4153
  }, z.core.$strip>>;
4154
+ ConversationMessage: z.ZodObject<{
4155
+ id: z.ZodString;
4156
+ direction: z.ZodEnum<{
4157
+ inbound: "inbound";
4158
+ outbound: "outbound";
4159
+ }>;
4160
+ fromEmail: z.ZodString;
4161
+ toEmail: z.ZodString;
4162
+ subject: z.ZodNullable<z.ZodString>;
4163
+ body: z.ZodString;
4164
+ sentAt: z.ZodNullable<z.ZodString>;
4165
+ }, z.core.$strip>;
4430
4166
  DealDetailResponse: z.ZodObject<{
4431
4167
  id: z.ZodString;
4432
4168
  organization_id: z.ZodString;
@@ -4451,6 +4187,26 @@ declare const DealSchemas: {
4451
4187
  closed_lost_reason: z.ZodNullable<z.ZodString>;
4452
4188
  created_at: z.ZodString;
4453
4189
  updated_at: z.ZodString;
4190
+ priority: z.ZodObject<{
4191
+ bucketKey: z.ZodEnum<{
4192
+ needs_response: "needs_response";
4193
+ follow_up_due: "follow_up_due";
4194
+ waiting: "waiting";
4195
+ stale: "stale";
4196
+ closed_low: "closed_low";
4197
+ }>;
4198
+ rank: z.ZodNumber;
4199
+ label: z.ZodString;
4200
+ color: z.ZodString;
4201
+ reason: z.ZodString;
4202
+ latestActivityAt: z.ZodNullable<z.ZodString>;
4203
+ nextActionAt: z.ZodNullable<z.ZodString>;
4204
+ }, z.core.$strip>;
4205
+ ownership: z.ZodNullable<z.ZodEnum<{
4206
+ us: "us";
4207
+ them: "them";
4208
+ }>>;
4209
+ nextAction: z.ZodNullable<z.ZodString>;
4454
4210
  contact: z.ZodNullable<z.ZodObject<{
4455
4211
  id: z.ZodString;
4456
4212
  first_name: z.ZodNullable<z.ZodString>;
@@ -4472,6 +4228,20 @@ declare const DealSchemas: {
4472
4228
  num_employees: z.ZodNullable<z.ZodNumber>;
4473
4229
  }, z.core.$strip>>;
4474
4230
  }, z.core.$strip>>;
4231
+ conversation: z.ZodObject<{
4232
+ messages: z.ZodArray<z.ZodObject<{
4233
+ id: z.ZodString;
4234
+ direction: z.ZodEnum<{
4235
+ inbound: "inbound";
4236
+ outbound: "outbound";
4237
+ }>;
4238
+ fromEmail: z.ZodString;
4239
+ toEmail: z.ZodString;
4240
+ subject: z.ZodNullable<z.ZodString>;
4241
+ body: z.ZodString;
4242
+ sentAt: z.ZodNullable<z.ZodString>;
4243
+ }, z.core.$strip>>;
4244
+ }, z.core.$strip>;
4475
4245
  }, z.core.$strip>;
4476
4246
  DealNoteResponse: z.ZodObject<{
4477
4247
  id: z.ZodString;
@@ -4503,47 +4273,353 @@ declare const DealSchemas: {
4503
4273
  call: "call";
4504
4274
  meeting: "meeting";
4505
4275
  }>;
4506
- dueAt: z.ZodNullable<z.ZodString>;
4507
- assigneeUserId: z.ZodNullable<z.ZodString>;
4508
- completedAt: z.ZodNullable<z.ZodString>;
4509
- completedByUserId: z.ZodNullable<z.ZodString>;
4510
- createdAt: z.ZodString;
4511
- updatedAt: z.ZodString;
4512
- createdByUserId: z.ZodNullable<z.ZodString>;
4513
- }, z.core.$strip>;
4514
- DealTaskListResponse: z.ZodArray<z.ZodObject<{
4515
- id: z.ZodString;
4516
- organizationId: z.ZodString;
4517
- dealId: z.ZodString;
4518
- title: z.ZodString;
4519
- description: z.ZodNullable<z.ZodString>;
4520
- kind: z.ZodEnum<{
4521
- other: "other";
4522
- email: "email";
4523
- call: "call";
4524
- meeting: "meeting";
4276
+ dueAt: z.ZodNullable<z.ZodString>;
4277
+ assigneeUserId: z.ZodNullable<z.ZodString>;
4278
+ completedAt: z.ZodNullable<z.ZodString>;
4279
+ completedByUserId: z.ZodNullable<z.ZodString>;
4280
+ createdAt: z.ZodString;
4281
+ updatedAt: z.ZodString;
4282
+ createdByUserId: z.ZodNullable<z.ZodString>;
4283
+ }, z.core.$strip>;
4284
+ DealTaskListResponse: z.ZodArray<z.ZodObject<{
4285
+ id: z.ZodString;
4286
+ organizationId: z.ZodString;
4287
+ dealId: z.ZodString;
4288
+ title: z.ZodString;
4289
+ description: z.ZodNullable<z.ZodString>;
4290
+ kind: z.ZodEnum<{
4291
+ other: "other";
4292
+ email: "email";
4293
+ call: "call";
4294
+ meeting: "meeting";
4295
+ }>;
4296
+ dueAt: z.ZodNullable<z.ZodString>;
4297
+ assigneeUserId: z.ZodNullable<z.ZodString>;
4298
+ completedAt: z.ZodNullable<z.ZodString>;
4299
+ completedByUserId: z.ZodNullable<z.ZodString>;
4300
+ createdAt: z.ZodString;
4301
+ updatedAt: z.ZodString;
4302
+ createdByUserId: z.ZodNullable<z.ZodString>;
4303
+ }, z.core.$strip>>;
4304
+ };
4305
+ /**
4306
+ * One stage entry in a list's `pipeline_config.stages[]`. The `key` is
4307
+ * validated against `LEAD_GEN_STAGE_CATALOG` so list pipeline definitions
4308
+ * stay aligned with the org-os semantic layer.
4309
+ */
4310
+ declare const PipelineStageSchema: z.ZodObject<{
4311
+ key: z.ZodString;
4312
+ label: z.ZodOptional<z.ZodString>;
4313
+ enabled: z.ZodOptional<z.ZodBoolean>;
4314
+ order: z.ZodOptional<z.ZodNumber>;
4315
+ }, z.core.$strip>;
4316
+ /**
4317
+ * Terminal row-level status for one lead-gen processing stage.
4318
+ * Missing key still means not attempted; legacy boolean `true` is normalized
4319
+ * to `success` by the API reader during rollout.
4320
+ */
4321
+ declare const ProcessingStageStatusSchema: z.ZodEnum<{
4322
+ error: "error";
4323
+ success: "success";
4324
+ no_result: "no_result";
4325
+ skipped: "skipped";
4326
+ }>;
4327
+ type PipelineStage = z.infer<typeof PipelineStageSchema>;
4328
+ type ProcessingStageStatus = z.infer<typeof ProcessingStageStatusSchema>;
4329
+
4330
+ /** Raw database row type for acq_deals table */
4331
+ type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
4332
+ /**
4333
+ * Tracks pipeline status for a company across all processing stages.
4334
+ */
4335
+ interface CompanyPipelineStatus {
4336
+ acquired: boolean;
4337
+ enrichment: {
4338
+ [source: string]: {
4339
+ status: 'pending' | 'complete' | 'failed' | 'skipped';
4340
+ completedAt?: string;
4341
+ error?: string;
4342
+ };
4343
+ };
4344
+ }
4345
+ /**
4346
+ * Tracks pipeline status for a contact across all processing stages.
4347
+ */
4348
+ interface ContactPipelineStatus {
4349
+ enrichment: {
4350
+ [source: string]: {
4351
+ status: 'pending' | 'complete' | 'failed' | 'skipped';
4352
+ completedAt?: string;
4353
+ error?: string;
4354
+ };
4355
+ };
4356
+ personalization: {
4357
+ status: 'pending' | 'complete' | 'failed' | 'skipped';
4358
+ completedAt?: string;
4359
+ };
4360
+ outreach: {
4361
+ status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out';
4362
+ sentAt?: string;
4363
+ channel?: string;
4364
+ campaignId?: string;
4365
+ };
4366
+ }
4367
+ /**
4368
+ * Enrichment data collected for a company from various sources.
4369
+ */
4370
+ interface CompanyEnrichmentData {
4371
+ googleMaps?: {
4372
+ placeId?: string;
4373
+ totalScore?: number;
4374
+ reviewsCount?: number;
4375
+ address?: string;
4376
+ phone?: string;
4377
+ categoryName?: string;
4378
+ googleMapsUrl?: string;
4379
+ scrapedAt?: string;
4380
+ };
4381
+ websiteCrawl?: {
4382
+ companyDescription?: string;
4383
+ services?: string[];
4384
+ specialties?: string[];
4385
+ staff?: Array<{
4386
+ name: string;
4387
+ title?: string;
4388
+ email?: string;
4389
+ }>;
4390
+ automationGaps?: string[];
4391
+ targetAudience?: string;
4392
+ category?: string;
4393
+ segment?: string;
4394
+ recentWin?: string;
4395
+ emailCount?: number;
4396
+ pageCount?: number;
4397
+ totalChars?: number;
4398
+ crawledAt?: string;
4399
+ extractedAt?: string;
4400
+ };
4401
+ website?: {
4402
+ missionVision?: string;
4403
+ uniqueAttributes?: string;
4404
+ coreOfferings?: string;
4405
+ targetAudience?: string;
4406
+ companyValues?: string;
4407
+ businessDescription?: string;
4408
+ recentPosts?: Array<{
4409
+ date?: string;
4410
+ title?: string;
4411
+ summary?: string;
4412
+ aiInsight?: string;
4413
+ }>;
4414
+ };
4415
+ tomba?: {
4416
+ waterfallEmail?: {
4417
+ email: string;
4418
+ name?: string;
4419
+ title?: string;
4420
+ department?: string;
4421
+ } | null;
4422
+ genericEmail?: string | null;
4423
+ totalFound?: number;
4424
+ searchedAt?: string;
4425
+ };
4426
+ }
4427
+ /**
4428
+ * Enrichment data collected for a contact from various sources.
4429
+ */
4430
+ interface ContactEnrichmentData {
4431
+ linkedin?: {
4432
+ summary?: string;
4433
+ pastExperience?: string;
4434
+ education?: string;
4435
+ activity?: Array<{
4436
+ date?: string;
4437
+ content?: string;
4525
4438
  }>;
4526
- dueAt: z.ZodNullable<z.ZodString>;
4527
- assigneeUserId: z.ZodNullable<z.ZodString>;
4528
- completedAt: z.ZodNullable<z.ZodString>;
4529
- completedByUserId: z.ZodNullable<z.ZodString>;
4530
- createdAt: z.ZodString;
4531
- updatedAt: z.ZodString;
4532
- createdByUserId: z.ZodNullable<z.ZodString>;
4533
- }, z.core.$strip>>;
4534
- };
4439
+ };
4440
+ }
4441
+ type ListStatus = 'draft' | 'enriching' | 'launched' | 'closing' | 'archived';
4442
+ interface ScrapingConfig {
4443
+ source?: string;
4444
+ query?: string;
4445
+ filters?: Record<string, unknown>;
4446
+ [key: string]: unknown;
4447
+ }
4448
+ interface IcpRubric {
4449
+ targetDescription?: string;
4450
+ minReviewCount?: number;
4451
+ minRating?: number;
4452
+ excludeFranchises?: boolean;
4453
+ customRules?: string;
4454
+ qualificationRubricKey?: string | null;
4455
+ [key: string]: unknown;
4456
+ }
4457
+ interface PipelineConfig {
4458
+ stages: PipelineStage[];
4459
+ }
4460
+ type BuildPlanSnapshotPrimaryEntity = 'company' | 'contact';
4461
+ type BuildPlanSnapshotOutput = 'company' | 'contact' | 'export';
4462
+ type BuildPlanSnapshotDependencyMode = 'per-record-eligibility';
4463
+ interface BuildPlanSnapshotStep {
4464
+ id: string;
4465
+ label: string;
4466
+ description?: string;
4467
+ primaryEntity: BuildPlanSnapshotPrimaryEntity;
4468
+ outputs: BuildPlanSnapshotOutput[];
4469
+ stageKey: string;
4470
+ dependsOn?: string[];
4471
+ dependencyMode: BuildPlanSnapshotDependencyMode;
4472
+ capabilityKey: string;
4473
+ defaultBatchSize: number;
4474
+ maxBatchSize: number;
4475
+ }
4476
+ interface BuildPlanSnapshot {
4477
+ templateId: string;
4478
+ templateLabel: string;
4479
+ steps: BuildPlanSnapshotStep[];
4480
+ }
4481
+ interface AcqListMetadata extends Record<string, unknown> {
4482
+ buildPlanSnapshot?: BuildPlanSnapshot;
4483
+ }
4484
+ interface AcqList {
4485
+ id: string;
4486
+ organizationId: string;
4487
+ name: string;
4488
+ description: string | null;
4489
+ batchIds: string[];
4490
+ instantlyCampaignId: string | null;
4491
+ status: ListStatus;
4492
+ scrapingConfig: ScrapingConfig;
4493
+ icp: IcpRubric;
4494
+ pipelineConfig: PipelineConfig;
4495
+ metadata: AcqListMetadata;
4496
+ launchedAt: Date | null;
4497
+ completedAt: Date | null;
4498
+ createdAt: Date;
4499
+ }
4535
4500
  /**
4536
- * Terminal row-level status for one lead-gen processing stage.
4537
- * Missing key still means not attempted; legacy boolean `true` is normalized
4538
- * to `success` by the API reader during rollout.
4501
+ * Company record in the acquisition database.
4502
+ * Contains enriched company data from various sources.
4503
+ * Transformed from AcqCompanyRow with camelCase properties.
4539
4504
  */
4540
- declare const ProcessingStageStatusSchema: z.ZodEnum<{
4541
- error: "error";
4542
- success: "success";
4543
- skipped: "skipped";
4544
- no_result: "no_result";
4545
- }>;
4546
- type ProcessingStageStatus = z.infer<typeof ProcessingStageStatusSchema>;
4505
+ interface AcqCompany {
4506
+ id: string;
4507
+ organizationId: string;
4508
+ name: string;
4509
+ domain: string | null;
4510
+ linkedinUrl: string | null;
4511
+ website: string | null;
4512
+ numEmployees: number | null;
4513
+ foundedYear: number | null;
4514
+ locationCity: string | null;
4515
+ locationState: string | null;
4516
+ category: string | null;
4517
+ categoryPain: string | null;
4518
+ segment: string | null;
4519
+ pipelineStatus: CompanyPipelineStatus | null;
4520
+ enrichmentData: CompanyEnrichmentData | null;
4521
+ source: string | null;
4522
+ batchId: string | null;
4523
+ status: 'active' | 'invalid';
4524
+ verticalResearch: string | null;
4525
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
4526
+ qualificationScore: number | null;
4527
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
4528
+ qualificationSignals: Record<string, unknown> | null;
4529
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
4530
+ qualificationRubricKey: string | null;
4531
+ createdAt: Date;
4532
+ updatedAt: Date;
4533
+ }
4534
+ /**
4535
+ * Contact record in the acquisition database.
4536
+ * Contains enriched contact data and personalization content.
4537
+ * Transformed from AcqContactRow with camelCase properties.
4538
+ */
4539
+ interface AcqContact {
4540
+ id: string;
4541
+ organizationId: string;
4542
+ companyId: string | null;
4543
+ email: string;
4544
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null;
4545
+ firstName: string | null;
4546
+ lastName: string | null;
4547
+ linkedinUrl: string | null;
4548
+ title: string | null;
4549
+ headline: string | null;
4550
+ filterReason: string | null;
4551
+ openingLine: string | null;
4552
+ source: string | null;
4553
+ sourceId: string | null;
4554
+ pipelineStatus: ContactPipelineStatus | null;
4555
+ enrichmentData: ContactEnrichmentData | null;
4556
+ /** Attio Person record ID - set when contact responds and is added to CRM */
4557
+ attioPersonId: string | null;
4558
+ batchId: string | null;
4559
+ status: 'active' | 'invalid';
4560
+ createdAt: Date;
4561
+ updatedAt: Date;
4562
+ }
4563
+ type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low';
4564
+ interface DealPriority {
4565
+ bucketKey: DealPriorityBucketKey;
4566
+ rank: number;
4567
+ label: string;
4568
+ color: string;
4569
+ reason: string;
4570
+ latestActivityAt: string | null;
4571
+ nextActionAt: string | null;
4572
+ }
4573
+ interface DealContact {
4574
+ id: string;
4575
+ first_name: string | null;
4576
+ last_name: string | null;
4577
+ email: string;
4578
+ title: string | null;
4579
+ headline: string | null;
4580
+ linkedin_url: string | null;
4581
+ pipeline_status: Record<string, unknown> | null;
4582
+ enrichment_data: Record<string, unknown> | null;
4583
+ company: {
4584
+ id: string;
4585
+ name: string;
4586
+ domain: string | null;
4587
+ website: string | null;
4588
+ linkedin_url: string | null;
4589
+ segment: string | null;
4590
+ category: string | null;
4591
+ num_employees: number | null;
4592
+ } | null;
4593
+ }
4594
+ /** Deal list item with joined contact and company data */
4595
+ interface DealListItem extends AcqDealRow {
4596
+ priority: DealPriority;
4597
+ ownership: 'us' | 'them' | null;
4598
+ nextAction: string | null;
4599
+ contact: DealContact | null;
4600
+ }
4601
+ type DealDetail = DealListItem;
4602
+ /** Task kind options for a deal task (human follow-up action type) */
4603
+ type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other';
4604
+ /**
4605
+ * A CRM to-do item attached to a deal representing a human follow-up action.
4606
+ * Transformed from AcqDealTaskRow with camelCase properties.
4607
+ */
4608
+ interface AcqDealTask {
4609
+ id: string;
4610
+ organizationId: string;
4611
+ dealId: string;
4612
+ title: string;
4613
+ description: string | null;
4614
+ kind: AcqDealTaskKind;
4615
+ dueAt: string | null;
4616
+ assigneeUserId: string | null;
4617
+ completedAt: string | null;
4618
+ completedByUserId: string | null;
4619
+ createdAt: string;
4620
+ updatedAt: string;
4621
+ createdByUserId: string | null;
4622
+ }
4547
4623
 
4548
4624
  /**
4549
4625
  * Lead Service Types
@@ -4566,6 +4642,7 @@ interface CreateListParams {
4566
4642
  batchIds?: string[];
4567
4643
  instantlyCampaignId?: string;
4568
4644
  status?: ListStatus;
4645
+ buildTemplateId?: string;
4569
4646
  metadata?: Record<string, unknown>;
4570
4647
  scrapingConfig?: ScrapingConfig;
4571
4648
  icp?: IcpRubric;
@@ -4630,6 +4707,7 @@ interface CompanyFilters {
4630
4707
  status?: 'active' | 'invalid';
4631
4708
  includeAll?: boolean;
4632
4709
  excludeColumns?: Array<'enrichmentData' | 'pipelineStatus'>;
4710
+ limit?: number;
4633
4711
  }
4634
4712
  interface CreateContactParams {
4635
4713
  organizationId: string;
@@ -4680,6 +4758,10 @@ interface UpsertDealParams {
4680
4758
  discoveryData?: unknown;
4681
4759
  /** Optional proposal data JSONB to set on upsert */
4682
4760
  proposalData?: unknown;
4761
+ /** Instantly email UUID used to hydrate the reply thread */
4762
+ instantlyThreadUuid?: string;
4763
+ /** Instantly sender account for direction detection */
4764
+ instantlyEmailAccount?: string;
4683
4765
  }
4684
4766
  interface UpdateDiscoveryDataParams {
4685
4767
  organizationId: string;
@@ -4715,6 +4797,12 @@ interface UpdateFeesParams {
4715
4797
  initialFee?: number;
4716
4798
  monthlyFee?: number;
4717
4799
  }
4800
+ interface CacheInstantlyThreadIdsParams {
4801
+ organizationId: string;
4802
+ dealId: string;
4803
+ instantlyThreadUuid: string;
4804
+ instantlyEmailAccount: string;
4805
+ }
4718
4806
  interface TransitionItemParams {
4719
4807
  organizationId: string;
4720
4808
  dealId: string;
@@ -5123,9 +5211,17 @@ declare const ActivityEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5123
5211
  }, z.core.$strip>, z.ZodObject<{
5124
5212
  type: z.ZodLiteral<"deal_created">;
5125
5213
  timestamp: z.ZodString;
5214
+ }, z.core.$strip>, z.ZodObject<{
5215
+ type: z.ZodLiteral<"action_failed">;
5216
+ timestamp: z.ZodString;
5217
+ actionKey: z.ZodString;
5218
+ errorMessage: z.ZodString;
5219
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5126
5220
  }, z.core.$strip>], "type">;
5127
5221
  type ActivityEvent = z.infer<typeof ActivityEventSchema>;
5128
5222
 
5223
+ type DealOwnership = 'us' | 'them' | null;
5224
+
5129
5225
  interface Action {
5130
5226
  key: string;
5131
5227
  label: string;
@@ -5138,8 +5234,12 @@ interface ActionDef {
5138
5234
  workflowId: string;
5139
5235
  payloadSchema?: z.ZodTypeAny;
5140
5236
  }
5237
+ type DealActionInput = AcqDealRow & {
5238
+ ownership?: DealOwnership;
5239
+ nextAction?: string | null;
5240
+ };
5141
5241
  declare const DEFAULT_CRM_ACTIONS: ActionDef[];
5142
- declare function deriveActions(deal: AcqDealRow, actions?: ActionDef[]): Action[];
5242
+ declare function deriveActions(deal: DealActionInput, actions?: ActionDef[]): Action[];
5143
5243
 
5144
5244
  /**
5145
5245
  * A single CRM activity entry (note, stage change, or deal creation).
@@ -7848,6 +7948,10 @@ type LeadToolMap = {
7848
7948
  params: Omit<UpdateFeesParams, 'organizationId'>;
7849
7949
  result: void;
7850
7950
  };
7951
+ cacheInstantlyThreadIds: {
7952
+ params: Omit<CacheInstantlyThreadIdsParams, 'organizationId'>;
7953
+ result: void;
7954
+ };
7851
7955
  transitionItem: {
7852
7956
  params: Omit<TransitionItemParams, 'organizationId'>;
7853
7957
  result: void;
@@ -8358,7 +8462,7 @@ interface Tool {
8358
8462
  * Tooling error types
8359
8463
  * Used across platform tools and integration tools
8360
8464
  */
8361
- type ToolingErrorType = 'service_unavailable' | 'permission_denied' | 'adapter_not_found' | 'method_not_found' | 'tool_not_found' | 'credentials_missing' | 'credentials_invalid' | 'rate_limit_exceeded' | 'server_unavailable' | 'auth_error' | 'api_error' | 'validation_error' | 'network_error' | 'timeout_error' | 'unknown_error';
8465
+ type ToolingErrorType = 'service_unavailable' | 'permission_denied' | 'platform_internal' | 'adapter_not_found' | 'method_not_found' | 'tool_not_found' | 'credentials_missing' | 'credentials_invalid' | 'rate_limit_exceeded' | 'server_unavailable' | 'auth_error' | 'api_error' | 'validation_error' | 'network_error' | 'timeout_error' | 'unknown_error';
8362
8466
 
8363
8467
  /**
8364
8468
  * Supported integration types
@@ -8746,6 +8850,7 @@ declare const LinkSchema: z.ZodObject<{
8746
8850
  maps_to: "maps_to";
8747
8851
  "operates-on": "operates-on";
8748
8852
  uses: "uses";
8853
+ governs: "governs";
8749
8854
  }>;
8750
8855
  }, z.core.$strip>;
8751
8856
  type Link = z.infer<typeof LinkSchema>;
@@ -9104,23 +9209,6 @@ declare class ResourceRegistry {
9104
9209
  * @returns Command View data with nodes and edges
9105
9210
  */
9106
9211
  getCommandViewData(organizationName: string): CommandViewData;
9107
- /**
9108
- * List resources that have UI interfaces configured
9109
- * Used by Execution Runner Catalog UI
9110
- *
9111
- * @param organizationName - Organization name
9112
- * @param environment - Optional environment filter ('dev' or 'prod')
9113
- * @returns Array of resources with interfaces
9114
- */
9115
- listExecutable(organizationName: string, environment?: 'dev' | 'prod'): Array<{
9116
- resourceId: string;
9117
- resourceName: string;
9118
- resourceType: 'workflow' | 'agent';
9119
- description?: string;
9120
- status: 'dev' | 'prod';
9121
- version: string;
9122
- interface: SerializedExecutionInterface;
9123
- }>;
9124
9212
  }
9125
9213
 
9126
9214
  /**
@@ -9201,5 +9289,5 @@ declare class ToolingError extends ExecutionError {
9201
9289
  constructor(errorType: string, message: string, details?: unknown);
9202
9290
  }
9203
9291
 
9204
- export { ActivityEventSchema, DEFAULT_CRM_ACTIONS, ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
9292
+ export { ActivityEventSchema, DEFAULT_CRM_ACTIONS, EmailSchema, ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
9205
9293
  export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action, ActionDef, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };