@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
@@ -751,53 +751,6 @@ type Json = string | number | boolean | null | {
751
751
  type Database = {
752
752
  public: {
753
753
  Tables: {
754
- acq_artifacts: {
755
- Row: {
756
- content: Json;
757
- created_at: string;
758
- created_by: string | null;
759
- id: string;
760
- kind: string;
761
- organization_id: string;
762
- owner_id: string;
763
- owner_kind: string;
764
- source_execution_id: string | null;
765
- version: number;
766
- };
767
- Insert: {
768
- content: Json;
769
- created_at?: string;
770
- created_by?: string | null;
771
- id?: string;
772
- kind: string;
773
- organization_id: string;
774
- owner_id: string;
775
- owner_kind: string;
776
- source_execution_id?: string | null;
777
- version?: number;
778
- };
779
- Update: {
780
- content?: Json;
781
- created_at?: string;
782
- created_by?: string | null;
783
- id?: string;
784
- kind?: string;
785
- organization_id?: string;
786
- owner_id?: string;
787
- owner_kind?: string;
788
- source_execution_id?: string | null;
789
- version?: number;
790
- };
791
- Relationships: [
792
- {
793
- foreignKeyName: "acq_artifacts_organization_id_fkey";
794
- columns: ["organization_id"];
795
- isOneToOne: false;
796
- referencedRelation: "organizations";
797
- referencedColumns: ["id"];
798
- }
799
- ];
800
- };
801
754
  acq_companies: {
802
755
  Row: {
803
756
  batch_id: string | null;
@@ -1009,122 +962,6 @@ type Database = {
1009
962
  }
1010
963
  ];
1011
964
  };
1012
- acq_content: {
1013
- Row: {
1014
- body: string | null;
1015
- created_at: string;
1016
- id: string;
1017
- organization_id: string;
1018
- pillar: string;
1019
- status: string;
1020
- title: string;
1021
- updated_at: string;
1022
- };
1023
- Insert: {
1024
- body?: string | null;
1025
- created_at?: string;
1026
- id?: string;
1027
- organization_id: string;
1028
- pillar: string;
1029
- status?: string;
1030
- title: string;
1031
- updated_at?: string;
1032
- };
1033
- Update: {
1034
- body?: string | null;
1035
- created_at?: string;
1036
- id?: string;
1037
- organization_id?: string;
1038
- pillar?: string;
1039
- status?: string;
1040
- title?: string;
1041
- updated_at?: string;
1042
- };
1043
- Relationships: [
1044
- {
1045
- foreignKeyName: "acq_content_organization_id_fkey";
1046
- columns: ["organization_id"];
1047
- isOneToOne: false;
1048
- referencedRelation: "organizations";
1049
- referencedColumns: ["id"];
1050
- }
1051
- ];
1052
- };
1053
- acq_content_distributions: {
1054
- Row: {
1055
- adapted_body: string | null;
1056
- checklist: Json | null;
1057
- content_id: string;
1058
- created_at: string;
1059
- format: string;
1060
- id: string;
1061
- media_urls: Json;
1062
- metrics: Json;
1063
- metrics_updated_at: string | null;
1064
- organization_id: string;
1065
- platform: string;
1066
- platform_content: Json | null;
1067
- platform_post_id: string | null;
1068
- platform_url: string | null;
1069
- published_at: string | null;
1070
- status: string;
1071
- updated_at: string;
1072
- };
1073
- Insert: {
1074
- adapted_body?: string | null;
1075
- checklist?: Json | null;
1076
- content_id: string;
1077
- created_at?: string;
1078
- format: string;
1079
- id?: string;
1080
- media_urls?: Json;
1081
- metrics?: Json;
1082
- metrics_updated_at?: string | null;
1083
- organization_id: string;
1084
- platform: string;
1085
- platform_content?: Json | null;
1086
- platform_post_id?: string | null;
1087
- platform_url?: string | null;
1088
- published_at?: string | null;
1089
- status?: string;
1090
- updated_at?: string;
1091
- };
1092
- Update: {
1093
- adapted_body?: string | null;
1094
- checklist?: Json | null;
1095
- content_id?: string;
1096
- created_at?: string;
1097
- format?: string;
1098
- id?: string;
1099
- media_urls?: Json;
1100
- metrics?: Json;
1101
- metrics_updated_at?: string | null;
1102
- organization_id?: string;
1103
- platform?: string;
1104
- platform_content?: Json | null;
1105
- platform_post_id?: string | null;
1106
- platform_url?: string | null;
1107
- published_at?: string | null;
1108
- status?: string;
1109
- updated_at?: string;
1110
- };
1111
- Relationships: [
1112
- {
1113
- foreignKeyName: "acq_content_distributions_content_id_fkey";
1114
- columns: ["content_id"];
1115
- isOneToOne: false;
1116
- referencedRelation: "acq_content";
1117
- referencedColumns: ["id"];
1118
- },
1119
- {
1120
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
1121
- columns: ["organization_id"];
1122
- isOneToOne: false;
1123
- referencedRelation: "organizations";
1124
- referencedColumns: ["id"];
1125
- }
1126
- ];
1127
- };
1128
965
  acq_deal_notes: {
1129
966
  Row: {
1130
967
  author_user_id: string | null;
@@ -1154,6 +991,13 @@ type Database = {
1154
991
  updated_at?: string;
1155
992
  };
1156
993
  Relationships: [
994
+ {
995
+ foreignKeyName: "acq_deal_notes_author_user_id_fkey";
996
+ columns: ["author_user_id"];
997
+ isOneToOne: false;
998
+ referencedRelation: "users";
999
+ referencedColumns: ["id"];
1000
+ },
1157
1001
  {
1158
1002
  foreignKeyName: "acq_deal_notes_deal_id_fkey";
1159
1003
  columns: ["deal_id"];
@@ -1217,6 +1061,27 @@ type Database = {
1217
1061
  updated_at?: string;
1218
1062
  };
1219
1063
  Relationships: [
1064
+ {
1065
+ foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
1066
+ columns: ["assignee_user_id"];
1067
+ isOneToOne: false;
1068
+ referencedRelation: "users";
1069
+ referencedColumns: ["id"];
1070
+ },
1071
+ {
1072
+ foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
1073
+ columns: ["completed_by_user_id"];
1074
+ isOneToOne: false;
1075
+ referencedRelation: "users";
1076
+ referencedColumns: ["id"];
1077
+ },
1078
+ {
1079
+ foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
1080
+ columns: ["created_by_user_id"];
1081
+ isOneToOne: false;
1082
+ referencedRelation: "users";
1083
+ referencedColumns: ["id"];
1084
+ },
1220
1085
  {
1221
1086
  foreignKeyName: "acq_deal_tasks_deal_id_fkey";
1222
1087
  columns: ["deal_id"];
@@ -1373,6 +1238,13 @@ type Database = {
1373
1238
  referencedRelation: "acq_contacts";
1374
1239
  referencedColumns: ["id"];
1375
1240
  },
1241
+ {
1242
+ foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
1243
+ columns: ["discovery_submitted_by"];
1244
+ isOneToOne: false;
1245
+ referencedRelation: "users";
1246
+ referencedColumns: ["id"];
1247
+ },
1376
1248
  {
1377
1249
  foreignKeyName: "acq_deals_organization_id_fkey";
1378
1250
  columns: ["organization_id"];
@@ -1380,6 +1252,13 @@ type Database = {
1380
1252
  referencedRelation: "organizations";
1381
1253
  referencedColumns: ["id"];
1382
1254
  },
1255
+ {
1256
+ foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
1257
+ columns: ["proposal_reviewed_by"];
1258
+ isOneToOne: false;
1259
+ referencedRelation: "users";
1260
+ referencedColumns: ["id"];
1261
+ },
1383
1262
  {
1384
1263
  foreignKeyName: "acq_deals_source_list_id_fkey";
1385
1264
  columns: ["source_list_id"];
@@ -1433,6 +1312,13 @@ type Database = {
1433
1312
  state_key?: string;
1434
1313
  };
1435
1314
  Relationships: [
1315
+ {
1316
+ foreignKeyName: "acq_list_companies_added_by_fkey";
1317
+ columns: ["added_by"];
1318
+ isOneToOne: false;
1319
+ referencedRelation: "users";
1320
+ referencedColumns: ["id"];
1321
+ },
1436
1322
  {
1437
1323
  foreignKeyName: "acq_list_companies_company_id_fkey";
1438
1324
  columns: ["company_id"];
@@ -1539,6 +1425,13 @@ type Database = {
1539
1425
  state_key?: string;
1540
1426
  };
1541
1427
  Relationships: [
1428
+ {
1429
+ foreignKeyName: "acq_list_members_added_by_fkey";
1430
+ columns: ["added_by"];
1431
+ isOneToOne: false;
1432
+ referencedRelation: "users";
1433
+ referencedColumns: ["id"];
1434
+ },
1542
1435
  {
1543
1436
  foreignKeyName: "acq_list_members_contact_id_fkey";
1544
1437
  columns: ["contact_id"];
@@ -1939,6 +1832,13 @@ type Database = {
1939
1832
  title?: string;
1940
1833
  };
1941
1834
  Relationships: [
1835
+ {
1836
+ foreignKeyName: "activities_actor_id_fkey";
1837
+ columns: ["actor_id"];
1838
+ isOneToOne: false;
1839
+ referencedRelation: "users";
1840
+ referencedColumns: ["id"];
1841
+ },
1942
1842
  {
1943
1843
  foreignKeyName: "activities_organization_id_fkey";
1944
1844
  columns: ["organization_id"];
@@ -2051,6 +1951,62 @@ type Database = {
2051
1951
  }
2052
1952
  ];
2053
1953
  };
1954
+ artifacts: {
1955
+ Row: {
1956
+ content: Json;
1957
+ created_at: string;
1958
+ created_by: string | null;
1959
+ id: string;
1960
+ is_active: boolean;
1961
+ kind: string;
1962
+ organization_id: string;
1963
+ owner_id: string | null;
1964
+ owner_kind: string;
1965
+ pipeline_id: string | null;
1966
+ source_execution_id: string | null;
1967
+ updated_at: string;
1968
+ version: number;
1969
+ };
1970
+ Insert: {
1971
+ content: Json;
1972
+ created_at?: string;
1973
+ created_by?: string | null;
1974
+ id?: string;
1975
+ is_active?: boolean;
1976
+ kind: string;
1977
+ organization_id: string;
1978
+ owner_id?: string | null;
1979
+ owner_kind: string;
1980
+ pipeline_id?: string | null;
1981
+ source_execution_id?: string | null;
1982
+ updated_at?: string;
1983
+ version?: number;
1984
+ };
1985
+ Update: {
1986
+ content?: Json;
1987
+ created_at?: string;
1988
+ created_by?: string | null;
1989
+ id?: string;
1990
+ is_active?: boolean;
1991
+ kind?: string;
1992
+ organization_id?: string;
1993
+ owner_id?: string | null;
1994
+ owner_kind?: string;
1995
+ pipeline_id?: string | null;
1996
+ source_execution_id?: string | null;
1997
+ updated_at?: string;
1998
+ version?: number;
1999
+ };
2000
+ Relationships: [
2001
+ {
2002
+ foreignKeyName: "artifacts_organization_id_fkey";
2003
+ columns: ["organization_id"];
2004
+ isOneToOne: false;
2005
+ referencedRelation: "organizations";
2006
+ referencedColumns: ["id"];
2007
+ }
2008
+ ];
2009
+ };
2054
2010
  clients: {
2055
2011
  Row: {
2056
2012
  converted_at: string | null;
@@ -2222,6 +2178,311 @@ type Database = {
2222
2178
  }
2223
2179
  ];
2224
2180
  };
2181
+ content_distributions: {
2182
+ Row: {
2183
+ adapted_body: string | null;
2184
+ checklist: Json | null;
2185
+ content_item_id: string;
2186
+ created_at: string;
2187
+ format: string;
2188
+ id: string;
2189
+ media_urls: Json;
2190
+ metrics: Json;
2191
+ metrics_updated_at: string | null;
2192
+ organization_id: string;
2193
+ platform: string;
2194
+ platform_content: Json | null;
2195
+ platform_post_id: string | null;
2196
+ platform_url: string | null;
2197
+ processing_state: Json;
2198
+ publish_method: string | null;
2199
+ published_at: string | null;
2200
+ status: string;
2201
+ updated_at: string;
2202
+ };
2203
+ Insert: {
2204
+ adapted_body?: string | null;
2205
+ checklist?: Json | null;
2206
+ content_item_id: string;
2207
+ created_at?: string;
2208
+ format: string;
2209
+ id?: string;
2210
+ media_urls?: Json;
2211
+ metrics?: Json;
2212
+ metrics_updated_at?: string | null;
2213
+ organization_id: string;
2214
+ platform: string;
2215
+ platform_content?: Json | null;
2216
+ platform_post_id?: string | null;
2217
+ platform_url?: string | null;
2218
+ processing_state?: Json;
2219
+ publish_method?: string | null;
2220
+ published_at?: string | null;
2221
+ status?: string;
2222
+ updated_at?: string;
2223
+ };
2224
+ Update: {
2225
+ adapted_body?: string | null;
2226
+ checklist?: Json | null;
2227
+ content_item_id?: string;
2228
+ created_at?: string;
2229
+ format?: string;
2230
+ id?: string;
2231
+ media_urls?: Json;
2232
+ metrics?: Json;
2233
+ metrics_updated_at?: string | null;
2234
+ organization_id?: string;
2235
+ platform?: string;
2236
+ platform_content?: Json | null;
2237
+ platform_post_id?: string | null;
2238
+ platform_url?: string | null;
2239
+ processing_state?: Json;
2240
+ publish_method?: string | null;
2241
+ published_at?: string | null;
2242
+ status?: string;
2243
+ updated_at?: string;
2244
+ };
2245
+ Relationships: [
2246
+ {
2247
+ foreignKeyName: "content_distributions_content_item_id_fkey";
2248
+ columns: ["content_item_id"];
2249
+ isOneToOne: false;
2250
+ referencedRelation: "content_items";
2251
+ referencedColumns: ["id"];
2252
+ },
2253
+ {
2254
+ foreignKeyName: "content_distributions_organization_id_fkey";
2255
+ columns: ["organization_id"];
2256
+ isOneToOne: false;
2257
+ referencedRelation: "organizations";
2258
+ referencedColumns: ["id"];
2259
+ }
2260
+ ];
2261
+ };
2262
+ content_item_attempts: {
2263
+ Row: {
2264
+ attempt_number: number;
2265
+ content_item_id: string;
2266
+ created_at: string;
2267
+ created_by: string | null;
2268
+ id: string;
2269
+ organization_id: string;
2270
+ payload: Json;
2271
+ source_execution_id: string | null;
2272
+ step_key: string | null;
2273
+ };
2274
+ Insert: {
2275
+ attempt_number: number;
2276
+ content_item_id: string;
2277
+ created_at?: string;
2278
+ created_by?: string | null;
2279
+ id?: string;
2280
+ organization_id: string;
2281
+ payload?: Json;
2282
+ source_execution_id?: string | null;
2283
+ step_key?: string | null;
2284
+ };
2285
+ Update: {
2286
+ attempt_number?: number;
2287
+ content_item_id?: string;
2288
+ created_at?: string;
2289
+ created_by?: string | null;
2290
+ id?: string;
2291
+ organization_id?: string;
2292
+ payload?: Json;
2293
+ source_execution_id?: string | null;
2294
+ step_key?: string | null;
2295
+ };
2296
+ Relationships: [
2297
+ {
2298
+ foreignKeyName: "content_item_attempts_content_item_id_fkey";
2299
+ columns: ["content_item_id"];
2300
+ isOneToOne: false;
2301
+ referencedRelation: "content_items";
2302
+ referencedColumns: ["id"];
2303
+ },
2304
+ {
2305
+ foreignKeyName: "content_item_attempts_created_by_fkey";
2306
+ columns: ["created_by"];
2307
+ isOneToOne: false;
2308
+ referencedRelation: "users";
2309
+ referencedColumns: ["id"];
2310
+ },
2311
+ {
2312
+ foreignKeyName: "content_item_attempts_organization_id_fkey";
2313
+ columns: ["organization_id"];
2314
+ isOneToOne: false;
2315
+ referencedRelation: "organizations";
2316
+ referencedColumns: ["id"];
2317
+ },
2318
+ {
2319
+ foreignKeyName: "content_item_attempts_source_execution_id_fkey";
2320
+ columns: ["source_execution_id"];
2321
+ isOneToOne: false;
2322
+ referencedRelation: "execution_logs";
2323
+ referencedColumns: ["execution_id"];
2324
+ }
2325
+ ];
2326
+ };
2327
+ content_items: {
2328
+ Row: {
2329
+ body: string | null;
2330
+ client_id: string | null;
2331
+ created_at: string;
2332
+ created_by: string | null;
2333
+ id: string;
2334
+ organization_id: string;
2335
+ payload: Json;
2336
+ pillar: string | null;
2337
+ pipeline_id: string | null;
2338
+ processing_state: Json;
2339
+ reject_reason: string | null;
2340
+ reviewed_at: string | null;
2341
+ reviewed_by: string | null;
2342
+ reviewer_feedback: string | null;
2343
+ source_asset_id: string | null;
2344
+ status: string;
2345
+ title: string;
2346
+ updated_at: string;
2347
+ updated_by: string | null;
2348
+ };
2349
+ Insert: {
2350
+ body?: string | null;
2351
+ client_id?: string | null;
2352
+ created_at?: string;
2353
+ created_by?: string | null;
2354
+ id?: string;
2355
+ organization_id: string;
2356
+ payload?: Json;
2357
+ pillar?: string | null;
2358
+ pipeline_id?: string | null;
2359
+ processing_state?: Json;
2360
+ reject_reason?: string | null;
2361
+ reviewed_at?: string | null;
2362
+ reviewed_by?: string | null;
2363
+ reviewer_feedback?: string | null;
2364
+ source_asset_id?: string | null;
2365
+ status?: string;
2366
+ title: string;
2367
+ updated_at?: string;
2368
+ updated_by?: string | null;
2369
+ };
2370
+ Update: {
2371
+ body?: string | null;
2372
+ client_id?: string | null;
2373
+ created_at?: string;
2374
+ created_by?: string | null;
2375
+ id?: string;
2376
+ organization_id?: string;
2377
+ payload?: Json;
2378
+ pillar?: string | null;
2379
+ pipeline_id?: string | null;
2380
+ processing_state?: Json;
2381
+ reject_reason?: string | null;
2382
+ reviewed_at?: string | null;
2383
+ reviewed_by?: string | null;
2384
+ reviewer_feedback?: string | null;
2385
+ source_asset_id?: string | null;
2386
+ status?: string;
2387
+ title?: string;
2388
+ updated_at?: string;
2389
+ updated_by?: string | null;
2390
+ };
2391
+ Relationships: [
2392
+ {
2393
+ foreignKeyName: "content_items_client_id_fkey";
2394
+ columns: ["client_id"];
2395
+ isOneToOne: false;
2396
+ referencedRelation: "clients";
2397
+ referencedColumns: ["id"];
2398
+ },
2399
+ {
2400
+ foreignKeyName: "content_items_created_by_fkey";
2401
+ columns: ["created_by"];
2402
+ isOneToOne: false;
2403
+ referencedRelation: "users";
2404
+ referencedColumns: ["id"];
2405
+ },
2406
+ {
2407
+ foreignKeyName: "content_items_organization_id_fkey";
2408
+ columns: ["organization_id"];
2409
+ isOneToOne: false;
2410
+ referencedRelation: "organizations";
2411
+ referencedColumns: ["id"];
2412
+ },
2413
+ {
2414
+ foreignKeyName: "content_items_reviewed_by_fkey";
2415
+ columns: ["reviewed_by"];
2416
+ isOneToOne: false;
2417
+ referencedRelation: "users";
2418
+ referencedColumns: ["id"];
2419
+ },
2420
+ {
2421
+ foreignKeyName: "content_items_source_asset_id_fkey";
2422
+ columns: ["source_asset_id"];
2423
+ isOneToOne: false;
2424
+ referencedRelation: "content_source_assets";
2425
+ referencedColumns: ["id"];
2426
+ },
2427
+ {
2428
+ foreignKeyName: "content_items_updated_by_fkey";
2429
+ columns: ["updated_by"];
2430
+ isOneToOne: false;
2431
+ referencedRelation: "users";
2432
+ referencedColumns: ["id"];
2433
+ }
2434
+ ];
2435
+ };
2436
+ content_source_assets: {
2437
+ Row: {
2438
+ created_at: string;
2439
+ duration_seconds: number | null;
2440
+ external_url: string | null;
2441
+ id: string;
2442
+ kind: string;
2443
+ metadata: Json;
2444
+ organization_id: string;
2445
+ processing_state: Json;
2446
+ storage_path: string | null;
2447
+ title: string;
2448
+ updated_at: string;
2449
+ };
2450
+ Insert: {
2451
+ created_at?: string;
2452
+ duration_seconds?: number | null;
2453
+ external_url?: string | null;
2454
+ id?: string;
2455
+ kind: string;
2456
+ metadata?: Json;
2457
+ organization_id: string;
2458
+ processing_state?: Json;
2459
+ storage_path?: string | null;
2460
+ title: string;
2461
+ updated_at?: string;
2462
+ };
2463
+ Update: {
2464
+ created_at?: string;
2465
+ duration_seconds?: number | null;
2466
+ external_url?: string | null;
2467
+ id?: string;
2468
+ kind?: string;
2469
+ metadata?: Json;
2470
+ organization_id?: string;
2471
+ processing_state?: Json;
2472
+ storage_path?: string | null;
2473
+ title?: string;
2474
+ updated_at?: string;
2475
+ };
2476
+ Relationships: [
2477
+ {
2478
+ foreignKeyName: "content_source_assets_organization_id_fkey";
2479
+ columns: ["organization_id"];
2480
+ isOneToOne: false;
2481
+ referencedRelation: "organizations";
2482
+ referencedColumns: ["id"];
2483
+ }
2484
+ ];
2485
+ };
2225
2486
  credentials: {
2226
2487
  Row: {
2227
2488
  created_at: string;
@@ -3838,6 +4099,33 @@ type Database = {
3838
4099
  };
3839
4100
  Returns: boolean;
3840
4101
  };
4102
+ create_artifact_version: {
4103
+ Args: {
4104
+ p_content: Json;
4105
+ p_created_by?: string;
4106
+ p_kind: string;
4107
+ p_organization_id: string;
4108
+ p_owner_id?: string;
4109
+ p_owner_kind: string;
4110
+ p_pipeline_id?: string;
4111
+ p_source_execution_id?: string;
4112
+ };
4113
+ Returns: {
4114
+ content: Json;
4115
+ created_at: string;
4116
+ created_by: string | null;
4117
+ id: string;
4118
+ is_active: boolean;
4119
+ kind: string;
4120
+ organization_id: string;
4121
+ owner_id: string | null;
4122
+ owner_kind: string;
4123
+ pipeline_id: string | null;
4124
+ source_execution_id: string | null;
4125
+ updated_at: string;
4126
+ version: number;
4127
+ };
4128
+ };
3841
4129
  current_user_is_platform_admin: {
3842
4130
  Args: Record<PropertyKey, never>;
3843
4131
  Returns: boolean;
@@ -3852,10 +4140,6 @@ type Database = {
3852
4140
  Args: Record<PropertyKey, never>;
3853
4141
  Returns: string;
3854
4142
  };
3855
- detect_stalled_executions: {
3856
- Args: Record<PropertyKey, never>;
3857
- Returns: undefined;
3858
- };
3859
4143
  execute_session_turn: {
3860
4144
  Args: {
3861
4145
  p_session_id: string;
@@ -3948,6 +4232,12 @@ type Database = {
3948
4232
  Args: Record<PropertyKey, never>;
3949
4233
  Returns: Json;
3950
4234
  };
4235
+ purge_stale_test_data: {
4236
+ Args: {
4237
+ p_max_age?: unknown;
4238
+ };
4239
+ Returns: Json;
4240
+ };
3951
4241
  recompute_all_memberships: {
3952
4242
  Args: Record<PropertyKey, never>;
3953
4243
  Returns: undefined;
@@ -4021,7 +4311,18 @@ type ApiKeyListItem = Omit<SupabaseApiKey, 'key_hash'>;
4021
4311
 
4022
4312
  /** Raw database row type for acq_deals table */
4023
4313
  type AcqDealRow = Database['public']['Tables']['acq_deals']['Row'];
4024
- type DealStage = 'interested' | 'proposal' | 'closing' | 'closed_won' | 'closed_lost' | 'nurturing';
4314
+ /**
4315
+ * Deal stage key. Intentionally an open string, not a closed union — stage
4316
+ * vocabulary is tenant-owned content (see the `CrmStageKeySchema` comment in
4317
+ * api-schemas.ts: "CRM stage/state catalogs are model-owned... The published
4318
+ * core schema validates only the transport shape; closed-catalog membership
4319
+ * is enforced by the caller/API layer via model-injected validators"). A
4320
+ * closed union here would bake Elevasis's specific pipeline
4321
+ * (`interested`/`proposal`/`closing`/`closed_won`/`closed_lost`/`nurturing`)
4322
+ * into every tenant's type surface. `DealStageSchema` in api-schemas.ts is
4323
+ * already `z.string()` for the same reason; this type now matches it.
4324
+ */
4325
+ type DealStage = string;
4025
4326
  type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waiting' | 'stale' | 'closed_low';
4026
4327
  interface DealPriority {
4027
4328
  bucketKey: DealPriorityBucketKey;
@@ -4417,8 +4718,7 @@ declare const SystemApiInterfaceSchema: z.ZodObject<{
4417
4718
  resourceIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4418
4719
  readinessContract: z.ZodOptional<z.ZodObject<{
4419
4720
  requiredObjects: z.ZodDefault<z.ZodArray<z.ZodString>>;
4420
- requiredCatalogs: z.ZodDefault<z.ZodArray<z.ZodString>>;
4421
- requiredKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4721
+ requiredCatalogs: z.ZodArray<z.ZodString>;
4422
4722
  }, z.core.$strict>>;
4423
4723
  }, z.core.$strict>;
4424
4724
  type JsonPrimitive = string | number | boolean | null;
@@ -4437,7 +4737,6 @@ interface SystemEntry {
4437
4737
  path: string;
4438
4738
  surfaces: string[];
4439
4739
  icon?: string;
4440
- order?: number;
4441
4740
  };
4442
4741
  lifecycle?: 'draft' | 'beta' | 'active' | 'deprecated' | 'archived';
4443
4742
  responsibleRoleId?: string;
@@ -4447,17 +4746,12 @@ interface SystemEntry {
4447
4746
  intent: 'exposes' | 'consumes';
4448
4747
  invocation?: unknown;
4449
4748
  }[];
4450
- policies?: string[];
4451
4749
  drivesGoals?: string[];
4452
4750
  apiInterface?: z.infer<typeof SystemApiInterfaceSchema>;
4453
- /** @deprecated Use lifecycle. Accepted for one publish cycle. */
4454
- status?: 'active' | 'deprecated' | 'archived';
4455
4751
  path?: string;
4456
4752
  icon?: string;
4457
4753
  uiPosition?: 'sidebar-primary' | 'sidebar-bottom';
4458
4754
  enabled?: boolean;
4459
- devOnly?: boolean;
4460
- requiresAdmin?: boolean;
4461
4755
  order: number;
4462
4756
  config?: Record<string, JsonValue>;
4463
4757
  ontology?: OntologyScope;
@@ -4588,9 +4882,15 @@ interface ListMembershipsParams {
4588
4882
  * - `linked` — an `org_memberships` row that carries a `workos_membership_id`
4589
4883
  * - `pre_provisioned` — an `org_memberships` row with no `workos_membership_id`;
4590
4884
  * the invitee was provisioned but has not completed signup
4885
+ * - `accepted_unlinked` — an `org_memberships` row with no `workos_membership_id`
4886
+ * for which WorkOS nonetheless holds a live membership, matched by user and
4887
+ * organization. The person has real access; only our record of the link is
4888
+ * missing. Distinct from `pre_provisioned` because the column both states read
4889
+ * as NULL is precisely the one that cannot tell them apart -- see
4890
+ * `recoverUnlinkedWorkOSMembership` in the API's membership service.
4591
4891
  * - `workos_only` — a WorkOS membership with no `org_memberships` row (a sync gap)
4592
4892
  */
4593
- type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'workos_only';
4893
+ type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'accepted_unlinked' | 'workos_only';
4594
4894
  /**
4595
4895
  * Extended membership with user and organization details for UI
4596
4896
  *