@elevasis/ui 2.28.1 → 2.30.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/api/index.js +2 -2
- package/dist/app/index.d.ts +54 -0
- package/dist/app/index.js +10 -10
- package/dist/auth/index.js +4 -4
- package/dist/charts/index.d.ts +2 -1
- package/dist/charts/index.js +8 -8
- package/dist/{chunk-HNN3QALL.js → chunk-2DIYILF7.js} +9 -8
- package/dist/{chunk-XTVZFT7U.js → chunk-2Q2JQSQO.js} +1 -1
- package/dist/{chunk-UOHOKDKL.js → chunk-3GV5NHSS.js} +1052 -209
- package/dist/{chunk-PBNIW7KV.js → chunk-3MDNBHVB.js} +140 -9
- package/dist/{chunk-K4Q5QUHZ.js → chunk-4FZYEEPK.js} +6 -6
- package/dist/{chunk-MJMFIWEB.js → chunk-4SY6BTVZ.js} +2 -2
- package/dist/{chunk-HLFFKKT3.js → chunk-4VQ2PXMI.js} +14 -14
- package/dist/{chunk-WKJ47GIW.js → chunk-533DUEQY.js} +1 -1
- package/dist/{chunk-N63RKL3L.js → chunk-6EFVZV6X.js} +394 -311
- package/dist/{chunk-V3HUIZJX.js → chunk-6IXOKUBC.js} +1 -1
- package/dist/{chunk-GJXAAYZ3.js → chunk-6WXDE5LZ.js} +1 -1
- package/dist/{chunk-VKMNWHTL.js → chunk-6YT4IKJ7.js} +3 -3
- package/dist/{chunk-ZPXV5KI3.js → chunk-7E3FUTND.js} +1 -1
- package/dist/{chunk-YNYGUVGW.js → chunk-A7B7HLDF.js} +11 -10
- package/dist/{chunk-NU5FNTOB.js → chunk-AKOD52HS.js} +84 -15
- package/dist/{chunk-CT5IR4ZA.js → chunk-CLUP5H3C.js} +6 -9
- package/dist/{chunk-MYEOTM7D.js → chunk-CN2HC4D4.js} +5 -1
- package/dist/{chunk-ROSMICXG.js → chunk-CXY7FMUM.js} +35 -20
- package/dist/{chunk-HOIT677G.js → chunk-HUJCU55S.js} +1 -1
- package/dist/{chunk-SRNIHB7Y.js → chunk-HXZQWMKE.js} +1 -2
- package/dist/{chunk-M6OJ43NL.js → chunk-HYLERWRO.js} +99 -30
- package/dist/{chunk-XBMCDGHA.js → chunk-IKQ42WHU.js} +1 -1
- package/dist/{chunk-GESXCQWY.js → chunk-JA5ECJJB.js} +1 -1
- package/dist/{chunk-KU7ZDWQ7.js → chunk-JBWJ6WHZ.js} +1 -1
- package/dist/{chunk-MCRKFDKB.js → chunk-JKTPRYGV.js} +5 -5
- package/dist/{chunk-5WWZXCS5.js → chunk-KJ3QUBNU.js} +9 -2
- package/dist/{chunk-3HCTCMAS.js → chunk-LRZFLK2F.js} +3 -3
- package/dist/chunk-NITGGYH2.js +476 -0
- package/dist/{chunk-VMJVQAFZ.js → chunk-OAVTMITG.js} +1 -1
- package/dist/{chunk-TVJROM2V.js → chunk-P5WYW2GI.js} +58 -37
- package/dist/{chunk-5R27NFOI.js → chunk-SBCIB5TZ.js} +6 -27
- package/dist/{chunk-AYSO5A3R.js → chunk-SKXXT3E2.js} +4 -4
- package/dist/{chunk-MZCDRBSI.js → chunk-T2PAD63Y.js} +12 -12
- package/dist/{chunk-LH4GPYDX.js → chunk-T5Z7G2J2.js} +19 -3
- package/dist/{chunk-WFTNY755.js → chunk-VKIZUUPM.js} +1 -1
- package/dist/{chunk-S66IQSSR.js → chunk-WF227UBV.js} +1 -1
- package/dist/components/chat/index.d.ts +2 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/index.js +42 -42
- package/dist/components/navigation/index.js +8 -8
- package/dist/features/auth/index.js +5 -5
- package/dist/features/crm/index.js +21 -21
- package/dist/features/dashboard/index.js +22 -22
- package/dist/features/delivery/index.js +21 -21
- package/dist/features/knowledge/index.js +45 -31
- package/dist/features/lead-gen/index.d.ts +116 -2
- package/dist/features/lead-gen/index.js +22 -22
- package/dist/features/monitoring/index.js +23 -23
- package/dist/features/monitoring/requests/index.js +20 -20
- package/dist/features/operations/index.js +27 -27
- package/dist/features/settings/index.js +22 -22
- package/dist/hooks/delivery/index.js +3 -3
- package/dist/hooks/index.d.ts +263 -4
- package/dist/hooks/index.js +20 -20
- package/dist/hooks/published.d.ts +263 -4
- package/dist/hooks/published.js +20 -20
- package/dist/index.d.ts +378 -10
- package/dist/index.js +21 -21
- package/dist/initialization/index.js +4 -4
- package/dist/knowledge/index.d.ts +55 -1
- package/dist/knowledge/index.js +102 -2
- package/dist/organization/index.js +4 -4
- package/dist/profile/index.js +2 -2
- package/dist/provider/ElevasisServiceContext.d.ts +11 -5
- package/dist/provider/ElevasisServiceContext.js +1 -1
- package/dist/provider/index.d.ts +119 -5
- package/dist/provider/index.js +17 -17
- package/dist/provider/published.d.ts +119 -5
- package/dist/provider/published.js +13 -13
- package/dist/test-utils/index.d.ts +3 -0
- package/dist/test-utils/index.js +30 -6
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/index.js +1 -1
- package/dist/utils/index.d.ts +1 -3
- package/dist/utils/index.js +1 -1
- package/dist/vite/index.js +2 -2
- package/dist/vite-plugin-knowledge/index.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-JS7VBTC4.js +0 -250
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { DisplayMetadataSchema, ModelIdSchema, DescriptionSchema, LEAD_GEN_STAGE_CATALOG } from './chunk-AKOD52HS.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
|
|
5
|
+
id: ModelIdSchema,
|
|
6
|
+
order: z.number().min(0)
|
|
7
|
+
});
|
|
8
|
+
var RecordColumnConfigSchema = z.object({
|
|
9
|
+
key: ModelIdSchema,
|
|
10
|
+
label: z.string().trim().min(1).max(120),
|
|
11
|
+
path: z.string().trim().min(1).max(500),
|
|
12
|
+
width: z.union([z.number().positive(), z.string().trim().min(1).max(100)]).optional(),
|
|
13
|
+
renderType: z.enum(["text", "badge", "datetime", "count", "json"]).optional(),
|
|
14
|
+
badgeColor: z.string().trim().min(1).max(40).optional()
|
|
15
|
+
});
|
|
16
|
+
var RecordColumnsConfigSchema = z.object({
|
|
17
|
+
company: z.array(RecordColumnConfigSchema).optional(),
|
|
18
|
+
contact: z.array(RecordColumnConfigSchema).optional()
|
|
19
|
+
}).refine((columns) => Boolean(columns.company?.length || columns.contact?.length), {
|
|
20
|
+
message: "recordColumns must include at least one entity column set"
|
|
21
|
+
});
|
|
22
|
+
var CredentialRequirementSchema = z.object({
|
|
23
|
+
key: ModelIdSchema,
|
|
24
|
+
provider: ModelIdSchema,
|
|
25
|
+
credentialType: z.enum(["api-key", "api-key-secret", "oauth", "webhook-secret"]),
|
|
26
|
+
label: z.string().trim().min(1).max(120),
|
|
27
|
+
required: z.boolean(),
|
|
28
|
+
selectionMode: z.enum(["single", "multiple"]).optional(),
|
|
29
|
+
inputPath: z.string().trim().min(1).max(500),
|
|
30
|
+
verifyOnRun: z.boolean().optional()
|
|
31
|
+
});
|
|
32
|
+
var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
|
|
33
|
+
id: ModelIdSchema,
|
|
34
|
+
primaryEntity: z.enum(["company", "contact"]),
|
|
35
|
+
outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
|
|
36
|
+
stageKey: ModelIdSchema,
|
|
37
|
+
recordEntity: z.enum(["company", "contact"]).optional(),
|
|
38
|
+
recordsStageKey: ModelIdSchema.optional(),
|
|
39
|
+
recordSourceStageKey: ModelIdSchema.optional(),
|
|
40
|
+
dependsOn: z.array(ModelIdSchema).optional(),
|
|
41
|
+
dependencyMode: z.literal("per-record-eligibility"),
|
|
42
|
+
capabilityKey: ModelIdSchema,
|
|
43
|
+
defaultBatchSize: z.number().int().positive(),
|
|
44
|
+
maxBatchSize: z.number().int().positive(),
|
|
45
|
+
recordColumns: RecordColumnsConfigSchema.optional(),
|
|
46
|
+
credentialRequirements: z.array(CredentialRequirementSchema).optional()
|
|
47
|
+
}).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
|
|
48
|
+
message: "defaultBatchSize must be less than or equal to maxBatchSize",
|
|
49
|
+
path: ["defaultBatchSize"]
|
|
50
|
+
});
|
|
51
|
+
var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
|
|
52
|
+
id: ModelIdSchema,
|
|
53
|
+
steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
54
|
+
});
|
|
55
|
+
var DTC_RECORD_COLUMNS = {
|
|
56
|
+
populated: {
|
|
57
|
+
company: [
|
|
58
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
59
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
60
|
+
{ key: "employee-count", label: "Employees", path: "company.numEmployees", renderType: "count" },
|
|
61
|
+
{ key: "apollo-industry", label: "Apollo industry", path: "company.category" },
|
|
62
|
+
{ key: "location", label: "Location", path: "company.locationState" }
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
crawled: {
|
|
66
|
+
company: [
|
|
67
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
68
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
69
|
+
{ key: "page-count", label: "Pages", path: "company.enrichmentData.websiteCrawl.pageCount", renderType: "count" },
|
|
70
|
+
{ key: "crawl-status", label: "Crawl status", path: "processingState.crawled.status", renderType: "badge" }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
extracted: {
|
|
74
|
+
company: [
|
|
75
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
76
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
77
|
+
{ key: "description", label: "Description", path: "company.enrichmentData.websiteCrawl.companyDescription" },
|
|
78
|
+
{ key: "services", label: "Services", path: "company.enrichmentData.websiteCrawl.services", renderType: "json" },
|
|
79
|
+
{ key: "automation-gaps", label: "Automation gaps", path: "company.enrichmentData.websiteCrawl.automationGaps", renderType: "json" },
|
|
80
|
+
{ key: "contact-count", label: "Contacts", path: "company.enrichmentData.websiteCrawl.emailCount", renderType: "count" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
qualified: {
|
|
84
|
+
company: [
|
|
85
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
86
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
87
|
+
{ key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
|
|
88
|
+
{ key: "signals", label: "Signals", path: "company.qualificationSignals", renderType: "json" },
|
|
89
|
+
{ key: "disqualified-reason", label: "Disqualified reason", path: "processingState.qualified.data.disqualifiedReason" }
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
decisionMakers: {
|
|
93
|
+
contact: [
|
|
94
|
+
{ key: "name", label: "Name", path: "contact.name" },
|
|
95
|
+
{ key: "title", label: "Title", path: "contact.title" },
|
|
96
|
+
{ key: "email", label: "Email", path: "contact.email" },
|
|
97
|
+
{ key: "linkedin", label: "LinkedIn", path: "contact.linkedinUrl" },
|
|
98
|
+
{ key: "priority-score", label: "Priority", path: "contact.enrichmentData.apollo.priorityScore", renderType: "badge" }
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
uploaded: {
|
|
102
|
+
company: [
|
|
103
|
+
{ key: "name", label: "Company", path: "company.name" },
|
|
104
|
+
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
105
|
+
{ key: "contacts", label: "Contacts", path: "company.enrichmentData.approvedLeadListExport.contacts", renderType: "json" },
|
|
106
|
+
{ key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
|
|
107
|
+
{ key: "approval", label: "Approval", path: "company.enrichmentData.approvedLeadListExport.approvalStatus", renderType: "badge" }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
z.object({
|
|
112
|
+
id: ModelIdSchema,
|
|
113
|
+
label: z.string(),
|
|
114
|
+
description: z.string(),
|
|
115
|
+
resourceId: ModelIdSchema
|
|
116
|
+
});
|
|
117
|
+
var CAPABILITY_REGISTRY = [
|
|
118
|
+
{
|
|
119
|
+
id: "lead-gen.company.source",
|
|
120
|
+
label: "Source companies",
|
|
121
|
+
description: "Import source companies from a list provider.",
|
|
122
|
+
resourceId: "lgn-import-workflow"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "lead-gen.company.apollo-import",
|
|
126
|
+
label: "Import from Apollo",
|
|
127
|
+
description: "Pull companies and seed contact data from an Apollo search or list.",
|
|
128
|
+
resourceId: "lgn-01c-apollo-import-workflow"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "lead-gen.contact.discover",
|
|
132
|
+
label: "Discover contact emails",
|
|
133
|
+
description: "Find email addresses for contacts at qualified companies.",
|
|
134
|
+
resourceId: "lgn-04-email-discovery-workflow"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "lead-gen.contact.verify-email",
|
|
138
|
+
label: "Verify emails",
|
|
139
|
+
description: "Check email deliverability before outreach.",
|
|
140
|
+
resourceId: "lgn-05-email-verification-workflow"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "lead-gen.company.apify-crawl",
|
|
144
|
+
label: "Crawl websites",
|
|
145
|
+
description: "Crawl company websites via Apify and store raw page markdown in enrichmentData.websiteCrawl.pages for downstream LLM analysis.",
|
|
146
|
+
resourceId: "lgn-02a-apify-website-crawl-workflow"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "lead-gen.company.website-extract",
|
|
150
|
+
label: "Extract website signals",
|
|
151
|
+
description: "Scrape and analyze company websites for qualification signals.",
|
|
152
|
+
resourceId: "lgn-02-website-extract-workflow"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: "lead-gen.company.qualify",
|
|
156
|
+
label: "Qualify companies",
|
|
157
|
+
description: "Score and filter companies against the ICP rubric.",
|
|
158
|
+
resourceId: "lgn-03-company-qualification-workflow"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "lead-gen.company.dtc-subscription-qualify",
|
|
162
|
+
label: "Qualify DTC subscription fit",
|
|
163
|
+
description: "Classify subscription potential and consumable-product fit for DTC brands.",
|
|
164
|
+
resourceId: "lgn-03b-dtc-subscription-score-workflow"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
168
|
+
label: "Enrich decision-makers",
|
|
169
|
+
description: "Find and enrich qualified contacts at qualified companies via Apollo.",
|
|
170
|
+
resourceId: "lgn-04b-apollo-decision-maker-enrich-workflow"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "lead-gen.contact.personalize",
|
|
174
|
+
label: "Personalize outreach",
|
|
175
|
+
description: "Generate personalized opening lines for each contact.",
|
|
176
|
+
resourceId: "ist-personalization-workflow"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "lead-gen.review.outreach-ready",
|
|
180
|
+
label: "Upload to outreach",
|
|
181
|
+
description: "Upload approved contacts to the outreach sequence after QC review.",
|
|
182
|
+
resourceId: "ist-upload-contacts-workflow"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: "lead-gen.export.list",
|
|
186
|
+
label: "Export lead list",
|
|
187
|
+
description: "Export approved leads as a downloadable lead list.",
|
|
188
|
+
resourceId: "lgn-06-export-list-workflow"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: "lead-gen.company.cleanup",
|
|
192
|
+
label: "Clean up companies",
|
|
193
|
+
description: "Remove disqualified or duplicate companies from the list.",
|
|
194
|
+
resourceId: "lgn-company-cleanup-workflow"
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
var PROSPECTING_STEPS = {
|
|
198
|
+
localServices: {
|
|
199
|
+
sourceCompanies: {
|
|
200
|
+
id: "source-companies",
|
|
201
|
+
label: "Companies found",
|
|
202
|
+
primaryEntity: "company",
|
|
203
|
+
outputs: ["company"],
|
|
204
|
+
stageKey: "populated",
|
|
205
|
+
dependencyMode: "per-record-eligibility",
|
|
206
|
+
capabilityKey: "lead-gen.company.source",
|
|
207
|
+
defaultBatchSize: 100,
|
|
208
|
+
maxBatchSize: 250
|
|
209
|
+
},
|
|
210
|
+
analyzeWebsites: {
|
|
211
|
+
id: "analyze-websites",
|
|
212
|
+
label: "Websites analyzed",
|
|
213
|
+
primaryEntity: "company",
|
|
214
|
+
outputs: ["company"],
|
|
215
|
+
stageKey: "extracted",
|
|
216
|
+
dependsOn: ["source-companies"],
|
|
217
|
+
dependencyMode: "per-record-eligibility",
|
|
218
|
+
capabilityKey: "lead-gen.company.website-extract",
|
|
219
|
+
defaultBatchSize: 50,
|
|
220
|
+
maxBatchSize: 100
|
|
221
|
+
},
|
|
222
|
+
qualifyCompanies: {
|
|
223
|
+
id: "qualify-companies",
|
|
224
|
+
label: "Companies qualified",
|
|
225
|
+
primaryEntity: "company",
|
|
226
|
+
outputs: ["company"],
|
|
227
|
+
stageKey: "qualified",
|
|
228
|
+
dependsOn: ["analyze-websites"],
|
|
229
|
+
dependencyMode: "per-record-eligibility",
|
|
230
|
+
capabilityKey: "lead-gen.company.qualify",
|
|
231
|
+
defaultBatchSize: 100,
|
|
232
|
+
maxBatchSize: 250
|
|
233
|
+
},
|
|
234
|
+
findContacts: {
|
|
235
|
+
id: "find-contacts",
|
|
236
|
+
label: "Decision-makers found",
|
|
237
|
+
primaryEntity: "contact",
|
|
238
|
+
outputs: ["contact"],
|
|
239
|
+
stageKey: "discovered",
|
|
240
|
+
dependsOn: ["qualify-companies"],
|
|
241
|
+
dependencyMode: "per-record-eligibility",
|
|
242
|
+
capabilityKey: "lead-gen.contact.discover",
|
|
243
|
+
defaultBatchSize: 50,
|
|
244
|
+
maxBatchSize: 100
|
|
245
|
+
},
|
|
246
|
+
verifyEmails: {
|
|
247
|
+
id: "verify-emails",
|
|
248
|
+
label: "Emails verified",
|
|
249
|
+
primaryEntity: "contact",
|
|
250
|
+
outputs: ["contact"],
|
|
251
|
+
stageKey: "verified",
|
|
252
|
+
dependsOn: ["find-contacts"],
|
|
253
|
+
dependencyMode: "per-record-eligibility",
|
|
254
|
+
capabilityKey: "lead-gen.contact.verify-email",
|
|
255
|
+
defaultBatchSize: 100,
|
|
256
|
+
maxBatchSize: 500
|
|
257
|
+
},
|
|
258
|
+
personalize: {
|
|
259
|
+
id: "personalize",
|
|
260
|
+
label: "Personalize",
|
|
261
|
+
primaryEntity: "contact",
|
|
262
|
+
outputs: ["contact"],
|
|
263
|
+
stageKey: "personalized",
|
|
264
|
+
dependsOn: ["verify-emails"],
|
|
265
|
+
dependencyMode: "per-record-eligibility",
|
|
266
|
+
capabilityKey: "lead-gen.contact.personalize",
|
|
267
|
+
defaultBatchSize: 25,
|
|
268
|
+
maxBatchSize: 100
|
|
269
|
+
},
|
|
270
|
+
review: {
|
|
271
|
+
id: "review",
|
|
272
|
+
label: "Reviewed and exported",
|
|
273
|
+
primaryEntity: "contact",
|
|
274
|
+
outputs: ["export"],
|
|
275
|
+
stageKey: "uploaded",
|
|
276
|
+
dependsOn: ["personalize"],
|
|
277
|
+
dependencyMode: "per-record-eligibility",
|
|
278
|
+
capabilityKey: "lead-gen.review.outreach-ready",
|
|
279
|
+
defaultBatchSize: 25,
|
|
280
|
+
maxBatchSize: 100
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
dtcApolloClickup: {
|
|
284
|
+
importApolloSearch: {
|
|
285
|
+
id: "import-apollo-search",
|
|
286
|
+
label: "Companies found",
|
|
287
|
+
description: "Pull companies and seed contact data from a predefined Apollo search or list.",
|
|
288
|
+
primaryEntity: "company",
|
|
289
|
+
outputs: ["company", "contact"],
|
|
290
|
+
stageKey: "populated",
|
|
291
|
+
dependencyMode: "per-record-eligibility",
|
|
292
|
+
capabilityKey: "lead-gen.company.apollo-import",
|
|
293
|
+
defaultBatchSize: 250,
|
|
294
|
+
maxBatchSize: 1e3,
|
|
295
|
+
recordColumns: DTC_RECORD_COLUMNS.populated,
|
|
296
|
+
credentialRequirements: [
|
|
297
|
+
{
|
|
298
|
+
key: "apollo",
|
|
299
|
+
provider: "apollo",
|
|
300
|
+
credentialType: "api-key-secret",
|
|
301
|
+
label: "Apollo API key",
|
|
302
|
+
required: true,
|
|
303
|
+
selectionMode: "single",
|
|
304
|
+
inputPath: "credential"
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
apifyCrawl: {
|
|
309
|
+
id: "apify-crawl",
|
|
310
|
+
label: "Websites crawled",
|
|
311
|
+
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.",
|
|
312
|
+
primaryEntity: "company",
|
|
313
|
+
outputs: ["company"],
|
|
314
|
+
stageKey: "crawled",
|
|
315
|
+
dependsOn: ["import-apollo-search"],
|
|
316
|
+
dependencyMode: "per-record-eligibility",
|
|
317
|
+
capabilityKey: "lead-gen.company.apify-crawl",
|
|
318
|
+
defaultBatchSize: 50,
|
|
319
|
+
maxBatchSize: 100,
|
|
320
|
+
recordColumns: DTC_RECORD_COLUMNS.crawled,
|
|
321
|
+
credentialRequirements: [
|
|
322
|
+
{
|
|
323
|
+
key: "apify",
|
|
324
|
+
provider: "apify",
|
|
325
|
+
credentialType: "api-key-secret",
|
|
326
|
+
label: "Apify API token",
|
|
327
|
+
required: true,
|
|
328
|
+
selectionMode: "single",
|
|
329
|
+
inputPath: "credential",
|
|
330
|
+
verifyOnRun: true
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
analyzeWebsites: {
|
|
335
|
+
id: "analyze-websites",
|
|
336
|
+
label: "Websites analyzed",
|
|
337
|
+
description: "Extract subscription, product, retention, and tech-stack signals from each brand website.",
|
|
338
|
+
primaryEntity: "company",
|
|
339
|
+
outputs: ["company"],
|
|
340
|
+
stageKey: "extracted",
|
|
341
|
+
dependsOn: ["apify-crawl"],
|
|
342
|
+
dependencyMode: "per-record-eligibility",
|
|
343
|
+
capabilityKey: "lead-gen.company.website-extract",
|
|
344
|
+
defaultBatchSize: 50,
|
|
345
|
+
maxBatchSize: 100,
|
|
346
|
+
recordColumns: DTC_RECORD_COLUMNS.extracted
|
|
347
|
+
},
|
|
348
|
+
scoreDtcFit: {
|
|
349
|
+
id: "score-dtc-fit",
|
|
350
|
+
label: "Companies qualified",
|
|
351
|
+
description: "Classify subscription potential, consumable-product fit, retention maturity, and disqualifiers.",
|
|
352
|
+
primaryEntity: "company",
|
|
353
|
+
outputs: ["company"],
|
|
354
|
+
stageKey: "qualified",
|
|
355
|
+
dependsOn: ["analyze-websites"],
|
|
356
|
+
dependencyMode: "per-record-eligibility",
|
|
357
|
+
capabilityKey: "lead-gen.company.dtc-subscription-qualify",
|
|
358
|
+
defaultBatchSize: 100,
|
|
359
|
+
maxBatchSize: 250,
|
|
360
|
+
recordColumns: DTC_RECORD_COLUMNS.qualified
|
|
361
|
+
},
|
|
362
|
+
enrichDecisionMakers: {
|
|
363
|
+
id: "enrich-decision-makers",
|
|
364
|
+
label: "Decision-makers found",
|
|
365
|
+
description: "Use Apollo to find qualified contacts at qualified companies - founders, retention leads, lifecycle leads, and marketing owners.",
|
|
366
|
+
primaryEntity: "company",
|
|
367
|
+
outputs: ["contact"],
|
|
368
|
+
stageKey: "decision-makers-enriched",
|
|
369
|
+
recordEntity: "contact",
|
|
370
|
+
dependsOn: ["score-dtc-fit"],
|
|
371
|
+
dependencyMode: "per-record-eligibility",
|
|
372
|
+
capabilityKey: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
373
|
+
defaultBatchSize: 100,
|
|
374
|
+
maxBatchSize: 250,
|
|
375
|
+
recordColumns: DTC_RECORD_COLUMNS.decisionMakers,
|
|
376
|
+
credentialRequirements: [
|
|
377
|
+
{
|
|
378
|
+
key: "apollo",
|
|
379
|
+
provider: "apollo",
|
|
380
|
+
credentialType: "api-key-secret",
|
|
381
|
+
label: "Apollo API key",
|
|
382
|
+
required: true,
|
|
383
|
+
selectionMode: "single",
|
|
384
|
+
inputPath: "credential"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
reviewAndExport: {
|
|
389
|
+
id: "review-and-export",
|
|
390
|
+
label: "Reviewed and exported",
|
|
391
|
+
description: "Operator QC approves or rejects qualified companies, then approved records are exported as a lead list with unverified emails.",
|
|
392
|
+
primaryEntity: "company",
|
|
393
|
+
outputs: ["export"],
|
|
394
|
+
stageKey: "uploaded",
|
|
395
|
+
recordsStageKey: "uploaded",
|
|
396
|
+
recordSourceStageKey: "qualified",
|
|
397
|
+
dependsOn: ["enrich-decision-makers"],
|
|
398
|
+
dependencyMode: "per-record-eligibility",
|
|
399
|
+
capabilityKey: "lead-gen.export.list",
|
|
400
|
+
defaultBatchSize: 100,
|
|
401
|
+
maxBatchSize: 250,
|
|
402
|
+
recordColumns: DTC_RECORD_COLUMNS.uploaded,
|
|
403
|
+
credentialRequirements: [
|
|
404
|
+
{
|
|
405
|
+
key: "clickup",
|
|
406
|
+
provider: "clickup",
|
|
407
|
+
credentialType: "api-key-secret",
|
|
408
|
+
label: "ClickUp API token",
|
|
409
|
+
required: true,
|
|
410
|
+
selectionMode: "single",
|
|
411
|
+
inputPath: "clickupCredential",
|
|
412
|
+
verifyOnRun: true
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
var OrganizationModelProspectingSchema = z.object({
|
|
419
|
+
listEntityId: ModelIdSchema,
|
|
420
|
+
companyEntityId: ModelIdSchema,
|
|
421
|
+
contactEntityId: ModelIdSchema,
|
|
422
|
+
description: DescriptionSchema.optional(),
|
|
423
|
+
companyStages: z.array(ProspectingLifecycleStageSchema).min(1),
|
|
424
|
+
contactStages: z.array(ProspectingLifecycleStageSchema).min(1),
|
|
425
|
+
defaultBuildTemplateId: ModelIdSchema,
|
|
426
|
+
buildTemplates: z.array(ProspectingBuildTemplateSchema).min(1)
|
|
427
|
+
});
|
|
428
|
+
function toProspectingLifecycleStage(stage) {
|
|
429
|
+
return {
|
|
430
|
+
id: stage.key,
|
|
431
|
+
label: stage.label,
|
|
432
|
+
order: stage.order
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
function leadGenStagesForEntity(entity) {
|
|
436
|
+
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);
|
|
437
|
+
}
|
|
438
|
+
var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
|
|
439
|
+
listEntityId: "leadgen.list",
|
|
440
|
+
companyEntityId: "leadgen.company",
|
|
441
|
+
contactEntityId: "leadgen.contact",
|
|
442
|
+
companyStages: leadGenStagesForEntity("company"),
|
|
443
|
+
contactStages: leadGenStagesForEntity("contact"),
|
|
444
|
+
defaultBuildTemplateId: "local-services",
|
|
445
|
+
buildTemplates: [
|
|
446
|
+
{
|
|
447
|
+
id: "local-services",
|
|
448
|
+
label: "Local Services Prospecting",
|
|
449
|
+
description: "Curated local-services list build using company sourcing, website analysis, qualification, contact discovery, verification, personalization, and review.",
|
|
450
|
+
steps: [
|
|
451
|
+
PROSPECTING_STEPS.localServices.sourceCompanies,
|
|
452
|
+
PROSPECTING_STEPS.localServices.analyzeWebsites,
|
|
453
|
+
PROSPECTING_STEPS.localServices.qualifyCompanies,
|
|
454
|
+
PROSPECTING_STEPS.localServices.findContacts,
|
|
455
|
+
PROSPECTING_STEPS.localServices.verifyEmails,
|
|
456
|
+
PROSPECTING_STEPS.localServices.personalize,
|
|
457
|
+
PROSPECTING_STEPS.localServices.review
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
id: "dtc-subscription-apollo-clickup",
|
|
462
|
+
label: "DTC Subscription Apollo Export",
|
|
463
|
+
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.",
|
|
464
|
+
steps: [
|
|
465
|
+
PROSPECTING_STEPS.dtcApolloClickup.importApolloSearch,
|
|
466
|
+
PROSPECTING_STEPS.dtcApolloClickup.apifyCrawl,
|
|
467
|
+
PROSPECTING_STEPS.dtcApolloClickup.analyzeWebsites,
|
|
468
|
+
PROSPECTING_STEPS.dtcApolloClickup.scoreDtcFit,
|
|
469
|
+
PROSPECTING_STEPS.dtcApolloClickup.enrichDecisionMakers,
|
|
470
|
+
PROSPECTING_STEPS.dtcApolloClickup.reviewAndExport
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
export { CAPABILITY_REGISTRY, DEFAULT_ORGANIZATION_MODEL_PROSPECTING, OrganizationModelProspectingSchema, PROSPECTING_STEPS };
|
|
@@ -4,14 +4,14 @@ import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
|
|
|
4
4
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
5
5
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
6
6
|
import { CustomModal } from './chunk-KVJ3LFH2.js';
|
|
7
|
-
import { useDealTasksDue, useDealsLookup, useCreateDealTask, useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany, dealKeys, useExecuteAction } from './chunk-
|
|
8
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
9
|
-
import { CenteredErrorState, CardHeader, StatCard, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-
|
|
10
|
-
import { useCrmActions, DEFAULT_CRM_PRIORITY_RULE_CONFIG, deriveActions, CRM_PRIORITY_BUCKETS } from './chunk-
|
|
7
|
+
import { useDealTasksDue, useDealsLookup, useCreateDealTask, useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany, dealKeys, useExecuteAction } from './chunk-6EFVZV6X.js';
|
|
8
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-T2PAD63Y.js';
|
|
9
|
+
import { CenteredErrorState, CardHeader, StatCard, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-6WXDE5LZ.js';
|
|
10
|
+
import { CRM_PIPELINE_DEFINITION, useCrmActions, DEFAULT_CRM_PRIORITY_RULE_CONFIG, deriveActions, CRM_PRIORITY_BUCKETS } from './chunk-AKOD52HS.js';
|
|
11
11
|
import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
|
|
12
12
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
13
|
-
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-
|
|
14
|
-
import { useElevasisServices } from './chunk-
|
|
13
|
+
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-HXZQWMKE.js';
|
|
14
|
+
import { useElevasisServices } from './chunk-KJ3QUBNU.js';
|
|
15
15
|
import { Box, Stack, Group, Text, Badge, Center, Loader, UnstyledButton, Button, Modal, Title, Select, TextInput, Textarea, Paper, Alert, Table, SimpleGrid, Tabs, Checkbox, Tooltip, Pagination, Code, Card, Switch, NumberInput, ColorSwatch, Popover, ActionIcon, CopyButton, Divider } from '@mantine/core';
|
|
16
16
|
import { IconLayoutGrid, IconColumns, IconFileInvoice, IconAddressBook, IconTrophy, IconClockExclamation, IconUser, IconPlus, IconChecklist, IconHistory, IconAlertCircle, IconCurrencyDollar, IconChartBar, IconBriefcase, IconSearch, IconTargetArrow, IconAlertTriangle, IconMessages, IconArrowLeft, IconFileText, IconInbox, IconBolt, IconBuilding, IconSettings, IconRestore, IconInfoCircle, IconMailForward, IconCheckbox, IconCalendar, IconMail, IconPhone, IconArrowRight, IconNote, IconCheck, IconCopy } from '@tabler/icons-react';
|
|
17
17
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -47,6 +47,43 @@ var SAVED_VIEW_PRESETS = [
|
|
|
47
47
|
}
|
|
48
48
|
];
|
|
49
49
|
|
|
50
|
+
// src/lib/crm/pipeline.ts
|
|
51
|
+
function getCrmStageOptions() {
|
|
52
|
+
return CRM_PIPELINE_DEFINITION.stages.map((stage) => ({
|
|
53
|
+
value: stage.stageKey,
|
|
54
|
+
label: stage.label
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
function getCrmStageColors() {
|
|
58
|
+
return CRM_PIPELINE_DEFINITION.stages.reduce((colors, stage) => {
|
|
59
|
+
if (stage.color) colors[stage.stageKey] = stage.color;
|
|
60
|
+
return colors;
|
|
61
|
+
}, {});
|
|
62
|
+
}
|
|
63
|
+
function getCrmStageLabel(stageKey) {
|
|
64
|
+
const normalized = normalizeCatalogKey(stageKey);
|
|
65
|
+
if (!normalized) return "Unknown";
|
|
66
|
+
return CRM_PIPELINE_DEFINITION.stages.find((stage) => stage.stageKey.toLowerCase() === normalized.toLowerCase())?.label ?? formatReadableKey(normalized);
|
|
67
|
+
}
|
|
68
|
+
function getCrmStateLabel(stateKey) {
|
|
69
|
+
const normalized = normalizeCatalogKey(stateKey);
|
|
70
|
+
if (!normalized) return "Unknown";
|
|
71
|
+
for (const stage of CRM_PIPELINE_DEFINITION.stages) {
|
|
72
|
+
const state = stage.states.find((candidate) => candidate.stateKey.toLowerCase() === normalized.toLowerCase());
|
|
73
|
+
if (state) return state.label;
|
|
74
|
+
}
|
|
75
|
+
return formatReadableKey(normalized);
|
|
76
|
+
}
|
|
77
|
+
function normalizeCatalogKey(value) {
|
|
78
|
+
const normalized = value?.trim();
|
|
79
|
+
return normalized ? normalized : null;
|
|
80
|
+
}
|
|
81
|
+
function formatReadableKey(value) {
|
|
82
|
+
const words = value.split("_").map((word) => word.trim().toLowerCase()).filter(Boolean);
|
|
83
|
+
if (!words.length) return "Unknown";
|
|
84
|
+
return words.map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
85
|
+
}
|
|
86
|
+
|
|
50
87
|
// src/features/crm/pages/shared.ts
|
|
51
88
|
var DEAL_REFERRER_STORAGE_KEY = "crm:dealReferrer";
|
|
52
89
|
function setDealReferrer(referrer) {
|
|
@@ -65,22 +102,11 @@ function getDealReferrer() {
|
|
|
65
102
|
return "deals";
|
|
66
103
|
}
|
|
67
104
|
}
|
|
68
|
-
var DEAL_STAGE_COLORS =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
closed_lost: "red",
|
|
74
|
-
nurturing: "grape"
|
|
75
|
-
};
|
|
76
|
-
var DEAL_STAGE_OPTIONS = [
|
|
77
|
-
{ value: "interested", label: "Interested" },
|
|
78
|
-
{ value: "proposal", label: "Proposal" },
|
|
79
|
-
{ value: "closing", label: "Closing" },
|
|
80
|
-
{ value: "closed_won", label: "Closed Won" },
|
|
81
|
-
{ value: "closed_lost", label: "Closed Lost" },
|
|
82
|
-
{ value: "nurturing", label: "Nurturing" }
|
|
83
|
-
];
|
|
105
|
+
var DEAL_STAGE_COLORS = getCrmStageColors();
|
|
106
|
+
var DEAL_STAGE_OPTIONS = getCrmStageOptions().map((option) => ({
|
|
107
|
+
value: option.value,
|
|
108
|
+
label: option.label
|
|
109
|
+
}));
|
|
84
110
|
var DEAL_PRIORITY_OPTIONS = [
|
|
85
111
|
{ value: "needs_response", label: "Needs response" },
|
|
86
112
|
{ value: "follow_up_due", label: "Follow-up due" },
|
|
@@ -101,15 +127,10 @@ function compareDealsByPriorityThenUpdated(a, b, direction = "asc") {
|
|
|
101
127
|
return getUpdatedTimestamp(b) - getUpdatedTimestamp(a);
|
|
102
128
|
}
|
|
103
129
|
function formatDealStageLabel(stage) {
|
|
104
|
-
return
|
|
130
|
+
return getCrmStageLabel(stage);
|
|
105
131
|
}
|
|
106
132
|
function formatDealStateLabel(state) {
|
|
107
|
-
return
|
|
108
|
-
}
|
|
109
|
-
function formatDealWorkflowLabel(value) {
|
|
110
|
-
const words = value?.trim().split("_").map((word) => word.trim().toLowerCase()).filter(Boolean);
|
|
111
|
-
if (!words?.length) return "Unknown";
|
|
112
|
-
return words.map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
133
|
+
return getCrmStateLabel(state);
|
|
113
134
|
}
|
|
114
135
|
function comparePriorityRank(a, b, direction) {
|
|
115
136
|
const comparison = a.rank - b.rank;
|
|
@@ -457,10 +478,10 @@ function useCrmQuickMetrics() {
|
|
|
457
478
|
return { data, isLoading, error };
|
|
458
479
|
}
|
|
459
480
|
function useRecentCrmActivity(opts) {
|
|
460
|
-
const { apiRequest, isReady,
|
|
481
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
461
482
|
const limit = opts?.limit ?? 20;
|
|
462
483
|
const query = useQuery({
|
|
463
|
-
queryKey: ["recent-crm-activity",
|
|
484
|
+
queryKey: ["recent-crm-activity", workOSOrganizationId, limit],
|
|
464
485
|
queryFn: () => apiRequest(`/crm/recent-activity?limit=${limit}`),
|
|
465
486
|
enabled: isReady
|
|
466
487
|
});
|
|
@@ -1690,15 +1711,15 @@ var crmPrioritySettingsKeys = {
|
|
|
1690
1711
|
detail: (organizationId) => [...crmPrioritySettingsKeys.all, organizationId]
|
|
1691
1712
|
};
|
|
1692
1713
|
function useCrmPrioritySettings() {
|
|
1693
|
-
const { apiRequest, isReady,
|
|
1714
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1694
1715
|
return useQuery({
|
|
1695
|
-
queryKey: crmPrioritySettingsKeys.detail(
|
|
1716
|
+
queryKey: crmPrioritySettingsKeys.detail(workOSOrganizationId),
|
|
1696
1717
|
queryFn: () => apiRequest("/crm/settings/priority"),
|
|
1697
1718
|
enabled: isReady
|
|
1698
1719
|
});
|
|
1699
1720
|
}
|
|
1700
1721
|
function useUpdateCrmPrioritySettings() {
|
|
1701
|
-
const { apiRequest,
|
|
1722
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1702
1723
|
const queryClient = useQueryClient();
|
|
1703
1724
|
return useMutation({
|
|
1704
1725
|
mutationFn: (override) => apiRequest("/crm/settings/priority", {
|
|
@@ -1706,7 +1727,7 @@ function useUpdateCrmPrioritySettings() {
|
|
|
1706
1727
|
body: JSON.stringify(override)
|
|
1707
1728
|
}),
|
|
1708
1729
|
onSuccess: () => {
|
|
1709
|
-
queryClient.invalidateQueries({ queryKey: crmPrioritySettingsKeys.detail(
|
|
1730
|
+
queryClient.invalidateQueries({ queryKey: crmPrioritySettingsKeys.detail(workOSOrganizationId) });
|
|
1710
1731
|
queryClient.invalidateQueries({ queryKey: dealKeys.lists() });
|
|
1711
1732
|
queryClient.invalidateQueries({ queryKey: dealKeys.details() });
|
|
1712
1733
|
showSuccessNotification("CRM priority settings saved.");
|
|
@@ -1717,14 +1738,14 @@ function useUpdateCrmPrioritySettings() {
|
|
|
1717
1738
|
});
|
|
1718
1739
|
}
|
|
1719
1740
|
function useResetCrmPrioritySettings() {
|
|
1720
|
-
const { apiRequest,
|
|
1741
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1721
1742
|
const queryClient = useQueryClient();
|
|
1722
1743
|
return useMutation({
|
|
1723
1744
|
mutationFn: () => apiRequest("/crm/settings/priority", {
|
|
1724
1745
|
method: "DELETE"
|
|
1725
1746
|
}),
|
|
1726
1747
|
onSuccess: () => {
|
|
1727
|
-
queryClient.invalidateQueries({ queryKey: crmPrioritySettingsKeys.detail(
|
|
1748
|
+
queryClient.invalidateQueries({ queryKey: crmPrioritySettingsKeys.detail(workOSOrganizationId) });
|
|
1728
1749
|
queryClient.invalidateQueries({ queryKey: dealKeys.lists() });
|
|
1729
1750
|
queryClient.invalidateQueries({ queryKey: dealKeys.details() });
|
|
1730
1751
|
showSuccessNotification("CRM priority settings reset to Org-OS defaults.");
|