@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/cli.cjs
CHANGED
|
@@ -37005,6 +37005,86 @@ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
|
|
|
37005
37005
|
id: ModelIdSchema,
|
|
37006
37006
|
steps: external_exports.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
37007
37007
|
});
|
|
37008
|
+
var CapabilitySchema = external_exports.object({
|
|
37009
|
+
id: ModelIdSchema,
|
|
37010
|
+
label: external_exports.string(),
|
|
37011
|
+
description: external_exports.string(),
|
|
37012
|
+
resourceId: ModelIdSchema
|
|
37013
|
+
});
|
|
37014
|
+
var CAPABILITY_REGISTRY = [
|
|
37015
|
+
{
|
|
37016
|
+
id: "lead-gen.company.source",
|
|
37017
|
+
label: "Source companies",
|
|
37018
|
+
description: "Import source companies from a list provider.",
|
|
37019
|
+
resourceId: "lgn-import-workflow"
|
|
37020
|
+
},
|
|
37021
|
+
{
|
|
37022
|
+
id: "lead-gen.company.apollo-import",
|
|
37023
|
+
label: "Import from Apollo",
|
|
37024
|
+
description: "Pull companies and seed contact data from an Apollo search or list.",
|
|
37025
|
+
resourceId: "lgn-01c-apollo-import-workflow"
|
|
37026
|
+
},
|
|
37027
|
+
{
|
|
37028
|
+
id: "lead-gen.contact.discover",
|
|
37029
|
+
label: "Discover contact emails",
|
|
37030
|
+
description: "Find email addresses for contacts at qualified companies.",
|
|
37031
|
+
resourceId: "lgn-04-email-discovery-workflow"
|
|
37032
|
+
},
|
|
37033
|
+
{
|
|
37034
|
+
id: "lead-gen.contact.verify-email",
|
|
37035
|
+
label: "Verify emails",
|
|
37036
|
+
description: "Check email deliverability before outreach.",
|
|
37037
|
+
resourceId: "lgn-05-email-verification-workflow"
|
|
37038
|
+
},
|
|
37039
|
+
{
|
|
37040
|
+
id: "lead-gen.company.website-extract",
|
|
37041
|
+
label: "Extract website signals",
|
|
37042
|
+
description: "Scrape and analyze company websites for qualification signals.",
|
|
37043
|
+
resourceId: "lgn-02-website-extract-workflow"
|
|
37044
|
+
},
|
|
37045
|
+
{
|
|
37046
|
+
id: "lead-gen.company.qualify",
|
|
37047
|
+
label: "Qualify companies",
|
|
37048
|
+
description: "Score and filter companies against the ICP rubric.",
|
|
37049
|
+
resourceId: "lgn-03-company-qualification-workflow"
|
|
37050
|
+
},
|
|
37051
|
+
{
|
|
37052
|
+
id: "lead-gen.company.dtc-subscription-qualify",
|
|
37053
|
+
label: "Qualify DTC subscription fit",
|
|
37054
|
+
description: "Classify subscription potential and consumable-product fit for DTC brands.",
|
|
37055
|
+
resourceId: "lgn-03b-dtc-subscription-score-workflow"
|
|
37056
|
+
},
|
|
37057
|
+
{
|
|
37058
|
+
id: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
37059
|
+
label: "Enrich decision-makers",
|
|
37060
|
+
description: "Find and enrich qualified contacts at qualified companies via Apollo.",
|
|
37061
|
+
resourceId: "lgn-04b-apollo-decision-maker-enrich-workflow"
|
|
37062
|
+
},
|
|
37063
|
+
{
|
|
37064
|
+
id: "lead-gen.contact.personalize",
|
|
37065
|
+
label: "Personalize outreach",
|
|
37066
|
+
description: "Generate personalized opening lines for each contact.",
|
|
37067
|
+
resourceId: "ist-personalization-workflow"
|
|
37068
|
+
},
|
|
37069
|
+
{
|
|
37070
|
+
id: "lead-gen.review.outreach-ready",
|
|
37071
|
+
label: "Upload to outreach",
|
|
37072
|
+
description: "Upload approved contacts to the outreach sequence after QC review.",
|
|
37073
|
+
resourceId: "ist-upload-contacts-workflow"
|
|
37074
|
+
},
|
|
37075
|
+
{
|
|
37076
|
+
id: "lead-gen.export.list",
|
|
37077
|
+
label: "Export lead list",
|
|
37078
|
+
description: "Export approved leads as a downloadable lead list.",
|
|
37079
|
+
resourceId: "lgn-06-export-list-workflow"
|
|
37080
|
+
},
|
|
37081
|
+
{
|
|
37082
|
+
id: "lead-gen.company.cleanup",
|
|
37083
|
+
label: "Clean up companies",
|
|
37084
|
+
description: "Remove disqualified or duplicate companies from the list.",
|
|
37085
|
+
resourceId: "lgn-company-cleanup-workflow"
|
|
37086
|
+
}
|
|
37087
|
+
];
|
|
37008
37088
|
var PROSPECTING_STEPS = {
|
|
37009
37089
|
localServices: {
|
|
37010
37090
|
sourceCompanies: {
|
|
@@ -37743,8 +37823,12 @@ var LEGACY_FEATURE_ALIASES = /* @__PURE__ */ new Map([
|
|
|
37743
37823
|
function hasFeature(featuresById, featureId) {
|
|
37744
37824
|
return featuresById.has(featureId) || featuresById.has(LEGACY_FEATURE_ALIASES.get(featureId) ?? "");
|
|
37745
37825
|
}
|
|
37826
|
+
function defaultFeaturePathFor(id) {
|
|
37827
|
+
return `/${id.replaceAll(".", "/")}`;
|
|
37828
|
+
}
|
|
37746
37829
|
var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
|
|
37747
37830
|
const featuresById = collectIds(model.features, ctx, ["features"], "Feature");
|
|
37831
|
+
const featureIdsByEffectivePath = /* @__PURE__ */ new Map();
|
|
37748
37832
|
model.features.forEach((feature, featureIndex) => {
|
|
37749
37833
|
const segments = feature.id.split(".");
|
|
37750
37834
|
if (segments.length > 1) {
|
|
@@ -37760,6 +37844,20 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
37760
37844
|
const hasChildren = model.features.some(
|
|
37761
37845
|
(candidate) => candidate.id.startsWith(`${feature.id}.`) && candidate.id !== feature.id
|
|
37762
37846
|
);
|
|
37847
|
+
const contributesRoutePath = feature.path !== void 0 || !hasChildren;
|
|
37848
|
+
if (contributesRoutePath) {
|
|
37849
|
+
const effectivePath = feature.path ?? defaultFeaturePathFor(feature.id);
|
|
37850
|
+
const existingFeatureId = featureIdsByEffectivePath.get(effectivePath);
|
|
37851
|
+
if (existingFeatureId !== void 0) {
|
|
37852
|
+
addIssue(
|
|
37853
|
+
ctx,
|
|
37854
|
+
["features", featureIndex, feature.path === void 0 ? "id" : "path"],
|
|
37855
|
+
`Feature "${feature.id}" effective path "${effectivePath}" duplicates feature "${existingFeatureId}"`
|
|
37856
|
+
);
|
|
37857
|
+
} else {
|
|
37858
|
+
featureIdsByEffectivePath.set(effectivePath, feature.id);
|
|
37859
|
+
}
|
|
37860
|
+
}
|
|
37763
37861
|
if (hasChildren && feature.enabled) {
|
|
37764
37862
|
const hasEnabledDescendant = model.features.some(
|
|
37765
37863
|
(candidate) => candidate.id.startsWith(`${feature.id}.`) && candidate.enabled
|
|
@@ -37773,6 +37871,43 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
37773
37871
|
}
|
|
37774
37872
|
}
|
|
37775
37873
|
});
|
|
37874
|
+
const surfacesById = collectIds(model.navigation.surfaces, ctx, ["navigation", "surfaces"], "Navigation surface");
|
|
37875
|
+
if (model.navigation.defaultSurfaceId !== void 0 && !surfacesById.has(model.navigation.defaultSurfaceId)) {
|
|
37876
|
+
addIssue(
|
|
37877
|
+
ctx,
|
|
37878
|
+
["navigation", "defaultSurfaceId"],
|
|
37879
|
+
`Navigation defaultSurfaceId references unknown surface "${model.navigation.defaultSurfaceId}"`
|
|
37880
|
+
);
|
|
37881
|
+
}
|
|
37882
|
+
model.navigation.groups.forEach((group, groupIndex) => {
|
|
37883
|
+
group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
|
|
37884
|
+
if (!surfacesById.has(surfaceId)) {
|
|
37885
|
+
addIssue(
|
|
37886
|
+
ctx,
|
|
37887
|
+
["navigation", "groups", groupIndex, "surfaceIds", surfaceIndex],
|
|
37888
|
+
`Navigation group "${group.id}" references unknown surface "${surfaceId}"`
|
|
37889
|
+
);
|
|
37890
|
+
}
|
|
37891
|
+
});
|
|
37892
|
+
});
|
|
37893
|
+
model.navigation.surfaces.forEach((surface, surfaceIndex) => {
|
|
37894
|
+
if (surface.featureId !== void 0 && !hasFeature(featuresById, surface.featureId)) {
|
|
37895
|
+
addIssue(
|
|
37896
|
+
ctx,
|
|
37897
|
+
["navigation", "surfaces", surfaceIndex, "featureId"],
|
|
37898
|
+
`Navigation surface "${surface.id}" references unknown feature "${surface.featureId}"`
|
|
37899
|
+
);
|
|
37900
|
+
}
|
|
37901
|
+
surface.featureIds.forEach((featureId, featureIndex) => {
|
|
37902
|
+
if (!hasFeature(featuresById, featureId)) {
|
|
37903
|
+
addIssue(
|
|
37904
|
+
ctx,
|
|
37905
|
+
["navigation", "surfaces", surfaceIndex, "featureIds", featureIndex],
|
|
37906
|
+
`Navigation surface "${surface.id}" references unknown feature "${featureId}"`
|
|
37907
|
+
);
|
|
37908
|
+
}
|
|
37909
|
+
});
|
|
37910
|
+
});
|
|
37776
37911
|
const segmentsById = new Map(model.customers.segments.map((seg) => [seg.id, seg]));
|
|
37777
37912
|
model.offerings.products.forEach((product, productIndex) => {
|
|
37778
37913
|
product.targetSegmentIds.forEach((segmentId, segmentIndex) => {
|
|
@@ -37820,6 +37955,7 @@ var OrganizationGraphNodeKindSchema = external_exports.enum([
|
|
|
37820
37955
|
"surface",
|
|
37821
37956
|
"entity",
|
|
37822
37957
|
"capability",
|
|
37958
|
+
"stage",
|
|
37823
37959
|
"resource",
|
|
37824
37960
|
"knowledge"
|
|
37825
37961
|
]);
|
|
@@ -41957,6 +42093,75 @@ function buildOrganizationGraph(input) {
|
|
|
41957
42093
|
});
|
|
41958
42094
|
}
|
|
41959
42095
|
}
|
|
42096
|
+
const allStages = [
|
|
42097
|
+
...organizationModel.prospecting.companyStages,
|
|
42098
|
+
...organizationModel.prospecting.contactStages
|
|
42099
|
+
].sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
|
|
42100
|
+
for (const stage of allStages) {
|
|
42101
|
+
const id = nodeId("stage", stage.id);
|
|
42102
|
+
pushUniqueNode(nodes, nodeIds, {
|
|
42103
|
+
id,
|
|
42104
|
+
kind: "stage",
|
|
42105
|
+
label: stage.label,
|
|
42106
|
+
sourceId: stage.id,
|
|
42107
|
+
...stage.description ? { description: stage.description } : {},
|
|
42108
|
+
...stage.icon ? { icon: stage.icon } : {}
|
|
42109
|
+
});
|
|
42110
|
+
pushUniqueEdge(edges, edgeIds, {
|
|
42111
|
+
id: edgeId("contains", organizationNode.id, id),
|
|
42112
|
+
kind: "contains",
|
|
42113
|
+
sourceId: organizationNode.id,
|
|
42114
|
+
targetId: id
|
|
42115
|
+
});
|
|
42116
|
+
}
|
|
42117
|
+
for (const cap of [...CAPABILITY_REGISTRY].sort((a, b) => a.id.localeCompare(b.id))) {
|
|
42118
|
+
const id = nodeId("capability", cap.id);
|
|
42119
|
+
pushUniqueNode(nodes, nodeIds, {
|
|
42120
|
+
id,
|
|
42121
|
+
kind: "capability",
|
|
42122
|
+
label: cap.label,
|
|
42123
|
+
sourceId: cap.id,
|
|
42124
|
+
description: cap.description
|
|
42125
|
+
});
|
|
42126
|
+
pushUniqueEdge(edges, edgeIds, {
|
|
42127
|
+
id: edgeId("contains", organizationNode.id, id),
|
|
42128
|
+
kind: "contains",
|
|
42129
|
+
sourceId: organizationNode.id,
|
|
42130
|
+
targetId: id
|
|
42131
|
+
});
|
|
42132
|
+
const resourceNode = ensureResourceNode(nodes, nodeIds, resourceNodesById, cap.resourceId);
|
|
42133
|
+
pushUniqueEdge(edges, edgeIds, {
|
|
42134
|
+
id: edgeId("maps_to", id, resourceNode.id),
|
|
42135
|
+
kind: "maps_to",
|
|
42136
|
+
sourceId: id,
|
|
42137
|
+
targetId: resourceNode.id
|
|
42138
|
+
});
|
|
42139
|
+
}
|
|
42140
|
+
for (const template of [...organizationModel.prospecting.buildTemplates].sort((a, b) => a.id.localeCompare(b.id))) {
|
|
42141
|
+
const stepById = new Map(template.steps.map((s) => [s.id, s]));
|
|
42142
|
+
for (const step of [...template.steps].sort((a, b) => a.id.localeCompare(b.id))) {
|
|
42143
|
+
const stageNodeId = nodeId("stage", step.stageKey);
|
|
42144
|
+
const capNodeId = nodeId("capability", step.capabilityKey);
|
|
42145
|
+
pushUniqueEdge(edges, edgeIds, {
|
|
42146
|
+
id: edgeId("uses", stageNodeId, capNodeId, step.id),
|
|
42147
|
+
kind: "uses",
|
|
42148
|
+
sourceId: stageNodeId,
|
|
42149
|
+
targetId: capNodeId
|
|
42150
|
+
});
|
|
42151
|
+
for (const depId of step.dependsOn ?? []) {
|
|
42152
|
+
const depStep = stepById.get(depId);
|
|
42153
|
+
if (depStep) {
|
|
42154
|
+
const depStageNodeId = nodeId("stage", depStep.stageKey);
|
|
42155
|
+
pushUniqueEdge(edges, edgeIds, {
|
|
42156
|
+
id: edgeId("references", stageNodeId, depStageNodeId, step.id),
|
|
42157
|
+
kind: "references",
|
|
42158
|
+
sourceId: stageNodeId,
|
|
42159
|
+
targetId: depStageNodeId
|
|
42160
|
+
});
|
|
42161
|
+
}
|
|
42162
|
+
}
|
|
42163
|
+
}
|
|
42164
|
+
}
|
|
41960
42165
|
if (commandViewData) {
|
|
41961
42166
|
const commandViewResources = collectCommandViewResources(commandViewData).sort(
|
|
41962
42167
|
(a, b) => a.resourceId.localeCompare(b.resourceId)
|
|
@@ -42213,7 +42418,7 @@ function wrapAction(commandName, fn) {
|
|
|
42213
42418
|
// package.json
|
|
42214
42419
|
var package_default = {
|
|
42215
42420
|
name: "@elevasis/sdk",
|
|
42216
|
-
version: "1.
|
|
42421
|
+
version: "1.19.0",
|
|
42217
42422
|
description: "SDK for building Elevasis organization resources",
|
|
42218
42423
|
type: "module",
|
|
42219
42424
|
bin: {
|
package/dist/index.d.ts
CHANGED
|
@@ -4235,6 +4235,15 @@ declare const ProcessingStageStatusSchema: z.ZodEnum<{
|
|
|
4235
4235
|
skipped: "skipped";
|
|
4236
4236
|
}>;
|
|
4237
4237
|
declare const DealSchemas: {
|
|
4238
|
+
CrmStageKey: z.ZodEnum<{
|
|
4239
|
+
[x: string]: string;
|
|
4240
|
+
}>;
|
|
4241
|
+
CrmStateKey: z.ZodEnum<{
|
|
4242
|
+
[x: string]: string;
|
|
4243
|
+
}>;
|
|
4244
|
+
DealStage: z.ZodEnum<{
|
|
4245
|
+
[x: string]: string;
|
|
4246
|
+
}>;
|
|
4238
4247
|
DealIdParams: z.ZodObject<{
|
|
4239
4248
|
dealId: z.ZodString;
|
|
4240
4249
|
}, z.core.$strip>;
|
|
@@ -4244,12 +4253,7 @@ declare const DealSchemas: {
|
|
|
4244
4253
|
}, z.core.$strip>;
|
|
4245
4254
|
ListDealsQuery: z.ZodObject<{
|
|
4246
4255
|
stage: z.ZodOptional<z.ZodEnum<{
|
|
4247
|
-
|
|
4248
|
-
closed_won: "closed_won";
|
|
4249
|
-
closed_lost: "closed_lost";
|
|
4250
|
-
interested: "interested";
|
|
4251
|
-
proposal: "proposal";
|
|
4252
|
-
closing: "closing";
|
|
4256
|
+
[x: string]: string;
|
|
4253
4257
|
}>>;
|
|
4254
4258
|
search: z.ZodOptional<z.ZodString>;
|
|
4255
4259
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -4284,14 +4288,20 @@ declare const DealSchemas: {
|
|
|
4284
4288
|
assigneeUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4285
4289
|
}, z.core.$strict>;
|
|
4286
4290
|
TransitionItemRequest: z.ZodObject<{
|
|
4287
|
-
pipelineKey: z.
|
|
4288
|
-
stageKey: z.
|
|
4289
|
-
|
|
4291
|
+
pipelineKey: z.ZodLiteral<string>;
|
|
4292
|
+
stageKey: z.ZodEnum<{
|
|
4293
|
+
[x: string]: string;
|
|
4294
|
+
}>;
|
|
4295
|
+
stateKey: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
4296
|
+
[x: string]: string;
|
|
4297
|
+
}>>>;
|
|
4290
4298
|
reason: z.ZodOptional<z.ZodString>;
|
|
4291
4299
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
4292
4300
|
}, z.core.$strict>;
|
|
4293
4301
|
TransitionDealStateRequest: z.ZodObject<{
|
|
4294
|
-
stateKey: z.
|
|
4302
|
+
stateKey: z.ZodEnum<{
|
|
4303
|
+
[x: string]: string;
|
|
4304
|
+
}>;
|
|
4295
4305
|
reason: z.ZodOptional<z.ZodString>;
|
|
4296
4306
|
expectedUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
4297
4307
|
}, z.core.$strict>;
|
|
@@ -9594,6 +9604,151 @@ declare class ToolingError extends ExecutionError {
|
|
|
9594
9604
|
constructor(errorType: string, message: string, details?: unknown);
|
|
9595
9605
|
}
|
|
9596
9606
|
|
|
9607
|
+
// ============================================================================
|
|
9608
|
+
// Lead-Gen Stateful Pipeline Definitions (Decision N8, Wave 4)
|
|
9609
|
+
//
|
|
9610
|
+
// Defines the (pipeline_key, stage_key, state_key) vocabulary for the three
|
|
9611
|
+
// entities that carry the Stateful trait via Track B:
|
|
9612
|
+
// - acq_lists (pipeline_key='lead-gen', stage_key='lifecycle')
|
|
9613
|
+
// - acq_list_members (pipeline_key='lead-gen', stages: outreach / prospecting / qualification)
|
|
9614
|
+
// - acq_list_companies (pipeline_key='lead-gen', stages: outreach / prospecting / qualification)
|
|
9615
|
+
//
|
|
9616
|
+
// DB columns (pipeline_key, stage_key, state_key) remain free-form text with no
|
|
9617
|
+
// CHECK constraint — new states can be introduced without a migration (Decision N8).
|
|
9618
|
+
// These definitions are the org-specific source of truth consumed by UI and tooling.
|
|
9619
|
+
//
|
|
9620
|
+
// State vocabularies sourced from the post-restructure sales tree (W3 canonical):
|
|
9621
|
+
// outreach/:
|
|
9622
|
+
// - personalized (instantly-personalization.ts → contacts)
|
|
9623
|
+
// - uploaded (instantly-upload.ts → contacts)
|
|
9624
|
+
// - interested (instantly-reply-handler.ts → contacts, initial reply transition)
|
|
9625
|
+
// prospecting/:
|
|
9626
|
+
// - populated (apify-acquire.ts, apify-scrape.ts → companies)
|
|
9627
|
+
// - extracted (website-extract.ts → companies)
|
|
9628
|
+
// - discovered (email-discovery.ts, anymailfinder-enrich.ts → contacts)
|
|
9629
|
+
// - verified (email-verification.ts → contacts)
|
|
9630
|
+
// qualification/:
|
|
9631
|
+
// - qualified (company-qualification.ts → companies)
|
|
9632
|
+
//
|
|
9633
|
+
// The 'pending' state is the W2 backfill default (coalesce(stage, 'pending')).
|
|
9634
|
+
// It is valid in any stage and represents "not yet processed by a workflow step".
|
|
9635
|
+
// ============================================================================
|
|
9636
|
+
|
|
9637
|
+
/** One state within a stage — minimal shape: key + display label. */
|
|
9638
|
+
interface StatefulStateDefinition {
|
|
9639
|
+
/** Matches state_key values written by workflow steps. */
|
|
9640
|
+
stateKey: string
|
|
9641
|
+
label: string
|
|
9642
|
+
}
|
|
9643
|
+
|
|
9644
|
+
/** One stage within a pipeline — has a stage_key and an ordered list of valid states. */
|
|
9645
|
+
interface StatefulStageDefinition {
|
|
9646
|
+
/** Matches stage_key values written by workflow steps. */
|
|
9647
|
+
stageKey: string
|
|
9648
|
+
label: string
|
|
9649
|
+
/** UI color token. Consumers may map this to their design system. */
|
|
9650
|
+
color?: string
|
|
9651
|
+
states: StatefulStateDefinition[]
|
|
9652
|
+
}
|
|
9653
|
+
|
|
9654
|
+
/**
|
|
9655
|
+
* Pipeline definition for a single entity participating in the Stateful trait.
|
|
9656
|
+
* Parallel to acq_deals' pipeline_key concept but structured for lead-gen entities.
|
|
9657
|
+
*/
|
|
9658
|
+
interface StatefulPipelineDefinition {
|
|
9659
|
+
/** Matches pipeline_key values in the database (e.g. 'lead-gen'). */
|
|
9660
|
+
pipelineKey: string
|
|
9661
|
+
label: string
|
|
9662
|
+
/** Entity this pipeline applies to (e.g. 'acq.list', 'acq.list-member', 'acq.list-company'). */
|
|
9663
|
+
entityKey: string
|
|
9664
|
+
stages: StatefulStageDefinition[]
|
|
9665
|
+
}
|
|
9666
|
+
|
|
9667
|
+
// ============================================================================
|
|
9668
|
+
// CRM Stateful Pipeline Definition
|
|
9669
|
+
//
|
|
9670
|
+
// Defines the (pipeline_key, stage_key, state_key) vocabulary for crm.deal
|
|
9671
|
+
// entities. Stage keys match DEFAULT_ORGANIZATION_MODEL_SALES.pipelines[0].stages.
|
|
9672
|
+
//
|
|
9673
|
+
// State vocabularies sourced from the CRM action/handler tree:
|
|
9674
|
+
// interested/:
|
|
9675
|
+
// - discovery_replied (instantly-reply-handler.ts → first/subsequent reply)
|
|
9676
|
+
// - discovery_link_sent (crm-send-booking-link.ts, crm-rebook.ts → booking link sent)
|
|
9677
|
+
// - discovery_nudging (crm-send-nudge.ts → nudge sent after link)
|
|
9678
|
+
// - discovery_booking_cancelled (booking-revert.ts → Cal cancellation webhook)
|
|
9679
|
+
// - reply_sent (crm-send-reply.ts → operator reply sent)
|
|
9680
|
+
// - followup_1_sent (crm-reply-followup.ts day=3)
|
|
9681
|
+
// - followup_2_sent (crm-reply-followup.ts day=5)
|
|
9682
|
+
// - followup_3_sent (crm-reply-followup.ts day=7)
|
|
9683
|
+
// proposal, closing, closed_won, closed_lost, nurturing: no observed sub-states
|
|
9684
|
+
// ============================================================================
|
|
9685
|
+
|
|
9686
|
+
declare const CRM_DISCOVERY_REPLIED_STATE: StatefulStateDefinition = {
|
|
9687
|
+
stateKey: 'discovery_replied',
|
|
9688
|
+
label: 'Discovery Replied'
|
|
9689
|
+
}
|
|
9690
|
+
declare const CRM_DISCOVERY_LINK_SENT_STATE: StatefulStateDefinition = {
|
|
9691
|
+
stateKey: 'discovery_link_sent',
|
|
9692
|
+
label: 'Discovery Link Sent'
|
|
9693
|
+
}
|
|
9694
|
+
declare const CRM_DISCOVERY_NUDGING_STATE: StatefulStateDefinition = {
|
|
9695
|
+
stateKey: 'discovery_nudging',
|
|
9696
|
+
label: 'Discovery Nudging'
|
|
9697
|
+
}
|
|
9698
|
+
declare const CRM_DISCOVERY_BOOKING_CANCELLED_STATE: StatefulStateDefinition = {
|
|
9699
|
+
stateKey: 'discovery_booking_cancelled',
|
|
9700
|
+
label: 'Discovery Booking Cancelled'
|
|
9701
|
+
}
|
|
9702
|
+
declare const CRM_REPLY_SENT_STATE: StatefulStateDefinition = {
|
|
9703
|
+
stateKey: 'reply_sent',
|
|
9704
|
+
label: 'Reply Sent'
|
|
9705
|
+
}
|
|
9706
|
+
declare const CRM_FOLLOWUP_1_SENT_STATE: StatefulStateDefinition = {
|
|
9707
|
+
stateKey: 'followup_1_sent',
|
|
9708
|
+
label: 'Follow-up 1 Sent'
|
|
9709
|
+
}
|
|
9710
|
+
declare const CRM_FOLLOWUP_2_SENT_STATE: StatefulStateDefinition = {
|
|
9711
|
+
stateKey: 'followup_2_sent',
|
|
9712
|
+
label: 'Follow-up 2 Sent'
|
|
9713
|
+
}
|
|
9714
|
+
declare const CRM_FOLLOWUP_3_SENT_STATE: StatefulStateDefinition = {
|
|
9715
|
+
stateKey: 'followup_3_sent',
|
|
9716
|
+
label: 'Follow-up 3 Sent'
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9719
|
+
declare const CRM_PIPELINE_DEFINITION: StatefulPipelineDefinition = {
|
|
9720
|
+
pipelineKey: 'crm',
|
|
9721
|
+
label: 'CRM',
|
|
9722
|
+
entityKey: 'crm.deal',
|
|
9723
|
+
stages: [
|
|
9724
|
+
{
|
|
9725
|
+
stageKey: 'interested',
|
|
9726
|
+
label: 'Interested',
|
|
9727
|
+
color: 'blue',
|
|
9728
|
+
states: [
|
|
9729
|
+
CRM_DISCOVERY_REPLIED_STATE,
|
|
9730
|
+
CRM_DISCOVERY_LINK_SENT_STATE,
|
|
9731
|
+
CRM_DISCOVERY_NUDGING_STATE,
|
|
9732
|
+
CRM_DISCOVERY_BOOKING_CANCELLED_STATE,
|
|
9733
|
+
CRM_REPLY_SENT_STATE,
|
|
9734
|
+
CRM_FOLLOWUP_1_SENT_STATE,
|
|
9735
|
+
CRM_FOLLOWUP_2_SENT_STATE,
|
|
9736
|
+
CRM_FOLLOWUP_3_SENT_STATE
|
|
9737
|
+
]
|
|
9738
|
+
},
|
|
9739
|
+
{ stageKey: 'proposal', label: 'Proposal', color: 'yellow', states: [] },
|
|
9740
|
+
{ stageKey: 'closing', label: 'Closing', color: 'orange', states: [] },
|
|
9741
|
+
{ stageKey: 'closed_won', label: 'Closed Won', color: 'green', states: [] },
|
|
9742
|
+
{ stageKey: 'closed_lost', label: 'Closed Lost', color: 'red', states: [] },
|
|
9743
|
+
{ stageKey: 'nurturing', label: 'Nurturing', color: 'grape', states: [] }
|
|
9744
|
+
]
|
|
9745
|
+
}
|
|
9746
|
+
|
|
9747
|
+
declare const CrmStageKeySchema = z.enum(crmStageKeys)
|
|
9748
|
+
declare const CrmStateKeySchema = z.enum(crmStateKeys)
|
|
9749
|
+
type CrmStageKey = z.infer<typeof CrmStageKeySchema>
|
|
9750
|
+
type CrmStateKey = z.infer<typeof CrmStateKeySchema>
|
|
9751
|
+
|
|
9597
9752
|
/**
|
|
9598
9753
|
* @elevasis/sdk - Types and utilities for building Elevasis organization resources
|
|
9599
9754
|
*
|
|
@@ -9606,5 +9761,5 @@ declare const ListBuilderStageKeySchema: z.ZodEnum<{
|
|
|
9606
9761
|
}>;
|
|
9607
9762
|
type ListBuilderStageKey = z.infer<typeof ListBuilderStageKeySchema>;
|
|
9608
9763
|
|
|
9609
|
-
export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, DEFAULT_CRM_ACTIONS, EmailSchema, ExecutionError, LEAD_GEN_STAGE_CATALOG, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, deriveActions };
|
|
9610
|
-
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action, ActionDef, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BuildPlanSnapshotStep, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListBuilderStageKey, ListBuilderStep, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, ProcessingStageStatus, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
|
|
9764
|
+
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 };
|
|
9765
|
+
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqDealRow, AcqList, Action, ActionDef, ActivityEvent, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, FindCompanyEmailParams as AnymailfinderFindCompanyEmailParams, FindCompanyEmailResult as AnymailfinderFindCompanyEmailResult, FindDecisionMakerEmailParams as AnymailfinderFindDecisionMakerEmailParams, FindDecisionMakerEmailResult as AnymailfinderFindDecisionMakerEmailResult, FindPersonEmailParams as AnymailfinderFindPersonEmailParams, FindPersonEmailResult as AnymailfinderFindPersonEmailResult, AnymailfinderToolMap, VerifyEmailParams as AnymailfinderVerifyEmailParams, VerifyEmailResult as AnymailfinderVerifyEmailResult, ApifyToolMap, ApifyWebhookConfig, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BuildPlanSnapshotStep, BulkDeleteLeadsParams, BulkDeleteLeadsResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, CrmStageKey, CrmStateKey, CrmToolMap, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DeploymentSpec, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetDailyCampaignAnalyticsParams, GetDailyCampaignAnalyticsResult, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAttributesParams, ListAttributesResult, ListBuilderStageKey, ListBuilderStep, ListLeadsParams, ListLeadsResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, ListToolMap, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, MillionVerifierToolMap, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, PaginatedResult, PaginationParams, PdfToolMap, ProcessingStageStatus, ProjectsToolMap, QueryRecordsParams, QueryRecordsResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceCategory, ResourceDefinition, ResourceLink, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, SDKLLMGenerateParams, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StartActorParams, StartActorResult, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, TaskSchedule, TaskScheduleConfig, TombaToolMap, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TransitionItemParams, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
|