@elevasis/core 0.36.0 → 0.38.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.
Files changed (31) hide show
  1. package/dist/auth/index.d.ts +84 -1
  2. package/dist/index.d.ts +359 -5
  3. package/dist/index.js +41 -8
  4. package/dist/knowledge/index.d.ts +86 -1
  5. package/dist/organization-model/index.d.ts +359 -5
  6. package/dist/organization-model/index.js +41 -8
  7. package/dist/test-utils/index.d.ts +84 -1
  8. package/dist/test-utils/index.js +38 -6
  9. package/package.json +1 -1
  10. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +423 -338
  11. package/src/_gen/__tests__/__snapshots__/system-interface-capabilities.md.snap +47 -0
  12. package/src/_gen/__tests__/scaffold-contracts.test.ts +47 -8
  13. package/src/business/acquisition/api-schemas.test.ts +13 -1
  14. package/src/business/acquisition/ontology-validation.ts +13 -22
  15. package/src/organization-model/__tests__/domains/navigation-topbar.test.ts +282 -0
  16. package/src/organization-model/__tests__/domains/systems.test.ts +34 -1
  17. package/src/organization-model/__tests__/schema.test.ts +47 -0
  18. package/src/organization-model/defaults.ts +2 -1
  19. package/src/organization-model/domains/navigation.ts +176 -139
  20. package/src/organization-model/domains/systems.ts +22 -9
  21. package/src/organization-model/icons.ts +1 -0
  22. package/src/organization-model/published.ts +8 -6
  23. package/src/organization-model/types.ts +5 -1
  24. package/src/platform/constants/versions.ts +1 -1
  25. package/src/platform/registry/__tests__/validation.test.ts +1404 -1318
  26. package/src/platform/registry/index.ts +90 -88
  27. package/src/platform/registry/types.ts +443 -425
  28. package/src/platform/registry/validation.ts +60 -1
  29. package/src/reference/_generated/contracts.md +423 -338
  30. package/src/reference/_generated/system-interface-capabilities.md +47 -0
  31. package/src/reference/glossary.md +14 -2
@@ -3765,7 +3765,11 @@ declare const SystemApiInterfaceSchema: z.ZodObject<{
3765
3765
  archived: "archived";
3766
3766
  disabled: "disabled";
3767
3767
  }>>;
3768
- readinessProfile: z.ZodOptional<z.ZodString>;
3768
+ readinessProfile: z.ZodOptional<z.ZodEnum<{
3769
+ "sales.lead-gen.api": "sales.lead-gen.api";
3770
+ "sales.crm.api": "sales.crm.api";
3771
+ "sales.lead-gen.crm-handoff": "sales.lead-gen.crm-handoff";
3772
+ }>>;
3769
3773
  resourceIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
3770
3774
  }, z.core.$strict>;
3771
3775
  type JsonPrimitive = string | number | boolean | null;
@@ -4046,6 +4050,84 @@ declare const OrganizationModelSchema: z.ZodObject<{
4046
4050
  primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4047
4051
  bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4048
4052
  }, z.core.$strip>>;
4053
+ topbar: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4054
+ id: z.ZodString;
4055
+ label: z.ZodString;
4056
+ tooltip: z.ZodOptional<z.ZodString>;
4057
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
4058
+ message: "message";
4059
+ error: "error";
4060
+ agent: "agent";
4061
+ workflow: "workflow";
4062
+ "google-sheets": "google-sheets";
4063
+ dashboard: "dashboard";
4064
+ calendar: "calendar";
4065
+ sales: "sales";
4066
+ crm: "crm";
4067
+ "lead-gen": "lead-gen";
4068
+ projects: "projects";
4069
+ clients: "clients";
4070
+ operations: "operations";
4071
+ monitoring: "monitoring";
4072
+ knowledge: "knowledge";
4073
+ settings: "settings";
4074
+ admin: "admin";
4075
+ archive: "archive";
4076
+ business: "business";
4077
+ finance: "finance";
4078
+ platform: "platform";
4079
+ seo: "seo";
4080
+ playbook: "playbook";
4081
+ strategy: "strategy";
4082
+ reference: "reference";
4083
+ integration: "integration";
4084
+ database: "database";
4085
+ user: "user";
4086
+ team: "team";
4087
+ gmail: "gmail";
4088
+ attio: "attio";
4089
+ overview: "overview";
4090
+ "command-view": "command-view";
4091
+ "command-queue": "command-queue";
4092
+ pipeline: "pipeline";
4093
+ lists: "lists";
4094
+ resources: "resources";
4095
+ approve: "approve";
4096
+ reject: "reject";
4097
+ retry: "retry";
4098
+ edit: "edit";
4099
+ view: "view";
4100
+ launch: "launch";
4101
+ "message-plus": "message-plus";
4102
+ escalate: "escalate";
4103
+ promote: "promote";
4104
+ submit: "submit";
4105
+ email: "email";
4106
+ success: "success";
4107
+ warning: "warning";
4108
+ info: "info";
4109
+ pending: "pending";
4110
+ bolt: "bolt";
4111
+ building: "building";
4112
+ briefcase: "briefcase";
4113
+ apps: "apps";
4114
+ graph: "graph";
4115
+ shield: "shield";
4116
+ users: "users";
4117
+ "chart-bar": "chart-bar";
4118
+ search: "search";
4119
+ }>, z.ZodString]>>;
4120
+ order: z.ZodOptional<z.ZodNumber>;
4121
+ enabled: z.ZodDefault<z.ZodBoolean>;
4122
+ devOnly: z.ZodOptional<z.ZodBoolean>;
4123
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
4124
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
4125
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4126
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4127
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4128
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4129
+ }, z.core.$strip>>>;
4130
+ }, z.core.$strip>>>;
4049
4131
  }, z.core.$strip>>;
4050
4132
  identity: z.ZodDefault<z.ZodObject<{
4051
4133
  mission: z.ZodDefault<z.ZodString>;
@@ -4714,6 +4796,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
4714
4796
  edit: "edit";
4715
4797
  view: "view";
4716
4798
  launch: "launch";
4799
+ "message-plus": "message-plus";
4717
4800
  escalate: "escalate";
4718
4801
  promote: "promote";
4719
4802
  submit: "submit";
@@ -19817,6 +19817,7 @@ var ORGANIZATION_MODEL_ICON_TOKENS = [
19817
19817
  "view",
19818
19818
  "launch",
19819
19819
  "message",
19820
+ "message-plus",
19820
19821
  "escalate",
19821
19822
  "promote",
19822
19823
  "submit",
@@ -20001,9 +20002,22 @@ var SidebarNavigationSchema = z.object({
20001
20002
  primary: SidebarSectionSchema,
20002
20003
  bottom: SidebarSectionSchema
20003
20004
  }).default({ primary: {}, bottom: {} });
20005
+ var TopbarActionNodeSchema = z.object({
20006
+ id: ModelIdSchema,
20007
+ label: LabelSchema,
20008
+ tooltip: DescriptionSchema.optional(),
20009
+ icon: IconNameSchema.optional(),
20010
+ order: z.number().int().optional(),
20011
+ enabled: z.boolean().default(true),
20012
+ devOnly: z.boolean().optional(),
20013
+ requiresAdmin: z.boolean().optional(),
20014
+ targets: SidebarSurfaceTargetsSchema.optional()
20015
+ });
20016
+ var TopbarSectionSchema = z.record(z.string(), TopbarActionNodeSchema).default({});
20004
20017
  var OrganizationModelNavigationSchema = z.object({
20005
- sidebar: SidebarNavigationSchema
20006
- }).default({ sidebar: { primary: {}, bottom: {} } });
20018
+ sidebar: SidebarNavigationSchema,
20019
+ topbar: TopbarSectionSchema
20020
+ }).default({ sidebar: { primary: {}, bottom: {} }, topbar: {} });
20007
20021
  z.object({
20008
20022
  id: ModelIdSchema,
20009
20023
  label: LabelSchema,
@@ -20320,10 +20334,27 @@ var SystemUiSchema = z.object({
20320
20334
  });
20321
20335
  var SystemInterfaceKeySchema = ModelIdSchema;
20322
20336
  var SystemInterfaceLifecycleSchema = z.enum(["draft", "active", "disabled", "deprecated", "archived"]).meta({ label: "System interface lifecycle", color: "teal" });
20323
- var SystemInterfaceReadinessProfileSchema = z.string().trim().min(1).max(200).regex(
20324
- /^[a-z0-9][a-z0-9-]*(?:\.[a-z0-9][a-z0-9-]*)*(?:\.[a-z0-9][a-z0-9-]*)?$/,
20325
- 'Readiness profiles must use dotted lowercase identifiers (e.g. "sales.lead-gen.api")'
20337
+ var SYSTEM_INTERFACE_PROFILES = [
20338
+ {
20339
+ systemPath: "sales.lead-gen",
20340
+ interfaceKey: "api",
20341
+ readinessProfile: "sales.lead-gen.api"
20342
+ },
20343
+ {
20344
+ systemPath: "sales.crm",
20345
+ interfaceKey: "api",
20346
+ readinessProfile: "sales.crm.api"
20347
+ },
20348
+ {
20349
+ systemPath: "sales.lead-gen",
20350
+ interfaceKey: "crm-handoff",
20351
+ readinessProfile: "sales.lead-gen.crm-handoff"
20352
+ }
20353
+ ];
20354
+ var SYSTEM_INTERFACE_READINESS_PROFILES = SYSTEM_INTERFACE_PROFILES.map(
20355
+ (profile) => profile.readinessProfile
20326
20356
  );
20357
+ var SystemInterfaceReadinessProfileSchema = z.enum(SYSTEM_INTERFACE_READINESS_PROFILES);
20327
20358
  var SystemInterfaceResourceScopeSchema = z.array(ModelIdSchema).default([]);
20328
20359
  var SystemApiInterfaceSchema = z.object({
20329
20360
  lifecycle: SystemInterfaceLifecycleSchema.default("active"),
@@ -21608,7 +21639,8 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
21608
21639
  sidebar: {
21609
21640
  primary: {},
21610
21641
  bottom: {}
21611
- }
21642
+ },
21643
+ topbar: {}
21612
21644
  };
21613
21645
  var DEFAULT_ORGANIZATION_MODEL = {
21614
21646
  version: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/core",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "license": "MIT",
5
5
  "description": "Minimal shared constants across Elevasis monorepo",
6
6
  "sideEffects": false,