@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.
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Shared ClickUp param/result types (browser-safe)
3
+ *
4
+ * These types define the public interface for ClickUp operations -- used by both
5
+ * the server-side adapter and the SDK typed wrappers. They contain zero Node.js
6
+ * dependencies and are safe to import in any environment.
7
+ *
8
+ * Server-internal types (credentials, retry logic) remain in
9
+ * server/adapters/clickup/clickup-adapter.ts
10
+ */
11
+
12
+ // ============================================================================
13
+ // Verify
14
+ // ============================================================================
15
+
16
+ /**
17
+ * Verify ClickUp credentials parameters
18
+ */
19
+ export interface ClickUpVerifyParams {
20
+ /** No params required -- verification is credential-only */
21
+ _?: never
22
+ }
23
+
24
+ /**
25
+ * Verify ClickUp credentials result
26
+ */
27
+ export interface ClickUpVerifyResult {
28
+ ok: true
29
+ provider: 'clickup'
30
+ teamCount: number
31
+ teams: Array<{
32
+ id: string
33
+ name: string
34
+ }>
35
+ }
36
+
37
+ // ============================================================================
38
+ // Create Task
39
+ // ============================================================================
40
+
41
+ /**
42
+ * Create ClickUp task parameters
43
+ */
44
+ export interface ClickUpCreateTaskParams {
45
+ listId: string
46
+ name: string
47
+ markdownContent: string
48
+ }
49
+
50
+ /**
51
+ * Create ClickUp task result
52
+ */
53
+ export interface ClickUpCreateTaskResult {
54
+ id: string
55
+ url?: string
56
+ name: string
57
+ }
@@ -1,19 +1,20 @@
1
- /**
2
- * Integration types barrel - browser-safe exports
3
- *
4
- * Shared param/result types for integration adapters, used by both
5
- * server-side implementations and SDK typed wrappers.
6
- */
7
-
8
- export * from './attio'
9
- export * from './apify'
10
- export * from './dropbox'
11
- export * from './gmail'
12
- export * from './google-sheets'
13
- export * from './instantly'
14
- export * from './resend'
15
- export * from './signature-api'
16
- export * from './stripe'
17
- export * from './anymailfinder'
18
- export * from './tomba'
19
- export * from './millionverifier'
1
+ /**
2
+ * Integration types barrel - browser-safe exports
3
+ *
4
+ * Shared param/result types for integration adapters, used by both
5
+ * server-side implementations and SDK typed wrappers.
6
+ */
7
+
8
+ export * from './attio'
9
+ export * from './apify'
10
+ export * from './dropbox'
11
+ export * from './gmail'
12
+ export * from './google-sheets'
13
+ export * from './instantly'
14
+ export * from './resend'
15
+ export * from './signature-api'
16
+ export * from './stripe'
17
+ export * from './anymailfinder'
18
+ export * from './tomba'
19
+ export * from './millionverifier'
20
+ export * from './clickup'
@@ -133,6 +133,13 @@ import type {
133
133
  MillionVerifierCheckCreditsResult
134
134
  } from './integration/types/millionverifier'
135
135
 
136
+ import type {
137
+ ClickUpVerifyParams,
138
+ ClickUpVerifyResult,
139
+ ClickUpCreateTaskParams,
140
+ ClickUpCreateTaskResult
141
+ } from './integration/types/clickup'
142
+
136
143
  import type {
137
144
  FindCompanyEmailParams,
138
145
  FindCompanyEmailResult,
@@ -571,6 +578,15 @@ export type MillionVerifierToolMap = {
571
578
  checkCredits: { params: MillionVerifierCheckCreditsParams; result: MillionVerifierCheckCreditsResult }
572
579
  }
573
580
 
581
+ // ---------------------------------------------------------------------------
582
+ // ClickUp (integration adapter, 2 methods)
583
+ // ---------------------------------------------------------------------------
584
+
585
+ export type ClickUpToolMap = {
586
+ verify: { params: ClickUpVerifyParams; result: ClickUpVerifyResult }
587
+ createTask: { params: ClickUpCreateTaskParams; result: ClickUpCreateTaskResult }
588
+ }
589
+
574
590
  // ---------------------------------------------------------------------------
575
591
  // Lead (platform tool, 56 methods)
576
592
  // ---------------------------------------------------------------------------
@@ -1,56 +1,35 @@
1
- import { describe, expect, it } from 'vitest'
2
- import {
3
- DEFAULT_ORGANIZATION_MODEL_ENTITIES,
4
- EntitiesDomainSchema,
5
- EntityLinkSchema,
6
- EntitySchema
7
- } from '../../domains/entities'
8
-
9
- describe('entities domain', () => {
10
- it('defaults the initial entity catalog with ordered entries', () => {
11
- const domain = EntitiesDomainSchema.parse(DEFAULT_ORGANIZATION_MODEL_ENTITIES)
12
-
13
- expect(Object.keys(domain)).toEqual([
14
- 'crm.deal',
15
- 'crm.contact',
16
- 'leadgen.list',
17
- 'leadgen.company',
18
- 'leadgen.contact',
19
- 'delivery.project',
20
- 'delivery.milestone',
21
- 'delivery.task'
22
- ])
23
- expect(Object.values(domain).map((entity) => entity.order)).toEqual([10, 20, 30, 40, 50, 60, 70, 80])
24
- expect(domain['crm.deal']).toMatchObject({
25
- id: 'crm.deal',
26
- label: 'Deal',
27
- ownedBySystemId: 'sales.crm'
28
- })
29
- })
30
-
31
- it('enforces map key equals entity id', () => {
32
- expect(() =>
33
- EntitiesDomainSchema.parse({
34
- 'crm.deal': {
35
- id: 'crm.contact',
36
- order: 10,
37
- label: 'Deal',
38
- ownedBySystemId: 'sales.crm'
39
- }
40
- })
41
- ).toThrow(/Each entity entry id must match its map key/)
42
- })
43
-
44
- it('accepts declared entity links', () => {
45
- expect(() => EntityLinkSchema.parse({ toEntity: 'crm.contact', kind: 'has-many' })).not.toThrow()
46
- expect(() =>
47
- EntitySchema.parse({
48
- id: 'crm.deal',
49
- order: 10,
50
- label: 'Deal',
51
- ownedBySystemId: 'sales.crm',
52
- links: [{ toEntity: 'crm.contact', kind: 'belongs-to', via: 'contact_id', label: 'contact' }]
53
- })
54
- ).not.toThrow()
55
- })
56
- })
1
+ import { describe, expect, it } from 'vitest'
2
+ import { EntitiesDomainSchema, EntityLinkSchema, EntitySchema } from '../../domains/entities'
3
+
4
+ describe('entities domain', () => {
5
+ it('defaults to an empty entity catalog (tenant catalogs live in @repo/elevasis-core)', () => {
6
+ expect(EntitiesDomainSchema.parse(undefined)).toEqual({})
7
+ expect(EntitiesDomainSchema.parse({})).toEqual({})
8
+ })
9
+
10
+ it('enforces map key equals entity id', () => {
11
+ expect(() =>
12
+ EntitiesDomainSchema.parse({
13
+ 'crm.deal': {
14
+ id: 'crm.contact',
15
+ order: 10,
16
+ label: 'Deal',
17
+ ownedBySystemId: 'sales.crm'
18
+ }
19
+ })
20
+ ).toThrow(/Each entity entry id must match its map key/)
21
+ })
22
+
23
+ it('accepts declared entity links', () => {
24
+ expect(() => EntityLinkSchema.parse({ toEntity: 'crm.contact', kind: 'has-many' })).not.toThrow()
25
+ expect(() =>
26
+ EntitySchema.parse({
27
+ id: 'crm.deal',
28
+ order: 10,
29
+ label: 'Deal',
30
+ ownedBySystemId: 'sales.crm',
31
+ links: [{ toEntity: 'crm.contact', kind: 'belongs-to', via: 'contact_id', label: 'contact' }]
32
+ })
33
+ ).not.toThrow()
34
+ })
35
+ })
@@ -35,109 +35,6 @@ export const EntitiesDomainSchema = z
35
35
  })
36
36
  .default({})
37
37
 
38
- const ENTITY_ENTRY_INPUTS: z.input<typeof EntitySchema>[] = [
39
- {
40
- id: 'crm.deal',
41
- order: 10,
42
- label: 'Deal',
43
- description: 'A CRM opportunity or sales pipeline record.',
44
- ownedBySystemId: 'sales.crm',
45
- table: 'crm_deals',
46
- stateCatalogId: 'crm.pipeline',
47
- links: [{ toEntity: 'crm.contact', kind: 'has-many', via: 'deal_contacts', label: 'contacts' }]
48
- },
49
- {
50
- id: 'crm.contact',
51
- order: 20,
52
- label: 'CRM Contact',
53
- description: 'A person associated with a CRM relationship or deal.',
54
- ownedBySystemId: 'sales.crm',
55
- table: 'crm_contacts'
56
- },
57
- {
58
- id: 'leadgen.list',
59
- order: 30,
60
- label: 'Lead List',
61
- description: 'A prospecting list that groups companies and contacts for acquisition workflows.',
62
- ownedBySystemId: 'sales.lead-gen',
63
- table: 'acq_lists',
64
- links: [
65
- { toEntity: 'leadgen.company', kind: 'has-many', via: 'acq_list_companies', label: 'companies' },
66
- { toEntity: 'leadgen.contact', kind: 'has-many', via: 'acq_list_members', label: 'contacts' }
67
- ]
68
- },
69
- {
70
- id: 'leadgen.company',
71
- order: 40,
72
- label: 'Lead Company',
73
- description: 'A company record sourced, enriched, and qualified during prospecting.',
74
- ownedBySystemId: 'sales.lead-gen',
75
- table: 'acq_list_companies',
76
- stateCatalogId: 'lead-gen.company',
77
- links: [
78
- { toEntity: 'leadgen.list', kind: 'belongs-to', via: 'list_id', label: 'list' },
79
- { toEntity: 'leadgen.contact', kind: 'has-many', via: 'company_id', label: 'contacts' }
80
- ]
81
- },
82
- {
83
- id: 'leadgen.contact',
84
- order: 50,
85
- label: 'Lead Contact',
86
- description: 'A prospect contact discovered or enriched during lead generation.',
87
- ownedBySystemId: 'sales.lead-gen',
88
- table: 'acq_list_members',
89
- stateCatalogId: 'lead-gen.contact',
90
- links: [
91
- { toEntity: 'leadgen.list', kind: 'belongs-to', via: 'list_id', label: 'list' },
92
- { toEntity: 'leadgen.company', kind: 'belongs-to', via: 'company_id', label: 'company' }
93
- ]
94
- },
95
- {
96
- id: 'delivery.project',
97
- order: 60,
98
- label: 'Project',
99
- description: 'A client delivery project.',
100
- ownedBySystemId: 'projects',
101
- table: 'projects',
102
- links: [
103
- { toEntity: 'delivery.milestone', kind: 'has-many', via: 'project_id', label: 'milestones' },
104
- { toEntity: 'delivery.task', kind: 'has-many', via: 'project_id', label: 'tasks' }
105
- ]
106
- },
107
- {
108
- id: 'delivery.milestone',
109
- order: 70,
110
- label: 'Milestone',
111
- description: 'A delivery checkpoint within a project.',
112
- ownedBySystemId: 'projects',
113
- table: 'project_milestones',
114
- links: [
115
- { toEntity: 'delivery.project', kind: 'belongs-to', via: 'project_id', label: 'project' },
116
- { toEntity: 'delivery.task', kind: 'has-many', via: 'milestone_id', label: 'tasks' }
117
- ]
118
- },
119
- {
120
- id: 'delivery.task',
121
- order: 80,
122
- label: 'Task',
123
- description: 'A delivery task that can move through the task status catalog.',
124
- ownedBySystemId: 'projects',
125
- table: 'project_tasks',
126
- stateCatalogId: 'delivery.task',
127
- links: [
128
- { toEntity: 'delivery.project', kind: 'belongs-to', via: 'project_id', label: 'project' },
129
- { toEntity: 'delivery.milestone', kind: 'belongs-to', via: 'milestone_id', label: 'milestone' }
130
- ]
131
- }
132
- ]
133
-
134
- export const DEFAULT_ORGANIZATION_MODEL_ENTITIES: z.infer<typeof EntitiesDomainSchema> = Object.fromEntries(
135
- ENTITY_ENTRY_INPUTS.map((entity) => {
136
- const parsed = EntitySchema.parse(entity)
137
- return [parsed.id, parsed]
138
- })
139
- )
140
-
141
38
  /** Validate and return a single entity entry. */
142
39
  export function defineEntity(entry: z.input<typeof EntitySchema>): z.infer<typeof EntitySchema> {
143
40
  return EntitySchema.parse(entry)
@@ -1,12 +1,5 @@
1
1
  import { describe, expect, it } from 'vitest'
2
- import {
3
- ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE,
4
- ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE,
5
- LEAD_GEN_PIPELINE_DEFINITIONS,
6
- findPipeline,
7
- getValidStatesForStage,
8
- type StatefulPipelineDefinition
9
- } from './sales'
2
+ import { findPipeline, getValidStatesForStage, type StatefulPipelineDefinition } from './sales'
10
3
 
11
4
  const TEST_CRM_PIPELINE: StatefulPipelineDefinition = {
12
5
  pipelineKey: 'crm',
@@ -26,6 +19,23 @@ const TEST_CRM_PIPELINE: StatefulPipelineDefinition = {
26
19
  ]
27
20
  }
28
21
 
22
+ const TEST_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
23
+ pipelineKey: 'lead-gen',
24
+ label: 'Lead Gen',
25
+ entityKey: 'leadgen.contact',
26
+ stages: [
27
+ {
28
+ stageKey: 'outreach',
29
+ label: 'Outreach',
30
+ color: 'blue',
31
+ states: [
32
+ { stateKey: 'personalized', label: 'Personalized' },
33
+ { stateKey: 'contacted', label: 'Contacted' }
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+
29
39
  describe('sales domain published surface', () => {
30
40
  it('does not export Elevasis CRM runtime constants from the generic core sales domain', async () => {
31
41
  const sales = await import('./sales')
@@ -40,6 +50,18 @@ describe('sales domain published surface', () => {
40
50
  ])
41
51
  )
42
52
  })
53
+
54
+ it('does not export Elevasis lead-gen pipeline constants from the generic core sales domain', async () => {
55
+ const sales = await import('./sales')
56
+
57
+ expect(Object.keys(sales)).not.toEqual(
58
+ expect.arrayContaining([
59
+ 'ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE',
60
+ 'ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE',
61
+ 'LEAD_GEN_PIPELINE_DEFINITIONS'
62
+ ])
63
+ )
64
+ })
43
65
  })
44
66
 
45
67
  describe('getValidStatesForStage', () => {
@@ -64,8 +86,8 @@ describe('getValidStatesForStage', () => {
64
86
  expect(getValidStatesForStage(TEST_CRM_PIPELINE, 'Interested')).toEqual([])
65
87
  })
66
88
 
67
- it('works with the lead-gen member pipeline for known stage', () => {
68
- const states = getValidStatesForStage(ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE, 'outreach')
89
+ it('works with a caller-supplied lead-gen pipeline for a known stage', () => {
90
+ const states = getValidStatesForStage(TEST_LEAD_GEN_PIPELINE, 'outreach')
69
91
  expect(states.length).toBeGreaterThan(0)
70
92
  expect(states.map((s) => s.stateKey)).toContain('personalized')
71
93
  })
@@ -73,12 +95,12 @@ describe('getValidStatesForStage', () => {
73
95
 
74
96
  describe('findPipeline', () => {
75
97
  it('finds a pipeline by pipelineKey when present', () => {
76
- const found = findPipeline(LEAD_GEN_PIPELINE_DEFINITIONS['acq.list-member'], 'lead-gen')
77
- expect(found).toBe(ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE)
98
+ const found = findPipeline([TEST_LEAD_GEN_PIPELINE], 'lead-gen')
99
+ expect(found).toBe(TEST_LEAD_GEN_PIPELINE)
78
100
  })
79
101
 
80
102
  it('returns undefined for an unknown pipelineKey', () => {
81
- const found = findPipeline(LEAD_GEN_PIPELINE_DEFINITIONS['acq.list-member'], 'crm')
103
+ const found = findPipeline([TEST_LEAD_GEN_PIPELINE], 'crm')
82
104
  expect(found).toBeUndefined()
83
105
  })
84
106
 
@@ -87,18 +109,3 @@ describe('findPipeline', () => {
87
109
  expect(found).toBeUndefined()
88
110
  })
89
111
  })
90
-
91
- describe('LEAD_GEN_PIPELINE_DEFINITIONS', () => {
92
- it('has entries for acq.list-member and acq.list-company', () => {
93
- expect(LEAD_GEN_PIPELINE_DEFINITIONS).toHaveProperty('acq.list-member')
94
- expect(LEAD_GEN_PIPELINE_DEFINITIONS).toHaveProperty('acq.list-company')
95
- })
96
-
97
- it('acq.list-member entry contains the ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE', () => {
98
- expect(LEAD_GEN_PIPELINE_DEFINITIONS['acq.list-member']).toContain(ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE)
99
- })
100
-
101
- it('acq.list-company entry contains the ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE', () => {
102
- expect(LEAD_GEN_PIPELINE_DEFINITIONS['acq.list-company']).toContain(ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE)
103
- })
104
- })
@@ -130,88 +130,3 @@ export interface CrmNextActionRuleConfig {
130
130
  /** Fallback action key when ownership === 'us' and no explicit mapping matches. */
131
131
  ownershipUsFallback?: string | null
132
132
  }
133
-
134
- /** Common states that appear across multiple stages. */
135
- const PENDING_STATE: StatefulStateDefinition = { stateKey: 'pending', label: 'Pending' }
136
-
137
- /**
138
- * Lead-gen pipeline definition for acq_list_members (contacts).
139
- * Three stages matching the post-restructure sales subdomain tree.
140
- *
141
- * Note: members visit outreach and prospecting states depending on which
142
- * workflow last processed them. stage_key is set per-transition by the workflow.
143
- */
144
- export const ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
145
- pipelineKey: 'lead-gen',
146
- label: 'Lead Generation',
147
- entityKey: 'acq.list-member',
148
- stages: [
149
- {
150
- stageKey: 'outreach',
151
- label: 'Outreach',
152
- states: [
153
- PENDING_STATE,
154
- { stateKey: 'personalized', label: 'Personalized' },
155
- { stateKey: 'uploaded', label: 'Uploaded' },
156
- { stateKey: 'interested', label: 'Interested' }
157
- ]
158
- },
159
- {
160
- stageKey: 'prospecting',
161
- label: 'Prospecting',
162
- states: [
163
- PENDING_STATE,
164
- { stateKey: 'discovered', label: 'Discovered' },
165
- { stateKey: 'verified', label: 'Verified' }
166
- ]
167
- },
168
- {
169
- stageKey: 'qualification',
170
- label: 'Qualification',
171
- states: [PENDING_STATE]
172
- }
173
- ]
174
- }
175
-
176
- /**
177
- * Lead-gen pipeline definition for acq_list_companies.
178
- * Three stages matching the post-restructure sales subdomain tree.
179
- *
180
- * Note: companies visit prospecting and qualification states depending on which
181
- * workflow last processed them. stage_key is set per-transition by the workflow.
182
- */
183
- export const ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
184
- pipelineKey: 'lead-gen',
185
- label: 'Lead Generation',
186
- entityKey: 'acq.list-company',
187
- stages: [
188
- {
189
- stageKey: 'outreach',
190
- label: 'Outreach',
191
- states: [PENDING_STATE, { stateKey: 'uploaded', label: 'Uploaded' }]
192
- },
193
- {
194
- stageKey: 'prospecting',
195
- label: 'Prospecting',
196
- states: [
197
- PENDING_STATE,
198
- { stateKey: 'populated', label: 'Populated' },
199
- { stateKey: 'extracted', label: 'Extracted' }
200
- ]
201
- },
202
- {
203
- stageKey: 'qualification',
204
- label: 'Qualification',
205
- states: [PENDING_STATE, { stateKey: 'qualified', label: 'Qualified' }]
206
- }
207
- ]
208
- }
209
-
210
- /**
211
- * All lead-gen pipeline definitions indexed by entity key.
212
- * Use findPipeline() to locate a definition by pipeline_key within any array.
213
- */
214
- export const LEAD_GEN_PIPELINE_DEFINITIONS: Record<string, StatefulPipelineDefinition[]> = {
215
- 'acq.list-member': [ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE],
216
- 'acq.list-company': [ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE]
217
- }
@@ -180,7 +180,6 @@ export {
180
180
  SlashCommandInvocationSchema
181
181
  } from './domains/actions'
182
182
  export {
183
- DEFAULT_ORGANIZATION_MODEL_ENTITIES,
184
183
  defineEntity,
185
184
  defineEntities,
186
185
  EntitiesDomainSchema,
@@ -11,7 +11,7 @@ import { SystemsDomainSchema, DEFAULT_ORGANIZATION_MODEL_SYSTEMS } from './domai
11
11
  import { ResourcesDomainSchema, DEFAULT_ORGANIZATION_MODEL_RESOURCES } from './domains/resources'
12
12
  import { OmTopologyDomainSchema, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY } from './domains/topology'
13
13
  import { ActionsDomainSchema, DEFAULT_ORGANIZATION_MODEL_ACTIONS } from './domains/actions'
14
- import { EntitiesDomainSchema, DEFAULT_ORGANIZATION_MODEL_ENTITIES } from './domains/entities'
14
+ import { EntitiesDomainSchema } from './domains/entities'
15
15
  import { PoliciesDomainSchema, DEFAULT_ORGANIZATION_MODEL_POLICIES } from './domains/policies'
16
16
  import { DEFAULT_ONTOLOGY_SCOPE, OntologyScopeSchema } from './ontology'
17
17
  import { refineOrganizationModel } from './schema-refinements'
@@ -104,7 +104,7 @@ const OrganizationModelSchemaBase = z.object({
104
104
  resources: ResourcesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_RESOURCES),
105
105
  topology: OmTopologyDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_TOPOLOGY),
106
106
  actions: ActionsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ACTIONS),
107
- entities: EntitiesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ENTITIES),
107
+ entities: EntitiesDomainSchema.default({}),
108
108
  policies: PoliciesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_POLICIES),
109
109
  // D3: flat Record<id, OrgKnowledgeNode> — no wrapper object
110
110
  knowledge: KnowledgeDomainSchema.default({})
@@ -3072,100 +3072,6 @@ export interface StatefulPipelineDefinition {
3072
3072
  }
3073
3073
  ```
3074
3074
 
3075
- ### `ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE`
3076
-
3077
- ```typescript
3078
- /**
3079
- * Lead-gen pipeline definition for acq_list_members (contacts).
3080
- * Three stages matching the post-restructure sales subdomain tree.
3081
- *
3082
- * Note: members visit outreach and prospecting states depending on which
3083
- * workflow last processed them. stage_key is set per-transition by the workflow.
3084
- */
3085
- export const ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
3086
- pipelineKey: 'lead-gen',
3087
- label: 'Lead Generation',
3088
- entityKey: 'acq.list-member',
3089
- stages: [
3090
- {
3091
- stageKey: 'outreach',
3092
- label: 'Outreach',
3093
- states: [
3094
- PENDING_STATE,
3095
- { stateKey: 'personalized', label: 'Personalized' },
3096
- { stateKey: 'uploaded', label: 'Uploaded' },
3097
- { stateKey: 'interested', label: 'Interested' }
3098
- ]
3099
- },
3100
- {
3101
- stageKey: 'prospecting',
3102
- label: 'Prospecting',
3103
- states: [
3104
- PENDING_STATE,
3105
- { stateKey: 'discovered', label: 'Discovered' },
3106
- { stateKey: 'verified', label: 'Verified' }
3107
- ]
3108
- },
3109
- {
3110
- stageKey: 'qualification',
3111
- label: 'Qualification',
3112
- states: [PENDING_STATE]
3113
- }
3114
- ]
3115
- }
3116
- ```
3117
-
3118
- ### `ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE`
3119
-
3120
- ```typescript
3121
- /**
3122
- * Lead-gen pipeline definition for acq_list_companies.
3123
- * Three stages matching the post-restructure sales subdomain tree.
3124
- *
3125
- * Note: companies visit prospecting and qualification states depending on which
3126
- * workflow last processed them. stage_key is set per-transition by the workflow.
3127
- */
3128
- export const ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE: StatefulPipelineDefinition = {
3129
- pipelineKey: 'lead-gen',
3130
- label: 'Lead Generation',
3131
- entityKey: 'acq.list-company',
3132
- stages: [
3133
- {
3134
- stageKey: 'outreach',
3135
- label: 'Outreach',
3136
- states: [PENDING_STATE, { stateKey: 'uploaded', label: 'Uploaded' }]
3137
- },
3138
- {
3139
- stageKey: 'prospecting',
3140
- label: 'Prospecting',
3141
- states: [
3142
- PENDING_STATE,
3143
- { stateKey: 'populated', label: 'Populated' },
3144
- { stateKey: 'extracted', label: 'Extracted' }
3145
- ]
3146
- },
3147
- {
3148
- stageKey: 'qualification',
3149
- label: 'Qualification',
3150
- states: [PENDING_STATE, { stateKey: 'qualified', label: 'Qualified' }]
3151
- }
3152
- ]
3153
- }
3154
- ```
3155
-
3156
- ### `LEAD_GEN_PIPELINE_DEFINITIONS`
3157
-
3158
- ```typescript
3159
- /**
3160
- * All lead-gen pipeline definitions indexed by entity key.
3161
- * Use findPipeline() to locate a definition by pipeline_key within any array.
3162
- */
3163
- export const LEAD_GEN_PIPELINE_DEFINITIONS: Record<string, StatefulPipelineDefinition[]> = {
3164
- 'acq.list-member': [ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE],
3165
- 'acq.list-company': [ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE]
3166
- }
3167
- ```
3168
-
3169
3075
  ### `PaginationParams`
3170
3076
 
3171
3077
  ```typescript