@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
@@ -7,53 +7,6 @@ type Json = string | number | boolean | null | {
7
7
  type Database = {
8
8
  public: {
9
9
  Tables: {
10
- acq_artifacts: {
11
- Row: {
12
- content: Json;
13
- created_at: string;
14
- created_by: string | null;
15
- id: string;
16
- kind: string;
17
- organization_id: string;
18
- owner_id: string;
19
- owner_kind: string;
20
- source_execution_id: string | null;
21
- version: number;
22
- };
23
- Insert: {
24
- content: Json;
25
- created_at?: string;
26
- created_by?: string | null;
27
- id?: string;
28
- kind: string;
29
- organization_id: string;
30
- owner_id: string;
31
- owner_kind: string;
32
- source_execution_id?: string | null;
33
- version?: number;
34
- };
35
- Update: {
36
- content?: Json;
37
- created_at?: string;
38
- created_by?: string | null;
39
- id?: string;
40
- kind?: string;
41
- organization_id?: string;
42
- owner_id?: string;
43
- owner_kind?: string;
44
- source_execution_id?: string | null;
45
- version?: number;
46
- };
47
- Relationships: [
48
- {
49
- foreignKeyName: "acq_artifacts_organization_id_fkey";
50
- columns: ["organization_id"];
51
- isOneToOne: false;
52
- referencedRelation: "organizations";
53
- referencedColumns: ["id"];
54
- }
55
- ];
56
- };
57
10
  acq_companies: {
58
11
  Row: {
59
12
  batch_id: string | null;
@@ -265,122 +218,6 @@ type Database = {
265
218
  }
266
219
  ];
267
220
  };
268
- acq_content: {
269
- Row: {
270
- body: string | null;
271
- created_at: string;
272
- id: string;
273
- organization_id: string;
274
- pillar: string;
275
- status: string;
276
- title: string;
277
- updated_at: string;
278
- };
279
- Insert: {
280
- body?: string | null;
281
- created_at?: string;
282
- id?: string;
283
- organization_id: string;
284
- pillar: string;
285
- status?: string;
286
- title: string;
287
- updated_at?: string;
288
- };
289
- Update: {
290
- body?: string | null;
291
- created_at?: string;
292
- id?: string;
293
- organization_id?: string;
294
- pillar?: string;
295
- status?: string;
296
- title?: string;
297
- updated_at?: string;
298
- };
299
- Relationships: [
300
- {
301
- foreignKeyName: "acq_content_organization_id_fkey";
302
- columns: ["organization_id"];
303
- isOneToOne: false;
304
- referencedRelation: "organizations";
305
- referencedColumns: ["id"];
306
- }
307
- ];
308
- };
309
- acq_content_distributions: {
310
- Row: {
311
- adapted_body: string | null;
312
- checklist: Json | null;
313
- content_id: string;
314
- created_at: string;
315
- format: string;
316
- id: string;
317
- media_urls: Json;
318
- metrics: Json;
319
- metrics_updated_at: string | null;
320
- organization_id: string;
321
- platform: string;
322
- platform_content: Json | null;
323
- platform_post_id: string | null;
324
- platform_url: string | null;
325
- published_at: string | null;
326
- status: string;
327
- updated_at: string;
328
- };
329
- Insert: {
330
- adapted_body?: string | null;
331
- checklist?: Json | null;
332
- content_id: string;
333
- created_at?: string;
334
- format: string;
335
- id?: string;
336
- media_urls?: Json;
337
- metrics?: Json;
338
- metrics_updated_at?: string | null;
339
- organization_id: string;
340
- platform: string;
341
- platform_content?: Json | null;
342
- platform_post_id?: string | null;
343
- platform_url?: string | null;
344
- published_at?: string | null;
345
- status?: string;
346
- updated_at?: string;
347
- };
348
- Update: {
349
- adapted_body?: string | null;
350
- checklist?: Json | null;
351
- content_id?: string;
352
- created_at?: string;
353
- format?: string;
354
- id?: string;
355
- media_urls?: Json;
356
- metrics?: Json;
357
- metrics_updated_at?: string | null;
358
- organization_id?: string;
359
- platform?: string;
360
- platform_content?: Json | null;
361
- platform_post_id?: string | null;
362
- platform_url?: string | null;
363
- published_at?: string | null;
364
- status?: string;
365
- updated_at?: string;
366
- };
367
- Relationships: [
368
- {
369
- foreignKeyName: "acq_content_distributions_content_id_fkey";
370
- columns: ["content_id"];
371
- isOneToOne: false;
372
- referencedRelation: "acq_content";
373
- referencedColumns: ["id"];
374
- },
375
- {
376
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
377
- columns: ["organization_id"];
378
- isOneToOne: false;
379
- referencedRelation: "organizations";
380
- referencedColumns: ["id"];
381
- }
382
- ];
383
- };
384
221
  acq_deal_notes: {
385
222
  Row: {
386
223
  author_user_id: string | null;
@@ -410,6 +247,13 @@ type Database = {
410
247
  updated_at?: string;
411
248
  };
412
249
  Relationships: [
250
+ {
251
+ foreignKeyName: "acq_deal_notes_author_user_id_fkey";
252
+ columns: ["author_user_id"];
253
+ isOneToOne: false;
254
+ referencedRelation: "users";
255
+ referencedColumns: ["id"];
256
+ },
413
257
  {
414
258
  foreignKeyName: "acq_deal_notes_deal_id_fkey";
415
259
  columns: ["deal_id"];
@@ -473,6 +317,27 @@ type Database = {
473
317
  updated_at?: string;
474
318
  };
475
319
  Relationships: [
320
+ {
321
+ foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
322
+ columns: ["assignee_user_id"];
323
+ isOneToOne: false;
324
+ referencedRelation: "users";
325
+ referencedColumns: ["id"];
326
+ },
327
+ {
328
+ foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
329
+ columns: ["completed_by_user_id"];
330
+ isOneToOne: false;
331
+ referencedRelation: "users";
332
+ referencedColumns: ["id"];
333
+ },
334
+ {
335
+ foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
336
+ columns: ["created_by_user_id"];
337
+ isOneToOne: false;
338
+ referencedRelation: "users";
339
+ referencedColumns: ["id"];
340
+ },
476
341
  {
477
342
  foreignKeyName: "acq_deal_tasks_deal_id_fkey";
478
343
  columns: ["deal_id"];
@@ -629,6 +494,13 @@ type Database = {
629
494
  referencedRelation: "acq_contacts";
630
495
  referencedColumns: ["id"];
631
496
  },
497
+ {
498
+ foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
499
+ columns: ["discovery_submitted_by"];
500
+ isOneToOne: false;
501
+ referencedRelation: "users";
502
+ referencedColumns: ["id"];
503
+ },
632
504
  {
633
505
  foreignKeyName: "acq_deals_organization_id_fkey";
634
506
  columns: ["organization_id"];
@@ -636,6 +508,13 @@ type Database = {
636
508
  referencedRelation: "organizations";
637
509
  referencedColumns: ["id"];
638
510
  },
511
+ {
512
+ foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
513
+ columns: ["proposal_reviewed_by"];
514
+ isOneToOne: false;
515
+ referencedRelation: "users";
516
+ referencedColumns: ["id"];
517
+ },
639
518
  {
640
519
  foreignKeyName: "acq_deals_source_list_id_fkey";
641
520
  columns: ["source_list_id"];
@@ -689,6 +568,13 @@ type Database = {
689
568
  state_key?: string;
690
569
  };
691
570
  Relationships: [
571
+ {
572
+ foreignKeyName: "acq_list_companies_added_by_fkey";
573
+ columns: ["added_by"];
574
+ isOneToOne: false;
575
+ referencedRelation: "users";
576
+ referencedColumns: ["id"];
577
+ },
692
578
  {
693
579
  foreignKeyName: "acq_list_companies_company_id_fkey";
694
580
  columns: ["company_id"];
@@ -795,6 +681,13 @@ type Database = {
795
681
  state_key?: string;
796
682
  };
797
683
  Relationships: [
684
+ {
685
+ foreignKeyName: "acq_list_members_added_by_fkey";
686
+ columns: ["added_by"];
687
+ isOneToOne: false;
688
+ referencedRelation: "users";
689
+ referencedColumns: ["id"];
690
+ },
798
691
  {
799
692
  foreignKeyName: "acq_list_members_contact_id_fkey";
800
693
  columns: ["contact_id"];
@@ -1195,6 +1088,13 @@ type Database = {
1195
1088
  title?: string;
1196
1089
  };
1197
1090
  Relationships: [
1091
+ {
1092
+ foreignKeyName: "activities_actor_id_fkey";
1093
+ columns: ["actor_id"];
1094
+ isOneToOne: false;
1095
+ referencedRelation: "users";
1096
+ referencedColumns: ["id"];
1097
+ },
1198
1098
  {
1199
1099
  foreignKeyName: "activities_organization_id_fkey";
1200
1100
  columns: ["organization_id"];
@@ -1307,6 +1207,62 @@ type Database = {
1307
1207
  }
1308
1208
  ];
1309
1209
  };
1210
+ artifacts: {
1211
+ Row: {
1212
+ content: Json;
1213
+ created_at: string;
1214
+ created_by: string | null;
1215
+ id: string;
1216
+ is_active: boolean;
1217
+ kind: string;
1218
+ organization_id: string;
1219
+ owner_id: string | null;
1220
+ owner_kind: string;
1221
+ pipeline_id: string | null;
1222
+ source_execution_id: string | null;
1223
+ updated_at: string;
1224
+ version: number;
1225
+ };
1226
+ Insert: {
1227
+ content: Json;
1228
+ created_at?: string;
1229
+ created_by?: string | null;
1230
+ id?: string;
1231
+ is_active?: boolean;
1232
+ kind: string;
1233
+ organization_id: string;
1234
+ owner_id?: string | null;
1235
+ owner_kind: string;
1236
+ pipeline_id?: string | null;
1237
+ source_execution_id?: string | null;
1238
+ updated_at?: string;
1239
+ version?: number;
1240
+ };
1241
+ Update: {
1242
+ content?: Json;
1243
+ created_at?: string;
1244
+ created_by?: string | null;
1245
+ id?: string;
1246
+ is_active?: boolean;
1247
+ kind?: string;
1248
+ organization_id?: string;
1249
+ owner_id?: string | null;
1250
+ owner_kind?: string;
1251
+ pipeline_id?: string | null;
1252
+ source_execution_id?: string | null;
1253
+ updated_at?: string;
1254
+ version?: number;
1255
+ };
1256
+ Relationships: [
1257
+ {
1258
+ foreignKeyName: "artifacts_organization_id_fkey";
1259
+ columns: ["organization_id"];
1260
+ isOneToOne: false;
1261
+ referencedRelation: "organizations";
1262
+ referencedColumns: ["id"];
1263
+ }
1264
+ ];
1265
+ };
1310
1266
  clients: {
1311
1267
  Row: {
1312
1268
  converted_at: string | null;
@@ -1478,6 +1434,311 @@ type Database = {
1478
1434
  }
1479
1435
  ];
1480
1436
  };
1437
+ content_distributions: {
1438
+ Row: {
1439
+ adapted_body: string | null;
1440
+ checklist: Json | null;
1441
+ content_item_id: string;
1442
+ created_at: string;
1443
+ format: string;
1444
+ id: string;
1445
+ media_urls: Json;
1446
+ metrics: Json;
1447
+ metrics_updated_at: string | null;
1448
+ organization_id: string;
1449
+ platform: string;
1450
+ platform_content: Json | null;
1451
+ platform_post_id: string | null;
1452
+ platform_url: string | null;
1453
+ processing_state: Json;
1454
+ publish_method: string | null;
1455
+ published_at: string | null;
1456
+ status: string;
1457
+ updated_at: string;
1458
+ };
1459
+ Insert: {
1460
+ adapted_body?: string | null;
1461
+ checklist?: Json | null;
1462
+ content_item_id: string;
1463
+ created_at?: string;
1464
+ format: string;
1465
+ id?: string;
1466
+ media_urls?: Json;
1467
+ metrics?: Json;
1468
+ metrics_updated_at?: string | null;
1469
+ organization_id: string;
1470
+ platform: string;
1471
+ platform_content?: Json | null;
1472
+ platform_post_id?: string | null;
1473
+ platform_url?: string | null;
1474
+ processing_state?: Json;
1475
+ publish_method?: string | null;
1476
+ published_at?: string | null;
1477
+ status?: string;
1478
+ updated_at?: string;
1479
+ };
1480
+ Update: {
1481
+ adapted_body?: string | null;
1482
+ checklist?: Json | null;
1483
+ content_item_id?: string;
1484
+ created_at?: string;
1485
+ format?: string;
1486
+ id?: string;
1487
+ media_urls?: Json;
1488
+ metrics?: Json;
1489
+ metrics_updated_at?: string | null;
1490
+ organization_id?: string;
1491
+ platform?: string;
1492
+ platform_content?: Json | null;
1493
+ platform_post_id?: string | null;
1494
+ platform_url?: string | null;
1495
+ processing_state?: Json;
1496
+ publish_method?: string | null;
1497
+ published_at?: string | null;
1498
+ status?: string;
1499
+ updated_at?: string;
1500
+ };
1501
+ Relationships: [
1502
+ {
1503
+ foreignKeyName: "content_distributions_content_item_id_fkey";
1504
+ columns: ["content_item_id"];
1505
+ isOneToOne: false;
1506
+ referencedRelation: "content_items";
1507
+ referencedColumns: ["id"];
1508
+ },
1509
+ {
1510
+ foreignKeyName: "content_distributions_organization_id_fkey";
1511
+ columns: ["organization_id"];
1512
+ isOneToOne: false;
1513
+ referencedRelation: "organizations";
1514
+ referencedColumns: ["id"];
1515
+ }
1516
+ ];
1517
+ };
1518
+ content_item_attempts: {
1519
+ Row: {
1520
+ attempt_number: number;
1521
+ content_item_id: string;
1522
+ created_at: string;
1523
+ created_by: string | null;
1524
+ id: string;
1525
+ organization_id: string;
1526
+ payload: Json;
1527
+ source_execution_id: string | null;
1528
+ step_key: string | null;
1529
+ };
1530
+ Insert: {
1531
+ attempt_number: number;
1532
+ content_item_id: string;
1533
+ created_at?: string;
1534
+ created_by?: string | null;
1535
+ id?: string;
1536
+ organization_id: string;
1537
+ payload?: Json;
1538
+ source_execution_id?: string | null;
1539
+ step_key?: string | null;
1540
+ };
1541
+ Update: {
1542
+ attempt_number?: number;
1543
+ content_item_id?: string;
1544
+ created_at?: string;
1545
+ created_by?: string | null;
1546
+ id?: string;
1547
+ organization_id?: string;
1548
+ payload?: Json;
1549
+ source_execution_id?: string | null;
1550
+ step_key?: string | null;
1551
+ };
1552
+ Relationships: [
1553
+ {
1554
+ foreignKeyName: "content_item_attempts_content_item_id_fkey";
1555
+ columns: ["content_item_id"];
1556
+ isOneToOne: false;
1557
+ referencedRelation: "content_items";
1558
+ referencedColumns: ["id"];
1559
+ },
1560
+ {
1561
+ foreignKeyName: "content_item_attempts_created_by_fkey";
1562
+ columns: ["created_by"];
1563
+ isOneToOne: false;
1564
+ referencedRelation: "users";
1565
+ referencedColumns: ["id"];
1566
+ },
1567
+ {
1568
+ foreignKeyName: "content_item_attempts_organization_id_fkey";
1569
+ columns: ["organization_id"];
1570
+ isOneToOne: false;
1571
+ referencedRelation: "organizations";
1572
+ referencedColumns: ["id"];
1573
+ },
1574
+ {
1575
+ foreignKeyName: "content_item_attempts_source_execution_id_fkey";
1576
+ columns: ["source_execution_id"];
1577
+ isOneToOne: false;
1578
+ referencedRelation: "execution_logs";
1579
+ referencedColumns: ["execution_id"];
1580
+ }
1581
+ ];
1582
+ };
1583
+ content_items: {
1584
+ Row: {
1585
+ body: string | null;
1586
+ client_id: string | null;
1587
+ created_at: string;
1588
+ created_by: string | null;
1589
+ id: string;
1590
+ organization_id: string;
1591
+ payload: Json;
1592
+ pillar: string | null;
1593
+ pipeline_id: string | null;
1594
+ processing_state: Json;
1595
+ reject_reason: string | null;
1596
+ reviewed_at: string | null;
1597
+ reviewed_by: string | null;
1598
+ reviewer_feedback: string | null;
1599
+ source_asset_id: string | null;
1600
+ status: string;
1601
+ title: string;
1602
+ updated_at: string;
1603
+ updated_by: string | null;
1604
+ };
1605
+ Insert: {
1606
+ body?: string | null;
1607
+ client_id?: string | null;
1608
+ created_at?: string;
1609
+ created_by?: string | null;
1610
+ id?: string;
1611
+ organization_id: string;
1612
+ payload?: Json;
1613
+ pillar?: string | null;
1614
+ pipeline_id?: string | null;
1615
+ processing_state?: Json;
1616
+ reject_reason?: string | null;
1617
+ reviewed_at?: string | null;
1618
+ reviewed_by?: string | null;
1619
+ reviewer_feedback?: string | null;
1620
+ source_asset_id?: string | null;
1621
+ status?: string;
1622
+ title: string;
1623
+ updated_at?: string;
1624
+ updated_by?: string | null;
1625
+ };
1626
+ Update: {
1627
+ body?: string | null;
1628
+ client_id?: string | null;
1629
+ created_at?: string;
1630
+ created_by?: string | null;
1631
+ id?: string;
1632
+ organization_id?: string;
1633
+ payload?: Json;
1634
+ pillar?: string | null;
1635
+ pipeline_id?: string | null;
1636
+ processing_state?: Json;
1637
+ reject_reason?: string | null;
1638
+ reviewed_at?: string | null;
1639
+ reviewed_by?: string | null;
1640
+ reviewer_feedback?: string | null;
1641
+ source_asset_id?: string | null;
1642
+ status?: string;
1643
+ title?: string;
1644
+ updated_at?: string;
1645
+ updated_by?: string | null;
1646
+ };
1647
+ Relationships: [
1648
+ {
1649
+ foreignKeyName: "content_items_client_id_fkey";
1650
+ columns: ["client_id"];
1651
+ isOneToOne: false;
1652
+ referencedRelation: "clients";
1653
+ referencedColumns: ["id"];
1654
+ },
1655
+ {
1656
+ foreignKeyName: "content_items_created_by_fkey";
1657
+ columns: ["created_by"];
1658
+ isOneToOne: false;
1659
+ referencedRelation: "users";
1660
+ referencedColumns: ["id"];
1661
+ },
1662
+ {
1663
+ foreignKeyName: "content_items_organization_id_fkey";
1664
+ columns: ["organization_id"];
1665
+ isOneToOne: false;
1666
+ referencedRelation: "organizations";
1667
+ referencedColumns: ["id"];
1668
+ },
1669
+ {
1670
+ foreignKeyName: "content_items_reviewed_by_fkey";
1671
+ columns: ["reviewed_by"];
1672
+ isOneToOne: false;
1673
+ referencedRelation: "users";
1674
+ referencedColumns: ["id"];
1675
+ },
1676
+ {
1677
+ foreignKeyName: "content_items_source_asset_id_fkey";
1678
+ columns: ["source_asset_id"];
1679
+ isOneToOne: false;
1680
+ referencedRelation: "content_source_assets";
1681
+ referencedColumns: ["id"];
1682
+ },
1683
+ {
1684
+ foreignKeyName: "content_items_updated_by_fkey";
1685
+ columns: ["updated_by"];
1686
+ isOneToOne: false;
1687
+ referencedRelation: "users";
1688
+ referencedColumns: ["id"];
1689
+ }
1690
+ ];
1691
+ };
1692
+ content_source_assets: {
1693
+ Row: {
1694
+ created_at: string;
1695
+ duration_seconds: number | null;
1696
+ external_url: string | null;
1697
+ id: string;
1698
+ kind: string;
1699
+ metadata: Json;
1700
+ organization_id: string;
1701
+ processing_state: Json;
1702
+ storage_path: string | null;
1703
+ title: string;
1704
+ updated_at: string;
1705
+ };
1706
+ Insert: {
1707
+ created_at?: string;
1708
+ duration_seconds?: number | null;
1709
+ external_url?: string | null;
1710
+ id?: string;
1711
+ kind: string;
1712
+ metadata?: Json;
1713
+ organization_id: string;
1714
+ processing_state?: Json;
1715
+ storage_path?: string | null;
1716
+ title: string;
1717
+ updated_at?: string;
1718
+ };
1719
+ Update: {
1720
+ created_at?: string;
1721
+ duration_seconds?: number | null;
1722
+ external_url?: string | null;
1723
+ id?: string;
1724
+ kind?: string;
1725
+ metadata?: Json;
1726
+ organization_id?: string;
1727
+ processing_state?: Json;
1728
+ storage_path?: string | null;
1729
+ title?: string;
1730
+ updated_at?: string;
1731
+ };
1732
+ Relationships: [
1733
+ {
1734
+ foreignKeyName: "content_source_assets_organization_id_fkey";
1735
+ columns: ["organization_id"];
1736
+ isOneToOne: false;
1737
+ referencedRelation: "organizations";
1738
+ referencedColumns: ["id"];
1739
+ }
1740
+ ];
1741
+ };
1481
1742
  credentials: {
1482
1743
  Row: {
1483
1744
  created_at: string;
@@ -3094,6 +3355,33 @@ type Database = {
3094
3355
  };
3095
3356
  Returns: boolean;
3096
3357
  };
3358
+ create_artifact_version: {
3359
+ Args: {
3360
+ p_content: Json;
3361
+ p_created_by?: string;
3362
+ p_kind: string;
3363
+ p_organization_id: string;
3364
+ p_owner_id?: string;
3365
+ p_owner_kind: string;
3366
+ p_pipeline_id?: string;
3367
+ p_source_execution_id?: string;
3368
+ };
3369
+ Returns: {
3370
+ content: Json;
3371
+ created_at: string;
3372
+ created_by: string | null;
3373
+ id: string;
3374
+ is_active: boolean;
3375
+ kind: string;
3376
+ organization_id: string;
3377
+ owner_id: string | null;
3378
+ owner_kind: string;
3379
+ pipeline_id: string | null;
3380
+ source_execution_id: string | null;
3381
+ updated_at: string;
3382
+ version: number;
3383
+ };
3384
+ };
3097
3385
  current_user_is_platform_admin: {
3098
3386
  Args: Record<PropertyKey, never>;
3099
3387
  Returns: boolean;
@@ -3108,10 +3396,6 @@ type Database = {
3108
3396
  Args: Record<PropertyKey, never>;
3109
3397
  Returns: string;
3110
3398
  };
3111
- detect_stalled_executions: {
3112
- Args: Record<PropertyKey, never>;
3113
- Returns: undefined;
3114
- };
3115
3399
  execute_session_turn: {
3116
3400
  Args: {
3117
3401
  p_session_id: string;
@@ -3204,6 +3488,12 @@ type Database = {
3204
3488
  Args: Record<PropertyKey, never>;
3205
3489
  Returns: Json;
3206
3490
  };
3491
+ purge_stale_test_data: {
3492
+ Args: {
3493
+ p_max_age?: unknown;
3494
+ };
3495
+ Returns: Json;
3496
+ };
3207
3497
  recompute_all_memberships: {
3208
3498
  Args: Record<PropertyKey, never>;
3209
3499
  Returns: undefined;
@@ -3293,9 +3583,15 @@ interface OrganizationMembership {
3293
3583
  * - `linked` — an `org_memberships` row that carries a `workos_membership_id`
3294
3584
  * - `pre_provisioned` — an `org_memberships` row with no `workos_membership_id`;
3295
3585
  * the invitee was provisioned but has not completed signup
3586
+ * - `accepted_unlinked` — an `org_memberships` row with no `workos_membership_id`
3587
+ * for which WorkOS nonetheless holds a live membership, matched by user and
3588
+ * organization. The person has real access; only our record of the link is
3589
+ * missing. Distinct from `pre_provisioned` because the column both states read
3590
+ * as NULL is precisely the one that cannot tell them apart -- see
3591
+ * `recoverUnlinkedWorkOSMembership` in the API's membership service.
3296
3592
  * - `workos_only` — a WorkOS membership with no `org_memberships` row (a sync gap)
3297
3593
  */
3298
- type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'workos_only';
3594
+ type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'accepted_unlinked' | 'workos_only';
3299
3595
  /**
3300
3596
  * Extended membership with user and organization details for UI
3301
3597
  *
@@ -3434,7 +3730,7 @@ interface UseOrgInitializationReturn {
3434
3730
  *
3435
3731
  * Usage in app:
3436
3732
  * ```typescript
3437
- * import { createUseAppInitialization } from '@repo/ui/initialization'
3733
+ * import { createUseAppInitialization } from '@elevasis/ui/initialization'
3438
3734
  * import { useOrgInitialization } from './organization/hooks/useOrgInitialization'
3439
3735
  *
3440
3736
  * export const useAppInitialization = createUseAppInitialization(useOrgInitialization)