@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
@@ -6,53 +6,6 @@ type Json = string | number | boolean | null | {
6
6
  type Database = {
7
7
  public: {
8
8
  Tables: {
9
- acq_artifacts: {
10
- Row: {
11
- content: Json;
12
- created_at: string;
13
- created_by: string | null;
14
- id: string;
15
- kind: string;
16
- organization_id: string;
17
- owner_id: string;
18
- owner_kind: string;
19
- source_execution_id: string | null;
20
- version: number;
21
- };
22
- Insert: {
23
- content: Json;
24
- created_at?: string;
25
- created_by?: string | null;
26
- id?: string;
27
- kind: string;
28
- organization_id: string;
29
- owner_id: string;
30
- owner_kind: string;
31
- source_execution_id?: string | null;
32
- version?: number;
33
- };
34
- Update: {
35
- content?: Json;
36
- created_at?: string;
37
- created_by?: string | null;
38
- id?: string;
39
- kind?: string;
40
- organization_id?: string;
41
- owner_id?: string;
42
- owner_kind?: string;
43
- source_execution_id?: string | null;
44
- version?: number;
45
- };
46
- Relationships: [
47
- {
48
- foreignKeyName: "acq_artifacts_organization_id_fkey";
49
- columns: ["organization_id"];
50
- isOneToOne: false;
51
- referencedRelation: "organizations";
52
- referencedColumns: ["id"];
53
- }
54
- ];
55
- };
56
9
  acq_companies: {
57
10
  Row: {
58
11
  batch_id: string | null;
@@ -264,122 +217,6 @@ type Database = {
264
217
  }
265
218
  ];
266
219
  };
267
- acq_content: {
268
- Row: {
269
- body: string | null;
270
- created_at: string;
271
- id: string;
272
- organization_id: string;
273
- pillar: string;
274
- status: string;
275
- title: string;
276
- updated_at: string;
277
- };
278
- Insert: {
279
- body?: string | null;
280
- created_at?: string;
281
- id?: string;
282
- organization_id: string;
283
- pillar: string;
284
- status?: string;
285
- title: string;
286
- updated_at?: string;
287
- };
288
- Update: {
289
- body?: string | null;
290
- created_at?: string;
291
- id?: string;
292
- organization_id?: string;
293
- pillar?: string;
294
- status?: string;
295
- title?: string;
296
- updated_at?: string;
297
- };
298
- Relationships: [
299
- {
300
- foreignKeyName: "acq_content_organization_id_fkey";
301
- columns: ["organization_id"];
302
- isOneToOne: false;
303
- referencedRelation: "organizations";
304
- referencedColumns: ["id"];
305
- }
306
- ];
307
- };
308
- acq_content_distributions: {
309
- Row: {
310
- adapted_body: string | null;
311
- checklist: Json | null;
312
- content_id: string;
313
- created_at: string;
314
- format: string;
315
- id: string;
316
- media_urls: Json;
317
- metrics: Json;
318
- metrics_updated_at: string | null;
319
- organization_id: string;
320
- platform: string;
321
- platform_content: Json | null;
322
- platform_post_id: string | null;
323
- platform_url: string | null;
324
- published_at: string | null;
325
- status: string;
326
- updated_at: string;
327
- };
328
- Insert: {
329
- adapted_body?: string | null;
330
- checklist?: Json | null;
331
- content_id: string;
332
- created_at?: string;
333
- format: string;
334
- id?: string;
335
- media_urls?: Json;
336
- metrics?: Json;
337
- metrics_updated_at?: string | null;
338
- organization_id: string;
339
- platform: string;
340
- platform_content?: Json | null;
341
- platform_post_id?: string | null;
342
- platform_url?: string | null;
343
- published_at?: string | null;
344
- status?: string;
345
- updated_at?: string;
346
- };
347
- Update: {
348
- adapted_body?: string | null;
349
- checklist?: Json | null;
350
- content_id?: string;
351
- created_at?: string;
352
- format?: string;
353
- id?: string;
354
- media_urls?: Json;
355
- metrics?: Json;
356
- metrics_updated_at?: string | null;
357
- organization_id?: string;
358
- platform?: string;
359
- platform_content?: Json | null;
360
- platform_post_id?: string | null;
361
- platform_url?: string | null;
362
- published_at?: string | null;
363
- status?: string;
364
- updated_at?: string;
365
- };
366
- Relationships: [
367
- {
368
- foreignKeyName: "acq_content_distributions_content_id_fkey";
369
- columns: ["content_id"];
370
- isOneToOne: false;
371
- referencedRelation: "acq_content";
372
- referencedColumns: ["id"];
373
- },
374
- {
375
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
376
- columns: ["organization_id"];
377
- isOneToOne: false;
378
- referencedRelation: "organizations";
379
- referencedColumns: ["id"];
380
- }
381
- ];
382
- };
383
220
  acq_deal_notes: {
384
221
  Row: {
385
222
  author_user_id: string | null;
@@ -409,6 +246,13 @@ type Database = {
409
246
  updated_at?: string;
410
247
  };
411
248
  Relationships: [
249
+ {
250
+ foreignKeyName: "acq_deal_notes_author_user_id_fkey";
251
+ columns: ["author_user_id"];
252
+ isOneToOne: false;
253
+ referencedRelation: "users";
254
+ referencedColumns: ["id"];
255
+ },
412
256
  {
413
257
  foreignKeyName: "acq_deal_notes_deal_id_fkey";
414
258
  columns: ["deal_id"];
@@ -472,6 +316,27 @@ type Database = {
472
316
  updated_at?: string;
473
317
  };
474
318
  Relationships: [
319
+ {
320
+ foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
321
+ columns: ["assignee_user_id"];
322
+ isOneToOne: false;
323
+ referencedRelation: "users";
324
+ referencedColumns: ["id"];
325
+ },
326
+ {
327
+ foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
328
+ columns: ["completed_by_user_id"];
329
+ isOneToOne: false;
330
+ referencedRelation: "users";
331
+ referencedColumns: ["id"];
332
+ },
333
+ {
334
+ foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
335
+ columns: ["created_by_user_id"];
336
+ isOneToOne: false;
337
+ referencedRelation: "users";
338
+ referencedColumns: ["id"];
339
+ },
475
340
  {
476
341
  foreignKeyName: "acq_deal_tasks_deal_id_fkey";
477
342
  columns: ["deal_id"];
@@ -628,6 +493,13 @@ type Database = {
628
493
  referencedRelation: "acq_contacts";
629
494
  referencedColumns: ["id"];
630
495
  },
496
+ {
497
+ foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
498
+ columns: ["discovery_submitted_by"];
499
+ isOneToOne: false;
500
+ referencedRelation: "users";
501
+ referencedColumns: ["id"];
502
+ },
631
503
  {
632
504
  foreignKeyName: "acq_deals_organization_id_fkey";
633
505
  columns: ["organization_id"];
@@ -635,6 +507,13 @@ type Database = {
635
507
  referencedRelation: "organizations";
636
508
  referencedColumns: ["id"];
637
509
  },
510
+ {
511
+ foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
512
+ columns: ["proposal_reviewed_by"];
513
+ isOneToOne: false;
514
+ referencedRelation: "users";
515
+ referencedColumns: ["id"];
516
+ },
638
517
  {
639
518
  foreignKeyName: "acq_deals_source_list_id_fkey";
640
519
  columns: ["source_list_id"];
@@ -688,6 +567,13 @@ type Database = {
688
567
  state_key?: string;
689
568
  };
690
569
  Relationships: [
570
+ {
571
+ foreignKeyName: "acq_list_companies_added_by_fkey";
572
+ columns: ["added_by"];
573
+ isOneToOne: false;
574
+ referencedRelation: "users";
575
+ referencedColumns: ["id"];
576
+ },
691
577
  {
692
578
  foreignKeyName: "acq_list_companies_company_id_fkey";
693
579
  columns: ["company_id"];
@@ -794,6 +680,13 @@ type Database = {
794
680
  state_key?: string;
795
681
  };
796
682
  Relationships: [
683
+ {
684
+ foreignKeyName: "acq_list_members_added_by_fkey";
685
+ columns: ["added_by"];
686
+ isOneToOne: false;
687
+ referencedRelation: "users";
688
+ referencedColumns: ["id"];
689
+ },
797
690
  {
798
691
  foreignKeyName: "acq_list_members_contact_id_fkey";
799
692
  columns: ["contact_id"];
@@ -1194,6 +1087,13 @@ type Database = {
1194
1087
  title?: string;
1195
1088
  };
1196
1089
  Relationships: [
1090
+ {
1091
+ foreignKeyName: "activities_actor_id_fkey";
1092
+ columns: ["actor_id"];
1093
+ isOneToOne: false;
1094
+ referencedRelation: "users";
1095
+ referencedColumns: ["id"];
1096
+ },
1197
1097
  {
1198
1098
  foreignKeyName: "activities_organization_id_fkey";
1199
1099
  columns: ["organization_id"];
@@ -1306,6 +1206,62 @@ type Database = {
1306
1206
  }
1307
1207
  ];
1308
1208
  };
1209
+ artifacts: {
1210
+ Row: {
1211
+ content: Json;
1212
+ created_at: string;
1213
+ created_by: string | null;
1214
+ id: string;
1215
+ is_active: boolean;
1216
+ kind: string;
1217
+ organization_id: string;
1218
+ owner_id: string | null;
1219
+ owner_kind: string;
1220
+ pipeline_id: string | null;
1221
+ source_execution_id: string | null;
1222
+ updated_at: string;
1223
+ version: number;
1224
+ };
1225
+ Insert: {
1226
+ content: Json;
1227
+ created_at?: string;
1228
+ created_by?: string | null;
1229
+ id?: string;
1230
+ is_active?: boolean;
1231
+ kind: string;
1232
+ organization_id: string;
1233
+ owner_id?: string | null;
1234
+ owner_kind: string;
1235
+ pipeline_id?: string | null;
1236
+ source_execution_id?: string | null;
1237
+ updated_at?: string;
1238
+ version?: number;
1239
+ };
1240
+ Update: {
1241
+ content?: Json;
1242
+ created_at?: string;
1243
+ created_by?: string | null;
1244
+ id?: string;
1245
+ is_active?: boolean;
1246
+ kind?: string;
1247
+ organization_id?: string;
1248
+ owner_id?: string | null;
1249
+ owner_kind?: string;
1250
+ pipeline_id?: string | null;
1251
+ source_execution_id?: string | null;
1252
+ updated_at?: string;
1253
+ version?: number;
1254
+ };
1255
+ Relationships: [
1256
+ {
1257
+ foreignKeyName: "artifacts_organization_id_fkey";
1258
+ columns: ["organization_id"];
1259
+ isOneToOne: false;
1260
+ referencedRelation: "organizations";
1261
+ referencedColumns: ["id"];
1262
+ }
1263
+ ];
1264
+ };
1309
1265
  clients: {
1310
1266
  Row: {
1311
1267
  converted_at: string | null;
@@ -1455,25 +1411,330 @@ type Database = {
1455
1411
  };
1456
1412
  Relationships: [
1457
1413
  {
1458
- foreignKeyName: "command_queue_completed_by_fkey";
1459
- columns: ["completed_by"];
1460
- isOneToOne: false;
1461
- referencedRelation: "users";
1462
- referencedColumns: ["id"];
1463
- },
1464
- {
1465
- foreignKeyName: "command_queue_organization_id_fkey";
1414
+ foreignKeyName: "command_queue_completed_by_fkey";
1415
+ columns: ["completed_by"];
1416
+ isOneToOne: false;
1417
+ referencedRelation: "users";
1418
+ referencedColumns: ["id"];
1419
+ },
1420
+ {
1421
+ foreignKeyName: "command_queue_organization_id_fkey";
1422
+ columns: ["organization_id"];
1423
+ isOneToOne: false;
1424
+ referencedRelation: "organizations";
1425
+ referencedColumns: ["id"];
1426
+ },
1427
+ {
1428
+ foreignKeyName: "command_queue_target_execution_id_fkey";
1429
+ columns: ["target_execution_id"];
1430
+ isOneToOne: false;
1431
+ referencedRelation: "execution_logs";
1432
+ referencedColumns: ["execution_id"];
1433
+ }
1434
+ ];
1435
+ };
1436
+ content_distributions: {
1437
+ Row: {
1438
+ adapted_body: string | null;
1439
+ checklist: Json | null;
1440
+ content_item_id: string;
1441
+ created_at: string;
1442
+ format: string;
1443
+ id: string;
1444
+ media_urls: Json;
1445
+ metrics: Json;
1446
+ metrics_updated_at: string | null;
1447
+ organization_id: string;
1448
+ platform: string;
1449
+ platform_content: Json | null;
1450
+ platform_post_id: string | null;
1451
+ platform_url: string | null;
1452
+ processing_state: Json;
1453
+ publish_method: string | null;
1454
+ published_at: string | null;
1455
+ status: string;
1456
+ updated_at: string;
1457
+ };
1458
+ Insert: {
1459
+ adapted_body?: string | null;
1460
+ checklist?: Json | null;
1461
+ content_item_id: string;
1462
+ created_at?: string;
1463
+ format: string;
1464
+ id?: string;
1465
+ media_urls?: Json;
1466
+ metrics?: Json;
1467
+ metrics_updated_at?: string | null;
1468
+ organization_id: string;
1469
+ platform: string;
1470
+ platform_content?: Json | null;
1471
+ platform_post_id?: string | null;
1472
+ platform_url?: string | null;
1473
+ processing_state?: Json;
1474
+ publish_method?: string | null;
1475
+ published_at?: string | null;
1476
+ status?: string;
1477
+ updated_at?: string;
1478
+ };
1479
+ Update: {
1480
+ adapted_body?: string | null;
1481
+ checklist?: Json | null;
1482
+ content_item_id?: string;
1483
+ created_at?: string;
1484
+ format?: string;
1485
+ id?: string;
1486
+ media_urls?: Json;
1487
+ metrics?: Json;
1488
+ metrics_updated_at?: string | null;
1489
+ organization_id?: string;
1490
+ platform?: string;
1491
+ platform_content?: Json | null;
1492
+ platform_post_id?: string | null;
1493
+ platform_url?: string | null;
1494
+ processing_state?: Json;
1495
+ publish_method?: string | null;
1496
+ published_at?: string | null;
1497
+ status?: string;
1498
+ updated_at?: string;
1499
+ };
1500
+ Relationships: [
1501
+ {
1502
+ foreignKeyName: "content_distributions_content_item_id_fkey";
1503
+ columns: ["content_item_id"];
1504
+ isOneToOne: false;
1505
+ referencedRelation: "content_items";
1506
+ referencedColumns: ["id"];
1507
+ },
1508
+ {
1509
+ foreignKeyName: "content_distributions_organization_id_fkey";
1510
+ columns: ["organization_id"];
1511
+ isOneToOne: false;
1512
+ referencedRelation: "organizations";
1513
+ referencedColumns: ["id"];
1514
+ }
1515
+ ];
1516
+ };
1517
+ content_item_attempts: {
1518
+ Row: {
1519
+ attempt_number: number;
1520
+ content_item_id: string;
1521
+ created_at: string;
1522
+ created_by: string | null;
1523
+ id: string;
1524
+ organization_id: string;
1525
+ payload: Json;
1526
+ source_execution_id: string | null;
1527
+ step_key: string | null;
1528
+ };
1529
+ Insert: {
1530
+ attempt_number: number;
1531
+ content_item_id: string;
1532
+ created_at?: string;
1533
+ created_by?: string | null;
1534
+ id?: string;
1535
+ organization_id: string;
1536
+ payload?: Json;
1537
+ source_execution_id?: string | null;
1538
+ step_key?: string | null;
1539
+ };
1540
+ Update: {
1541
+ attempt_number?: number;
1542
+ content_item_id?: string;
1543
+ created_at?: string;
1544
+ created_by?: string | null;
1545
+ id?: string;
1546
+ organization_id?: string;
1547
+ payload?: Json;
1548
+ source_execution_id?: string | null;
1549
+ step_key?: string | null;
1550
+ };
1551
+ Relationships: [
1552
+ {
1553
+ foreignKeyName: "content_item_attempts_content_item_id_fkey";
1554
+ columns: ["content_item_id"];
1555
+ isOneToOne: false;
1556
+ referencedRelation: "content_items";
1557
+ referencedColumns: ["id"];
1558
+ },
1559
+ {
1560
+ foreignKeyName: "content_item_attempts_created_by_fkey";
1561
+ columns: ["created_by"];
1562
+ isOneToOne: false;
1563
+ referencedRelation: "users";
1564
+ referencedColumns: ["id"];
1565
+ },
1566
+ {
1567
+ foreignKeyName: "content_item_attempts_organization_id_fkey";
1568
+ columns: ["organization_id"];
1569
+ isOneToOne: false;
1570
+ referencedRelation: "organizations";
1571
+ referencedColumns: ["id"];
1572
+ },
1573
+ {
1574
+ foreignKeyName: "content_item_attempts_source_execution_id_fkey";
1575
+ columns: ["source_execution_id"];
1576
+ isOneToOne: false;
1577
+ referencedRelation: "execution_logs";
1578
+ referencedColumns: ["execution_id"];
1579
+ }
1580
+ ];
1581
+ };
1582
+ content_items: {
1583
+ Row: {
1584
+ body: string | null;
1585
+ client_id: string | null;
1586
+ created_at: string;
1587
+ created_by: string | null;
1588
+ id: string;
1589
+ organization_id: string;
1590
+ payload: Json;
1591
+ pillar: string | null;
1592
+ pipeline_id: string | null;
1593
+ processing_state: Json;
1594
+ reject_reason: string | null;
1595
+ reviewed_at: string | null;
1596
+ reviewed_by: string | null;
1597
+ reviewer_feedback: string | null;
1598
+ source_asset_id: string | null;
1599
+ status: string;
1600
+ title: string;
1601
+ updated_at: string;
1602
+ updated_by: string | null;
1603
+ };
1604
+ Insert: {
1605
+ body?: string | null;
1606
+ client_id?: string | null;
1607
+ created_at?: string;
1608
+ created_by?: string | null;
1609
+ id?: string;
1610
+ organization_id: string;
1611
+ payload?: Json;
1612
+ pillar?: string | null;
1613
+ pipeline_id?: string | null;
1614
+ processing_state?: Json;
1615
+ reject_reason?: string | null;
1616
+ reviewed_at?: string | null;
1617
+ reviewed_by?: string | null;
1618
+ reviewer_feedback?: string | null;
1619
+ source_asset_id?: string | null;
1620
+ status?: string;
1621
+ title: string;
1622
+ updated_at?: string;
1623
+ updated_by?: string | null;
1624
+ };
1625
+ Update: {
1626
+ body?: string | null;
1627
+ client_id?: string | null;
1628
+ created_at?: string;
1629
+ created_by?: string | null;
1630
+ id?: string;
1631
+ organization_id?: string;
1632
+ payload?: Json;
1633
+ pillar?: string | null;
1634
+ pipeline_id?: string | null;
1635
+ processing_state?: Json;
1636
+ reject_reason?: string | null;
1637
+ reviewed_at?: string | null;
1638
+ reviewed_by?: string | null;
1639
+ reviewer_feedback?: string | null;
1640
+ source_asset_id?: string | null;
1641
+ status?: string;
1642
+ title?: string;
1643
+ updated_at?: string;
1644
+ updated_by?: string | null;
1645
+ };
1646
+ Relationships: [
1647
+ {
1648
+ foreignKeyName: "content_items_client_id_fkey";
1649
+ columns: ["client_id"];
1650
+ isOneToOne: false;
1651
+ referencedRelation: "clients";
1652
+ referencedColumns: ["id"];
1653
+ },
1654
+ {
1655
+ foreignKeyName: "content_items_created_by_fkey";
1656
+ columns: ["created_by"];
1657
+ isOneToOne: false;
1658
+ referencedRelation: "users";
1659
+ referencedColumns: ["id"];
1660
+ },
1661
+ {
1662
+ foreignKeyName: "content_items_organization_id_fkey";
1663
+ columns: ["organization_id"];
1664
+ isOneToOne: false;
1665
+ referencedRelation: "organizations";
1666
+ referencedColumns: ["id"];
1667
+ },
1668
+ {
1669
+ foreignKeyName: "content_items_reviewed_by_fkey";
1670
+ columns: ["reviewed_by"];
1671
+ isOneToOne: false;
1672
+ referencedRelation: "users";
1673
+ referencedColumns: ["id"];
1674
+ },
1675
+ {
1676
+ foreignKeyName: "content_items_source_asset_id_fkey";
1677
+ columns: ["source_asset_id"];
1678
+ isOneToOne: false;
1679
+ referencedRelation: "content_source_assets";
1680
+ referencedColumns: ["id"];
1681
+ },
1682
+ {
1683
+ foreignKeyName: "content_items_updated_by_fkey";
1684
+ columns: ["updated_by"];
1685
+ isOneToOne: false;
1686
+ referencedRelation: "users";
1687
+ referencedColumns: ["id"];
1688
+ }
1689
+ ];
1690
+ };
1691
+ content_source_assets: {
1692
+ Row: {
1693
+ created_at: string;
1694
+ duration_seconds: number | null;
1695
+ external_url: string | null;
1696
+ id: string;
1697
+ kind: string;
1698
+ metadata: Json;
1699
+ organization_id: string;
1700
+ processing_state: Json;
1701
+ storage_path: string | null;
1702
+ title: string;
1703
+ updated_at: string;
1704
+ };
1705
+ Insert: {
1706
+ created_at?: string;
1707
+ duration_seconds?: number | null;
1708
+ external_url?: string | null;
1709
+ id?: string;
1710
+ kind: string;
1711
+ metadata?: Json;
1712
+ organization_id: string;
1713
+ processing_state?: Json;
1714
+ storage_path?: string | null;
1715
+ title: string;
1716
+ updated_at?: string;
1717
+ };
1718
+ Update: {
1719
+ created_at?: string;
1720
+ duration_seconds?: number | null;
1721
+ external_url?: string | null;
1722
+ id?: string;
1723
+ kind?: string;
1724
+ metadata?: Json;
1725
+ organization_id?: string;
1726
+ processing_state?: Json;
1727
+ storage_path?: string | null;
1728
+ title?: string;
1729
+ updated_at?: string;
1730
+ };
1731
+ Relationships: [
1732
+ {
1733
+ foreignKeyName: "content_source_assets_organization_id_fkey";
1466
1734
  columns: ["organization_id"];
1467
1735
  isOneToOne: false;
1468
1736
  referencedRelation: "organizations";
1469
1737
  referencedColumns: ["id"];
1470
- },
1471
- {
1472
- foreignKeyName: "command_queue_target_execution_id_fkey";
1473
- columns: ["target_execution_id"];
1474
- isOneToOne: false;
1475
- referencedRelation: "execution_logs";
1476
- referencedColumns: ["execution_id"];
1477
1738
  }
1478
1739
  ];
1479
1740
  };
@@ -3093,6 +3354,33 @@ type Database = {
3093
3354
  };
3094
3355
  Returns: boolean;
3095
3356
  };
3357
+ create_artifact_version: {
3358
+ Args: {
3359
+ p_content: Json;
3360
+ p_created_by?: string;
3361
+ p_kind: string;
3362
+ p_organization_id: string;
3363
+ p_owner_id?: string;
3364
+ p_owner_kind: string;
3365
+ p_pipeline_id?: string;
3366
+ p_source_execution_id?: string;
3367
+ };
3368
+ Returns: {
3369
+ content: Json;
3370
+ created_at: string;
3371
+ created_by: string | null;
3372
+ id: string;
3373
+ is_active: boolean;
3374
+ kind: string;
3375
+ organization_id: string;
3376
+ owner_id: string | null;
3377
+ owner_kind: string;
3378
+ pipeline_id: string | null;
3379
+ source_execution_id: string | null;
3380
+ updated_at: string;
3381
+ version: number;
3382
+ };
3383
+ };
3096
3384
  current_user_is_platform_admin: {
3097
3385
  Args: Record<PropertyKey, never>;
3098
3386
  Returns: boolean;
@@ -3107,10 +3395,6 @@ type Database = {
3107
3395
  Args: Record<PropertyKey, never>;
3108
3396
  Returns: string;
3109
3397
  };
3110
- detect_stalled_executions: {
3111
- Args: Record<PropertyKey, never>;
3112
- Returns: undefined;
3113
- };
3114
3398
  execute_session_turn: {
3115
3399
  Args: {
3116
3400
  p_session_id: string;
@@ -3203,6 +3487,12 @@ type Database = {
3203
3487
  Args: Record<PropertyKey, never>;
3204
3488
  Returns: Json;
3205
3489
  };
3490
+ purge_stale_test_data: {
3491
+ Args: {
3492
+ p_max_age?: unknown;
3493
+ };
3494
+ Returns: Json;
3495
+ };
3206
3496
  recompute_all_memberships: {
3207
3497
  Args: Record<PropertyKey, never>;
3208
3498
  Returns: undefined;
@@ -3258,51 +3548,6 @@ type Database = {
3258
3548
 
3259
3549
  declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database, "public", "public", {
3260
3550
  Tables: {
3261
- acq_artifacts: {
3262
- Row: {
3263
- content: Json;
3264
- created_at: string;
3265
- created_by: string | null;
3266
- id: string;
3267
- kind: string;
3268
- organization_id: string;
3269
- owner_id: string;
3270
- owner_kind: string;
3271
- source_execution_id: string | null;
3272
- version: number;
3273
- };
3274
- Insert: {
3275
- content: Json;
3276
- created_at?: string;
3277
- created_by?: string | null;
3278
- id?: string;
3279
- kind: string;
3280
- organization_id: string;
3281
- owner_id: string;
3282
- owner_kind: string;
3283
- source_execution_id?: string | null;
3284
- version?: number;
3285
- };
3286
- Update: {
3287
- content?: Json;
3288
- created_at?: string;
3289
- created_by?: string | null;
3290
- id?: string;
3291
- kind?: string;
3292
- organization_id?: string;
3293
- owner_id?: string;
3294
- owner_kind?: string;
3295
- source_execution_id?: string | null;
3296
- version?: number;
3297
- };
3298
- Relationships: [{
3299
- foreignKeyName: "acq_artifacts_organization_id_fkey";
3300
- columns: ["organization_id"];
3301
- isOneToOne: false;
3302
- referencedRelation: "organizations";
3303
- referencedColumns: ["id"];
3304
- }];
3305
- };
3306
3551
  acq_companies: {
3307
3552
  Row: {
3308
3553
  batch_id: string | null;
@@ -3507,117 +3752,6 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
3507
3752
  referencedColumns: ["id"];
3508
3753
  }];
3509
3754
  };
3510
- acq_content: {
3511
- Row: {
3512
- body: string | null;
3513
- created_at: string;
3514
- id: string;
3515
- organization_id: string;
3516
- pillar: string;
3517
- status: string;
3518
- title: string;
3519
- updated_at: string;
3520
- };
3521
- Insert: {
3522
- body?: string | null;
3523
- created_at?: string;
3524
- id?: string;
3525
- organization_id: string;
3526
- pillar: string;
3527
- status?: string;
3528
- title: string;
3529
- updated_at?: string;
3530
- };
3531
- Update: {
3532
- body?: string | null;
3533
- created_at?: string;
3534
- id?: string;
3535
- organization_id?: string;
3536
- pillar?: string;
3537
- status?: string;
3538
- title?: string;
3539
- updated_at?: string;
3540
- };
3541
- Relationships: [{
3542
- foreignKeyName: "acq_content_organization_id_fkey";
3543
- columns: ["organization_id"];
3544
- isOneToOne: false;
3545
- referencedRelation: "organizations";
3546
- referencedColumns: ["id"];
3547
- }];
3548
- };
3549
- acq_content_distributions: {
3550
- Row: {
3551
- adapted_body: string | null;
3552
- checklist: Json | null;
3553
- content_id: string;
3554
- created_at: string;
3555
- format: string;
3556
- id: string;
3557
- media_urls: Json;
3558
- metrics: Json;
3559
- metrics_updated_at: string | null;
3560
- organization_id: string;
3561
- platform: string;
3562
- platform_content: Json | null;
3563
- platform_post_id: string | null;
3564
- platform_url: string | null;
3565
- published_at: string | null;
3566
- status: string;
3567
- updated_at: string;
3568
- };
3569
- Insert: {
3570
- adapted_body?: string | null;
3571
- checklist?: Json | null;
3572
- content_id: string;
3573
- created_at?: string;
3574
- format: string;
3575
- id?: string;
3576
- media_urls?: Json;
3577
- metrics?: Json;
3578
- metrics_updated_at?: string | null;
3579
- organization_id: string;
3580
- platform: string;
3581
- platform_content?: Json | null;
3582
- platform_post_id?: string | null;
3583
- platform_url?: string | null;
3584
- published_at?: string | null;
3585
- status?: string;
3586
- updated_at?: string;
3587
- };
3588
- Update: {
3589
- adapted_body?: string | null;
3590
- checklist?: Json | null;
3591
- content_id?: string;
3592
- created_at?: string;
3593
- format?: string;
3594
- id?: string;
3595
- media_urls?: Json;
3596
- metrics?: Json;
3597
- metrics_updated_at?: string | null;
3598
- organization_id?: string;
3599
- platform?: string;
3600
- platform_content?: Json | null;
3601
- platform_post_id?: string | null;
3602
- platform_url?: string | null;
3603
- published_at?: string | null;
3604
- status?: string;
3605
- updated_at?: string;
3606
- };
3607
- Relationships: [{
3608
- foreignKeyName: "acq_content_distributions_content_id_fkey";
3609
- columns: ["content_id"];
3610
- isOneToOne: false;
3611
- referencedRelation: "acq_content";
3612
- referencedColumns: ["id"];
3613
- }, {
3614
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
3615
- columns: ["organization_id"];
3616
- isOneToOne: false;
3617
- referencedRelation: "organizations";
3618
- referencedColumns: ["id"];
3619
- }];
3620
- };
3621
3755
  acq_deal_notes: {
3622
3756
  Row: {
3623
3757
  author_user_id: string | null;
@@ -3647,6 +3781,12 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
3647
3781
  updated_at?: string;
3648
3782
  };
3649
3783
  Relationships: [{
3784
+ foreignKeyName: "acq_deal_notes_author_user_id_fkey";
3785
+ columns: ["author_user_id"];
3786
+ isOneToOne: false;
3787
+ referencedRelation: "users";
3788
+ referencedColumns: ["id"];
3789
+ }, {
3650
3790
  foreignKeyName: "acq_deal_notes_deal_id_fkey";
3651
3791
  columns: ["deal_id"];
3652
3792
  isOneToOne: false;
@@ -3707,6 +3847,24 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
3707
3847
  updated_at?: string;
3708
3848
  };
3709
3849
  Relationships: [{
3850
+ foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
3851
+ columns: ["assignee_user_id"];
3852
+ isOneToOne: false;
3853
+ referencedRelation: "users";
3854
+ referencedColumns: ["id"];
3855
+ }, {
3856
+ foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
3857
+ columns: ["completed_by_user_id"];
3858
+ isOneToOne: false;
3859
+ referencedRelation: "users";
3860
+ referencedColumns: ["id"];
3861
+ }, {
3862
+ foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
3863
+ columns: ["created_by_user_id"];
3864
+ isOneToOne: false;
3865
+ referencedRelation: "users";
3866
+ referencedColumns: ["id"];
3867
+ }, {
3710
3868
  foreignKeyName: "acq_deal_tasks_deal_id_fkey";
3711
3869
  columns: ["deal_id"];
3712
3870
  isOneToOne: false;
@@ -3856,12 +4014,24 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
3856
4014
  isOneToOne: false;
3857
4015
  referencedRelation: "acq_contacts";
3858
4016
  referencedColumns: ["id"];
4017
+ }, {
4018
+ foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
4019
+ columns: ["discovery_submitted_by"];
4020
+ isOneToOne: false;
4021
+ referencedRelation: "users";
4022
+ referencedColumns: ["id"];
3859
4023
  }, {
3860
4024
  foreignKeyName: "acq_deals_organization_id_fkey";
3861
4025
  columns: ["organization_id"];
3862
4026
  isOneToOne: false;
3863
4027
  referencedRelation: "organizations";
3864
4028
  referencedColumns: ["id"];
4029
+ }, {
4030
+ foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
4031
+ columns: ["proposal_reviewed_by"];
4032
+ isOneToOne: false;
4033
+ referencedRelation: "users";
4034
+ referencedColumns: ["id"];
3865
4035
  }, {
3866
4036
  foreignKeyName: "acq_deals_source_list_id_fkey";
3867
4037
  columns: ["source_list_id"];
@@ -3914,6 +4084,12 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
3914
4084
  state_key?: string;
3915
4085
  };
3916
4086
  Relationships: [{
4087
+ foreignKeyName: "acq_list_companies_added_by_fkey";
4088
+ columns: ["added_by"];
4089
+ isOneToOne: false;
4090
+ referencedRelation: "users";
4091
+ referencedColumns: ["id"];
4092
+ }, {
3917
4093
  foreignKeyName: "acq_list_companies_company_id_fkey";
3918
4094
  columns: ["company_id"];
3919
4095
  isOneToOne: false;
@@ -4013,6 +4189,12 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
4013
4189
  state_key?: string;
4014
4190
  };
4015
4191
  Relationships: [{
4192
+ foreignKeyName: "acq_list_members_added_by_fkey";
4193
+ columns: ["added_by"];
4194
+ isOneToOne: false;
4195
+ referencedRelation: "users";
4196
+ referencedColumns: ["id"];
4197
+ }, {
4016
4198
  foreignKeyName: "acq_list_members_contact_id_fkey";
4017
4199
  columns: ["contact_id"];
4018
4200
  isOneToOne: false;
@@ -4400,6 +4582,12 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
4400
4582
  title?: string;
4401
4583
  };
4402
4584
  Relationships: [{
4585
+ foreignKeyName: "activities_actor_id_fkey";
4586
+ columns: ["actor_id"];
4587
+ isOneToOne: false;
4588
+ referencedRelation: "users";
4589
+ referencedColumns: ["id"];
4590
+ }, {
4403
4591
  foreignKeyName: "activities_organization_id_fkey";
4404
4592
  columns: ["organization_id"];
4405
4593
  isOneToOne: false;
@@ -4491,15 +4679,69 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
4491
4679
  organization_id: string;
4492
4680
  };
4493
4681
  Update: {
4494
- created_at?: string | null;
4682
+ created_at?: string | null;
4683
+ id?: string;
4684
+ key_hash?: string;
4685
+ last_used_at?: string | null;
4686
+ name?: string;
4687
+ organization_id?: string;
4688
+ };
4689
+ Relationships: [{
4690
+ foreignKeyName: "api_keys_organization_id_fkey";
4691
+ columns: ["organization_id"];
4692
+ isOneToOne: false;
4693
+ referencedRelation: "organizations";
4694
+ referencedColumns: ["id"];
4695
+ }];
4696
+ };
4697
+ artifacts: {
4698
+ Row: {
4699
+ content: Json;
4700
+ created_at: string;
4701
+ created_by: string | null;
4702
+ id: string;
4703
+ is_active: boolean;
4704
+ kind: string;
4705
+ organization_id: string;
4706
+ owner_id: string | null;
4707
+ owner_kind: string;
4708
+ pipeline_id: string | null;
4709
+ source_execution_id: string | null;
4710
+ updated_at: string;
4711
+ version: number;
4712
+ };
4713
+ Insert: {
4714
+ content: Json;
4715
+ created_at?: string;
4716
+ created_by?: string | null;
4717
+ id?: string;
4718
+ is_active?: boolean;
4719
+ kind: string;
4720
+ organization_id: string;
4721
+ owner_id?: string | null;
4722
+ owner_kind: string;
4723
+ pipeline_id?: string | null;
4724
+ source_execution_id?: string | null;
4725
+ updated_at?: string;
4726
+ version?: number;
4727
+ };
4728
+ Update: {
4729
+ content?: Json;
4730
+ created_at?: string;
4731
+ created_by?: string | null;
4495
4732
  id?: string;
4496
- key_hash?: string;
4497
- last_used_at?: string | null;
4498
- name?: string;
4733
+ is_active?: boolean;
4734
+ kind?: string;
4499
4735
  organization_id?: string;
4736
+ owner_id?: string | null;
4737
+ owner_kind?: string;
4738
+ pipeline_id?: string | null;
4739
+ source_execution_id?: string | null;
4740
+ updated_at?: string;
4741
+ version?: number;
4500
4742
  };
4501
4743
  Relationships: [{
4502
- foreignKeyName: "api_keys_organization_id_fkey";
4744
+ foreignKeyName: "artifacts_organization_id_fkey";
4503
4745
  columns: ["organization_id"];
4504
4746
  isOneToOne: false;
4505
4747
  referencedRelation: "organizations";
@@ -4668,6 +4910,294 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
4668
4910
  referencedColumns: ["execution_id"];
4669
4911
  }];
4670
4912
  };
4913
+ content_distributions: {
4914
+ Row: {
4915
+ adapted_body: string | null;
4916
+ checklist: Json | null;
4917
+ content_item_id: string;
4918
+ created_at: string;
4919
+ format: string;
4920
+ id: string;
4921
+ media_urls: Json;
4922
+ metrics: Json;
4923
+ metrics_updated_at: string | null;
4924
+ organization_id: string;
4925
+ platform: string;
4926
+ platform_content: Json | null;
4927
+ platform_post_id: string | null;
4928
+ platform_url: string | null;
4929
+ processing_state: Json;
4930
+ publish_method: string | null;
4931
+ published_at: string | null;
4932
+ status: string;
4933
+ updated_at: string;
4934
+ };
4935
+ Insert: {
4936
+ adapted_body?: string | null;
4937
+ checklist?: Json | null;
4938
+ content_item_id: string;
4939
+ created_at?: string;
4940
+ format: string;
4941
+ id?: string;
4942
+ media_urls?: Json;
4943
+ metrics?: Json;
4944
+ metrics_updated_at?: string | null;
4945
+ organization_id: string;
4946
+ platform: string;
4947
+ platform_content?: Json | null;
4948
+ platform_post_id?: string | null;
4949
+ platform_url?: string | null;
4950
+ processing_state?: Json;
4951
+ publish_method?: string | null;
4952
+ published_at?: string | null;
4953
+ status?: string;
4954
+ updated_at?: string;
4955
+ };
4956
+ Update: {
4957
+ adapted_body?: string | null;
4958
+ checklist?: Json | null;
4959
+ content_item_id?: string;
4960
+ created_at?: string;
4961
+ format?: string;
4962
+ id?: string;
4963
+ media_urls?: Json;
4964
+ metrics?: Json;
4965
+ metrics_updated_at?: string | null;
4966
+ organization_id?: string;
4967
+ platform?: string;
4968
+ platform_content?: Json | null;
4969
+ platform_post_id?: string | null;
4970
+ platform_url?: string | null;
4971
+ processing_state?: Json;
4972
+ publish_method?: string | null;
4973
+ published_at?: string | null;
4974
+ status?: string;
4975
+ updated_at?: string;
4976
+ };
4977
+ Relationships: [{
4978
+ foreignKeyName: "content_distributions_content_item_id_fkey";
4979
+ columns: ["content_item_id"];
4980
+ isOneToOne: false;
4981
+ referencedRelation: "content_items";
4982
+ referencedColumns: ["id"];
4983
+ }, {
4984
+ foreignKeyName: "content_distributions_organization_id_fkey";
4985
+ columns: ["organization_id"];
4986
+ isOneToOne: false;
4987
+ referencedRelation: "organizations";
4988
+ referencedColumns: ["id"];
4989
+ }];
4990
+ };
4991
+ content_item_attempts: {
4992
+ Row: {
4993
+ attempt_number: number;
4994
+ content_item_id: string;
4995
+ created_at: string;
4996
+ created_by: string | null;
4997
+ id: string;
4998
+ organization_id: string;
4999
+ payload: Json;
5000
+ source_execution_id: string | null;
5001
+ step_key: string | null;
5002
+ };
5003
+ Insert: {
5004
+ attempt_number: number;
5005
+ content_item_id: string;
5006
+ created_at?: string;
5007
+ created_by?: string | null;
5008
+ id?: string;
5009
+ organization_id: string;
5010
+ payload?: Json;
5011
+ source_execution_id?: string | null;
5012
+ step_key?: string | null;
5013
+ };
5014
+ Update: {
5015
+ attempt_number?: number;
5016
+ content_item_id?: string;
5017
+ created_at?: string;
5018
+ created_by?: string | null;
5019
+ id?: string;
5020
+ organization_id?: string;
5021
+ payload?: Json;
5022
+ source_execution_id?: string | null;
5023
+ step_key?: string | null;
5024
+ };
5025
+ Relationships: [{
5026
+ foreignKeyName: "content_item_attempts_content_item_id_fkey";
5027
+ columns: ["content_item_id"];
5028
+ isOneToOne: false;
5029
+ referencedRelation: "content_items";
5030
+ referencedColumns: ["id"];
5031
+ }, {
5032
+ foreignKeyName: "content_item_attempts_created_by_fkey";
5033
+ columns: ["created_by"];
5034
+ isOneToOne: false;
5035
+ referencedRelation: "users";
5036
+ referencedColumns: ["id"];
5037
+ }, {
5038
+ foreignKeyName: "content_item_attempts_organization_id_fkey";
5039
+ columns: ["organization_id"];
5040
+ isOneToOne: false;
5041
+ referencedRelation: "organizations";
5042
+ referencedColumns: ["id"];
5043
+ }, {
5044
+ foreignKeyName: "content_item_attempts_source_execution_id_fkey";
5045
+ columns: ["source_execution_id"];
5046
+ isOneToOne: false;
5047
+ referencedRelation: "execution_logs";
5048
+ referencedColumns: ["execution_id"];
5049
+ }];
5050
+ };
5051
+ content_items: {
5052
+ Row: {
5053
+ body: string | null;
5054
+ client_id: string | null;
5055
+ created_at: string;
5056
+ created_by: string | null;
5057
+ id: string;
5058
+ organization_id: string;
5059
+ payload: Json;
5060
+ pillar: string | null;
5061
+ pipeline_id: string | null;
5062
+ processing_state: Json;
5063
+ reject_reason: string | null;
5064
+ reviewed_at: string | null;
5065
+ reviewed_by: string | null;
5066
+ reviewer_feedback: string | null;
5067
+ source_asset_id: string | null;
5068
+ status: string;
5069
+ title: string;
5070
+ updated_at: string;
5071
+ updated_by: string | null;
5072
+ };
5073
+ Insert: {
5074
+ body?: string | null;
5075
+ client_id?: string | null;
5076
+ created_at?: string;
5077
+ created_by?: string | null;
5078
+ id?: string;
5079
+ organization_id: string;
5080
+ payload?: Json;
5081
+ pillar?: string | null;
5082
+ pipeline_id?: string | null;
5083
+ processing_state?: Json;
5084
+ reject_reason?: string | null;
5085
+ reviewed_at?: string | null;
5086
+ reviewed_by?: string | null;
5087
+ reviewer_feedback?: string | null;
5088
+ source_asset_id?: string | null;
5089
+ status?: string;
5090
+ title: string;
5091
+ updated_at?: string;
5092
+ updated_by?: string | null;
5093
+ };
5094
+ Update: {
5095
+ body?: string | null;
5096
+ client_id?: string | null;
5097
+ created_at?: string;
5098
+ created_by?: string | null;
5099
+ id?: string;
5100
+ organization_id?: string;
5101
+ payload?: Json;
5102
+ pillar?: string | null;
5103
+ pipeline_id?: string | null;
5104
+ processing_state?: Json;
5105
+ reject_reason?: string | null;
5106
+ reviewed_at?: string | null;
5107
+ reviewed_by?: string | null;
5108
+ reviewer_feedback?: string | null;
5109
+ source_asset_id?: string | null;
5110
+ status?: string;
5111
+ title?: string;
5112
+ updated_at?: string;
5113
+ updated_by?: string | null;
5114
+ };
5115
+ Relationships: [{
5116
+ foreignKeyName: "content_items_client_id_fkey";
5117
+ columns: ["client_id"];
5118
+ isOneToOne: false;
5119
+ referencedRelation: "clients";
5120
+ referencedColumns: ["id"];
5121
+ }, {
5122
+ foreignKeyName: "content_items_created_by_fkey";
5123
+ columns: ["created_by"];
5124
+ isOneToOne: false;
5125
+ referencedRelation: "users";
5126
+ referencedColumns: ["id"];
5127
+ }, {
5128
+ foreignKeyName: "content_items_organization_id_fkey";
5129
+ columns: ["organization_id"];
5130
+ isOneToOne: false;
5131
+ referencedRelation: "organizations";
5132
+ referencedColumns: ["id"];
5133
+ }, {
5134
+ foreignKeyName: "content_items_reviewed_by_fkey";
5135
+ columns: ["reviewed_by"];
5136
+ isOneToOne: false;
5137
+ referencedRelation: "users";
5138
+ referencedColumns: ["id"];
5139
+ }, {
5140
+ foreignKeyName: "content_items_source_asset_id_fkey";
5141
+ columns: ["source_asset_id"];
5142
+ isOneToOne: false;
5143
+ referencedRelation: "content_source_assets";
5144
+ referencedColumns: ["id"];
5145
+ }, {
5146
+ foreignKeyName: "content_items_updated_by_fkey";
5147
+ columns: ["updated_by"];
5148
+ isOneToOne: false;
5149
+ referencedRelation: "users";
5150
+ referencedColumns: ["id"];
5151
+ }];
5152
+ };
5153
+ content_source_assets: {
5154
+ Row: {
5155
+ created_at: string;
5156
+ duration_seconds: number | null;
5157
+ external_url: string | null;
5158
+ id: string;
5159
+ kind: string;
5160
+ metadata: Json;
5161
+ organization_id: string;
5162
+ processing_state: Json;
5163
+ storage_path: string | null;
5164
+ title: string;
5165
+ updated_at: string;
5166
+ };
5167
+ Insert: {
5168
+ created_at?: string;
5169
+ duration_seconds?: number | null;
5170
+ external_url?: string | null;
5171
+ id?: string;
5172
+ kind: string;
5173
+ metadata?: Json;
5174
+ organization_id: string;
5175
+ processing_state?: Json;
5176
+ storage_path?: string | null;
5177
+ title: string;
5178
+ updated_at?: string;
5179
+ };
5180
+ Update: {
5181
+ created_at?: string;
5182
+ duration_seconds?: number | null;
5183
+ external_url?: string | null;
5184
+ id?: string;
5185
+ kind?: string;
5186
+ metadata?: Json;
5187
+ organization_id?: string;
5188
+ processing_state?: Json;
5189
+ storage_path?: string | null;
5190
+ title?: string;
5191
+ updated_at?: string;
5192
+ };
5193
+ Relationships: [{
5194
+ foreignKeyName: "content_source_assets_organization_id_fkey";
5195
+ columns: ["organization_id"];
5196
+ isOneToOne: false;
5197
+ referencedRelation: "organizations";
5198
+ referencedColumns: ["id"];
5199
+ }];
5200
+ };
4671
5201
  credentials: {
4672
5202
  Row: {
4673
5203
  created_at: string;
@@ -6197,6 +6727,33 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
6197
6727
  };
6198
6728
  Returns: boolean;
6199
6729
  };
6730
+ create_artifact_version: {
6731
+ Args: {
6732
+ p_content: Json;
6733
+ p_created_by?: string;
6734
+ p_kind: string;
6735
+ p_organization_id: string;
6736
+ p_owner_id?: string;
6737
+ p_owner_kind: string;
6738
+ p_pipeline_id?: string;
6739
+ p_source_execution_id?: string;
6740
+ };
6741
+ Returns: {
6742
+ content: Json;
6743
+ created_at: string;
6744
+ created_by: string | null;
6745
+ id: string;
6746
+ is_active: boolean;
6747
+ kind: string;
6748
+ organization_id: string;
6749
+ owner_id: string | null;
6750
+ owner_kind: string;
6751
+ pipeline_id: string | null;
6752
+ source_execution_id: string | null;
6753
+ updated_at: string;
6754
+ version: number;
6755
+ };
6756
+ };
6200
6757
  current_user_is_platform_admin: {
6201
6758
  Args: Record<PropertyKey, never>;
6202
6759
  Returns: boolean;
@@ -6211,10 +6768,6 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
6211
6768
  Args: Record<PropertyKey, never>;
6212
6769
  Returns: string;
6213
6770
  };
6214
- detect_stalled_executions: {
6215
- Args: Record<PropertyKey, never>;
6216
- Returns: undefined;
6217
- };
6218
6771
  execute_session_turn: {
6219
6772
  Args: {
6220
6773
  p_session_id: string;
@@ -6307,6 +6860,12 @@ declare const useSupabase: () => _supabase_supabase_js.SupabaseClient<Database,
6307
6860
  Args: Record<PropertyKey, never>;
6308
6861
  Returns: Json;
6309
6862
  };
6863
+ purge_stale_test_data: {
6864
+ Args: {
6865
+ p_max_age?: unknown;
6866
+ };
6867
+ Returns: Json;
6868
+ };
6310
6869
  recompute_all_memberships: {
6311
6870
  Args: Record<PropertyKey, never>;
6312
6871
  Returns: undefined;