@elevasis/core 0.20.0 → 0.21.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 +108 -0
- package/dist/index.js +177 -27
- package/dist/knowledge/index.d.ts +54 -0
- package/dist/organization-model/index.d.ts +108 -0
- package/dist/organization-model/index.js +177 -27
- package/dist/test-utils/index.d.ts +54 -0
- package/dist/test-utils/index.js +177 -27
- package/package.json +3 -3
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +6 -1
- package/src/business/acquisition/api-schemas.test.ts +25 -0
- package/src/business/acquisition/api-schemas.ts +125 -2
- package/src/business/acquisition/build-templates.test.ts +28 -0
- package/src/business/acquisition/build-templates.ts +20 -8
- package/src/business/acquisition/types.ts +6 -1
- package/src/execution/engine/tools/integration/server/adapters/apify/apify-adapter.test.ts +55 -0
- package/src/execution/engine/tools/integration/server/adapters/apify/apify-adapter.ts +107 -41
- package/src/execution/engine/tools/integration/server/adapters/apollo/apollo-adapter.test.ts +48 -0
- package/src/execution/engine/tools/integration/server/adapters/apollo/apollo-adapter.ts +99 -0
- package/src/execution/engine/tools/integration/server/adapters/apollo/index.ts +1 -0
- package/src/execution/engine/tools/integration/server/adapters/clickup/clickup-adapter.test.ts +18 -0
- package/src/execution/engine/tools/integration/server/adapters/clickup/clickup-adapter.ts +194 -0
- package/src/execution/engine/tools/integration/server/adapters/clickup/index.ts +7 -0
- package/src/integrations/credentials/api-schemas.ts +21 -2
- package/src/integrations/credentials/schemas.ts +200 -164
- package/src/organization-model/__tests__/prospecting-ssot.test.ts +7 -4
- package/src/organization-model/domains/prospecting.ts +182 -25
- package/src/organization-model/domains/sales.ts +24 -3
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +6 -1
- package/src/server.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -585,11 +585,65 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
585
585
|
export: "export";
|
|
586
586
|
}>>;
|
|
587
587
|
stageKey: z.ZodString;
|
|
588
|
+
recordEntity: z.ZodOptional<z.ZodEnum<{
|
|
589
|
+
company: "company";
|
|
590
|
+
contact: "contact";
|
|
591
|
+
}>>;
|
|
592
|
+
recordsStageKey: z.ZodOptional<z.ZodString>;
|
|
593
|
+
recordSourceStageKey: z.ZodOptional<z.ZodString>;
|
|
588
594
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
589
595
|
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
590
596
|
capabilityKey: z.ZodString;
|
|
591
597
|
defaultBatchSize: z.ZodNumber;
|
|
592
598
|
maxBatchSize: z.ZodNumber;
|
|
599
|
+
recordColumns: z.ZodOptional<z.ZodObject<{
|
|
600
|
+
company: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
601
|
+
key: z.ZodString;
|
|
602
|
+
label: z.ZodString;
|
|
603
|
+
path: z.ZodString;
|
|
604
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
605
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
606
|
+
text: "text";
|
|
607
|
+
badge: "badge";
|
|
608
|
+
datetime: "datetime";
|
|
609
|
+
count: "count";
|
|
610
|
+
json: "json";
|
|
611
|
+
}>>;
|
|
612
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
613
|
+
}, z.core.$strip>>>;
|
|
614
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
615
|
+
key: z.ZodString;
|
|
616
|
+
label: z.ZodString;
|
|
617
|
+
path: z.ZodString;
|
|
618
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
619
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
620
|
+
text: "text";
|
|
621
|
+
badge: "badge";
|
|
622
|
+
datetime: "datetime";
|
|
623
|
+
count: "count";
|
|
624
|
+
json: "json";
|
|
625
|
+
}>>;
|
|
626
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
627
|
+
}, z.core.$strip>>>;
|
|
628
|
+
}, z.core.$strip>>;
|
|
629
|
+
credentialRequirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
630
|
+
key: z.ZodString;
|
|
631
|
+
provider: z.ZodString;
|
|
632
|
+
credentialType: z.ZodEnum<{
|
|
633
|
+
"api-key": "api-key";
|
|
634
|
+
"api-key-secret": "api-key-secret";
|
|
635
|
+
oauth: "oauth";
|
|
636
|
+
"webhook-secret": "webhook-secret";
|
|
637
|
+
}>;
|
|
638
|
+
label: z.ZodString;
|
|
639
|
+
required: z.ZodBoolean;
|
|
640
|
+
selectionMode: z.ZodOptional<z.ZodEnum<{
|
|
641
|
+
single: "single";
|
|
642
|
+
multiple: "multiple";
|
|
643
|
+
}>>;
|
|
644
|
+
inputPath: z.ZodString;
|
|
645
|
+
verifyOnRun: z.ZodOptional<z.ZodBoolean>;
|
|
646
|
+
}, z.core.$strip>>>;
|
|
593
647
|
}, z.core.$strip>>;
|
|
594
648
|
}, z.core.$strip>>;
|
|
595
649
|
}, z.core.$strip>;
|
|
@@ -1996,11 +2050,65 @@ declare const OrganizationModelProspectingSchema: z.ZodObject<{
|
|
|
1996
2050
|
export: "export";
|
|
1997
2051
|
}>>;
|
|
1998
2052
|
stageKey: z.ZodString;
|
|
2053
|
+
recordEntity: z.ZodOptional<z.ZodEnum<{
|
|
2054
|
+
company: "company";
|
|
2055
|
+
contact: "contact";
|
|
2056
|
+
}>>;
|
|
2057
|
+
recordsStageKey: z.ZodOptional<z.ZodString>;
|
|
2058
|
+
recordSourceStageKey: z.ZodOptional<z.ZodString>;
|
|
1999
2059
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2000
2060
|
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
2001
2061
|
capabilityKey: z.ZodString;
|
|
2002
2062
|
defaultBatchSize: z.ZodNumber;
|
|
2003
2063
|
maxBatchSize: z.ZodNumber;
|
|
2064
|
+
recordColumns: z.ZodOptional<z.ZodObject<{
|
|
2065
|
+
company: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2066
|
+
key: z.ZodString;
|
|
2067
|
+
label: z.ZodString;
|
|
2068
|
+
path: z.ZodString;
|
|
2069
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
2070
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
2071
|
+
text: "text";
|
|
2072
|
+
badge: "badge";
|
|
2073
|
+
datetime: "datetime";
|
|
2074
|
+
count: "count";
|
|
2075
|
+
json: "json";
|
|
2076
|
+
}>>;
|
|
2077
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
2078
|
+
}, z.core.$strip>>>;
|
|
2079
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2080
|
+
key: z.ZodString;
|
|
2081
|
+
label: z.ZodString;
|
|
2082
|
+
path: z.ZodString;
|
|
2083
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
2084
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
2085
|
+
text: "text";
|
|
2086
|
+
badge: "badge";
|
|
2087
|
+
datetime: "datetime";
|
|
2088
|
+
count: "count";
|
|
2089
|
+
json: "json";
|
|
2090
|
+
}>>;
|
|
2091
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
2092
|
+
}, z.core.$strip>>>;
|
|
2093
|
+
}, z.core.$strip>>;
|
|
2094
|
+
credentialRequirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2095
|
+
key: z.ZodString;
|
|
2096
|
+
provider: z.ZodString;
|
|
2097
|
+
credentialType: z.ZodEnum<{
|
|
2098
|
+
"api-key": "api-key";
|
|
2099
|
+
"api-key-secret": "api-key-secret";
|
|
2100
|
+
oauth: "oauth";
|
|
2101
|
+
"webhook-secret": "webhook-secret";
|
|
2102
|
+
}>;
|
|
2103
|
+
label: z.ZodString;
|
|
2104
|
+
required: z.ZodBoolean;
|
|
2105
|
+
selectionMode: z.ZodOptional<z.ZodEnum<{
|
|
2106
|
+
single: "single";
|
|
2107
|
+
multiple: "multiple";
|
|
2108
|
+
}>>;
|
|
2109
|
+
inputPath: z.ZodString;
|
|
2110
|
+
verifyOnRun: z.ZodOptional<z.ZodBoolean>;
|
|
2111
|
+
}, z.core.$strip>>>;
|
|
2004
2112
|
}, z.core.$strip>>;
|
|
2005
2113
|
}, z.core.$strip>>;
|
|
2006
2114
|
}, z.core.$strip>;
|
package/dist/index.js
CHANGED
|
@@ -239,6 +239,13 @@ var LEAD_GEN_STAGE_CATALOG = {
|
|
|
239
239
|
order: 2,
|
|
240
240
|
entity: "company"
|
|
241
241
|
},
|
|
242
|
+
crawled: {
|
|
243
|
+
key: "crawled",
|
|
244
|
+
label: "Websites crawled",
|
|
245
|
+
description: "Company websites have been crawled (e.g. via Apify) and raw page content stored for downstream LLM analysis.",
|
|
246
|
+
order: 2.5,
|
|
247
|
+
entity: "company"
|
|
248
|
+
},
|
|
242
249
|
extracted: {
|
|
243
250
|
key: "extracted",
|
|
244
251
|
label: "Websites analyzed",
|
|
@@ -258,7 +265,9 @@ var LEAD_GEN_STAGE_CATALOG = {
|
|
|
258
265
|
label: "Decision-makers found",
|
|
259
266
|
description: "Decision-maker contacts discovered and attached to a qualified company.",
|
|
260
267
|
order: 6,
|
|
261
|
-
entity: "company"
|
|
268
|
+
entity: "company",
|
|
269
|
+
recordEntity: "contact",
|
|
270
|
+
recordStageKey: "discovered"
|
|
262
271
|
},
|
|
263
272
|
// Prospecting — contact discovery
|
|
264
273
|
discovered: {
|
|
@@ -296,7 +305,8 @@ var LEAD_GEN_STAGE_CATALOG = {
|
|
|
296
305
|
label: "Reviewed and exported",
|
|
297
306
|
description: "Approved records have been reviewed and exported for handoff.",
|
|
298
307
|
order: 10,
|
|
299
|
-
entity: "
|
|
308
|
+
entity: "company",
|
|
309
|
+
additionalEntities: ["contact"]
|
|
300
310
|
},
|
|
301
311
|
interested: {
|
|
302
312
|
key: "interested",
|
|
@@ -366,18 +376,47 @@ var FeatureSchema = z.object({
|
|
|
366
376
|
});
|
|
367
377
|
var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
|
|
368
378
|
id: ModelIdSchema,
|
|
369
|
-
order: z.number().
|
|
379
|
+
order: z.number().min(0)
|
|
380
|
+
});
|
|
381
|
+
var RecordColumnConfigSchema = z.object({
|
|
382
|
+
key: ModelIdSchema,
|
|
383
|
+
label: z.string().trim().min(1).max(120),
|
|
384
|
+
path: z.string().trim().min(1).max(500),
|
|
385
|
+
width: z.union([z.number().positive(), z.string().trim().min(1).max(100)]).optional(),
|
|
386
|
+
renderType: z.enum(["text", "badge", "datetime", "count", "json"]).optional(),
|
|
387
|
+
badgeColor: z.string().trim().min(1).max(40).optional()
|
|
388
|
+
});
|
|
389
|
+
var RecordColumnsConfigSchema = z.object({
|
|
390
|
+
company: z.array(RecordColumnConfigSchema).optional(),
|
|
391
|
+
contact: z.array(RecordColumnConfigSchema).optional()
|
|
392
|
+
}).refine((columns) => Boolean(columns.company?.length || columns.contact?.length), {
|
|
393
|
+
message: "recordColumns must include at least one entity column set"
|
|
394
|
+
});
|
|
395
|
+
var CredentialRequirementSchema = z.object({
|
|
396
|
+
key: ModelIdSchema,
|
|
397
|
+
provider: ModelIdSchema,
|
|
398
|
+
credentialType: z.enum(["api-key", "api-key-secret", "oauth", "webhook-secret"]),
|
|
399
|
+
label: z.string().trim().min(1).max(120),
|
|
400
|
+
required: z.boolean(),
|
|
401
|
+
selectionMode: z.enum(["single", "multiple"]).optional(),
|
|
402
|
+
inputPath: z.string().trim().min(1).max(500),
|
|
403
|
+
verifyOnRun: z.boolean().optional()
|
|
370
404
|
});
|
|
371
405
|
var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
|
|
372
406
|
id: ModelIdSchema,
|
|
373
407
|
primaryEntity: z.enum(["company", "contact"]),
|
|
374
408
|
outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
|
|
375
409
|
stageKey: ModelIdSchema,
|
|
410
|
+
recordEntity: z.enum(["company", "contact"]).optional(),
|
|
411
|
+
recordsStageKey: ModelIdSchema.optional(),
|
|
412
|
+
recordSourceStageKey: ModelIdSchema.optional(),
|
|
376
413
|
dependsOn: z.array(ModelIdSchema).optional(),
|
|
377
414
|
dependencyMode: z.literal("per-record-eligibility"),
|
|
378
415
|
capabilityKey: ModelIdSchema,
|
|
379
416
|
defaultBatchSize: z.number().int().positive(),
|
|
380
|
-
maxBatchSize: z.number().int().positive()
|
|
417
|
+
maxBatchSize: z.number().int().positive(),
|
|
418
|
+
recordColumns: RecordColumnsConfigSchema.optional(),
|
|
419
|
+
credentialRequirements: z.array(CredentialRequirementSchema).optional()
|
|
381
420
|
}).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
|
|
382
421
|
message: "defaultBatchSize must be less than or equal to maxBatchSize",
|
|
383
422
|
path: ["defaultBatchSize"]
|
|
@@ -386,6 +425,62 @@ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
|
|
|
386
425
|
id: ModelIdSchema,
|
|
387
426
|
steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
388
427
|
});
|
|
428
|
+
var DTC_RECORD_COLUMNS = {
|
|
429
|
+
populated: {
|
|
430
|
+
company: [
|
|
431
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
432
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
433
|
+
{ key: "employee-count", label: "Employees", path: "company.numEmployees", renderType: "count" },
|
|
434
|
+
{ key: "apollo-industry", label: "Apollo industry", path: "company.category" },
|
|
435
|
+
{ key: "location", label: "Location", path: "company.locationState" }
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
crawled: {
|
|
439
|
+
company: [
|
|
440
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
441
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
442
|
+
{ key: "page-count", label: "Pages", path: "company.enrichmentData.websiteCrawl.pageCount", renderType: "count" },
|
|
443
|
+
{ key: "crawl-status", label: "Crawl status", path: "processingState.crawled.status", renderType: "badge" }
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
extracted: {
|
|
447
|
+
company: [
|
|
448
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
449
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
450
|
+
{ key: "description", label: "Description", path: "company.enrichmentData.websiteCrawl.companyDescription" },
|
|
451
|
+
{ key: "services", label: "Services", path: "company.enrichmentData.websiteCrawl.services", renderType: "json" },
|
|
452
|
+
{ key: "automation-gaps", label: "Automation gaps", path: "company.enrichmentData.websiteCrawl.automationGaps", renderType: "json" },
|
|
453
|
+
{ key: "contact-count", label: "Contacts", path: "company.enrichmentData.websiteCrawl.emailCount", renderType: "count" }
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
qualified: {
|
|
457
|
+
company: [
|
|
458
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
459
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
460
|
+
{ key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
|
|
461
|
+
{ key: "signals", label: "Signals", path: "company.qualificationSignals", renderType: "json" },
|
|
462
|
+
{ key: "disqualified-reason", label: "Disqualified reason", path: "processingState.qualified.data.disqualifiedReason" }
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
decisionMakers: {
|
|
466
|
+
contact: [
|
|
467
|
+
{ key: "name", label: "Name", path: "contact.name" },
|
|
468
|
+
{ key: "title", label: "Title", path: "contact.title" },
|
|
469
|
+
{ key: "email", label: "Email", path: "contact.email" },
|
|
470
|
+
{ key: "linkedin", label: "LinkedIn", path: "contact.linkedinUrl" },
|
|
471
|
+
{ key: "priority-score", label: "Priority", path: "contact.enrichmentData.apollo.priorityScore", renderType: "badge" }
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
uploaded: {
|
|
475
|
+
company: [
|
|
476
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
477
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
478
|
+
{ key: "contacts", label: "Contacts", path: "company.enrichmentData.approvedLeadListExport.contacts", renderType: "json" },
|
|
479
|
+
{ key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
|
|
480
|
+
{ key: "approval", label: "Approval", path: "company.enrichmentData.approvedLeadListExport.approvalStatus", renderType: "badge" }
|
|
481
|
+
]
|
|
482
|
+
}
|
|
483
|
+
};
|
|
389
484
|
z.object({
|
|
390
485
|
id: ModelIdSchema,
|
|
391
486
|
label: z.string(),
|
|
@@ -489,7 +584,45 @@ var PROSPECTING_STEPS = {
|
|
|
489
584
|
dependencyMode: "per-record-eligibility",
|
|
490
585
|
capabilityKey: "lead-gen.company.apollo-import",
|
|
491
586
|
defaultBatchSize: 250,
|
|
492
|
-
maxBatchSize: 1e3
|
|
587
|
+
maxBatchSize: 1e3,
|
|
588
|
+
recordColumns: DTC_RECORD_COLUMNS.populated,
|
|
589
|
+
credentialRequirements: [
|
|
590
|
+
{
|
|
591
|
+
key: "apollo",
|
|
592
|
+
provider: "apollo",
|
|
593
|
+
credentialType: "api-key-secret",
|
|
594
|
+
label: "Apollo API key",
|
|
595
|
+
required: true,
|
|
596
|
+
selectionMode: "single",
|
|
597
|
+
inputPath: "credential"
|
|
598
|
+
}
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
apifyCrawl: {
|
|
602
|
+
id: "apify-crawl",
|
|
603
|
+
label: "Websites crawled",
|
|
604
|
+
description: "Crawl company websites via Apify and store raw page markdown in enrichmentData.websiteCrawl.pages for downstream LLM analysis. Overwrites the synthetic seed Apollo Import wrote with real page content.",
|
|
605
|
+
primaryEntity: "company",
|
|
606
|
+
outputs: ["company"],
|
|
607
|
+
stageKey: "crawled",
|
|
608
|
+
dependsOn: ["import-apollo-search"],
|
|
609
|
+
dependencyMode: "per-record-eligibility",
|
|
610
|
+
capabilityKey: "lead-gen.company.apify-crawl",
|
|
611
|
+
defaultBatchSize: 50,
|
|
612
|
+
maxBatchSize: 100,
|
|
613
|
+
recordColumns: DTC_RECORD_COLUMNS.crawled,
|
|
614
|
+
credentialRequirements: [
|
|
615
|
+
{
|
|
616
|
+
key: "apify",
|
|
617
|
+
provider: "apify",
|
|
618
|
+
credentialType: "api-key-secret",
|
|
619
|
+
label: "Apify API token",
|
|
620
|
+
required: true,
|
|
621
|
+
selectionMode: "single",
|
|
622
|
+
inputPath: "credential",
|
|
623
|
+
verifyOnRun: true
|
|
624
|
+
}
|
|
625
|
+
]
|
|
493
626
|
},
|
|
494
627
|
analyzeWebsites: {
|
|
495
628
|
id: "analyze-websites",
|
|
@@ -498,11 +631,12 @@ var PROSPECTING_STEPS = {
|
|
|
498
631
|
primaryEntity: "company",
|
|
499
632
|
outputs: ["company"],
|
|
500
633
|
stageKey: "extracted",
|
|
501
|
-
dependsOn: ["
|
|
634
|
+
dependsOn: ["apify-crawl"],
|
|
502
635
|
dependencyMode: "per-record-eligibility",
|
|
503
636
|
capabilityKey: "lead-gen.company.website-extract",
|
|
504
637
|
defaultBatchSize: 50,
|
|
505
|
-
maxBatchSize: 100
|
|
638
|
+
maxBatchSize: 100,
|
|
639
|
+
recordColumns: DTC_RECORD_COLUMNS.extracted
|
|
506
640
|
},
|
|
507
641
|
scoreDtcFit: {
|
|
508
642
|
id: "score-dtc-fit",
|
|
@@ -515,7 +649,8 @@ var PROSPECTING_STEPS = {
|
|
|
515
649
|
dependencyMode: "per-record-eligibility",
|
|
516
650
|
capabilityKey: "lead-gen.company.dtc-subscription-qualify",
|
|
517
651
|
defaultBatchSize: 100,
|
|
518
|
-
maxBatchSize: 250
|
|
652
|
+
maxBatchSize: 250,
|
|
653
|
+
recordColumns: DTC_RECORD_COLUMNS.qualified
|
|
519
654
|
},
|
|
520
655
|
enrichDecisionMakers: {
|
|
521
656
|
id: "enrich-decision-makers",
|
|
@@ -524,37 +659,52 @@ var PROSPECTING_STEPS = {
|
|
|
524
659
|
primaryEntity: "company",
|
|
525
660
|
outputs: ["contact"],
|
|
526
661
|
stageKey: "decision-makers-enriched",
|
|
662
|
+
recordEntity: "contact",
|
|
527
663
|
dependsOn: ["score-dtc-fit"],
|
|
528
664
|
dependencyMode: "per-record-eligibility",
|
|
529
665
|
capabilityKey: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
530
666
|
defaultBatchSize: 100,
|
|
531
|
-
maxBatchSize: 250
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
maxBatchSize: 500
|
|
667
|
+
maxBatchSize: 250,
|
|
668
|
+
recordColumns: DTC_RECORD_COLUMNS.decisionMakers,
|
|
669
|
+
credentialRequirements: [
|
|
670
|
+
{
|
|
671
|
+
key: "apollo",
|
|
672
|
+
provider: "apollo",
|
|
673
|
+
credentialType: "api-key-secret",
|
|
674
|
+
label: "Apollo API key",
|
|
675
|
+
required: true,
|
|
676
|
+
selectionMode: "single",
|
|
677
|
+
inputPath: "credential"
|
|
678
|
+
}
|
|
679
|
+
]
|
|
545
680
|
},
|
|
546
681
|
reviewAndExport: {
|
|
547
682
|
id: "review-and-export",
|
|
548
683
|
label: "Reviewed and exported",
|
|
549
|
-
description: "Operator QC approves or rejects
|
|
684
|
+
description: "Operator QC approves or rejects qualified companies, then approved records are exported as a lead list with unverified emails.",
|
|
550
685
|
primaryEntity: "company",
|
|
551
686
|
outputs: ["export"],
|
|
552
687
|
stageKey: "uploaded",
|
|
553
|
-
|
|
688
|
+
recordsStageKey: "uploaded",
|
|
689
|
+
recordSourceStageKey: "qualified",
|
|
690
|
+
dependsOn: ["enrich-decision-makers"],
|
|
554
691
|
dependencyMode: "per-record-eligibility",
|
|
555
692
|
capabilityKey: "lead-gen.export.list",
|
|
556
693
|
defaultBatchSize: 100,
|
|
557
|
-
maxBatchSize: 250
|
|
694
|
+
maxBatchSize: 250,
|
|
695
|
+
recordColumns: DTC_RECORD_COLUMNS.uploaded,
|
|
696
|
+
credentialRequirements: [
|
|
697
|
+
{
|
|
698
|
+
key: "clickup",
|
|
699
|
+
provider: "clickup",
|
|
700
|
+
credentialType: "api-key-secret",
|
|
701
|
+
label: "ClickUp API token",
|
|
702
|
+
required: true,
|
|
703
|
+
selectionMode: "single",
|
|
704
|
+
inputPath: "clickupCredential",
|
|
705
|
+
verifyOnRun: true
|
|
706
|
+
}
|
|
707
|
+
]
|
|
558
708
|
}
|
|
559
709
|
}
|
|
560
710
|
};
|
|
@@ -576,7 +726,7 @@ function toProspectingLifecycleStage(stage) {
|
|
|
576
726
|
};
|
|
577
727
|
}
|
|
578
728
|
function leadGenStagesForEntity(entity) {
|
|
579
|
-
return Object.values(LEAD_GEN_STAGE_CATALOG).filter((stage) => stage.entity === entity).sort((a, b) => a.order - b.order).map(toProspectingLifecycleStage);
|
|
729
|
+
return Object.values(LEAD_GEN_STAGE_CATALOG).filter((stage) => stage.entity === entity || stage.additionalEntities?.includes(entity)).sort((a, b) => a.order - b.order).map(toProspectingLifecycleStage);
|
|
580
730
|
}
|
|
581
731
|
var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
|
|
582
732
|
listEntityId: "leadgen.list",
|
|
@@ -606,10 +756,10 @@ var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
|
|
|
606
756
|
description: "Prospecting pipeline for DTC subscription or subscription-ready brands where Apollo is the source and contact-enrichment layer, Elevasis handles company research and fit scoring, and approved leads export as an approved lead list.",
|
|
607
757
|
steps: [
|
|
608
758
|
PROSPECTING_STEPS.dtcApolloClickup.importApolloSearch,
|
|
759
|
+
PROSPECTING_STEPS.dtcApolloClickup.apifyCrawl,
|
|
609
760
|
PROSPECTING_STEPS.dtcApolloClickup.analyzeWebsites,
|
|
610
761
|
PROSPECTING_STEPS.dtcApolloClickup.scoreDtcFit,
|
|
611
762
|
PROSPECTING_STEPS.dtcApolloClickup.enrichDecisionMakers,
|
|
612
|
-
PROSPECTING_STEPS.dtcApolloClickup.verifyEmails,
|
|
613
763
|
PROSPECTING_STEPS.dtcApolloClickup.reviewAndExport
|
|
614
764
|
]
|
|
615
765
|
}
|
|
@@ -764,11 +764,65 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
764
764
|
export: "export";
|
|
765
765
|
}>>;
|
|
766
766
|
stageKey: z.ZodString;
|
|
767
|
+
recordEntity: z.ZodOptional<z.ZodEnum<{
|
|
768
|
+
company: "company";
|
|
769
|
+
contact: "contact";
|
|
770
|
+
}>>;
|
|
771
|
+
recordsStageKey: z.ZodOptional<z.ZodString>;
|
|
772
|
+
recordSourceStageKey: z.ZodOptional<z.ZodString>;
|
|
767
773
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
768
774
|
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
769
775
|
capabilityKey: z.ZodString;
|
|
770
776
|
defaultBatchSize: z.ZodNumber;
|
|
771
777
|
maxBatchSize: z.ZodNumber;
|
|
778
|
+
recordColumns: z.ZodOptional<z.ZodObject<{
|
|
779
|
+
company: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
780
|
+
key: z.ZodString;
|
|
781
|
+
label: z.ZodString;
|
|
782
|
+
path: z.ZodString;
|
|
783
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
784
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
785
|
+
text: "text";
|
|
786
|
+
badge: "badge";
|
|
787
|
+
datetime: "datetime";
|
|
788
|
+
count: "count";
|
|
789
|
+
json: "json";
|
|
790
|
+
}>>;
|
|
791
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
792
|
+
}, z.core.$strip>>>;
|
|
793
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
794
|
+
key: z.ZodString;
|
|
795
|
+
label: z.ZodString;
|
|
796
|
+
path: z.ZodString;
|
|
797
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
798
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
799
|
+
text: "text";
|
|
800
|
+
badge: "badge";
|
|
801
|
+
datetime: "datetime";
|
|
802
|
+
count: "count";
|
|
803
|
+
json: "json";
|
|
804
|
+
}>>;
|
|
805
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
806
|
+
}, z.core.$strip>>>;
|
|
807
|
+
}, z.core.$strip>>;
|
|
808
|
+
credentialRequirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
809
|
+
key: z.ZodString;
|
|
810
|
+
provider: z.ZodString;
|
|
811
|
+
credentialType: z.ZodEnum<{
|
|
812
|
+
"api-key": "api-key";
|
|
813
|
+
"api-key-secret": "api-key-secret";
|
|
814
|
+
oauth: "oauth";
|
|
815
|
+
"webhook-secret": "webhook-secret";
|
|
816
|
+
}>;
|
|
817
|
+
label: z.ZodString;
|
|
818
|
+
required: z.ZodBoolean;
|
|
819
|
+
selectionMode: z.ZodOptional<z.ZodEnum<{
|
|
820
|
+
single: "single";
|
|
821
|
+
multiple: "multiple";
|
|
822
|
+
}>>;
|
|
823
|
+
inputPath: z.ZodString;
|
|
824
|
+
verifyOnRun: z.ZodOptional<z.ZodBoolean>;
|
|
825
|
+
}, z.core.$strip>>>;
|
|
772
826
|
}, z.core.$strip>>;
|
|
773
827
|
}, z.core.$strip>>;
|
|
774
828
|
}, z.core.$strip>;
|
|
@@ -585,11 +585,65 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
585
585
|
export: "export";
|
|
586
586
|
}>>;
|
|
587
587
|
stageKey: z.ZodString;
|
|
588
|
+
recordEntity: z.ZodOptional<z.ZodEnum<{
|
|
589
|
+
company: "company";
|
|
590
|
+
contact: "contact";
|
|
591
|
+
}>>;
|
|
592
|
+
recordsStageKey: z.ZodOptional<z.ZodString>;
|
|
593
|
+
recordSourceStageKey: z.ZodOptional<z.ZodString>;
|
|
588
594
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
589
595
|
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
590
596
|
capabilityKey: z.ZodString;
|
|
591
597
|
defaultBatchSize: z.ZodNumber;
|
|
592
598
|
maxBatchSize: z.ZodNumber;
|
|
599
|
+
recordColumns: z.ZodOptional<z.ZodObject<{
|
|
600
|
+
company: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
601
|
+
key: z.ZodString;
|
|
602
|
+
label: z.ZodString;
|
|
603
|
+
path: z.ZodString;
|
|
604
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
605
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
606
|
+
text: "text";
|
|
607
|
+
badge: "badge";
|
|
608
|
+
datetime: "datetime";
|
|
609
|
+
count: "count";
|
|
610
|
+
json: "json";
|
|
611
|
+
}>>;
|
|
612
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
613
|
+
}, z.core.$strip>>>;
|
|
614
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
615
|
+
key: z.ZodString;
|
|
616
|
+
label: z.ZodString;
|
|
617
|
+
path: z.ZodString;
|
|
618
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
619
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
620
|
+
text: "text";
|
|
621
|
+
badge: "badge";
|
|
622
|
+
datetime: "datetime";
|
|
623
|
+
count: "count";
|
|
624
|
+
json: "json";
|
|
625
|
+
}>>;
|
|
626
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
627
|
+
}, z.core.$strip>>>;
|
|
628
|
+
}, z.core.$strip>>;
|
|
629
|
+
credentialRequirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
630
|
+
key: z.ZodString;
|
|
631
|
+
provider: z.ZodString;
|
|
632
|
+
credentialType: z.ZodEnum<{
|
|
633
|
+
"api-key": "api-key";
|
|
634
|
+
"api-key-secret": "api-key-secret";
|
|
635
|
+
oauth: "oauth";
|
|
636
|
+
"webhook-secret": "webhook-secret";
|
|
637
|
+
}>;
|
|
638
|
+
label: z.ZodString;
|
|
639
|
+
required: z.ZodBoolean;
|
|
640
|
+
selectionMode: z.ZodOptional<z.ZodEnum<{
|
|
641
|
+
single: "single";
|
|
642
|
+
multiple: "multiple";
|
|
643
|
+
}>>;
|
|
644
|
+
inputPath: z.ZodString;
|
|
645
|
+
verifyOnRun: z.ZodOptional<z.ZodBoolean>;
|
|
646
|
+
}, z.core.$strip>>>;
|
|
593
647
|
}, z.core.$strip>>;
|
|
594
648
|
}, z.core.$strip>>;
|
|
595
649
|
}, z.core.$strip>;
|
|
@@ -1996,11 +2050,65 @@ declare const OrganizationModelProspectingSchema: z.ZodObject<{
|
|
|
1996
2050
|
export: "export";
|
|
1997
2051
|
}>>;
|
|
1998
2052
|
stageKey: z.ZodString;
|
|
2053
|
+
recordEntity: z.ZodOptional<z.ZodEnum<{
|
|
2054
|
+
company: "company";
|
|
2055
|
+
contact: "contact";
|
|
2056
|
+
}>>;
|
|
2057
|
+
recordsStageKey: z.ZodOptional<z.ZodString>;
|
|
2058
|
+
recordSourceStageKey: z.ZodOptional<z.ZodString>;
|
|
1999
2059
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2000
2060
|
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
2001
2061
|
capabilityKey: z.ZodString;
|
|
2002
2062
|
defaultBatchSize: z.ZodNumber;
|
|
2003
2063
|
maxBatchSize: z.ZodNumber;
|
|
2064
|
+
recordColumns: z.ZodOptional<z.ZodObject<{
|
|
2065
|
+
company: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2066
|
+
key: z.ZodString;
|
|
2067
|
+
label: z.ZodString;
|
|
2068
|
+
path: z.ZodString;
|
|
2069
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
2070
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
2071
|
+
text: "text";
|
|
2072
|
+
badge: "badge";
|
|
2073
|
+
datetime: "datetime";
|
|
2074
|
+
count: "count";
|
|
2075
|
+
json: "json";
|
|
2076
|
+
}>>;
|
|
2077
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
2078
|
+
}, z.core.$strip>>>;
|
|
2079
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2080
|
+
key: z.ZodString;
|
|
2081
|
+
label: z.ZodString;
|
|
2082
|
+
path: z.ZodString;
|
|
2083
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
2084
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
2085
|
+
text: "text";
|
|
2086
|
+
badge: "badge";
|
|
2087
|
+
datetime: "datetime";
|
|
2088
|
+
count: "count";
|
|
2089
|
+
json: "json";
|
|
2090
|
+
}>>;
|
|
2091
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
2092
|
+
}, z.core.$strip>>>;
|
|
2093
|
+
}, z.core.$strip>>;
|
|
2094
|
+
credentialRequirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2095
|
+
key: z.ZodString;
|
|
2096
|
+
provider: z.ZodString;
|
|
2097
|
+
credentialType: z.ZodEnum<{
|
|
2098
|
+
"api-key": "api-key";
|
|
2099
|
+
"api-key-secret": "api-key-secret";
|
|
2100
|
+
oauth: "oauth";
|
|
2101
|
+
"webhook-secret": "webhook-secret";
|
|
2102
|
+
}>;
|
|
2103
|
+
label: z.ZodString;
|
|
2104
|
+
required: z.ZodBoolean;
|
|
2105
|
+
selectionMode: z.ZodOptional<z.ZodEnum<{
|
|
2106
|
+
single: "single";
|
|
2107
|
+
multiple: "multiple";
|
|
2108
|
+
}>>;
|
|
2109
|
+
inputPath: z.ZodString;
|
|
2110
|
+
verifyOnRun: z.ZodOptional<z.ZodBoolean>;
|
|
2111
|
+
}, z.core.$strip>>>;
|
|
2004
2112
|
}, z.core.$strip>>;
|
|
2005
2113
|
}, z.core.$strip>>;
|
|
2006
2114
|
}, z.core.$strip>;
|