@elevasis/ui 2.67.0 → 2.69.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 (122) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/app/index.d.ts +575 -370
  4. package/dist/app/index.js +17 -23
  5. package/dist/auth/index.css +149 -149
  6. package/dist/auth/index.d.ts +5 -0
  7. package/dist/auth/index.js +11 -13
  8. package/dist/charts/index.css +208 -208
  9. package/dist/charts/index.js +11 -13
  10. package/dist/{chunk-M535KHLW.js → chunk-26BTE3Z4.js} +1 -1
  11. package/dist/chunk-3KMDHCAR.js +52 -0
  12. package/dist/chunk-3MEXPLWT.js +265 -0
  13. package/dist/chunk-4JHLS234.js +39 -0
  14. package/dist/chunk-6PZFOHJK.js +1764 -0
  15. package/dist/chunk-7WJEPTE7.js +194 -0
  16. package/dist/chunk-AH52XQB7.js +1 -0
  17. package/dist/{chunk-UFTM5SZZ.js → chunk-AKANHRQ5.js} +9 -3
  18. package/dist/chunk-BZZCNLT6.js +12 -0
  19. package/dist/chunk-C75XWBYZ.js +383 -0
  20. package/dist/chunk-DLR4SDZW.js +51 -0
  21. package/dist/{chunk-4OEVLV66.js → chunk-FLECOYUS.js} +113 -148
  22. package/dist/chunk-IRV6KJPV.js +425 -0
  23. package/dist/chunk-IT7GTJCB.js +10 -0
  24. package/dist/chunk-LGKLC5MG.js +44 -0
  25. package/dist/chunk-MFLM7BVC.js +85 -0
  26. package/dist/chunk-MRVGQLWN.js +1595 -0
  27. package/dist/{chunk-4DV4ECMG.js → chunk-N7U24M2J.js} +4 -0
  28. package/dist/{chunk-I7BZVVVU.js → chunk-NM4A63KJ.js} +104 -415
  29. package/dist/chunk-NU3NBXHP.js +1194 -0
  30. package/dist/chunk-PDHTXPSF.js +12 -0
  31. package/dist/chunk-RW64UJWT.js +1934 -0
  32. package/dist/{chunk-JFBZ6XDW.js → chunk-SNZDFCOQ.js} +3 -49
  33. package/dist/chunk-TUMSNGTX.js +35 -0
  34. package/dist/chunk-UD657ICS.js +589 -0
  35. package/dist/{chunk-XNW3O6QW.js → chunk-VDX6DL7Z.js} +1 -1
  36. package/dist/chunk-WXHAHKKI.js +16411 -0
  37. package/dist/chunk-XAZR3T6Y.js +2162 -0
  38. package/dist/chunk-XQ3ILKYN.js +37 -0
  39. package/dist/chunk-YCRINA2D.js +67 -0
  40. package/dist/chunk-YGCMMOY4.js +1484 -0
  41. package/dist/chunk-YNRYIXUT.js +10945 -0
  42. package/dist/chunk-ZD6LM53O.js +4528 -0
  43. package/dist/chunk-ZPTEGGKU.js +631 -0
  44. package/dist/components/chat/index.js +2 -1
  45. package/dist/components/index.css +208 -208
  46. package/dist/components/index.d.ts +1634 -264
  47. package/dist/components/index.js +2774 -14
  48. package/dist/components/navigation/index.css +149 -149
  49. package/dist/components/navigation/index.js +12 -13
  50. package/dist/features/auth/index.css +149 -149
  51. package/dist/features/auth/index.d.ts +457 -167
  52. package/dist/features/auth/index.js +13 -14
  53. package/dist/features/clients/index.css +208 -208
  54. package/dist/features/clients/index.d.ts +39 -1
  55. package/dist/features/clients/index.js +16 -13
  56. package/dist/features/content/index.d.ts +1788 -0
  57. package/dist/features/content/index.js +2180 -0
  58. package/dist/features/crm/index.d.ts +1802 -231
  59. package/dist/features/crm/index.js +16 -13
  60. package/dist/features/dashboard/index.d.ts +1 -8
  61. package/dist/features/dashboard/index.js +17 -13
  62. package/dist/features/delivery/index.d.ts +457 -167
  63. package/dist/features/delivery/index.js +16 -13
  64. package/dist/features/knowledge/index.css +149 -149
  65. package/dist/features/knowledge/index.js +11 -13
  66. package/dist/features/lead-gen/index.d.ts +53 -104
  67. package/dist/features/lead-gen/index.js +17 -13
  68. package/dist/features/monitoring/index.js +16 -13
  69. package/dist/features/monitoring/requests/index.js +15 -20
  70. package/dist/features/operations/index.d.ts +1 -86
  71. package/dist/features/operations/index.js +22 -12
  72. package/dist/features/public-agent-chat/index.js +2 -1
  73. package/dist/features/seo/index.js +2 -1
  74. package/dist/features/settings/index.d.ts +457 -167
  75. package/dist/features/settings/index.js +15 -13
  76. package/dist/hooks/access/index.css +149 -149
  77. package/dist/hooks/access/index.d.ts +5 -0
  78. package/dist/hooks/access/index.js +11 -13
  79. package/dist/hooks/delivery/index.d.ts +457 -167
  80. package/dist/hooks/delivery/index.js +2 -23
  81. package/dist/hooks/index.d.ts +2203 -244
  82. package/dist/hooks/index.js +11 -13
  83. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +1 -8
  84. package/dist/hooks/published.d.ts +2203 -244
  85. package/dist/hooks/published.js +11 -13
  86. package/dist/initialization/index.d.ts +465 -169
  87. package/dist/knowledge/index.css +149 -149
  88. package/dist/knowledge/index.d.ts +5 -90
  89. package/dist/knowledge/index.js +3215 -3203
  90. package/dist/{knowledge-search-index-6EZNBNSR.js → knowledge-search-index-LP2WVSQX.js} +689 -695
  91. package/dist/layout/index.css +149 -149
  92. package/dist/layout/index.js +15 -13
  93. package/dist/organization/index.d.ts +10 -4
  94. package/dist/organization/index.js +1 -21
  95. package/dist/profile/index.d.ts +457 -167
  96. package/dist/provider/index.d.ts +576 -372
  97. package/dist/provider/index.js +11 -13
  98. package/dist/provider/published.css +149 -149
  99. package/dist/provider/published.d.ts +576 -372
  100. package/dist/provider/published.js +11 -13
  101. package/dist/supabase/index.d.ts +906 -347
  102. package/dist/test-utils/index.d.ts +15 -2
  103. package/dist/test-utils/index.js +41 -12
  104. package/dist/test-utils/setup-integration.js +1 -1
  105. package/dist/test-utils/setup.js +1 -1
  106. package/dist/theme/index.js +3 -2
  107. package/dist/theme/presets/index.js +1 -1
  108. package/dist/typeform/index.js +2049 -1
  109. package/dist/types/index.d.ts +477 -177
  110. package/dist/utils/index.d.ts +1 -8
  111. package/dist/utils/index.js +1 -1
  112. package/dist/vite/index.js +2 -2
  113. package/dist/vite-plugin-knowledge/index.js +1 -1
  114. package/package.json +7 -3
  115. package/src/features/README.md +28 -28
  116. package/dist/chunk-5TERYXOO.js +0 -51390
  117. package/dist/chunk-AUDNF2Q7.js +0 -2050
  118. package/dist/index.d.ts +0 -17888
  119. package/dist/index.js +0 -30
  120. package/dist/{chunk-GMXGDO3I.js → chunk-MISHPEJX.js} +1 -1
  121. package/dist/{chunk-RBGVNPA6.js → chunk-XQBURFKM.js} +0 -0
  122. package/dist/{index.css → features/content/index.css} +149 -149
@@ -56,53 +56,6 @@ type Json = string | number | boolean | null | {
56
56
  type Database = {
57
57
  public: {
58
58
  Tables: {
59
- acq_artifacts: {
60
- Row: {
61
- content: Json;
62
- created_at: string;
63
- created_by: string | null;
64
- id: string;
65
- kind: string;
66
- organization_id: string;
67
- owner_id: string;
68
- owner_kind: string;
69
- source_execution_id: string | null;
70
- version: number;
71
- };
72
- Insert: {
73
- content: Json;
74
- created_at?: string;
75
- created_by?: string | null;
76
- id?: string;
77
- kind: string;
78
- organization_id: string;
79
- owner_id: string;
80
- owner_kind: string;
81
- source_execution_id?: string | null;
82
- version?: number;
83
- };
84
- Update: {
85
- content?: Json;
86
- created_at?: string;
87
- created_by?: string | null;
88
- id?: string;
89
- kind?: string;
90
- organization_id?: string;
91
- owner_id?: string;
92
- owner_kind?: string;
93
- source_execution_id?: string | null;
94
- version?: number;
95
- };
96
- Relationships: [
97
- {
98
- foreignKeyName: "acq_artifacts_organization_id_fkey";
99
- columns: ["organization_id"];
100
- isOneToOne: false;
101
- referencedRelation: "organizations";
102
- referencedColumns: ["id"];
103
- }
104
- ];
105
- };
106
59
  acq_companies: {
107
60
  Row: {
108
61
  batch_id: string | null;
@@ -314,122 +267,6 @@ type Database = {
314
267
  }
315
268
  ];
316
269
  };
317
- acq_content: {
318
- Row: {
319
- body: string | null;
320
- created_at: string;
321
- id: string;
322
- organization_id: string;
323
- pillar: string;
324
- status: string;
325
- title: string;
326
- updated_at: string;
327
- };
328
- Insert: {
329
- body?: string | null;
330
- created_at?: string;
331
- id?: string;
332
- organization_id: string;
333
- pillar: string;
334
- status?: string;
335
- title: string;
336
- updated_at?: string;
337
- };
338
- Update: {
339
- body?: string | null;
340
- created_at?: string;
341
- id?: string;
342
- organization_id?: string;
343
- pillar?: string;
344
- status?: string;
345
- title?: string;
346
- updated_at?: string;
347
- };
348
- Relationships: [
349
- {
350
- foreignKeyName: "acq_content_organization_id_fkey";
351
- columns: ["organization_id"];
352
- isOneToOne: false;
353
- referencedRelation: "organizations";
354
- referencedColumns: ["id"];
355
- }
356
- ];
357
- };
358
- acq_content_distributions: {
359
- Row: {
360
- adapted_body: string | null;
361
- checklist: Json | null;
362
- content_id: string;
363
- created_at: string;
364
- format: string;
365
- id: string;
366
- media_urls: Json;
367
- metrics: Json;
368
- metrics_updated_at: string | null;
369
- organization_id: string;
370
- platform: string;
371
- platform_content: Json | null;
372
- platform_post_id: string | null;
373
- platform_url: string | null;
374
- published_at: string | null;
375
- status: string;
376
- updated_at: string;
377
- };
378
- Insert: {
379
- adapted_body?: string | null;
380
- checklist?: Json | null;
381
- content_id: string;
382
- created_at?: string;
383
- format: string;
384
- id?: string;
385
- media_urls?: Json;
386
- metrics?: Json;
387
- metrics_updated_at?: string | null;
388
- organization_id: string;
389
- platform: string;
390
- platform_content?: Json | null;
391
- platform_post_id?: string | null;
392
- platform_url?: string | null;
393
- published_at?: string | null;
394
- status?: string;
395
- updated_at?: string;
396
- };
397
- Update: {
398
- adapted_body?: string | null;
399
- checklist?: Json | null;
400
- content_id?: string;
401
- created_at?: string;
402
- format?: string;
403
- id?: string;
404
- media_urls?: Json;
405
- metrics?: Json;
406
- metrics_updated_at?: string | null;
407
- organization_id?: string;
408
- platform?: string;
409
- platform_content?: Json | null;
410
- platform_post_id?: string | null;
411
- platform_url?: string | null;
412
- published_at?: string | null;
413
- status?: string;
414
- updated_at?: string;
415
- };
416
- Relationships: [
417
- {
418
- foreignKeyName: "acq_content_distributions_content_id_fkey";
419
- columns: ["content_id"];
420
- isOneToOne: false;
421
- referencedRelation: "acq_content";
422
- referencedColumns: ["id"];
423
- },
424
- {
425
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
426
- columns: ["organization_id"];
427
- isOneToOne: false;
428
- referencedRelation: "organizations";
429
- referencedColumns: ["id"];
430
- }
431
- ];
432
- };
433
270
  acq_deal_notes: {
434
271
  Row: {
435
272
  author_user_id: string | null;
@@ -459,6 +296,13 @@ type Database = {
459
296
  updated_at?: string;
460
297
  };
461
298
  Relationships: [
299
+ {
300
+ foreignKeyName: "acq_deal_notes_author_user_id_fkey";
301
+ columns: ["author_user_id"];
302
+ isOneToOne: false;
303
+ referencedRelation: "users";
304
+ referencedColumns: ["id"];
305
+ },
462
306
  {
463
307
  foreignKeyName: "acq_deal_notes_deal_id_fkey";
464
308
  columns: ["deal_id"];
@@ -522,6 +366,27 @@ type Database = {
522
366
  updated_at?: string;
523
367
  };
524
368
  Relationships: [
369
+ {
370
+ foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
371
+ columns: ["assignee_user_id"];
372
+ isOneToOne: false;
373
+ referencedRelation: "users";
374
+ referencedColumns: ["id"];
375
+ },
376
+ {
377
+ foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
378
+ columns: ["completed_by_user_id"];
379
+ isOneToOne: false;
380
+ referencedRelation: "users";
381
+ referencedColumns: ["id"];
382
+ },
383
+ {
384
+ foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
385
+ columns: ["created_by_user_id"];
386
+ isOneToOne: false;
387
+ referencedRelation: "users";
388
+ referencedColumns: ["id"];
389
+ },
525
390
  {
526
391
  foreignKeyName: "acq_deal_tasks_deal_id_fkey";
527
392
  columns: ["deal_id"];
@@ -678,6 +543,13 @@ type Database = {
678
543
  referencedRelation: "acq_contacts";
679
544
  referencedColumns: ["id"];
680
545
  },
546
+ {
547
+ foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
548
+ columns: ["discovery_submitted_by"];
549
+ isOneToOne: false;
550
+ referencedRelation: "users";
551
+ referencedColumns: ["id"];
552
+ },
681
553
  {
682
554
  foreignKeyName: "acq_deals_organization_id_fkey";
683
555
  columns: ["organization_id"];
@@ -685,6 +557,13 @@ type Database = {
685
557
  referencedRelation: "organizations";
686
558
  referencedColumns: ["id"];
687
559
  },
560
+ {
561
+ foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
562
+ columns: ["proposal_reviewed_by"];
563
+ isOneToOne: false;
564
+ referencedRelation: "users";
565
+ referencedColumns: ["id"];
566
+ },
688
567
  {
689
568
  foreignKeyName: "acq_deals_source_list_id_fkey";
690
569
  columns: ["source_list_id"];
@@ -738,6 +617,13 @@ type Database = {
738
617
  state_key?: string;
739
618
  };
740
619
  Relationships: [
620
+ {
621
+ foreignKeyName: "acq_list_companies_added_by_fkey";
622
+ columns: ["added_by"];
623
+ isOneToOne: false;
624
+ referencedRelation: "users";
625
+ referencedColumns: ["id"];
626
+ },
741
627
  {
742
628
  foreignKeyName: "acq_list_companies_company_id_fkey";
743
629
  columns: ["company_id"];
@@ -844,6 +730,13 @@ type Database = {
844
730
  state_key?: string;
845
731
  };
846
732
  Relationships: [
733
+ {
734
+ foreignKeyName: "acq_list_members_added_by_fkey";
735
+ columns: ["added_by"];
736
+ isOneToOne: false;
737
+ referencedRelation: "users";
738
+ referencedColumns: ["id"];
739
+ },
847
740
  {
848
741
  foreignKeyName: "acq_list_members_contact_id_fkey";
849
742
  columns: ["contact_id"];
@@ -1244,6 +1137,13 @@ type Database = {
1244
1137
  title?: string;
1245
1138
  };
1246
1139
  Relationships: [
1140
+ {
1141
+ foreignKeyName: "activities_actor_id_fkey";
1142
+ columns: ["actor_id"];
1143
+ isOneToOne: false;
1144
+ referencedRelation: "users";
1145
+ referencedColumns: ["id"];
1146
+ },
1247
1147
  {
1248
1148
  foreignKeyName: "activities_organization_id_fkey";
1249
1149
  columns: ["organization_id"];
@@ -1356,6 +1256,62 @@ type Database = {
1356
1256
  }
1357
1257
  ];
1358
1258
  };
1259
+ artifacts: {
1260
+ Row: {
1261
+ content: Json;
1262
+ created_at: string;
1263
+ created_by: string | null;
1264
+ id: string;
1265
+ is_active: boolean;
1266
+ kind: string;
1267
+ organization_id: string;
1268
+ owner_id: string | null;
1269
+ owner_kind: string;
1270
+ pipeline_id: string | null;
1271
+ source_execution_id: string | null;
1272
+ updated_at: string;
1273
+ version: number;
1274
+ };
1275
+ Insert: {
1276
+ content: Json;
1277
+ created_at?: string;
1278
+ created_by?: string | null;
1279
+ id?: string;
1280
+ is_active?: boolean;
1281
+ kind: string;
1282
+ organization_id: string;
1283
+ owner_id?: string | null;
1284
+ owner_kind: string;
1285
+ pipeline_id?: string | null;
1286
+ source_execution_id?: string | null;
1287
+ updated_at?: string;
1288
+ version?: number;
1289
+ };
1290
+ Update: {
1291
+ content?: Json;
1292
+ created_at?: string;
1293
+ created_by?: string | null;
1294
+ id?: string;
1295
+ is_active?: boolean;
1296
+ kind?: string;
1297
+ organization_id?: string;
1298
+ owner_id?: string | null;
1299
+ owner_kind?: string;
1300
+ pipeline_id?: string | null;
1301
+ source_execution_id?: string | null;
1302
+ updated_at?: string;
1303
+ version?: number;
1304
+ };
1305
+ Relationships: [
1306
+ {
1307
+ foreignKeyName: "artifacts_organization_id_fkey";
1308
+ columns: ["organization_id"];
1309
+ isOneToOne: false;
1310
+ referencedRelation: "organizations";
1311
+ referencedColumns: ["id"];
1312
+ }
1313
+ ];
1314
+ };
1359
1315
  clients: {
1360
1316
  Row: {
1361
1317
  converted_at: string | null;
@@ -1456,74 +1412,379 @@ type Database = {
1456
1412
  target_resource_type: string | null;
1457
1413
  };
1458
1414
  Insert: {
1459
- action_payload?: Json | null;
1460
- actions: Json;
1461
- completed_at?: string | null;
1462
- completed_by?: string | null;
1463
- context: Json;
1415
+ action_payload?: Json | null;
1416
+ actions: Json;
1417
+ completed_at?: string | null;
1418
+ completed_by?: string | null;
1419
+ context: Json;
1420
+ created_at?: string;
1421
+ description?: string | null;
1422
+ expires_at?: string | null;
1423
+ human_checkpoint?: string | null;
1424
+ id?: string;
1425
+ idempotency_key?: string | null;
1426
+ metadata?: Json | null;
1427
+ organization_id: string;
1428
+ origin_execution_id: string;
1429
+ origin_resource_id: string;
1430
+ origin_resource_type: string;
1431
+ priority?: number;
1432
+ selected_action?: string | null;
1433
+ status?: string;
1434
+ target_execution_id?: string | null;
1435
+ target_resource_id?: string | null;
1436
+ target_resource_type?: string | null;
1437
+ };
1438
+ Update: {
1439
+ action_payload?: Json | null;
1440
+ actions?: Json;
1441
+ completed_at?: string | null;
1442
+ completed_by?: string | null;
1443
+ context?: Json;
1444
+ created_at?: string;
1445
+ description?: string | null;
1446
+ expires_at?: string | null;
1447
+ human_checkpoint?: string | null;
1448
+ id?: string;
1449
+ idempotency_key?: string | null;
1450
+ metadata?: Json | null;
1451
+ organization_id?: string;
1452
+ origin_execution_id?: string;
1453
+ origin_resource_id?: string;
1454
+ origin_resource_type?: string;
1455
+ priority?: number;
1456
+ selected_action?: string | null;
1457
+ status?: string;
1458
+ target_execution_id?: string | null;
1459
+ target_resource_id?: string | null;
1460
+ target_resource_type?: string | null;
1461
+ };
1462
+ Relationships: [
1463
+ {
1464
+ foreignKeyName: "command_queue_completed_by_fkey";
1465
+ columns: ["completed_by"];
1466
+ isOneToOne: false;
1467
+ referencedRelation: "users";
1468
+ referencedColumns: ["id"];
1469
+ },
1470
+ {
1471
+ foreignKeyName: "command_queue_organization_id_fkey";
1472
+ columns: ["organization_id"];
1473
+ isOneToOne: false;
1474
+ referencedRelation: "organizations";
1475
+ referencedColumns: ["id"];
1476
+ },
1477
+ {
1478
+ foreignKeyName: "command_queue_target_execution_id_fkey";
1479
+ columns: ["target_execution_id"];
1480
+ isOneToOne: false;
1481
+ referencedRelation: "execution_logs";
1482
+ referencedColumns: ["execution_id"];
1483
+ }
1484
+ ];
1485
+ };
1486
+ content_distributions: {
1487
+ Row: {
1488
+ adapted_body: string | null;
1489
+ checklist: Json | null;
1490
+ content_item_id: string;
1491
+ created_at: string;
1492
+ format: string;
1493
+ id: string;
1494
+ media_urls: Json;
1495
+ metrics: Json;
1496
+ metrics_updated_at: string | null;
1497
+ organization_id: string;
1498
+ platform: string;
1499
+ platform_content: Json | null;
1500
+ platform_post_id: string | null;
1501
+ platform_url: string | null;
1502
+ processing_state: Json;
1503
+ publish_method: string | null;
1504
+ published_at: string | null;
1505
+ status: string;
1506
+ updated_at: string;
1507
+ };
1508
+ Insert: {
1509
+ adapted_body?: string | null;
1510
+ checklist?: Json | null;
1511
+ content_item_id: string;
1512
+ created_at?: string;
1513
+ format: string;
1514
+ id?: string;
1515
+ media_urls?: Json;
1516
+ metrics?: Json;
1517
+ metrics_updated_at?: string | null;
1518
+ organization_id: string;
1519
+ platform: string;
1520
+ platform_content?: Json | null;
1521
+ platform_post_id?: string | null;
1522
+ platform_url?: string | null;
1523
+ processing_state?: Json;
1524
+ publish_method?: string | null;
1525
+ published_at?: string | null;
1526
+ status?: string;
1527
+ updated_at?: string;
1528
+ };
1529
+ Update: {
1530
+ adapted_body?: string | null;
1531
+ checklist?: Json | null;
1532
+ content_item_id?: string;
1533
+ created_at?: string;
1534
+ format?: string;
1535
+ id?: string;
1536
+ media_urls?: Json;
1537
+ metrics?: Json;
1538
+ metrics_updated_at?: string | null;
1539
+ organization_id?: string;
1540
+ platform?: string;
1541
+ platform_content?: Json | null;
1542
+ platform_post_id?: string | null;
1543
+ platform_url?: string | null;
1544
+ processing_state?: Json;
1545
+ publish_method?: string | null;
1546
+ published_at?: string | null;
1547
+ status?: string;
1548
+ updated_at?: string;
1549
+ };
1550
+ Relationships: [
1551
+ {
1552
+ foreignKeyName: "content_distributions_content_item_id_fkey";
1553
+ columns: ["content_item_id"];
1554
+ isOneToOne: false;
1555
+ referencedRelation: "content_items";
1556
+ referencedColumns: ["id"];
1557
+ },
1558
+ {
1559
+ foreignKeyName: "content_distributions_organization_id_fkey";
1560
+ columns: ["organization_id"];
1561
+ isOneToOne: false;
1562
+ referencedRelation: "organizations";
1563
+ referencedColumns: ["id"];
1564
+ }
1565
+ ];
1566
+ };
1567
+ content_item_attempts: {
1568
+ Row: {
1569
+ attempt_number: number;
1570
+ content_item_id: string;
1571
+ created_at: string;
1572
+ created_by: string | null;
1573
+ id: string;
1574
+ organization_id: string;
1575
+ payload: Json;
1576
+ source_execution_id: string | null;
1577
+ step_key: string | null;
1578
+ };
1579
+ Insert: {
1580
+ attempt_number: number;
1581
+ content_item_id: string;
1582
+ created_at?: string;
1583
+ created_by?: string | null;
1584
+ id?: string;
1585
+ organization_id: string;
1586
+ payload?: Json;
1587
+ source_execution_id?: string | null;
1588
+ step_key?: string | null;
1589
+ };
1590
+ Update: {
1591
+ attempt_number?: number;
1592
+ content_item_id?: string;
1593
+ created_at?: string;
1594
+ created_by?: string | null;
1595
+ id?: string;
1596
+ organization_id?: string;
1597
+ payload?: Json;
1598
+ source_execution_id?: string | null;
1599
+ step_key?: string | null;
1600
+ };
1601
+ Relationships: [
1602
+ {
1603
+ foreignKeyName: "content_item_attempts_content_item_id_fkey";
1604
+ columns: ["content_item_id"];
1605
+ isOneToOne: false;
1606
+ referencedRelation: "content_items";
1607
+ referencedColumns: ["id"];
1608
+ },
1609
+ {
1610
+ foreignKeyName: "content_item_attempts_created_by_fkey";
1611
+ columns: ["created_by"];
1612
+ isOneToOne: false;
1613
+ referencedRelation: "users";
1614
+ referencedColumns: ["id"];
1615
+ },
1616
+ {
1617
+ foreignKeyName: "content_item_attempts_organization_id_fkey";
1618
+ columns: ["organization_id"];
1619
+ isOneToOne: false;
1620
+ referencedRelation: "organizations";
1621
+ referencedColumns: ["id"];
1622
+ },
1623
+ {
1624
+ foreignKeyName: "content_item_attempts_source_execution_id_fkey";
1625
+ columns: ["source_execution_id"];
1626
+ isOneToOne: false;
1627
+ referencedRelation: "execution_logs";
1628
+ referencedColumns: ["execution_id"];
1629
+ }
1630
+ ];
1631
+ };
1632
+ content_items: {
1633
+ Row: {
1634
+ body: string | null;
1635
+ client_id: string | null;
1636
+ created_at: string;
1637
+ created_by: string | null;
1638
+ id: string;
1639
+ organization_id: string;
1640
+ payload: Json;
1641
+ pillar: string | null;
1642
+ pipeline_id: string | null;
1643
+ processing_state: Json;
1644
+ reject_reason: string | null;
1645
+ reviewed_at: string | null;
1646
+ reviewed_by: string | null;
1647
+ reviewer_feedback: string | null;
1648
+ source_asset_id: string | null;
1649
+ status: string;
1650
+ title: string;
1651
+ updated_at: string;
1652
+ updated_by: string | null;
1653
+ };
1654
+ Insert: {
1655
+ body?: string | null;
1656
+ client_id?: string | null;
1657
+ created_at?: string;
1658
+ created_by?: string | null;
1659
+ id?: string;
1660
+ organization_id: string;
1661
+ payload?: Json;
1662
+ pillar?: string | null;
1663
+ pipeline_id?: string | null;
1664
+ processing_state?: Json;
1665
+ reject_reason?: string | null;
1666
+ reviewed_at?: string | null;
1667
+ reviewed_by?: string | null;
1668
+ reviewer_feedback?: string | null;
1669
+ source_asset_id?: string | null;
1670
+ status?: string;
1671
+ title: string;
1672
+ updated_at?: string;
1673
+ updated_by?: string | null;
1674
+ };
1675
+ Update: {
1676
+ body?: string | null;
1677
+ client_id?: string | null;
1678
+ created_at?: string;
1679
+ created_by?: string | null;
1680
+ id?: string;
1681
+ organization_id?: string;
1682
+ payload?: Json;
1683
+ pillar?: string | null;
1684
+ pipeline_id?: string | null;
1685
+ processing_state?: Json;
1686
+ reject_reason?: string | null;
1687
+ reviewed_at?: string | null;
1688
+ reviewed_by?: string | null;
1689
+ reviewer_feedback?: string | null;
1690
+ source_asset_id?: string | null;
1691
+ status?: string;
1692
+ title?: string;
1693
+ updated_at?: string;
1694
+ updated_by?: string | null;
1695
+ };
1696
+ Relationships: [
1697
+ {
1698
+ foreignKeyName: "content_items_client_id_fkey";
1699
+ columns: ["client_id"];
1700
+ isOneToOne: false;
1701
+ referencedRelation: "clients";
1702
+ referencedColumns: ["id"];
1703
+ },
1704
+ {
1705
+ foreignKeyName: "content_items_created_by_fkey";
1706
+ columns: ["created_by"];
1707
+ isOneToOne: false;
1708
+ referencedRelation: "users";
1709
+ referencedColumns: ["id"];
1710
+ },
1711
+ {
1712
+ foreignKeyName: "content_items_organization_id_fkey";
1713
+ columns: ["organization_id"];
1714
+ isOneToOne: false;
1715
+ referencedRelation: "organizations";
1716
+ referencedColumns: ["id"];
1717
+ },
1718
+ {
1719
+ foreignKeyName: "content_items_reviewed_by_fkey";
1720
+ columns: ["reviewed_by"];
1721
+ isOneToOne: false;
1722
+ referencedRelation: "users";
1723
+ referencedColumns: ["id"];
1724
+ },
1725
+ {
1726
+ foreignKeyName: "content_items_source_asset_id_fkey";
1727
+ columns: ["source_asset_id"];
1728
+ isOneToOne: false;
1729
+ referencedRelation: "content_source_assets";
1730
+ referencedColumns: ["id"];
1731
+ },
1732
+ {
1733
+ foreignKeyName: "content_items_updated_by_fkey";
1734
+ columns: ["updated_by"];
1735
+ isOneToOne: false;
1736
+ referencedRelation: "users";
1737
+ referencedColumns: ["id"];
1738
+ }
1739
+ ];
1740
+ };
1741
+ content_source_assets: {
1742
+ Row: {
1743
+ created_at: string;
1744
+ duration_seconds: number | null;
1745
+ external_url: string | null;
1746
+ id: string;
1747
+ kind: string;
1748
+ metadata: Json;
1749
+ organization_id: string;
1750
+ processing_state: Json;
1751
+ storage_path: string | null;
1752
+ title: string;
1753
+ updated_at: string;
1754
+ };
1755
+ Insert: {
1464
1756
  created_at?: string;
1465
- description?: string | null;
1466
- expires_at?: string | null;
1467
- human_checkpoint?: string | null;
1757
+ duration_seconds?: number | null;
1758
+ external_url?: string | null;
1468
1759
  id?: string;
1469
- idempotency_key?: string | null;
1470
- metadata?: Json | null;
1760
+ kind: string;
1761
+ metadata?: Json;
1471
1762
  organization_id: string;
1472
- origin_execution_id: string;
1473
- origin_resource_id: string;
1474
- origin_resource_type: string;
1475
- priority?: number;
1476
- selected_action?: string | null;
1477
- status?: string;
1478
- target_execution_id?: string | null;
1479
- target_resource_id?: string | null;
1480
- target_resource_type?: string | null;
1763
+ processing_state?: Json;
1764
+ storage_path?: string | null;
1765
+ title: string;
1766
+ updated_at?: string;
1481
1767
  };
1482
1768
  Update: {
1483
- action_payload?: Json | null;
1484
- actions?: Json;
1485
- completed_at?: string | null;
1486
- completed_by?: string | null;
1487
- context?: Json;
1488
1769
  created_at?: string;
1489
- description?: string | null;
1490
- expires_at?: string | null;
1491
- human_checkpoint?: string | null;
1770
+ duration_seconds?: number | null;
1771
+ external_url?: string | null;
1492
1772
  id?: string;
1493
- idempotency_key?: string | null;
1494
- metadata?: Json | null;
1773
+ kind?: string;
1774
+ metadata?: Json;
1495
1775
  organization_id?: string;
1496
- origin_execution_id?: string;
1497
- origin_resource_id?: string;
1498
- origin_resource_type?: string;
1499
- priority?: number;
1500
- selected_action?: string | null;
1501
- status?: string;
1502
- target_execution_id?: string | null;
1503
- target_resource_id?: string | null;
1504
- target_resource_type?: string | null;
1776
+ processing_state?: Json;
1777
+ storage_path?: string | null;
1778
+ title?: string;
1779
+ updated_at?: string;
1505
1780
  };
1506
1781
  Relationships: [
1507
1782
  {
1508
- foreignKeyName: "command_queue_completed_by_fkey";
1509
- columns: ["completed_by"];
1510
- isOneToOne: false;
1511
- referencedRelation: "users";
1512
- referencedColumns: ["id"];
1513
- },
1514
- {
1515
- foreignKeyName: "command_queue_organization_id_fkey";
1783
+ foreignKeyName: "content_source_assets_organization_id_fkey";
1516
1784
  columns: ["organization_id"];
1517
1785
  isOneToOne: false;
1518
1786
  referencedRelation: "organizations";
1519
1787
  referencedColumns: ["id"];
1520
- },
1521
- {
1522
- foreignKeyName: "command_queue_target_execution_id_fkey";
1523
- columns: ["target_execution_id"];
1524
- isOneToOne: false;
1525
- referencedRelation: "execution_logs";
1526
- referencedColumns: ["execution_id"];
1527
1788
  }
1528
1789
  ];
1529
1790
  };
@@ -3143,6 +3404,33 @@ type Database = {
3143
3404
  };
3144
3405
  Returns: boolean;
3145
3406
  };
3407
+ create_artifact_version: {
3408
+ Args: {
3409
+ p_content: Json;
3410
+ p_created_by?: string;
3411
+ p_kind: string;
3412
+ p_organization_id: string;
3413
+ p_owner_id?: string;
3414
+ p_owner_kind: string;
3415
+ p_pipeline_id?: string;
3416
+ p_source_execution_id?: string;
3417
+ };
3418
+ Returns: {
3419
+ content: Json;
3420
+ created_at: string;
3421
+ created_by: string | null;
3422
+ id: string;
3423
+ is_active: boolean;
3424
+ kind: string;
3425
+ organization_id: string;
3426
+ owner_id: string | null;
3427
+ owner_kind: string;
3428
+ pipeline_id: string | null;
3429
+ source_execution_id: string | null;
3430
+ updated_at: string;
3431
+ version: number;
3432
+ };
3433
+ };
3146
3434
  current_user_is_platform_admin: {
3147
3435
  Args: Record<PropertyKey, never>;
3148
3436
  Returns: boolean;
@@ -3157,10 +3445,6 @@ type Database = {
3157
3445
  Args: Record<PropertyKey, never>;
3158
3446
  Returns: string;
3159
3447
  };
3160
- detect_stalled_executions: {
3161
- Args: Record<PropertyKey, never>;
3162
- Returns: undefined;
3163
- };
3164
3448
  execute_session_turn: {
3165
3449
  Args: {
3166
3450
  p_session_id: string;
@@ -3253,6 +3537,12 @@ type Database = {
3253
3537
  Args: Record<PropertyKey, never>;
3254
3538
  Returns: Json;
3255
3539
  };
3540
+ purge_stale_test_data: {
3541
+ Args: {
3542
+ p_max_age?: unknown;
3543
+ };
3544
+ Returns: Json;
3545
+ };
3256
3546
  recompute_all_memberships: {
3257
3547
  Args: Record<PropertyKey, never>;
3258
3548
  Returns: undefined;
@@ -3306,6 +3596,33 @@ type Database = {
3306
3596
  };
3307
3597
  };
3308
3598
 
3599
+ /** One state within a stage: minimal shape of key + display label. */
3600
+ interface StatefulStateDefinition {
3601
+ /** Matches state_key values written by workflow steps. */
3602
+ stateKey: string;
3603
+ label: string;
3604
+ }
3605
+ /** One stage within a pipeline: has a stage_key and ordered valid states. */
3606
+ interface StatefulStageDefinition {
3607
+ /** Matches stage_key values written by workflow steps. */
3608
+ stageKey: string;
3609
+ label: string;
3610
+ /** UI color token. Consumers may map this to their design system. */
3611
+ color?: string;
3612
+ states: StatefulStateDefinition[];
3613
+ }
3614
+ /**
3615
+ * Pipeline definition for a single entity participating in the Stateful trait.
3616
+ * Parallel to acq_deals' pipeline_key concept but structured for any entity.
3617
+ */
3618
+ interface StatefulPipelineDefinition {
3619
+ /** Matches pipeline_key values in the database. */
3620
+ pipelineKey: string;
3621
+ label: string;
3622
+ /** Entity this pipeline applies to. */
3623
+ entityKey: string;
3624
+ stages: StatefulStageDefinition[];
3625
+ }
3309
3626
  type CrmPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low';
3310
3627
  interface CrmPriorityBucketDefinition {
3311
3628
  bucketKey: CrmPriorityBucketKey;
@@ -3473,7 +3790,18 @@ type DealDetailResponse = z.infer<typeof DealDetailResponseSchema>;
3473
3790
 
3474
3791
  /** Raw database row type for acq_deals table */
3475
3792
  type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
3476
- type DealStage = 'interested' | 'proposal' | 'closing' | 'closed_won' | 'closed_lost' | 'nurturing';
3793
+ /**
3794
+ * Deal stage key. Intentionally an open string, not a closed union — stage
3795
+ * vocabulary is tenant-owned content (see the `CrmStageKeySchema` comment in
3796
+ * api-schemas.ts: "CRM stage/state catalogs are model-owned... The published
3797
+ * core schema validates only the transport shape; closed-catalog membership
3798
+ * is enforced by the caller/API layer via model-injected validators"). A
3799
+ * closed union here would bake Elevasis's specific pipeline
3800
+ * (`interested`/`proposal`/`closing`/`closed_won`/`closed_lost`/`nurturing`)
3801
+ * into every tenant's type surface. `DealStageSchema` in api-schemas.ts is
3802
+ * already `z.string()` for the same reason; this type now matches it.
3803
+ */
3804
+ type DealStage = string;
3477
3805
  type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low';
3478
3806
  interface DealPriority {
3479
3807
  bucketKey: DealPriorityBucketKey;
@@ -3520,6 +3848,1219 @@ interface DealListItem extends AcqDealRow {
3520
3848
  }
3521
3849
  type DealDetail$1 = DealListItem;
3522
3850
 
3851
+ declare const OntologyScopeSchema: z.ZodDefault<z.ZodObject<{
3852
+ objectTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3853
+ id: z.ZodString;
3854
+ label: z.ZodOptional<z.ZodString>;
3855
+ description: z.ZodOptional<z.ZodString>;
3856
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3857
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3858
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3859
+ storage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3860
+ }, z.core.$loose>>>>;
3861
+ linkTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3862
+ id: z.ZodString;
3863
+ label: z.ZodOptional<z.ZodString>;
3864
+ description: z.ZodOptional<z.ZodString>;
3865
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3866
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3867
+ from: z.ZodString;
3868
+ to: z.ZodString;
3869
+ cardinality: z.ZodOptional<z.ZodString>;
3870
+ via: z.ZodOptional<z.ZodString>;
3871
+ }, z.core.$loose>>>>;
3872
+ actionTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3873
+ id: z.ZodString;
3874
+ label: z.ZodOptional<z.ZodString>;
3875
+ description: z.ZodOptional<z.ZodString>;
3876
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3877
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3878
+ actsOn: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
3879
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3880
+ effects: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
3881
+ }, z.core.$loose>>>>;
3882
+ catalogTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3883
+ id: z.ZodString;
3884
+ label: z.ZodOptional<z.ZodString>;
3885
+ description: z.ZodOptional<z.ZodString>;
3886
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3887
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3888
+ kind: z.ZodOptional<z.ZodString>;
3889
+ appliesTo: z.ZodOptional<z.ZodString>;
3890
+ entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3891
+ }, z.core.$loose>>>>;
3892
+ eventTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3893
+ id: z.ZodString;
3894
+ label: z.ZodOptional<z.ZodString>;
3895
+ description: z.ZodOptional<z.ZodString>;
3896
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3897
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3898
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3899
+ }, z.core.$loose>>>>;
3900
+ interfaceTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3901
+ id: z.ZodString;
3902
+ label: z.ZodOptional<z.ZodString>;
3903
+ description: z.ZodOptional<z.ZodString>;
3904
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3905
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3906
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3907
+ }, z.core.$loose>>>>;
3908
+ valueTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3909
+ id: z.ZodString;
3910
+ label: z.ZodOptional<z.ZodString>;
3911
+ description: z.ZodOptional<z.ZodString>;
3912
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3913
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3914
+ primitive: z.ZodOptional<z.ZodString>;
3915
+ }, z.core.$loose>>>>;
3916
+ sharedProperties: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3917
+ id: z.ZodString;
3918
+ label: z.ZodOptional<z.ZodString>;
3919
+ description: z.ZodOptional<z.ZodString>;
3920
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3921
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3922
+ valueType: z.ZodOptional<z.ZodString>;
3923
+ searchable: z.ZodOptional<z.ZodBoolean>;
3924
+ pii: z.ZodOptional<z.ZodBoolean>;
3925
+ }, z.core.$loose>>>>;
3926
+ groups: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3927
+ id: z.ZodString;
3928
+ label: z.ZodOptional<z.ZodString>;
3929
+ description: z.ZodOptional<z.ZodString>;
3930
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3931
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3932
+ members: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
3933
+ }, z.core.$loose>>>>;
3934
+ endpoints: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3935
+ id: z.ZodString;
3936
+ label: z.ZodOptional<z.ZodString>;
3937
+ description: z.ZodOptional<z.ZodString>;
3938
+ ownerSystemId: z.ZodOptional<z.ZodString>;
3939
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
3940
+ route: z.ZodOptional<z.ZodString>;
3941
+ }, z.core.$loose>>>>;
3942
+ }, z.core.$strip>>;
3943
+ type OntologyScope = z.infer<typeof OntologyScopeSchema>;
3944
+
3945
+ declare const SystemApiInterfaceSchema: z.ZodObject<{
3946
+ lifecycle: z.ZodDefault<z.ZodEnum<{
3947
+ active: "active";
3948
+ deprecated: "deprecated";
3949
+ draft: "draft";
3950
+ archived: "archived";
3951
+ disabled: "disabled";
3952
+ }>>;
3953
+ readinessProfile: z.ZodOptional<z.ZodString>;
3954
+ resourceIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
3955
+ readinessContract: z.ZodOptional<z.ZodObject<{
3956
+ requiredObjects: z.ZodDefault<z.ZodArray<z.ZodString>>;
3957
+ requiredCatalogs: z.ZodArray<z.ZodString>;
3958
+ }, z.core.$strict>>;
3959
+ }, z.core.$strict>;
3960
+ type JsonPrimitive = string | number | boolean | null;
3961
+ type JsonValue = JsonPrimitive | JsonValue[] | {
3962
+ [key: string]: JsonValue;
3963
+ };
3964
+ /** Explicit interface needed to annotate the recursive SystemEntrySchema. */
3965
+ interface SystemEntry {
3966
+ id: string;
3967
+ label?: string;
3968
+ title?: string;
3969
+ description?: string;
3970
+ kind?: 'product' | 'operational' | 'platform' | 'diagnostic';
3971
+ parentSystemId?: string;
3972
+ ui?: {
3973
+ path: string;
3974
+ surfaces: string[];
3975
+ icon?: string;
3976
+ };
3977
+ lifecycle?: 'draft' | 'beta' | 'active' | 'deprecated' | 'archived';
3978
+ responsibleRoleId?: string;
3979
+ governedByKnowledge?: string[];
3980
+ actions?: {
3981
+ actionId: string;
3982
+ intent: 'exposes' | 'consumes';
3983
+ invocation?: unknown;
3984
+ }[];
3985
+ drivesGoals?: string[];
3986
+ apiInterface?: z.infer<typeof SystemApiInterfaceSchema>;
3987
+ path?: string;
3988
+ icon?: string;
3989
+ uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
3990
+ enabled?: boolean;
3991
+ order: number;
3992
+ config?: Record<string, JsonValue>;
3993
+ ontology?: OntologyScope;
3994
+ systems?: Record<string, SystemEntry>;
3995
+ subsystems?: Record<string, SystemEntry>;
3996
+ }
3997
+
3998
+ declare const SurfaceTypeSchema: z.ZodEnum<{
3999
+ dashboard: "dashboard";
4000
+ settings: "settings";
4001
+ graph: "graph";
4002
+ page: "page";
4003
+ detail: "detail";
4004
+ list: "list";
4005
+ }>;
4006
+ interface SidebarSurfaceNode {
4007
+ type: 'surface';
4008
+ label: string;
4009
+ path: string;
4010
+ surfaceType: z.infer<typeof SurfaceTypeSchema>;
4011
+ description?: string;
4012
+ icon?: string;
4013
+ order?: number;
4014
+ targets?: {
4015
+ systems?: string[];
4016
+ entities?: string[];
4017
+ resources?: string[];
4018
+ actions?: string[];
4019
+ };
4020
+ devOnly?: boolean;
4021
+ requiresAdmin?: boolean;
4022
+ }
4023
+ interface SidebarGroupNode {
4024
+ type: 'group';
4025
+ label: string;
4026
+ description?: string;
4027
+ icon?: string;
4028
+ order?: number;
4029
+ children: Record<string, SidebarNode>;
4030
+ }
4031
+ type SidebarNode = SidebarSurfaceNode | SidebarGroupNode;
4032
+
4033
+ /**
4034
+ * Registration surface for the generic readiness engine (`./engine`).
4035
+ *
4036
+ * This module owns two independent extension points so `./engine` never has
4037
+ * to import anything from `business/**`:
4038
+ *
4039
+ * - `registerBuiltInReadinessProfile` — a profile id (e.g. `sales.lead-gen.api`)
4040
+ * maps to structural validation logic plus an optional model-preparation
4041
+ * hook run before ontology compilation (e.g. injecting a derived catalog).
4042
+ * This is the ONE readiness-profile registry (`_builtInProfileValidators`
4043
+ * below) — `../domains/systems`'s `isBuiltInReadinessProfile` /
4044
+ * `lookupReadinessProfile` read it directly via `getBuiltInReadinessProfile`
4045
+ * rather than mirroring registrations into a second map, so a profile id
4046
+ * can never read as built-in without an actual registered validator.
4047
+ * - `registerReadinessInterfaceMarker` — a `(systemPath, interfaceKey)` pair
4048
+ * maps to a synthesized interface marker for interfaces that are not
4049
+ * authored on `system.apiInterface` (e.g. the lead-gen/CRM handoff bridge,
4050
+ * which is derived from scoped resources rather than declared directly).
4051
+ *
4052
+ * `business/acquisition/ontology-validation.ts` calls both at module load to
4053
+ * register its three built-in profiles. Both registries are module-level
4054
+ * mutable maps with no reset function. Reachable by a tenant via the
4055
+ * `./organization-model/readiness` subpath (see `./index`).
4056
+ */
4057
+
4058
+ type SystemInterfaceReadinessIssueFamily = 'SYSTEM_INTERFACE_MISSING' | 'SYSTEM_INTERFACE_DISABLED' | 'SYSTEM_INTERFACE_INVALID' | 'SYSTEM_INTERFACE_NOT_READY' | 'SYSTEM_BRIDGE_NOT_READY'
4059
+ /**
4060
+ * The deployed OM snapshot hash does not match the canonical source hash.
4061
+ * Redeploy with `pnpm operations:deploy` to refresh the snapshot.
4062
+ */
4063
+ | 'STALE_OM_SNAPSHOT';
4064
+ interface SystemInterfaceReadinessIssue {
4065
+ family: SystemInterfaceReadinessIssueFamily;
4066
+ code: string;
4067
+ path?: string;
4068
+ ref?: string;
4069
+ message: string;
4070
+ }
4071
+
4072
+ declare const OrganizationModelSchema: z.ZodObject<{
4073
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4074
+ snapshotHash: z.ZodOptional<z.ZodString>;
4075
+ domainMetadata: z.ZodPipe<z.ZodDefault<z.ZodObject<{
4076
+ branding: z.ZodOptional<z.ZodObject<{
4077
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4078
+ lastModified: z.ZodString;
4079
+ }, z.core.$strip>>;
4080
+ identity: z.ZodOptional<z.ZodObject<{
4081
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4082
+ lastModified: z.ZodString;
4083
+ }, z.core.$strip>>;
4084
+ clients: z.ZodOptional<z.ZodObject<{
4085
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4086
+ lastModified: z.ZodString;
4087
+ }, z.core.$strip>>;
4088
+ customers: z.ZodOptional<z.ZodObject<{
4089
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4090
+ lastModified: z.ZodString;
4091
+ }, z.core.$strip>>;
4092
+ offerings: z.ZodOptional<z.ZodObject<{
4093
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4094
+ lastModified: z.ZodString;
4095
+ }, z.core.$strip>>;
4096
+ roles: z.ZodOptional<z.ZodObject<{
4097
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4098
+ lastModified: z.ZodString;
4099
+ }, z.core.$strip>>;
4100
+ goals: z.ZodOptional<z.ZodObject<{
4101
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4102
+ lastModified: z.ZodString;
4103
+ }, z.core.$strip>>;
4104
+ systems: z.ZodOptional<z.ZodObject<{
4105
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4106
+ lastModified: z.ZodString;
4107
+ }, z.core.$strip>>;
4108
+ ontology: z.ZodOptional<z.ZodObject<{
4109
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4110
+ lastModified: z.ZodString;
4111
+ }, z.core.$strip>>;
4112
+ resources: z.ZodOptional<z.ZodObject<{
4113
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4114
+ lastModified: z.ZodString;
4115
+ }, z.core.$strip>>;
4116
+ topology: z.ZodOptional<z.ZodObject<{
4117
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4118
+ lastModified: z.ZodString;
4119
+ }, z.core.$strip>>;
4120
+ actions: z.ZodOptional<z.ZodObject<{
4121
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4122
+ lastModified: z.ZodString;
4123
+ }, z.core.$strip>>;
4124
+ entities: z.ZodOptional<z.ZodObject<{
4125
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4126
+ lastModified: z.ZodString;
4127
+ }, z.core.$strip>>;
4128
+ knowledge: z.ZodOptional<z.ZodObject<{
4129
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4130
+ lastModified: z.ZodString;
4131
+ }, z.core.$strip>>;
4132
+ }, z.core.$strip>>, z.ZodTransform<{
4133
+ branding: {
4134
+ version: 1;
4135
+ lastModified: string;
4136
+ };
4137
+ identity: {
4138
+ version: 1;
4139
+ lastModified: string;
4140
+ };
4141
+ clients: {
4142
+ version: 1;
4143
+ lastModified: string;
4144
+ };
4145
+ customers: {
4146
+ version: 1;
4147
+ lastModified: string;
4148
+ };
4149
+ offerings: {
4150
+ version: 1;
4151
+ lastModified: string;
4152
+ };
4153
+ roles: {
4154
+ version: 1;
4155
+ lastModified: string;
4156
+ };
4157
+ goals: {
4158
+ version: 1;
4159
+ lastModified: string;
4160
+ };
4161
+ systems: {
4162
+ version: 1;
4163
+ lastModified: string;
4164
+ };
4165
+ ontology: {
4166
+ version: 1;
4167
+ lastModified: string;
4168
+ };
4169
+ resources: {
4170
+ version: 1;
4171
+ lastModified: string;
4172
+ };
4173
+ topology: {
4174
+ version: 1;
4175
+ lastModified: string;
4176
+ };
4177
+ actions: {
4178
+ version: 1;
4179
+ lastModified: string;
4180
+ };
4181
+ entities: {
4182
+ version: 1;
4183
+ lastModified: string;
4184
+ };
4185
+ knowledge: {
4186
+ version: 1;
4187
+ lastModified: string;
4188
+ };
4189
+ }, {
4190
+ branding?: {
4191
+ version: 1;
4192
+ lastModified: string;
4193
+ } | undefined;
4194
+ identity?: {
4195
+ version: 1;
4196
+ lastModified: string;
4197
+ } | undefined;
4198
+ clients?: {
4199
+ version: 1;
4200
+ lastModified: string;
4201
+ } | undefined;
4202
+ customers?: {
4203
+ version: 1;
4204
+ lastModified: string;
4205
+ } | undefined;
4206
+ offerings?: {
4207
+ version: 1;
4208
+ lastModified: string;
4209
+ } | undefined;
4210
+ roles?: {
4211
+ version: 1;
4212
+ lastModified: string;
4213
+ } | undefined;
4214
+ goals?: {
4215
+ version: 1;
4216
+ lastModified: string;
4217
+ } | undefined;
4218
+ systems?: {
4219
+ version: 1;
4220
+ lastModified: string;
4221
+ } | undefined;
4222
+ ontology?: {
4223
+ version: 1;
4224
+ lastModified: string;
4225
+ } | undefined;
4226
+ resources?: {
4227
+ version: 1;
4228
+ lastModified: string;
4229
+ } | undefined;
4230
+ topology?: {
4231
+ version: 1;
4232
+ lastModified: string;
4233
+ } | undefined;
4234
+ actions?: {
4235
+ version: 1;
4236
+ lastModified: string;
4237
+ } | undefined;
4238
+ entities?: {
4239
+ version: 1;
4240
+ lastModified: string;
4241
+ } | undefined;
4242
+ knowledge?: {
4243
+ version: 1;
4244
+ lastModified: string;
4245
+ } | undefined;
4246
+ }>>;
4247
+ branding: z.ZodDefault<z.ZodObject<{
4248
+ organizationName: z.ZodString;
4249
+ productName: z.ZodString;
4250
+ shortName: z.ZodString;
4251
+ description: z.ZodOptional<z.ZodString>;
4252
+ logos: z.ZodDefault<z.ZodObject<{
4253
+ light: z.ZodOptional<z.ZodString>;
4254
+ dark: z.ZodOptional<z.ZodString>;
4255
+ }, z.core.$strip>>;
4256
+ voice: z.ZodOptional<z.ZodString>;
4257
+ tagline: z.ZodOptional<z.ZodString>;
4258
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
4259
+ themePresetId: z.ZodOptional<z.ZodString>;
4260
+ }, z.core.$loose>>;
4261
+ navigation: z.ZodDefault<z.ZodObject<{
4262
+ sidebar: z.ZodDefault<z.ZodObject<{
4263
+ primary: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4264
+ bottom: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SidebarNode, unknown, z.core.$ZodTypeInternals<SidebarNode, unknown>>>>;
4265
+ }, z.core.$strip>>;
4266
+ topbar: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4267
+ id: z.ZodString;
4268
+ label: z.ZodString;
4269
+ tooltip: z.ZodOptional<z.ZodString>;
4270
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
4271
+ message: "message";
4272
+ error: "error";
4273
+ agent: "agent";
4274
+ workflow: "workflow";
4275
+ "google-sheets": "google-sheets";
4276
+ dashboard: "dashboard";
4277
+ calendar: "calendar";
4278
+ sales: "sales";
4279
+ crm: "crm";
4280
+ "lead-gen": "lead-gen";
4281
+ projects: "projects";
4282
+ clients: "clients";
4283
+ operations: "operations";
4284
+ monitoring: "monitoring";
4285
+ knowledge: "knowledge";
4286
+ settings: "settings";
4287
+ admin: "admin";
4288
+ archive: "archive";
4289
+ business: "business";
4290
+ finance: "finance";
4291
+ platform: "platform";
4292
+ seo: "seo";
4293
+ playbook: "playbook";
4294
+ strategy: "strategy";
4295
+ reference: "reference";
4296
+ integration: "integration";
4297
+ database: "database";
4298
+ user: "user";
4299
+ team: "team";
4300
+ gmail: "gmail";
4301
+ attio: "attio";
4302
+ overview: "overview";
4303
+ "command-view": "command-view";
4304
+ "command-queue": "command-queue";
4305
+ pipeline: "pipeline";
4306
+ lists: "lists";
4307
+ resources: "resources";
4308
+ approve: "approve";
4309
+ reject: "reject";
4310
+ retry: "retry";
4311
+ edit: "edit";
4312
+ view: "view";
4313
+ launch: "launch";
4314
+ "message-plus": "message-plus";
4315
+ escalate: "escalate";
4316
+ promote: "promote";
4317
+ submit: "submit";
4318
+ email: "email";
4319
+ success: "success";
4320
+ warning: "warning";
4321
+ info: "info";
4322
+ pending: "pending";
4323
+ bolt: "bolt";
4324
+ building: "building";
4325
+ briefcase: "briefcase";
4326
+ apps: "apps";
4327
+ graph: "graph";
4328
+ shield: "shield";
4329
+ users: "users";
4330
+ "chart-bar": "chart-bar";
4331
+ search: "search";
4332
+ }>, z.ZodString]>>;
4333
+ order: z.ZodOptional<z.ZodNumber>;
4334
+ enabled: z.ZodDefault<z.ZodBoolean>;
4335
+ devOnly: z.ZodOptional<z.ZodBoolean>;
4336
+ requiresAdmin: z.ZodOptional<z.ZodBoolean>;
4337
+ targets: z.ZodOptional<z.ZodDefault<z.ZodObject<{
4338
+ systems: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4339
+ entities: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4340
+ resources: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4341
+ actions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4342
+ }, z.core.$strip>>>;
4343
+ }, z.core.$strip>>>;
4344
+ }, z.core.$strip>>;
4345
+ identity: z.ZodDefault<z.ZodObject<{
4346
+ mission: z.ZodDefault<z.ZodString>;
4347
+ vision: z.ZodDefault<z.ZodString>;
4348
+ legalName: z.ZodDefault<z.ZodString>;
4349
+ entityType: z.ZodDefault<z.ZodString>;
4350
+ jurisdiction: z.ZodDefault<z.ZodString>;
4351
+ industryCategory: z.ZodDefault<z.ZodString>;
4352
+ geographicFocus: z.ZodDefault<z.ZodString>;
4353
+ timeZone: z.ZodDefault<z.ZodString>;
4354
+ businessHours: z.ZodDefault<z.ZodObject<{
4355
+ monday: z.ZodOptional<z.ZodObject<{
4356
+ open: z.ZodString;
4357
+ close: z.ZodString;
4358
+ }, z.core.$strip>>;
4359
+ tuesday: z.ZodOptional<z.ZodObject<{
4360
+ open: z.ZodString;
4361
+ close: z.ZodString;
4362
+ }, z.core.$strip>>;
4363
+ wednesday: z.ZodOptional<z.ZodObject<{
4364
+ open: z.ZodString;
4365
+ close: z.ZodString;
4366
+ }, z.core.$strip>>;
4367
+ thursday: z.ZodOptional<z.ZodObject<{
4368
+ open: z.ZodString;
4369
+ close: z.ZodString;
4370
+ }, z.core.$strip>>;
4371
+ friday: z.ZodOptional<z.ZodObject<{
4372
+ open: z.ZodString;
4373
+ close: z.ZodString;
4374
+ }, z.core.$strip>>;
4375
+ saturday: z.ZodOptional<z.ZodObject<{
4376
+ open: z.ZodString;
4377
+ close: z.ZodString;
4378
+ }, z.core.$strip>>;
4379
+ sunday: z.ZodOptional<z.ZodObject<{
4380
+ open: z.ZodString;
4381
+ close: z.ZodString;
4382
+ }, z.core.$strip>>;
4383
+ }, z.core.$strip>>;
4384
+ clientBrief: z.ZodDefault<z.ZodString>;
4385
+ organizationName: z.ZodOptional<z.ZodString>;
4386
+ productName: z.ZodOptional<z.ZodString>;
4387
+ shortName: z.ZodOptional<z.ZodString>;
4388
+ description: z.ZodOptional<z.ZodString>;
4389
+ }, z.core.$loose>>;
4390
+ clients: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4391
+ id: z.ZodString;
4392
+ slug: z.ZodString;
4393
+ name: z.ZodString;
4394
+ status: z.ZodDefault<z.ZodEnum<{
4395
+ active: "active";
4396
+ onboarding: "onboarding";
4397
+ paused: "paused";
4398
+ completed: "completed";
4399
+ churned: "churned";
4400
+ }>>;
4401
+ source: z.ZodOptional<z.ZodString>;
4402
+ identity: z.ZodDefault<z.ZodObject<{
4403
+ organizationName: z.ZodOptional<z.ZodString>;
4404
+ shortName: z.ZodOptional<z.ZodString>;
4405
+ clientBrief: z.ZodDefault<z.ZodString>;
4406
+ geographicFocus: z.ZodDefault<z.ZodArray<z.ZodString>>;
4407
+ timeZone: z.ZodDefault<z.ZodString>;
4408
+ }, z.core.$loose>>;
4409
+ branding: z.ZodDefault<z.ZodObject<{
4410
+ voice: z.ZodOptional<z.ZodString>;
4411
+ tagline: z.ZodOptional<z.ZodString>;
4412
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
4413
+ }, z.core.$loose>>;
4414
+ workspace: z.ZodDefault<z.ZodObject<{
4415
+ kind: z.ZodOptional<z.ZodEnum<{
4416
+ "external-project": "external-project";
4417
+ "internal-project": "internal-project";
4418
+ none: "none";
4419
+ }>>;
4420
+ owner: z.ZodOptional<z.ZodEnum<{
4421
+ platform: "platform";
4422
+ client: "client";
4423
+ developer: "developer";
4424
+ }>>;
4425
+ projectId: z.ZodOptional<z.ZodString>;
4426
+ workspacePath: z.ZodOptional<z.ZodString>;
4427
+ }, z.core.$loose>>;
4428
+ links: z.ZodDefault<z.ZodObject<{
4429
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
4430
+ primaryCompanyId: z.ZodOptional<z.ZodString>;
4431
+ primaryContactId: z.ZodOptional<z.ZodString>;
4432
+ sourceDealId: z.ZodOptional<z.ZodString>;
4433
+ }, z.core.$strip>>;
4434
+ prompts: z.ZodDefault<z.ZodObject<{
4435
+ defaultContext: z.ZodDefault<z.ZodString>;
4436
+ }, z.core.$loose>>;
4437
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
4438
+ customValues: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
4439
+ }, z.core.$strict>>>>;
4440
+ customers: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4441
+ id: z.ZodString;
4442
+ order: z.ZodNumber;
4443
+ name: z.ZodDefault<z.ZodString>;
4444
+ description: z.ZodDefault<z.ZodString>;
4445
+ jobsToBeDone: z.ZodDefault<z.ZodString>;
4446
+ pains: z.ZodDefault<z.ZodArray<z.ZodString>>;
4447
+ gains: z.ZodDefault<z.ZodArray<z.ZodString>>;
4448
+ firmographics: z.ZodDefault<z.ZodObject<{
4449
+ industry: z.ZodOptional<z.ZodString>;
4450
+ companySize: z.ZodOptional<z.ZodString>;
4451
+ region: z.ZodOptional<z.ZodString>;
4452
+ }, z.core.$strip>>;
4453
+ valueProp: z.ZodDefault<z.ZodString>;
4454
+ }, z.core.$strip>>>>;
4455
+ offerings: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4456
+ id: z.ZodString;
4457
+ order: z.ZodNumber;
4458
+ name: z.ZodDefault<z.ZodString>;
4459
+ description: z.ZodDefault<z.ZodString>;
4460
+ pricingModel: z.ZodDefault<z.ZodEnum<{
4461
+ custom: "custom";
4462
+ "one-time": "one-time";
4463
+ subscription: "subscription";
4464
+ "usage-based": "usage-based";
4465
+ }>>;
4466
+ price: z.ZodDefault<z.ZodNumber>;
4467
+ currency: z.ZodDefault<z.ZodString>;
4468
+ targetSegmentIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
4469
+ deliveryFeatureId: z.ZodOptional<z.ZodString>;
4470
+ }, z.core.$strip>>>>;
4471
+ roles: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4472
+ id: z.ZodString;
4473
+ order: z.ZodNumber;
4474
+ title: z.ZodString;
4475
+ responsibilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
4476
+ reportsToId: z.ZodOptional<z.ZodString>;
4477
+ heldBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
4478
+ kind: z.ZodLiteral<"human">;
4479
+ userId: z.ZodString;
4480
+ }, z.core.$strip>, z.ZodObject<{
4481
+ kind: z.ZodLiteral<"agent">;
4482
+ agentId: z.ZodString;
4483
+ }, z.core.$strip>, z.ZodObject<{
4484
+ kind: z.ZodLiteral<"team">;
4485
+ memberIds: z.ZodArray<z.ZodString>;
4486
+ }, z.core.$strip>], "kind">, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
4487
+ kind: z.ZodLiteral<"human">;
4488
+ userId: z.ZodString;
4489
+ }, z.core.$strip>, z.ZodObject<{
4490
+ kind: z.ZodLiteral<"agent">;
4491
+ agentId: z.ZodString;
4492
+ }, z.core.$strip>, z.ZodObject<{
4493
+ kind: z.ZodLiteral<"team">;
4494
+ memberIds: z.ZodArray<z.ZodString>;
4495
+ }, z.core.$strip>], "kind">>]>>;
4496
+ responsibleFor: z.ZodOptional<z.ZodArray<z.ZodString>>;
4497
+ }, z.core.$strip>>>>;
4498
+ goals: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4499
+ id: z.ZodString;
4500
+ order: z.ZodNumber;
4501
+ description: z.ZodString;
4502
+ periodStart: z.ZodString;
4503
+ periodEnd: z.ZodString;
4504
+ keyResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
4505
+ id: z.ZodString;
4506
+ description: z.ZodString;
4507
+ targetMetric: z.ZodString;
4508
+ currentValue: z.ZodDefault<z.ZodNumber>;
4509
+ targetValue: z.ZodOptional<z.ZodNumber>;
4510
+ }, z.core.$strip>>>;
4511
+ }, z.core.$strip>>>>;
4512
+ systems: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<SystemEntry, unknown, z.core.$ZodTypeInternals<SystemEntry, unknown>>>>>;
4513
+ ontology: z.ZodDefault<z.ZodDefault<z.ZodObject<{
4514
+ objectTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4515
+ id: z.ZodString;
4516
+ label: z.ZodOptional<z.ZodString>;
4517
+ description: z.ZodOptional<z.ZodString>;
4518
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4519
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4520
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4521
+ storage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4522
+ }, z.core.$loose>>>>;
4523
+ linkTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4524
+ id: z.ZodString;
4525
+ label: z.ZodOptional<z.ZodString>;
4526
+ description: z.ZodOptional<z.ZodString>;
4527
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4528
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4529
+ from: z.ZodString;
4530
+ to: z.ZodString;
4531
+ cardinality: z.ZodOptional<z.ZodString>;
4532
+ via: z.ZodOptional<z.ZodString>;
4533
+ }, z.core.$loose>>>>;
4534
+ actionTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4535
+ id: z.ZodString;
4536
+ label: z.ZodOptional<z.ZodString>;
4537
+ description: z.ZodOptional<z.ZodString>;
4538
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4539
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4540
+ actsOn: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4541
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4542
+ effects: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4543
+ }, z.core.$loose>>>>;
4544
+ catalogTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4545
+ id: z.ZodString;
4546
+ label: z.ZodOptional<z.ZodString>;
4547
+ description: z.ZodOptional<z.ZodString>;
4548
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4549
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4550
+ kind: z.ZodOptional<z.ZodString>;
4551
+ appliesTo: z.ZodOptional<z.ZodString>;
4552
+ entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4553
+ }, z.core.$loose>>>>;
4554
+ eventTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4555
+ id: z.ZodString;
4556
+ label: z.ZodOptional<z.ZodString>;
4557
+ description: z.ZodOptional<z.ZodString>;
4558
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4559
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4560
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4561
+ }, z.core.$loose>>>>;
4562
+ interfaceTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4563
+ id: z.ZodString;
4564
+ label: z.ZodOptional<z.ZodString>;
4565
+ description: z.ZodOptional<z.ZodString>;
4566
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4567
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4568
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4569
+ }, z.core.$loose>>>>;
4570
+ valueTypes: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4571
+ id: z.ZodString;
4572
+ label: z.ZodOptional<z.ZodString>;
4573
+ description: z.ZodOptional<z.ZodString>;
4574
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4575
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4576
+ primitive: z.ZodOptional<z.ZodString>;
4577
+ }, z.core.$loose>>>>;
4578
+ sharedProperties: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4579
+ id: z.ZodString;
4580
+ label: z.ZodOptional<z.ZodString>;
4581
+ description: z.ZodOptional<z.ZodString>;
4582
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4583
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4584
+ valueType: z.ZodOptional<z.ZodString>;
4585
+ searchable: z.ZodOptional<z.ZodBoolean>;
4586
+ pii: z.ZodOptional<z.ZodBoolean>;
4587
+ }, z.core.$loose>>>>;
4588
+ groups: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4589
+ id: z.ZodString;
4590
+ label: z.ZodOptional<z.ZodString>;
4591
+ description: z.ZodOptional<z.ZodString>;
4592
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4593
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4594
+ members: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4595
+ }, z.core.$loose>>>>;
4596
+ endpoints: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4597
+ id: z.ZodString;
4598
+ label: z.ZodOptional<z.ZodString>;
4599
+ description: z.ZodOptional<z.ZodString>;
4600
+ ownerSystemId: z.ZodOptional<z.ZodString>;
4601
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
4602
+ route: z.ZodOptional<z.ZodString>;
4603
+ }, z.core.$loose>>>>;
4604
+ }, z.core.$strip>>>;
4605
+ resources: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
4606
+ id: z.ZodString;
4607
+ order: z.ZodDefault<z.ZodNumber>;
4608
+ systemPath: z.ZodString;
4609
+ title: z.ZodOptional<z.ZodString>;
4610
+ description: z.ZodOptional<z.ZodString>;
4611
+ ownerRoleId: z.ZodOptional<z.ZodString>;
4612
+ status: z.ZodEnum<{
4613
+ active: "active";
4614
+ deprecated: "deprecated";
4615
+ archived: "archived";
4616
+ }>;
4617
+ ontology: z.ZodOptional<z.ZodObject<{
4618
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4619
+ primaryAction: z.ZodOptional<z.ZodString>;
4620
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
4621
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
4622
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
4623
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
4624
+ contract: z.ZodOptional<z.ZodObject<{
4625
+ input: z.ZodOptional<z.ZodString>;
4626
+ output: z.ZodOptional<z.ZodString>;
4627
+ }, z.core.$strip>>;
4628
+ }, z.core.$strip>>;
4629
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4630
+ path: z.ZodString;
4631
+ role: z.ZodEnum<{
4632
+ entrypoint: "entrypoint";
4633
+ handler: "handler";
4634
+ schema: "schema";
4635
+ test: "test";
4636
+ docs: "docs";
4637
+ config: "config";
4638
+ }>;
4639
+ symbol: z.ZodOptional<z.ZodString>;
4640
+ description: z.ZodOptional<z.ZodString>;
4641
+ }, z.core.$strip>>>;
4642
+ kind: z.ZodLiteral<"workflow">;
4643
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
4644
+ eventKey: z.ZodString;
4645
+ label: z.ZodString;
4646
+ payloadSchema: z.ZodOptional<z.ZodString>;
4647
+ lifecycle: z.ZodOptional<z.ZodEnum<{
4648
+ active: "active";
4649
+ deprecated: "deprecated";
4650
+ draft: "draft";
4651
+ beta: "beta";
4652
+ archived: "archived";
4653
+ }>>;
4654
+ }, z.core.$strip>>>;
4655
+ }, z.core.$strip>, z.ZodObject<{
4656
+ id: z.ZodString;
4657
+ order: z.ZodDefault<z.ZodNumber>;
4658
+ systemPath: z.ZodString;
4659
+ title: z.ZodOptional<z.ZodString>;
4660
+ description: z.ZodOptional<z.ZodString>;
4661
+ ownerRoleId: z.ZodOptional<z.ZodString>;
4662
+ status: z.ZodEnum<{
4663
+ active: "active";
4664
+ deprecated: "deprecated";
4665
+ archived: "archived";
4666
+ }>;
4667
+ ontology: z.ZodOptional<z.ZodObject<{
4668
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4669
+ primaryAction: z.ZodOptional<z.ZodString>;
4670
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
4671
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
4672
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
4673
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
4674
+ contract: z.ZodOptional<z.ZodObject<{
4675
+ input: z.ZodOptional<z.ZodString>;
4676
+ output: z.ZodOptional<z.ZodString>;
4677
+ }, z.core.$strip>>;
4678
+ }, z.core.$strip>>;
4679
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4680
+ path: z.ZodString;
4681
+ role: z.ZodEnum<{
4682
+ entrypoint: "entrypoint";
4683
+ handler: "handler";
4684
+ schema: "schema";
4685
+ test: "test";
4686
+ docs: "docs";
4687
+ config: "config";
4688
+ }>;
4689
+ symbol: z.ZodOptional<z.ZodString>;
4690
+ description: z.ZodOptional<z.ZodString>;
4691
+ }, z.core.$strip>>>;
4692
+ kind: z.ZodLiteral<"agent">;
4693
+ agentKind: z.ZodEnum<{
4694
+ platform: "platform";
4695
+ orchestrator: "orchestrator";
4696
+ specialist: "specialist";
4697
+ utility: "utility";
4698
+ }>;
4699
+ actsAsRoleId: z.ZodOptional<z.ZodString>;
4700
+ sessionCapable: z.ZodBoolean;
4701
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
4702
+ kind: z.ZodLiteral<"slash-command">;
4703
+ command: z.ZodString;
4704
+ toolFactory: z.ZodOptional<z.ZodString>;
4705
+ }, z.core.$strip>, z.ZodObject<{
4706
+ kind: z.ZodLiteral<"mcp-tool">;
4707
+ server: z.ZodString;
4708
+ name: z.ZodString;
4709
+ }, z.core.$strip>, z.ZodObject<{
4710
+ kind: z.ZodLiteral<"api-endpoint">;
4711
+ method: z.ZodEnum<{
4712
+ GET: "GET";
4713
+ POST: "POST";
4714
+ PATCH: "PATCH";
4715
+ DELETE: "DELETE";
4716
+ }>;
4717
+ path: z.ZodString;
4718
+ requestSchema: z.ZodOptional<z.ZodString>;
4719
+ responseSchema: z.ZodOptional<z.ZodString>;
4720
+ }, z.core.$strip>, z.ZodObject<{
4721
+ kind: z.ZodLiteral<"script-execution">;
4722
+ resourceId: z.ZodString;
4723
+ }, z.core.$strip>], "kind">>>;
4724
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
4725
+ eventKey: z.ZodString;
4726
+ label: z.ZodString;
4727
+ payloadSchema: z.ZodOptional<z.ZodString>;
4728
+ lifecycle: z.ZodOptional<z.ZodEnum<{
4729
+ active: "active";
4730
+ deprecated: "deprecated";
4731
+ draft: "draft";
4732
+ beta: "beta";
4733
+ archived: "archived";
4734
+ }>>;
4735
+ }, z.core.$strip>>>;
4736
+ }, z.core.$strip>, z.ZodObject<{
4737
+ id: z.ZodString;
4738
+ order: z.ZodDefault<z.ZodNumber>;
4739
+ systemPath: z.ZodString;
4740
+ title: z.ZodOptional<z.ZodString>;
4741
+ description: z.ZodOptional<z.ZodString>;
4742
+ ownerRoleId: z.ZodOptional<z.ZodString>;
4743
+ status: z.ZodEnum<{
4744
+ active: "active";
4745
+ deprecated: "deprecated";
4746
+ archived: "archived";
4747
+ }>;
4748
+ ontology: z.ZodOptional<z.ZodObject<{
4749
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4750
+ primaryAction: z.ZodOptional<z.ZodString>;
4751
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
4752
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
4753
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
4754
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
4755
+ contract: z.ZodOptional<z.ZodObject<{
4756
+ input: z.ZodOptional<z.ZodString>;
4757
+ output: z.ZodOptional<z.ZodString>;
4758
+ }, z.core.$strip>>;
4759
+ }, z.core.$strip>>;
4760
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4761
+ path: z.ZodString;
4762
+ role: z.ZodEnum<{
4763
+ entrypoint: "entrypoint";
4764
+ handler: "handler";
4765
+ schema: "schema";
4766
+ test: "test";
4767
+ docs: "docs";
4768
+ config: "config";
4769
+ }>;
4770
+ symbol: z.ZodOptional<z.ZodString>;
4771
+ description: z.ZodOptional<z.ZodString>;
4772
+ }, z.core.$strip>>>;
4773
+ kind: z.ZodLiteral<"integration">;
4774
+ provider: z.ZodString;
4775
+ }, z.core.$strip>, z.ZodObject<{
4776
+ id: z.ZodString;
4777
+ order: z.ZodDefault<z.ZodNumber>;
4778
+ systemPath: z.ZodString;
4779
+ title: z.ZodOptional<z.ZodString>;
4780
+ description: z.ZodOptional<z.ZodString>;
4781
+ ownerRoleId: z.ZodOptional<z.ZodString>;
4782
+ status: z.ZodEnum<{
4783
+ active: "active";
4784
+ deprecated: "deprecated";
4785
+ archived: "archived";
4786
+ }>;
4787
+ ontology: z.ZodOptional<z.ZodObject<{
4788
+ actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4789
+ primaryAction: z.ZodOptional<z.ZodString>;
4790
+ reads: z.ZodOptional<z.ZodArray<z.ZodString>>;
4791
+ writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
4792
+ usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
4793
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
4794
+ contract: z.ZodOptional<z.ZodObject<{
4795
+ input: z.ZodOptional<z.ZodString>;
4796
+ output: z.ZodOptional<z.ZodString>;
4797
+ }, z.core.$strip>>;
4798
+ }, z.core.$strip>>;
4799
+ codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4800
+ path: z.ZodString;
4801
+ role: z.ZodEnum<{
4802
+ entrypoint: "entrypoint";
4803
+ handler: "handler";
4804
+ schema: "schema";
4805
+ test: "test";
4806
+ docs: "docs";
4807
+ config: "config";
4808
+ }>;
4809
+ symbol: z.ZodOptional<z.ZodString>;
4810
+ description: z.ZodOptional<z.ZodString>;
4811
+ }, z.core.$strip>>>;
4812
+ kind: z.ZodLiteral<"script">;
4813
+ language: z.ZodEnum<{
4814
+ shell: "shell";
4815
+ sql: "sql";
4816
+ typescript: "typescript";
4817
+ python: "python";
4818
+ }>;
4819
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
4820
+ file: z.ZodString;
4821
+ }, z.core.$strip>]>;
4822
+ }, z.core.$strip>], "kind">>>>;
4823
+ topology: z.ZodDefault<z.ZodDefault<z.ZodObject<{
4824
+ version: z.ZodDefault<z.ZodLiteral<1>>;
4825
+ relationships: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4826
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
4827
+ kind: z.ZodLiteral<"system">;
4828
+ id: z.ZodString;
4829
+ }, z.core.$strip>, z.ZodObject<{
4830
+ kind: z.ZodLiteral<"resource">;
4831
+ id: z.ZodString;
4832
+ }, z.core.$strip>, z.ZodObject<{
4833
+ kind: z.ZodLiteral<"ontology">;
4834
+ id: z.ZodString;
4835
+ }, z.core.$strip>, z.ZodObject<{
4836
+ kind: z.ZodLiteral<"role">;
4837
+ id: z.ZodString;
4838
+ }, z.core.$strip>, z.ZodObject<{
4839
+ kind: z.ZodLiteral<"trigger">;
4840
+ id: z.ZodString;
4841
+ }, z.core.$strip>, z.ZodObject<{
4842
+ kind: z.ZodLiteral<"humanCheckpoint">;
4843
+ id: z.ZodString;
4844
+ }, z.core.$strip>, z.ZodObject<{
4845
+ kind: z.ZodLiteral<"externalResource">;
4846
+ id: z.ZodString;
4847
+ }, z.core.$strip>], "kind">;
4848
+ kind: z.ZodEnum<{
4849
+ triggers: "triggers";
4850
+ uses: "uses";
4851
+ approval: "approval";
4852
+ }>;
4853
+ to: z.ZodDiscriminatedUnion<[z.ZodObject<{
4854
+ kind: z.ZodLiteral<"system">;
4855
+ id: z.ZodString;
4856
+ }, z.core.$strip>, z.ZodObject<{
4857
+ kind: z.ZodLiteral<"resource">;
4858
+ id: z.ZodString;
4859
+ }, z.core.$strip>, z.ZodObject<{
4860
+ kind: z.ZodLiteral<"ontology">;
4861
+ id: z.ZodString;
4862
+ }, z.core.$strip>, z.ZodObject<{
4863
+ kind: z.ZodLiteral<"role">;
4864
+ id: z.ZodString;
4865
+ }, z.core.$strip>, z.ZodObject<{
4866
+ kind: z.ZodLiteral<"trigger">;
4867
+ id: z.ZodString;
4868
+ }, z.core.$strip>, z.ZodObject<{
4869
+ kind: z.ZodLiteral<"humanCheckpoint">;
4870
+ id: z.ZodString;
4871
+ }, z.core.$strip>, z.ZodObject<{
4872
+ kind: z.ZodLiteral<"externalResource">;
4873
+ id: z.ZodString;
4874
+ }, z.core.$strip>], "kind">;
4875
+ systemPath: z.ZodOptional<z.ZodString>;
4876
+ required: z.ZodOptional<z.ZodBoolean>;
4877
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
4878
+ }, z.core.$strip>>>;
4879
+ }, z.core.$strip>>>;
4880
+ actions: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4881
+ id: z.ZodString;
4882
+ order: z.ZodNumber;
4883
+ label: z.ZodString;
4884
+ description: z.ZodOptional<z.ZodString>;
4885
+ scope: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodObject<{
4886
+ domain: z.ZodString;
4887
+ }, z.core.$strip>]>>;
4888
+ resourceId: z.ZodOptional<z.ZodString>;
4889
+ affects: z.ZodOptional<z.ZodArray<z.ZodString>>;
4890
+ invocations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
4891
+ kind: z.ZodLiteral<"slash-command">;
4892
+ command: z.ZodString;
4893
+ toolFactory: z.ZodOptional<z.ZodString>;
4894
+ }, z.core.$strip>, z.ZodObject<{
4895
+ kind: z.ZodLiteral<"mcp-tool">;
4896
+ server: z.ZodString;
4897
+ name: z.ZodString;
4898
+ }, z.core.$strip>, z.ZodObject<{
4899
+ kind: z.ZodLiteral<"api-endpoint">;
4900
+ method: z.ZodEnum<{
4901
+ GET: "GET";
4902
+ POST: "POST";
4903
+ PATCH: "PATCH";
4904
+ DELETE: "DELETE";
4905
+ }>;
4906
+ path: z.ZodString;
4907
+ requestSchema: z.ZodOptional<z.ZodString>;
4908
+ responseSchema: z.ZodOptional<z.ZodString>;
4909
+ }, z.core.$strip>, z.ZodObject<{
4910
+ kind: z.ZodLiteral<"script-execution">;
4911
+ resourceId: z.ZodString;
4912
+ }, z.core.$strip>], "kind">>>;
4913
+ knowledge: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4914
+ lifecycle: z.ZodDefault<z.ZodEnum<{
4915
+ active: "active";
4916
+ deprecated: "deprecated";
4917
+ draft: "draft";
4918
+ beta: "beta";
4919
+ archived: "archived";
4920
+ }>>;
4921
+ }, z.core.$strip>>>>;
4922
+ entities: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4923
+ id: z.ZodString;
4924
+ order: z.ZodNumber;
4925
+ label: z.ZodString;
4926
+ description: z.ZodOptional<z.ZodString>;
4927
+ ownedBySystemId: z.ZodString;
4928
+ table: z.ZodOptional<z.ZodString>;
4929
+ rowSchema: z.ZodOptional<z.ZodString>;
4930
+ stateCatalogId: z.ZodOptional<z.ZodString>;
4931
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
4932
+ toEntity: z.ZodString;
4933
+ kind: z.ZodEnum<{
4934
+ "belongs-to": "belongs-to";
4935
+ "has-many": "has-many";
4936
+ "has-one": "has-one";
4937
+ "many-to-many": "many-to-many";
4938
+ }>;
4939
+ via: z.ZodOptional<z.ZodString>;
4940
+ label: z.ZodOptional<z.ZodString>;
4941
+ }, z.core.$strip>>>;
4942
+ }, z.core.$strip>>>>;
4943
+ knowledge: z.ZodDefault<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
4944
+ id: z.ZodString;
4945
+ kind: z.ZodEnum<{
4946
+ playbook: "playbook";
4947
+ strategy: "strategy";
4948
+ reference: "reference";
4949
+ }>;
4950
+ title: z.ZodString;
4951
+ summary: z.ZodString;
4952
+ icon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
4953
+ message: "message";
4954
+ error: "error";
4955
+ agent: "agent";
4956
+ workflow: "workflow";
4957
+ "google-sheets": "google-sheets";
4958
+ dashboard: "dashboard";
4959
+ calendar: "calendar";
4960
+ sales: "sales";
4961
+ crm: "crm";
4962
+ "lead-gen": "lead-gen";
4963
+ projects: "projects";
4964
+ clients: "clients";
4965
+ operations: "operations";
4966
+ monitoring: "monitoring";
4967
+ knowledge: "knowledge";
4968
+ settings: "settings";
4969
+ admin: "admin";
4970
+ archive: "archive";
4971
+ business: "business";
4972
+ finance: "finance";
4973
+ platform: "platform";
4974
+ seo: "seo";
4975
+ playbook: "playbook";
4976
+ strategy: "strategy";
4977
+ reference: "reference";
4978
+ integration: "integration";
4979
+ database: "database";
4980
+ user: "user";
4981
+ team: "team";
4982
+ gmail: "gmail";
4983
+ attio: "attio";
4984
+ overview: "overview";
4985
+ "command-view": "command-view";
4986
+ "command-queue": "command-queue";
4987
+ pipeline: "pipeline";
4988
+ lists: "lists";
4989
+ resources: "resources";
4990
+ approve: "approve";
4991
+ reject: "reject";
4992
+ retry: "retry";
4993
+ edit: "edit";
4994
+ view: "view";
4995
+ launch: "launch";
4996
+ "message-plus": "message-plus";
4997
+ escalate: "escalate";
4998
+ promote: "promote";
4999
+ submit: "submit";
5000
+ email: "email";
5001
+ success: "success";
5002
+ warning: "warning";
5003
+ info: "info";
5004
+ pending: "pending";
5005
+ bolt: "bolt";
5006
+ building: "building";
5007
+ briefcase: "briefcase";
5008
+ apps: "apps";
5009
+ graph: "graph";
5010
+ shield: "shield";
5011
+ users: "users";
5012
+ "chart-bar": "chart-bar";
5013
+ search: "search";
5014
+ }>, z.ZodString]>>;
5015
+ externalUrl: z.ZodOptional<z.ZodString>;
5016
+ sourceFilePath: z.ZodOptional<z.ZodString>;
5017
+ body: z.ZodString;
5018
+ links: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
5019
+ target: z.ZodObject<{
5020
+ kind: z.ZodEnum<{
5021
+ knowledge: "knowledge";
5022
+ system: "system";
5023
+ resource: "resource";
5024
+ action: "action";
5025
+ ontology: "ontology";
5026
+ role: "role";
5027
+ client: "client";
5028
+ stage: "stage";
5029
+ goal: "goal";
5030
+ "customer-segment": "customer-segment";
5031
+ offering: "offering";
5032
+ }>;
5033
+ id: z.ZodString;
5034
+ }, z.core.$strip>;
5035
+ }, z.core.$strip>, z.ZodObject<{
5036
+ nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
5037
+ }, z.core.$strip>]>, z.ZodTransform<{
5038
+ target: {
5039
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
5040
+ id: string;
5041
+ };
5042
+ nodeId: string;
5043
+ }, {
5044
+ nodeId: string;
5045
+ } | {
5046
+ target: {
5047
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "client" | "stage" | "goal" | "customer-segment" | "offering";
5048
+ id: string;
5049
+ };
5050
+ }>>>>;
5051
+ ownerIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
5052
+ updatedAt: z.ZodString;
5053
+ }, z.core.$strip>>>>;
5054
+ }, z.core.$strip>;
5055
+
5056
+ type OrganizationModel = z.infer<typeof OrganizationModelSchema>;
5057
+
5058
+ declare const CRM_API_INTERFACE: {
5059
+ readonly systemPath: "sales.crm";
5060
+ readonly interfaceKey: "api";
5061
+ readonly readinessProfile: "sales.crm.api";
5062
+ };
5063
+
3523
5064
  /**
3524
5065
  * CRM Overview API Schemas
3525
5066
  *
@@ -3695,13 +5236,6 @@ interface OrganizationGraphSystemBridge {
3695
5236
 
3696
5237
  declare const crmManifest: SystemModule;
3697
5238
 
3698
- declare const DEAL_STAGE_COLORS: Record<string, string>;
3699
- declare const DEAL_STAGE_OPTIONS: {
3700
- value: DealStage;
3701
- label: string;
3702
- }[];
3703
- declare function formatDealStageLabel(stage: string | null): string;
3704
-
3705
5239
  declare function DealsListPage(): react_jsx_runtime.JSX.Element;
3706
5240
 
3707
5241
  type DealDetail = DealDetail$1 & Pick<DealDetailResponse, 'conversation'>;
@@ -3710,8 +5244,14 @@ interface DealDetailPageProps {
3710
5244
  dealId: string;
3711
5245
  renderActions?: (deal: DealDetail) => ReactNode;
3712
5246
  onDealLoaded?: (deal: DealDetail) => void;
5247
+ /**
5248
+ * Base URL for the "Copy Booking Link" affordance. `@repo/ui` has no built-in booking
5249
+ * domain -- when omitted, the copy-link button is hidden rather than falling back to
5250
+ * a placeholder URL.
5251
+ */
5252
+ bookingUrl?: string;
3713
5253
  }
3714
- declare function DealDetailPage({ dealId, renderActions, onDealLoaded }: DealDetailPageProps): react_jsx_runtime.JSX.Element;
5254
+ declare function DealDetailPage({ dealId, renderActions, onDealLoaded, bookingUrl }: DealDetailPageProps): react_jsx_runtime.JSX.Element;
3715
5255
 
3716
5256
  type ConversationMessage = DealDetailResponse['conversation']['messages'][number];
3717
5257
  interface ConversationThreadProps {
@@ -3755,5 +5295,36 @@ declare function useUpdateCrmPrioritySettings(): _tanstack_react_query.UseMutati
3755
5295
  }, unknown>;
3756
5296
  declare function useResetCrmPrioritySettings(): _tanstack_react_query.UseMutationResult<CrmPrioritySettingsResponse, Error, void, unknown>;
3757
5297
 
3758
- export { ActivityFeedWidget, CRM_ITEMS, CompanyDetailPage, ContactDetailPage, ConversationThread, CrmOverview, CrmSettingsPage, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DEAL_STAGE_COLORS, DEAL_STAGE_OPTIONS, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, crmManifest, crmPrioritySettingsKeys, formatDealStageLabel, useCrmPipelineSummary, useCrmPrioritySettings, useCrmQuickMetrics, useRecentCrmActivity, useResetCrmPrioritySettings, useUpdateCrmPrioritySettings };
3759
- export type { ActivityFeedWidgetProps, CompanyDetailPageProps, ContactDetailPageProps, RecentActivityEntry as CrmActivityEntry, CrmActivityKind, CrmOverviewProps, CrmPrioritySettingsResponse, CrmQuickMetrics, CrmSidebarMiddleProps, MyTasksPanelProps, PipelineFunnelWidgetProps, PipelineStageSummary, QuickCreateActionsProps, SavedViewPreset, SavedViewsPanelProps };
5298
+ interface CrmApiInterfaceReadiness {
5299
+ systemPath: typeof CRM_API_INTERFACE.systemPath;
5300
+ interfaceKey: typeof CRM_API_INTERFACE.interfaceKey;
5301
+ readinessProfile?: typeof CRM_API_INTERFACE.readinessProfile;
5302
+ declared: boolean;
5303
+ ready: boolean;
5304
+ reason?: string;
5305
+ issues: SystemInterfaceReadinessIssue[];
5306
+ }
5307
+ interface CrmPipelineConfig {
5308
+ /**
5309
+ * The tenant's CRM pipeline, read from the Organization Model's bridge catalog
5310
+ * (`sales.crm:catalog/crm.pipeline`). `undefined` when the tenant's OM has no
5311
+ * authored CRM pipeline -- callers must render an empty state, not substitute
5312
+ * a default pipeline.
5313
+ */
5314
+ pipeline: StatefulPipelineDefinition | undefined;
5315
+ crmApiInterface: CrmApiInterfaceReadiness;
5316
+ canUseCrmApiActions: boolean;
5317
+ }
5318
+ declare function getCrmApiInterfaceReadiness(model: OrganizationModel | undefined): CrmApiInterfaceReadiness;
5319
+ /**
5320
+ * Reads the tenant's CRM pipeline configuration from the Organization Model.
5321
+ *
5322
+ * Structural twin of `useLeadGenConfig` -- reads `useOptionalElevasisSystems()?.organizationModel`,
5323
+ * derives its catalog and readiness through generic `@repo/core` accessors, memoizes on the
5324
+ * model, and degrades to a readiness-only object when no OM is present. Imports nothing from
5325
+ * `@repo/elevasis-core`: the pipeline is caller-supplied content, not a platform default.
5326
+ */
5327
+ declare function useCrmPipelineConfig(): CrmPipelineConfig;
5328
+
5329
+ export { ActivityFeedWidget, CRM_ITEMS, CompanyDetailPage, ContactDetailPage, ConversationThread, CrmOverview, CrmSettingsPage, CrmSidebar, CrmSidebarMiddle, CrmSidebarTop, DealDetailPage, DealsListPage, MetricsStrip, MyTasksPanel, PIPELINE_FUNNEL_ORDER, PipelineFunnelWidget, QuickCreateActions, SAVED_VIEW_PRESETS, SavedViewsPanel, crmManifest, crmPrioritySettingsKeys, getCrmApiInterfaceReadiness, useCrmPipelineConfig, useCrmPipelineSummary, useCrmPrioritySettings, useCrmQuickMetrics, useRecentCrmActivity, useResetCrmPrioritySettings, useUpdateCrmPrioritySettings };
5330
+ export type { ActivityFeedWidgetProps, CompanyDetailPageProps, ContactDetailPageProps, RecentActivityEntry as CrmActivityEntry, CrmActivityKind, CrmApiInterfaceReadiness, CrmOverviewProps, CrmPipelineConfig, CrmPrioritySettingsResponse, CrmQuickMetrics, CrmSidebarMiddleProps, MyTasksPanelProps, PipelineFunnelWidgetProps, PipelineStageSummary, QuickCreateActionsProps, SavedViewPreset, SavedViewsPanelProps };