@elevasis/core 0.40.0 → 0.42.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/auth/index.d.ts +68 -2
- package/dist/index.d.ts +652 -416
- package/dist/index.js +82 -5
- package/dist/knowledge/index.d.ts +69 -5
- package/dist/organization-model/index.d.ts +652 -416
- package/dist/organization-model/index.js +82 -5
- package/dist/test-utils/index.d.ts +103 -37
- package/dist/test-utils/index.js +69 -2
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +54 -0
- package/src/business/clients/api-schemas.test.ts +63 -29
- package/src/business/clients/api-schemas.ts +41 -29
- package/src/integrations/credentials/index.ts +3 -4
- package/src/organization-model/__tests__/clients.test.ts +146 -0
- package/src/organization-model/contracts.ts +27 -27
- package/src/organization-model/cross-ref.ts +4 -0
- package/src/organization-model/defaults.ts +2 -2
- package/src/organization-model/domains/knowledge.ts +1 -0
- package/src/organization-model/graph/build.ts +23 -6
- package/src/organization-model/graph/schema.ts +4 -3
- package/src/organization-model/graph/types.ts +4 -3
- package/src/organization-model/helpers.ts +15 -0
- package/src/organization-model/published.ts +19 -1
- package/src/organization-model/schema-refinements.ts +2 -2
- package/src/organization-model/schema.ts +97 -0
- package/src/organization-model/snapshot-hash.ts +0 -2
- package/src/organization-model/types.ts +19 -1
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +54 -0
- package/src/supabase/database.types.ts +3 -0
- package/src/supabase/index.ts +0 -6
- package/src/business/pdf/server/__tests__/pdfmake-test.ts +0 -219
package/dist/index.js
CHANGED
|
@@ -740,6 +740,15 @@ function defineDomainRecord(schema, entries) {
|
|
|
740
740
|
function childSystemsOf2(system) {
|
|
741
741
|
return system.systems ?? system.subsystems ?? {};
|
|
742
742
|
}
|
|
743
|
+
function listClientProfiles(model) {
|
|
744
|
+
return Object.values(model.clients ?? {}).sort((a, b) => a.slug.localeCompare(b.slug));
|
|
745
|
+
}
|
|
746
|
+
function getClientProfile(model, id) {
|
|
747
|
+
return model.clients?.[id];
|
|
748
|
+
}
|
|
749
|
+
function getClientProfileBySlug(model, slug) {
|
|
750
|
+
return Object.values(model.clients ?? {}).find((client) => client.slug === slug);
|
|
751
|
+
}
|
|
743
752
|
function getSystem(model, path) {
|
|
744
753
|
const flatMatch = model.systems[path];
|
|
745
754
|
if (flatMatch !== void 0) return flatMatch;
|
|
@@ -1425,6 +1434,7 @@ function defineGoals(entries) {
|
|
|
1425
1434
|
}
|
|
1426
1435
|
var KnowledgeTargetKindSchema = z.enum([
|
|
1427
1436
|
"system",
|
|
1437
|
+
"client",
|
|
1428
1438
|
"resource",
|
|
1429
1439
|
"knowledge",
|
|
1430
1440
|
"stage",
|
|
@@ -1800,6 +1810,7 @@ function buildOmCrossRefIndex(model) {
|
|
|
1800
1810
|
systemsById.set(system.id, system);
|
|
1801
1811
|
}
|
|
1802
1812
|
const resourceIds = new Set(Object.keys(model.resources ?? {}));
|
|
1813
|
+
const clientIds = new Set(Object.keys(model.clients ?? {}));
|
|
1803
1814
|
const knowledgeIds = new Set(Object.keys(model.knowledge ?? {}));
|
|
1804
1815
|
const roleIds = new Set(Object.keys(model.roles ?? {}));
|
|
1805
1816
|
const goalIds = new Set(Object.keys(model.goals ?? {}));
|
|
@@ -1833,6 +1844,7 @@ function buildOmCrossRefIndex(model) {
|
|
|
1833
1844
|
return {
|
|
1834
1845
|
systemsById,
|
|
1835
1846
|
resourceIds,
|
|
1847
|
+
clientIds,
|
|
1836
1848
|
knowledgeIds,
|
|
1837
1849
|
roleIds,
|
|
1838
1850
|
goalIds,
|
|
@@ -1846,6 +1858,7 @@ function buildOmCrossRefIndex(model) {
|
|
|
1846
1858
|
}
|
|
1847
1859
|
function knowledgeTargetExists(index, kind, id) {
|
|
1848
1860
|
if (kind === "system") return index.systemsById.has(id);
|
|
1861
|
+
if (kind === "client") return index.clientIds.has(id);
|
|
1849
1862
|
if (kind === "resource") return index.resourceIds.has(id);
|
|
1850
1863
|
if (kind === "knowledge") return index.knowledgeIds.has(id);
|
|
1851
1864
|
if (kind === "stage") return index.stageIds.has(id);
|
|
@@ -1879,10 +1892,10 @@ function asRoleHolderArray(heldBy) {
|
|
|
1879
1892
|
function isKnowledgeKindCompatibleWithTarget(knowledgeKind, targetKind) {
|
|
1880
1893
|
if (knowledgeKind === "reference") return true;
|
|
1881
1894
|
if (knowledgeKind === "playbook") {
|
|
1882
|
-
return ["system", "resource", "stage", "action", "ontology"].includes(targetKind);
|
|
1895
|
+
return ["system", "client", "resource", "stage", "action", "ontology"].includes(targetKind);
|
|
1883
1896
|
}
|
|
1884
1897
|
if (knowledgeKind === "strategy") {
|
|
1885
|
-
return ["system", "goal", "offering", "customer-segment", "ontology"].includes(targetKind);
|
|
1898
|
+
return ["system", "client", "goal", "offering", "customer-segment", "ontology"].includes(targetKind);
|
|
1886
1899
|
}
|
|
1887
1900
|
return false;
|
|
1888
1901
|
}
|
|
@@ -2410,9 +2423,68 @@ function refineOrganizationModel(model, ctx) {
|
|
|
2410
2423
|
}
|
|
2411
2424
|
|
|
2412
2425
|
// src/organization-model/schema.ts
|
|
2426
|
+
var ClientProfileIdSchema = z.string().uuid();
|
|
2427
|
+
var ClientProfileStatusSchema = z.enum(["active", "onboarding", "paused", "completed", "churned"]);
|
|
2428
|
+
var ClientProfileSourceSchema = z.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/, "Source must use lowercase letters, numbers, and underscores");
|
|
2429
|
+
var ClientProfileIdentitySchema = z.object({
|
|
2430
|
+
organizationName: LabelSchema.optional(),
|
|
2431
|
+
shortName: z.string().trim().min(1).max(40).optional(),
|
|
2432
|
+
clientBrief: z.string().trim().max(4e3).default(""),
|
|
2433
|
+
geographicFocus: z.array(z.string().trim().min(1).max(200)).default([]),
|
|
2434
|
+
timeZone: z.string().trim().min(1).max(100).default("UTC")
|
|
2435
|
+
}).passthrough().default({
|
|
2436
|
+
clientBrief: "",
|
|
2437
|
+
geographicFocus: [],
|
|
2438
|
+
timeZone: "UTC"
|
|
2439
|
+
});
|
|
2440
|
+
var ClientProfileBrandingSchema = z.object({
|
|
2441
|
+
voice: z.string().trim().max(280).optional(),
|
|
2442
|
+
tagline: z.string().trim().max(200).optional(),
|
|
2443
|
+
values: z.array(z.string().trim().min(1).max(100)).default([])
|
|
2444
|
+
}).passthrough().default({
|
|
2445
|
+
values: []
|
|
2446
|
+
});
|
|
2447
|
+
var ClientProfileWorkspaceSchema = z.object({
|
|
2448
|
+
kind: z.enum(["external-project", "internal-project", "none"]).optional(),
|
|
2449
|
+
owner: z.enum(["developer", "client", "platform"]).optional(),
|
|
2450
|
+
projectId: z.string().trim().min(1).max(200).optional(),
|
|
2451
|
+
workspacePath: z.string().trim().min(1).max(500).optional()
|
|
2452
|
+
}).passthrough().default({});
|
|
2453
|
+
var ClientProfileLinksSchema = z.object({
|
|
2454
|
+
projectIds: z.array(z.string().uuid()).default([]),
|
|
2455
|
+
primaryCompanyId: z.string().uuid().optional(),
|
|
2456
|
+
primaryContactId: z.string().uuid().optional(),
|
|
2457
|
+
sourceDealId: z.string().uuid().optional()
|
|
2458
|
+
}).default({
|
|
2459
|
+
projectIds: []
|
|
2460
|
+
});
|
|
2461
|
+
var ClientProfilePromptsSchema = z.object({
|
|
2462
|
+
defaultContext: z.string().trim().max(8e3).default("")
|
|
2463
|
+
}).passthrough().default({
|
|
2464
|
+
defaultContext: ""
|
|
2465
|
+
});
|
|
2466
|
+
var ClientProfileSchema = z.object({
|
|
2467
|
+
id: ClientProfileIdSchema,
|
|
2468
|
+
slug: ModelIdSchema,
|
|
2469
|
+
name: LabelSchema,
|
|
2470
|
+
status: ClientProfileStatusSchema.default("onboarding"),
|
|
2471
|
+
source: ClientProfileSourceSchema.optional(),
|
|
2472
|
+
identity: ClientProfileIdentitySchema,
|
|
2473
|
+
branding: ClientProfileBrandingSchema,
|
|
2474
|
+
workspace: ClientProfileWorkspaceSchema,
|
|
2475
|
+
links: ClientProfileLinksSchema,
|
|
2476
|
+
prompts: ClientProfilePromptsSchema,
|
|
2477
|
+
config: z.record(z.string().trim().min(1).max(200), JsonValueSchema).default({}),
|
|
2478
|
+
customValues: z.record(z.string().trim().min(1).max(200), JsonValueSchema).default({})
|
|
2479
|
+
}).strict();
|
|
2480
|
+
var ClientProfilesDomainSchema = z.record(ClientProfileIdSchema, ClientProfileSchema).refine((record) => Object.entries(record).every(([key, entry]) => entry.id === key), {
|
|
2481
|
+
message: "Each client profile id must match its map key"
|
|
2482
|
+
}).default({});
|
|
2483
|
+
var DEFAULT_ORGANIZATION_MODEL_CLIENTS = {};
|
|
2413
2484
|
var OrganizationModelDomainKeySchema = z.enum([
|
|
2414
2485
|
"branding",
|
|
2415
2486
|
"identity",
|
|
2487
|
+
"clients",
|
|
2416
2488
|
"customers",
|
|
2417
2489
|
"offerings",
|
|
2418
2490
|
"roles",
|
|
@@ -2433,6 +2505,7 @@ var OrganizationModelDomainMetadataSchema = z.object({
|
|
|
2433
2505
|
var DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA = {
|
|
2434
2506
|
branding: { version: 1, lastModified: "2026-05-10" },
|
|
2435
2507
|
identity: { version: 1, lastModified: "2026-05-10" },
|
|
2508
|
+
clients: { version: 1, lastModified: "2026-05-30" },
|
|
2436
2509
|
customers: { version: 1, lastModified: "2026-05-10" },
|
|
2437
2510
|
offerings: { version: 1, lastModified: "2026-05-10" },
|
|
2438
2511
|
roles: { version: 1, lastModified: "2026-05-10" },
|
|
@@ -2449,6 +2522,7 @@ var DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA = {
|
|
|
2449
2522
|
var OrganizationModelDomainMetadataByDomainSchema = z.object({
|
|
2450
2523
|
branding: OrganizationModelDomainMetadataSchema,
|
|
2451
2524
|
identity: OrganizationModelDomainMetadataSchema,
|
|
2525
|
+
clients: OrganizationModelDomainMetadataSchema,
|
|
2452
2526
|
customers: OrganizationModelDomainMetadataSchema,
|
|
2453
2527
|
offerings: OrganizationModelDomainMetadataSchema,
|
|
2454
2528
|
roles: OrganizationModelDomainMetadataSchema,
|
|
@@ -2480,6 +2554,7 @@ var OrganizationModelSchemaBase = z.object({
|
|
|
2480
2554
|
branding: OrganizationModelBrandingSchema.default(DEFAULT_ORGANIZATION_MODEL_BRANDING),
|
|
2481
2555
|
navigation: OrganizationModelNavigationSchema,
|
|
2482
2556
|
identity: IdentityDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_IDENTITY),
|
|
2557
|
+
clients: ClientProfilesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_CLIENTS),
|
|
2483
2558
|
customers: CustomersDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_CUSTOMERS),
|
|
2484
2559
|
offerings: OfferingsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_OFFERINGS),
|
|
2485
2560
|
roles: RolesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ROLES),
|
|
@@ -2498,6 +2573,7 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine(refineOrga
|
|
|
2498
2573
|
var OrganizationGraphNodeKindSchema = z.enum([
|
|
2499
2574
|
"organization",
|
|
2500
2575
|
"system",
|
|
2576
|
+
"client",
|
|
2501
2577
|
"role",
|
|
2502
2578
|
"action",
|
|
2503
2579
|
"entity",
|
|
@@ -2572,9 +2648,9 @@ var LinkSchema = z.object({
|
|
|
2572
2648
|
// src/organization-model/contracts.ts
|
|
2573
2649
|
var KNOWLEDGE_FEATURE_ID = "knowledge";
|
|
2574
2650
|
var KNOWLEDGE_SYSTEM_ID = "knowledge";
|
|
2575
|
-
var PROJECTS_SYSTEM_ID = "projects";
|
|
2651
|
+
var PROJECTS_SYSTEM_ID = "platform.projects";
|
|
2576
2652
|
var PROJECTS_FEATURE_ID = PROJECTS_SYSTEM_ID;
|
|
2577
|
-
var PROJECTS_INDEX_SURFACE_ID = "projects.index";
|
|
2653
|
+
var PROJECTS_INDEX_SURFACE_ID = "platform.projects.index";
|
|
2578
2654
|
var PROJECTS_VIEW_ACTION_ID = "delivery.projects.view";
|
|
2579
2655
|
var SALES_FEATURE_ID = "crm";
|
|
2580
2656
|
var PROSPECTING_FEATURE_ID = "lead-gen";
|
|
@@ -2609,6 +2685,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
|
|
|
2609
2685
|
branding: DEFAULT_ORGANIZATION_MODEL_BRANDING,
|
|
2610
2686
|
navigation: DEFAULT_ORGANIZATION_MODEL_NAVIGATION2,
|
|
2611
2687
|
identity: DEFAULT_ORGANIZATION_MODEL_IDENTITY,
|
|
2688
|
+
clients: DEFAULT_ORGANIZATION_MODEL_CLIENTS,
|
|
2612
2689
|
customers: DEFAULT_ORGANIZATION_MODEL_CUSTOMERS,
|
|
2613
2690
|
offerings: DEFAULT_ORGANIZATION_MODEL_OFFERINGS,
|
|
2614
2691
|
roles: DEFAULT_ORGANIZATION_MODEL_ROLES,
|
|
@@ -3504,4 +3581,4 @@ function scaffoldOrganizationModel(model, spec) {
|
|
|
3504
3581
|
return scaffoldKnowledgeNode(model, spec);
|
|
3505
3582
|
}
|
|
3506
3583
|
|
|
3507
|
-
export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OmTopologySystemInterfaceGrantMetadataSchema, OmTopologySystemInterfaceGrantSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, SYSTEM_INTERFACE_PROFILES, SYSTEM_INTERFACE_READINESS_PROFILES, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemApiInterfaceSchema, SystemEntrySchema, SystemIdSchema, SystemInterfaceKeySchema, SystemInterfaceLifecycleSchema, SystemInterfaceReadinessProfileSchema, SystemInterfaceRefSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, TopbarActionNodeSchema, TopbarSectionSchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
|
|
3584
|
+
export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, ClientProfileBrandingSchema, ClientProfileIdentitySchema, ClientProfileLinksSchema, ClientProfilePromptsSchema, ClientProfileSchema, ClientProfileSourceSchema, ClientProfileStatusSchema, ClientProfileWorkspaceSchema, ClientProfilesDomainSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OmTopologySystemInterfaceGrantMetadataSchema, OmTopologySystemInterfaceGrantSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, SYSTEM_INTERFACE_PROFILES, SYSTEM_INTERFACE_READINESS_PROFILES, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemApiInterfaceSchema, SystemEntrySchema, SystemIdSchema, SystemInterfaceKeySchema, SystemInterfaceLifecycleSchema, SystemInterfaceReadinessProfileSchema, SystemInterfaceRefSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, TopbarActionNodeSchema, TopbarSectionSchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getClientProfile, getClientProfileBySlug, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listClientProfiles, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
|
|
@@ -278,6 +278,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
|
|
|
278
278
|
action: "action";
|
|
279
279
|
ontology: "ontology";
|
|
280
280
|
role: "role";
|
|
281
|
+
client: "client";
|
|
281
282
|
stage: "stage";
|
|
282
283
|
goal: "goal";
|
|
283
284
|
"customer-segment": "customer-segment";
|
|
@@ -289,7 +290,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
|
|
|
289
290
|
nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
|
|
290
291
|
}, z.core.$strip>]>, z.ZodTransform<{
|
|
291
292
|
target: {
|
|
292
|
-
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
|
|
293
|
+
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
|
|
293
294
|
id: string;
|
|
294
295
|
};
|
|
295
296
|
nodeId: string;
|
|
@@ -297,7 +298,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
|
|
|
297
298
|
nodeId: string;
|
|
298
299
|
} | {
|
|
299
300
|
target: {
|
|
300
|
-
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
|
|
301
|
+
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
|
|
301
302
|
id: string;
|
|
302
303
|
};
|
|
303
304
|
}>>>>;
|
|
@@ -384,6 +385,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
384
385
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
385
386
|
lastModified: z.ZodString;
|
|
386
387
|
}, z.core.$strip>>;
|
|
388
|
+
clients: z.ZodOptional<z.ZodObject<{
|
|
389
|
+
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
390
|
+
lastModified: z.ZodString;
|
|
391
|
+
}, z.core.$strip>>;
|
|
387
392
|
customers: z.ZodOptional<z.ZodObject<{
|
|
388
393
|
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
389
394
|
lastModified: z.ZodString;
|
|
@@ -441,6 +446,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
441
446
|
version: 1;
|
|
442
447
|
lastModified: string;
|
|
443
448
|
};
|
|
449
|
+
clients: {
|
|
450
|
+
version: 1;
|
|
451
|
+
lastModified: string;
|
|
452
|
+
};
|
|
444
453
|
customers: {
|
|
445
454
|
version: 1;
|
|
446
455
|
lastModified: string;
|
|
@@ -498,6 +507,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
498
507
|
version: 1;
|
|
499
508
|
lastModified: string;
|
|
500
509
|
} | undefined;
|
|
510
|
+
clients?: {
|
|
511
|
+
version: 1;
|
|
512
|
+
lastModified: string;
|
|
513
|
+
} | undefined;
|
|
501
514
|
customers?: {
|
|
502
515
|
version: 1;
|
|
503
516
|
lastModified: string;
|
|
@@ -690,6 +703,56 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
690
703
|
shortName: z.ZodOptional<z.ZodString>;
|
|
691
704
|
description: z.ZodOptional<z.ZodString>;
|
|
692
705
|
}, z.core.$loose>>;
|
|
706
|
+
clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
707
|
+
id: z.ZodString;
|
|
708
|
+
slug: z.ZodString;
|
|
709
|
+
name: z.ZodString;
|
|
710
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
711
|
+
active: "active";
|
|
712
|
+
onboarding: "onboarding";
|
|
713
|
+
paused: "paused";
|
|
714
|
+
completed: "completed";
|
|
715
|
+
churned: "churned";
|
|
716
|
+
}>>;
|
|
717
|
+
source: z.ZodOptional<z.ZodString>;
|
|
718
|
+
identity: z.ZodDefault<z.ZodObject<{
|
|
719
|
+
organizationName: z.ZodOptional<z.ZodString>;
|
|
720
|
+
shortName: z.ZodOptional<z.ZodString>;
|
|
721
|
+
clientBrief: z.ZodDefault<z.ZodString>;
|
|
722
|
+
geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
723
|
+
timeZone: z.ZodDefault<z.ZodString>;
|
|
724
|
+
}, z.core.$loose>>;
|
|
725
|
+
branding: z.ZodDefault<z.ZodObject<{
|
|
726
|
+
voice: z.ZodOptional<z.ZodString>;
|
|
727
|
+
tagline: z.ZodOptional<z.ZodString>;
|
|
728
|
+
values: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
729
|
+
}, z.core.$loose>>;
|
|
730
|
+
workspace: z.ZodDefault<z.ZodObject<{
|
|
731
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
732
|
+
"external-project": "external-project";
|
|
733
|
+
"internal-project": "internal-project";
|
|
734
|
+
none: "none";
|
|
735
|
+
}>>;
|
|
736
|
+
owner: z.ZodOptional<z.ZodEnum<{
|
|
737
|
+
platform: "platform";
|
|
738
|
+
client: "client";
|
|
739
|
+
developer: "developer";
|
|
740
|
+
}>>;
|
|
741
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
742
|
+
workspacePath: z.ZodOptional<z.ZodString>;
|
|
743
|
+
}, z.core.$loose>>;
|
|
744
|
+
links: z.ZodDefault<z.ZodObject<{
|
|
745
|
+
projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
746
|
+
primaryCompanyId: z.ZodOptional<z.ZodString>;
|
|
747
|
+
primaryContactId: z.ZodOptional<z.ZodString>;
|
|
748
|
+
sourceDealId: z.ZodOptional<z.ZodString>;
|
|
749
|
+
}, z.core.$strip>>;
|
|
750
|
+
prompts: z.ZodDefault<z.ZodObject<{
|
|
751
|
+
defaultContext: z.ZodDefault<z.ZodString>;
|
|
752
|
+
}, z.core.$loose>>;
|
|
753
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
754
|
+
customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
755
|
+
}, z.core.$strict>>>>;
|
|
693
756
|
customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
694
757
|
id: z.ZodString;
|
|
695
758
|
order: z.ZodNumber;
|
|
@@ -1343,6 +1406,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
1343
1406
|
action: "action";
|
|
1344
1407
|
ontology: "ontology";
|
|
1345
1408
|
role: "role";
|
|
1409
|
+
client: "client";
|
|
1346
1410
|
stage: "stage";
|
|
1347
1411
|
goal: "goal";
|
|
1348
1412
|
"customer-segment": "customer-segment";
|
|
@@ -1354,7 +1418,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
1354
1418
|
nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
|
|
1355
1419
|
}, z.core.$strip>]>, z.ZodTransform<{
|
|
1356
1420
|
target: {
|
|
1357
|
-
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
|
|
1421
|
+
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
|
|
1358
1422
|
id: string;
|
|
1359
1423
|
};
|
|
1360
1424
|
nodeId: string;
|
|
@@ -1362,7 +1426,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
1362
1426
|
nodeId: string;
|
|
1363
1427
|
} | {
|
|
1364
1428
|
target: {
|
|
1365
|
-
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
|
|
1429
|
+
kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
|
|
1366
1430
|
id: string;
|
|
1367
1431
|
};
|
|
1368
1432
|
}>>>>;
|
|
@@ -1392,7 +1456,7 @@ type OrganizationModel = z.infer<typeof OrganizationModelSchema>;
|
|
|
1392
1456
|
*/
|
|
1393
1457
|
type RelationshipType = 'triggers' | 'uses' | 'approval';
|
|
1394
1458
|
|
|
1395
|
-
type OrganizationGraphNodeKind = 'organization' | 'system' | 'role' | 'action' | 'entity' | 'event' | 'policy' | 'stage' | 'resource' | 'knowledge' | 'customer-segment' | 'offering' | 'goal' | 'surface' | 'navigation-group' | 'ontology';
|
|
1459
|
+
type OrganizationGraphNodeKind = 'organization' | 'system' | 'client' | 'role' | 'action' | 'entity' | 'event' | 'policy' | 'stage' | 'resource' | 'knowledge' | 'customer-segment' | 'offering' | 'goal' | 'surface' | 'navigation-group' | 'ontology';
|
|
1396
1460
|
type OrganizationGraphEdgeKind = 'contains' | 'references' | 'maps_to' | 'uses' | 'governs' | 'links' | 'affects' | 'emits' | 'originates_from' | 'triggers' | 'approval' | 'applies_to' | 'effects' | 'actions' | 'reads' | 'writes' | 'uses_catalog';
|
|
1397
1461
|
|
|
1398
1462
|
interface OrganizationGraphNode {
|