@elevasis/sdk 1.18.0 → 1.19.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/cli.cjs +206 -1
- package/dist/index.d.ts +167 -12
- package/dist/index.js +151 -23
- package/dist/test-utils/index.d.ts +20 -10
- package/dist/test-utils/index.js +152 -18
- package/dist/worker/index.js +152 -18
- package/package.json +2 -2
- package/reference/claude-config/registries/graph-skills.json +4 -0
- package/reference/claude-config/skills/knowledge/SKILL.md +9 -8
- package/reference/claude-config/skills/tutorial/technical.md +6 -8
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -0
- package/reference/scaffold/reference/contracts.md +11 -4
package/dist/index.js
CHANGED
|
@@ -198,13 +198,64 @@ z.object({
|
|
|
198
198
|
pipelines: z.array(SalesPipelineSchema).min(1)
|
|
199
199
|
});
|
|
200
200
|
var CRM_DISCOVERY_REPLIED_STATE = {
|
|
201
|
-
stateKey: "discovery_replied"
|
|
201
|
+
stateKey: "discovery_replied",
|
|
202
|
+
label: "Discovery Replied"
|
|
203
|
+
};
|
|
202
204
|
var CRM_DISCOVERY_LINK_SENT_STATE = {
|
|
203
|
-
stateKey: "discovery_link_sent"
|
|
205
|
+
stateKey: "discovery_link_sent",
|
|
206
|
+
label: "Discovery Link Sent"
|
|
207
|
+
};
|
|
204
208
|
var CRM_DISCOVERY_NUDGING_STATE = {
|
|
205
|
-
stateKey: "discovery_nudging"
|
|
209
|
+
stateKey: "discovery_nudging",
|
|
210
|
+
label: "Discovery Nudging"
|
|
211
|
+
};
|
|
206
212
|
var CRM_DISCOVERY_BOOKING_CANCELLED_STATE = {
|
|
207
|
-
stateKey: "discovery_booking_cancelled"
|
|
213
|
+
stateKey: "discovery_booking_cancelled",
|
|
214
|
+
label: "Discovery Booking Cancelled"
|
|
215
|
+
};
|
|
216
|
+
var CRM_REPLY_SENT_STATE = {
|
|
217
|
+
stateKey: "reply_sent",
|
|
218
|
+
label: "Reply Sent"
|
|
219
|
+
};
|
|
220
|
+
var CRM_FOLLOWUP_1_SENT_STATE = {
|
|
221
|
+
stateKey: "followup_1_sent",
|
|
222
|
+
label: "Follow-up 1 Sent"
|
|
223
|
+
};
|
|
224
|
+
var CRM_FOLLOWUP_2_SENT_STATE = {
|
|
225
|
+
stateKey: "followup_2_sent",
|
|
226
|
+
label: "Follow-up 2 Sent"
|
|
227
|
+
};
|
|
228
|
+
var CRM_FOLLOWUP_3_SENT_STATE = {
|
|
229
|
+
stateKey: "followup_3_sent",
|
|
230
|
+
label: "Follow-up 3 Sent"
|
|
231
|
+
};
|
|
232
|
+
var CRM_PIPELINE_DEFINITION = {
|
|
233
|
+
pipelineKey: "crm",
|
|
234
|
+
label: "CRM",
|
|
235
|
+
entityKey: "crm.deal",
|
|
236
|
+
stages: [
|
|
237
|
+
{
|
|
238
|
+
stageKey: "interested",
|
|
239
|
+
label: "Interested",
|
|
240
|
+
color: "blue",
|
|
241
|
+
states: [
|
|
242
|
+
CRM_DISCOVERY_REPLIED_STATE,
|
|
243
|
+
CRM_DISCOVERY_LINK_SENT_STATE,
|
|
244
|
+
CRM_DISCOVERY_NUDGING_STATE,
|
|
245
|
+
CRM_DISCOVERY_BOOKING_CANCELLED_STATE,
|
|
246
|
+
CRM_REPLY_SENT_STATE,
|
|
247
|
+
CRM_FOLLOWUP_1_SENT_STATE,
|
|
248
|
+
CRM_FOLLOWUP_2_SENT_STATE,
|
|
249
|
+
CRM_FOLLOWUP_3_SENT_STATE
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{ stageKey: "proposal", label: "Proposal", color: "yellow", states: [] },
|
|
253
|
+
{ stageKey: "closing", label: "Closing", color: "orange", states: [] },
|
|
254
|
+
{ stageKey: "closed_won", label: "Closed Won", color: "green", states: [] },
|
|
255
|
+
{ stageKey: "closed_lost", label: "Closed Lost", color: "red", states: [] },
|
|
256
|
+
{ stageKey: "nurturing", label: "Nurturing", color: "grape", states: [] }
|
|
257
|
+
]
|
|
258
|
+
};
|
|
208
259
|
var LEAD_GEN_STAGE_CATALOG = {
|
|
209
260
|
// Prospecting — company population
|
|
210
261
|
scraped: {
|
|
@@ -310,20 +361,86 @@ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
|
|
|
310
361
|
id: ModelIdSchema,
|
|
311
362
|
steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
312
363
|
});
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
364
|
+
z.object({
|
|
365
|
+
id: ModelIdSchema,
|
|
366
|
+
label: z.string(),
|
|
367
|
+
description: z.string(),
|
|
368
|
+
resourceId: ModelIdSchema
|
|
369
|
+
});
|
|
370
|
+
var CAPABILITY_REGISTRY = [
|
|
371
|
+
{
|
|
372
|
+
id: "lead-gen.company.source",
|
|
373
|
+
label: "Source companies",
|
|
374
|
+
description: "Import source companies from a list provider.",
|
|
375
|
+
resourceId: "lgn-import-workflow"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
id: "lead-gen.company.apollo-import",
|
|
379
|
+
label: "Import from Apollo",
|
|
380
|
+
description: "Pull companies and seed contact data from an Apollo search or list.",
|
|
381
|
+
resourceId: "lgn-01c-apollo-import-workflow"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
id: "lead-gen.contact.discover",
|
|
385
|
+
label: "Discover contact emails",
|
|
386
|
+
description: "Find email addresses for contacts at qualified companies.",
|
|
387
|
+
resourceId: "lgn-04-email-discovery-workflow"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
id: "lead-gen.contact.verify-email",
|
|
391
|
+
label: "Verify emails",
|
|
392
|
+
description: "Check email deliverability before outreach.",
|
|
393
|
+
resourceId: "lgn-05-email-verification-workflow"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
id: "lead-gen.company.website-extract",
|
|
397
|
+
label: "Extract website signals",
|
|
398
|
+
description: "Scrape and analyze company websites for qualification signals.",
|
|
399
|
+
resourceId: "lgn-02-website-extract-workflow"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
id: "lead-gen.company.qualify",
|
|
403
|
+
label: "Qualify companies",
|
|
404
|
+
description: "Score and filter companies against the ICP rubric.",
|
|
405
|
+
resourceId: "lgn-03-company-qualification-workflow"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
id: "lead-gen.company.dtc-subscription-qualify",
|
|
409
|
+
label: "Qualify DTC subscription fit",
|
|
410
|
+
description: "Classify subscription potential and consumable-product fit for DTC brands.",
|
|
411
|
+
resourceId: "lgn-03b-dtc-subscription-score-workflow"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
id: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
415
|
+
label: "Enrich decision-makers",
|
|
416
|
+
description: "Find and enrich qualified contacts at qualified companies via Apollo.",
|
|
417
|
+
resourceId: "lgn-04b-apollo-decision-maker-enrich-workflow"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
id: "lead-gen.contact.personalize",
|
|
421
|
+
label: "Personalize outreach",
|
|
422
|
+
description: "Generate personalized opening lines for each contact.",
|
|
423
|
+
resourceId: "ist-personalization-workflow"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
id: "lead-gen.review.outreach-ready",
|
|
427
|
+
label: "Upload to outreach",
|
|
428
|
+
description: "Upload approved contacts to the outreach sequence after QC review.",
|
|
429
|
+
resourceId: "ist-upload-contacts-workflow"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
id: "lead-gen.export.list",
|
|
433
|
+
label: "Export lead list",
|
|
434
|
+
description: "Export approved leads as a downloadable lead list.",
|
|
435
|
+
resourceId: "lgn-06-export-list-workflow"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: "lead-gen.company.cleanup",
|
|
439
|
+
label: "Clean up companies",
|
|
440
|
+
description: "Remove disqualified or duplicate companies from the list.",
|
|
441
|
+
resourceId: "lgn-company-cleanup-workflow"
|
|
442
|
+
}
|
|
443
|
+
];
|
|
327
444
|
var PROSPECTING_STEPS = {
|
|
328
445
|
localServices: {
|
|
329
446
|
sourceCompanies: {
|
|
@@ -4204,9 +4321,13 @@ var ProcessingStageStatusSchema = z.enum(["success", "no_result", "skipped", "er
|
|
|
4204
4321
|
var LeadGenStageKeySchema = z.string().refine((value) => Object.prototype.hasOwnProperty.call(LEAD_GEN_STAGE_CATALOG, value), {
|
|
4205
4322
|
message: "processing state key must match LEAD_GEN_STAGE_CATALOG"
|
|
4206
4323
|
});
|
|
4207
|
-
var LeadGenCapabilityKeySchema = z.string().refine((value) =>
|
|
4324
|
+
var LeadGenCapabilityKeySchema = z.string().refine((value) => CAPABILITY_REGISTRY.some((c) => c.id === value), {
|
|
4208
4325
|
message: "capabilityKey must match CAPABILITY_REGISTRY"
|
|
4209
4326
|
});
|
|
4327
|
+
var crmStageKeys = CRM_PIPELINE_DEFINITION.stages.map((stage) => stage.stageKey);
|
|
4328
|
+
var crmStateKeys = CRM_PIPELINE_DEFINITION.stages.flatMap((stage) => stage.states.map((state) => state.stateKey));
|
|
4329
|
+
var CrmStageKeySchema = z.enum(crmStageKeys);
|
|
4330
|
+
var CrmStateKeySchema = z.enum(crmStateKeys);
|
|
4210
4331
|
var ProcessingStateEntrySchema = z.object({
|
|
4211
4332
|
status: ProcessingStageStatusSchema,
|
|
4212
4333
|
data: z.unknown().optional()
|
|
@@ -4214,7 +4335,7 @@ var ProcessingStateEntrySchema = z.object({
|
|
|
4214
4335
|
var ProcessingStateSchema = z.record(LeadGenStageKeySchema, ProcessingStateEntrySchema);
|
|
4215
4336
|
var CompanyProcessingStateSchema = ProcessingStateSchema;
|
|
4216
4337
|
var ContactProcessingStateSchema = ProcessingStateSchema;
|
|
4217
|
-
var DealStageSchema =
|
|
4338
|
+
var DealStageSchema = CrmStageKeySchema;
|
|
4218
4339
|
var AcqDealTaskKindSchema = z.enum(["call", "email", "meeting", "other"]);
|
|
4219
4340
|
z.object({
|
|
4220
4341
|
dealId: UuidSchema
|
|
@@ -4250,12 +4371,19 @@ z.object({
|
|
|
4250
4371
|
z.object({
|
|
4251
4372
|
pipelineKey: z.string().min(1),
|
|
4252
4373
|
stageKey: z.string().min(1),
|
|
4253
|
-
stateKey: z.string().nullable().optional(),
|
|
4374
|
+
stateKey: z.string().min(1).nullable().optional(),
|
|
4375
|
+
reason: z.string().optional(),
|
|
4376
|
+
expectedUpdatedAt: z.string().datetime().optional()
|
|
4377
|
+
}).strict();
|
|
4378
|
+
z.object({
|
|
4379
|
+
pipelineKey: z.literal(CRM_PIPELINE_DEFINITION.pipelineKey),
|
|
4380
|
+
stageKey: CrmStageKeySchema,
|
|
4381
|
+
stateKey: CrmStateKeySchema.nullable().optional(),
|
|
4254
4382
|
reason: z.string().optional(),
|
|
4255
4383
|
expectedUpdatedAt: z.string().datetime().optional()
|
|
4256
4384
|
}).strict();
|
|
4257
4385
|
z.object({
|
|
4258
|
-
stateKey:
|
|
4386
|
+
stateKey: CrmStateKeySchema,
|
|
4259
4387
|
reason: z.string().optional(),
|
|
4260
4388
|
expectedUpdatedAt: z.string().datetime().optional()
|
|
4261
4389
|
}).strict();
|
|
@@ -5019,4 +5147,4 @@ function isOurReplyAction(deal) {
|
|
|
5019
5147
|
var listBuilderStageKeys = Object.keys(LEAD_GEN_STAGE_CATALOG);
|
|
5020
5148
|
var ListBuilderStageKeySchema = z.enum(listBuilderStageKeys);
|
|
5021
5149
|
|
|
5022
|
-
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, DEFAULT_CRM_ACTIONS, EmailSchema, ExecutionError, LEAD_GEN_STAGE_CATALOG, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
|
|
5150
|
+
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, CRM_PIPELINE_DEFINITION, CrmStageKeySchema, CrmStateKeySchema, DEFAULT_CRM_ACTIONS, EmailSchema, ExecutionError, LEAD_GEN_STAGE_CATALOG, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
|
|
@@ -3821,6 +3821,15 @@ declare const ProcessingStageStatusSchema: z.ZodEnum<{
|
|
|
3821
3821
|
skipped: "skipped";
|
|
3822
3822
|
}>;
|
|
3823
3823
|
declare const DealSchemas: {
|
|
3824
|
+
CrmStageKey: z.ZodEnum<{
|
|
3825
|
+
[x: string]: string;
|
|
3826
|
+
}>;
|
|
3827
|
+
CrmStateKey: z.ZodEnum<{
|
|
3828
|
+
[x: string]: string;
|
|
3829
|
+
}>;
|
|
3830
|
+
DealStage: z.ZodEnum<{
|
|
3831
|
+
[x: string]: string;
|
|
3832
|
+
}>;
|
|
3824
3833
|
DealIdParams: z.ZodObject<{
|
|
3825
3834
|
dealId: z.ZodString;
|
|
3826
3835
|
}, z.core.$strip>;
|
|
@@ -3830,12 +3839,7 @@ declare const DealSchemas: {
|
|
|
3830
3839
|
}, z.core.$strip>;
|
|
3831
3840
|
ListDealsQuery: z.ZodObject<{
|
|
3832
3841
|
stage: z.ZodOptional<z.ZodEnum<{
|
|
3833
|
-
|
|
3834
|
-
closed_won: "closed_won";
|
|
3835
|
-
closed_lost: "closed_lost";
|
|
3836
|
-
interested: "interested";
|
|
3837
|
-
proposal: "proposal";
|
|
3838
|
-
closing: "closing";
|
|
3842
|
+
[x: string]: string;
|
|
3839
3843
|
}>>;
|
|
3840
3844
|
search: z.ZodOptional<z.ZodString>;
|
|
3841
3845
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -3870,14 +3874,20 @@ declare const DealSchemas: {
|
|
|
3870
3874
|
assigneeUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3871
3875
|
}, z.core.$strict>;
|
|
3872
3876
|
TransitionItemRequest: z.ZodObject<{
|
|
3873
|
-
pipelineKey: z.
|
|
3874
|
-
stageKey: z.
|
|
3875
|
-
|
|
3877
|
+
pipelineKey: z.ZodLiteral<string>;
|
|
3878
|
+
stageKey: z.ZodEnum<{
|
|
3879
|
+
[x: string]: string;
|
|
3880
|
+
}>;
|
|
3881
|
+
stateKey: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
3882
|
+
[x: string]: string;
|
|
3883
|
+
}>>>;
|
|
3876
3884
|
reason: z.ZodOptional<z.ZodString>;
|
|
3877
3885
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
3878
3886
|
}, z.core.$strict>;
|
|
3879
3887
|
TransitionDealStateRequest: z.ZodObject<{
|
|
3880
|
-
stateKey: z.
|
|
3888
|
+
stateKey: z.ZodEnum<{
|
|
3889
|
+
[x: string]: string;
|
|
3890
|
+
}>;
|
|
3881
3891
|
reason: z.ZodOptional<z.ZodString>;
|
|
3882
3892
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
3883
3893
|
}, z.core.$strict>;
|
package/dist/test-utils/index.js
CHANGED
|
@@ -6650,6 +6650,63 @@ z.object({
|
|
|
6650
6650
|
defaultPipelineId: ModelIdSchema,
|
|
6651
6651
|
pipelines: z.array(SalesPipelineSchema).min(1)
|
|
6652
6652
|
});
|
|
6653
|
+
var CRM_DISCOVERY_REPLIED_STATE = {
|
|
6654
|
+
stateKey: "discovery_replied",
|
|
6655
|
+
label: "Discovery Replied"
|
|
6656
|
+
};
|
|
6657
|
+
var CRM_DISCOVERY_LINK_SENT_STATE = {
|
|
6658
|
+
stateKey: "discovery_link_sent",
|
|
6659
|
+
label: "Discovery Link Sent"
|
|
6660
|
+
};
|
|
6661
|
+
var CRM_DISCOVERY_NUDGING_STATE = {
|
|
6662
|
+
stateKey: "discovery_nudging",
|
|
6663
|
+
label: "Discovery Nudging"
|
|
6664
|
+
};
|
|
6665
|
+
var CRM_DISCOVERY_BOOKING_CANCELLED_STATE = {
|
|
6666
|
+
stateKey: "discovery_booking_cancelled",
|
|
6667
|
+
label: "Discovery Booking Cancelled"
|
|
6668
|
+
};
|
|
6669
|
+
var CRM_REPLY_SENT_STATE = {
|
|
6670
|
+
stateKey: "reply_sent",
|
|
6671
|
+
label: "Reply Sent"
|
|
6672
|
+
};
|
|
6673
|
+
var CRM_FOLLOWUP_1_SENT_STATE = {
|
|
6674
|
+
stateKey: "followup_1_sent",
|
|
6675
|
+
label: "Follow-up 1 Sent"
|
|
6676
|
+
};
|
|
6677
|
+
var CRM_FOLLOWUP_2_SENT_STATE = {
|
|
6678
|
+
stateKey: "followup_2_sent",
|
|
6679
|
+
label: "Follow-up 2 Sent"
|
|
6680
|
+
};
|
|
6681
|
+
var CRM_FOLLOWUP_3_SENT_STATE = {
|
|
6682
|
+
stateKey: "followup_3_sent",
|
|
6683
|
+
label: "Follow-up 3 Sent"
|
|
6684
|
+
};
|
|
6685
|
+
var CRM_PIPELINE_DEFINITION = {
|
|
6686
|
+
pipelineKey: "crm",
|
|
6687
|
+
stages: [
|
|
6688
|
+
{
|
|
6689
|
+
stageKey: "interested",
|
|
6690
|
+
label: "Interested",
|
|
6691
|
+
color: "blue",
|
|
6692
|
+
states: [
|
|
6693
|
+
CRM_DISCOVERY_REPLIED_STATE,
|
|
6694
|
+
CRM_DISCOVERY_LINK_SENT_STATE,
|
|
6695
|
+
CRM_DISCOVERY_NUDGING_STATE,
|
|
6696
|
+
CRM_DISCOVERY_BOOKING_CANCELLED_STATE,
|
|
6697
|
+
CRM_REPLY_SENT_STATE,
|
|
6698
|
+
CRM_FOLLOWUP_1_SENT_STATE,
|
|
6699
|
+
CRM_FOLLOWUP_2_SENT_STATE,
|
|
6700
|
+
CRM_FOLLOWUP_3_SENT_STATE
|
|
6701
|
+
]
|
|
6702
|
+
},
|
|
6703
|
+
{ stageKey: "proposal", label: "Proposal", color: "yellow", states: [] },
|
|
6704
|
+
{ stageKey: "closing", label: "Closing", color: "orange", states: [] },
|
|
6705
|
+
{ stageKey: "closed_won", label: "Closed Won", color: "green", states: [] },
|
|
6706
|
+
{ stageKey: "closed_lost", label: "Closed Lost", color: "red", states: [] },
|
|
6707
|
+
{ stageKey: "nurturing", label: "Nurturing", color: "grape", states: [] }
|
|
6708
|
+
]
|
|
6709
|
+
};
|
|
6653
6710
|
var LEAD_GEN_STAGE_CATALOG = {
|
|
6654
6711
|
// Prospecting — company population
|
|
6655
6712
|
scraped: {
|
|
@@ -6757,20 +6814,86 @@ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
|
|
|
6757
6814
|
id: ModelIdSchema,
|
|
6758
6815
|
steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
6759
6816
|
});
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6817
|
+
z.object({
|
|
6818
|
+
id: ModelIdSchema,
|
|
6819
|
+
label: z.string(),
|
|
6820
|
+
description: z.string(),
|
|
6821
|
+
resourceId: ModelIdSchema
|
|
6822
|
+
});
|
|
6823
|
+
var CAPABILITY_REGISTRY = [
|
|
6824
|
+
{
|
|
6825
|
+
id: "lead-gen.company.source",
|
|
6826
|
+
label: "Source companies",
|
|
6827
|
+
description: "Import source companies from a list provider.",
|
|
6828
|
+
resourceId: "lgn-import-workflow"
|
|
6829
|
+
},
|
|
6830
|
+
{
|
|
6831
|
+
id: "lead-gen.company.apollo-import",
|
|
6832
|
+
label: "Import from Apollo",
|
|
6833
|
+
description: "Pull companies and seed contact data from an Apollo search or list.",
|
|
6834
|
+
resourceId: "lgn-01c-apollo-import-workflow"
|
|
6835
|
+
},
|
|
6836
|
+
{
|
|
6837
|
+
id: "lead-gen.contact.discover",
|
|
6838
|
+
label: "Discover contact emails",
|
|
6839
|
+
description: "Find email addresses for contacts at qualified companies.",
|
|
6840
|
+
resourceId: "lgn-04-email-discovery-workflow"
|
|
6841
|
+
},
|
|
6842
|
+
{
|
|
6843
|
+
id: "lead-gen.contact.verify-email",
|
|
6844
|
+
label: "Verify emails",
|
|
6845
|
+
description: "Check email deliverability before outreach.",
|
|
6846
|
+
resourceId: "lgn-05-email-verification-workflow"
|
|
6847
|
+
},
|
|
6848
|
+
{
|
|
6849
|
+
id: "lead-gen.company.website-extract",
|
|
6850
|
+
label: "Extract website signals",
|
|
6851
|
+
description: "Scrape and analyze company websites for qualification signals.",
|
|
6852
|
+
resourceId: "lgn-02-website-extract-workflow"
|
|
6853
|
+
},
|
|
6854
|
+
{
|
|
6855
|
+
id: "lead-gen.company.qualify",
|
|
6856
|
+
label: "Qualify companies",
|
|
6857
|
+
description: "Score and filter companies against the ICP rubric.",
|
|
6858
|
+
resourceId: "lgn-03-company-qualification-workflow"
|
|
6859
|
+
},
|
|
6860
|
+
{
|
|
6861
|
+
id: "lead-gen.company.dtc-subscription-qualify",
|
|
6862
|
+
label: "Qualify DTC subscription fit",
|
|
6863
|
+
description: "Classify subscription potential and consumable-product fit for DTC brands.",
|
|
6864
|
+
resourceId: "lgn-03b-dtc-subscription-score-workflow"
|
|
6865
|
+
},
|
|
6866
|
+
{
|
|
6867
|
+
id: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
6868
|
+
label: "Enrich decision-makers",
|
|
6869
|
+
description: "Find and enrich qualified contacts at qualified companies via Apollo.",
|
|
6870
|
+
resourceId: "lgn-04b-apollo-decision-maker-enrich-workflow"
|
|
6871
|
+
},
|
|
6872
|
+
{
|
|
6873
|
+
id: "lead-gen.contact.personalize",
|
|
6874
|
+
label: "Personalize outreach",
|
|
6875
|
+
description: "Generate personalized opening lines for each contact.",
|
|
6876
|
+
resourceId: "ist-personalization-workflow"
|
|
6877
|
+
},
|
|
6878
|
+
{
|
|
6879
|
+
id: "lead-gen.review.outreach-ready",
|
|
6880
|
+
label: "Upload to outreach",
|
|
6881
|
+
description: "Upload approved contacts to the outreach sequence after QC review.",
|
|
6882
|
+
resourceId: "ist-upload-contacts-workflow"
|
|
6883
|
+
},
|
|
6884
|
+
{
|
|
6885
|
+
id: "lead-gen.export.list",
|
|
6886
|
+
label: "Export lead list",
|
|
6887
|
+
description: "Export approved leads as a downloadable lead list.",
|
|
6888
|
+
resourceId: "lgn-06-export-list-workflow"
|
|
6889
|
+
},
|
|
6890
|
+
{
|
|
6891
|
+
id: "lead-gen.company.cleanup",
|
|
6892
|
+
label: "Clean up companies",
|
|
6893
|
+
description: "Remove disqualified or duplicate companies from the list.",
|
|
6894
|
+
resourceId: "lgn-company-cleanup-workflow"
|
|
6895
|
+
}
|
|
6896
|
+
];
|
|
6774
6897
|
var PROSPECTING_STEPS = {
|
|
6775
6898
|
localServices: {
|
|
6776
6899
|
sourceCompanies: {
|
|
@@ -7006,9 +7129,13 @@ var ProcessingStageStatusSchema = z.enum(["success", "no_result", "skipped", "er
|
|
|
7006
7129
|
var LeadGenStageKeySchema = z.string().refine((value) => Object.prototype.hasOwnProperty.call(LEAD_GEN_STAGE_CATALOG, value), {
|
|
7007
7130
|
message: "processing state key must match LEAD_GEN_STAGE_CATALOG"
|
|
7008
7131
|
});
|
|
7009
|
-
var LeadGenCapabilityKeySchema = z.string().refine((value) =>
|
|
7132
|
+
var LeadGenCapabilityKeySchema = z.string().refine((value) => CAPABILITY_REGISTRY.some((c) => c.id === value), {
|
|
7010
7133
|
message: "capabilityKey must match CAPABILITY_REGISTRY"
|
|
7011
7134
|
});
|
|
7135
|
+
var crmStageKeys = CRM_PIPELINE_DEFINITION.stages.map((stage) => stage.stageKey);
|
|
7136
|
+
var crmStateKeys = CRM_PIPELINE_DEFINITION.stages.flatMap((stage) => stage.states.map((state) => state.stateKey));
|
|
7137
|
+
var CrmStageKeySchema = z.enum(crmStageKeys);
|
|
7138
|
+
var CrmStateKeySchema = z.enum(crmStateKeys);
|
|
7012
7139
|
var ProcessingStateEntrySchema = z.object({
|
|
7013
7140
|
status: ProcessingStageStatusSchema,
|
|
7014
7141
|
data: z.unknown().optional()
|
|
@@ -7016,7 +7143,7 @@ var ProcessingStateEntrySchema = z.object({
|
|
|
7016
7143
|
var ProcessingStateSchema = z.record(LeadGenStageKeySchema, ProcessingStateEntrySchema);
|
|
7017
7144
|
var CompanyProcessingStateSchema = ProcessingStateSchema;
|
|
7018
7145
|
var ContactProcessingStateSchema = ProcessingStateSchema;
|
|
7019
|
-
var DealStageSchema =
|
|
7146
|
+
var DealStageSchema = CrmStageKeySchema;
|
|
7020
7147
|
var AcqDealTaskKindSchema = z.enum(["call", "email", "meeting", "other"]);
|
|
7021
7148
|
z.object({
|
|
7022
7149
|
dealId: UuidSchema
|
|
@@ -7052,12 +7179,19 @@ z.object({
|
|
|
7052
7179
|
z.object({
|
|
7053
7180
|
pipelineKey: z.string().min(1),
|
|
7054
7181
|
stageKey: z.string().min(1),
|
|
7055
|
-
stateKey: z.string().nullable().optional(),
|
|
7182
|
+
stateKey: z.string().min(1).nullable().optional(),
|
|
7183
|
+
reason: z.string().optional(),
|
|
7184
|
+
expectedUpdatedAt: z.string().datetime().optional()
|
|
7185
|
+
}).strict();
|
|
7186
|
+
z.object({
|
|
7187
|
+
pipelineKey: z.literal(CRM_PIPELINE_DEFINITION.pipelineKey),
|
|
7188
|
+
stageKey: CrmStageKeySchema,
|
|
7189
|
+
stateKey: CrmStateKeySchema.nullable().optional(),
|
|
7056
7190
|
reason: z.string().optional(),
|
|
7057
7191
|
expectedUpdatedAt: z.string().datetime().optional()
|
|
7058
7192
|
}).strict();
|
|
7059
7193
|
z.object({
|
|
7060
|
-
stateKey:
|
|
7194
|
+
stateKey: CrmStateKeySchema,
|
|
7061
7195
|
reason: z.string().optional(),
|
|
7062
7196
|
expectedUpdatedAt: z.string().datetime().optional()
|
|
7063
7197
|
}).strict();
|