@elevasis/sdk 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1174,7 +1174,6 @@ type Database = {
1174
1174
  Tables: {
1175
1175
  acq_companies: {
1176
1176
  Row: {
1177
- attio_company_id: string | null;
1178
1177
  batch_id: string | null;
1179
1178
  category: string | null;
1180
1179
  category_pain: string | null;
@@ -1198,7 +1197,6 @@ type Database = {
1198
1197
  website: string | null;
1199
1198
  };
1200
1199
  Insert: {
1201
- attio_company_id?: string | null;
1202
1200
  batch_id?: string | null;
1203
1201
  category?: string | null;
1204
1202
  category_pain?: string | null;
@@ -1222,7 +1220,6 @@ type Database = {
1222
1220
  website?: string | null;
1223
1221
  };
1224
1222
  Update: {
1225
- attio_company_id?: string | null;
1226
1223
  batch_id?: string | null;
1227
1224
  category?: string | null;
1228
1225
  category_pain?: string | null;
@@ -1257,7 +1254,6 @@ type Database = {
1257
1254
  };
1258
1255
  acq_contacts: {
1259
1256
  Row: {
1260
- attio_person_id: string | null;
1261
1257
  batch_id: string | null;
1262
1258
  brochure_first_viewed_at: string | null;
1263
1259
  brochure_view_count: number;
@@ -1283,7 +1279,6 @@ type Database = {
1283
1279
  updated_at: string;
1284
1280
  };
1285
1281
  Insert: {
1286
- attio_person_id?: string | null;
1287
1282
  batch_id?: string | null;
1288
1283
  brochure_first_viewed_at?: string | null;
1289
1284
  brochure_view_count?: number;
@@ -1309,7 +1304,6 @@ type Database = {
1309
1304
  updated_at?: string;
1310
1305
  };
1311
1306
  Update: {
1312
- attio_person_id?: string | null;
1313
1307
  batch_id?: string | null;
1314
1308
  brochure_first_viewed_at?: string | null;
1315
1309
  brochure_view_count?: number;
@@ -1467,10 +1461,117 @@ type Database = {
1467
1461
  }
1468
1462
  ];
1469
1463
  };
1464
+ acq_deal_notes: {
1465
+ Row: {
1466
+ author_user_id: string | null;
1467
+ body: string;
1468
+ created_at: string;
1469
+ deal_id: string;
1470
+ id: string;
1471
+ organization_id: string;
1472
+ updated_at: string;
1473
+ };
1474
+ Insert: {
1475
+ author_user_id?: string | null;
1476
+ body: string;
1477
+ created_at?: string;
1478
+ deal_id: string;
1479
+ id?: string;
1480
+ organization_id: string;
1481
+ updated_at?: string;
1482
+ };
1483
+ Update: {
1484
+ author_user_id?: string | null;
1485
+ body?: string;
1486
+ created_at?: string;
1487
+ deal_id?: string;
1488
+ id?: string;
1489
+ organization_id?: string;
1490
+ updated_at?: string;
1491
+ };
1492
+ Relationships: [
1493
+ {
1494
+ foreignKeyName: "acq_deal_notes_deal_id_fkey";
1495
+ columns: ["deal_id"];
1496
+ isOneToOne: false;
1497
+ referencedRelation: "acq_deals";
1498
+ referencedColumns: ["id"];
1499
+ },
1500
+ {
1501
+ foreignKeyName: "acq_deal_notes_organization_id_fkey";
1502
+ columns: ["organization_id"];
1503
+ isOneToOne: false;
1504
+ referencedRelation: "organizations";
1505
+ referencedColumns: ["id"];
1506
+ }
1507
+ ];
1508
+ };
1509
+ acq_deal_tasks: {
1510
+ Row: {
1511
+ assignee_user_id: string | null;
1512
+ completed_at: string | null;
1513
+ completed_by_user_id: string | null;
1514
+ created_at: string;
1515
+ created_by_user_id: string | null;
1516
+ deal_id: string;
1517
+ description: string | null;
1518
+ due_at: string | null;
1519
+ id: string;
1520
+ kind: string;
1521
+ organization_id: string;
1522
+ title: string;
1523
+ updated_at: string;
1524
+ };
1525
+ Insert: {
1526
+ assignee_user_id?: string | null;
1527
+ completed_at?: string | null;
1528
+ completed_by_user_id?: string | null;
1529
+ created_at?: string;
1530
+ created_by_user_id?: string | null;
1531
+ deal_id: string;
1532
+ description?: string | null;
1533
+ due_at?: string | null;
1534
+ id?: string;
1535
+ kind?: string;
1536
+ organization_id: string;
1537
+ title: string;
1538
+ updated_at?: string;
1539
+ };
1540
+ Update: {
1541
+ assignee_user_id?: string | null;
1542
+ completed_at?: string | null;
1543
+ completed_by_user_id?: string | null;
1544
+ created_at?: string;
1545
+ created_by_user_id?: string | null;
1546
+ deal_id?: string;
1547
+ description?: string | null;
1548
+ due_at?: string | null;
1549
+ id?: string;
1550
+ kind?: string;
1551
+ organization_id?: string;
1552
+ title?: string;
1553
+ updated_at?: string;
1554
+ };
1555
+ Relationships: [
1556
+ {
1557
+ foreignKeyName: "acq_deal_tasks_deal_id_fkey";
1558
+ columns: ["deal_id"];
1559
+ isOneToOne: false;
1560
+ referencedRelation: "acq_deals";
1561
+ referencedColumns: ["id"];
1562
+ },
1563
+ {
1564
+ foreignKeyName: "acq_deal_tasks_organization_id_fkey";
1565
+ columns: ["organization_id"];
1566
+ isOneToOne: false;
1567
+ referencedRelation: "organizations";
1568
+ referencedColumns: ["id"];
1569
+ }
1570
+ ];
1571
+ };
1470
1572
  acq_deals: {
1471
1573
  Row: {
1472
1574
  activity_log: Json;
1473
- attio_deal_id: string;
1474
1575
  cached_stage: string | null;
1475
1576
  closed_lost_at: string | null;
1476
1577
  closed_lost_reason: string | null;
@@ -1505,7 +1606,6 @@ type Database = {
1505
1606
  };
1506
1607
  Insert: {
1507
1608
  activity_log?: Json;
1508
- attio_deal_id: string;
1509
1609
  cached_stage?: string | null;
1510
1610
  closed_lost_at?: string | null;
1511
1611
  closed_lost_reason?: string | null;
@@ -1540,7 +1640,6 @@ type Database = {
1540
1640
  };
1541
1641
  Update: {
1542
1642
  activity_log?: Json;
1543
- attio_deal_id?: string;
1544
1643
  cached_stage?: string | null;
1545
1644
  closed_lost_at?: string | null;
1546
1645
  closed_lost_reason?: string | null;
@@ -1597,6 +1696,106 @@ type Database = {
1597
1696
  }
1598
1697
  ];
1599
1698
  };
1699
+ acq_list_companies: {
1700
+ Row: {
1701
+ added_at: string;
1702
+ added_by: string | null;
1703
+ company_id: string;
1704
+ id: string;
1705
+ list_id: string;
1706
+ source_execution_id: string | null;
1707
+ source_input_hash: string | null;
1708
+ source_resource_id: string | null;
1709
+ stage: string | null;
1710
+ stage_updated_at: string | null;
1711
+ };
1712
+ Insert: {
1713
+ added_at?: string;
1714
+ added_by?: string | null;
1715
+ company_id: string;
1716
+ id?: string;
1717
+ list_id: string;
1718
+ source_execution_id?: string | null;
1719
+ source_input_hash?: string | null;
1720
+ source_resource_id?: string | null;
1721
+ stage?: string | null;
1722
+ stage_updated_at?: string | null;
1723
+ };
1724
+ Update: {
1725
+ added_at?: string;
1726
+ added_by?: string | null;
1727
+ company_id?: string;
1728
+ id?: string;
1729
+ list_id?: string;
1730
+ source_execution_id?: string | null;
1731
+ source_input_hash?: string | null;
1732
+ source_resource_id?: string | null;
1733
+ stage?: string | null;
1734
+ stage_updated_at?: string | null;
1735
+ };
1736
+ Relationships: [
1737
+ {
1738
+ foreignKeyName: "acq_list_companies_company_id_fkey";
1739
+ columns: ["company_id"];
1740
+ isOneToOne: false;
1741
+ referencedRelation: "acq_companies";
1742
+ referencedColumns: ["id"];
1743
+ },
1744
+ {
1745
+ foreignKeyName: "acq_list_companies_list_id_fkey";
1746
+ columns: ["list_id"];
1747
+ isOneToOne: false;
1748
+ referencedRelation: "acq_lists";
1749
+ referencedColumns: ["id"];
1750
+ },
1751
+ {
1752
+ foreignKeyName: "acq_list_companies_source_execution_id_fkey";
1753
+ columns: ["source_execution_id"];
1754
+ isOneToOne: false;
1755
+ referencedRelation: "execution_logs";
1756
+ referencedColumns: ["execution_id"];
1757
+ }
1758
+ ];
1759
+ };
1760
+ acq_list_executions: {
1761
+ Row: {
1762
+ created_at: string;
1763
+ execution_id: string;
1764
+ id: string;
1765
+ list_id: string;
1766
+ payload: Json;
1767
+ };
1768
+ Insert: {
1769
+ created_at?: string;
1770
+ execution_id: string;
1771
+ id?: string;
1772
+ list_id: string;
1773
+ payload?: Json;
1774
+ };
1775
+ Update: {
1776
+ created_at?: string;
1777
+ execution_id?: string;
1778
+ id?: string;
1779
+ list_id?: string;
1780
+ payload?: Json;
1781
+ };
1782
+ Relationships: [
1783
+ {
1784
+ foreignKeyName: "acq_list_executions_execution_id_fkey";
1785
+ columns: ["execution_id"];
1786
+ isOneToOne: false;
1787
+ referencedRelation: "execution_logs";
1788
+ referencedColumns: ["execution_id"];
1789
+ },
1790
+ {
1791
+ foreignKeyName: "acq_list_executions_list_id_fkey";
1792
+ columns: ["list_id"];
1793
+ isOneToOne: false;
1794
+ referencedRelation: "acq_lists";
1795
+ referencedColumns: ["id"];
1796
+ }
1797
+ ];
1798
+ };
1600
1799
  acq_list_members: {
1601
1800
  Row: {
1602
1801
  added_at: string;
@@ -1604,6 +1803,11 @@ type Database = {
1604
1803
  contact_id: string;
1605
1804
  id: string;
1606
1805
  list_id: string;
1806
+ source_execution_id: string | null;
1807
+ source_input_hash: string | null;
1808
+ source_resource_id: string | null;
1809
+ stage: string | null;
1810
+ stage_updated_at: string | null;
1607
1811
  };
1608
1812
  Insert: {
1609
1813
  added_at?: string;
@@ -1611,6 +1815,11 @@ type Database = {
1611
1815
  contact_id: string;
1612
1816
  id?: string;
1613
1817
  list_id: string;
1818
+ source_execution_id?: string | null;
1819
+ source_input_hash?: string | null;
1820
+ source_resource_id?: string | null;
1821
+ stage?: string | null;
1822
+ stage_updated_at?: string | null;
1614
1823
  };
1615
1824
  Update: {
1616
1825
  added_at?: string;
@@ -1618,6 +1827,11 @@ type Database = {
1618
1827
  contact_id?: string;
1619
1828
  id?: string;
1620
1829
  list_id?: string;
1830
+ source_execution_id?: string | null;
1831
+ source_input_hash?: string | null;
1832
+ source_resource_id?: string | null;
1833
+ stage?: string | null;
1834
+ stage_updated_at?: string | null;
1621
1835
  };
1622
1836
  Relationships: [
1623
1837
  {
@@ -1633,6 +1847,13 @@ type Database = {
1633
1847
  isOneToOne: false;
1634
1848
  referencedRelation: "acq_lists";
1635
1849
  referencedColumns: ["id"];
1850
+ },
1851
+ {
1852
+ foreignKeyName: "acq_list_members_source_execution_id_fkey";
1853
+ columns: ["source_execution_id"];
1854
+ isOneToOne: false;
1855
+ referencedRelation: "execution_logs";
1856
+ referencedColumns: ["execution_id"];
1636
1857
  }
1637
1858
  ];
1638
1859
  };
@@ -1640,6 +1861,7 @@ type Database = {
1640
1861
  Row: {
1641
1862
  batch_ids: string[];
1642
1863
  completed_at: string | null;
1864
+ config: Json;
1643
1865
  created_at: string;
1644
1866
  description: string | null;
1645
1867
  id: string;
@@ -1654,6 +1876,7 @@ type Database = {
1654
1876
  Insert: {
1655
1877
  batch_ids?: string[];
1656
1878
  completed_at?: string | null;
1879
+ config?: Json;
1657
1880
  created_at?: string;
1658
1881
  description?: string | null;
1659
1882
  id?: string;
@@ -1668,6 +1891,7 @@ type Database = {
1668
1891
  Update: {
1669
1892
  batch_ids?: string[];
1670
1893
  completed_at?: string | null;
1894
+ config?: Json;
1671
1895
  created_at?: string;
1672
1896
  description?: string | null;
1673
1897
  id?: string;
@@ -4068,6 +4292,7 @@ interface AcqList {
4068
4292
  launchedAt: Date | null;
4069
4293
  completedAt: Date | null;
4070
4294
  createdAt: Date;
4295
+ config: ListConfig;
4071
4296
  }
4072
4297
  /**
4073
4298
  * Company record in the acquisition database.
@@ -4126,6 +4351,92 @@ interface AcqContact {
4126
4351
  createdAt: Date;
4127
4352
  updatedAt: Date;
4128
4353
  }
4354
+ /** Task kind options for a deal task (human follow-up action type) */
4355
+ type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other';
4356
+ /**
4357
+ * A CRM to-do item attached to a deal representing a human follow-up action.
4358
+ * Transformed from AcqDealTaskRow with camelCase properties.
4359
+ */
4360
+ interface AcqDealTask {
4361
+ id: string;
4362
+ organizationId: string;
4363
+ dealId: string;
4364
+ title: string;
4365
+ description: string | null;
4366
+ kind: AcqDealTaskKind;
4367
+ dueAt: string | null;
4368
+ assigneeUserId: string | null;
4369
+ completedAt: string | null;
4370
+ completedByUserId: string | null;
4371
+ createdAt: string;
4372
+ updatedAt: string;
4373
+ createdByUserId: string | null;
4374
+ }
4375
+ /**
4376
+ * One ordered step in a list's pipeline. Maps to a deployed workflow
4377
+ * (e.g. 'lgn-03-company-qualification-workflow'). The `inputTemplate`
4378
+ * is merged with `{ listId }` at run time to form the workflow input.
4379
+ */
4380
+ interface PipelineStep {
4381
+ /** Stable key, e.g. 'scrape' | 'extract' | 'qualify' | 'discover' | 'verify' | 'personalize'. */
4382
+ key: string;
4383
+ /** Human label rendered in the UI stepper. */
4384
+ label: string;
4385
+ /** Deployed workflow resourceId (e.g. 'lgn-03-company-qualification-workflow'). */
4386
+ resourceId: string;
4387
+ /** Input defaults merged with `{ listId }` at dispatch. */
4388
+ inputTemplate: Record<string, unknown>;
4389
+ /** Whether the UI shows the Run button. */
4390
+ enabled: boolean;
4391
+ /** Display order (ascending). */
4392
+ order: number;
4393
+ }
4394
+ type CompanyListStage = 'populated' | 'extracted' | 'qualified';
4395
+ type ContactListStage = 'discovered' | 'verified' | 'personalized' | 'uploaded';
4396
+ /**
4397
+ * Per-list pipeline configuration stored as jsonb in `acq_lists.config`.
4398
+ *
4399
+ * `qualification` is the only required subtree. Every other subtree is optional
4400
+ * and inherits global defaults when omitted: workflows resolve values as
4401
+ * `list.config.foo ?? globalDefaults.foo`. Seeded rows from
4402
+ * `20260413000100_backfill_list_configs.sql` only populate `qualification`
4403
+ * and `scraping`; the rest was intentionally omitted.
4404
+ */
4405
+ interface ListConfig {
4406
+ qualification: {
4407
+ /** One-line description of the target vertical/segment. */
4408
+ targetDescription: string;
4409
+ /** Minimum Google review count to qualify. */
4410
+ minReviewCount: number;
4411
+ /** Minimum Google star rating to qualify (e.g. 3.0). */
4412
+ minRating: number;
4413
+ /** Whether to exclude franchises/chains during qualification. */
4414
+ excludeFranchises: boolean;
4415
+ /** Free-form LLM rules layered on top of the structured criteria. */
4416
+ customRules: string;
4417
+ };
4418
+ enrichment?: {
4419
+ emailDiscovery?: {
4420
+ primary: 'tomba' | 'anymailfinder';
4421
+ credentialName?: string;
4422
+ };
4423
+ emailVerification?: {
4424
+ provider: 'millionverifier';
4425
+ threshold?: 'ok' | 'ok+catch_all';
4426
+ };
4427
+ };
4428
+ personalization?: {
4429
+ industryContext?: string;
4430
+ /** Email body template with tags like {{opening_line}} / {{category_pain}}. */
4431
+ emailBody?: string;
4432
+ creativeDirection?: string;
4433
+ /** Contradiction-prevention rules layered into the personalization prompt. */
4434
+ exclusionRules?: string[];
4435
+ };
4436
+ pipeline?: {
4437
+ steps: PipelineStep[];
4438
+ };
4439
+ }
4129
4440
 
4130
4441
  /**
4131
4442
  * Lead Service Types
@@ -4149,10 +4460,12 @@ interface CreateListParams {
4149
4460
  instantlyCampaignId?: string;
4150
4461
  status?: string;
4151
4462
  metadata?: Record<string, unknown>;
4463
+ config?: ListConfig;
4152
4464
  }
4153
4465
  interface UpdateListParams {
4154
4466
  name?: string;
4155
4467
  description?: string;
4468
+ status?: string;
4156
4469
  }
4157
4470
  interface CreateCompanyParams {
4158
4471
  organizationId: string;
@@ -4183,14 +4496,14 @@ interface UpdateCompanyParams {
4183
4496
  pipelineStatus?: Record<string, unknown>;
4184
4497
  enrichmentData?: Record<string, unknown>;
4185
4498
  source?: string;
4186
- /** Attio Company record ID - set when company is added to CRM. Pass null to clear. */
4187
- attioCompanyId?: string | null;
4188
4499
  batchId?: string;
4189
4500
  status?: 'active' | 'invalid';
4190
4501
  verticalResearch?: string | null;
4191
4502
  }
4192
4503
  type UpsertCompanyParams = CreateCompanyParams;
4193
4504
  interface CompanyFilters {
4505
+ listId?: string;
4506
+ search?: string;
4194
4507
  domain?: string;
4195
4508
  website?: string;
4196
4509
  segment?: string;
@@ -4227,13 +4540,12 @@ interface UpdateContactParams {
4227
4540
  openingLine?: string;
4228
4541
  pipelineStatus?: Record<string, unknown>;
4229
4542
  enrichmentData?: Record<string, unknown>;
4230
- /** Attio Person record ID - set when contact responds and is added to CRM. Pass null to clear. */
4231
- attioPersonId?: string | null;
4232
4543
  status?: 'active' | 'invalid';
4233
4544
  }
4234
4545
  type UpsertContactParams = CreateContactParams;
4235
4546
  interface ContactFilters {
4236
4547
  listId?: string;
4548
+ search?: string;
4237
4549
  openingLineIsNull?: boolean;
4238
4550
  pipelineStatus?: Record<string, unknown>;
4239
4551
  batchId?: string;
@@ -4241,9 +4553,7 @@ interface ContactFilters {
4241
4553
  }
4242
4554
  interface UpsertDealParams {
4243
4555
  organizationId: string;
4244
- /** Attio Deal record ID (required link to CRM) */
4245
- attioDealId: string;
4246
- /** Contact email for lookup when Attio Deal ID is unknown */
4556
+ /** Contact email dedupe key together with organization_id */
4247
4557
  contactEmail: string;
4248
4558
  /** Optional contact ID for foreign key join */
4249
4559
  contactId?: string;
@@ -4281,19 +4591,19 @@ interface MarkProposalReviewedParams {
4281
4591
  }
4282
4592
  interface UpdateCloseLostReasonParams {
4283
4593
  organizationId: string;
4284
- attioDealId: string;
4594
+ dealId: string;
4285
4595
  reason: string;
4286
4596
  }
4287
4597
  interface UpdateFeesParams {
4288
4598
  organizationId: string;
4289
4599
  contactEmail?: string;
4290
- attioDealId?: string;
4600
+ dealId?: string;
4291
4601
  initialFee?: number;
4292
4602
  monthlyFee?: number;
4293
4603
  }
4294
4604
  interface SyncDealStageParams {
4295
4605
  organizationId: string;
4296
- attioDealId: string;
4606
+ dealId: string;
4297
4607
  stage: string;
4298
4608
  }
4299
4609
  interface SetContactNurtureParams {
@@ -4307,18 +4617,30 @@ interface CancelSchedulesAndHitlByEmailParams {
4307
4617
  }
4308
4618
  interface CancelHitlByDealIdParams {
4309
4619
  organizationId: string;
4310
- attioDealId: string;
4620
+ dealId: string;
4311
4621
  }
4312
4622
  interface ClearDealFieldsParams {
4313
4623
  organizationId: string;
4314
4624
  contactEmail?: string;
4315
- attioDealId?: string;
4625
+ dealId?: string;
4316
4626
  fields: ('proposalPdfUrl' | 'proposalStatus' | 'proposalGeneratedAt' | 'initialFee' | 'monthlyFee' | 'closedLostReason' | 'closedLostAt' | 'discoveryData' | 'discoverySubmittedAt')[];
4317
4627
  }
4318
4628
  interface DeleteDealParams {
4319
4629
  organizationId: string;
4320
4630
  dealId: string;
4321
4631
  }
4632
+ interface GetDealByIdParams {
4633
+ dealId: string;
4634
+ organizationId: string;
4635
+ }
4636
+ interface GetContactByIdParams {
4637
+ contactId: string;
4638
+ organizationId: string;
4639
+ }
4640
+ interface GetCompanyByIdParams {
4641
+ companyId: string;
4642
+ organizationId: string;
4643
+ }
4322
4644
  interface UpsertSocialPostParams {
4323
4645
  organizationId: string;
4324
4646
  platform: string;
@@ -4346,7 +4668,6 @@ interface UpsertSocialPostsResult {
4346
4668
  interface AcqDeal {
4347
4669
  id: string;
4348
4670
  organizationId: string;
4349
- attioDealId: string;
4350
4671
  contactEmail: string;
4351
4672
  cachedStage?: string | null;
4352
4673
  discoveryData?: Json | null;
@@ -4365,9 +4686,60 @@ interface DealActivityEntry {
4365
4686
  type: string;
4366
4687
  title: string;
4367
4688
  description?: string;
4368
- metadata?: Record<string, unknown>;
4689
+ payload?: Record<string, unknown>;
4369
4690
  occurredAt: string;
4370
- actor?: string;
4691
+ }
4692
+ interface AcqDealNote {
4693
+ id: string;
4694
+ dealId: string;
4695
+ organizationId: string;
4696
+ authorUserId: string | null;
4697
+ body: string;
4698
+ createdAt: string;
4699
+ updatedAt: string;
4700
+ }
4701
+ interface CreateDealNoteParams {
4702
+ organizationId: string;
4703
+ dealId: string;
4704
+ body: string;
4705
+ authorUserId?: string;
4706
+ }
4707
+ interface ListDealNotesParams {
4708
+ organizationId: string;
4709
+ dealId: string;
4710
+ }
4711
+ interface CreateDealTaskParams {
4712
+ organizationId: string;
4713
+ dealId: string;
4714
+ title: string;
4715
+ description?: string | null;
4716
+ kind?: AcqDealTaskKind;
4717
+ dueAt?: string | null;
4718
+ assigneeUserId?: string | null;
4719
+ createdByUserId?: string | null;
4720
+ }
4721
+ interface ListDealTasksParams {
4722
+ organizationId: string;
4723
+ dealId: string;
4724
+ }
4725
+ interface ListDealTasksDueParams {
4726
+ organizationId: string;
4727
+ assigneeUserId?: string | null;
4728
+ /** Window filter: 'overdue' = past due, 'today' = due today only, 'today_and_overdue' (default) = both, 'upcoming' = future */
4729
+ window?: 'overdue' | 'today' | 'today_and_overdue' | 'upcoming';
4730
+ }
4731
+ interface CompleteDealTaskParams {
4732
+ organizationId: string;
4733
+ taskId: string;
4734
+ completedByUserId: string | null;
4735
+ }
4736
+ interface RecordDealActivityParams {
4737
+ organizationId: string;
4738
+ dealId: string;
4739
+ type: string;
4740
+ title: string;
4741
+ description?: string;
4742
+ payload?: Record<string, unknown>;
4371
4743
  }
4372
4744
  interface DealStageSummary {
4373
4745
  stage: string;
@@ -4403,6 +4775,26 @@ interface AddContactsToListResult {
4403
4775
  added: number;
4404
4776
  alreadyExisted: number;
4405
4777
  }
4778
+ interface UpdateCompanyStageParams {
4779
+ organizationId: string;
4780
+ listId: string;
4781
+ companyId: string;
4782
+ stage: CompanyListStage;
4783
+ executionId?: string;
4784
+ }
4785
+ interface UpdateContactStageParams {
4786
+ organizationId: string;
4787
+ listId: string;
4788
+ contactId: string;
4789
+ stage: ContactListStage;
4790
+ executionId?: string;
4791
+ }
4792
+ interface RecordListExecutionParams {
4793
+ organizationId: string;
4794
+ listId: string;
4795
+ executionId: string;
4796
+ configSnapshot?: Record<string, unknown>;
4797
+ }
4406
4798
  interface BulkImportParams {
4407
4799
  organizationId: string;
4408
4800
  contacts: CreateContactParams[];
@@ -6051,7 +6443,6 @@ interface ListPaymentLinksResult {
6051
6443
  */
6052
6444
  interface CreateAutoPaymentLinkParams {
6053
6445
  dealId: string;
6054
- attioDealId: string;
6055
6446
  companyName: string;
6056
6447
  contactEmail: string;
6057
6448
  initialFee: number;
@@ -6649,17 +7040,23 @@ type LeadToolMap = {
6649
7040
  };
6650
7041
  updateDealEnvelopeId: {
6651
7042
  params: {
6652
- attioDealId: string;
7043
+ dealId: string;
6653
7044
  envelopeId: string;
6654
7045
  };
6655
7046
  result: AcqDeal | null;
6656
7047
  };
6657
- getDealByAttioId: {
6658
- params: {
6659
- attioDealId: string;
6660
- };
7048
+ getDealById: {
7049
+ params: Omit<GetDealByIdParams, 'organizationId'>;
6661
7050
  result: AcqDeal | null;
6662
7051
  };
7052
+ getContactById: {
7053
+ params: Omit<GetContactByIdParams, 'organizationId'>;
7054
+ result: AcqContact | null;
7055
+ };
7056
+ getCompanyById: {
7057
+ params: Omit<GetCompanyByIdParams, 'organizationId'>;
7058
+ result: AcqCompany | null;
7059
+ };
6663
7060
  updateDiscoveryData: {
6664
7061
  params: Omit<UpdateDiscoveryDataParams, 'organizationId'>;
6665
7062
  result: void;
@@ -6713,26 +7110,34 @@ type LeadToolMap = {
6713
7110
  params: Omit<DeleteDealParams, 'organizationId'>;
6714
7111
  result: void;
6715
7112
  };
6716
- recordReply: {
6717
- params: {
6718
- contactEmail: string;
6719
- replyText: string;
6720
- replySubject?: string;
6721
- campaignName?: string;
6722
- };
6723
- result: void;
6724
- };
6725
7113
  recordDealActivity: {
6726
- params: {
6727
- attioDealId?: string;
6728
- contactEmail?: string;
6729
- type: string;
6730
- title: string;
6731
- description?: string;
6732
- metadata?: Record<string, unknown>;
6733
- };
7114
+ params: Omit<RecordDealActivityParams, 'organizationId'>;
6734
7115
  result: void;
6735
7116
  };
7117
+ createDealNote: {
7118
+ params: Omit<CreateDealNoteParams, 'organizationId'>;
7119
+ result: AcqDealNote;
7120
+ };
7121
+ listDealNotes: {
7122
+ params: Omit<ListDealNotesParams, 'organizationId'>;
7123
+ result: AcqDealNote[];
7124
+ };
7125
+ createDealTask: {
7126
+ params: Omit<CreateDealTaskParams, 'organizationId'>;
7127
+ result: AcqDealTask;
7128
+ };
7129
+ listDealTasks: {
7130
+ params: Omit<ListDealTasksParams, 'organizationId'>;
7131
+ result: AcqDealTask[];
7132
+ };
7133
+ listDealTasksDue: {
7134
+ params: Omit<ListDealTasksDueParams, 'organizationId'>;
7135
+ result: AcqDealTask[];
7136
+ };
7137
+ completeDealTask: {
7138
+ params: Omit<CompleteDealTaskParams, 'organizationId'>;
7139
+ result: AcqDealTask;
7140
+ };
6736
7141
  listDeals: {
6737
7142
  params: DealFilters;
6738
7143
  result: AcqDeal[];
@@ -6758,6 +7163,26 @@ type LeadToolMap = {
6758
7163
  result: UpsertSocialPostsResult;
6759
7164
  };
6760
7165
  };
7166
+ type ListToolMap = {
7167
+ getConfig: {
7168
+ params: {
7169
+ listId: string;
7170
+ };
7171
+ result: ListConfig;
7172
+ };
7173
+ recordExecution: {
7174
+ params: Omit<RecordListExecutionParams, 'organizationId'>;
7175
+ result: void;
7176
+ };
7177
+ updateCompanyStage: {
7178
+ params: Omit<UpdateCompanyStageParams, 'organizationId'>;
7179
+ result: void;
7180
+ };
7181
+ updateContactStage: {
7182
+ params: Omit<UpdateContactStageParams, 'organizationId'>;
7183
+ result: void;
7184
+ };
7185
+ };
6761
7186
  type PdfToolMap = {
6762
7187
  render: {
6763
7188
  params: {
@@ -7554,8 +7979,10 @@ interface ElevasConfig {
7554
7979
  * Directory (relative to CWD) to scan for deployable documentation.
7555
7980
  * Defaults to 'docs'. Use '../docs' when running the SDK from a subdirectory
7556
7981
  * and wanting to consolidate docs at the project root.
7982
+ *
7983
+ * Set to `false` to disable documentation scanning entirely.
7557
7984
  */
7558
- docsDir?: string;
7985
+ docsDir?: string | false;
7559
7986
  }
7560
7987
 
7561
7988
  /**
@@ -7586,4 +8013,4 @@ declare class ToolingError extends ExecutionError {
7586
8013
  }
7587
8014
 
7588
8015
  export { ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError };
7589
- export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
8016
+ export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };