@elevasis/core 0.30.0 → 0.31.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.
@@ -1368,77 +1368,77 @@ export interface DeploymentSpec {
1368
1368
  ### `AcqCompany`
1369
1369
 
1370
1370
  ```typescript
1371
- /**
1372
- * Company record in the acquisition database.
1373
- * Contains enriched company data from various sources.
1374
- * Transformed from AcqCompanyRow with camelCase properties.
1375
- */
1376
- export interface AcqCompany {
1377
- id: string
1378
- organizationId: string
1379
- name: string
1380
- domain: string | null
1381
- linkedinUrl: string | null
1382
- website: string | null
1383
- numEmployees: number | null
1384
- foundedYear: number | null
1385
- locationCity: string | null
1386
- locationState: string | null
1387
- category: string | null
1388
- categoryPain: string | null
1389
- segment: string | null
1390
- processingState: CompanyProcessingState | null
1391
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1392
- pipelineStatus?: LegacyPipelineStatus | null
1393
- enrichmentData: CompanyEnrichmentData | null
1394
- source: string | null
1395
- batchId: string | null
1396
- status: 'active' | 'invalid'
1397
- verticalResearch: string | null
1398
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1399
- qualificationScore: number | null
1400
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1401
- qualificationSignals: Record<string, unknown> | null
1402
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1403
- qualificationRubricKey: string | null
1404
- createdAt: Date
1405
- updatedAt: Date
1371
+ /**
1372
+ * Company record in the acquisition database.
1373
+ * Contains enriched company data from various sources.
1374
+ * Transformed from AcqCompanyRow with camelCase properties.
1375
+ */
1376
+ export interface AcqCompany {
1377
+ id: string
1378
+ organizationId: string
1379
+ name: string
1380
+ domain: string | null
1381
+ linkedinUrl: string | null
1382
+ website: string | null
1383
+ numEmployees: number | null
1384
+ foundedYear: number | null
1385
+ locationCity: string | null
1386
+ locationState: string | null
1387
+ category: string | null
1388
+ categoryPain: string | null
1389
+ segment: string | null
1390
+ processingState: CompanyProcessingState | null
1391
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1392
+ pipelineStatus?: LegacyPipelineStatus | null
1393
+ enrichmentData: CompanyEnrichmentData | null
1394
+ source: string | null
1395
+ batchId: string | null
1396
+ status: 'active' | 'invalid'
1397
+ verticalResearch: string | null
1398
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1399
+ qualificationScore: number | null
1400
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1401
+ qualificationSignals: Record<string, unknown> | null
1402
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1403
+ qualificationRubricKey: string | null
1404
+ createdAt: Date
1405
+ updatedAt: Date
1406
1406
  }
1407
1407
  ```
1408
1408
 
1409
1409
  ### `AcqContact`
1410
1410
 
1411
1411
  ```typescript
1412
- /**
1413
- * Contact record in the acquisition database.
1414
- * Contains enriched contact data and personalization content.
1415
- * Transformed from AcqContactRow with camelCase properties.
1416
- */
1417
- export interface AcqContact {
1418
- id: string
1419
- organizationId: string
1420
- companyId: string | null
1421
- email: string
1422
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1423
- firstName: string | null
1424
- lastName: string | null
1425
- linkedinUrl: string | null
1426
- title: string | null
1427
- headline: string | null
1428
- filterReason: string | null
1429
- openingLine: string | null
1430
- source: string | null
1431
- sourceId: string | null
1432
- processingState: ContactProcessingState | null
1433
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1434
- pipelineStatus?: LegacyPipelineStatus | null
1435
- enrichmentData: ContactEnrichmentData | null
1436
- /** Attio Person record ID - set when contact responds and is added to CRM */
1437
- attioPersonId: string | null
1438
- batchId: string | null
1439
- status: 'active' | 'invalid'
1440
- createdAt: Date
1441
- updatedAt: Date
1412
+ /**
1413
+ * Contact record in the acquisition database.
1414
+ * Contains enriched contact data and personalization content.
1415
+ * Transformed from AcqContactRow with camelCase properties.
1416
+ */
1417
+ export interface AcqContact {
1418
+ id: string
1419
+ organizationId: string
1420
+ companyId: string | null
1421
+ email: string
1422
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1423
+ firstName: string | null
1424
+ lastName: string | null
1425
+ linkedinUrl: string | null
1426
+ title: string | null
1427
+ headline: string | null
1428
+ filterReason: string | null
1429
+ openingLine: string | null
1430
+ source: string | null
1431
+ sourceId: string | null
1432
+ processingState: ContactProcessingState | null
1433
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
1434
+ pipelineStatus?: LegacyPipelineStatus | null
1435
+ enrichmentData: ContactEnrichmentData | null
1436
+ /** Attio Person record ID - set when contact responds and is added to CRM */
1437
+ attioPersonId: string | null
1438
+ batchId: string | null
1439
+ status: 'active' | 'invalid'
1440
+ createdAt: Date
1441
+ updatedAt: Date
1442
1442
  }
1443
1443
  ```
1444
1444
 
@@ -1457,23 +1457,23 @@ export type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waitin
1457
1457
  ### `DealPriority`
1458
1458
 
1459
1459
  ```typescript
1460
- export interface DealPriority {
1461
- bucketKey: DealPriorityBucketKey
1462
- rank: number
1463
- label: string
1464
- color: string
1465
- reason: string
1466
- latestActivityAt: string | null
1467
- nextActionAt: string | null
1460
+ export interface DealPriority {
1461
+ bucketKey: DealPriorityBucketKey
1462
+ rank: number
1463
+ label: string
1464
+ color: string
1465
+ reason: string
1466
+ latestActivityAt: string | null
1467
+ nextActionAt: string | null
1468
1468
  }
1469
1469
  ```
1470
1470
 
1471
1471
  ### `KanbanStageConfig`
1472
1472
 
1473
1473
  ```typescript
1474
- export interface KanbanStageConfig {
1475
- color: string // Mantine color token (e.g. 'blue', 'teal')
1476
- label?: string // Optional display label override
1474
+ export interface KanbanStageConfig {
1475
+ color: string // Mantine color token (e.g. 'blue', 'teal')
1476
+ label?: string // Optional display label override
1477
1477
  }
1478
1478
  ```
1479
1479
 
@@ -1486,49 +1486,49 @@ export type KanbanBoardConfig = Partial<Record<DealStage, KanbanStageConfig>>
1486
1486
  ### `DealContact`
1487
1487
 
1488
1488
  ```typescript
1489
- export interface DealContact {
1490
- id: string
1491
- first_name: string | null
1492
- last_name: string | null
1493
- email: string
1494
- title: string | null
1495
- headline: string | null
1496
- linkedin_url: string | null
1497
- processing_state: Record<string, unknown> | null
1498
- enrichment_data: Record<string, unknown> | null
1499
- company: {
1500
- id: string
1501
- name: string
1502
- domain: string | null
1503
- website: string | null
1504
- linkedin_url: string | null
1505
- segment: string | null
1506
- category: string | null
1507
- num_employees: number | null
1508
- } | null
1489
+ export interface DealContact {
1490
+ id: string
1491
+ first_name: string | null
1492
+ last_name: string | null
1493
+ email: string
1494
+ title: string | null
1495
+ headline: string | null
1496
+ linkedin_url: string | null
1497
+ processing_state: Record<string, unknown> | null
1498
+ enrichment_data: Record<string, unknown> | null
1499
+ company: {
1500
+ id: string
1501
+ name: string
1502
+ domain: string | null
1503
+ website: string | null
1504
+ linkedin_url: string | null
1505
+ segment: string | null
1506
+ category: string | null
1507
+ num_employees: number | null
1508
+ } | null
1509
1509
  }
1510
1510
  ```
1511
1511
 
1512
1512
  ### `DealFilters`
1513
1513
 
1514
1514
  ```typescript
1515
- export interface DealFilters {
1516
- stage?: DealStage
1517
- search?: string
1518
- limit?: number
1519
- offset?: number
1515
+ export interface DealFilters {
1516
+ stage?: DealStage
1517
+ search?: string
1518
+ limit?: number
1519
+ offset?: number
1520
1520
  }
1521
1521
  ```
1522
1522
 
1523
1523
  ### `DealListItem`
1524
1524
 
1525
1525
  ```typescript
1526
- /** Deal list item with joined contact and company data */
1527
- export interface DealListItem extends AcqDealRow {
1528
- priority: DealPriority
1529
- ownership: 'us' | 'them' | null
1530
- nextAction: string | null
1531
- contact: DealContact | null
1526
+ /** Deal list item with joined contact and company data */
1527
+ export interface DealListItem extends AcqDealRow {
1528
+ priority: DealPriority
1529
+ ownership: 'us' | 'them' | null
1530
+ nextAction: string | null
1531
+ contact: DealContact | null
1532
1532
  }
1533
1533
  ```
1534
1534
 
@@ -1541,31 +1541,31 @@ export type DealDetail = DealListItem
1541
1541
  ### `AcqDealTaskKind`
1542
1542
 
1543
1543
  ```typescript
1544
- /** Task kind options for a deal task (human follow-up action type) */
1544
+ /** Task kind options for a deal task (human follow-up action type) */
1545
1545
  export type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other'
1546
1546
  ```
1547
1547
 
1548
1548
  ### `AcqDealTask`
1549
1549
 
1550
1550
  ```typescript
1551
- /**
1552
- * A CRM to-do item attached to a deal representing a human follow-up action.
1553
- * Transformed from AcqDealTaskRow with camelCase properties.
1554
- */
1555
- export interface AcqDealTask {
1556
- id: string
1557
- organizationId: string
1558
- dealId: string
1559
- title: string
1560
- description: string | null
1561
- kind: AcqDealTaskKind
1562
- dueAt: string | null
1563
- assigneeUserId: string | null
1564
- completedAt: string | null
1565
- completedByUserId: string | null
1566
- createdAt: string
1567
- updatedAt: string
1568
- createdByUserId: string | null
1551
+ /**
1552
+ * A CRM to-do item attached to a deal representing a human follow-up action.
1553
+ * Transformed from AcqDealTaskRow with camelCase properties.
1554
+ */
1555
+ export interface AcqDealTask {
1556
+ id: string
1557
+ organizationId: string
1558
+ dealId: string
1559
+ title: string
1560
+ description: string | null
1561
+ kind: AcqDealTaskKind
1562
+ dueAt: string | null
1563
+ assigneeUserId: string | null
1564
+ completedAt: string | null
1565
+ completedByUserId: string | null
1566
+ createdAt: string
1567
+ updatedAt: string
1568
+ createdByUserId: string | null
1569
1569
  }
1570
1570
  ```
1571
1571
 
@@ -1979,222 +1979,222 @@ export type CrmToolMap = {
1979
1979
  ### `WebPost`
1980
1980
 
1981
1981
  ```typescript
1982
- /**
1983
- * Represents a web post from company website scraping.
1984
- * Used for recent blog posts, news, or announcements.
1985
- */
1986
- export interface WebPost {
1987
- /** ISO date string of when the post was published */
1988
- date: string
1989
- /** Title of the web post */
1990
- title: string
1991
- /** Brief summary of the post content */
1992
- summary: string
1993
- /** AI-generated insight about the post's relevance */
1994
- aiInsight?: string
1982
+ /**
1983
+ * Represents a web post from company website scraping.
1984
+ * Used for recent blog posts, news, or announcements.
1985
+ */
1986
+ export interface WebPost {
1987
+ /** ISO date string of when the post was published */
1988
+ date: string
1989
+ /** Title of the web post */
1990
+ title: string
1991
+ /** Brief summary of the post content */
1992
+ summary: string
1993
+ /** AI-generated insight about the post's relevance */
1994
+ aiInsight?: string
1995
1995
  }
1996
1996
  ```
1997
1997
 
1998
1998
  ### `CompanyEnrichmentData`
1999
1999
 
2000
2000
  ```typescript
2001
- /**
2002
- * Enrichment data collected for a company from various sources.
2003
- */
2004
- export interface CompanyEnrichmentData {
2005
- googleMaps?: {
2006
- placeId?: string
2007
- totalScore?: number
2008
- reviewsCount?: number
2009
- address?: string
2010
- phone?: string
2011
- categoryName?: string
2012
- googleMapsUrl?: string
2013
- scrapedAt?: string
2014
- }
2015
- websiteCrawl?: {
2016
- companyDescription?: string
2017
- services?: string[]
2018
- specialties?: string[]
2019
- staff?: Array<{ name: string; title?: string; email?: string }>
2020
- automationGaps?: string[]
2021
- targetAudience?: string
2022
- category?: string
2023
- segment?: string
2024
- recentWin?: string
2025
- emailCount?: number
2026
- pageCount?: number
2027
- totalChars?: number
2028
- crawledAt?: string
2029
- extractedAt?: string
2030
- }
2031
- website?: {
2032
- missionVision?: string
2033
- uniqueAttributes?: string
2034
- coreOfferings?: string
2035
- targetAudience?: string
2036
- companyValues?: string
2037
- businessDescription?: string
2038
- recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
2039
- }
2040
- tomba?: {
2041
- waterfallEmail?: {
2042
- email: string
2043
- name?: string
2044
- title?: string
2045
- department?: string
2046
- } | null
2047
- genericEmail?: string | null
2048
- totalFound?: number
2049
- searchedAt?: string
2050
- }
2001
+ /**
2002
+ * Enrichment data collected for a company from various sources.
2003
+ */
2004
+ export interface CompanyEnrichmentData {
2005
+ googleMaps?: {
2006
+ placeId?: string
2007
+ totalScore?: number
2008
+ reviewsCount?: number
2009
+ address?: string
2010
+ phone?: string
2011
+ categoryName?: string
2012
+ googleMapsUrl?: string
2013
+ scrapedAt?: string
2014
+ }
2015
+ websiteCrawl?: {
2016
+ companyDescription?: string
2017
+ services?: string[]
2018
+ specialties?: string[]
2019
+ staff?: Array<{ name: string; title?: string; email?: string }>
2020
+ automationGaps?: string[]
2021
+ targetAudience?: string
2022
+ category?: string
2023
+ segment?: string
2024
+ recentWin?: string
2025
+ emailCount?: number
2026
+ pageCount?: number
2027
+ totalChars?: number
2028
+ crawledAt?: string
2029
+ extractedAt?: string
2030
+ }
2031
+ website?: {
2032
+ missionVision?: string
2033
+ uniqueAttributes?: string
2034
+ coreOfferings?: string
2035
+ targetAudience?: string
2036
+ companyValues?: string
2037
+ businessDescription?: string
2038
+ recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
2039
+ }
2040
+ tomba?: {
2041
+ waterfallEmail?: {
2042
+ email: string
2043
+ name?: string
2044
+ title?: string
2045
+ department?: string
2046
+ } | null
2047
+ genericEmail?: string | null
2048
+ totalFound?: number
2049
+ searchedAt?: string
2050
+ }
2051
2051
  }
2052
2052
  ```
2053
2053
 
2054
2054
  ### `ContactEnrichmentData`
2055
2055
 
2056
2056
  ```typescript
2057
- /**
2058
- * Enrichment data collected for a contact from various sources.
2059
- */
2060
- export interface ContactEnrichmentData {
2061
- linkedin?: {
2062
- summary?: string
2063
- pastExperience?: string
2064
- education?: string
2065
- activity?: Array<{ date?: string; content?: string }>
2066
- }
2057
+ /**
2058
+ * Enrichment data collected for a contact from various sources.
2059
+ */
2060
+ export interface ContactEnrichmentData {
2061
+ linkedin?: {
2062
+ summary?: string
2063
+ pastExperience?: string
2064
+ education?: string
2065
+ activity?: Array<{ date?: string; content?: string }>
2066
+ }
2067
2067
  }
2068
2068
  ```
2069
2069
 
2070
2070
  ### `AcqList`
2071
2071
 
2072
2072
  ```typescript
2073
- export interface AcqList {
2074
- id: string
2075
- organizationId: string
2076
- name: string
2077
- description: string | null
2078
- batchIds: string[]
2079
- instantlyCampaignId: string | null
2080
- status: ListStatus
2081
- scrapingConfig: ScrapingConfig
2082
- icp: IcpRubric
2083
- pipelineConfig: PipelineConfig
2084
- metadata: AcqListMetadata
2085
- launchedAt: Date | null
2086
- completedAt: Date | null
2087
- createdAt: Date
2073
+ export interface AcqList {
2074
+ id: string
2075
+ organizationId: string
2076
+ name: string
2077
+ description: string | null
2078
+ batchIds: string[]
2079
+ instantlyCampaignId: string | null
2080
+ status: ListStatus
2081
+ scrapingConfig: ScrapingConfig
2082
+ icp: IcpRubric
2083
+ pipelineConfig: PipelineConfig
2084
+ metadata: AcqListMetadata
2085
+ launchedAt: Date | null
2086
+ completedAt: Date | null
2087
+ createdAt: Date
2088
2088
  }
2089
2089
  ```
2090
2090
 
2091
2091
  ### `AcqCompany`
2092
2092
 
2093
2093
  ```typescript
2094
- /**
2095
- * Company record in the acquisition database.
2096
- * Contains enriched company data from various sources.
2097
- * Transformed from AcqCompanyRow with camelCase properties.
2098
- */
2099
- export interface AcqCompany {
2100
- id: string
2101
- organizationId: string
2102
- name: string
2103
- domain: string | null
2104
- linkedinUrl: string | null
2105
- website: string | null
2106
- numEmployees: number | null
2107
- foundedYear: number | null
2108
- locationCity: string | null
2109
- locationState: string | null
2110
- category: string | null
2111
- categoryPain: string | null
2112
- segment: string | null
2113
- processingState: CompanyProcessingState | null
2114
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2115
- pipelineStatus?: LegacyPipelineStatus | null
2116
- enrichmentData: CompanyEnrichmentData | null
2117
- source: string | null
2118
- batchId: string | null
2119
- status: 'active' | 'invalid'
2120
- verticalResearch: string | null
2121
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
2122
- qualificationScore: number | null
2123
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
2124
- qualificationSignals: Record<string, unknown> | null
2125
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
2126
- qualificationRubricKey: string | null
2127
- createdAt: Date
2128
- updatedAt: Date
2094
+ /**
2095
+ * Company record in the acquisition database.
2096
+ * Contains enriched company data from various sources.
2097
+ * Transformed from AcqCompanyRow with camelCase properties.
2098
+ */
2099
+ export interface AcqCompany {
2100
+ id: string
2101
+ organizationId: string
2102
+ name: string
2103
+ domain: string | null
2104
+ linkedinUrl: string | null
2105
+ website: string | null
2106
+ numEmployees: number | null
2107
+ foundedYear: number | null
2108
+ locationCity: string | null
2109
+ locationState: string | null
2110
+ category: string | null
2111
+ categoryPain: string | null
2112
+ segment: string | null
2113
+ processingState: CompanyProcessingState | null
2114
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2115
+ pipelineStatus?: LegacyPipelineStatus | null
2116
+ enrichmentData: CompanyEnrichmentData | null
2117
+ source: string | null
2118
+ batchId: string | null
2119
+ status: 'active' | 'invalid'
2120
+ verticalResearch: string | null
2121
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
2122
+ qualificationScore: number | null
2123
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
2124
+ qualificationSignals: Record<string, unknown> | null
2125
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
2126
+ qualificationRubricKey: string | null
2127
+ createdAt: Date
2128
+ updatedAt: Date
2129
2129
  }
2130
2130
  ```
2131
2131
 
2132
2132
  ### `AcqContact`
2133
2133
 
2134
2134
  ```typescript
2135
- /**
2136
- * Contact record in the acquisition database.
2137
- * Contains enriched contact data and personalization content.
2138
- * Transformed from AcqContactRow with camelCase properties.
2139
- */
2140
- export interface AcqContact {
2141
- id: string
2142
- organizationId: string
2143
- companyId: string | null
2144
- email: string
2145
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
2146
- firstName: string | null
2147
- lastName: string | null
2148
- linkedinUrl: string | null
2149
- title: string | null
2150
- headline: string | null
2151
- filterReason: string | null
2152
- openingLine: string | null
2153
- source: string | null
2154
- sourceId: string | null
2155
- processingState: ContactProcessingState | null
2156
- /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2157
- pipelineStatus?: LegacyPipelineStatus | null
2158
- enrichmentData: ContactEnrichmentData | null
2159
- /** Attio Person record ID - set when contact responds and is added to CRM */
2160
- attioPersonId: string | null
2161
- batchId: string | null
2162
- status: 'active' | 'invalid'
2163
- createdAt: Date
2164
- updatedAt: Date
2135
+ /**
2136
+ * Contact record in the acquisition database.
2137
+ * Contains enriched contact data and personalization content.
2138
+ * Transformed from AcqContactRow with camelCase properties.
2139
+ */
2140
+ export interface AcqContact {
2141
+ id: string
2142
+ organizationId: string
2143
+ companyId: string | null
2144
+ email: string
2145
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
2146
+ firstName: string | null
2147
+ lastName: string | null
2148
+ linkedinUrl: string | null
2149
+ title: string | null
2150
+ headline: string | null
2151
+ filterReason: string | null
2152
+ openingLine: string | null
2153
+ source: string | null
2154
+ sourceId: string | null
2155
+ processingState: ContactProcessingState | null
2156
+ /** @deprecated Use `processingState`. This legacy DB column has been removed; responses return null. */
2157
+ pipelineStatus?: LegacyPipelineStatus | null
2158
+ enrichmentData: ContactEnrichmentData | null
2159
+ /** Attio Person record ID - set when contact responds and is added to CRM */
2160
+ attioPersonId: string | null
2161
+ batchId: string | null
2162
+ status: 'active' | 'invalid'
2163
+ createdAt: Date
2164
+ updatedAt: Date
2165
2165
  }
2166
2166
  ```
2167
2167
 
2168
2168
  ### `ListTelemetry`
2169
2169
 
2170
2170
  ```typescript
2171
- /**
2172
- * Live-scan aggregate telemetry for a single list, computed on demand from
2173
- * the list junction tables and current contact deliverability state.
2174
- * `stageCounts` are attempted counts from list-row processing_state.
2175
- */
2176
- export interface ListTelemetry {
2177
- listId: string
2178
- totalCompanies: number
2179
- totalContacts: number
2180
- stageCounts: {
2181
- populated: number
2182
- extracted: number
2183
- qualified: number
2184
- discovered: number
2185
- verified: number
2186
- personalized: number
2187
- uploaded: number
2188
- }
2189
- deliverability: {
2190
- valid: number
2191
- risky: number
2192
- invalid: number
2193
- unknown: number
2194
- bounced: number
2195
- }
2196
- /** Reserved -- active workflow IDs associated with this list. */
2197
- activeWorkflows?: string[]
2171
+ /**
2172
+ * Live-scan aggregate telemetry for a single list, computed on demand from
2173
+ * the list junction tables and current contact deliverability state.
2174
+ * `stageCounts` are attempted counts from list-row processing_state.
2175
+ */
2176
+ export interface ListTelemetry {
2177
+ listId: string
2178
+ totalCompanies: number
2179
+ totalContacts: number
2180
+ stageCounts: {
2181
+ populated: number
2182
+ extracted: number
2183
+ qualified: number
2184
+ discovered: number
2185
+ verified: number
2186
+ personalized: number
2187
+ uploaded: number
2188
+ }
2189
+ deliverability: {
2190
+ valid: number
2191
+ risky: number
2192
+ invalid: number
2193
+ unknown: number
2194
+ bounced: number
2195
+ }
2196
+ /** Reserved -- active workflow IDs associated with this list. */
2197
+ activeWorkflows?: string[]
2198
2198
  }
2199
2199
  ```
2200
2200
 
@@ -2918,6 +2918,7 @@ export const AcqListSchemas = {
2918
2918
  ScrapingConfig: ScrapingConfigSchema,
2919
2919
  IcpRubric: IcpRubricSchema,
2920
2920
  PipelineConfig: PipelineConfigSchema,
2921
+ DataMode: DataModeSchema,
2921
2922
  PipelineStage: PipelineStageSchema,
2922
2923
  BuildPlanSnapshot: BuildPlanSnapshotSchema,
2923
2924
  BuildPlanSnapshotStep: BuildPlanSnapshotStepSchema,
@@ -3071,100 +3072,6 @@ export interface StatefulPipelineDefinition {
3071
3072
  }
3072
3073
  ```
3073
3074
 
3074
- ### `ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE`
3075
-
3076
- ```typescript
3077
- /**
3078
- * Lead-gen pipeline definition for acq_list_members (contacts).
3079
- * Three stages matching the post-restructure sales subdomain tree.
3080
- *
3081
- * Note: members visit outreach and prospecting states depending on which
3082
- * workflow last processed them. stage_key is set per-transition by the workflow.
3083
- */
3084
- export const ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
3085
- pipelineKey: 'lead-gen',
3086
- label: 'Lead Generation',
3087
- entityKey: 'acq.list-member',
3088
- stages: [
3089
- {
3090
- stageKey: 'outreach',
3091
- label: 'Outreach',
3092
- states: [
3093
- PENDING_STATE,
3094
- { stateKey: 'personalized', label: 'Personalized' },
3095
- { stateKey: 'uploaded', label: 'Uploaded' },
3096
- { stateKey: 'interested', label: 'Interested' }
3097
- ]
3098
- },
3099
- {
3100
- stageKey: 'prospecting',
3101
- label: 'Prospecting',
3102
- states: [
3103
- PENDING_STATE,
3104
- { stateKey: 'discovered', label: 'Discovered' },
3105
- { stateKey: 'verified', label: 'Verified' }
3106
- ]
3107
- },
3108
- {
3109
- stageKey: 'qualification',
3110
- label: 'Qualification',
3111
- states: [PENDING_STATE]
3112
- }
3113
- ]
3114
- }
3115
- ```
3116
-
3117
- ### `ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE`
3118
-
3119
- ```typescript
3120
- /**
3121
- * Lead-gen pipeline definition for acq_list_companies.
3122
- * Three stages matching the post-restructure sales subdomain tree.
3123
- *
3124
- * Note: companies visit prospecting and qualification states depending on which
3125
- * workflow last processed them. stage_key is set per-transition by the workflow.
3126
- */
3127
- export const ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
3128
- pipelineKey: 'lead-gen',
3129
- label: 'Lead Generation',
3130
- entityKey: 'acq.list-company',
3131
- stages: [
3132
- {
3133
- stageKey: 'outreach',
3134
- label: 'Outreach',
3135
- states: [PENDING_STATE, { stateKey: 'uploaded', label: 'Uploaded' }]
3136
- },
3137
- {
3138
- stageKey: 'prospecting',
3139
- label: 'Prospecting',
3140
- states: [
3141
- PENDING_STATE,
3142
- { stateKey: 'populated', label: 'Populated' },
3143
- { stateKey: 'extracted', label: 'Extracted' }
3144
- ]
3145
- },
3146
- {
3147
- stageKey: 'qualification',
3148
- label: 'Qualification',
3149
- states: [PENDING_STATE, { stateKey: 'qualified', label: 'Qualified' }]
3150
- }
3151
- ]
3152
- }
3153
- ```
3154
-
3155
- ### `LEAD_GEN_PIPELINE_DEFINITIONS`
3156
-
3157
- ```typescript
3158
- /**
3159
- * All lead-gen pipeline definitions indexed by entity key.
3160
- * Use findPipeline() to locate a definition by pipeline_key within any array.
3161
- */
3162
- export const LEAD_GEN_PIPELINE_DEFINITIONS: Record<string, StatefulPipelineDefinition[]> = {
3163
- 'acq.list-member': [ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE],
3164
- 'acq.list-company': [ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE]
3165
- }
3166
- ```
3167
-
3168
3075
  ### `PaginationParams`
3169
3076
 
3170
3077
  ```typescript
@@ -3434,26 +3341,28 @@ export interface UpdateListConfigParams {
3434
3341
  ### `UpdateCompanyStageParams`
3435
3342
 
3436
3343
  ```typescript
3437
- export interface UpdateCompanyStageParams {
3438
- organizationId: string
3439
- listId: string
3440
- companyId: string
3441
- stage: string
3442
- status?: ProcessingStageStatus
3443
- executionId?: string
3344
+ export interface UpdateCompanyStageParams {
3345
+ organizationId: string
3346
+ listId: string
3347
+ companyId: string
3348
+ stage: string
3349
+ status?: ProcessingStageStatus
3350
+ data?: unknown
3351
+ executionId?: string
3444
3352
  }
3445
3353
  ```
3446
3354
 
3447
3355
  ### `UpdateContactStageParams`
3448
3356
 
3449
3357
  ```typescript
3450
- export interface UpdateContactStageParams {
3451
- organizationId: string
3452
- listId: string
3453
- contactId: string
3454
- stage: string
3455
- status?: ProcessingStageStatus
3456
- executionId?: string
3358
+ export interface UpdateContactStageParams {
3359
+ organizationId: string
3360
+ listId: string
3361
+ contactId: string
3362
+ stage: string
3363
+ status?: ProcessingStageStatus
3364
+ data?: unknown
3365
+ executionId?: string
3457
3366
  }
3458
3367
  ```
3459
3368
 
@@ -3508,13 +3417,14 @@ export interface RecordListExecutionParams {
3508
3417
  ### `ListExecutionSummary`
3509
3418
 
3510
3419
  ```typescript
3511
- export interface ListExecutionSummary {
3512
- executionId: string
3513
- resourceId: string
3514
- status: string
3515
- createdAt: string
3516
- completedAt: string | null
3517
- durationMs: number | null
3420
+ export interface ListExecutionSummary {
3421
+ executionId: string
3422
+ resourceId: string
3423
+ status: string
3424
+ createdAt: string
3425
+ completedAt: string | null
3426
+ durationMs: number | null
3427
+ input?: unknown
3518
3428
  }
3519
3429
  ```
3520
3430
 
@@ -3593,6 +3503,14 @@ export type LeadToolMap = {
3593
3503
  params: Omit<UpdateContactStageParams, 'organizationId'>
3594
3504
  result: void
3595
3505
  }
3506
+ clearCompanyStages: {
3507
+ params: Omit<ClearCompanyStagesParams, 'organizationId'>
3508
+ result: void
3509
+ }
3510
+ clearContactStages: {
3511
+ params: Omit<ClearContactStagesParams, 'organizationId'>
3512
+ result: void
3513
+ }
3596
3514
  // Company operations
3597
3515
  createCompany: { params: Omit<CreateCompanyParams, 'organizationId'>; result: AcqCompany }
3598
3516
  upsertCompany: { params: Omit<UpsertCompanyParams, 'organizationId'>; result: AcqCompany }
@@ -3717,7 +3635,11 @@ export type LeadToolMap = {
3717
3635
  export type ListToolMap = {
3718
3636
  getConfig: {
3719
3637
  params: { listId: string }
3720
- result: { scrapingConfig: ScrapingConfig; icp: IcpRubric; pipelineConfig: PipelineConfig }
3638
+ result: {
3639
+ scrapingConfig: ScrapingConfig
3640
+ icp: IcpRubric
3641
+ pipelineConfig: PipelineConfig & { dataMode: 'mock' | 'live' }
3642
+ }
3721
3643
  }
3722
3644
  recordExecution: {
3723
3645
  params: Omit<RecordListExecutionParams, 'organizationId'>
@@ -3731,6 +3653,14 @@ export type ListToolMap = {
3731
3653
  params: Omit<UpdateContactStageParams, 'organizationId'>
3732
3654
  result: void
3733
3655
  }
3656
+ clearCompanyStages: {
3657
+ params: Omit<ClearCompanyStagesParams, 'organizationId'>
3658
+ result: void
3659
+ }
3660
+ clearContactStages: {
3661
+ params: Omit<ClearContactStagesParams, 'organizationId'>
3662
+ result: void
3663
+ }
3734
3664
  listPendingCompanyIds: {
3735
3665
  params: Omit<ListPendingCompanyIdsParams, 'organizationId'>
3736
3666
  result: string[]
@@ -3747,33 +3677,33 @@ export type ListToolMap = {
3747
3677
  ### `KnowledgeLinkSchema`
3748
3678
 
3749
3679
  ```typescript
3750
- export const KnowledgeLinkSchema = z
3751
- .union([CanonicalKnowledgeLinkSchema, LegacyKnowledgeLinkSchema])
3752
- .transform((link) => {
3753
- const target = 'target' in link ? link.target : targetFromNodeId(link.nodeId)
3754
- return {
3755
- target,
3756
- nodeId: nodeIdFromTarget(target)
3757
- }
3680
+ export const KnowledgeLinkSchema = z
3681
+ .union([CanonicalKnowledgeLinkSchema, LegacyKnowledgeLinkSchema])
3682
+ .transform((link) => {
3683
+ const target = 'target' in link ? link.target : targetFromNodeId(link.nodeId)
3684
+ return {
3685
+ target,
3686
+ nodeId: nodeIdFromTarget(target)
3687
+ }
3758
3688
  })
3759
3689
  ```
3760
3690
 
3761
3691
  ### `OrgKnowledgeKindSchema`
3762
3692
 
3763
3693
  ```typescript
3764
- export const OrgKnowledgeKindSchema = z
3765
- .enum(['playbook', 'strategy', 'reference'])
3694
+ export const OrgKnowledgeKindSchema = z
3695
+ .enum(['playbook', 'strategy', 'reference'])
3766
3696
  .meta({ label: 'Knowledge kind', color: 'grape' })
3767
3697
  ```
3768
3698
 
3769
3699
  ### `OrgKnowledgeNodeSchema`
3770
3700
 
3771
3701
  ```typescript
3772
- export const OrgKnowledgeNodeSchema = z.object({
3773
- id: ModelIdSchema,
3774
- kind: OrgKnowledgeKindSchema,
3775
- title: z.string().trim().min(1).max(200),
3776
- summary: z.string().trim().min(1).max(1000),
3702
+ export const OrgKnowledgeNodeSchema = z.object({
3703
+ id: ModelIdSchema,
3704
+ kind: OrgKnowledgeKindSchema,
3705
+ title: z.string().trim().min(1).max(200),
3706
+ summary: z.string().trim().min(1).max(1000),
3777
3707
  icon: IconNameSchema.optional(),
3778
3708
  /** Canonical documentation URL when body content is a local summary. */
3779
3709
  externalUrl: z.string().trim().url().max(500).optional(),
@@ -3781,15 +3711,15 @@ export const OrgKnowledgeNodeSchema = z.object({
3781
3711
  sourceFilePath: z.string().trim().min(1).max(500).optional(),
3782
3712
  /** Raw MDX string. Phase 2 will introduce a structured block format. */
3783
3713
  body: z.string().trim().min(1),
3784
- /**
3785
- * Graph links to other OM nodes this knowledge node governs.
3786
- * Each link emits a `governs` edge: knowledge-node -> target node.
3787
- */
3788
- links: z.array(KnowledgeLinkSchema).default([]),
3789
- /** Role identifiers that own this knowledge node. */
3790
- ownerIds: z.array(RoleIdSchema.meta({ ref: 'role' })).default([]),
3791
- /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
3792
- updatedAt: z.string().trim().min(1).max(50)
3714
+ /**
3715
+ * Graph links to other OM nodes this knowledge node governs.
3716
+ * Each link emits a `governs` edge: knowledge-node -> target node.
3717
+ */
3718
+ links: z.array(KnowledgeLinkSchema).default([]),
3719
+ /** Role identifiers that own this knowledge node. */
3720
+ ownerIds: z.array(RoleIdSchema.meta({ ref: 'role' })).default([]),
3721
+ /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
3722
+ updatedAt: z.string().trim().min(1).max(50)
3793
3723
  })
3794
3724
  ```
3795
3725