@elevasis/core 0.3.0 → 0.5.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/index.js CHANGED
@@ -168,6 +168,15 @@ var DEFAULT_ORGANIZATION_MODEL_LEAD_GEN = {
168
168
  var PROJECTS_FEATURE_ID = "projects";
169
169
  var PROJECTS_INDEX_SURFACE_ID = "projects.index";
170
170
  var DELIVERY_PROJECTS_VIEW_CAPABILITY_ID = "delivery.projects.view";
171
+ var CRM_FEATURE_ID = "crm";
172
+ var LEAD_GEN_FEATURE_ID = "lead-gen";
173
+ var OPERATIONS_FEATURE_ID = "operations";
174
+ var MONITORING_FEATURE_ID = "monitoring";
175
+ var SETTINGS_FEATURE_ID = "settings";
176
+ var SEO_FEATURE_ID = "seo";
177
+ var CRM_PIPELINE_SURFACE_ID = "crm.pipeline";
178
+ var LEAD_GEN_LISTS_SURFACE_ID = "lead-gen.lists";
179
+ var OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID = "operations.organization-graph";
171
180
 
172
181
  // src/organization-model/domains/navigation.ts
173
182
  var SurfaceTypeSchema = z.enum(["page", "dashboard", "graph", "detail", "list", "settings"]);
@@ -177,6 +186,7 @@ var SurfaceDefinitionSchema = z.object({
177
186
  path: PathSchema,
178
187
  surfaceType: SurfaceTypeSchema,
179
188
  description: DescriptionSchema.optional(),
189
+ enabled: z.boolean().default(true),
180
190
  icon: IconNameSchema.optional(),
181
191
  featureId: ModelIdSchema.optional(),
182
192
  featureIds: ReferenceIdsSchema,
@@ -204,6 +214,7 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
204
214
  label: "Pipeline",
205
215
  path: "/crm/pipeline",
206
216
  surfaceType: "graph",
217
+ enabled: true,
207
218
  featureId: "crm",
208
219
  featureIds: ["crm"],
209
220
  entityIds: ["crm.deal"],
@@ -215,6 +226,7 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
215
226
  label: "Lists",
216
227
  path: "/lead-gen/lists",
217
228
  surfaceType: "list",
229
+ enabled: true,
218
230
  featureId: "lead-gen",
219
231
  featureIds: ["lead-gen"],
220
232
  entityIds: ["leadgen.list"],
@@ -226,6 +238,7 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
226
238
  label: "Projects",
227
239
  path: "/projects",
228
240
  surfaceType: "list",
241
+ enabled: true,
229
242
  featureId: PROJECTS_FEATURE_ID,
230
243
  featureIds: [PROJECTS_FEATURE_ID],
231
244
  entityIds: ["delivery.project"],
@@ -237,6 +250,7 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
237
250
  label: "Organization Graph",
238
251
  path: "/operations/organization-graph",
239
252
  surfaceType: "graph",
253
+ enabled: true,
240
254
  featureId: "operations",
241
255
  featureIds: ["operations"],
242
256
  entityIds: [],
@@ -248,11 +262,216 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
248
262
  label: "Command View",
249
263
  path: "/operations/command-view",
250
264
  surfaceType: "graph",
265
+ enabled: false,
251
266
  featureId: "operations",
252
267
  featureIds: ["operations"],
253
268
  entityIds: [],
254
269
  resourceIds: [],
255
270
  capabilityIds: ["operations.command-view"]
271
+ },
272
+ {
273
+ id: "operations.overview",
274
+ label: "Overview",
275
+ path: "/operations",
276
+ surfaceType: "dashboard",
277
+ enabled: true,
278
+ featureId: "operations",
279
+ featureIds: ["operations"],
280
+ entityIds: [],
281
+ resourceIds: [],
282
+ capabilityIds: []
283
+ },
284
+ {
285
+ id: "operations.resources",
286
+ label: "Resources",
287
+ path: "/operations/resources",
288
+ surfaceType: "list",
289
+ enabled: true,
290
+ featureId: "operations",
291
+ featureIds: ["operations"],
292
+ entityIds: [],
293
+ resourceIds: [],
294
+ capabilityIds: []
295
+ },
296
+ {
297
+ id: "operations.command-queue",
298
+ label: "Command Queue",
299
+ path: "/operations/command-queue",
300
+ surfaceType: "list",
301
+ enabled: true,
302
+ featureId: "operations",
303
+ featureIds: ["operations"],
304
+ entityIds: [],
305
+ resourceIds: [],
306
+ capabilityIds: []
307
+ },
308
+ {
309
+ id: "operations.sessions",
310
+ label: "Sessions",
311
+ path: "/operations/sessions",
312
+ surfaceType: "page",
313
+ enabled: false,
314
+ featureId: "operations",
315
+ featureIds: ["operations"],
316
+ entityIds: [],
317
+ resourceIds: [],
318
+ capabilityIds: []
319
+ },
320
+ {
321
+ id: "operations.task-scheduler",
322
+ label: "Task Scheduler",
323
+ path: "/operations/task-scheduler",
324
+ surfaceType: "page",
325
+ enabled: true,
326
+ featureId: "operations",
327
+ featureIds: ["operations"],
328
+ entityIds: [],
329
+ resourceIds: [],
330
+ capabilityIds: []
331
+ },
332
+ {
333
+ id: "monitoring.activity-log",
334
+ label: "Activity Log",
335
+ path: "/monitoring/activity-log",
336
+ surfaceType: "list",
337
+ enabled: true,
338
+ featureId: "monitoring",
339
+ featureIds: ["monitoring"],
340
+ entityIds: [],
341
+ resourceIds: [],
342
+ capabilityIds: []
343
+ },
344
+ {
345
+ id: "monitoring.execution-logs",
346
+ label: "Execution Logs",
347
+ path: "/monitoring/execution-logs",
348
+ surfaceType: "list",
349
+ enabled: true,
350
+ featureId: "monitoring",
351
+ featureIds: ["monitoring"],
352
+ entityIds: [],
353
+ resourceIds: [],
354
+ capabilityIds: []
355
+ },
356
+ {
357
+ id: "monitoring.execution-health",
358
+ label: "Execution Health",
359
+ path: "/monitoring/execution-health",
360
+ surfaceType: "dashboard",
361
+ enabled: true,
362
+ featureId: "monitoring",
363
+ featureIds: ["monitoring"],
364
+ entityIds: [],
365
+ resourceIds: [],
366
+ capabilityIds: []
367
+ },
368
+ {
369
+ id: "monitoring.cost-analytics",
370
+ label: "Cost Analytics",
371
+ path: "/monitoring/cost-analytics",
372
+ surfaceType: "dashboard",
373
+ enabled: false,
374
+ featureId: "monitoring",
375
+ featureIds: ["monitoring"],
376
+ entityIds: [],
377
+ resourceIds: [],
378
+ capabilityIds: []
379
+ },
380
+ {
381
+ id: "monitoring.notifications",
382
+ label: "Notifications",
383
+ path: "/monitoring/notifications",
384
+ surfaceType: "page",
385
+ enabled: true,
386
+ featureId: "monitoring",
387
+ featureIds: ["monitoring"],
388
+ entityIds: [],
389
+ resourceIds: [],
390
+ capabilityIds: []
391
+ },
392
+ {
393
+ id: "settings.account",
394
+ label: "Account",
395
+ path: "/settings/account",
396
+ surfaceType: "settings",
397
+ enabled: true,
398
+ featureId: "settings",
399
+ featureIds: ["settings"],
400
+ entityIds: [],
401
+ resourceIds: [],
402
+ capabilityIds: []
403
+ },
404
+ {
405
+ id: "settings.appearance",
406
+ label: "Appearance",
407
+ path: "/settings/appearance",
408
+ surfaceType: "settings",
409
+ enabled: true,
410
+ featureId: "settings",
411
+ featureIds: ["settings"],
412
+ entityIds: [],
413
+ resourceIds: [],
414
+ capabilityIds: []
415
+ },
416
+ {
417
+ id: "settings.organization",
418
+ label: "Organization",
419
+ path: "/settings/organization",
420
+ surfaceType: "settings",
421
+ enabled: true,
422
+ featureId: "settings",
423
+ featureIds: ["settings"],
424
+ entityIds: [],
425
+ resourceIds: [],
426
+ capabilityIds: []
427
+ },
428
+ {
429
+ id: "settings.credentials",
430
+ label: "Credentials",
431
+ path: "/settings/credentials",
432
+ surfaceType: "settings",
433
+ enabled: true,
434
+ featureId: "settings",
435
+ featureIds: ["settings"],
436
+ entityIds: [],
437
+ resourceIds: [],
438
+ capabilityIds: []
439
+ },
440
+ {
441
+ id: "settings.api-keys",
442
+ label: "API Keys",
443
+ path: "/settings/api-keys",
444
+ surfaceType: "settings",
445
+ enabled: true,
446
+ featureId: "settings",
447
+ featureIds: ["settings"],
448
+ entityIds: [],
449
+ resourceIds: [],
450
+ capabilityIds: []
451
+ },
452
+ {
453
+ id: "settings.webhooks",
454
+ label: "Webhooks",
455
+ path: "/settings/webhooks",
456
+ surfaceType: "settings",
457
+ enabled: true,
458
+ featureId: "settings",
459
+ featureIds: ["settings"],
460
+ entityIds: [],
461
+ resourceIds: [],
462
+ capabilityIds: []
463
+ },
464
+ {
465
+ id: "settings.deployments",
466
+ label: "Deployments",
467
+ path: "/settings/deployments",
468
+ surfaceType: "settings",
469
+ enabled: true,
470
+ featureId: "settings",
471
+ featureIds: ["settings"],
472
+ entityIds: [],
473
+ resourceIds: [],
474
+ capabilityIds: []
256
475
  }
257
476
  ],
258
477
  groups: [
@@ -266,7 +485,41 @@ var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
266
485
  id: "primary-operations",
267
486
  label: "Operations",
268
487
  placement: "primary",
269
- surfaceIds: ["operations.organization-graph", "operations.command-view"]
488
+ surfaceIds: [
489
+ "operations.organization-graph",
490
+ "operations.command-view",
491
+ "operations.overview",
492
+ "operations.resources",
493
+ "operations.command-queue",
494
+ "operations.sessions",
495
+ "operations.task-scheduler"
496
+ ]
497
+ },
498
+ {
499
+ id: "primary-monitoring",
500
+ label: "Monitoring",
501
+ placement: "primary",
502
+ surfaceIds: [
503
+ "monitoring.activity-log",
504
+ "monitoring.execution-logs",
505
+ "monitoring.execution-health",
506
+ "monitoring.cost-analytics",
507
+ "monitoring.notifications"
508
+ ]
509
+ },
510
+ {
511
+ id: "primary-settings",
512
+ label: "Settings",
513
+ placement: "bottom",
514
+ surfaceIds: [
515
+ "settings.account",
516
+ "settings.appearance",
517
+ "settings.organization",
518
+ "settings.credentials",
519
+ "settings.api-keys",
520
+ "settings.webhooks",
521
+ "settings.deployments"
522
+ ]
270
523
  }
271
524
  ]
272
525
  };
@@ -463,24 +716,24 @@ var DEFAULT_ORGANIZATION_MODEL = {
463
716
  version: 1,
464
717
  features: [
465
718
  {
466
- id: "crm",
719
+ id: CRM_FEATURE_ID,
467
720
  label: "CRM",
468
721
  description: "Relationship pipeline and deal management",
469
722
  enabled: true,
470
723
  color: "blue",
471
724
  entityIds: ["crm.deal"],
472
- surfaceIds: ["crm.pipeline"],
725
+ surfaceIds: [CRM_PIPELINE_SURFACE_ID],
473
726
  resourceIds: [],
474
727
  capabilityIds: ["crm.pipeline.manage"]
475
728
  },
476
729
  {
477
- id: "lead-gen",
730
+ id: LEAD_GEN_FEATURE_ID,
478
731
  label: "Lead Gen",
479
732
  description: "Prospecting, qualification, and outreach preparation",
480
733
  enabled: true,
481
734
  color: "cyan",
482
735
  entityIds: ["leadgen.list", "leadgen.company", "leadgen.contact"],
483
- surfaceIds: ["lead-gen.lists"],
736
+ surfaceIds: [LEAD_GEN_LISTS_SURFACE_ID],
484
737
  resourceIds: [],
485
738
  capabilityIds: ["leadgen.lists.manage"]
486
739
  },
@@ -496,36 +749,58 @@ var DEFAULT_ORGANIZATION_MODEL = {
496
749
  capabilityIds: [DELIVERY_PROJECTS_VIEW_CAPABILITY_ID]
497
750
  },
498
751
  {
499
- id: "operations",
752
+ id: OPERATIONS_FEATURE_ID,
500
753
  label: "Operations",
501
754
  description: "Operational resources, topology, and orchestration visibility",
502
755
  enabled: true,
503
756
  color: "violet",
504
757
  entityIds: [],
505
- surfaceIds: ["operations.organization-graph", "operations.command-view"],
758
+ surfaceIds: [
759
+ OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID,
760
+ "operations.command-view",
761
+ "operations.overview",
762
+ "operations.resources",
763
+ "operations.command-queue",
764
+ "operations.sessions",
765
+ "operations.task-scheduler"
766
+ ],
506
767
  resourceIds: [],
507
768
  capabilityIds: ["operations.organization-graph", "operations.command-view"]
508
769
  },
509
770
  {
510
- id: "monitoring",
771
+ id: MONITORING_FEATURE_ID,
511
772
  label: "Monitoring",
512
773
  enabled: true,
513
774
  entityIds: [],
514
- surfaceIds: [],
775
+ surfaceIds: [
776
+ "monitoring.activity-log",
777
+ "monitoring.execution-logs",
778
+ "monitoring.execution-health",
779
+ "monitoring.cost-analytics",
780
+ "monitoring.notifications"
781
+ ],
515
782
  resourceIds: [],
516
783
  capabilityIds: []
517
784
  },
518
785
  {
519
- id: "settings",
786
+ id: SETTINGS_FEATURE_ID,
520
787
  label: "Settings",
521
788
  enabled: true,
522
789
  entityIds: [],
523
- surfaceIds: [],
790
+ surfaceIds: [
791
+ "settings.account",
792
+ "settings.appearance",
793
+ "settings.organization",
794
+ "settings.credentials",
795
+ "settings.api-keys",
796
+ "settings.webhooks",
797
+ "settings.deployments"
798
+ ],
524
799
  resourceIds: [],
525
800
  capabilityIds: []
526
801
  },
527
802
  {
528
- id: "seo",
803
+ id: SEO_FEATURE_ID,
529
804
  label: "SEO",
530
805
  enabled: false,
531
806
  entityIds: [],
@@ -590,8 +865,8 @@ function resolveOrganizationModel(override) {
590
865
  }
591
866
 
592
867
  // src/organization-model/foundation.ts
593
- function createFoundationOrganizationModel(branding) {
594
- const canonical = resolveOrganizationModel({ branding });
868
+ function createFoundationOrganizationModel(override) {
869
+ const canonical = resolveOrganizationModel(override);
595
870
  function requireCoreSurface(surfaceId) {
596
871
  const surface = canonical.navigation.surfaces.find((candidate) => candidate.id === surfaceId);
597
872
  if (!surface) {
@@ -614,6 +889,7 @@ function createFoundationOrganizationModel(branding) {
614
889
  label: "Settings",
615
890
  path: "/settings/account",
616
891
  surfaceType: "settings",
892
+ enabled: true,
617
893
  icon: "settings",
618
894
  featureId: "settings",
619
895
  featureIds: ["settings"],
@@ -645,4 +921,4 @@ function createFoundationOrganizationModel(branding) {
645
921
  };
646
922
  }
647
923
 
648
- export { DEFAULT_ORGANIZATION_MODEL, DELIVERY_PROJECTS_VIEW_CAPABILITY_ID, FeatureSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, createFoundationOrganizationModel, defineOrganizationModel, resolveOrganizationModel };
924
+ export { CRM_FEATURE_ID, CRM_PIPELINE_SURFACE_ID, DEFAULT_ORGANIZATION_MODEL, DELIVERY_PROJECTS_VIEW_CAPABILITY_ID, FeatureSchema, LEAD_GEN_FEATURE_ID, LEAD_GEN_LISTS_SURFACE_ID, MONITORING_FEATURE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, SEO_FEATURE_ID, SETTINGS_FEATURE_ID, createFoundationOrganizationModel, defineOrganizationModel, resolveOrganizationModel };
@@ -32,13 +32,14 @@ declare const OrganizationModelSchema: z.ZodObject<{
32
32
  path: z.ZodString;
33
33
  surfaceType: z.ZodEnum<{
34
34
  list: "list";
35
+ settings: "settings";
35
36
  page: "page";
36
37
  dashboard: "dashboard";
37
38
  graph: "graph";
38
39
  detail: "detail";
39
- settings: "settings";
40
40
  }>;
41
41
  description: z.ZodOptional<z.ZodString>;
42
+ enabled: z.ZodDefault<z.ZodBoolean>;
42
43
  icon: z.ZodOptional<z.ZodString>;
43
44
  featureId: z.ZodOptional<z.ZodString>;
44
45
  featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -174,6 +175,15 @@ declare const FeatureSchema: z.ZodObject<{
174
175
  declare const PROJECTS_FEATURE_ID: "projects";
175
176
  declare const PROJECTS_INDEX_SURFACE_ID: "projects.index";
176
177
  declare const DELIVERY_PROJECTS_VIEW_CAPABILITY_ID: "delivery.projects.view";
178
+ declare const CRM_FEATURE_ID: "crm";
179
+ declare const LEAD_GEN_FEATURE_ID: "lead-gen";
180
+ declare const OPERATIONS_FEATURE_ID: "operations";
181
+ declare const MONITORING_FEATURE_ID: "monitoring";
182
+ declare const SETTINGS_FEATURE_ID: "settings";
183
+ declare const SEO_FEATURE_ID: "seo";
184
+ declare const CRM_PIPELINE_SURFACE_ID: "crm.pipeline";
185
+ declare const LEAD_GEN_LISTS_SURFACE_ID: "lead-gen.lists";
186
+ declare const OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID: "operations.organization-graph";
177
187
 
178
188
  declare const OrganizationModelBrandingSchema: z.ZodObject<{
179
189
  organizationName: z.ZodString;
@@ -273,13 +283,14 @@ declare const SurfaceDefinitionSchema: z.ZodObject<{
273
283
  path: z.ZodString;
274
284
  surfaceType: z.ZodEnum<{
275
285
  list: "list";
286
+ settings: "settings";
276
287
  page: "page";
277
288
  dashboard: "dashboard";
278
289
  graph: "graph";
279
290
  detail: "detail";
280
- settings: "settings";
281
291
  }>;
282
292
  description: z.ZodOptional<z.ZodString>;
293
+ enabled: z.ZodDefault<z.ZodBoolean>;
283
294
  icon: z.ZodOptional<z.ZodString>;
284
295
  featureId: z.ZodOptional<z.ZodString>;
285
296
  featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -296,13 +307,14 @@ declare const OrganizationModelNavigationSchema: z.ZodObject<{
296
307
  path: z.ZodString;
297
308
  surfaceType: z.ZodEnum<{
298
309
  list: "list";
310
+ settings: "settings";
299
311
  page: "page";
300
312
  dashboard: "dashboard";
301
313
  graph: "graph";
302
314
  detail: "detail";
303
- settings: "settings";
304
315
  }>;
305
316
  description: z.ZodOptional<z.ZodString>;
317
+ enabled: z.ZodDefault<z.ZodBoolean>;
306
318
  icon: z.ZodOptional<z.ZodString>;
307
319
  featureId: z.ZodOptional<z.ZodString>;
308
320
  featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -380,7 +392,7 @@ interface FoundationBranding {
380
392
  productName: string;
381
393
  shortName: string;
382
394
  }
383
- declare function createFoundationOrganizationModel(branding: FoundationBranding): {
395
+ declare function createFoundationOrganizationModel(override: DeepPartial<OrganizationModel>): {
384
396
  canonical: OrganizationModel;
385
397
  model: FoundationOrganizationModel;
386
398
  homeLabel: string;
@@ -388,5 +400,5 @@ declare function createFoundationOrganizationModel(branding: FoundationBranding)
388
400
  getOrganizationSurface: (surfaceId: string) => FoundationNavigationSurface | undefined;
389
401
  };
390
402
 
391
- export { DEFAULT_ORGANIZATION_MODEL, DELIVERY_PROJECTS_VIEW_CAPABILITY_ID, FeatureSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, createFoundationOrganizationModel, defineOrganizationModel, resolveOrganizationModel };
403
+ export { CRM_FEATURE_ID, CRM_PIPELINE_SURFACE_ID, DEFAULT_ORGANIZATION_MODEL, DELIVERY_PROJECTS_VIEW_CAPABILITY_ID, FeatureSchema, LEAD_GEN_FEATURE_ID, LEAD_GEN_LISTS_SURFACE_ID, MONITORING_FEATURE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, SEO_FEATURE_ID, SETTINGS_FEATURE_ID, createFoundationOrganizationModel, defineOrganizationModel, resolveOrganizationModel };
392
404
  export type { DeepPartial, FoundationBranding, FoundationNavigationSurface, FoundationOrganizationModel, FoundationSurfaceIcon, FoundationSurfaceType, OrganizationModel, OrganizationModelBranding, OrganizationModelCrm, OrganizationModelDelivery, OrganizationModelFeature, OrganizationModelLeadGen, OrganizationModelNavigation, OrganizationModelResourceMapping, OrganizationModelSurface };