@elevasis/ui 2.17.2 → 2.19.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 (63) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/app/index.js +5 -5
  3. package/dist/charts/index.js +3 -3
  4. package/dist/chunk-3JCMO7SD.js +14 -0
  5. package/dist/{chunk-TP5NMF6K.js → chunk-46Z2VHY3.js} +4 -4
  6. package/dist/{chunk-FNWWVX5N.js → chunk-5SCVXZPM.js} +358 -188
  7. package/dist/{chunk-TTP62HWW.js → chunk-BHR7IV72.js} +10 -15
  8. package/dist/{chunk-MJ6YV2B5.js → chunk-CTTY6FUT.js} +2 -2
  9. package/dist/{chunk-P3TFNFZS.js → chunk-EUWBY43Z.js} +2 -2
  10. package/dist/{chunk-MDO4UCEJ.js → chunk-IBOX2M24.js} +47 -82
  11. package/dist/{chunk-HH3RNG2O.js → chunk-JEQM67SO.js} +307 -173
  12. package/dist/{chunk-2TDZBYXI.js → chunk-LR5CRY5A.js} +1 -1
  13. package/dist/{chunk-JU6UB4YA.js → chunk-LVCJ2H2T.js} +4 -4
  14. package/dist/{chunk-GRGRBWIO.js → chunk-M7W7CGPL.js} +1 -1
  15. package/dist/{chunk-34NQLV2W.js → chunk-MJAKU2WA.js} +3 -3
  16. package/dist/{chunk-OCCZRPER.js → chunk-Q4QJOSVS.js} +1 -1
  17. package/dist/{chunk-R73EHHPN.js → chunk-Q5HC6ENG.js} +18 -2
  18. package/dist/{chunk-VDM6DQES.js → chunk-R7OJCNL3.js} +1 -1
  19. package/dist/{chunk-6RWMRQN5.js → chunk-TIIPYB2Z.js} +1 -1
  20. package/dist/{chunk-ABUDMATM.js → chunk-TKEKYPZA.js} +6 -6
  21. package/dist/{chunk-R7GKX4HW.js → chunk-UU6PJ4EJ.js} +192 -82
  22. package/dist/{chunk-7L42RRHZ.js → chunk-Y7TDUZEH.js} +221 -514
  23. package/dist/{chunk-7GCWOUFT.js → chunk-YVAXWM3W.js} +73 -121
  24. package/dist/components/index.d.ts +219 -2810
  25. package/dist/components/index.js +41 -27
  26. package/dist/features/crm/index.d.ts +54 -53
  27. package/dist/features/crm/index.js +11 -11
  28. package/dist/features/dashboard/index.js +12 -12
  29. package/dist/features/delivery/index.d.ts +2642 -2605
  30. package/dist/features/delivery/index.js +11 -11
  31. package/dist/features/lead-gen/index.d.ts +152 -16
  32. package/dist/features/lead-gen/index.js +11 -22
  33. package/dist/features/monitoring/index.js +13 -13
  34. package/dist/features/monitoring/requests/index.d.ts +38 -27
  35. package/dist/features/monitoring/requests/index.js +212 -106
  36. package/dist/features/operations/index.d.ts +9 -26
  37. package/dist/features/operations/index.js +15 -15
  38. package/dist/features/settings/index.d.ts +36 -37
  39. package/dist/features/settings/index.js +12 -12
  40. package/dist/hooks/delivery/index.d.ts +2712 -2699
  41. package/dist/hooks/delivery/index.js +2 -2
  42. package/dist/hooks/index.d.ts +1997 -4627
  43. package/dist/hooks/index.js +10 -10
  44. package/dist/hooks/published.d.ts +1997 -4627
  45. package/dist/hooks/published.js +10 -10
  46. package/dist/index.d.ts +1124 -3673
  47. package/dist/index.js +11 -11
  48. package/dist/layout/index.d.ts +14 -2
  49. package/dist/layout/index.js +1 -1
  50. package/dist/provider/index.d.ts +320 -249
  51. package/dist/provider/index.js +8 -8
  52. package/dist/provider/published.d.ts +320 -249
  53. package/dist/provider/published.js +5 -5
  54. package/dist/sse/index.d.ts +1 -6
  55. package/dist/theme/index.js +2 -2
  56. package/dist/types/index.d.ts +1608 -2487
  57. package/dist/utils/index.d.ts +32 -1
  58. package/dist/utils/index.js +1 -1
  59. package/dist/zustand/index.d.ts +4 -8
  60. package/dist/zustand/index.js +2 -2
  61. package/package.json +4 -4
  62. package/dist/chunk-ADSSLKKP.js +0 -10
  63. /package/dist/{chunk-GCBWGGI6.js → chunk-OD7GWIZS.js} +0 -0
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode, ComponentType } from 'react';
3
3
  import { QueryClient } from '@tanstack/react-query';
4
4
  import { z } from 'zod';
5
+ import { EventSourceMessage } from '@microsoft/fetch-event-source';
5
6
 
6
7
  /** Framework-agnostic theme overrides bundled with a preset (fonts, radius, component styles). */
7
8
  interface FrameworkThemeOverrides {
@@ -277,257 +278,327 @@ declare function ElevasisCoreProvider({ auth, queryClient, apiUrl, onError, noti
277
278
  */
278
279
  type TimeRange = '1h' | '24h' | '7d' | '30d';
279
280
 
280
- declare const SurfaceDefinitionSchema = z.object({
281
- id: ModelIdSchema,
282
- label: LabelSchema,
283
- path: PathSchema,
284
- surfaceType: SurfaceTypeSchema,
285
- description: DescriptionSchema.optional(),
286
- enabled: z.boolean().default(true),
287
- icon: IconNameSchema.optional(),
288
- featureId: ModelIdSchema.optional(),
289
- featureIds: ReferenceIdsSchema,
290
- entityIds: ReferenceIdsSchema,
291
- resourceIds: ReferenceIdsSchema,
292
- capabilityIds: ReferenceIdsSchema,
293
- parentId: ModelIdSchema.optional()
294
- })
281
+ declare const OrganizationModelSchema: z.ZodObject<{
282
+ version: z.ZodDefault<z.ZodLiteral<1>>;
283
+ features: z.ZodDefault<z.ZodArray<z.ZodObject<{
284
+ id: z.ZodString;
285
+ label: z.ZodString;
286
+ description: z.ZodOptional<z.ZodString>;
287
+ enabled: z.ZodDefault<z.ZodBoolean>;
288
+ color: z.ZodOptional<z.ZodString>;
289
+ icon: z.ZodOptional<z.ZodString>;
290
+ entityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
291
+ surfaceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
292
+ resourceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
293
+ capabilityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
294
+ }, z.core.$strip>>>;
295
+ branding: z.ZodObject<{
296
+ organizationName: z.ZodString;
297
+ productName: z.ZodString;
298
+ shortName: z.ZodString;
299
+ description: z.ZodOptional<z.ZodString>;
300
+ logos: z.ZodDefault<z.ZodObject<{
301
+ light: z.ZodOptional<z.ZodString>;
302
+ dark: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>>;
304
+ }, z.core.$strip>;
305
+ navigation: z.ZodObject<{
306
+ defaultSurfaceId: z.ZodOptional<z.ZodString>;
307
+ surfaces: z.ZodDefault<z.ZodArray<z.ZodObject<{
308
+ id: z.ZodString;
309
+ label: z.ZodString;
310
+ path: z.ZodString;
311
+ surfaceType: z.ZodEnum<{
312
+ list: "list";
313
+ settings: "settings";
314
+ page: "page";
315
+ dashboard: "dashboard";
316
+ graph: "graph";
317
+ detail: "detail";
318
+ }>;
319
+ description: z.ZodOptional<z.ZodString>;
320
+ enabled: z.ZodDefault<z.ZodBoolean>;
321
+ icon: z.ZodOptional<z.ZodString>;
322
+ featureId: z.ZodOptional<z.ZodString>;
323
+ featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
324
+ entityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
325
+ resourceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
326
+ capabilityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
327
+ parentId: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strip>>>;
329
+ groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
330
+ id: z.ZodString;
331
+ label: z.ZodString;
332
+ placement: z.ZodString;
333
+ surfaceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
334
+ }, z.core.$strip>>>;
335
+ }, z.core.$strip>;
336
+ sales: z.ZodObject<{
337
+ entityId: z.ZodString;
338
+ defaultPipelineId: z.ZodString;
339
+ pipelines: z.ZodArray<z.ZodObject<{
340
+ id: z.ZodString;
341
+ label: z.ZodString;
342
+ description: z.ZodOptional<z.ZodString>;
343
+ entityId: z.ZodString;
344
+ stages: z.ZodArray<z.ZodObject<{
345
+ label: z.ZodString;
346
+ description: z.ZodOptional<z.ZodString>;
347
+ color: z.ZodOptional<z.ZodString>;
348
+ icon: z.ZodOptional<z.ZodString>;
349
+ id: z.ZodString;
350
+ order: z.ZodNumber;
351
+ semanticClass: z.ZodEnum<{
352
+ open: "open";
353
+ active: "active";
354
+ closed_won: "closed_won";
355
+ closed_lost: "closed_lost";
356
+ nurturing: "nurturing";
357
+ }>;
358
+ surfaceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
359
+ resourceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
360
+ }, z.core.$strip>>;
361
+ }, z.core.$strip>>;
362
+ }, z.core.$strip>;
363
+ prospecting: z.ZodObject<{
364
+ listEntityId: z.ZodString;
365
+ companyEntityId: z.ZodString;
366
+ contactEntityId: z.ZodString;
367
+ description: z.ZodOptional<z.ZodString>;
368
+ companyStages: z.ZodArray<z.ZodObject<{
369
+ label: z.ZodString;
370
+ description: z.ZodOptional<z.ZodString>;
371
+ color: z.ZodOptional<z.ZodString>;
372
+ icon: z.ZodOptional<z.ZodString>;
373
+ id: z.ZodString;
374
+ order: z.ZodNumber;
375
+ }, z.core.$strip>>;
376
+ contactStages: z.ZodArray<z.ZodObject<{
377
+ label: z.ZodString;
378
+ description: z.ZodOptional<z.ZodString>;
379
+ color: z.ZodOptional<z.ZodString>;
380
+ icon: z.ZodOptional<z.ZodString>;
381
+ id: z.ZodString;
382
+ order: z.ZodNumber;
383
+ }, z.core.$strip>>;
384
+ }, z.core.$strip>;
385
+ projects: z.ZodObject<{
386
+ projectEntityId: z.ZodString;
387
+ milestoneEntityId: z.ZodString;
388
+ taskEntityId: z.ZodString;
389
+ projectStatuses: z.ZodArray<z.ZodObject<{
390
+ label: z.ZodString;
391
+ description: z.ZodOptional<z.ZodString>;
392
+ color: z.ZodOptional<z.ZodString>;
393
+ icon: z.ZodOptional<z.ZodString>;
394
+ id: z.ZodString;
395
+ order: z.ZodNumber;
396
+ }, z.core.$strip>>;
397
+ milestoneStatuses: z.ZodArray<z.ZodObject<{
398
+ label: z.ZodString;
399
+ description: z.ZodOptional<z.ZodString>;
400
+ color: z.ZodOptional<z.ZodString>;
401
+ icon: z.ZodOptional<z.ZodString>;
402
+ id: z.ZodString;
403
+ order: z.ZodNumber;
404
+ }, z.core.$strip>>;
405
+ taskStatuses: z.ZodArray<z.ZodObject<{
406
+ label: z.ZodString;
407
+ description: z.ZodOptional<z.ZodString>;
408
+ color: z.ZodOptional<z.ZodString>;
409
+ icon: z.ZodOptional<z.ZodString>;
410
+ id: z.ZodString;
411
+ order: z.ZodNumber;
412
+ }, z.core.$strip>>;
413
+ }, z.core.$strip>;
414
+ identity: z.ZodDefault<z.ZodObject<{
415
+ mission: z.ZodDefault<z.ZodString>;
416
+ vision: z.ZodDefault<z.ZodString>;
417
+ legalName: z.ZodDefault<z.ZodString>;
418
+ entityType: z.ZodDefault<z.ZodString>;
419
+ jurisdiction: z.ZodDefault<z.ZodString>;
420
+ industryCategory: z.ZodDefault<z.ZodString>;
421
+ geographicFocus: z.ZodDefault<z.ZodString>;
422
+ timeZone: z.ZodDefault<z.ZodString>;
423
+ businessHours: z.ZodDefault<z.ZodObject<{
424
+ monday: z.ZodOptional<z.ZodObject<{
425
+ open: z.ZodString;
426
+ close: z.ZodString;
427
+ }, z.core.$strip>>;
428
+ tuesday: z.ZodOptional<z.ZodObject<{
429
+ open: z.ZodString;
430
+ close: z.ZodString;
431
+ }, z.core.$strip>>;
432
+ wednesday: z.ZodOptional<z.ZodObject<{
433
+ open: z.ZodString;
434
+ close: z.ZodString;
435
+ }, z.core.$strip>>;
436
+ thursday: z.ZodOptional<z.ZodObject<{
437
+ open: z.ZodString;
438
+ close: z.ZodString;
439
+ }, z.core.$strip>>;
440
+ friday: z.ZodOptional<z.ZodObject<{
441
+ open: z.ZodString;
442
+ close: z.ZodString;
443
+ }, z.core.$strip>>;
444
+ saturday: z.ZodOptional<z.ZodObject<{
445
+ open: z.ZodString;
446
+ close: z.ZodString;
447
+ }, z.core.$strip>>;
448
+ sunday: z.ZodOptional<z.ZodObject<{
449
+ open: z.ZodString;
450
+ close: z.ZodString;
451
+ }, z.core.$strip>>;
452
+ }, z.core.$strip>>;
453
+ clientBrief: z.ZodDefault<z.ZodString>;
454
+ }, z.core.$strip>>;
455
+ customers: z.ZodDefault<z.ZodObject<{
456
+ segments: z.ZodDefault<z.ZodArray<z.ZodObject<{
457
+ id: z.ZodString;
458
+ name: z.ZodDefault<z.ZodString>;
459
+ description: z.ZodDefault<z.ZodString>;
460
+ jobsToBeDone: z.ZodDefault<z.ZodString>;
461
+ pains: z.ZodDefault<z.ZodArray<z.ZodString>>;
462
+ gains: z.ZodDefault<z.ZodArray<z.ZodString>>;
463
+ firmographics: z.ZodDefault<z.ZodObject<{
464
+ industry: z.ZodOptional<z.ZodString>;
465
+ companySize: z.ZodOptional<z.ZodString>;
466
+ region: z.ZodOptional<z.ZodString>;
467
+ }, z.core.$strip>>;
468
+ valueProp: z.ZodDefault<z.ZodString>;
469
+ }, z.core.$strip>>>;
470
+ }, z.core.$strip>>;
471
+ offerings: z.ZodDefault<z.ZodObject<{
472
+ products: z.ZodDefault<z.ZodArray<z.ZodObject<{
473
+ id: z.ZodString;
474
+ name: z.ZodDefault<z.ZodString>;
475
+ description: z.ZodDefault<z.ZodString>;
476
+ pricingModel: z.ZodDefault<z.ZodEnum<{
477
+ custom: "custom";
478
+ "one-time": "one-time";
479
+ subscription: "subscription";
480
+ "usage-based": "usage-based";
481
+ }>>;
482
+ price: z.ZodDefault<z.ZodNumber>;
483
+ currency: z.ZodDefault<z.ZodString>;
484
+ targetSegmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
485
+ deliveryFeatureId: z.ZodOptional<z.ZodString>;
486
+ }, z.core.$strip>>>;
487
+ }, z.core.$strip>>;
488
+ roles: z.ZodDefault<z.ZodObject<{
489
+ roles: z.ZodDefault<z.ZodArray<z.ZodObject<{
490
+ id: z.ZodString;
491
+ title: z.ZodString;
492
+ responsibilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
493
+ reportsToId: z.ZodOptional<z.ZodString>;
494
+ heldBy: z.ZodOptional<z.ZodString>;
495
+ }, z.core.$strip>>>;
496
+ }, z.core.$strip>>;
497
+ goals: z.ZodDefault<z.ZodObject<{
498
+ objectives: z.ZodDefault<z.ZodArray<z.ZodObject<{
499
+ id: z.ZodString;
500
+ description: z.ZodString;
501
+ periodStart: z.ZodString;
502
+ periodEnd: z.ZodString;
503
+ keyResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
504
+ id: z.ZodString;
505
+ description: z.ZodString;
506
+ targetMetric: z.ZodString;
507
+ currentValue: z.ZodDefault<z.ZodNumber>;
508
+ targetValue: z.ZodOptional<z.ZodNumber>;
509
+ }, z.core.$strip>>>;
510
+ }, z.core.$strip>>>;
511
+ }, z.core.$strip>>;
512
+ statuses: z.ZodDefault<z.ZodObject<{
513
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
514
+ id: z.ZodString;
515
+ label: z.ZodString;
516
+ semanticClass: z.ZodEnum<{
517
+ execution: "execution";
518
+ schedule: "schedule";
519
+ queue: "queue";
520
+ "delivery.project": "delivery.project";
521
+ "delivery.milestone": "delivery.milestone";
522
+ "delivery.task": "delivery.task";
523
+ "schedule.run": "schedule.run";
524
+ request: "request";
525
+ }>;
526
+ category: z.ZodOptional<z.ZodString>;
527
+ }, z.core.$strip>>>;
528
+ }, z.core.$strip>>;
529
+ operations: z.ZodDefault<z.ZodObject<{
530
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
531
+ id: z.ZodString;
532
+ label: z.ZodString;
533
+ semanticClass: z.ZodEnum<{
534
+ sessions: "sessions";
535
+ notifications: "notifications";
536
+ schedules: "schedules";
537
+ executions: "executions";
538
+ queue: "queue";
539
+ }>;
540
+ featureId: z.ZodOptional<z.ZodString>;
541
+ supportedStatusSemanticClass: z.ZodOptional<z.ZodArray<z.ZodString>>;
542
+ }, z.core.$strip>>>;
543
+ }, z.core.$strip>>;
544
+ resourceMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
545
+ label: z.ZodString;
546
+ description: z.ZodOptional<z.ZodString>;
547
+ color: z.ZodOptional<z.ZodString>;
548
+ icon: z.ZodOptional<z.ZodString>;
549
+ id: z.ZodString;
550
+ resourceId: z.ZodString;
551
+ resourceType: z.ZodEnum<{
552
+ agent: "agent";
553
+ workflow: "workflow";
554
+ trigger: "trigger";
555
+ integration: "integration";
556
+ external: "external";
557
+ human_checkpoint: "human_checkpoint";
558
+ }>;
559
+ featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
560
+ entityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
561
+ surfaceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
562
+ capabilityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
563
+ techStack: z.ZodOptional<z.ZodObject<{
564
+ platform: z.ZodString;
565
+ purpose: z.ZodString;
566
+ credentialStatus: z.ZodEnum<{
567
+ pending: "pending";
568
+ configured: "configured";
569
+ expired: "expired";
570
+ missing: "missing";
571
+ }>;
572
+ isSystemOfRecord: z.ZodDefault<z.ZodBoolean>;
573
+ }, z.core.$strip>>;
574
+ }, z.core.$strip>>>;
575
+ }, z.core.$strip>;
295
576
 
296
- declare const OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ctx) => {
297
- const featuresById = collectIds(model.features, ctx, ['features'], 'Feature')
298
- const surfacesById = collectIds(model.navigation.surfaces, ctx, ['navigation', 'surfaces'], 'Surface')
299
- collectIds(model.navigation.groups, ctx, ['navigation', 'groups'], 'Navigation group')
300
- collectIds(model.resourceMappings, ctx, ['resourceMappings'], 'Resource mapping')
301
-
302
- const resourceMappingsByResourceId = new Map<string, (typeof model.resourceMappings)[number]>()
303
- model.resourceMappings.forEach((resourceMapping, index) => {
304
- if (resourceMappingsByResourceId.has(resourceMapping.resourceId)) {
305
- addIssue(
306
- ctx,
307
- ['resourceMappings', index, 'resourceId'],
308
- `Resource mapping resourceId "${resourceMapping.resourceId}" must be unique`
309
- )
310
- return
311
- }
312
-
313
- resourceMappingsByResourceId.set(resourceMapping.resourceId, resourceMapping)
314
- })
315
-
316
- if (model.navigation.defaultSurfaceId && !surfacesById.has(model.navigation.defaultSurfaceId)) {
317
- addIssue(
318
- ctx,
319
- ['navigation', 'defaultSurfaceId'],
320
- `Default surface "${model.navigation.defaultSurfaceId}" must reference a declared navigation surface`
321
- )
322
- }
323
-
324
- model.navigation.groups.forEach((group, groupIndex) => {
325
- group.surfaceIds.forEach((surfaceId, surfaceIndex) => {
326
- if (!surfacesById.has(surfaceId)) {
327
- addIssue(
328
- ctx,
329
- ['navigation', 'groups', groupIndex, 'surfaceIds', surfaceIndex],
330
- `Navigation group "${group.id}" references unknown surface "${surfaceId}"`
331
- )
332
- }
333
- })
334
- })
335
-
336
- // Feature -> Surface bidirectional validation
337
- model.features.forEach((feature, featureIndex) => {
338
- feature.surfaceIds.forEach((surfaceId, surfaceIndex) => {
339
- const surface = surfacesById.get(surfaceId)
340
- if (!surface) {
341
- addIssue(
342
- ctx,
343
- ['features', featureIndex, 'surfaceIds', surfaceIndex],
344
- `Feature "${feature.id}" references unknown surface "${surfaceId}"`
345
- )
346
- return
347
- }
348
-
349
- if (!surface.featureIds.includes(feature.id)) {
350
- addIssue(
351
- ctx,
352
- ['features', featureIndex, 'surfaceIds', surfaceIndex],
353
- `Feature "${feature.id}" references surface "${surfaceId}" but that surface does not include feature "${feature.id}"`
354
- )
355
- }
356
- })
357
-
358
- // Feature -> Resource bidirectional validation
359
- feature.resourceIds.forEach((resourceId, resourceIndex) => {
360
- const resourceMapping = resourceMappingsByResourceId.get(resourceId)
361
- if (!resourceMapping) {
362
- addIssue(
363
- ctx,
364
- ['features', featureIndex, 'resourceIds', resourceIndex],
365
- `Feature "${feature.id}" references unknown resource "${resourceId}"`
366
- )
367
- return
368
- }
369
-
370
- if (!resourceMapping.featureIds.includes(feature.id)) {
371
- addIssue(
372
- ctx,
373
- ['features', featureIndex, 'resourceIds', resourceIndex],
374
- `Feature "${feature.id}" references resource "${resourceId}" but that resource mapping does not include feature "${feature.id}"`
375
- )
376
- }
377
- })
378
- })
379
-
380
- // Surface -> Feature bidirectional validation and other surface refs
381
- model.navigation.surfaces.forEach((surface, surfaceIndex) => {
382
- if (surface.parentId && !surfacesById.has(surface.parentId)) {
383
- addIssue(
384
- ctx,
385
- ['navigation', 'surfaces', surfaceIndex, 'parentId'],
386
- `Surface "${surface.id}" references unknown parent surface "${surface.parentId}"`
387
- )
388
- }
389
-
390
- surface.featureIds.forEach((featureId, featureIndex) => {
391
- const feature = featuresById.get(featureId)
392
- if (!feature) {
393
- addIssue(
394
- ctx,
395
- ['navigation', 'surfaces', surfaceIndex, 'featureIds', featureIndex],
396
- `Surface "${surface.id}" references unknown feature "${featureId}"`
397
- )
398
- return
399
- }
400
-
401
- if (!feature.surfaceIds.includes(surface.id)) {
402
- addIssue(
403
- ctx,
404
- ['navigation', 'surfaces', surfaceIndex, 'featureIds', featureIndex],
405
- `Surface "${surface.id}" references feature "${featureId}" but that feature does not include surface "${surface.id}"`
406
- )
407
- }
408
- })
409
-
410
- // Surface -> Resource bidirectional validation
411
- surface.resourceIds.forEach((resourceId, resourceIndex) => {
412
- const resourceMapping = resourceMappingsByResourceId.get(resourceId)
413
- if (!resourceMapping) {
414
- addIssue(
415
- ctx,
416
- ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
417
- `Surface "${surface.id}" references unknown resource "${resourceId}"`
418
- )
419
- return
420
- }
421
-
422
- if (!resourceMapping.surfaceIds.includes(surface.id)) {
423
- addIssue(
424
- ctx,
425
- ['navigation', 'surfaces', surfaceIndex, 'resourceIds', resourceIndex],
426
- `Surface "${surface.id}" references resource "${resourceId}" but that surface does not include resource "${surface.id}"`
427
- )
428
- }
429
- })
430
- })
431
-
432
- // Offerings -> CustomerSegment cross-ref: targetSegmentIds must resolve
433
- const segmentsById = new Map(model.customers.segments.map((seg) => [seg.id, seg]))
434
- model.offerings.products.forEach((product, productIndex) => {
435
- product.targetSegmentIds.forEach((segmentId, segmentIndex) => {
436
- if (!segmentsById.has(segmentId)) {
437
- addIssue(
438
- ctx,
439
- ['offerings', 'products', productIndex, 'targetSegmentIds', segmentIndex],
440
- `Product "${product.id}" references unknown customer segment "${segmentId}"`
441
- )
442
- }
443
- })
444
-
445
- // Offerings -> Feature cross-ref: deliveryFeatureId must resolve (when present)
446
- if (product.deliveryFeatureId !== undefined && !featuresById.has(product.deliveryFeatureId)) {
447
- addIssue(
448
- ctx,
449
- ['offerings', 'products', productIndex, 'deliveryFeatureId'],
450
- `Product "${product.id}" references unknown delivery feature "${product.deliveryFeatureId}"`
451
- )
452
- }
453
- })
454
-
455
- // Goals -> period-range validation: periodEnd must be strictly after periodStart
456
- model.goals.objectives.forEach((objective, index) => {
457
- if (objective.periodEnd <= objective.periodStart) {
458
- addIssue(
459
- ctx,
460
- ['goals', 'objectives', index, 'periodEnd'],
461
- `Goal "${objective.id}" has periodEnd "${objective.periodEnd}" which must be strictly after periodStart "${objective.periodStart}"`
462
- )
463
- }
464
- })
465
-
466
- // Roles -> reportsToId cross-ref: each reportsToId must resolve to another role in the same collection
467
- const rolesById = new Map(model.roles.roles.map((role) => [role.id, role]))
468
- model.roles.roles.forEach((role, roleIndex) => {
469
- if (role.reportsToId !== undefined && !rolesById.has(role.reportsToId)) {
470
- addIssue(
471
- ctx,
472
- ['roles', 'roles', roleIndex, 'reportsToId'],
473
- `Role "${role.id}" references unknown reportsToId "${role.reportsToId}"`
474
- )
475
- }
476
- })
477
-
478
- // ResourceMapping -> Feature and Surface bidirectional validation
479
- model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
480
- resourceMapping.featureIds.forEach((featureId, featureIndex) => {
481
- const feature = featuresById.get(featureId)
482
- if (!feature) {
483
- addIssue(
484
- ctx,
485
- ['resourceMappings', resourceIndex, 'featureIds', featureIndex],
486
- `Resource mapping "${resourceMapping.id}" references unknown feature "${featureId}"`
487
- )
488
- return
489
- }
490
-
491
- if (!feature.resourceIds.includes(resourceMapping.resourceId)) {
492
- addIssue(
493
- ctx,
494
- ['resourceMappings', resourceIndex, 'featureIds', featureIndex],
495
- `Resource mapping "${resourceMapping.id}" references feature "${featureId}" but that feature does not include resource "${resourceMapping.resourceId}"`
496
- )
497
- }
498
- })
499
-
500
- resourceMapping.surfaceIds.forEach((surfaceId, surfaceIndex) => {
501
- const surface = surfacesById.get(surfaceId)
502
- if (!surface) {
503
- addIssue(
504
- ctx,
505
- ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
506
- `Resource mapping "${resourceMapping.id}" references unknown surface "${surfaceId}"`
507
- )
508
- return
509
- }
510
-
511
- if (!surface.resourceIds.includes(resourceMapping.resourceId)) {
512
- addIssue(
513
- ctx,
514
- ['resourceMappings', resourceIndex, 'surfaceIds', surfaceIndex],
515
- `Resource mapping "${resourceMapping.id}" references surface "${surfaceId}" but that surface does not include resource "${resourceMapping.resourceId}"`
516
- )
517
- }
518
- })
519
- })
520
- })
521
-
522
- type OrganizationModel = z.infer<typeof OrganizationModelSchema>
523
- type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
577
+ declare const SurfaceDefinitionSchema: z.ZodObject<{
578
+ id: z.ZodString;
579
+ label: z.ZodString;
580
+ path: z.ZodString;
581
+ surfaceType: z.ZodEnum<{
582
+ list: "list";
583
+ settings: "settings";
584
+ page: "page";
585
+ dashboard: "dashboard";
586
+ graph: "graph";
587
+ detail: "detail";
588
+ }>;
589
+ description: z.ZodOptional<z.ZodString>;
590
+ enabled: z.ZodDefault<z.ZodBoolean>;
591
+ icon: z.ZodOptional<z.ZodString>;
592
+ featureId: z.ZodOptional<z.ZodString>;
593
+ featureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
594
+ entityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
595
+ resourceIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
596
+ capabilityIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
597
+ parentId: z.ZodOptional<z.ZodString>;
598
+ }, z.core.$strip>;
524
599
 
525
- interface EventSourceMessage {
526
- id: string;
527
- event: string;
528
- data: string;
529
- retry?: number;
530
- }
600
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>;
601
+ type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>;
531
602
 
532
603
  interface FetchEventSourceWithTokenRefreshOptions {
533
604
  url: string;
@@ -1,11 +1,11 @@
1
- export { ElevasisFeaturesProvider, FeatureShell, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-2TDZBYXI.js';
2
- export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-P3TFNFZS.js';
1
+ export { ElevasisFeaturesProvider, FeatureShell, useElevasisFeatures, useOptionalElevasisFeatures } from '../chunk-LR5CRY5A.js';
2
+ export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter } from '../chunk-EUWBY43Z.js';
3
3
  import '../chunk-RX4UWZZR.js';
4
- import '../chunk-TTP62HWW.js';
4
+ import '../chunk-BHR7IV72.js';
5
5
  import '../chunk-SZHARWKU.js';
6
6
  import '../chunk-3KMDHCAR.js';
7
7
  import '../chunk-NYBEU5TE.js';
8
- import '../chunk-VDM6DQES.js';
8
+ import '../chunk-R7OJCNL3.js';
9
9
  import '../chunk-2IFYDILW.js';
10
10
  import '../chunk-Q7DJKLEN.js';
11
11
  import '../chunk-7YQKVWSD.js';
@@ -14,7 +14,7 @@ export { AppearanceProvider, useAppearance } from '../chunk-QJ2KCHKX.js';
14
14
  import '../chunk-HQ7M6PBW.js';
15
15
  import '../chunk-DT3QYZVU.js';
16
16
  import '../chunk-RNP5R5I3.js';
17
- import '../chunk-GCBWGGI6.js';
17
+ import '../chunk-OD7GWIZS.js';
18
18
  import '../chunk-KRWALB24.js';
19
19
  import '../chunk-SLH2QLKV.js';
20
20
  import '../chunk-DK2HVHCY.js';
@@ -1,9 +1,4 @@
1
- interface EventSourceMessage {
2
- id: string;
3
- event: string;
4
- data: string;
5
- retry?: number;
6
- }
1
+ import { EventSourceMessage } from '@microsoft/fetch-event-source';
7
2
 
8
3
  interface FetchEventSourceWithTokenRefreshOptions {
9
4
  url: string;
@@ -1,3 +1,3 @@
1
- export { useAvailablePresets } from '../chunk-6RWMRQN5.js';
2
- export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-R73EHHPN.js';
1
+ export { useAvailablePresets } from '../chunk-TIIPYB2Z.js';
2
+ export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, generateShades, getPreset, mantineThemeOverride, PRESETS as presets, usePresetsContext } from '../chunk-Q5HC6ENG.js';
3
3
  import '../chunk-WLOQ4IBG.js';