@elevasis/ui 2.35.0 → 2.36.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/app/index.d.ts +25 -18
- package/dist/app/index.js +2 -2
- package/dist/{chunk-26HFM4MH.js → chunk-F6EFC2MJ.js} +1555 -1903
- package/dist/{chunk-VDOOGGBA.js → chunk-K4UZU3TU.js} +2 -2
- package/dist/{chunk-4U3XAWCN.js → chunk-O2Q4VMRN.js} +134 -495
- package/dist/components/index.d.ts +7 -4
- package/dist/components/index.js +2 -2
- package/dist/components/navigation/index.js +2 -2
- package/dist/execution/index.d.ts +2 -2
- package/dist/features/auth/index.d.ts +3 -0
- package/dist/features/auth/index.js +2 -2
- package/dist/features/clients/index.js +2 -2
- package/dist/features/crm/index.d.ts +3 -0
- package/dist/features/crm/index.js +2 -2
- package/dist/features/dashboard/index.d.ts +3 -3
- package/dist/features/dashboard/index.js +2 -2
- package/dist/features/delivery/index.d.ts +3 -0
- package/dist/features/delivery/index.js +2 -2
- package/dist/features/knowledge/index.js +3 -3
- package/dist/features/lead-gen/index.d.ts +286 -48
- package/dist/features/lead-gen/index.js +2 -2
- package/dist/features/monitoring/index.js +2 -2
- package/dist/features/monitoring/requests/index.js +2 -2
- package/dist/features/operations/index.d.ts +30 -30
- package/dist/features/operations/index.js +2 -2
- package/dist/features/settings/index.d.ts +3 -0
- package/dist/features/settings/index.js +2 -2
- package/dist/hooks/delivery/index.d.ts +3 -0
- package/dist/hooks/delivery/index.js +2 -2
- package/dist/hooks/index.d.ts +29 -16
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +13 -13
- package/dist/hooks/published.d.ts +29 -16
- package/dist/hooks/published.js +2 -2
- package/dist/index.d.ts +51 -34
- package/dist/index.js +2 -2
- package/dist/initialization/index.d.ts +3 -0
- package/dist/knowledge/index.d.ts +21 -21
- package/dist/knowledge/index.js +6 -6
- package/dist/{knowledge-search-index-ORIJCEZX.js → knowledge-search-index-NBCTFIOH.js} +2 -2
- package/dist/organization/index.js +2 -2
- package/dist/profile/index.d.ts +3 -0
- package/dist/provider/index.d.ts +25 -18
- package/dist/provider/index.js +2 -2
- package/dist/provider/published.d.ts +25 -18
- package/dist/provider/published.js +2 -2
- package/dist/sse/index.js +26 -5
- package/dist/supabase/index.d.ts +6 -0
- package/dist/types/index.d.ts +16 -13
- package/dist/utils/index.d.ts +3 -3
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildOrganizationGraph, projectOrganizationSurfaces, compileOrganizationOntology, SemanticIcon, getSortedSidebarEntries, parseOntologyId, getSystem, resolveSystemConfig } from './chunk-
|
|
1
|
+
import { buildOrganizationGraph, projectOrganizationSurfaces, compileOrganizationOntology, SemanticIcon, getSortedSidebarEntries, parseOntologyId, getSystem, resolveSystemConfig } from './chunk-O2Q4VMRN.js';
|
|
2
2
|
import { useMemo, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { useTree, Text, Tree, UnstyledButton, Group, TextInput } from '@mantine/core';
|
|
4
4
|
import { useClipboard } from '@mantine/hooks';
|
|
@@ -2045,7 +2045,7 @@ function TrailingCopySlot({ command, label, showCopy, favorite, hovered }) {
|
|
|
2045
2045
|
var indexPromise = null;
|
|
2046
2046
|
function loadSearchIndex() {
|
|
2047
2047
|
if (!indexPromise) {
|
|
2048
|
-
indexPromise = import('./knowledge-search-index-
|
|
2048
|
+
indexPromise = import('./knowledge-search-index-NBCTFIOH.js').then(
|
|
2049
2049
|
(mod) => buildSearchIndex(mod.default ?? mod)
|
|
2050
2050
|
);
|
|
2051
2051
|
}
|
|
@@ -143,6 +143,120 @@ function SemanticIcon({
|
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
|
+
|
|
147
|
+
// ../core/src/organization-model/helpers.ts
|
|
148
|
+
function defineDomainRecord(schema, entries) {
|
|
149
|
+
return Object.fromEntries(
|
|
150
|
+
entries.map((entry) => {
|
|
151
|
+
const parsed = schema.parse(entry);
|
|
152
|
+
return [parsed.id, parsed];
|
|
153
|
+
})
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function childSystemsOf(system) {
|
|
157
|
+
return system.systems ?? system.subsystems ?? {};
|
|
158
|
+
}
|
|
159
|
+
function defaultPathFor(id) {
|
|
160
|
+
return `/${id.replaceAll(".", "/")}`;
|
|
161
|
+
}
|
|
162
|
+
function parentIdOf(id) {
|
|
163
|
+
const index = id.lastIndexOf(".");
|
|
164
|
+
return index === -1 ? void 0 : id.slice(0, index);
|
|
165
|
+
}
|
|
166
|
+
function findById(systems, id) {
|
|
167
|
+
return systems[id];
|
|
168
|
+
}
|
|
169
|
+
function findByPath(systems, path) {
|
|
170
|
+
return Object.values(systems).find((system) => (system.path ?? system.ui?.path ?? defaultPathFor(system.id)) === path);
|
|
171
|
+
}
|
|
172
|
+
function childrenOf(systems, id) {
|
|
173
|
+
const prefix = `${id}.`;
|
|
174
|
+
return Object.values(systems).filter(
|
|
175
|
+
(system) => system.id.startsWith(prefix) && !system.id.slice(prefix.length).includes(".")
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
function topLevel(systems) {
|
|
179
|
+
return Object.values(systems).filter((system) => !system.id.includes("."));
|
|
180
|
+
}
|
|
181
|
+
function ancestorsOf(systems, id) {
|
|
182
|
+
const segments = id.split(".");
|
|
183
|
+
const ids = segments.map((_, index) => segments.slice(0, index + 1).join("."));
|
|
184
|
+
return ids.map((ancestorId) => findById(systems, ancestorId)).filter((system) => Boolean(system));
|
|
185
|
+
}
|
|
186
|
+
function parentOf(systems, id) {
|
|
187
|
+
const parentId = parentIdOf(id);
|
|
188
|
+
return parentId ? findById(systems, parentId) : void 0;
|
|
189
|
+
}
|
|
190
|
+
function inheritedValue(systems, id, getValue) {
|
|
191
|
+
return ancestorsOf(systems, id).slice().reverse().map(getValue).find((value) => value !== void 0);
|
|
192
|
+
}
|
|
193
|
+
function requiresAdminFor(systems, id) {
|
|
194
|
+
return inheritedValue(systems, id, (system) => system.requiresAdmin) ?? false;
|
|
195
|
+
}
|
|
196
|
+
function devOnlyFor(systems, id) {
|
|
197
|
+
return inheritedValue(systems, id, (system) => system.devOnly || system.lifecycle === "beta" || void 0) ?? false;
|
|
198
|
+
}
|
|
199
|
+
function getSystem(model, path) {
|
|
200
|
+
const segments = path.split(".");
|
|
201
|
+
let current = model.systems;
|
|
202
|
+
let node;
|
|
203
|
+
for (const seg of segments) {
|
|
204
|
+
node = current[seg];
|
|
205
|
+
if (node === void 0) return void 0;
|
|
206
|
+
current = childSystemsOf(node);
|
|
207
|
+
}
|
|
208
|
+
return node;
|
|
209
|
+
}
|
|
210
|
+
function getSystemAncestors(model, path) {
|
|
211
|
+
const segments = path.split(".");
|
|
212
|
+
const result = [];
|
|
213
|
+
let current = model.systems;
|
|
214
|
+
for (const seg of segments) {
|
|
215
|
+
const node = current[seg];
|
|
216
|
+
if (node === void 0) return [];
|
|
217
|
+
result.push(node);
|
|
218
|
+
current = childSystemsOf(node);
|
|
219
|
+
}
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
|
+
function listAllSystems(model) {
|
|
223
|
+
const results = [];
|
|
224
|
+
function walk(map, prefix) {
|
|
225
|
+
for (const [localId2, system] of Object.entries(map)) {
|
|
226
|
+
const fullPath = prefix ? `${prefix}.${localId2}` : localId2;
|
|
227
|
+
results.push({ path: fullPath, system });
|
|
228
|
+
const childSystems = childSystemsOf(system);
|
|
229
|
+
if (Object.keys(childSystems).length > 0) {
|
|
230
|
+
walk(childSystems, fullPath);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
walk(model.systems, "");
|
|
235
|
+
return results;
|
|
236
|
+
}
|
|
237
|
+
function isPlainJsonObject(value) {
|
|
238
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
239
|
+
}
|
|
240
|
+
function mergeJsonConfig(base, override) {
|
|
241
|
+
const result = { ...base };
|
|
242
|
+
for (const [key, value] of Object.entries(override)) {
|
|
243
|
+
const existing = result[key];
|
|
244
|
+
result[key] = isPlainJsonObject(existing) && isPlainJsonObject(value) ? mergeJsonConfig(existing, value) : value;
|
|
245
|
+
}
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
function resolveSystemConfig(model, path) {
|
|
249
|
+
const system = getSystem(model, path);
|
|
250
|
+
if (system === void 0) return {};
|
|
251
|
+
return mergeJsonConfig({}, system.config ?? {});
|
|
252
|
+
}
|
|
253
|
+
function getResourcesForSystem(model, systemPath, options = {}) {
|
|
254
|
+
const { includeDescendants = false } = options;
|
|
255
|
+
const prefix = systemPath + ".";
|
|
256
|
+
return Object.values(model.resources ?? {}).filter(
|
|
257
|
+
(r) => r.systemPath === systemPath || includeDescendants && r.systemPath.startsWith(prefix)
|
|
258
|
+
);
|
|
259
|
+
}
|
|
146
260
|
var OntologyKindSchema = z.enum([
|
|
147
261
|
"object",
|
|
148
262
|
"link",
|
|
@@ -325,7 +439,7 @@ function sortResolvedOntologyIndex(index) {
|
|
|
325
439
|
}
|
|
326
440
|
return sorted;
|
|
327
441
|
}
|
|
328
|
-
function
|
|
442
|
+
function childSystemsOf2(system) {
|
|
329
443
|
return system.systems ?? system.subsystems ?? {};
|
|
330
444
|
}
|
|
331
445
|
function addRecord(index, diagnostics, sourcesById, scopeKey, record, context) {
|
|
@@ -482,7 +596,7 @@ function addSystemScopes(index, diagnostics, sourcesById, systems, prefix, schem
|
|
|
482
596
|
...currentPath,
|
|
483
597
|
"ontology"
|
|
484
598
|
]);
|
|
485
|
-
addSystemScopes(index, diagnostics, sourcesById,
|
|
599
|
+
addSystemScopes(index, diagnostics, sourcesById, childSystemsOf2(system), systemPath, [
|
|
486
600
|
...currentPath,
|
|
487
601
|
system.systems !== void 0 ? "systems" : "subsystems"
|
|
488
602
|
]);
|
|
@@ -807,6 +921,9 @@ var ActionsDomainSchema = z.record(z.string(), ActionSchema).refine((record) =>
|
|
|
807
921
|
message: "Each action entry id must match its map key"
|
|
808
922
|
}).default({});
|
|
809
923
|
var DEFAULT_ORGANIZATION_MODEL_ACTIONS = {};
|
|
924
|
+
function defineActions(entries) {
|
|
925
|
+
return defineDomainRecord(ActionSchema, entries);
|
|
926
|
+
}
|
|
810
927
|
|
|
811
928
|
// ../core/src/organization-model/domains/systems.ts
|
|
812
929
|
var SystemKindSchema = z.enum(["product", "operational", "platform", "diagnostic"]).meta({ label: "System kind", color: "blue" });
|
|
@@ -1114,112 +1231,6 @@ function defineResources(resources) {
|
|
|
1114
1231
|
);
|
|
1115
1232
|
}
|
|
1116
1233
|
|
|
1117
|
-
// ../core/src/organization-model/helpers.ts
|
|
1118
|
-
function childSystemsOf2(system) {
|
|
1119
|
-
return system.systems ?? system.subsystems ?? {};
|
|
1120
|
-
}
|
|
1121
|
-
function defaultPathFor(id) {
|
|
1122
|
-
return `/${id.replaceAll(".", "/")}`;
|
|
1123
|
-
}
|
|
1124
|
-
function parentIdOf(id) {
|
|
1125
|
-
const index = id.lastIndexOf(".");
|
|
1126
|
-
return index === -1 ? void 0 : id.slice(0, index);
|
|
1127
|
-
}
|
|
1128
|
-
function findById(systems, id) {
|
|
1129
|
-
return systems[id];
|
|
1130
|
-
}
|
|
1131
|
-
function findByPath(systems, path) {
|
|
1132
|
-
return Object.values(systems).find((system) => (system.path ?? system.ui?.path ?? defaultPathFor(system.id)) === path);
|
|
1133
|
-
}
|
|
1134
|
-
function childrenOf(systems, id) {
|
|
1135
|
-
const prefix = `${id}.`;
|
|
1136
|
-
return Object.values(systems).filter(
|
|
1137
|
-
(system) => system.id.startsWith(prefix) && !system.id.slice(prefix.length).includes(".")
|
|
1138
|
-
);
|
|
1139
|
-
}
|
|
1140
|
-
function topLevel(systems) {
|
|
1141
|
-
return Object.values(systems).filter((system) => !system.id.includes("."));
|
|
1142
|
-
}
|
|
1143
|
-
function ancestorsOf(systems, id) {
|
|
1144
|
-
const segments = id.split(".");
|
|
1145
|
-
const ids = segments.map((_, index) => segments.slice(0, index + 1).join("."));
|
|
1146
|
-
return ids.map((ancestorId) => findById(systems, ancestorId)).filter((system) => Boolean(system));
|
|
1147
|
-
}
|
|
1148
|
-
function parentOf(systems, id) {
|
|
1149
|
-
const parentId = parentIdOf(id);
|
|
1150
|
-
return parentId ? findById(systems, parentId) : void 0;
|
|
1151
|
-
}
|
|
1152
|
-
function inheritedValue(systems, id, getValue) {
|
|
1153
|
-
return ancestorsOf(systems, id).slice().reverse().map(getValue).find((value) => value !== void 0);
|
|
1154
|
-
}
|
|
1155
|
-
function requiresAdminFor(systems, id) {
|
|
1156
|
-
return inheritedValue(systems, id, (system) => system.requiresAdmin) ?? false;
|
|
1157
|
-
}
|
|
1158
|
-
function devOnlyFor(systems, id) {
|
|
1159
|
-
return inheritedValue(systems, id, (system) => system.devOnly || system.lifecycle === "beta" || void 0) ?? false;
|
|
1160
|
-
}
|
|
1161
|
-
function getSystem(model, path) {
|
|
1162
|
-
const segments = path.split(".");
|
|
1163
|
-
let current = model.systems;
|
|
1164
|
-
let node;
|
|
1165
|
-
for (const seg of segments) {
|
|
1166
|
-
node = current[seg];
|
|
1167
|
-
if (node === void 0) return void 0;
|
|
1168
|
-
current = childSystemsOf2(node);
|
|
1169
|
-
}
|
|
1170
|
-
return node;
|
|
1171
|
-
}
|
|
1172
|
-
function getSystemAncestors(model, path) {
|
|
1173
|
-
const segments = path.split(".");
|
|
1174
|
-
const result = [];
|
|
1175
|
-
let current = model.systems;
|
|
1176
|
-
for (const seg of segments) {
|
|
1177
|
-
const node = current[seg];
|
|
1178
|
-
if (node === void 0) return [];
|
|
1179
|
-
result.push(node);
|
|
1180
|
-
current = childSystemsOf2(node);
|
|
1181
|
-
}
|
|
1182
|
-
return result;
|
|
1183
|
-
}
|
|
1184
|
-
function listAllSystems(model) {
|
|
1185
|
-
const results = [];
|
|
1186
|
-
function walk(map, prefix) {
|
|
1187
|
-
for (const [localId2, system] of Object.entries(map)) {
|
|
1188
|
-
const fullPath = prefix ? `${prefix}.${localId2}` : localId2;
|
|
1189
|
-
results.push({ path: fullPath, system });
|
|
1190
|
-
const childSystems = childSystemsOf2(system);
|
|
1191
|
-
if (Object.keys(childSystems).length > 0) {
|
|
1192
|
-
walk(childSystems, fullPath);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
walk(model.systems, "");
|
|
1197
|
-
return results;
|
|
1198
|
-
}
|
|
1199
|
-
function isPlainJsonObject(value) {
|
|
1200
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1201
|
-
}
|
|
1202
|
-
function mergeJsonConfig(base, override) {
|
|
1203
|
-
const result = { ...base };
|
|
1204
|
-
for (const [key, value] of Object.entries(override)) {
|
|
1205
|
-
const existing = result[key];
|
|
1206
|
-
result[key] = isPlainJsonObject(existing) && isPlainJsonObject(value) ? mergeJsonConfig(existing, value) : value;
|
|
1207
|
-
}
|
|
1208
|
-
return result;
|
|
1209
|
-
}
|
|
1210
|
-
function resolveSystemConfig(model, path) {
|
|
1211
|
-
const system = getSystem(model, path);
|
|
1212
|
-
if (system === void 0) return {};
|
|
1213
|
-
return mergeJsonConfig({}, system.config ?? {});
|
|
1214
|
-
}
|
|
1215
|
-
function getResourcesForSystem(model, systemPath, options = {}) {
|
|
1216
|
-
const { includeDescendants = false } = options;
|
|
1217
|
-
const prefix = systemPath + ".";
|
|
1218
|
-
return Object.values(model.resources ?? {}).filter(
|
|
1219
|
-
(r) => r.systemPath === systemPath || includeDescendants && r.systemPath.startsWith(prefix)
|
|
1220
|
-
);
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
1234
|
// ../core/src/organization-model/migration-helpers.ts
|
|
1224
1235
|
function catalogRecords(model) {
|
|
1225
1236
|
return Object.values(compileOrganizationOntology(model).ontology.catalogTypes);
|
|
@@ -1290,19 +1301,22 @@ function getAllBuildTemplates(model) {
|
|
|
1290
1301
|
const stepCatalog = stepCatalogId !== void 0 ? stepCatalogs.get(stepCatalogId) : void 0;
|
|
1291
1302
|
const steps = stepCatalog === void 0 ? [] : entriesOf(stepCatalog);
|
|
1292
1303
|
return {
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1304
|
+
order: numberValue(templateEntry.order, Number.MAX_SAFE_INTEGER),
|
|
1305
|
+
template: {
|
|
1306
|
+
id: templateId,
|
|
1307
|
+
label: stringValue(templateEntry.label) ?? templateId,
|
|
1308
|
+
...stringValue(templateEntry.description) ? { description: stringValue(templateEntry.description) } : {},
|
|
1309
|
+
...stringValue(templateEntry.color) ? { color: stringValue(templateEntry.color) } : {},
|
|
1310
|
+
steps: steps.map(([stepId, step]) => ({
|
|
1311
|
+
id: stepId,
|
|
1312
|
+
label: stringValue(step.label) ?? stepId,
|
|
1313
|
+
...stringValue(step.description) ? { description: stringValue(step.description) } : {},
|
|
1314
|
+
...step
|
|
1315
|
+
}))
|
|
1316
|
+
}
|
|
1303
1317
|
};
|
|
1304
1318
|
})
|
|
1305
|
-
).sort((a, b) => a.id.localeCompare(b.id));
|
|
1319
|
+
).sort((a, b) => a.order - b.order || a.template.id.localeCompare(b.template.id)).map(({ template }) => template);
|
|
1306
1320
|
}
|
|
1307
1321
|
function getAllProspectingStages(model, kind) {
|
|
1308
1322
|
return catalogRecords(model).filter((catalog) => catalog.kind === "stage" && appliesToEntityKind(catalog) === kind).flatMap(
|
|
@@ -3730,380 +3744,5 @@ function projectOrganizationSurfaces(model) {
|
|
|
3730
3744
|
};
|
|
3731
3745
|
});
|
|
3732
3746
|
}
|
|
3733
|
-
var SalesStageSemanticClassSchema = z.enum(["open", "active", "nurturing", "closed_won", "closed_lost"]);
|
|
3734
|
-
var SalesStageSchema = DisplayMetadataSchema.extend({
|
|
3735
|
-
id: ModelIdSchema,
|
|
3736
|
-
order: z.number().int().min(0),
|
|
3737
|
-
semanticClass: SalesStageSemanticClassSchema,
|
|
3738
|
-
surfaceIds: ReferenceIdsSchema,
|
|
3739
|
-
resourceIds: ReferenceIdsSchema
|
|
3740
|
-
});
|
|
3741
|
-
z.object({
|
|
3742
|
-
id: ModelIdSchema,
|
|
3743
|
-
label: z.string().trim().min(1).max(120),
|
|
3744
|
-
description: DescriptionSchema.optional(),
|
|
3745
|
-
entityId: ModelIdSchema,
|
|
3746
|
-
stages: z.array(SalesStageSchema).min(1)
|
|
3747
|
-
});
|
|
3748
|
-
function findPipeline(definitions, pipelineKey) {
|
|
3749
|
-
return definitions.find((def) => def.pipelineKey === pipelineKey);
|
|
3750
|
-
}
|
|
3751
|
-
DisplayMetadataSchema.extend({
|
|
3752
|
-
id: ModelIdSchema,
|
|
3753
|
-
order: z.number().min(0)
|
|
3754
|
-
});
|
|
3755
|
-
var RecordColumnConfigSchema = z.object({
|
|
3756
|
-
key: ModelIdSchema,
|
|
3757
|
-
label: z.string().trim().min(1).max(120),
|
|
3758
|
-
path: z.string().trim().min(1).max(500),
|
|
3759
|
-
width: z.union([z.number().positive(), z.string().trim().min(1).max(100)]).optional(),
|
|
3760
|
-
renderType: z.enum(["text", "badge", "datetime", "count", "json"]).optional(),
|
|
3761
|
-
badgeColor: z.string().trim().min(1).max(40).optional()
|
|
3762
|
-
});
|
|
3763
|
-
var RecordColumnsConfigSchema = z.object({
|
|
3764
|
-
company: z.array(RecordColumnConfigSchema).optional(),
|
|
3765
|
-
contact: z.array(RecordColumnConfigSchema).optional()
|
|
3766
|
-
}).refine((columns) => Boolean(columns.company?.length || columns.contact?.length), {
|
|
3767
|
-
message: "recordColumns must include at least one entity column set"
|
|
3768
|
-
});
|
|
3769
|
-
var CredentialRequirementSchema = z.object({
|
|
3770
|
-
key: ModelIdSchema,
|
|
3771
|
-
provider: ModelIdSchema,
|
|
3772
|
-
credentialType: z.enum(["api-key", "api-key-secret", "oauth", "webhook-secret"]),
|
|
3773
|
-
label: z.string().trim().min(1).max(120),
|
|
3774
|
-
required: z.boolean(),
|
|
3775
|
-
selectionMode: z.enum(["single", "multiple"]).optional(),
|
|
3776
|
-
inputPath: z.string().trim().min(1).max(500),
|
|
3777
|
-
verifyOnRun: z.boolean().optional()
|
|
3778
|
-
});
|
|
3779
|
-
var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
|
|
3780
|
-
id: ModelIdSchema,
|
|
3781
|
-
primaryEntity: z.enum(["company", "contact"]),
|
|
3782
|
-
outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
|
|
3783
|
-
stageKey: ModelIdSchema,
|
|
3784
|
-
recordEntity: z.enum(["company", "contact"]).optional(),
|
|
3785
|
-
recordsStageKey: ModelIdSchema.optional(),
|
|
3786
|
-
recordSourceStageKey: ModelIdSchema.optional(),
|
|
3787
|
-
dependsOn: z.array(ModelIdSchema).optional(),
|
|
3788
|
-
dependencyMode: z.literal("per-record-eligibility"),
|
|
3789
|
-
actionKey: ModelIdSchema,
|
|
3790
|
-
defaultBatchSize: z.number().int().positive(),
|
|
3791
|
-
maxBatchSize: z.number().int().positive(),
|
|
3792
|
-
recordColumns: RecordColumnsConfigSchema.optional(),
|
|
3793
|
-
credentialRequirements: z.array(CredentialRequirementSchema).optional()
|
|
3794
|
-
}).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
|
|
3795
|
-
message: "defaultBatchSize must be less than or equal to maxBatchSize",
|
|
3796
|
-
path: ["defaultBatchSize"]
|
|
3797
|
-
});
|
|
3798
|
-
DisplayMetadataSchema.extend({
|
|
3799
|
-
id: ModelIdSchema,
|
|
3800
|
-
steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
|
|
3801
|
-
});
|
|
3802
|
-
var DTC_RECORD_COLUMNS = {
|
|
3803
|
-
populated: {
|
|
3804
|
-
company: [
|
|
3805
|
-
{ key: "name", label: "Company", path: "company.name" },
|
|
3806
|
-
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
3807
|
-
{ key: "employee-count", label: "Employees", path: "company.numEmployees", renderType: "count" },
|
|
3808
|
-
{ key: "apollo-industry", label: "Apollo industry", path: "company.category" },
|
|
3809
|
-
{ key: "location", label: "Location", path: "company.locationState" }
|
|
3810
|
-
]
|
|
3811
|
-
},
|
|
3812
|
-
crawled: {
|
|
3813
|
-
company: [
|
|
3814
|
-
{ key: "name", label: "Company", path: "company.name" },
|
|
3815
|
-
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
3816
|
-
{ key: "page-count", label: "Pages", path: "company.enrichmentData.websiteCrawl.pageCount", renderType: "count" },
|
|
3817
|
-
{ key: "crawl-status", label: "Crawl status", path: "processingState.crawled.status", renderType: "badge" }
|
|
3818
|
-
]
|
|
3819
|
-
},
|
|
3820
|
-
extracted: {
|
|
3821
|
-
company: [
|
|
3822
|
-
{ key: "name", label: "Company", path: "company.name" },
|
|
3823
|
-
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
3824
|
-
{ key: "description", label: "Description", path: "company.enrichmentData.websiteCrawl.companyDescription" },
|
|
3825
|
-
{ key: "services", label: "Services", path: "company.enrichmentData.websiteCrawl.services", renderType: "json" },
|
|
3826
|
-
{
|
|
3827
|
-
key: "automation-gaps",
|
|
3828
|
-
label: "Automation gaps",
|
|
3829
|
-
path: "company.enrichmentData.websiteCrawl.automationGaps",
|
|
3830
|
-
renderType: "json"
|
|
3831
|
-
},
|
|
3832
|
-
{
|
|
3833
|
-
key: "contact-count",
|
|
3834
|
-
label: "Contacts",
|
|
3835
|
-
path: "company.enrichmentData.websiteCrawl.emailCount",
|
|
3836
|
-
renderType: "count"
|
|
3837
|
-
}
|
|
3838
|
-
]
|
|
3839
|
-
},
|
|
3840
|
-
qualified: {
|
|
3841
|
-
company: [
|
|
3842
|
-
{ key: "name", label: "Company", path: "company.name" },
|
|
3843
|
-
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
3844
|
-
{ key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
|
|
3845
|
-
{ key: "signals", label: "Signals", path: "company.qualificationSignals", renderType: "json" },
|
|
3846
|
-
{
|
|
3847
|
-
key: "disqualified-reason",
|
|
3848
|
-
label: "Disqualified reason",
|
|
3849
|
-
path: "processingState.qualified.data.disqualifiedReason"
|
|
3850
|
-
}
|
|
3851
|
-
]
|
|
3852
|
-
},
|
|
3853
|
-
decisionMakers: {
|
|
3854
|
-
contact: [
|
|
3855
|
-
{ key: "name", label: "Name", path: "contact.name" },
|
|
3856
|
-
{ key: "title", label: "Title", path: "contact.title" },
|
|
3857
|
-
{ key: "email", label: "Email", path: "contact.email" },
|
|
3858
|
-
{ key: "linkedin", label: "LinkedIn", path: "contact.linkedinUrl" },
|
|
3859
|
-
{
|
|
3860
|
-
key: "priority-score",
|
|
3861
|
-
label: "Priority",
|
|
3862
|
-
path: "contact.enrichmentData.apollo.priorityScore",
|
|
3863
|
-
renderType: "badge"
|
|
3864
|
-
}
|
|
3865
|
-
]
|
|
3866
|
-
},
|
|
3867
|
-
uploaded: {
|
|
3868
|
-
company: [
|
|
3869
|
-
{ key: "name", label: "Company", path: "company.name" },
|
|
3870
|
-
{ key: "domain", label: "Domain", path: "company.domain" },
|
|
3871
|
-
{
|
|
3872
|
-
key: "contacts",
|
|
3873
|
-
label: "Contacts",
|
|
3874
|
-
path: "company.enrichmentData.approvedLeadListExport.contacts",
|
|
3875
|
-
renderType: "json"
|
|
3876
|
-
},
|
|
3877
|
-
{ key: "score", label: "Score", path: "company.qualificationScore", renderType: "badge", badgeColor: "green" },
|
|
3878
|
-
{
|
|
3879
|
-
key: "approval",
|
|
3880
|
-
label: "Approval",
|
|
3881
|
-
path: "company.enrichmentData.approvedLeadListExport.approvalStatus",
|
|
3882
|
-
renderType: "badge"
|
|
3883
|
-
}
|
|
3884
|
-
]
|
|
3885
|
-
}
|
|
3886
|
-
};
|
|
3887
|
-
var PROSPECTING_STEPS = {
|
|
3888
|
-
localServices: {
|
|
3889
|
-
sourceCompanies: {
|
|
3890
|
-
id: "source-companies",
|
|
3891
|
-
label: "Companies found",
|
|
3892
|
-
primaryEntity: "company",
|
|
3893
|
-
outputs: ["company"],
|
|
3894
|
-
stageKey: "populated",
|
|
3895
|
-
dependencyMode: "per-record-eligibility",
|
|
3896
|
-
actionKey: "lead-gen.company.source",
|
|
3897
|
-
defaultBatchSize: 100,
|
|
3898
|
-
maxBatchSize: 250
|
|
3899
|
-
},
|
|
3900
|
-
analyzeWebsites: {
|
|
3901
|
-
id: "analyze-websites",
|
|
3902
|
-
label: "Websites analyzed",
|
|
3903
|
-
primaryEntity: "company",
|
|
3904
|
-
outputs: ["company"],
|
|
3905
|
-
stageKey: "extracted",
|
|
3906
|
-
dependsOn: ["source-companies"],
|
|
3907
|
-
dependencyMode: "per-record-eligibility",
|
|
3908
|
-
actionKey: "lead-gen.company.website-extract",
|
|
3909
|
-
defaultBatchSize: 50,
|
|
3910
|
-
maxBatchSize: 100
|
|
3911
|
-
},
|
|
3912
|
-
qualifyCompanies: {
|
|
3913
|
-
id: "qualify-companies",
|
|
3914
|
-
label: "Companies qualified",
|
|
3915
|
-
primaryEntity: "company",
|
|
3916
|
-
outputs: ["company"],
|
|
3917
|
-
stageKey: "qualified",
|
|
3918
|
-
dependsOn: ["analyze-websites"],
|
|
3919
|
-
dependencyMode: "per-record-eligibility",
|
|
3920
|
-
actionKey: "lead-gen.company.qualify",
|
|
3921
|
-
defaultBatchSize: 100,
|
|
3922
|
-
maxBatchSize: 250
|
|
3923
|
-
},
|
|
3924
|
-
findContacts: {
|
|
3925
|
-
id: "find-contacts",
|
|
3926
|
-
label: "Decision-makers found",
|
|
3927
|
-
primaryEntity: "contact",
|
|
3928
|
-
outputs: ["contact"],
|
|
3929
|
-
stageKey: "discovered",
|
|
3930
|
-
dependsOn: ["qualify-companies"],
|
|
3931
|
-
dependencyMode: "per-record-eligibility",
|
|
3932
|
-
actionKey: "lead-gen.contact.discover",
|
|
3933
|
-
defaultBatchSize: 50,
|
|
3934
|
-
maxBatchSize: 100
|
|
3935
|
-
},
|
|
3936
|
-
verifyEmails: {
|
|
3937
|
-
id: "verify-emails",
|
|
3938
|
-
label: "Emails verified",
|
|
3939
|
-
primaryEntity: "contact",
|
|
3940
|
-
outputs: ["contact"],
|
|
3941
|
-
stageKey: "verified",
|
|
3942
|
-
dependsOn: ["find-contacts"],
|
|
3943
|
-
dependencyMode: "per-record-eligibility",
|
|
3944
|
-
actionKey: "lead-gen.contact.verify-email",
|
|
3945
|
-
defaultBatchSize: 100,
|
|
3946
|
-
maxBatchSize: 500
|
|
3947
|
-
},
|
|
3948
|
-
personalize: {
|
|
3949
|
-
id: "personalize",
|
|
3950
|
-
label: "Personalize",
|
|
3951
|
-
primaryEntity: "contact",
|
|
3952
|
-
outputs: ["contact"],
|
|
3953
|
-
stageKey: "personalized",
|
|
3954
|
-
dependsOn: ["verify-emails"],
|
|
3955
|
-
dependencyMode: "per-record-eligibility",
|
|
3956
|
-
actionKey: "lead-gen.contact.personalize",
|
|
3957
|
-
defaultBatchSize: 25,
|
|
3958
|
-
maxBatchSize: 100
|
|
3959
|
-
},
|
|
3960
|
-
review: {
|
|
3961
|
-
id: "review",
|
|
3962
|
-
label: "Reviewed and exported",
|
|
3963
|
-
primaryEntity: "contact",
|
|
3964
|
-
outputs: ["export"],
|
|
3965
|
-
stageKey: "uploaded",
|
|
3966
|
-
dependsOn: ["personalize"],
|
|
3967
|
-
dependencyMode: "per-record-eligibility",
|
|
3968
|
-
actionKey: "lead-gen.review.outreach-ready",
|
|
3969
|
-
defaultBatchSize: 25,
|
|
3970
|
-
maxBatchSize: 100
|
|
3971
|
-
}
|
|
3972
|
-
},
|
|
3973
|
-
dtcApolloClickup: {
|
|
3974
|
-
importApolloSearch: {
|
|
3975
|
-
id: "import-apollo-search",
|
|
3976
|
-
label: "Companies found",
|
|
3977
|
-
description: "Pull companies and seed contact data from a predefined Apollo search or list.",
|
|
3978
|
-
primaryEntity: "company",
|
|
3979
|
-
outputs: ["company", "contact"],
|
|
3980
|
-
stageKey: "populated",
|
|
3981
|
-
dependencyMode: "per-record-eligibility",
|
|
3982
|
-
actionKey: "lead-gen.company.apollo-import",
|
|
3983
|
-
defaultBatchSize: 250,
|
|
3984
|
-
maxBatchSize: 1e3,
|
|
3985
|
-
recordColumns: DTC_RECORD_COLUMNS.populated,
|
|
3986
|
-
credentialRequirements: [
|
|
3987
|
-
{
|
|
3988
|
-
key: "apollo",
|
|
3989
|
-
provider: "apollo",
|
|
3990
|
-
credentialType: "api-key-secret",
|
|
3991
|
-
label: "Apollo API key",
|
|
3992
|
-
required: true,
|
|
3993
|
-
selectionMode: "single",
|
|
3994
|
-
inputPath: "credential"
|
|
3995
|
-
}
|
|
3996
|
-
]
|
|
3997
|
-
},
|
|
3998
|
-
apifyCrawl: {
|
|
3999
|
-
id: "apify-crawl",
|
|
4000
|
-
label: "Websites crawled",
|
|
4001
|
-
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.",
|
|
4002
|
-
primaryEntity: "company",
|
|
4003
|
-
outputs: ["company"],
|
|
4004
|
-
stageKey: "crawled",
|
|
4005
|
-
dependsOn: ["import-apollo-search"],
|
|
4006
|
-
dependencyMode: "per-record-eligibility",
|
|
4007
|
-
actionKey: "lead-gen.company.apify-crawl",
|
|
4008
|
-
defaultBatchSize: 50,
|
|
4009
|
-
maxBatchSize: 100,
|
|
4010
|
-
recordColumns: DTC_RECORD_COLUMNS.crawled,
|
|
4011
|
-
credentialRequirements: [
|
|
4012
|
-
{
|
|
4013
|
-
key: "apify",
|
|
4014
|
-
provider: "apify",
|
|
4015
|
-
credentialType: "api-key-secret",
|
|
4016
|
-
label: "Apify API token",
|
|
4017
|
-
required: true,
|
|
4018
|
-
selectionMode: "single",
|
|
4019
|
-
inputPath: "credential",
|
|
4020
|
-
verifyOnRun: true
|
|
4021
|
-
}
|
|
4022
|
-
]
|
|
4023
|
-
},
|
|
4024
|
-
analyzeWebsites: {
|
|
4025
|
-
id: "analyze-websites",
|
|
4026
|
-
label: "Websites analyzed",
|
|
4027
|
-
description: "Extract subscription, product, retention, and tech-stack signals from each brand website.",
|
|
4028
|
-
primaryEntity: "company",
|
|
4029
|
-
outputs: ["company"],
|
|
4030
|
-
stageKey: "extracted",
|
|
4031
|
-
dependsOn: ["apify-crawl"],
|
|
4032
|
-
dependencyMode: "per-record-eligibility",
|
|
4033
|
-
actionKey: "lead-gen.company.website-extract",
|
|
4034
|
-
defaultBatchSize: 50,
|
|
4035
|
-
maxBatchSize: 100,
|
|
4036
|
-
recordColumns: DTC_RECORD_COLUMNS.extracted
|
|
4037
|
-
},
|
|
4038
|
-
scoreDtcFit: {
|
|
4039
|
-
id: "score-dtc-fit",
|
|
4040
|
-
label: "Companies qualified",
|
|
4041
|
-
description: "Classify subscription potential, consumable-product fit, retention maturity, and disqualifiers.",
|
|
4042
|
-
primaryEntity: "company",
|
|
4043
|
-
outputs: ["company"],
|
|
4044
|
-
stageKey: "qualified",
|
|
4045
|
-
dependsOn: ["analyze-websites"],
|
|
4046
|
-
dependencyMode: "per-record-eligibility",
|
|
4047
|
-
actionKey: "lead-gen.company.dtc-subscription-qualify",
|
|
4048
|
-
defaultBatchSize: 100,
|
|
4049
|
-
maxBatchSize: 250,
|
|
4050
|
-
recordColumns: DTC_RECORD_COLUMNS.qualified
|
|
4051
|
-
},
|
|
4052
|
-
enrichDecisionMakers: {
|
|
4053
|
-
id: "enrich-decision-makers",
|
|
4054
|
-
label: "Decision-makers found",
|
|
4055
|
-
description: "Use Apollo to find qualified contacts at qualified companies - founders, retention leads, lifecycle leads, and marketing owners.",
|
|
4056
|
-
primaryEntity: "company",
|
|
4057
|
-
outputs: ["contact"],
|
|
4058
|
-
stageKey: "decision-makers-enriched",
|
|
4059
|
-
recordEntity: "contact",
|
|
4060
|
-
dependsOn: ["score-dtc-fit"],
|
|
4061
|
-
dependencyMode: "per-record-eligibility",
|
|
4062
|
-
actionKey: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
4063
|
-
defaultBatchSize: 100,
|
|
4064
|
-
maxBatchSize: 250,
|
|
4065
|
-
recordColumns: DTC_RECORD_COLUMNS.decisionMakers,
|
|
4066
|
-
credentialRequirements: [
|
|
4067
|
-
{
|
|
4068
|
-
key: "apollo",
|
|
4069
|
-
provider: "apollo",
|
|
4070
|
-
credentialType: "api-key-secret",
|
|
4071
|
-
label: "Apollo API key",
|
|
4072
|
-
required: true,
|
|
4073
|
-
selectionMode: "single",
|
|
4074
|
-
inputPath: "credential"
|
|
4075
|
-
}
|
|
4076
|
-
]
|
|
4077
|
-
},
|
|
4078
|
-
reviewAndExport: {
|
|
4079
|
-
id: "review-and-export",
|
|
4080
|
-
label: "Reviewed and exported",
|
|
4081
|
-
description: "Operator QC approves or rejects qualified companies, then approved records are exported as a lead list with unverified emails.",
|
|
4082
|
-
primaryEntity: "company",
|
|
4083
|
-
outputs: ["export"],
|
|
4084
|
-
stageKey: "uploaded",
|
|
4085
|
-
recordsStageKey: "uploaded",
|
|
4086
|
-
recordSourceStageKey: "qualified",
|
|
4087
|
-
dependsOn: ["enrich-decision-makers"],
|
|
4088
|
-
dependencyMode: "per-record-eligibility",
|
|
4089
|
-
actionKey: "lead-gen.export.list",
|
|
4090
|
-
defaultBatchSize: 100,
|
|
4091
|
-
maxBatchSize: 250,
|
|
4092
|
-
recordColumns: DTC_RECORD_COLUMNS.uploaded,
|
|
4093
|
-
credentialRequirements: [
|
|
4094
|
-
{
|
|
4095
|
-
key: "clickup",
|
|
4096
|
-
provider: "clickup",
|
|
4097
|
-
credentialType: "api-key-secret",
|
|
4098
|
-
label: "ClickUp API token",
|
|
4099
|
-
required: true,
|
|
4100
|
-
selectionMode: "single",
|
|
4101
|
-
inputPath: "clickupCredential",
|
|
4102
|
-
verifyOnRun: true
|
|
4103
|
-
}
|
|
4104
|
-
]
|
|
4105
|
-
}
|
|
4106
|
-
}
|
|
4107
|
-
};
|
|
4108
3747
|
|
|
4109
|
-
export { ActionSchema, AgentResourceEntrySchema, DEFAULT_SEMANTIC_ICON_REGISTRY, EntitySchema, IdentityDomainSchema, IntegrationResourceEntrySchema, OntologyIdSchema, OrgKnowledgeNodeSchema, PROJECTS_VIEW_ACTION_ID,
|
|
3748
|
+
export { ActionSchema, AgentResourceEntrySchema, DEFAULT_SEMANTIC_ICON_REGISTRY, EntitySchema, IdentityDomainSchema, IntegrationResourceEntrySchema, OntologyIdSchema, OrgKnowledgeNodeSchema, PROJECTS_VIEW_ACTION_ID, PolicySchema, RoleSchema, ScriptResourceEntrySchema, SemanticIcon, SurfaceDefinitionSchema, SystemEntrySchema, WorkflowResourceEntrySchema, ancestorsOf, buildOrganizationGraph, childrenOf, compileOrganizationOntology, defaultPathFor, defineActions, defineResources, defineTopology, devOnlyFor, extendSemanticIconRegistry, findById, findByPath, getAllBuildTemplates, getLeadGenStageCatalog, getResourcesForSystem, getSemanticIconComponent, getSortedSidebarEntries, getSystem, getSystemAncestors, listAllSystems, ontologyGraphNodeId, parentOf, parseOntologyId, projectOrganizationSurfaces, requiresAdminFor, resolveOrganizationModel, resolveSemanticIconComponent, resolveSystemConfig, topLevel, topologyRef, topologyRelationship };
|