@elevasis/core 0.14.0 → 0.15.1
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 +60 -0
- package/dist/index.js +198 -1
- package/dist/organization-model/index.d.ts +60 -0
- package/dist/organization-model/index.js +198 -1
- package/dist/test-utils/index.d.ts +399 -363
- package/dist/test-utils/index.js +198 -1
- package/package.json +3 -3
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +444 -309
- package/src/business/acquisition/activity-events.ts +12 -3
- package/src/business/acquisition/api-schemas.test.ts +315 -4
- package/src/business/acquisition/api-schemas.ts +140 -17
- package/src/business/acquisition/build-templates.ts +44 -0
- package/src/business/acquisition/crm-next-action.test.ts +262 -0
- package/src/business/acquisition/crm-next-action.ts +220 -0
- package/src/business/acquisition/crm-priority.test.ts +216 -0
- package/src/business/acquisition/crm-priority.ts +349 -0
- package/src/business/acquisition/crm-state-actions.test.ts +12 -21
- package/src/business/acquisition/deal-ownership.test.ts +351 -0
- package/src/business/acquisition/deal-ownership.ts +120 -0
- package/src/business/acquisition/derive-actions.test.ts +101 -37
- package/src/business/acquisition/derive-actions.ts +49 -24
- package/src/business/acquisition/index.ts +163 -149
- package/src/business/acquisition/types.ts +48 -4
- package/src/execution/engine/index.ts +4 -3
- package/src/execution/engine/tools/lead-service-types.ts +68 -51
- package/src/execution/engine/tools/platform/acquisition/list-tools.ts +6 -5
- package/src/execution/engine/tools/platform/acquisition/types.ts +3 -1
- package/src/execution/engine/tools/registry.ts +4 -3
- package/src/execution/engine/tools/tool-maps.ts +821 -816
- package/src/organization-model/domains/prospecting.ts +204 -1
- package/src/organization-model/domains/sales.test.ts +218 -0
- package/src/organization-model/domains/sales.ts +558 -366
- package/src/organization-model/types.ts +2 -2
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +444 -309
- package/src/supabase/database.types.ts +2978 -2958
package/dist/test-utils/index.js
CHANGED
|
@@ -19626,13 +19626,33 @@ var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
|
|
|
19626
19626
|
id: ModelIdSchema,
|
|
19627
19627
|
order: z.number().int().min(0)
|
|
19628
19628
|
});
|
|
19629
|
+
var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
|
|
19630
|
+
id: ModelIdSchema,
|
|
19631
|
+
primaryEntity: z.enum(["company", "contact"]),
|
|
19632
|
+
outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
|
|
19633
|
+
stageKey: ModelIdSchema,
|
|
19634
|
+
dependsOn: z.array(ModelIdSchema).optional(),
|
|
19635
|
+
dependencyMode: z.literal("per-record-eligibility"),
|
|
19636
|
+
capabilityKey: ModelIdSchema,
|
|
19637
|
+
defaultBatchSize: z.number().int().positive(),
|
|
19638
|
+
maxBatchSize: z.number().int().positive()
|
|
19639
|
+
}).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
|
|
19640
|
+
message: "defaultBatchSize must be less than or equal to maxBatchSize",
|
|
19641
|
+
path: ["defaultBatchSize"]
|
|
19642
|
+
});
|
|
19643
|
+
var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
|
|
19644
|
+
id: ModelIdSchema,
|
|
19645
|
+
steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
19646
|
+
});
|
|
19629
19647
|
var OrganizationModelProspectingSchema = z.object({
|
|
19630
19648
|
listEntityId: ModelIdSchema,
|
|
19631
19649
|
companyEntityId: ModelIdSchema,
|
|
19632
19650
|
contactEntityId: ModelIdSchema,
|
|
19633
19651
|
description: DescriptionSchema.optional(),
|
|
19634
19652
|
companyStages: z.array(ProspectingLifecycleStageSchema).min(1),
|
|
19635
|
-
contactStages: z.array(ProspectingLifecycleStageSchema).min(1)
|
|
19653
|
+
contactStages: z.array(ProspectingLifecycleStageSchema).min(1),
|
|
19654
|
+
defaultBuildTemplateId: ModelIdSchema,
|
|
19655
|
+
buildTemplates: z.array(ProspectingBuildTemplateSchema).min(1)
|
|
19636
19656
|
});
|
|
19637
19657
|
var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
|
|
19638
19658
|
listEntityId: "leadgen.list",
|
|
@@ -19648,6 +19668,183 @@ var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
|
|
|
19648
19668
|
{ id: "verified", label: "Verified", order: 2 },
|
|
19649
19669
|
{ id: "personalized", label: "Personalized", order: 3 },
|
|
19650
19670
|
{ id: "uploaded", label: "Uploaded", order: 4 }
|
|
19671
|
+
],
|
|
19672
|
+
defaultBuildTemplateId: "local-services",
|
|
19673
|
+
buildTemplates: [
|
|
19674
|
+
{
|
|
19675
|
+
id: "local-services",
|
|
19676
|
+
label: "Local Services Prospecting",
|
|
19677
|
+
description: "Curated local-services list build using company sourcing, website analysis, qualification, contact discovery, verification, personalization, and review.",
|
|
19678
|
+
steps: [
|
|
19679
|
+
{
|
|
19680
|
+
id: "source-companies",
|
|
19681
|
+
label: "Source companies",
|
|
19682
|
+
primaryEntity: "company",
|
|
19683
|
+
outputs: ["company"],
|
|
19684
|
+
stageKey: "populated",
|
|
19685
|
+
dependencyMode: "per-record-eligibility",
|
|
19686
|
+
capabilityKey: "lead-gen.company.source",
|
|
19687
|
+
defaultBatchSize: 100,
|
|
19688
|
+
maxBatchSize: 250
|
|
19689
|
+
},
|
|
19690
|
+
{
|
|
19691
|
+
id: "analyze-websites",
|
|
19692
|
+
label: "Analyze websites",
|
|
19693
|
+
primaryEntity: "company",
|
|
19694
|
+
outputs: ["company"],
|
|
19695
|
+
stageKey: "extracted",
|
|
19696
|
+
dependsOn: ["source-companies"],
|
|
19697
|
+
dependencyMode: "per-record-eligibility",
|
|
19698
|
+
capabilityKey: "lead-gen.company.website-extract",
|
|
19699
|
+
defaultBatchSize: 50,
|
|
19700
|
+
maxBatchSize: 100
|
|
19701
|
+
},
|
|
19702
|
+
{
|
|
19703
|
+
id: "qualify-companies",
|
|
19704
|
+
label: "Qualify companies",
|
|
19705
|
+
primaryEntity: "company",
|
|
19706
|
+
outputs: ["company"],
|
|
19707
|
+
stageKey: "qualified",
|
|
19708
|
+
dependsOn: ["analyze-websites"],
|
|
19709
|
+
dependencyMode: "per-record-eligibility",
|
|
19710
|
+
capabilityKey: "lead-gen.company.qualify",
|
|
19711
|
+
defaultBatchSize: 100,
|
|
19712
|
+
maxBatchSize: 250
|
|
19713
|
+
},
|
|
19714
|
+
{
|
|
19715
|
+
id: "find-contacts",
|
|
19716
|
+
label: "Find contacts",
|
|
19717
|
+
primaryEntity: "contact",
|
|
19718
|
+
outputs: ["contact"],
|
|
19719
|
+
stageKey: "discovered",
|
|
19720
|
+
dependsOn: ["qualify-companies"],
|
|
19721
|
+
dependencyMode: "per-record-eligibility",
|
|
19722
|
+
capabilityKey: "lead-gen.contact.discover",
|
|
19723
|
+
defaultBatchSize: 50,
|
|
19724
|
+
maxBatchSize: 100
|
|
19725
|
+
},
|
|
19726
|
+
{
|
|
19727
|
+
id: "verify-emails",
|
|
19728
|
+
label: "Verify emails",
|
|
19729
|
+
primaryEntity: "contact",
|
|
19730
|
+
outputs: ["contact"],
|
|
19731
|
+
stageKey: "verified",
|
|
19732
|
+
dependsOn: ["find-contacts"],
|
|
19733
|
+
dependencyMode: "per-record-eligibility",
|
|
19734
|
+
capabilityKey: "lead-gen.contact.verify-email",
|
|
19735
|
+
defaultBatchSize: 100,
|
|
19736
|
+
maxBatchSize: 500
|
|
19737
|
+
},
|
|
19738
|
+
{
|
|
19739
|
+
id: "personalize",
|
|
19740
|
+
label: "Personalize",
|
|
19741
|
+
primaryEntity: "contact",
|
|
19742
|
+
outputs: ["contact"],
|
|
19743
|
+
stageKey: "personalized",
|
|
19744
|
+
dependsOn: ["verify-emails"],
|
|
19745
|
+
dependencyMode: "per-record-eligibility",
|
|
19746
|
+
capabilityKey: "lead-gen.contact.personalize",
|
|
19747
|
+
defaultBatchSize: 25,
|
|
19748
|
+
maxBatchSize: 100
|
|
19749
|
+
},
|
|
19750
|
+
{
|
|
19751
|
+
id: "review",
|
|
19752
|
+
label: "Review",
|
|
19753
|
+
primaryEntity: "contact",
|
|
19754
|
+
outputs: ["export"],
|
|
19755
|
+
stageKey: "uploaded",
|
|
19756
|
+
dependsOn: ["personalize"],
|
|
19757
|
+
dependencyMode: "per-record-eligibility",
|
|
19758
|
+
capabilityKey: "lead-gen.review.outreach-ready",
|
|
19759
|
+
defaultBatchSize: 25,
|
|
19760
|
+
maxBatchSize: 100
|
|
19761
|
+
}
|
|
19762
|
+
]
|
|
19763
|
+
},
|
|
19764
|
+
{
|
|
19765
|
+
id: "dtc-subscription-apollo-clickup",
|
|
19766
|
+
label: "DTC Subscription Apollo Export",
|
|
19767
|
+
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.",
|
|
19768
|
+
steps: [
|
|
19769
|
+
{
|
|
19770
|
+
id: "import-apollo-search",
|
|
19771
|
+
label: "Import Apollo search",
|
|
19772
|
+
description: "Pull companies and seed contact data from a predefined Apollo search or list.",
|
|
19773
|
+
primaryEntity: "company",
|
|
19774
|
+
outputs: ["company", "contact"],
|
|
19775
|
+
stageKey: "populated",
|
|
19776
|
+
dependencyMode: "per-record-eligibility",
|
|
19777
|
+
capabilityKey: "lead-gen.company.apollo-import",
|
|
19778
|
+
defaultBatchSize: 250,
|
|
19779
|
+
maxBatchSize: 1e3
|
|
19780
|
+
},
|
|
19781
|
+
{
|
|
19782
|
+
id: "analyze-websites",
|
|
19783
|
+
label: "Analyze websites",
|
|
19784
|
+
description: "Extract subscription, product, retention, and tech-stack signals from each brand website.",
|
|
19785
|
+
primaryEntity: "company",
|
|
19786
|
+
outputs: ["company"],
|
|
19787
|
+
stageKey: "extracted",
|
|
19788
|
+
dependsOn: ["import-apollo-search"],
|
|
19789
|
+
dependencyMode: "per-record-eligibility",
|
|
19790
|
+
capabilityKey: "lead-gen.company.website-extract",
|
|
19791
|
+
defaultBatchSize: 50,
|
|
19792
|
+
maxBatchSize: 100
|
|
19793
|
+
},
|
|
19794
|
+
{
|
|
19795
|
+
id: "score-dtc-fit",
|
|
19796
|
+
label: "Score DTC fit",
|
|
19797
|
+
description: "Classify subscription potential, consumable-product fit, retention maturity, and disqualifiers.",
|
|
19798
|
+
primaryEntity: "company",
|
|
19799
|
+
outputs: ["company"],
|
|
19800
|
+
stageKey: "qualified",
|
|
19801
|
+
dependsOn: ["analyze-websites"],
|
|
19802
|
+
dependencyMode: "per-record-eligibility",
|
|
19803
|
+
capabilityKey: "lead-gen.company.dtc-subscription-qualify",
|
|
19804
|
+
defaultBatchSize: 100,
|
|
19805
|
+
maxBatchSize: 250
|
|
19806
|
+
},
|
|
19807
|
+
{
|
|
19808
|
+
id: "enrich-decision-makers",
|
|
19809
|
+
label: "Enrich decision-makers",
|
|
19810
|
+
description: "Use Apollo to find qualified contacts such as founders, retention leads, lifecycle leads, and marketing owners.",
|
|
19811
|
+
primaryEntity: "contact",
|
|
19812
|
+
outputs: ["contact"],
|
|
19813
|
+
stageKey: "discovered",
|
|
19814
|
+
dependsOn: ["score-dtc-fit"],
|
|
19815
|
+
dependencyMode: "per-record-eligibility",
|
|
19816
|
+
capabilityKey: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
19817
|
+
defaultBatchSize: 100,
|
|
19818
|
+
maxBatchSize: 250
|
|
19819
|
+
},
|
|
19820
|
+
{
|
|
19821
|
+
id: "verify-emails",
|
|
19822
|
+
label: "Verify emails",
|
|
19823
|
+
description: "Verify deliverability before the QC and handoff step.",
|
|
19824
|
+
primaryEntity: "contact",
|
|
19825
|
+
outputs: ["contact"],
|
|
19826
|
+
stageKey: "verified",
|
|
19827
|
+
dependsOn: ["enrich-decision-makers"],
|
|
19828
|
+
dependencyMode: "per-record-eligibility",
|
|
19829
|
+
capabilityKey: "lead-gen.contact.verify-email",
|
|
19830
|
+
defaultBatchSize: 250,
|
|
19831
|
+
maxBatchSize: 500
|
|
19832
|
+
},
|
|
19833
|
+
{
|
|
19834
|
+
id: "review-and-export",
|
|
19835
|
+
label: "Review and export",
|
|
19836
|
+
description: "Operator QC approves or rejects leads, then approved records are exported as a lead list.",
|
|
19837
|
+
primaryEntity: "company",
|
|
19838
|
+
outputs: ["export"],
|
|
19839
|
+
stageKey: "uploaded",
|
|
19840
|
+
dependsOn: ["verify-emails"],
|
|
19841
|
+
dependencyMode: "per-record-eligibility",
|
|
19842
|
+
capabilityKey: "lead-gen.export.list",
|
|
19843
|
+
defaultBatchSize: 100,
|
|
19844
|
+
maxBatchSize: 250
|
|
19845
|
+
}
|
|
19846
|
+
]
|
|
19847
|
+
}
|
|
19651
19848
|
]
|
|
19652
19849
|
};
|
|
19653
19850
|
var SurfaceTypeSchema = z.enum(["page", "dashboard", "graph", "detail", "list", "settings"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Minimal shared constants across Elevasis monorepo",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
12
|
"exports": {
|
|
15
13
|
".": {
|
|
16
14
|
"types": "./dist/index.d.ts",
|
|
@@ -60,6 +58,8 @@
|
|
|
60
58
|
"stripe": "^20.2.0",
|
|
61
59
|
"zod": "^4.1.0"
|
|
62
60
|
},
|
|
61
|
+
"main": "./dist/index.js",
|
|
62
|
+
"types": "./dist/index.d.ts",
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc --noEmit",
|
|
65
65
|
"build:publish": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && pnpm exec tsup && pnpm exec rollup -c rollup.dts.config.mjs && node -e \"require('fs').rmSync('dist/_dts',{recursive:true,force:true})\"",
|