@elevasis/ui 1.3.1 → 1.3.3

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 (272) hide show
  1. package/dist/api/index.js +1 -1
  2. package/dist/auth/guards/AdminGuard.d.ts +32 -0
  3. package/dist/auth/guards/AdminGuard.d.ts.map +1 -0
  4. package/dist/auth/guards/ProtectedRoute.d.ts +60 -0
  5. package/dist/auth/guards/ProtectedRoute.d.ts.map +1 -0
  6. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +12 -0
  7. package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +1 -0
  8. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +14 -0
  9. package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +1 -0
  10. package/dist/auth/index.d.ts +14 -174
  11. package/dist/auth/index.d.ts.map +1 -0
  12. package/dist/auth/index.js +1 -1
  13. package/dist/{chunk-A3MCANC6.js → chunk-6IX5JZEH.js} +110 -50
  14. package/dist/chunk-GIFAF5ZS.js +313 -0
  15. package/dist/chunk-JQLT6HBI.js +850 -0
  16. package/dist/chunk-LFYO3MDC.js +58 -0
  17. package/dist/{chunk-72HOBFMP.js → chunk-LTQAAIGE.js} +3 -3
  18. package/dist/{chunk-JBFFCZI4.js → chunk-U34YGJQB.js} +1 -93
  19. package/dist/components/index.d.ts +1 -1353
  20. package/dist/components/index.js +1 -20
  21. package/dist/components/navigation/index.d.ts +2 -32
  22. package/dist/components/navigation/index.js +1 -29
  23. package/dist/execution/index.d.ts +63 -231
  24. package/dist/execution/index.js +1 -4
  25. package/dist/graph/index.css +0 -1
  26. package/dist/graph/index.d.ts +4 -203
  27. package/dist/graph/index.js +1 -1
  28. package/dist/hooks/command-queue/index.d.ts +7 -0
  29. package/dist/hooks/command-queue/index.d.ts.map +1 -0
  30. package/dist/hooks/command-queue/useCommandQueue.d.ts +33 -0
  31. package/dist/hooks/command-queue/useCommandQueue.d.ts.map +1 -0
  32. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +17 -0
  33. package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +1 -0
  34. package/dist/hooks/command-queue/useDeleteTask.d.ts +5 -0
  35. package/dist/hooks/command-queue/useDeleteTask.d.ts.map +1 -0
  36. package/dist/hooks/command-queue/usePatchTask.d.ts +6 -0
  37. package/dist/hooks/command-queue/usePatchTask.d.ts.map +1 -0
  38. package/dist/hooks/command-queue/useSubmitAction.d.ts +29 -0
  39. package/dist/hooks/command-queue/useSubmitAction.d.ts.map +1 -0
  40. package/dist/hooks/executions/index.d.ts +16 -0
  41. package/dist/hooks/executions/index.d.ts.map +1 -0
  42. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +15 -0
  43. package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +1 -0
  44. package/dist/hooks/executions/useCancelExecution.d.ts +20 -0
  45. package/dist/hooks/executions/useCancelExecution.d.ts.map +1 -0
  46. package/dist/hooks/executions/useDeleteExecution.d.ts +13 -0
  47. package/dist/hooks/executions/useDeleteExecution.d.ts.map +1 -0
  48. package/dist/hooks/executions/useExecuteAsync.d.ts +21 -0
  49. package/dist/hooks/executions/useExecuteAsync.d.ts.map +1 -0
  50. package/dist/hooks/executions/useExecution.d.ts +10 -0
  51. package/dist/hooks/executions/useExecution.d.ts.map +1 -0
  52. package/dist/hooks/executions/useExecutions.d.ts +16 -0
  53. package/dist/hooks/executions/useExecutions.d.ts.map +1 -0
  54. package/dist/hooks/executions/useResourceDefinition.d.ts +9 -0
  55. package/dist/hooks/executions/useResourceDefinition.d.ts.map +1 -0
  56. package/dist/hooks/executions/useResources.d.ts +15 -0
  57. package/dist/hooks/executions/useResources.d.ts.map +1 -0
  58. package/dist/hooks/executions/useRetryExecution.d.ts +16 -0
  59. package/dist/hooks/executions/useRetryExecution.d.ts.map +1 -0
  60. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +44 -0
  61. package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +1 -0
  62. package/dist/hooks/feature-access/index.d.ts +2 -0
  63. package/dist/hooks/feature-access/index.d.ts.map +1 -0
  64. package/dist/hooks/index.d.ts +11 -4554
  65. package/dist/hooks/index.d.ts.map +1 -0
  66. package/dist/hooks/index.js +2 -4
  67. package/dist/hooks/monitoring/index.d.ts +9 -0
  68. package/dist/hooks/monitoring/index.d.ts.map +1 -0
  69. package/dist/hooks/monitoring/useActivities.d.ts +52 -0
  70. package/dist/hooks/monitoring/useActivities.d.ts.map +1 -0
  71. package/dist/hooks/monitoring/useCostSummary.d.ts +7 -0
  72. package/dist/hooks/monitoring/useCostSummary.d.ts.map +1 -0
  73. package/dist/hooks/monitoring/useExecutionHealth.d.ts +10 -0
  74. package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +1 -0
  75. package/dist/hooks/monitoring/useExecutionLogs.d.ts +56 -0
  76. package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +1 -0
  77. package/dist/hooks/monitoring/useNotifications.d.ts +11 -0
  78. package/dist/hooks/monitoring/useNotifications.d.ts.map +1 -0
  79. package/dist/hooks/notifications/index.d.ts +8 -0
  80. package/dist/hooks/notifications/index.d.ts.map +1 -0
  81. package/dist/hooks/notifications/useMarkAllAsRead.d.ts +2 -0
  82. package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +1 -0
  83. package/dist/hooks/notifications/useMarkAsRead.d.ts +2 -0
  84. package/dist/hooks/notifications/useMarkAsRead.d.ts.map +1 -0
  85. package/dist/hooks/notifications/useNotificationCount.d.ts +8 -0
  86. package/dist/hooks/notifications/useNotificationCount.d.ts.map +1 -0
  87. package/dist/hooks/observability/index.d.ts +19 -0
  88. package/dist/hooks/observability/index.d.ts.map +1 -0
  89. package/dist/hooks/observability/useBusinessImpact.d.ts +9 -0
  90. package/dist/hooks/observability/useBusinessImpact.d.ts.map +1 -0
  91. package/dist/hooks/observability/useCostBreakdown.d.ts +10 -0
  92. package/dist/hooks/observability/useCostBreakdown.d.ts.map +1 -0
  93. package/dist/hooks/observability/useCostByModel.d.ts +3 -0
  94. package/dist/hooks/observability/useCostByModel.d.ts.map +1 -0
  95. package/dist/hooks/observability/useCostTrends.d.ts +3 -0
  96. package/dist/hooks/observability/useCostTrends.d.ts.map +1 -0
  97. package/dist/hooks/observability/useDashboardMetrics.d.ts +3 -0
  98. package/dist/hooks/observability/useDashboardMetrics.d.ts.map +1 -0
  99. package/dist/hooks/observability/useErrorAnalysis.d.ts +7 -0
  100. package/dist/hooks/observability/useErrorAnalysis.d.ts.map +1 -0
  101. package/dist/hooks/observability/useErrorDetails.d.ts +20 -0
  102. package/dist/hooks/observability/useErrorDetails.d.ts.map +1 -0
  103. package/dist/hooks/observability/useErrorDistribution.d.ts +12 -0
  104. package/dist/hooks/observability/useErrorDistribution.d.ts.map +1 -0
  105. package/dist/hooks/observability/useErrorTrends.d.ts +12 -0
  106. package/dist/hooks/observability/useErrorTrends.d.ts.map +1 -0
  107. package/dist/hooks/observability/useResolveError.d.ts +17 -0
  108. package/dist/hooks/observability/useResolveError.d.ts.map +1 -0
  109. package/dist/hooks/observability/useTopFailingResources.d.ts +13 -0
  110. package/dist/hooks/observability/useTopFailingResources.d.ts.map +1 -0
  111. package/dist/hooks/published.d.ts +19 -4279
  112. package/dist/hooks/published.d.ts.map +1 -0
  113. package/dist/hooks/published.js +367 -4
  114. package/dist/hooks/scheduling/index.d.ts +5 -0
  115. package/dist/hooks/scheduling/index.d.ts.map +1 -0
  116. package/dist/hooks/scheduling/useSchedules.d.ts +185 -0
  117. package/dist/hooks/scheduling/useSchedules.d.ts.map +1 -0
  118. package/dist/hooks/sessions/index.d.ts +8 -0
  119. package/dist/hooks/sessions/index.d.ts.map +1 -0
  120. package/dist/hooks/sessions/useSessionExecutions.d.ts +13 -0
  121. package/dist/hooks/sessions/useSessionExecutions.d.ts.map +1 -0
  122. package/dist/hooks/sessions/useSessionMessages.d.ts +7 -0
  123. package/dist/hooks/sessions/useSessionMessages.d.ts.map +1 -0
  124. package/dist/hooks/sessions/useSessions.d.ts +26 -0
  125. package/dist/hooks/sessions/useSessions.d.ts.map +1 -0
  126. package/dist/index.css +0 -118
  127. package/dist/index.d.ts +15 -7889
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +1119 -24
  130. package/dist/initialization/InitializationProvider.d.ts +48 -0
  131. package/dist/initialization/InitializationProvider.d.ts.map +1 -0
  132. package/dist/initialization/hooks/useAppInitialization.d.ts +32 -0
  133. package/dist/initialization/hooks/useAppInitialization.d.ts.map +1 -0
  134. package/dist/initialization/index.d.ts +22 -2361
  135. package/dist/initialization/index.d.ts.map +1 -0
  136. package/dist/initialization/index.js +1 -1
  137. package/dist/organization/context/OrganizationProvider.d.ts +20 -0
  138. package/dist/organization/context/OrganizationProvider.d.ts.map +1 -0
  139. package/dist/organization/hooks/useOrgInitialization.d.ts +56 -0
  140. package/dist/organization/hooks/useOrgInitialization.d.ts.map +1 -0
  141. package/dist/organization/index.d.ts +21 -283
  142. package/dist/organization/index.d.ts.map +1 -0
  143. package/dist/organization/index.js +3 -3
  144. package/dist/profile/context/ProfileProvider.d.ts +27 -0
  145. package/dist/profile/context/ProfileProvider.d.ts.map +1 -0
  146. package/dist/profile/hooks/useUserProfile.d.ts +31 -0
  147. package/dist/profile/hooks/useUserProfile.d.ts.map +1 -0
  148. package/dist/profile/index.d.ts +14 -2290
  149. package/dist/profile/index.d.ts.map +1 -0
  150. package/dist/provider/CoreAuthKitInner.d.ts +12 -0
  151. package/dist/provider/CoreAuthKitInner.d.ts.map +1 -0
  152. package/dist/provider/ElevasisCoreProvider.d.ts +39 -0
  153. package/dist/provider/ElevasisCoreProvider.d.ts.map +1 -0
  154. package/dist/provider/ElevasisServiceContext.d.ts +31 -0
  155. package/dist/provider/ElevasisServiceContext.d.ts.map +1 -0
  156. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +2 -0
  157. package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +1 -0
  158. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +2 -0
  159. package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +1 -0
  160. package/dist/provider/index.d.ts +7 -372
  161. package/dist/provider/index.d.ts.map +1 -0
  162. package/dist/provider/index.js +3 -12
  163. package/dist/provider/published.d.ts +9 -263
  164. package/dist/provider/published.d.ts.map +1 -0
  165. package/dist/provider/published.js +5 -5
  166. package/dist/provider/types.d.ts +143 -0
  167. package/dist/provider/types.d.ts.map +1 -0
  168. package/dist/provider/types.js +1 -0
  169. package/dist/sdk-barrel.d.ts +20 -0
  170. package/dist/sdk-barrel.d.ts.map +1 -0
  171. package/dist/supabase/index.d.ts +0 -255
  172. package/dist/theme/cssVariables.d.ts +12 -0
  173. package/dist/theme/cssVariables.d.ts.map +1 -0
  174. package/dist/theme/cssVariables.js +93 -0
  175. package/dist/theme/index.d.ts +4 -0
  176. package/dist/theme/index.d.ts.map +1 -0
  177. package/dist/theme/index.js +1 -0
  178. package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
  179. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
  180. package/dist/theme/presets/abyss.d.ts +3 -0
  181. package/dist/theme/presets/abyss.d.ts.map +1 -0
  182. package/dist/theme/presets/abyss.js +54 -0
  183. package/dist/theme/presets/aurora.d.ts +8 -0
  184. package/dist/theme/presets/aurora.d.ts.map +1 -0
  185. package/dist/theme/presets/aurora.js +59 -0
  186. package/dist/theme/presets/canopy.d.ts +3 -0
  187. package/dist/theme/presets/canopy.d.ts.map +1 -0
  188. package/dist/theme/presets/canopy.js +58 -0
  189. package/dist/theme/presets/cyber-flux.d.ts +8 -0
  190. package/dist/theme/presets/cyber-flux.d.ts.map +1 -0
  191. package/dist/theme/presets/cyber-flux.js +66 -0
  192. package/dist/theme/presets/cyber-strike.d.ts +9 -0
  193. package/dist/theme/presets/cyber-strike.d.ts.map +1 -0
  194. package/dist/theme/presets/cyber-strike.js +62 -0
  195. package/dist/theme/presets/cyber-void.d.ts +8 -0
  196. package/dist/theme/presets/cyber-void.d.ts.map +1 -0
  197. package/dist/theme/presets/cyber-void.js +62 -0
  198. package/dist/theme/presets/cyber-volt.d.ts +8 -0
  199. package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
  200. package/dist/theme/presets/cyber-volt.js +66 -0
  201. package/dist/theme/presets/default.d.ts +4 -0
  202. package/dist/theme/presets/default.d.ts.map +1 -0
  203. package/dist/theme/presets/ember.d.ts +8 -0
  204. package/dist/theme/presets/ember.d.ts.map +1 -0
  205. package/dist/theme/presets/ember.js +63 -0
  206. package/dist/theme/presets/honey.d.ts +3 -0
  207. package/dist/theme/presets/honey.d.ts.map +1 -0
  208. package/dist/theme/presets/honey.js +62 -0
  209. package/dist/theme/presets/index.d.ts +6 -0
  210. package/dist/theme/presets/index.d.ts.map +1 -0
  211. package/dist/theme/presets/index.js +39 -0
  212. package/dist/theme/presets/midnight.d.ts +8 -0
  213. package/dist/theme/presets/midnight.d.ts.map +1 -0
  214. package/dist/theme/presets/midnight.js +68 -0
  215. package/dist/theme/presets/obsidian.d.ts +3 -0
  216. package/dist/theme/presets/obsidian.d.ts.map +1 -0
  217. package/dist/theme/presets/obsidian.js +56 -0
  218. package/dist/theme/presets/regal.d.ts +8 -0
  219. package/dist/theme/presets/regal.d.ts.map +1 -0
  220. package/dist/theme/presets/regal.js +63 -0
  221. package/dist/theme/presets/rose-gold.d.ts +8 -0
  222. package/dist/theme/presets/rose-gold.d.ts.map +1 -0
  223. package/dist/theme/presets/rose-gold.js +63 -0
  224. package/dist/theme/presets/slate.d.ts +3 -0
  225. package/dist/theme/presets/slate.d.ts.map +1 -0
  226. package/dist/theme/presets/slate.js +56 -0
  227. package/dist/theme/presets/tactical.d.ts +8 -0
  228. package/dist/theme/presets/tactical.d.ts.map +1 -0
  229. package/dist/theme/presets/tactical.js +57 -0
  230. package/dist/theme/presets/types.d.ts +26 -0
  231. package/dist/theme/presets/types.d.ts.map +1 -0
  232. package/dist/theme/presets/types.js +1 -0
  233. package/dist/utils/index.d.ts +1 -22
  234. package/dist/utils/index.js +1 -1
  235. package/package.json +4 -52
  236. package/dist/chunk-3KMDHCAR.js +0 -52
  237. package/dist/chunk-6BJOYF6E.js +0 -8
  238. package/dist/chunk-BLO4SISK.js +0 -113
  239. package/dist/chunk-HUWJXLLF.js +0 -681
  240. package/dist/chunk-JVAZHVNV.js +0 -110
  241. package/dist/chunk-JYSYHVLU.js +0 -379
  242. package/dist/chunk-NE36BUGQ.js +0 -146
  243. package/dist/chunk-O3PY6B6E.js +0 -749
  244. package/dist/chunk-OXVOHOP3.js +0 -661
  245. package/dist/chunk-PSLKGOBZ.js +0 -58
  246. package/dist/chunk-RJCA5672.js +0 -1664
  247. package/dist/chunk-TMFCNFLW.js +0 -107
  248. package/dist/chunk-TN3PU2WK.js +0 -748
  249. package/dist/chunk-TZPAA4RC.js +0 -1461
  250. package/dist/chunk-W7ZBF5AA.js +0 -1
  251. package/dist/chunk-YZ6GTZXL.js +0 -48
  252. package/dist/components/command-queue/index.css +0 -53
  253. package/dist/components/command-queue/index.d.ts +0 -204
  254. package/dist/components/command-queue/index.js +0 -12
  255. package/dist/components/forms/index.d.ts +0 -56
  256. package/dist/components/forms/index.js +0 -2
  257. package/dist/components/index.css +0 -443
  258. package/dist/components/monitoring/index.d.ts +0 -66
  259. package/dist/components/monitoring/index.js +0 -2
  260. package/dist/components/notifications/index.d.ts +0 -52
  261. package/dist/components/notifications/index.js +0 -5
  262. package/dist/components/resource-definition/index.css +0 -388
  263. package/dist/components/resource-definition/index.d.ts +0 -301
  264. package/dist/components/resource-definition/index.js +0 -3
  265. package/dist/display/index.css +0 -53
  266. package/dist/display/index.d.ts +0 -606
  267. package/dist/display/index.js +0 -7
  268. package/dist/execution/index.css +0 -388
  269. package/dist/provider/index.css +0 -61
  270. package/dist/{chunk-TYV5NJV2.js → chunk-BUZONXAW.js} +0 -0
  271. package/dist/{chunk-UMXDDEAG.js → chunk-SFF5MJEI.js} +1 -1
  272. /package/dist/{chunk-NXHL23JW.js → chunk-XXDDMASA.js} +0 -0
@@ -1,2293 +1,17 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
-
4
- type Json = string | number | boolean | null | {
5
- [key: string]: Json | undefined;
6
- } | Json[];
7
- type Database = {
8
- __InternalSupabase: {
9
- PostgrestVersion: "12.2.3 (519615d)";
10
- };
11
- public: {
12
- Tables: {
13
- acq_companies: {
14
- Row: {
15
- attio_company_id: string | null;
16
- batch_id: string | null;
17
- category: string | null;
18
- category_pain: string | null;
19
- created_at: string;
20
- domain: string | null;
21
- enrichment_data: Json | null;
22
- filter_reason: string | null;
23
- founded_year: number | null;
24
- id: string;
25
- linkedin_url: string | null;
26
- location_city: string | null;
27
- location_state: string | null;
28
- name: string;
29
- num_employees: number | null;
30
- organization_id: string;
31
- pipeline_status: Json;
32
- segment: string | null;
33
- source: string | null;
34
- status: string;
35
- updated_at: string;
36
- website: string | null;
37
- };
38
- Insert: {
39
- attio_company_id?: string | null;
40
- batch_id?: string | null;
41
- category?: string | null;
42
- category_pain?: string | null;
43
- created_at?: string;
44
- domain?: string | null;
45
- enrichment_data?: Json | null;
46
- filter_reason?: string | null;
47
- founded_year?: number | null;
48
- id?: string;
49
- linkedin_url?: string | null;
50
- location_city?: string | null;
51
- location_state?: string | null;
52
- name: string;
53
- num_employees?: number | null;
54
- organization_id: string;
55
- pipeline_status?: Json;
56
- segment?: string | null;
57
- source?: string | null;
58
- status?: string;
59
- updated_at?: string;
60
- website?: string | null;
61
- };
62
- Update: {
63
- attio_company_id?: string | null;
64
- batch_id?: string | null;
65
- category?: string | null;
66
- category_pain?: string | null;
67
- created_at?: string;
68
- domain?: string | null;
69
- enrichment_data?: Json | null;
70
- filter_reason?: string | null;
71
- founded_year?: number | null;
72
- id?: string;
73
- linkedin_url?: string | null;
74
- location_city?: string | null;
75
- location_state?: string | null;
76
- name?: string;
77
- num_employees?: number | null;
78
- organization_id?: string;
79
- pipeline_status?: Json;
80
- segment?: string | null;
81
- source?: string | null;
82
- status?: string;
83
- updated_at?: string;
84
- website?: string | null;
85
- };
86
- Relationships: [
87
- {
88
- foreignKeyName: "acq_companies_organization_id_fkey";
89
- columns: ["organization_id"];
90
- isOneToOne: false;
91
- referencedRelation: "organizations";
92
- referencedColumns: ["id"];
93
- }
94
- ];
95
- };
96
- acq_contacts: {
97
- Row: {
98
- attio_person_id: string | null;
99
- batch_id: string | null;
100
- brochure_first_viewed_at: string | null;
101
- brochure_view_count: number;
102
- company_id: string | null;
103
- created_at: string;
104
- email: string;
105
- email_valid: string | null;
106
- enrichment_data: Json;
107
- filter_reason: string | null;
108
- first_name: string | null;
109
- headline: string | null;
110
- id: string;
111
- last_name: string | null;
112
- linkedin_url: string | null;
113
- nurture: boolean;
114
- opening_line: string | null;
115
- organization_id: string;
116
- pipeline_status: Json;
117
- source: string | null;
118
- source_id: string | null;
119
- status: string;
120
- title: string | null;
121
- updated_at: string;
122
- };
123
- Insert: {
124
- attio_person_id?: string | null;
125
- batch_id?: string | null;
126
- brochure_first_viewed_at?: string | null;
127
- brochure_view_count?: number;
128
- company_id?: string | null;
129
- created_at?: string;
130
- email: string;
131
- email_valid?: string | null;
132
- enrichment_data?: Json;
133
- filter_reason?: string | null;
134
- first_name?: string | null;
135
- headline?: string | null;
136
- id?: string;
137
- last_name?: string | null;
138
- linkedin_url?: string | null;
139
- nurture?: boolean;
140
- opening_line?: string | null;
141
- organization_id: string;
142
- pipeline_status?: Json;
143
- source?: string | null;
144
- source_id?: string | null;
145
- status?: string;
146
- title?: string | null;
147
- updated_at?: string;
148
- };
149
- Update: {
150
- attio_person_id?: string | null;
151
- batch_id?: string | null;
152
- brochure_first_viewed_at?: string | null;
153
- brochure_view_count?: number;
154
- company_id?: string | null;
155
- created_at?: string;
156
- email?: string;
157
- email_valid?: string | null;
158
- enrichment_data?: Json;
159
- filter_reason?: string | null;
160
- first_name?: string | null;
161
- headline?: string | null;
162
- id?: string;
163
- last_name?: string | null;
164
- linkedin_url?: string | null;
165
- nurture?: boolean;
166
- opening_line?: string | null;
167
- organization_id?: string;
168
- pipeline_status?: Json;
169
- source?: string | null;
170
- source_id?: string | null;
171
- status?: string;
172
- title?: string | null;
173
- updated_at?: string;
174
- };
175
- Relationships: [
176
- {
177
- foreignKeyName: "acq_contacts_company_id_fkey";
178
- columns: ["company_id"];
179
- isOneToOne: false;
180
- referencedRelation: "acq_companies";
181
- referencedColumns: ["id"];
182
- },
183
- {
184
- foreignKeyName: "acq_contacts_organization_id_fkey";
185
- columns: ["organization_id"];
186
- isOneToOne: false;
187
- referencedRelation: "organizations";
188
- referencedColumns: ["id"];
189
- }
190
- ];
191
- };
192
- acq_content: {
193
- Row: {
194
- body: string | null;
195
- created_at: string;
196
- id: string;
197
- organization_id: string;
198
- pillar: string;
199
- status: string;
200
- title: string;
201
- updated_at: string;
202
- };
203
- Insert: {
204
- body?: string | null;
205
- created_at?: string;
206
- id?: string;
207
- organization_id: string;
208
- pillar: string;
209
- status?: string;
210
- title: string;
211
- updated_at?: string;
212
- };
213
- Update: {
214
- body?: string | null;
215
- created_at?: string;
216
- id?: string;
217
- organization_id?: string;
218
- pillar?: string;
219
- status?: string;
220
- title?: string;
221
- updated_at?: string;
222
- };
223
- Relationships: [
224
- {
225
- foreignKeyName: "acq_content_organization_id_fkey";
226
- columns: ["organization_id"];
227
- isOneToOne: false;
228
- referencedRelation: "organizations";
229
- referencedColumns: ["id"];
230
- }
231
- ];
232
- };
233
- acq_content_distributions: {
234
- Row: {
235
- adapted_body: string | null;
236
- checklist: Json | null;
237
- content_id: string;
238
- created_at: string;
239
- format: string;
240
- id: string;
241
- media_urls: Json;
242
- metrics: Json;
243
- metrics_updated_at: string | null;
244
- organization_id: string;
245
- platform: string;
246
- platform_content: Json | null;
247
- platform_post_id: string | null;
248
- platform_url: string | null;
249
- published_at: string | null;
250
- status: string;
251
- updated_at: string;
252
- };
253
- Insert: {
254
- adapted_body?: string | null;
255
- checklist?: Json | null;
256
- content_id: string;
257
- created_at?: string;
258
- format: string;
259
- id?: string;
260
- media_urls?: Json;
261
- metrics?: Json;
262
- metrics_updated_at?: string | null;
263
- organization_id: string;
264
- platform: string;
265
- platform_content?: Json | null;
266
- platform_post_id?: string | null;
267
- platform_url?: string | null;
268
- published_at?: string | null;
269
- status?: string;
270
- updated_at?: string;
271
- };
272
- Update: {
273
- adapted_body?: string | null;
274
- checklist?: Json | null;
275
- content_id?: string;
276
- created_at?: string;
277
- format?: string;
278
- id?: string;
279
- media_urls?: Json;
280
- metrics?: Json;
281
- metrics_updated_at?: string | null;
282
- organization_id?: string;
283
- platform?: string;
284
- platform_content?: Json | null;
285
- platform_post_id?: string | null;
286
- platform_url?: string | null;
287
- published_at?: string | null;
288
- status?: string;
289
- updated_at?: string;
290
- };
291
- Relationships: [
292
- {
293
- foreignKeyName: "acq_content_distributions_content_id_fkey";
294
- columns: ["content_id"];
295
- isOneToOne: false;
296
- referencedRelation: "acq_content";
297
- referencedColumns: ["id"];
298
- },
299
- {
300
- foreignKeyName: "acq_content_distributions_organization_id_fkey";
301
- columns: ["organization_id"];
302
- isOneToOne: false;
303
- referencedRelation: "organizations";
304
- referencedColumns: ["id"];
305
- }
306
- ];
307
- };
308
- acq_deals: {
309
- Row: {
310
- activity_log: Json;
311
- attio_deal_id: string;
312
- cached_stage: string | null;
313
- closed_lost_at: string | null;
314
- closed_lost_reason: string | null;
315
- contact_email: string;
316
- contact_id: string | null;
317
- created_at: string;
318
- discovery_data: Json | null;
319
- discovery_submitted_at: string | null;
320
- discovery_submitted_by: string | null;
321
- id: string;
322
- initial_fee: number | null;
323
- monthly_fee: number | null;
324
- organization_id: string;
325
- payment_link_sent_at: string | null;
326
- payment_received_at: string | null;
327
- proposal_data: Json | null;
328
- proposal_generated_at: string | null;
329
- proposal_pdf_url: string | null;
330
- proposal_reviewed_at: string | null;
331
- proposal_reviewed_by: string | null;
332
- proposal_sent_at: string | null;
333
- proposal_signed_at: string | null;
334
- proposal_status: string | null;
335
- signature_envelope_id: string | null;
336
- source_list_id: string | null;
337
- source_type: string | null;
338
- stripe_payment_id: string | null;
339
- stripe_payment_link: string | null;
340
- stripe_payment_link_id: string | null;
341
- stripe_subscription_id: string | null;
342
- updated_at: string;
343
- };
344
- Insert: {
345
- activity_log?: Json;
346
- attio_deal_id: string;
347
- cached_stage?: string | null;
348
- closed_lost_at?: string | null;
349
- closed_lost_reason?: string | null;
350
- contact_email: string;
351
- contact_id?: string | null;
352
- created_at?: string;
353
- discovery_data?: Json | null;
354
- discovery_submitted_at?: string | null;
355
- discovery_submitted_by?: string | null;
356
- id?: string;
357
- initial_fee?: number | null;
358
- monthly_fee?: number | null;
359
- organization_id: string;
360
- payment_link_sent_at?: string | null;
361
- payment_received_at?: string | null;
362
- proposal_data?: Json | null;
363
- proposal_generated_at?: string | null;
364
- proposal_pdf_url?: string | null;
365
- proposal_reviewed_at?: string | null;
366
- proposal_reviewed_by?: string | null;
367
- proposal_sent_at?: string | null;
368
- proposal_signed_at?: string | null;
369
- proposal_status?: string | null;
370
- signature_envelope_id?: string | null;
371
- source_list_id?: string | null;
372
- source_type?: string | null;
373
- stripe_payment_id?: string | null;
374
- stripe_payment_link?: string | null;
375
- stripe_payment_link_id?: string | null;
376
- stripe_subscription_id?: string | null;
377
- updated_at?: string;
378
- };
379
- Update: {
380
- activity_log?: Json;
381
- attio_deal_id?: string;
382
- cached_stage?: string | null;
383
- closed_lost_at?: string | null;
384
- closed_lost_reason?: string | null;
385
- contact_email?: string;
386
- contact_id?: string | null;
387
- created_at?: string;
388
- discovery_data?: Json | null;
389
- discovery_submitted_at?: string | null;
390
- discovery_submitted_by?: string | null;
391
- id?: string;
392
- initial_fee?: number | null;
393
- monthly_fee?: number | null;
394
- organization_id?: string;
395
- payment_link_sent_at?: string | null;
396
- payment_received_at?: string | null;
397
- proposal_data?: Json | null;
398
- proposal_generated_at?: string | null;
399
- proposal_pdf_url?: string | null;
400
- proposal_reviewed_at?: string | null;
401
- proposal_reviewed_by?: string | null;
402
- proposal_sent_at?: string | null;
403
- proposal_signed_at?: string | null;
404
- proposal_status?: string | null;
405
- signature_envelope_id?: string | null;
406
- source_list_id?: string | null;
407
- source_type?: string | null;
408
- stripe_payment_id?: string | null;
409
- stripe_payment_link?: string | null;
410
- stripe_payment_link_id?: string | null;
411
- stripe_subscription_id?: string | null;
412
- updated_at?: string;
413
- };
414
- Relationships: [
415
- {
416
- foreignKeyName: "acq_deals_contact_id_fkey";
417
- columns: ["contact_id"];
418
- isOneToOne: false;
419
- referencedRelation: "acq_contacts";
420
- referencedColumns: ["id"];
421
- },
422
- {
423
- foreignKeyName: "acq_deals_organization_id_fkey";
424
- columns: ["organization_id"];
425
- isOneToOne: false;
426
- referencedRelation: "organizations";
427
- referencedColumns: ["id"];
428
- },
429
- {
430
- foreignKeyName: "acq_deals_source_list_id_fkey";
431
- columns: ["source_list_id"];
432
- isOneToOne: false;
433
- referencedRelation: "acq_lists";
434
- referencedColumns: ["id"];
435
- }
436
- ];
437
- };
438
- acq_list_members: {
439
- Row: {
440
- added_at: string;
441
- added_by: string | null;
442
- contact_id: string;
443
- id: string;
444
- list_id: string;
445
- };
446
- Insert: {
447
- added_at?: string;
448
- added_by?: string | null;
449
- contact_id: string;
450
- id?: string;
451
- list_id: string;
452
- };
453
- Update: {
454
- added_at?: string;
455
- added_by?: string | null;
456
- contact_id?: string;
457
- id?: string;
458
- list_id?: string;
459
- };
460
- Relationships: [
461
- {
462
- foreignKeyName: "acq_list_members_contact_id_fkey";
463
- columns: ["contact_id"];
464
- isOneToOne: false;
465
- referencedRelation: "acq_contacts";
466
- referencedColumns: ["id"];
467
- },
468
- {
469
- foreignKeyName: "acq_list_members_list_id_fkey";
470
- columns: ["list_id"];
471
- isOneToOne: false;
472
- referencedRelation: "acq_lists";
473
- referencedColumns: ["id"];
474
- }
475
- ];
476
- };
477
- acq_lists: {
478
- Row: {
479
- batch_ids: string[];
480
- completed_at: string | null;
481
- created_at: string;
482
- description: string | null;
483
- id: string;
484
- instantly_campaign_id: string | null;
485
- launched_at: string | null;
486
- metadata: Json;
487
- name: string;
488
- organization_id: string;
489
- status: string;
490
- type: string;
491
- };
492
- Insert: {
493
- batch_ids?: string[];
494
- completed_at?: string | null;
495
- created_at?: string;
496
- description?: string | null;
497
- id?: string;
498
- instantly_campaign_id?: string | null;
499
- launched_at?: string | null;
500
- metadata?: Json;
501
- name: string;
502
- organization_id: string;
503
- status?: string;
504
- type?: string;
505
- };
506
- Update: {
507
- batch_ids?: string[];
508
- completed_at?: string | null;
509
- created_at?: string;
510
- description?: string | null;
511
- id?: string;
512
- instantly_campaign_id?: string | null;
513
- launched_at?: string | null;
514
- metadata?: Json;
515
- name?: string;
516
- organization_id?: string;
517
- status?: string;
518
- type?: string;
519
- };
520
- Relationships: [
521
- {
522
- foreignKeyName: "acq_lists_organization_id_fkey";
523
- columns: ["organization_id"];
524
- isOneToOne: false;
525
- referencedRelation: "organizations";
526
- referencedColumns: ["id"];
527
- }
528
- ];
529
- };
530
- acq_seo_metrics: {
531
- Row: {
532
- ai_citations: Json | null;
533
- avg_position: number | null;
534
- clicks: number | null;
535
- created_at: string;
536
- cta_clicks: number | null;
537
- ctr: number | null;
538
- data_point_count: number | null;
539
- faq_count: number | null;
540
- form_submissions: number | null;
541
- id: string;
542
- impressions: number | null;
543
- organization_id: string;
544
- period: string;
545
- quality_score: number | null;
546
- readability: number | null;
547
- scroll_100: number | null;
548
- scroll_25: number | null;
549
- scroll_50: number | null;
550
- scroll_75: number | null;
551
- seo_page_id: string;
552
- word_count: number | null;
553
- };
554
- Insert: {
555
- ai_citations?: Json | null;
556
- avg_position?: number | null;
557
- clicks?: number | null;
558
- created_at?: string;
559
- cta_clicks?: number | null;
560
- ctr?: number | null;
561
- data_point_count?: number | null;
562
- faq_count?: number | null;
563
- form_submissions?: number | null;
564
- id?: string;
565
- impressions?: number | null;
566
- organization_id: string;
567
- period: string;
568
- quality_score?: number | null;
569
- readability?: number | null;
570
- scroll_100?: number | null;
571
- scroll_25?: number | null;
572
- scroll_50?: number | null;
573
- scroll_75?: number | null;
574
- seo_page_id: string;
575
- word_count?: number | null;
576
- };
577
- Update: {
578
- ai_citations?: Json | null;
579
- avg_position?: number | null;
580
- clicks?: number | null;
581
- created_at?: string;
582
- cta_clicks?: number | null;
583
- ctr?: number | null;
584
- data_point_count?: number | null;
585
- faq_count?: number | null;
586
- form_submissions?: number | null;
587
- id?: string;
588
- impressions?: number | null;
589
- organization_id?: string;
590
- period?: string;
591
- quality_score?: number | null;
592
- readability?: number | null;
593
- scroll_100?: number | null;
594
- scroll_25?: number | null;
595
- scroll_50?: number | null;
596
- scroll_75?: number | null;
597
- seo_page_id?: string;
598
- word_count?: number | null;
599
- };
600
- Relationships: [
601
- {
602
- foreignKeyName: "acq_seo_metrics_organization_id_fkey";
603
- columns: ["organization_id"];
604
- isOneToOne: false;
605
- referencedRelation: "organizations";
606
- referencedColumns: ["id"];
607
- },
608
- {
609
- foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
610
- columns: ["seo_page_id"];
611
- isOneToOne: false;
612
- referencedRelation: "acq_seo_pages";
613
- referencedColumns: ["id"];
614
- }
615
- ];
616
- };
617
- acq_seo_pages: {
618
- Row: {
619
- city: string | null;
620
- content: Json | null;
621
- created_at: string;
622
- faq_items: Json | null;
623
- hero_image_url: string | null;
624
- id: string;
625
- internal_links: Json | null;
626
- local_data: Json | null;
627
- meta_description: string | null;
628
- organization_id: string;
629
- page_type: string;
630
- published_at: string | null;
631
- refreshed_at: string | null;
632
- schema_markup: Json | null;
633
- slug: string;
634
- state: string | null;
635
- status: string;
636
- title: string;
637
- updated_at: string;
638
- use_case: string | null;
639
- vertical: string;
640
- };
641
- Insert: {
642
- city?: string | null;
643
- content?: Json | null;
644
- created_at?: string;
645
- faq_items?: Json | null;
646
- hero_image_url?: string | null;
647
- id?: string;
648
- internal_links?: Json | null;
649
- local_data?: Json | null;
650
- meta_description?: string | null;
651
- organization_id: string;
652
- page_type: string;
653
- published_at?: string | null;
654
- refreshed_at?: string | null;
655
- schema_markup?: Json | null;
656
- slug: string;
657
- state?: string | null;
658
- status?: string;
659
- title: string;
660
- updated_at?: string;
661
- use_case?: string | null;
662
- vertical: string;
663
- };
664
- Update: {
665
- city?: string | null;
666
- content?: Json | null;
667
- created_at?: string;
668
- faq_items?: Json | null;
669
- hero_image_url?: string | null;
670
- id?: string;
671
- internal_links?: Json | null;
672
- local_data?: Json | null;
673
- meta_description?: string | null;
674
- organization_id?: string;
675
- page_type?: string;
676
- published_at?: string | null;
677
- refreshed_at?: string | null;
678
- schema_markup?: Json | null;
679
- slug?: string;
680
- state?: string | null;
681
- status?: string;
682
- title?: string;
683
- updated_at?: string;
684
- use_case?: string | null;
685
- vertical?: string;
686
- };
687
- Relationships: [
688
- {
689
- foreignKeyName: "acq_seo_pages_organization_id_fkey";
690
- columns: ["organization_id"];
691
- isOneToOne: false;
692
- referencedRelation: "organizations";
693
- referencedColumns: ["id"];
694
- }
695
- ];
696
- };
697
- acq_social_posts: {
698
- Row: {
699
- author_name: string;
700
- author_url: string | null;
701
- comments_count: number;
702
- created_at: string;
703
- discovered_at: string;
704
- engagement_count: number;
705
- feedback: string | null;
706
- final_response: string | null;
707
- fully_reviewed: boolean;
708
- id: string;
709
- initial_draft: string | null;
710
- matched_keywords: string[];
711
- matched_query: string | null;
712
- metadata: Json;
713
- organization_id: string;
714
- platform: string;
715
- platform_post_id: string;
716
- post_text: string;
717
- post_title: string;
718
- post_url: string;
719
- posted_at: string;
720
- relevance_score: number;
721
- responded_at: string | null;
722
- reviewed_at: string | null;
723
- skip_reason: string | null;
724
- source_category: string | null;
725
- status: string;
726
- updated_at: string;
727
- };
728
- Insert: {
729
- author_name: string;
730
- author_url?: string | null;
731
- comments_count?: number;
732
- created_at?: string;
733
- discovered_at?: string;
734
- engagement_count?: number;
735
- feedback?: string | null;
736
- final_response?: string | null;
737
- fully_reviewed?: boolean;
738
- id?: string;
739
- initial_draft?: string | null;
740
- matched_keywords?: string[];
741
- matched_query?: string | null;
742
- metadata?: Json;
743
- organization_id: string;
744
- platform: string;
745
- platform_post_id: string;
746
- post_text: string;
747
- post_title: string;
748
- post_url: string;
749
- posted_at: string;
750
- relevance_score?: number;
751
- responded_at?: string | null;
752
- reviewed_at?: string | null;
753
- skip_reason?: string | null;
754
- source_category?: string | null;
755
- status?: string;
756
- updated_at?: string;
757
- };
758
- Update: {
759
- author_name?: string;
760
- author_url?: string | null;
761
- comments_count?: number;
762
- created_at?: string;
763
- discovered_at?: string;
764
- engagement_count?: number;
765
- feedback?: string | null;
766
- final_response?: string | null;
767
- fully_reviewed?: boolean;
768
- id?: string;
769
- initial_draft?: string | null;
770
- matched_keywords?: string[];
771
- matched_query?: string | null;
772
- metadata?: Json;
773
- organization_id?: string;
774
- platform?: string;
775
- platform_post_id?: string;
776
- post_text?: string;
777
- post_title?: string;
778
- post_url?: string;
779
- posted_at?: string;
780
- relevance_score?: number;
781
- responded_at?: string | null;
782
- reviewed_at?: string | null;
783
- skip_reason?: string | null;
784
- source_category?: string | null;
785
- status?: string;
786
- updated_at?: string;
787
- };
788
- Relationships: [
789
- {
790
- foreignKeyName: "acq_social_posts_organization_id_fkey";
791
- columns: ["organization_id"];
792
- isOneToOne: false;
793
- referencedRelation: "organizations";
794
- referencedColumns: ["id"];
795
- }
796
- ];
797
- };
798
- activities: {
799
- Row: {
800
- activity_type: string;
801
- actor_id: string | null;
802
- actor_type: string | null;
803
- created_at: string;
804
- description: string | null;
805
- entity_id: string;
806
- entity_name: string | null;
807
- entity_type: string;
808
- id: string;
809
- metadata: Json | null;
810
- occurred_at: string;
811
- organization_id: string;
812
- status: string;
813
- title: string;
814
- };
815
- Insert: {
816
- activity_type: string;
817
- actor_id?: string | null;
818
- actor_type?: string | null;
819
- created_at?: string;
820
- description?: string | null;
821
- entity_id: string;
822
- entity_name?: string | null;
823
- entity_type: string;
824
- id?: string;
825
- metadata?: Json | null;
826
- occurred_at?: string;
827
- organization_id: string;
828
- status: string;
829
- title: string;
830
- };
831
- Update: {
832
- activity_type?: string;
833
- actor_id?: string | null;
834
- actor_type?: string | null;
835
- created_at?: string;
836
- description?: string | null;
837
- entity_id?: string;
838
- entity_name?: string | null;
839
- entity_type?: string;
840
- id?: string;
841
- metadata?: Json | null;
842
- occurred_at?: string;
843
- organization_id?: string;
844
- status?: string;
845
- title?: string;
846
- };
847
- Relationships: [
848
- {
849
- foreignKeyName: "activities_organization_id_fkey";
850
- columns: ["organization_id"];
851
- isOneToOne: false;
852
- referencedRelation: "organizations";
853
- referencedColumns: ["id"];
854
- }
855
- ];
856
- };
857
- api_keys: {
858
- Row: {
859
- created_at: string | null;
860
- id: string;
861
- key_hash: string;
862
- last_used_at: string | null;
863
- name: string;
864
- organization_id: string;
865
- };
866
- Insert: {
867
- created_at?: string | null;
868
- id?: string;
869
- key_hash: string;
870
- last_used_at?: string | null;
871
- name: string;
872
- organization_id: string;
873
- };
874
- Update: {
875
- created_at?: string | null;
876
- id?: string;
877
- key_hash?: string;
878
- last_used_at?: string | null;
879
- name?: string;
880
- organization_id?: string;
881
- };
882
- Relationships: [
883
- {
884
- foreignKeyName: "api_keys_organization_id_fkey";
885
- columns: ["organization_id"];
886
- isOneToOne: false;
887
- referencedRelation: "organizations";
888
- referencedColumns: ["id"];
889
- }
890
- ];
891
- };
892
- calibration_projects: {
893
- Row: {
894
- created_at: string | null;
895
- description: string | null;
896
- id: string;
897
- name: string;
898
- organization_id: string;
899
- resource_id: string;
900
- resource_type: string;
901
- updated_at: string | null;
902
- };
903
- Insert: {
904
- created_at?: string | null;
905
- description?: string | null;
906
- id?: string;
907
- name: string;
908
- organization_id: string;
909
- resource_id: string;
910
- resource_type: string;
911
- updated_at?: string | null;
912
- };
913
- Update: {
914
- created_at?: string | null;
915
- description?: string | null;
916
- id?: string;
917
- name?: string;
918
- organization_id?: string;
919
- resource_id?: string;
920
- resource_type?: string;
921
- updated_at?: string | null;
922
- };
923
- Relationships: [
924
- {
925
- foreignKeyName: "calibration_projects_organization_id_fkey";
926
- columns: ["organization_id"];
927
- isOneToOne: false;
928
- referencedRelation: "organizations";
929
- referencedColumns: ["id"];
930
- }
931
- ];
932
- };
933
- calibration_runs: {
934
- Row: {
935
- completed_at: string | null;
936
- config_variants: Json;
937
- created_at: string | null;
938
- description: string | null;
939
- execution_mode: string;
940
- grader_model: string | null;
941
- grading_rubric: Json | null;
942
- id: string;
943
- name: string;
944
- organization_id: string;
945
- project_id: string;
946
- results: Json;
947
- status: string;
948
- test_inputs: Json;
949
- };
950
- Insert: {
951
- completed_at?: string | null;
952
- config_variants: Json;
953
- created_at?: string | null;
954
- description?: string | null;
955
- execution_mode?: string;
956
- grader_model?: string | null;
957
- grading_rubric?: Json | null;
958
- id?: string;
959
- name: string;
960
- organization_id: string;
961
- project_id: string;
962
- results?: Json;
963
- status?: string;
964
- test_inputs: Json;
965
- };
966
- Update: {
967
- completed_at?: string | null;
968
- config_variants?: Json;
969
- created_at?: string | null;
970
- description?: string | null;
971
- execution_mode?: string;
972
- grader_model?: string | null;
973
- grading_rubric?: Json | null;
974
- id?: string;
975
- name?: string;
976
- organization_id?: string;
977
- project_id?: string;
978
- results?: Json;
979
- status?: string;
980
- test_inputs?: Json;
981
- };
982
- Relationships: [
983
- {
984
- foreignKeyName: "calibration_runs_organization_id_fkey";
985
- columns: ["organization_id"];
986
- isOneToOne: false;
987
- referencedRelation: "organizations";
988
- referencedColumns: ["id"];
989
- },
990
- {
991
- foreignKeyName: "calibration_runs_project_id_fkey";
992
- columns: ["project_id"];
993
- isOneToOne: false;
994
- referencedRelation: "calibration_projects";
995
- referencedColumns: ["id"];
996
- }
997
- ];
998
- };
999
- command_queue: {
1000
- Row: {
1001
- action_payload: Json | null;
1002
- actions: Json;
1003
- completed_at: string | null;
1004
- completed_by: string | null;
1005
- context: Json;
1006
- created_at: string;
1007
- description: string | null;
1008
- expires_at: string | null;
1009
- human_checkpoint: string | null;
1010
- id: string;
1011
- idempotency_key: string | null;
1012
- metadata: Json | null;
1013
- organization_id: string;
1014
- origin_execution_id: string;
1015
- origin_resource_id: string;
1016
- origin_resource_type: string;
1017
- priority: number;
1018
- selected_action: string | null;
1019
- status: string;
1020
- target_execution_id: string | null;
1021
- target_resource_id: string | null;
1022
- target_resource_type: string | null;
1023
- };
1024
- Insert: {
1025
- action_payload?: Json | null;
1026
- actions: Json;
1027
- completed_at?: string | null;
1028
- completed_by?: string | null;
1029
- context: Json;
1030
- created_at?: string;
1031
- description?: string | null;
1032
- expires_at?: string | null;
1033
- human_checkpoint?: string | null;
1034
- id?: string;
1035
- idempotency_key?: string | null;
1036
- metadata?: Json | null;
1037
- organization_id: string;
1038
- origin_execution_id: string;
1039
- origin_resource_id: string;
1040
- origin_resource_type: string;
1041
- priority?: number;
1042
- selected_action?: string | null;
1043
- status?: string;
1044
- target_execution_id?: string | null;
1045
- target_resource_id?: string | null;
1046
- target_resource_type?: string | null;
1047
- };
1048
- Update: {
1049
- action_payload?: Json | null;
1050
- actions?: Json;
1051
- completed_at?: string | null;
1052
- completed_by?: string | null;
1053
- context?: Json;
1054
- created_at?: string;
1055
- description?: string | null;
1056
- expires_at?: string | null;
1057
- human_checkpoint?: string | null;
1058
- id?: string;
1059
- idempotency_key?: string | null;
1060
- metadata?: Json | null;
1061
- organization_id?: string;
1062
- origin_execution_id?: string;
1063
- origin_resource_id?: string;
1064
- origin_resource_type?: string;
1065
- priority?: number;
1066
- selected_action?: string | null;
1067
- status?: string;
1068
- target_execution_id?: string | null;
1069
- target_resource_id?: string | null;
1070
- target_resource_type?: string | null;
1071
- };
1072
- Relationships: [
1073
- {
1074
- foreignKeyName: "command_queue_completed_by_fkey";
1075
- columns: ["completed_by"];
1076
- isOneToOne: false;
1077
- referencedRelation: "users";
1078
- referencedColumns: ["id"];
1079
- },
1080
- {
1081
- foreignKeyName: "command_queue_organization_id_fkey";
1082
- columns: ["organization_id"];
1083
- isOneToOne: false;
1084
- referencedRelation: "organizations";
1085
- referencedColumns: ["id"];
1086
- },
1087
- {
1088
- foreignKeyName: "command_queue_target_execution_id_fkey";
1089
- columns: ["target_execution_id"];
1090
- isOneToOne: false;
1091
- referencedRelation: "execution_logs";
1092
- referencedColumns: ["execution_id"];
1093
- }
1094
- ];
1095
- };
1096
- credentials: {
1097
- Row: {
1098
- created_at: string;
1099
- created_by: string | null;
1100
- encrypted_value: string;
1101
- id: string;
1102
- name: string;
1103
- organization_id: string;
1104
- provider: string | null;
1105
- type: string;
1106
- updated_at: string;
1107
- };
1108
- Insert: {
1109
- created_at?: string;
1110
- created_by?: string | null;
1111
- encrypted_value: string;
1112
- id?: string;
1113
- name: string;
1114
- organization_id: string;
1115
- provider?: string | null;
1116
- type?: string;
1117
- updated_at?: string;
1118
- };
1119
- Update: {
1120
- created_at?: string;
1121
- created_by?: string | null;
1122
- encrypted_value?: string;
1123
- id?: string;
1124
- name?: string;
1125
- organization_id?: string;
1126
- provider?: string | null;
1127
- type?: string;
1128
- updated_at?: string;
1129
- };
1130
- Relationships: [
1131
- {
1132
- foreignKeyName: "credentials_created_by_fkey";
1133
- columns: ["created_by"];
1134
- isOneToOne: false;
1135
- referencedRelation: "users";
1136
- referencedColumns: ["id"];
1137
- },
1138
- {
1139
- foreignKeyName: "credentials_organization_id_fkey";
1140
- columns: ["organization_id"];
1141
- isOneToOne: false;
1142
- referencedRelation: "organizations";
1143
- referencedColumns: ["id"];
1144
- }
1145
- ];
1146
- };
1147
- deployments: {
1148
- Row: {
1149
- compiled_docs: Json | null;
1150
- created_at: string;
1151
- deployment_version: string | null;
1152
- documentation: Json | null;
1153
- error_message: string | null;
1154
- id: string;
1155
- organization_id: string;
1156
- pid: number | null;
1157
- port: number | null;
1158
- sdk_version: string;
1159
- status: string;
1160
- tarball_path: string | null;
1161
- updated_at: string;
1162
- };
1163
- Insert: {
1164
- compiled_docs?: Json | null;
1165
- created_at?: string;
1166
- deployment_version?: string | null;
1167
- documentation?: Json | null;
1168
- error_message?: string | null;
1169
- id?: string;
1170
- organization_id: string;
1171
- pid?: number | null;
1172
- port?: number | null;
1173
- sdk_version: string;
1174
- status?: string;
1175
- tarball_path?: string | null;
1176
- updated_at?: string;
1177
- };
1178
- Update: {
1179
- compiled_docs?: Json | null;
1180
- created_at?: string;
1181
- deployment_version?: string | null;
1182
- documentation?: Json | null;
1183
- error_message?: string | null;
1184
- id?: string;
1185
- organization_id?: string;
1186
- pid?: number | null;
1187
- port?: number | null;
1188
- sdk_version?: string;
1189
- status?: string;
1190
- tarball_path?: string | null;
1191
- updated_at?: string;
1192
- };
1193
- Relationships: [
1194
- {
1195
- foreignKeyName: "deployments_organization_id_fkey";
1196
- columns: ["organization_id"];
1197
- isOneToOne: false;
1198
- referencedRelation: "organizations";
1199
- referencedColumns: ["id"];
1200
- }
1201
- ];
1202
- };
1203
- execution_errors: {
1204
- Row: {
1205
- created_at: string | null;
1206
- error_category: string;
1207
- error_message: string;
1208
- error_severity: string;
1209
- error_stack_trace: string | null;
1210
- error_type: string;
1211
- execution_id: string;
1212
- id: string;
1213
- metadata: Json | null;
1214
- occurred_at: string;
1215
- organization_id: string;
1216
- resolved: boolean;
1217
- resolved_at: string | null;
1218
- resolved_by: string | null;
1219
- };
1220
- Insert: {
1221
- created_at?: string | null;
1222
- error_category: string;
1223
- error_message: string;
1224
- error_severity: string;
1225
- error_stack_trace?: string | null;
1226
- error_type: string;
1227
- execution_id: string;
1228
- id?: string;
1229
- metadata?: Json | null;
1230
- occurred_at?: string;
1231
- organization_id: string;
1232
- resolved?: boolean;
1233
- resolved_at?: string | null;
1234
- resolved_by?: string | null;
1235
- };
1236
- Update: {
1237
- created_at?: string | null;
1238
- error_category?: string;
1239
- error_message?: string;
1240
- error_severity?: string;
1241
- error_stack_trace?: string | null;
1242
- error_type?: string;
1243
- execution_id?: string;
1244
- id?: string;
1245
- metadata?: Json | null;
1246
- occurred_at?: string;
1247
- organization_id?: string;
1248
- resolved?: boolean;
1249
- resolved_at?: string | null;
1250
- resolved_by?: string | null;
1251
- };
1252
- Relationships: [
1253
- {
1254
- foreignKeyName: "execution_errors_execution_id_fkey";
1255
- columns: ["execution_id"];
1256
- isOneToOne: false;
1257
- referencedRelation: "execution_logs";
1258
- referencedColumns: ["execution_id"];
1259
- },
1260
- {
1261
- foreignKeyName: "execution_errors_organization_id_fkey";
1262
- columns: ["organization_id"];
1263
- isOneToOne: false;
1264
- referencedRelation: "organizations";
1265
- referencedColumns: ["id"];
1266
- },
1267
- {
1268
- foreignKeyName: "execution_errors_resolved_by_fkey";
1269
- columns: ["resolved_by"];
1270
- isOneToOne: false;
1271
- referencedRelation: "users";
1272
- referencedColumns: ["id"];
1273
- }
1274
- ];
1275
- };
1276
- execution_logs: {
1277
- Row: {
1278
- api_version: string | null;
1279
- completed_at: string | null;
1280
- created_at: string | null;
1281
- error: string | null;
1282
- execution_id: string;
1283
- input: Json | null;
1284
- last_heartbeat_at: string | null;
1285
- logs: Json | null;
1286
- organization_id: string;
1287
- origin_execution_id: string | null;
1288
- output: Json | null;
1289
- resource_id: string;
1290
- resource_status: string;
1291
- resource_type: string;
1292
- resource_version: string | null;
1293
- sdk_version: string | null;
1294
- session_id: string | null;
1295
- session_turn_number: number | null;
1296
- started_at: string;
1297
- status: string;
1298
- trigger_type: string | null;
1299
- updated_at: string | null;
1300
- user_id: string | null;
1301
- };
1302
- Insert: {
1303
- api_version?: string | null;
1304
- completed_at?: string | null;
1305
- created_at?: string | null;
1306
- error?: string | null;
1307
- execution_id?: string;
1308
- input?: Json | null;
1309
- last_heartbeat_at?: string | null;
1310
- logs?: Json | null;
1311
- organization_id: string;
1312
- origin_execution_id?: string | null;
1313
- output?: Json | null;
1314
- resource_id: string;
1315
- resource_status?: string;
1316
- resource_type?: string;
1317
- resource_version?: string | null;
1318
- sdk_version?: string | null;
1319
- session_id?: string | null;
1320
- session_turn_number?: number | null;
1321
- started_at?: string;
1322
- status: string;
1323
- trigger_type?: string | null;
1324
- updated_at?: string | null;
1325
- user_id?: string | null;
1326
- };
1327
- Update: {
1328
- api_version?: string | null;
1329
- completed_at?: string | null;
1330
- created_at?: string | null;
1331
- error?: string | null;
1332
- execution_id?: string;
1333
- input?: Json | null;
1334
- last_heartbeat_at?: string | null;
1335
- logs?: Json | null;
1336
- organization_id?: string;
1337
- origin_execution_id?: string | null;
1338
- output?: Json | null;
1339
- resource_id?: string;
1340
- resource_status?: string;
1341
- resource_type?: string;
1342
- resource_version?: string | null;
1343
- sdk_version?: string | null;
1344
- session_id?: string | null;
1345
- session_turn_number?: number | null;
1346
- started_at?: string;
1347
- status?: string;
1348
- trigger_type?: string | null;
1349
- updated_at?: string | null;
1350
- user_id?: string | null;
1351
- };
1352
- Relationships: [
1353
- {
1354
- foreignKeyName: "execution_history_organization_id_fkey";
1355
- columns: ["organization_id"];
1356
- isOneToOne: false;
1357
- referencedRelation: "organizations";
1358
- referencedColumns: ["id"];
1359
- },
1360
- {
1361
- foreignKeyName: "execution_logs_origin_execution_id_fkey";
1362
- columns: ["origin_execution_id"];
1363
- isOneToOne: false;
1364
- referencedRelation: "execution_logs";
1365
- referencedColumns: ["execution_id"];
1366
- },
1367
- {
1368
- foreignKeyName: "execution_logs_session_id_fkey";
1369
- columns: ["session_id"];
1370
- isOneToOne: false;
1371
- referencedRelation: "sessions";
1372
- referencedColumns: ["session_id"];
1373
- },
1374
- {
1375
- foreignKeyName: "execution_logs_user_id_fkey";
1376
- columns: ["user_id"];
1377
- isOneToOne: false;
1378
- referencedRelation: "users";
1379
- referencedColumns: ["id"];
1380
- }
1381
- ];
1382
- };
1383
- execution_metrics: {
1384
- Row: {
1385
- ai_call_count: number;
1386
- ai_calls: Json | null;
1387
- automation_savings_usd: number | null;
1388
- created_at: string | null;
1389
- duration_ms: number | null;
1390
- execution_id: string;
1391
- organization_id: string;
1392
- resource_id: string;
1393
- total_cost_usd: number;
1394
- total_input_tokens: number;
1395
- total_output_tokens: number;
1396
- };
1397
- Insert: {
1398
- ai_call_count: number;
1399
- ai_calls?: Json | null;
1400
- automation_savings_usd?: number | null;
1401
- created_at?: string | null;
1402
- duration_ms?: number | null;
1403
- execution_id: string;
1404
- organization_id: string;
1405
- resource_id: string;
1406
- total_cost_usd: number;
1407
- total_input_tokens: number;
1408
- total_output_tokens: number;
1409
- };
1410
- Update: {
1411
- ai_call_count?: number;
1412
- ai_calls?: Json | null;
1413
- automation_savings_usd?: number | null;
1414
- created_at?: string | null;
1415
- duration_ms?: number | null;
1416
- execution_id?: string;
1417
- organization_id?: string;
1418
- resource_id?: string;
1419
- total_cost_usd?: number;
1420
- total_input_tokens?: number;
1421
- total_output_tokens?: number;
1422
- };
1423
- Relationships: [
1424
- {
1425
- foreignKeyName: "execution_metrics_execution_id_fkey";
1426
- columns: ["execution_id"];
1427
- isOneToOne: true;
1428
- referencedRelation: "execution_logs";
1429
- referencedColumns: ["execution_id"];
1430
- },
1431
- {
1432
- foreignKeyName: "execution_metrics_organization_id_fkey";
1433
- columns: ["organization_id"];
1434
- isOneToOne: false;
1435
- referencedRelation: "organizations";
1436
- referencedColumns: ["id"];
1437
- }
1438
- ];
1439
- };
1440
- notifications: {
1441
- Row: {
1442
- action_url: string | null;
1443
- category: string;
1444
- created_at: string | null;
1445
- id: string;
1446
- message: string;
1447
- organization_id: string;
1448
- read: boolean | null;
1449
- read_at: string | null;
1450
- title: string;
1451
- user_id: string;
1452
- };
1453
- Insert: {
1454
- action_url?: string | null;
1455
- category: string;
1456
- created_at?: string | null;
1457
- id?: string;
1458
- message: string;
1459
- organization_id: string;
1460
- read?: boolean | null;
1461
- read_at?: string | null;
1462
- title: string;
1463
- user_id: string;
1464
- };
1465
- Update: {
1466
- action_url?: string | null;
1467
- category?: string;
1468
- created_at?: string | null;
1469
- id?: string;
1470
- message?: string;
1471
- organization_id?: string;
1472
- read?: boolean | null;
1473
- read_at?: string | null;
1474
- title?: string;
1475
- user_id?: string;
1476
- };
1477
- Relationships: [
1478
- {
1479
- foreignKeyName: "notifications_organization_id_fkey";
1480
- columns: ["organization_id"];
1481
- isOneToOne: false;
1482
- referencedRelation: "organizations";
1483
- referencedColumns: ["id"];
1484
- },
1485
- {
1486
- foreignKeyName: "notifications_user_id_fkey";
1487
- columns: ["user_id"];
1488
- isOneToOne: false;
1489
- referencedRelation: "users";
1490
- referencedColumns: ["id"];
1491
- }
1492
- ];
1493
- };
1494
- org_invitations: {
1495
- Row: {
1496
- accept_invitation_url: string | null;
1497
- accepted_at: string | null;
1498
- created_at: string | null;
1499
- email: string;
1500
- expires_at: string;
1501
- id: string;
1502
- invitation_state: string | null;
1503
- invitation_token: string | null;
1504
- inviter_user_id: string | null;
1505
- organization_id: string | null;
1506
- revoked_at: string | null;
1507
- role_slug: string | null;
1508
- updated_at: string | null;
1509
- workos_invitation_id: string;
1510
- };
1511
- Insert: {
1512
- accept_invitation_url?: string | null;
1513
- accepted_at?: string | null;
1514
- created_at?: string | null;
1515
- email: string;
1516
- expires_at: string;
1517
- id?: string;
1518
- invitation_state?: string | null;
1519
- invitation_token?: string | null;
1520
- inviter_user_id?: string | null;
1521
- organization_id?: string | null;
1522
- revoked_at?: string | null;
1523
- role_slug?: string | null;
1524
- updated_at?: string | null;
1525
- workos_invitation_id: string;
1526
- };
1527
- Update: {
1528
- accept_invitation_url?: string | null;
1529
- accepted_at?: string | null;
1530
- created_at?: string | null;
1531
- email?: string;
1532
- expires_at?: string;
1533
- id?: string;
1534
- invitation_state?: string | null;
1535
- invitation_token?: string | null;
1536
- inviter_user_id?: string | null;
1537
- organization_id?: string | null;
1538
- revoked_at?: string | null;
1539
- role_slug?: string | null;
1540
- updated_at?: string | null;
1541
- workos_invitation_id?: string;
1542
- };
1543
- Relationships: [
1544
- {
1545
- foreignKeyName: "org_invitations_inviter_user_id_fkey";
1546
- columns: ["inviter_user_id"];
1547
- isOneToOne: false;
1548
- referencedRelation: "users";
1549
- referencedColumns: ["id"];
1550
- },
1551
- {
1552
- foreignKeyName: "org_invitations_organization_id_fkey";
1553
- columns: ["organization_id"];
1554
- isOneToOne: false;
1555
- referencedRelation: "organizations";
1556
- referencedColumns: ["id"];
1557
- }
1558
- ];
1559
- };
1560
- org_memberships: {
1561
- Row: {
1562
- config: Json;
1563
- created_at: string | null;
1564
- id: string;
1565
- membership_status: string | null;
1566
- organization_id: string;
1567
- role_slug: string | null;
1568
- updated_at: string | null;
1569
- user_id: string;
1570
- workos_membership_id: string | null;
1571
- };
1572
- Insert: {
1573
- config?: Json;
1574
- created_at?: string | null;
1575
- id?: string;
1576
- membership_status?: string | null;
1577
- organization_id: string;
1578
- role_slug?: string | null;
1579
- updated_at?: string | null;
1580
- user_id: string;
1581
- workos_membership_id?: string | null;
1582
- };
1583
- Update: {
1584
- config?: Json;
1585
- created_at?: string | null;
1586
- id?: string;
1587
- membership_status?: string | null;
1588
- organization_id?: string;
1589
- role_slug?: string | null;
1590
- updated_at?: string | null;
1591
- user_id?: string;
1592
- workos_membership_id?: string | null;
1593
- };
1594
- Relationships: [
1595
- {
1596
- foreignKeyName: "org_memberships_organization_id_fkey";
1597
- columns: ["organization_id"];
1598
- isOneToOne: false;
1599
- referencedRelation: "organizations";
1600
- referencedColumns: ["id"];
1601
- },
1602
- {
1603
- foreignKeyName: "org_memberships_user_id_fkey";
1604
- columns: ["user_id"];
1605
- isOneToOne: false;
1606
- referencedRelation: "users";
1607
- referencedColumns: ["id"];
1608
- }
1609
- ];
1610
- };
1611
- organizations: {
1612
- Row: {
1613
- config: Json;
1614
- created_at: string;
1615
- id: string;
1616
- is_test: boolean;
1617
- metadata: Json;
1618
- name: string;
1619
- status: string;
1620
- updated_at: string;
1621
- workos_org_id: string;
1622
- };
1623
- Insert: {
1624
- config?: Json;
1625
- created_at?: string;
1626
- id?: string;
1627
- is_test?: boolean;
1628
- metadata?: Json;
1629
- name: string;
1630
- status?: string;
1631
- updated_at?: string;
1632
- workos_org_id: string;
1633
- };
1634
- Update: {
1635
- config?: Json;
1636
- created_at?: string;
1637
- id?: string;
1638
- is_test?: boolean;
1639
- metadata?: Json;
1640
- name?: string;
1641
- status?: string;
1642
- updated_at?: string;
1643
- workos_org_id?: string;
1644
- };
1645
- Relationships: [];
1646
- };
1647
- session_messages: {
1648
- Row: {
1649
- created_at: string | null;
1650
- id: string;
1651
- message: string;
1652
- message_index: number | null;
1653
- message_type: string | null;
1654
- metadata: Json | null;
1655
- role: string;
1656
- session_id: string;
1657
- session_turn_number: number;
1658
- };
1659
- Insert: {
1660
- created_at?: string | null;
1661
- id: string;
1662
- message: string;
1663
- message_index?: number | null;
1664
- message_type?: string | null;
1665
- metadata?: Json | null;
1666
- role: string;
1667
- session_id: string;
1668
- session_turn_number: number;
1669
- };
1670
- Update: {
1671
- created_at?: string | null;
1672
- id?: string;
1673
- message?: string;
1674
- message_index?: number | null;
1675
- message_type?: string | null;
1676
- metadata?: Json | null;
1677
- role?: string;
1678
- session_id?: string;
1679
- session_turn_number?: number;
1680
- };
1681
- Relationships: [
1682
- {
1683
- foreignKeyName: "session_messages_session_id_fkey";
1684
- columns: ["session_id"];
1685
- isOneToOne: false;
1686
- referencedRelation: "sessions";
1687
- referencedColumns: ["session_id"];
1688
- }
1689
- ];
1690
- };
1691
- sessions: {
1692
- Row: {
1693
- context_window_size: number;
1694
- created_at: string | null;
1695
- cumulative_input_tokens: number;
1696
- cumulative_output_tokens: number;
1697
- deleted_at: string | null;
1698
- ended_at: string | null;
1699
- memory_snapshot: Json;
1700
- metadata: Json | null;
1701
- organization_id: string;
1702
- resource_id: string;
1703
- session_id: string;
1704
- session_total_turns: number | null;
1705
- updated_at: string | null;
1706
- user_id: string | null;
1707
- };
1708
- Insert: {
1709
- context_window_size?: number;
1710
- created_at?: string | null;
1711
- cumulative_input_tokens?: number;
1712
- cumulative_output_tokens?: number;
1713
- deleted_at?: string | null;
1714
- ended_at?: string | null;
1715
- memory_snapshot: Json;
1716
- metadata?: Json | null;
1717
- organization_id: string;
1718
- resource_id: string;
1719
- session_id?: string;
1720
- session_total_turns?: number | null;
1721
- updated_at?: string | null;
1722
- user_id?: string | null;
1723
- };
1724
- Update: {
1725
- context_window_size?: number;
1726
- created_at?: string | null;
1727
- cumulative_input_tokens?: number;
1728
- cumulative_output_tokens?: number;
1729
- deleted_at?: string | null;
1730
- ended_at?: string | null;
1731
- memory_snapshot?: Json;
1732
- metadata?: Json | null;
1733
- organization_id?: string;
1734
- resource_id?: string;
1735
- session_id?: string;
1736
- session_total_turns?: number | null;
1737
- updated_at?: string | null;
1738
- user_id?: string | null;
1739
- };
1740
- Relationships: [
1741
- {
1742
- foreignKeyName: "fk_organization";
1743
- columns: ["organization_id"];
1744
- isOneToOne: false;
1745
- referencedRelation: "organizations";
1746
- referencedColumns: ["id"];
1747
- },
1748
- {
1749
- foreignKeyName: "fk_user";
1750
- columns: ["user_id"];
1751
- isOneToOne: false;
1752
- referencedRelation: "users";
1753
- referencedColumns: ["id"];
1754
- }
1755
- ];
1756
- };
1757
- task_schedules: {
1758
- Row: {
1759
- created_at: string;
1760
- current_step: number;
1761
- description: string | null;
1762
- id: string;
1763
- idempotency_key: string | null;
1764
- last_execution_id: string | null;
1765
- last_run_at: string | null;
1766
- max_retries: number;
1767
- metadata: Json | null;
1768
- name: string;
1769
- next_run_at: string | null;
1770
- organization_id: string;
1771
- origin_execution_id: string | null;
1772
- origin_resource_id: string | null;
1773
- origin_resource_type: string | null;
1774
- retry_count: number;
1775
- schedule_config: Json;
1776
- status: string;
1777
- target_resource_id: string;
1778
- target_resource_type: string;
1779
- updated_at: string;
1780
- };
1781
- Insert: {
1782
- created_at?: string;
1783
- current_step?: number;
1784
- description?: string | null;
1785
- id?: string;
1786
- idempotency_key?: string | null;
1787
- last_execution_id?: string | null;
1788
- last_run_at?: string | null;
1789
- max_retries?: number;
1790
- metadata?: Json | null;
1791
- name: string;
1792
- next_run_at?: string | null;
1793
- organization_id: string;
1794
- origin_execution_id?: string | null;
1795
- origin_resource_id?: string | null;
1796
- origin_resource_type?: string | null;
1797
- retry_count?: number;
1798
- schedule_config: Json;
1799
- status?: string;
1800
- target_resource_id: string;
1801
- target_resource_type: string;
1802
- updated_at?: string;
1803
- };
1804
- Update: {
1805
- created_at?: string;
1806
- current_step?: number;
1807
- description?: string | null;
1808
- id?: string;
1809
- idempotency_key?: string | null;
1810
- last_execution_id?: string | null;
1811
- last_run_at?: string | null;
1812
- max_retries?: number;
1813
- metadata?: Json | null;
1814
- name?: string;
1815
- next_run_at?: string | null;
1816
- organization_id?: string;
1817
- origin_execution_id?: string | null;
1818
- origin_resource_id?: string | null;
1819
- origin_resource_type?: string | null;
1820
- retry_count?: number;
1821
- schedule_config?: Json;
1822
- status?: string;
1823
- target_resource_id?: string;
1824
- target_resource_type?: string;
1825
- updated_at?: string;
1826
- };
1827
- Relationships: [
1828
- {
1829
- foreignKeyName: "task_schedules_organization_id_fkey";
1830
- columns: ["organization_id"];
1831
- isOneToOne: false;
1832
- referencedRelation: "organizations";
1833
- referencedColumns: ["id"];
1834
- }
1835
- ];
1836
- };
1837
- training_assessments: {
1838
- Row: {
1839
- answers: Json | null;
1840
- assessment_slug: string;
1841
- attempted_at: string;
1842
- course_slug: string;
1843
- id: string;
1844
- organization_id: string;
1845
- passed: boolean;
1846
- score: number;
1847
- user_id: string;
1848
- };
1849
- Insert: {
1850
- answers?: Json | null;
1851
- assessment_slug: string;
1852
- attempted_at?: string;
1853
- course_slug: string;
1854
- id?: string;
1855
- organization_id: string;
1856
- passed: boolean;
1857
- score: number;
1858
- user_id: string;
1859
- };
1860
- Update: {
1861
- answers?: Json | null;
1862
- assessment_slug?: string;
1863
- attempted_at?: string;
1864
- course_slug?: string;
1865
- id?: string;
1866
- organization_id?: string;
1867
- passed?: boolean;
1868
- score?: number;
1869
- user_id?: string;
1870
- };
1871
- Relationships: [
1872
- {
1873
- foreignKeyName: "training_assessments_organization_id_fkey";
1874
- columns: ["organization_id"];
1875
- isOneToOne: false;
1876
- referencedRelation: "organizations";
1877
- referencedColumns: ["id"];
1878
- },
1879
- {
1880
- foreignKeyName: "training_assessments_user_id_fkey";
1881
- columns: ["user_id"];
1882
- isOneToOne: false;
1883
- referencedRelation: "users";
1884
- referencedColumns: ["id"];
1885
- }
1886
- ];
1887
- };
1888
- training_certifications: {
1889
- Row: {
1890
- awarded_at: string;
1891
- certification_slug: string;
1892
- id: string;
1893
- organization_id: string;
1894
- user_id: string;
1895
- };
1896
- Insert: {
1897
- awarded_at?: string;
1898
- certification_slug: string;
1899
- id?: string;
1900
- organization_id: string;
1901
- user_id: string;
1902
- };
1903
- Update: {
1904
- awarded_at?: string;
1905
- certification_slug?: string;
1906
- id?: string;
1907
- organization_id?: string;
1908
- user_id?: string;
1909
- };
1910
- Relationships: [
1911
- {
1912
- foreignKeyName: "training_certifications_organization_id_fkey";
1913
- columns: ["organization_id"];
1914
- isOneToOne: false;
1915
- referencedRelation: "organizations";
1916
- referencedColumns: ["id"];
1917
- },
1918
- {
1919
- foreignKeyName: "training_certifications_user_id_fkey";
1920
- columns: ["user_id"];
1921
- isOneToOne: false;
1922
- referencedRelation: "users";
1923
- referencedColumns: ["id"];
1924
- }
1925
- ];
1926
- };
1927
- training_progress: {
1928
- Row: {
1929
- completed_at: string;
1930
- course_slug: string;
1931
- id: string;
1932
- lesson_slug: string;
1933
- organization_id: string;
1934
- user_id: string;
1935
- };
1936
- Insert: {
1937
- completed_at?: string;
1938
- course_slug: string;
1939
- id?: string;
1940
- lesson_slug: string;
1941
- organization_id: string;
1942
- user_id: string;
1943
- };
1944
- Update: {
1945
- completed_at?: string;
1946
- course_slug?: string;
1947
- id?: string;
1948
- lesson_slug?: string;
1949
- organization_id?: string;
1950
- user_id?: string;
1951
- };
1952
- Relationships: [
1953
- {
1954
- foreignKeyName: "training_progress_organization_id_fkey";
1955
- columns: ["organization_id"];
1956
- isOneToOne: false;
1957
- referencedRelation: "organizations";
1958
- referencedColumns: ["id"];
1959
- },
1960
- {
1961
- foreignKeyName: "training_progress_user_id_fkey";
1962
- columns: ["user_id"];
1963
- isOneToOne: false;
1964
- referencedRelation: "users";
1965
- referencedColumns: ["id"];
1966
- }
1967
- ];
1968
- };
1969
- users: {
1970
- Row: {
1971
- config: Json;
1972
- created_at: string;
1973
- display_name: string | null;
1974
- email: string;
1975
- first_name: string | null;
1976
- id: string;
1977
- is_active: boolean;
1978
- is_platform_admin: boolean | null;
1979
- last_login_at: string | null;
1980
- last_name: string | null;
1981
- last_visited_org: string | null;
1982
- profile_picture_url: string | null;
1983
- updated_at: string;
1984
- workos_user_id: string | null;
1985
- };
1986
- Insert: {
1987
- config?: Json;
1988
- created_at?: string;
1989
- display_name?: string | null;
1990
- email: string;
1991
- first_name?: string | null;
1992
- id?: string;
1993
- is_active?: boolean;
1994
- is_platform_admin?: boolean | null;
1995
- last_login_at?: string | null;
1996
- last_name?: string | null;
1997
- last_visited_org?: string | null;
1998
- profile_picture_url?: string | null;
1999
- updated_at?: string;
2000
- workos_user_id?: string | null;
2001
- };
2002
- Update: {
2003
- config?: Json;
2004
- created_at?: string;
2005
- display_name?: string | null;
2006
- email?: string;
2007
- first_name?: string | null;
2008
- id?: string;
2009
- is_active?: boolean;
2010
- is_platform_admin?: boolean | null;
2011
- last_login_at?: string | null;
2012
- last_name?: string | null;
2013
- last_visited_org?: string | null;
2014
- profile_picture_url?: string | null;
2015
- updated_at?: string;
2016
- workos_user_id?: string | null;
2017
- };
2018
- Relationships: [
2019
- {
2020
- foreignKeyName: "user_profiles_last_visited_org_fkey";
2021
- columns: ["last_visited_org"];
2022
- isOneToOne: false;
2023
- referencedRelation: "organizations";
2024
- referencedColumns: ["id"];
2025
- }
2026
- ];
2027
- };
2028
- webhook_endpoints: {
2029
- Row: {
2030
- created_at: string;
2031
- description: string | null;
2032
- id: string;
2033
- key: string;
2034
- last_triggered_at: string | null;
2035
- name: string;
2036
- organization_id: string;
2037
- request_count: number;
2038
- resource_id: string | null;
2039
- status: string;
2040
- updated_at: string;
2041
- };
2042
- Insert: {
2043
- created_at?: string;
2044
- description?: string | null;
2045
- id?: string;
2046
- key: string;
2047
- last_triggered_at?: string | null;
2048
- name: string;
2049
- organization_id: string;
2050
- request_count?: number;
2051
- resource_id?: string | null;
2052
- status?: string;
2053
- updated_at?: string;
2054
- };
2055
- Update: {
2056
- created_at?: string;
2057
- description?: string | null;
2058
- id?: string;
2059
- key?: string;
2060
- last_triggered_at?: string | null;
2061
- name?: string;
2062
- organization_id?: string;
2063
- request_count?: number;
2064
- resource_id?: string | null;
2065
- status?: string;
2066
- updated_at?: string;
2067
- };
2068
- Relationships: [
2069
- {
2070
- foreignKeyName: "webhook_endpoints_organization_id_fkey";
2071
- columns: ["organization_id"];
2072
- isOneToOne: false;
2073
- referencedRelation: "organizations";
2074
- referencedColumns: ["id"];
2075
- }
2076
- ];
2077
- };
2078
- };
2079
- Views: {
2080
- [_ in never]: never;
2081
- };
2082
- Functions: {
2083
- acq_default_checklist: {
2084
- Args: {
2085
- p_platform: string;
2086
- };
2087
- Returns: Json;
2088
- };
2089
- append_deal_activity: {
2090
- Args: {
2091
- p_activity: Json;
2092
- p_deal_id: string;
2093
- p_organization_id: string;
2094
- };
2095
- Returns: undefined;
2096
- };
2097
- auth_jwt_claims: {
2098
- Args: never;
2099
- Returns: Json;
2100
- };
2101
- auth_uid_safe: {
2102
- Args: never;
2103
- Returns: string;
2104
- };
2105
- current_user_is_platform_admin: {
2106
- Args: never;
2107
- Returns: boolean;
2108
- };
2109
- current_user_supabase_id: {
2110
- Args: never;
2111
- Returns: string;
2112
- };
2113
- detect_stalled_executions: {
2114
- Args: never;
2115
- Returns: undefined;
2116
- };
2117
- execute_session_turn: {
2118
- Args: {
2119
- p_session_id: string;
2120
- };
2121
- Returns: {
2122
- created_at: string;
2123
- ended_at: string;
2124
- memory_snapshot: Json;
2125
- metadata: Json;
2126
- organization_id: string;
2127
- resource_id: string;
2128
- session_id: string;
2129
- session_total_turns: number;
2130
- updated_at: string;
2131
- user_id: string;
2132
- }[];
2133
- };
2134
- get_storage_org_id: {
2135
- Args: {
2136
- file_path: string;
2137
- };
2138
- Returns: string;
2139
- };
2140
- get_workos_user_id: {
2141
- Args: never;
2142
- Returns: string;
2143
- };
2144
- is_org_admin: {
2145
- Args: {
2146
- org_id: string;
2147
- };
2148
- Returns: boolean;
2149
- };
2150
- is_org_member: {
2151
- Args: {
2152
- org_id: string;
2153
- };
2154
- Returns: boolean;
2155
- };
2156
- link_workos_membership_on_accept: {
2157
- Args: {
2158
- p_email: string;
2159
- p_organization_id: string;
2160
- p_workos_membership_id: string;
2161
- };
2162
- Returns: boolean;
2163
- };
2164
- pre_provision_invited_user: {
2165
- Args: {
2166
- p_email: string;
2167
- p_organization_id: string;
2168
- p_role_slug?: string;
2169
- };
2170
- Returns: Json;
2171
- };
2172
- process_due_schedules: {
2173
- Args: never;
2174
- Returns: Json;
2175
- };
2176
- upsert_user_profile: {
2177
- Args: never;
2178
- Returns: {
2179
- profile_display_name: string;
2180
- profile_email: string;
2181
- profile_id: string;
2182
- profile_workos_user_id: string;
2183
- }[];
2184
- };
2185
- };
2186
- Enums: {
2187
- [_ in never]: never;
2188
- };
2189
- CompositeTypes: {
2190
- [_ in never]: never;
2191
- };
2192
- };
2193
- };
2194
- type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
2195
- type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
2196
- type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
2197
- schema: keyof DatabaseWithoutInternals;
2198
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
2199
- schema: keyof DatabaseWithoutInternals;
2200
- } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
2201
- schema: keyof DatabaseWithoutInternals;
2202
- } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2203
- Row: infer R;
2204
- } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
2205
- Row: infer R;
2206
- } ? R : never : never;
2207
-
2208
- type SupabaseUserProfile = Tables<'users'>;
2209
-
2210
- interface ProfileContextValue {
2211
- profile: SupabaseUserProfile | null;
2212
- loading: boolean;
2213
- error: Error | null;
2214
- refetch: () => Promise<void>;
2215
- }
2216
1
  /**
2217
- * Consumes the nearest ProfileProvider.
2
+ * Profile module - User profile management
2218
3
  *
2219
- * @throws {Error} If called outside of a ProfileProvider tree.
4
+ * Exports:
5
+ * - ProfileProvider: Context provider that shares one profile state instance
6
+ * - useProfile: Hook for consuming ProfileProvider context
7
+ * - ProfileContextValue: Value type exposed by ProfileProvider
8
+ * - useUserProfile: Hook for user profile sync and access (standalone)
9
+ * - UseUserProfileReturn: Return type for useUserProfile hook
10
+ * - UserProfileService: Service for profile operations
2220
11
  */
2221
- declare function useProfile(): ProfileContextValue;
2222
- /**
2223
- * Provides shared profile state to its subtree via React Context.
2224
- *
2225
- * Wraps useUserProfile so that all consumers share one profile fetch
2226
- * instead of each triggering an independent sync call.
2227
- *
2228
- * Must be rendered inside the auth and service provider layers so that
2229
- * the underlying hook can access useAuthContext and useElevasisServices.
2230
- */
2231
- declare function ProfileProvider({ children }: {
2232
- children: ReactNode;
2233
- }): react.FunctionComponentElement<react.ProviderProps<ProfileContextValue | null>>;
2234
-
2235
- interface UseUserProfileOptions {
2236
- /**
2237
- * Optional error handler for profile sync failures
2238
- * If not provided, errors are logged to console
2239
- */
2240
- onError?: (context: {
2241
- phase: 'profile-sync';
2242
- userId?: string;
2243
- }, error: Error) => void;
2244
- }
2245
- interface UseUserProfileReturn {
2246
- profile: SupabaseUserProfile | null;
2247
- loading: boolean;
2248
- error: Error | null;
2249
- refetch: () => Promise<void>;
2250
- }
2251
- /**
2252
- * Hook for managing user profile data with automatic WorkOS -> Supabase sync
2253
- *
2254
- * This hook:
2255
- * 1. Automatically syncs WorkOS user data to Supabase on authentication
2256
- * 2. Provides access to the user's Supabase profile data
2257
- * 3. Handles loading states and errors
2258
- * 4. Includes a refetch function for manual updates
2259
- *
2260
- * @param options - Optional configuration including error handler
2261
- */
2262
- declare const useUserProfile: (options?: UseUserProfileOptions) => UseUserProfileReturn;
2263
-
2264
- declare class UserProfileService {
2265
- private apiRequest;
2266
- constructor(apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>);
2267
- /**
2268
- * Sync WorkOS user data to Supabase users table
2269
- * This creates or updates the user profile with latest WorkOS data
2270
- */
2271
- syncUserProfile(): Promise<SupabaseUserProfile | null>;
2272
- /**
2273
- * Get user profile from API
2274
- * Server identifies user from JWT (no user ID needed)
2275
- */
2276
- getUserProfile(): Promise<SupabaseUserProfile | null>;
2277
- /**
2278
- * Update last visited organization for the user
2279
- * @param organizationId - The Supabase organization ID
2280
- */
2281
- updateLastVisitedOrg(organizationId: string): Promise<void>;
2282
- /**
2283
- * Update user profile data
2284
- */
2285
- updateUserProfile(updates: Partial<{
2286
- firstName: string;
2287
- lastName: string;
2288
- profilePictureUrl: string;
2289
- }>): Promise<SupabaseUserProfile | null>;
2290
- }
2291
-
2292
- export { ProfileProvider, UserProfileService, useProfile, useUserProfile };
2293
- export type { ProfileContextValue, UseUserProfileReturn };
12
+ export { ProfileProvider, useProfile } from './context/ProfileProvider';
13
+ export type { ProfileContextValue } from './context/ProfileProvider';
14
+ export { useUserProfile } from './hooks/useUserProfile';
15
+ export type { UseUserProfileReturn } from './hooks/useUserProfile';
16
+ export { UserProfileService } from './services/UserProfileService';
17
+ //# sourceMappingURL=index.d.ts.map